Backend for Custom Frontend OSPRO Surveyor Indonesia
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

2 lines
133 KiB

/*! For license information please see 63.a1c3f78f.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[63],{1123:function(t,e){function r(t,e,r,n,i,a,s){try{var o=t[a](s),u=o.value}catch(h){return void r(h)}o.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var s=t.apply(e,n);function o(t){r(s,i,a,o,u,"next",t)}function u(t){r(s,i,a,o,u,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},2137:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(655);function i(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=Object(n.a)(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}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 i,a,s=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw a}}}}},2286:function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"AElement",(function(){return te})),r.d(e,"AnimateColorElement",(function(){return Wt})),r.d(e,"AnimateElement",(function(){return Qt})),r.d(e,"AnimateTransformElement",(function(){return Gt})),r.d(e,"BoundingBox",(function(){return St})),r.d(e,"CB1",(function(){return Q})),r.d(e,"CB2",(function(){return W})),r.d(e,"CB3",(function(){return G})),r.d(e,"CB4",(function(){return $})),r.d(e,"Canvg",(function(){return Ne})),r.d(e,"CircleElement",(function(){return _t})),r.d(e,"ClipPathElement",(function(){return ve})),r.d(e,"DefsElement",(function(){return Ft})),r.d(e,"DescElement",(function(){return Se})),r.d(e,"Document",(function(){return Pe})),r.d(e,"Element",(function(){return mt})),r.d(e,"EllipseElement",(function(){return Rt})),r.d(e,"FeColorMatrixElement",(function(){return de})),r.d(e,"FeCompositeElement",(function(){return Oe})),r.d(e,"FeDropShadowElement",(function(){return be})),r.d(e,"FeGaussianBlurElement",(function(){return ke})),r.d(e,"FeMorphologyElement",(function(){return xe})),r.d(e,"FilterElement",(function(){return me})),r.d(e,"Font",(function(){return wt})),r.d(e,"FontElement",(function(){return $t})),r.d(e,"FontFaceElement",(function(){return Zt})),r.d(e,"GElement",(function(){return Ht})),r.d(e,"GlyphElement",(function(){return Pt})),r.d(e,"GradientElement",(function(){return Ut})),r.d(e,"ImageElement",(function(){return ae})),r.d(e,"LineElement",(function(){return It})),r.d(e,"LinearGradientElement",(function(){return Xt})),r.d(e,"MarkerElement",(function(){return zt})),r.d(e,"MaskElement",(function(){return ye})),r.d(e,"Matrix",(function(){return gt})),r.d(e,"MissingGlyphElement",(function(){return Jt})),r.d(e,"Mouse",(function(){return nt})),r.d(e,"PSEUDO_ZERO",(function(){return U})),r.d(e,"Parser",(function(){return ht})),r.d(e,"PathElement",(function(){return Ct})),r.d(e,"PathParser",(function(){return Tt})),r.d(e,"PatternElement",(function(){return Bt})),r.d(e,"Point",(function(){return rt})),r.d(e,"PolygonElement",(function(){return Dt})),r.d(e,"PolylineElement",(function(){return Lt})),r.d(e,"Property",(function(){return tt})),r.d(e,"QB1",(function(){return Z})),r.d(e,"QB2",(function(){return J})),r.d(e,"QB3",(function(){return K})),r.d(e,"RadialGradientElement",(function(){return Yt})),r.d(e,"RectElement",(function(){return Vt})),r.d(e,"RenderedElement",(function(){return At})),r.d(e,"Rotate",(function(){return lt})),r.d(e,"SVGElement",(function(){return Mt})),r.d(e,"SVGFontLoader",(function(){return oe})),r.d(e,"Scale",(function(){return ft})),r.d(e,"Screen",(function(){return st})),r.d(e,"Skew",(function(){return dt})),r.d(e,"SkewX",(function(){return yt})),r.d(e,"SkewY",(function(){return pt})),r.d(e,"StopElement",(function(){return qt})),r.d(e,"StyleElement",(function(){return ue})),r.d(e,"SymbolElement",(function(){return se})),r.d(e,"TRefElement",(function(){return Kt})),r.d(e,"TSpanElement",(function(){return jt})),r.d(e,"TextElement",(function(){return Et})),r.d(e,"TextPathElement",(function(){return ne})),r.d(e,"TitleElement",(function(){return we})),r.d(e,"Transform",(function(){return vt})),r.d(e,"Translate",(function(){return ct})),r.d(e,"UnknownElement",(function(){return bt})),r.d(e,"UseElement",(function(){return he})),r.d(e,"ViewPort",(function(){return et})),r.d(e,"compressSpaces",(function(){return A})),r.d(e,"default",(function(){return Ne})),r.d(e,"getSelectorSpecificity",(function(){return H})),r.d(e,"normalizeAttributeName",(function(){return N})),r.d(e,"normalizeColor",(function(){return V})),r.d(e,"parseExternalUrl",(function(){return M})),r.d(e,"presets",(function(){return T})),r.d(e,"toNumbers",(function(){return E})),r.d(e,"trimLeft",(function(){return C})),r.d(e,"trimRight",(function(){return P})),r.d(e,"vectorMagnitude",(function(){return X})),r.d(e,"vectorsAngle",(function(){return q})),r.d(e,"vectorsRatio",(function(){return Y}));r(192),r(68),r(193),r(194),r(195),r(196),r(197),r(198),r(199),r(200),r(201),r(202),r(102);var n=r(427),i=r(2137),a=r(188),s=r(2293),o=r(129),u=r(733),h=r(186),c=r(187),l=r(184),f=r(185),g=r(618),d=r(1123),y=r.n(d),p=r(677),v=r.n(p),m=r(433),b=r.n(m),x=r(2287),O=r.n(x),k=r(2288),w=r(2289);function S(){S=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function o(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(C){o=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new w(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return A()}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var o=x(s,r);if(o){if(o===c)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,s),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var c={};function l(){}function f(){}function g(){}var d={};o(d,i,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(T([])));p&&p!==e&&r.call(p,i)&&(d=p);var v=g.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){o(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var n;this._invoke=function(i,a){function s(){return new e((function(n,s){!function n(i,a,s,o){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,s,o)}),(function(t){n("throw",t,s,o)})):e.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,o)}))}o(u.arg)}(i,a,n,s)}))}return n=n?n.then(s,s):s()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function O(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return f.prototype=g,o(v,"constructor",g),o(g,"constructor",f),f.displayName=o(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,o(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},m(b.prototype),o(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var s=new b(u(e,r,n,i),a);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},m(v),o(v,s,"Generator"),o(v,i,(function(){return this})),o(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(o&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=e,a?(this.method="next",this.next=a.finallyLoc,c):this.complete(s)},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),c},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),k(r),c}},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;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}var T=Object.freeze({__proto__:null,offscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.DOMParser,r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return y()(S().mark((function e(){var r,n,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))()}};return"undefined"===typeof DOMParser&&"undefined"!==typeof e||Reflect.deleteProperty(r,"DOMParser"),r},node:function(t){var e=t.DOMParser,r=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}});function A(t){return t.replace(/(?!\u3000)\s+/gm," ")}function C(t){return t.replace(/^[\n \t]+/,"")}function P(t){return t.replace(/[\n \t]+$/,"")}function E(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var j=/^[A-Z-]+$/;function N(t){return j.test(t)?t.toLowerCase():t}function M(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function V(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,(function(t,r){return e--&&r?String(Math.round(parseFloat(t))):t}))}var _=/(\[[^\]]+\])/g,R=/(#[^\s+>~.[:]+)/g,I=/(\.[^\s+>~.[:]+)/g,L=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,D=/(:[\w-]+\([^)]*\))/gi,B=/(:[^\s+>~.[:]+)/g,z=/([^\s+>~.[:]+)/g;function F(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function H(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,i=F(r,_),a=Object(g.a)(i,2);r=a[0],n=a[1],e[1]+=n;var s=F(r,R),o=Object(g.a)(s,2);r=o[0],n=o[1],e[0]+=n;var u=F(r,I),h=Object(g.a)(u,2);r=h[0],n=h[1],e[1]+=n;var c=F(r,L),l=Object(g.a)(c,2);r=l[0],n=l[1],e[2]+=n;var f=F(r,D),d=Object(g.a)(f,2);r=d[0],n=d[1],e[1]+=n;var y=F(r,B),p=Object(g.a)(y,2);r=p[0],n=p[1],e[1]+=n;var v=F(r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),z),m=Object(g.a)(v,2);return r=m[0],n=m[1],e[2]+=n,e.join("")}var U=1e-8;function X(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function Y(t,e){return(t[0]*e[0]+t[1]*e[1])/(X(t)*X(e))}function q(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Y(t,e))}function Q(t){return t*t*t}function W(t){return 3*t*t*(1-t)}function G(t){return 3*t*(1-t)*(1-t)}function $(t){return(1-t)*(1-t)*(1-t)}function Z(t){return t*t}function J(t){return 2*t*(1-t)}function K(t){return(1-t)*(1-t)}var tt=function(){function t(e,r,n){Object(l.a)(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}return Object(f.a)(t,[{key:"split",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",r=this.document,n=this.name;return A(this.getString()).trim().split(e).map((function(e){return new t(r,n,e)}))}},{key:"hasValue",value:function(t){var e=this.value;return null!==e&&""!==e&&(t||0!==e)&&"undefined"!==typeof e}},{key:"isString",value:function(t){var e=this.value,r="string"===typeof e;return r&&t?t.test(e):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return"undefined"===typeof t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return"undefined"===typeof t?0:parseFloat(t);var e=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}},{key:"getString",value:function(t){return"undefined"===typeof t||this.hasValue()?"undefined"===typeof this.value?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=V(e),this.value=e),e}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9.-]/g,"")}},{key:"getPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r="boolean"===typeof t?[void 0,t]:[t],n=Object(g.a)(r,2),i=n[0],a=n[1],s=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&a:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(i);default:var o=this.getNumber();return e&&o<1?o*s.computeSize(i):o}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(t,e){var r=this.getDefinition();if(!r)return null;if("function"===typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"===typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var r=this.getColor(),n=r.length,i=0,a=0;a<n&&(","===r[a]&&i++,3!==i);a++);if(e.hasValue()&&this.isString()&&3!==i){var s=new O.a(r);s.ok&&(s.alpha=e.getNumber(),r=s.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();tt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var et=function(){function t(){Object(l.a)(this,t),this.viewPorts=[]}return Object(f.a)(t,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,e){this.viewPorts.push({width:t,height:e})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var t=this.viewPorts;return t[t.length-1]}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}},{key:"computeSize",value:function(t){return"number"===typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}]),t}(),rt=function(){function t(e,r){Object(l.a)(this,t),this.x=e,this.y=r}return Object(f.a)(t,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var e=this.x,r=this.y,n=e*t[0]+r*t[2]+t[4],i=e*t[1]+r*t[3]+t[5];this.x=n,this.y=i}}],[{key:"parse",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=E(e),i=Object(g.a)(n,2),a=i[0],s=void 0===a?r:a,o=i[1],u=void 0===o?r:o;return new t(s,u)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=E(e),i=Object(g.a)(n,2),a=i[0],s=void 0===a?r:a,o=i[1],u=void 0===o?s:o;return new t(s,u)}},{key:"parsePath",value:function(e){for(var r=E(e),n=r.length,i=[],a=0;a<n;a+=2)i.push(new t(r[a],r[a+1]));return i}}]),t}(),nt=function(){function t(e){Object(l.a)(this,t),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return Object(f.a)(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,e=this.onClick,r=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0}}},{key:"stop",value:function(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach((function(t,e){for(var n=t.run,i=r[e];i;)n(i),i=i.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var a=r.x,s=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(a,s)&&(n[i]=t)}))}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var a=r.x,s=r.y;!n[i]&&e.isPointInBox(a,s)&&(n[i]=t)}))}}},{key:"mapXY",value:function(t,e){for(var r=this.screen,n=r.window,i=r.ctx,a=new rt(t,e),s=i.canvas;s;)a.x-=s.offsetLeft,a.y-=s.offsetTop,s=s.offsetParent;return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}},{key:"onClick",value:function(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),it="undefined"!==typeof window?window:null,at="undefined"!==typeof fetch?fetch.bind(void 0):null,st=function(){function t(e){Object(l.a)(this,t);var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?at:n,a=r.window,s=void 0===a?it:a;this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new et,this.mouse=new nt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=s,this.fetch=i}return Object(f.a)(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every((function(t){return t()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var e=t.document,r=t.ctx,n=t.aspectRatio,i=t.width,a=t.desiredWidth,s=t.height,o=t.desiredHeight,u=t.minX,h=void 0===u?0:u,c=t.minY,l=void 0===c?0:c,f=t.refX,d=t.refY,y=t.clip,p=void 0!==y&&y,v=t.clipX,m=void 0===v?0:v,b=t.clipY,x=void 0===b?0:b,O=A(n).replace(/^defer\s/,"").split(" "),k=Object(g.a)(O,2),w=k[0]||"xMidYMid",S=k[1]||"meet",T=i/a,C=s/o,P=Math.min(T,C),E=Math.max(T,C),j=a,N=o;"meet"===S&&(j*=P,N*=P),"slice"===S&&(j*=E,N*=E);var M=new tt(e,"refX",f),V=new tt(e,"refY",d),_=M.hasValue()&&V.hasValue();if(_&&r.translate(-P*M.getPixels("x"),-P*V.getPixels("y")),p){var R=P*m,I=P*x;r.beginPath(),r.moveTo(R,I),r.lineTo(i,I),r.lineTo(i,s),r.lineTo(R,s),r.closePath(),r.clip()}if(!_){var L="meet"===S&&P===C,D="slice"===S&&E===C,B="meet"===S&&P===T,z="slice"===S&&E===T;w.startsWith("xMid")&&(L||D)&&r.translate(i/2-j/2,0),w.endsWith("YMid")&&(B||z)&&r.translate(0,s/2-N/2),w.startsWith("xMax")&&(L||D)&&r.translate(i-j,0),w.endsWith("YMax")&&(B||z)&&r.translate(0,s-N)}switch(!0){case"none"===w:r.scale(T,C);break;case"meet"===S:r.scale(P,P);break;case"slice"===S:r.scale(E,E)}r.translate(-h,-l)}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,a=r.ignoreMouse,s=void 0!==a&&a,o=r.ignoreAnimation,u=void 0!==o&&o,h=r.ignoreDimensions,c=void 0!==h&&h,l=r.ignoreClear,f=void 0!==l&&l,g=r.forceRedraw,d=r.scaleWidth,y=r.scaleHeight,p=r.offsetX,v=r.offsetY,m=this.FRAMERATE,x=this.mouse,O=1e3/m;if(this.frameDuration=O,this.readyPromise=new Promise((function(t){e.resolveReady=t})),this.isReady()&&this.render(t,c,f,d,y,p,v),i){var k=Date.now(),w=k,S=0,T=function r(){k=Date.now(),(S=k-w)>=O&&(w=k-S%O,e.shouldUpdate(u,g)&&(e.render(t,c,f,d,y,p,v),x.runEvents())),e.intervalId=b()(r)};s||x.start(),this.intervalId=b()(T)}}},{key:"stop",value:function(){this.intervalId&&(b.a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration,n=this.animations.reduce((function(t,e){return e.update(r)||t}),!1);if(n)return!0}return!("function"!==typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,a,s){var o=this.CLIENT_WIDTH,u=this.CLIENT_HEIGHT,h=this.viewPort,c=this.ctx,l=this.isFirstRender,f=c.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(o,u);var g=t.getStyle("width"),d=t.getStyle("height");!e&&(l||"number"!==typeof n&&"number"!==typeof i)&&(g.hasValue()&&(f.width=g.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),d.hasValue()&&(f.height=d.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var y=f.clientWidth||f.width,p=f.clientHeight||f.height;if(e&&g.hasValue()&&d.hasValue()&&(y=g.getPixels("x"),p=d.getPixels("y")),h.setCurrent(y,p),"number"===typeof a&&t.getAttribute("x",!0).setValue(a),"number"===typeof s&&t.getAttribute("y",!0).setValue(s),"number"===typeof n||"number"===typeof i){var v=E(t.getAttribute("viewBox").getString()),m=0,b=0;if("number"===typeof n){var x=t.getStyle("width");x.hasValue()?m=x.getPixels("x")/n:isNaN(v[2])||(m=v[2]/n)}if("number"===typeof i){var O=t.getStyle("height");O.hasValue()?b=O.getPixels("y")/i:isNaN(v[3])||(b=v[3]/i)}m||(m=b),b||(b=m),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var k=t.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/m,", ").concat(1/b,")"))}r||c.clearRect(0,0,y,p),t.render(c),l&&(this.isFirstRender=!1)}}]),t}();st.defaultWindow=it,st.defaultFetch=at;var ot=st.defaultFetch,ut="undefined"!==typeof DOMParser?DOMParser:null,ht=function(){function t(){Object(l.a)(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?ot:r,i=e.DOMParser,a=void 0===i?ut:i;this.fetch=n,this.DOMParser=a}return Object(f.a)(t,[{key:"parse",value:function(t){var e=this;return y()(S().mark((function r(){return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.startsWith("<")){r.next=2;break}return r.abrupt("return",e.parseFromString(t));case 2:return r.abrupt("return",e.load(t));case 3:case"end":return r.stop()}}),r)})))()}},{key:"parseFromString",value:function(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}},{key:"load",value:function(t){var e=this;return y()(S().mark((function r(){var n,i;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.fetch(t);case 2:return n=r.sent,r.next=5,n.text();case 5:return i=r.sent,r.abrupt("return",e.parseFromString(i));case 7:case"end":return r.stop()}}),r)})))()}}]),t}(),ct=function(){function t(e,r){Object(l.a)(this,t),this.type="translate",this.point=null,this.point=rt.parse(r)}return Object(f.a)(t,[{key:"apply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(r||0,n||0)}},{key:"unapply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(-1*r||0,-1*n||0)}},{key:"applyToPoint",value:function(t){var e=this.point,r=e.x,n=e.y;t.applyTransform([1,0,0,1,r||0,n||0])}}]),t}(),lt=function(){function t(e,r,n){Object(l.a)(this,t),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=E(r);this.angle=new tt(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0}return Object(f.a)(t,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,a=this.angle,s=e+n.getPixels("x"),o=r+i.getPixels("y");t.translate(s,o),t.rotate(a.getRadians()),t.translate(-s,-o)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,a=this.angle,s=e+n.getPixels("x"),o=r+i.getPixels("y");t.translate(s,o),t.rotate(-1*a.getRadians()),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),t}(),ft=function(){function t(e,r,n){Object(l.a)(this,t),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=rt.parseScale(r);0!==i.x&&0!==i.y||(i.x=U,i.y=U),this.scale=i,this.originX=n[0],this.originY=n[1]}return Object(f.a)(t,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,a=this.originY,s=i.getPixels("x"),o=a.getPixels("y");t.translate(s,o),t.scale(r,n||r),t.translate(-s,-o)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,a=this.originY,s=i.getPixels("x"),o=a.getPixels("y");t.translate(s,o),t.scale(1/r,1/n||r),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0])}}]),t}(),gt=function(){function t(e,r,n){Object(l.a)(this,t),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=E(r),this.originX=n[0],this.originY=n[1]}return Object(f.a)(t,[{key:"apply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,i=e.getPixels("x"),a=r.getPixels("y");t.translate(i,a),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-i,-a)}},{key:"unapply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,i=n[0],a=n[2],s=n[4],o=n[1],u=n[3],h=n[5],c=1/(i*(1*u-0*h)-a*(1*o-0*h)+s*(0*o-0*u)),l=e.getPixels("x"),f=r.getPixels("y");t.translate(l,f),t.transform(c*(1*u-0*h),c*(0*h-1*o),c*(0*s-1*a),c*(1*i-0*s),c*(a*h-s*u),c*(s*o-i*h)),t.translate(-l,-f)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}(),dt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="skew",a.angle=null,a.angle=new tt(t,"angle",n),a}return Object(f.a)(r)}(gt),yt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="skewX",a.matrix=[1,0,Math.tan(a.angle.getRadians()),1,0,0],a}return Object(f.a)(r)}(dt),pt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="skewY",a.matrix=[1,Math.tan(a.angle.getRadians()),0,1,0,0],a}return Object(f.a)(r)}(dt);var vt=function(){function t(e,r,n){var i=this;Object(l.a)(this,t),this.document=e,this.transforms=[],function(t){return A(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r).forEach((function(e){if("none"!==e){var r=function(t){var e=t.split("("),r=Object(g.a)(e,2),n=r[0],i=r[1];return[n.trim(),i.trim().replace(")","")]}(e),a=Object(g.a)(r,2),s=a[0],o=a[1],u=t.transformTypes[s];"undefined"!==typeof u&&i.transforms.push(new u(i.document,o,n))}}))}return Object(f.a)(t,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].apply(t)}},{key:"unapply",value:function(t){for(var e=this.transforms,r=e.length-1;r>=0;r--)e[r].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t)}}],[{key:"fromElement",value:function(e,r){var n=r.getStyle("transform",!1,!0),i=r.getStyle("transform-origin",!1,!0).split(),a=Object(g.a)(i,2),s=a[0],o=a[1],u=[s,void 0===o?s:o];return n.hasValue()?new t(e,n.getString(),u):null}}]),t}();vt.transformTypes={translate:ct,rotate:lt,scale:ft,matrix:gt,skewX:yt,skewY:pt};var mt=function(){function t(e,r){var n=this;Object(l.a)(this,t);var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=e,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(t){var r=N(t.nodeName);n.attributes[r]=new tt(e,r,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));a.forEach((function(t){if(t){var r=t.split(":").map((function(t){return t.trim()})),i=Object(g.a)(r,2),a=i[0],s=i[1];n.styles[a]=new tt(e,a,s)}}))}var s=e.definitions,o=this.getAttribute("id");o.hasValue()&&(s[o.getString()]||(s[o.getString()]=this)),Array.from(r.childNodes).forEach((function(t){if(1===t.nodeType)n.addChild(t);else if(i&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}}))}}return Object(f.a)(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new tt(this.document,t,"");return this.attributes[t]=n,n}return r||tt.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return tt.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(null!==i&&void 0!==i&&i.hasValue())return this.styles[t]=i,i;if(!r){var a=this.parent;if(a){var s=a.getStyle(t);if(null!==s&&void 0!==s&&s.hasValue())return s}}if(e){var o=new tt(this.document,t,"");return this.styles[t]=o,o}return n||tt.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var e=vt.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t)}}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach((function(e){e.render(t)}))}},{key:"addChild",value:function(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var e,r=this.node;if("function"===typeof r.matches)return r.matches(t);var n=null===(e=r.getAttribute)||void 0===e?void 0:e.call(r,"class");return!(!n||""===n)&&n.split(" ").some((function(e){return".".concat(e)===t}))}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],a=r[n];if(i)for(var s in i){var o=this.stylesSpecificity[s];"undefined"===typeof o&&(o="000"),a>=o&&(this.styles[s]=i[s],this.stylesSpecificity[s]=a)}}}},{key:"removeStyles",value:function(t,e){return e.reduce((function(e,r){var n=t.getStyle(r);if(!n.hasValue())return e;var i=n.getString();return n.setValue(""),[].concat(Object(u.a)(e),[[r,i]])}),[])}},{key:"restoreStyles",value:function(t,e){e.forEach((function(e){var r=Object(g.a)(e,2),n=r[0],i=r[1];t.getStyle(n,!0).setValue(i)}))}},{key:"isFirstChild",value:function(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}]),t}();mt.ignoreChildTypes=["title"];var bt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){return Object(l.a)(this,r),e.call(this,t,n,i)}return Object(f.a)(r)}(mt);function xt(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function Ot(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function kt(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}var wt=function(){function e(t,r,n,i,a,s){Object(l.a)(this,e);var o=s?"string"===typeof s?e.parse(s):s:{};this.fontFamily=a||o.fontFamily,this.fontSize=i||o.fontSize,this.fontStyle=t||o.fontStyle,this.fontWeight=n||o.fontWeight,this.fontVariant=r||o.fontVariant}return Object(f.a)(e,[{key:"toString",value:function(){return[Ot(this.fontStyle),this.fontVariant,kt(this.fontWeight),this.fontSize,(e=this.fontFamily,"undefined"===typeof t?e:e.trim().split(",").map(xt).join(","))].join(" ").trim();var e}}],[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",i="",a="",s="",o="",u=A(t).trim().split(" "),h={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach((function(t){switch(!0){case!h.fontStyle&&e.styles.includes(t):"inherit"!==t&&(n=t),h.fontStyle=!0;break;case!h.fontVariant&&e.variants.includes(t):"inherit"!==t&&(i=t),h.fontStyle=!0,h.fontVariant=!0;break;case!h.fontWeight&&e.weights.includes(t):"inherit"!==t&&(a=t),h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0;break;case!h.fontSize:if("inherit"!==t){var r=t.split("/"),u=Object(g.a)(r,1);s=u[0]}h.fontStyle=!0,h.fontVariant=!0,h.fontWeight=!0,h.fontSize=!0;break;default:"inherit"!==t&&(o+=t)}})),new e(n,i,a,s,o,r)}}]),e}();wt.styles="normal|italic|oblique|inherit",wt.variants="normal|small-caps|inherit",wt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var St=function(){function t(){Object(l.a)(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return Object(f.a)(t,[{key:"x",get:function(){return this.x1}},{key:"y",get:function(){return this.y1}},{key:"width",get:function(){return this.x2-this.x1}},{key:"height",get:function(){return this.y2-this.y1}},{key:"addPoint",value:function(t,e){"undefined"!==typeof t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),"undefined"!==typeof e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i)}}},{key:"sumCubic",value:function(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,e,r,n,i){var a=6*e-12*r+6*n,s=-3*e+9*r-9*n+3*i,o=3*r-3*e;if(0!==s){var u=Math.pow(a,2)-4*o*s;if(!(u<0)){var h=(-a+Math.sqrt(u))/(2*s);0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,r,n,i)):this.addY(this.sumCubic(h,e,r,n,i)));var c=(-a-Math.sqrt(u))/(2*s);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,n,i)):this.addY(this.sumCubic(c,e,r,n,i)))}}else{if(0===a)return;var l=-o/a;0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)))}}},{key:"addBezierCurve",value:function(t,e,r,n,i,a,s,o){this.addPoint(t,e),this.addPoint(s,o),this.bezierCurveAdd(!0,t,r,i,s),this.bezierCurveAdd(!1,e,n,a,o)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,a){var s=t+2/3*(r-t),o=e+2/3*(n-e),u=s+1/3*(i-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,s,u,o,h,i,a)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,a=this.y2;return r<=t&&t<=i&&n<=e&&e<=a}}]),t}(),Tt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t){var n;return Object(l.a)(this,r),(n=e.call(this,t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""))).control=null,n.start=null,n.current=null,n.command=null,n.commands=n.commands,n.i=-1,n.previousCommand=null,n.points=[],n.angles=[],n}return Object(f.a)(r,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new rt(0,0),this.control=new rt(0,0),this.current=new rt(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.commands.length-1}},{key:"next",value:function(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}},{key:"getPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",r=new rt(this.command[t],this.command[e]);return this.makeAbsolute(r)}},{key:"getAsControlPoint",value:function(t,e){var r=this.getPoint(t,e);return this.control=r,r}},{key:"getAsCurrentPoint",value:function(t,e){var r=this.getPoint(t,e);return this.current=r,r}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.type;if(t!==k.a.CURVE_TO&&t!==k.a.SMOOTH_CURVE_TO&&t!==k.a.QUAD_TO&&t!==k.a.SMOOTH_QUAD_TO)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control,a=i.x,s=i.y;return new rt(2*r-a,2*n-s)}},{key:"makeAbsolute",value:function(t){if(this.command.relative){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n}return t}},{key:"addMarker",value:function(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,e){this.points.push(t),this.angles.push(e)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,e=t.length,r=0;r<e;r++)if(!t[r])for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break}return t}}]),r}(k.a),At=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).modifiedEmSizeStack=!1,t}return Object(f.a)(r,[{key:"calculateOpacity",value:function(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}},{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),a=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var s=r.getFillStyleDefinition(this,n);s&&(t.fillStyle=s)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var o=r.getColor();"inherit"!==o&&(t.fillStyle="none"===o?"rgba(0,0,0,0)":o)}if(n.hasValue()){var u=new tt(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=u}if(i.isUrlDefinition()){var h=i.getFillStyleDefinition(this,a);h&&(t.strokeStyle=h)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var c=i.getString();"inherit"!==c&&(t.strokeStyle="none"===c?"rgba(0,0,0,0)":c)}if(a.hasValue()){var l=new tt(this.document,"stroke",t.strokeStyle).addOpacity(a).getString();t.strokeStyle=l}var f=this.getStyle("stroke-width");if(f.hasValue()){var g=f.getPixels();t.lineWidth=g||U}var d=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),p=this.getStyle("stroke-miterlimit"),v=this.getStyle("stroke-dasharray"),m=this.getStyle("stroke-dashoffset");if(d.hasValue()&&(t.lineCap=d.getString()),y.hasValue()&&(t.lineJoin=y.getString()),p.hasValue()&&(t.miterLimit=p.getNumber()),v.hasValue()&&"none"!==v.getString()){var b=E(v.getString());"undefined"!==typeof t.setLineDash?t.setLineDash(b):"undefined"!==typeof t.webkitLineDash?t.webkitLineDash=b:"undefined"===typeof t.mozDash||1===b.length&&0===b[0]||(t.mozDash=b);var x=m.getPixels();"undefined"!==typeof t.lineDashOffset?t.lineDashOffset=x:"undefined"!==typeof t.webkitLineDashOffset?t.webkitLineDashOffset=x:"undefined"!==typeof t.mozDashOffset&&(t.mozDashOffset=x)}}if(this.modifiedEmSizeStack=!1,"undefined"!==typeof t.font){var O=this.getStyle("font"),k=this.getStyle("font-style"),w=this.getStyle("font-variant"),S=this.getStyle("font-weight"),T=this.getStyle("font-size"),A=this.getStyle("font-family"),C=new wt(k.getString(),w.getString(),S.getString(),T.hasValue()?"".concat(T.getPixels(!0),"px"):"",A.getString(),wt.parse(O.getString(),t.font));k.setValue(C.fontStyle),w.setValue(C.fontVariant),S.setValue(C.fontWeight),T.setValue(C.fontSize),A.setValue(C.fontFamily),t.font=C.toString(),T.isPixels()&&(this.document.emSize=T.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){Object(s.a)(Object(o.a)(r.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),r}(mt),Ct=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="path",a.pathParser=null,a.pathParser=new Tt(a.getAttribute("d").getString()),a}return Object(f.a)(r,[{key:"path",value:function(t){var e=this.pathParser,r=new St;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Tt.MOVE_TO:this.pathM(t,r);break;case Tt.LINE_TO:this.pathL(t,r);break;case Tt.HORIZ_LINE_TO:this.pathH(t,r);break;case Tt.VERT_LINE_TO:this.pathV(t,r);break;case Tt.CURVE_TO:this.pathC(t,r);break;case Tt.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Tt.QUAD_TO:this.pathQ(t,r);break;case Tt.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Tt.ARC:this.pathA(t,r);break;case Tt.CLOSE_PATH:this.pathZ(t,r)}return r}},{key:"getBoundingBox",value:function(t){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,e=t.getMarkerPoints(),r=t.getMarkerAngles();return e.map((function(t,e){return[t,r[e]]}))}},{key:"renderChildren",value:function(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var n=r.length-1,i=this.getStyle("marker-start"),a=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(i.isUrlDefinition()){var o=i.getDefinition(),u=Object(g.a)(r[0],2),h=u[0],c=u[1];o.render(t,h,c)}if(a.isUrlDefinition())for(var l=a.getDefinition(),f=1;f<n;f++){var d=Object(g.a)(r[f],2),y=d[0],p=d[1];l.render(t,y,p)}if(s.isUrlDefinition()){var v=s.getDefinition(),m=Object(g.a)(r[n],2),b=m[0],x=m[1];v.render(t,b,x)}}}},{key:"pathM",value:function(t,e){var n=this.pathParser,i=r.pathM(n).point,a=i.x,s=i.y;n.addMarker(i),e.addPoint(a,s),t&&t.moveTo(a,s)}},{key:"pathL",value:function(t,e){var n=this.pathParser,i=r.pathL(n),a=i.current,s=i.point,o=s.x,u=s.y;n.addMarker(s,a),e.addPoint(o,u),t&&t.lineTo(o,u)}},{key:"pathH",value:function(t,e){var n=this.pathParser,i=r.pathH(n),a=i.current,s=i.point,o=s.x,u=s.y;n.addMarker(s,a),e.addPoint(o,u),t&&t.lineTo(o,u)}},{key:"pathV",value:function(t,e){var n=this.pathParser,i=r.pathV(n),a=i.current,s=i.point,o=s.x,u=s.y;n.addMarker(s,a),e.addPoint(o,u),t&&t.lineTo(o,u)}},{key:"pathC",value:function(t,e){var n=this.pathParser,i=r.pathC(n),a=i.current,s=i.point,o=i.controlPoint,u=i.currentPoint;n.addMarker(u,o,s),e.addBezierCurve(a.x,a.y,s.x,s.y,o.x,o.y,u.x,u.y),t&&t.bezierCurveTo(s.x,s.y,o.x,o.y,u.x,u.y)}},{key:"pathS",value:function(t,e){var n=this.pathParser,i=r.pathS(n),a=i.current,s=i.point,o=i.controlPoint,u=i.currentPoint;n.addMarker(u,o,s),e.addBezierCurve(a.x,a.y,s.x,s.y,o.x,o.y,u.x,u.y),t&&t.bezierCurveTo(s.x,s.y,o.x,o.y,u.x,u.y)}},{key:"pathQ",value:function(t,e){var n=this.pathParser,i=r.pathQ(n),a=i.current,s=i.controlPoint,o=i.currentPoint;n.addMarker(o,s,s),e.addQuadraticCurve(a.x,a.y,s.x,s.y,o.x,o.y),t&&t.quadraticCurveTo(s.x,s.y,o.x,o.y)}},{key:"pathT",value:function(t,e){var n=this.pathParser,i=r.pathT(n),a=i.current,s=i.controlPoint,o=i.currentPoint;n.addMarker(o,s,s),e.addQuadraticCurve(a.x,a.y,s.x,s.y,o.x,o.y),t&&t.quadraticCurveTo(s.x,s.y,o.x,o.y)}},{key:"pathA",value:function(t,e){var n=this.pathParser,i=r.pathA(n),a=i.currentPoint,s=i.rX,o=i.rY,u=i.sweepFlag,h=i.xAxisRotation,c=i.centp,l=i.a1,f=i.ad,g=1-u?1:-1,d=l+g*(f/2),y=new rt(c.x+s*Math.cos(d),c.y+o*Math.sin(d));if(n.addMarkerAngle(y,d-g*Math.PI/2),n.addMarkerAngle(a,d-g*Math.PI),e.addPoint(a.x,a.y),t&&!isNaN(l)&&!isNaN(f)){var p=s>o?s:o,v=s>o?1:s/o,m=s>o?o/s:1;t.translate(c.x,c.y),t.rotate(h),t.scale(v,m),t.arc(0,0,p,l,l+f,Boolean(1-u)),t.scale(1/v,1/m),t.rotate(-h),t.translate(-c.x,-c.y)}}},{key:"pathZ",value:function(t,e){r.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}],[{key:"pathM",value:function(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}},{key:"pathL",value:function(t){return{current:t.current,point:t.getAsCurrentPoint()}}},{key:"pathH",value:function(t){var e=t.current,r=t.command,n=new rt((r.relative?e.x:0)+r.x,e.y);return t.current=n,{current:e,point:n}}},{key:"pathV",value:function(t){var e=t.current,r=t.command,n=new rt(e.x,(r.relative?e.y:0)+r.y);return t.current=n,{current:e,point:n}}},{key:"pathC",value:function(t){return{current:t.current,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathS",value:function(t){return{current:t.current,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathQ",value:function(t){return{current:t.current,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathT",value:function(t){var e=t.current,r=t.getReflectedControlPoint();return t.control=r,{current:e,controlPoint:r,currentPoint:t.getAsCurrentPoint()}}},{key:"pathA",value:function(t){var e=t.current,r=t.command,n=r.rX,i=r.rY,a=r.xRot,s=r.lArcFlag,o=r.sweepFlag,u=a*(Math.PI/180),h=t.getAsCurrentPoint(),c=new rt(Math.cos(u)*(e.x-h.x)/2+Math.sin(u)*(e.y-h.y)/2,-Math.sin(u)*(e.x-h.x)/2+Math.cos(u)*(e.y-h.y)/2),l=Math.pow(c.x,2)/Math.pow(n,2)+Math.pow(c.y,2)/Math.pow(i,2);l>1&&(n*=Math.sqrt(l),i*=Math.sqrt(l));var f=(s===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(i,2)-Math.pow(n,2)*Math.pow(c.y,2)-Math.pow(i,2)*Math.pow(c.x,2))/(Math.pow(n,2)*Math.pow(c.y,2)+Math.pow(i,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var g=new rt(f*n*c.y/i,f*-i*c.x/n),d=new rt((e.x+h.x)/2+Math.cos(u)*g.x-Math.sin(u)*g.y,(e.y+h.y)/2+Math.sin(u)*g.x+Math.cos(u)*g.y),y=q([1,0],[(c.x-g.x)/n,(c.y-g.y)/i]),p=[(c.x-g.x)/n,(c.y-g.y)/i],v=[(-c.x-g.x)/n,(-c.y-g.y)/i],m=q(p,v);return Y(p,v)<=-1&&(m=Math.PI),Y(p,v)>=1&&(m=0),{currentPoint:h,rX:n,rY:i,sweepFlag:o,xAxisRotation:u,centp:d,a1:y,ad:m}}},{key:"pathZ",value:function(t){t.current=t.start}}]),r}(At),Pt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="glyph",a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber(),a.unicode=a.getAttribute("unicode").getString(),a.arabicForm=a.getAttribute("arabic-form").getString(),a}return Object(f.a)(r)}(Ct),Et=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="text",a.x=0,a.y=0,a.measureCache=-1,a}return Object(f.a)(r,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Object(s.a)(Object(o.a)(r.prototype),"setContext",this).call(this,t,e);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}},{key:"initializeCoordinates",value:function(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}},{key:"getBoundingBox",value:function(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var r=null;return this.children.forEach((function(n,i){var a=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(a):r=a})),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=wt.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new St(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,r){var n=e[r],i=null;if(t.isArabic){var a=e.length,s=e[r-1],o=e[r+1],u="isolated";if((0===r||" "===s)&&r<a-1&&" "!==o&&(u="terminal"),r>0&&" "!==s&&r<a-1&&" "!==o&&(u="medial"),r>0&&" "!==s&&(r===a-1||" "===o)&&(u="initial"),"undefined"!==typeof t.glyphs[n]){var h=t.glyphs[n];i=h instanceof Pt?h:h[u]}}else i=t.glyphs[n];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,a=A(e.textContent||"");return 0===n&&(a=C(a)),n===i&&(a=P(a)),a}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((function(r,n){e.renderChild(t,e,e,n)}));var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var a=i.fontFace.unitsPerEm,s=wt.parse(e.ctx.font),o=r.getStyle("font-size").getNumber(s.fontSize),u=r.getStyle("font-style").getString(s.fontStyle),h=o/a,c=i.isRTL?n.split("").reverse().join(""):n,l=E(r.getAttribute("dx").getString()),f=c.length,g=0;g<f;g++){var d=this.getGlyph(i,c,g);t.translate(this.x,this.y),t.scale(h,-h);var y=t.lineWidth;t.lineWidth=t.lineWidth*a/o,"italic"===u&&t.transform(1,0,.4,1,0,0),d.render(t),"italic"===u&&t.transform(1,0,-.4,1,0,0),t.lineWidth=y,t.scale(1/h,-1/h),t.translate(-this.x,-this.y),this.x+=o*(d.horizAdvX||i.horizAdvX)/a,"undefined"===typeof l[g]||isNaN(l[g])||(this.x+=l[g])}else{var p=this.x,v=this.y;t.fillStyle&&t.fillText(n,p,v),t.strokeStyle&&t.strokeText(n,p,v)}}},{key:"applyAnchoring",value:function(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=0;r="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=r;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}},{key:"adjustChildCoordinatesRecursive",value:function(t){var e=this;this.children.forEach((function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,e,n)})),this.applyAnchoring()}},{key:"adjustChildCoordinatesRecursiveCore",value:function(t,e,r,n){var i=r.children[n];i.children.length>0?i.children.forEach((function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,i,n)})):this.adjustChildCoordinates(t,e,r,n)}},{key:"adjustChildCoordinates",value:function(t,e,r,n){var i=r.children[n];if("function"!==typeof i.measureText)return i;t.save(),i.setContext(t,!0);var a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("dx"),u=i.getAttribute("dy"),h=i.getStyle("font-family").getDefinition(),c=Boolean(h)&&h.isRTL;0===n&&(a.hasValue()||a.setValue(i.getInheritedAttribute("x")),s.hasValue()||s.setValue(i.getInheritedAttribute("y")),o.hasValue()||o.setValue(i.getInheritedAttribute("dx")),u.hasValue()||u.setValue(i.getInheritedAttribute("dy")));var l=i.measureText(t);return c&&(e.x-=l),a.hasValue()?(e.applyAnchoring(),i.x=a.getPixels("x"),o.hasValue()&&(i.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),i.x=e.x),e.x=i.x,c||(e.x+=l),s.hasValue()?(i.y=s.getPixels("y"),u.hasValue()&&(i.y+=u.getPixels("y"))):(u.hasValue()&&(e.y+=u.getPixels("y")),i.y=e.y),e.y=i.y,e.leafTexts.push(i),e.minX=Math.min(e.minX,i.x,i.x+l),e.maxX=Math.max(e.maxX,i.x,i.x+l),i.clearContext(t),t.restore(),i}},{key:"getChildBoundingBox",value:function(t,e,r,n){var i=r.children[n];if("function"!==typeof i.getBoundingBox)return null;var a=i.getBoundingBox(t);return a?(i.children.forEach((function(r,n){var s=e.getChildBoundingBox(t,e,i,n);a.addBoundingBox(s)})),a):null}},{key:"renderChild",value:function(t,e,r,n){var i=r.children[n];i.render(t),i.children.forEach((function(r,n){e.renderChild(t,e,i,n)}))}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),a=n.isRTL?e.split("").reverse().join(""):e,s=E(r.getAttribute("dx").getString()),o=a.length,u=0,h=0;h<o;h++){u+=(this.getGlyph(n,a,h).horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,"undefined"===typeof s[h]||isNaN(s[h])||(u+=s[h])}return u}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var c=t.measureText(e).width;return this.clearContext(t),t.restore(),c}},{key:"getInheritedAttribute",value:function(t){for(var e=this;e instanceof r&&e.isFirstChild();){var n=e.parent.getAttribute(t);if(n.hasValue(!0))return n.getValue("0");e=e.parent}return null}}]),r}(At),jt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return Object(f.a)(r,[{key:"getText",value:function(){return this.text}}]),r}(Et),Nt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="textNode",t}return Object(f.a)(r)}(jt),Mt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="svg",t.root=!1,t}return Object(f.a)(r,[{key:"setContext",value:function(t){var e,n=this.document,i=n.screen,a=n.window,u=t.canvas;if(i.setDefaults(t),u.style&&"undefined"!==typeof t.font&&a&&"undefined"!==typeof a.getComputedStyle){t.font=a.getComputedStyle(u).getPropertyValue("font");var h=new tt(n,"fontSize",wt.parse(t.font).fontSize);h.hasValue()&&(n.rootEmSize=h.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var c=i.viewPort,l=c.width,f=c.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var g=this.getAttribute("refX"),d=this.getAttribute("refY"),y=this.getAttribute("viewBox"),p=y.hasValue()?E(y.getString()):null,v=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),m=0,b=0,x=0,O=0;p&&(m=p[0],b=p[1]),this.root||(l=this.getStyle("width").getPixels("x"),f=this.getStyle("height").getPixels("y"),"marker"===this.type&&(x=m,O=b,m=0,b=0)),i.viewPort.setCurrent(l,f),!this.node||this.parent&&"foreignObject"!==(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),Object(s.a)(Object(o.a)(r.prototype),"setContext",this).call(this,t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),p&&(l=p[2],f=p[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:l,height:i.viewPort.height,desiredHeight:f,minX:m,minY:b,refX:g.getValue(),refY:d.getValue(),clip:v,clipX:x,clipY:O}),p&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(l,f))}},{key:"clearContext",value:function(t){Object(s.a)(Object(o.a)(r.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),s=this.getAttribute("style"),o=n.getNumber(0),u=i.getNumber(0);if(r)if("string"===typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),i.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(o||t," ").concat(u||e)),s.hasValue()){var c=this.getStyle("width"),l=this.getStyle("height");c.hasValue()&&c.setValue("".concat(t,"px")),l.hasValue()&&l.setValue("".concat(e,"px"))}}}]),r}(At),Vt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="rect",t}return Object(f.a)(r,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),a=this.getAttribute("rx"),s=this.getAttribute("ry"),o=a.getPixels("x"),u=s.getPixels("y");if(a.hasValue()&&!s.hasValue()&&(u=o),s.hasValue()&&!a.hasValue()&&(o=u),o=Math.min(o,n/2),u=Math.min(u,i/2),t){var h=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+o,r),t.lineTo(e+n-o,r),t.bezierCurveTo(e+n-o+h*o,r,e+n,r+u-h*u,e+n,r+u),t.lineTo(e+n,r+i-u),t.bezierCurveTo(e+n,r+i-u+h*u,e+n-o+h*o,r+i,e+n-o,r+i),t.lineTo(e+o,r+i),t.bezierCurveTo(e+o-h*o,r+i,e,r+i-u+h*u,e,r+i-u),t.lineTo(e,r+u),t.bezierCurveTo(e,r+u-h*u,e+o-h*o,r,e+o,r),t.closePath())}return new St(e,r,e+n,r+i)}},{key:"getMarkers",value:function(){return null}}]),r}(Ct),_t=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="circle",t}return Object(f.a)(r,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new St(e-n,r-n,e+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),r}(Ct),Rt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="ellipse",t}return Object(f.a)(r,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(i+r,a),t.bezierCurveTo(i+r,a+e*n,i+e*r,a+n,i,a+n),t.bezierCurveTo(i-e*r,a+n,i-r,a+e*n,i-r,a),t.bezierCurveTo(i-r,a-e*n,i-e*r,a-n,i,a-n),t.bezierCurveTo(i+e*r,a-n,i+r,a-e*n,i+r,a),t.closePath()),new St(i-r,a-n,i+r,a+n)}},{key:"getMarkers",value:function(){return null}}]),r}(Ct),It=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="line",t}return Object(f.a)(r,[{key:"getPoints",value:function(){return[new rt(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new rt(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),r=Object(g.a)(e,2),n=r[0],i=n.x,a=n.y,s=r[1],o=s.x,u=s.y;return t&&(t.beginPath(),t.moveTo(i,a),t.lineTo(o,u)),new St(i,a,o,u)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=Object(g.a)(t,2),r=e[0],n=e[1],i=r.angleTo(n);return[[r,i],[n,i]]}}]),r}(Ct),Lt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="polyline",a.points=[],a.points=rt.parsePath(a.getAttribute("points").getString()),a}return Object(f.a)(r,[{key:"path",value:function(t){var e=this.points,r=Object(g.a)(e,1)[0],n=r.x,i=r.y,a=new St(n,i);return t&&(t.beginPath(),t.moveTo(n,i)),e.forEach((function(e){var r=e.x,n=e.y;a.addPoint(r,n),t&&t.lineTo(r,n)})),a}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,r=[];return t.forEach((function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])])})),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),r}(Ct),Dt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="polygon",t}return Object(f.a)(r,[{key:"path",value:function(t){var e=Object(s.a)(Object(o.a)(r.prototype),"path",this).call(this,t),n=Object(g.a)(this.points,1)[0],i=n.x,a=n.y;return t&&(t.lineTo(i,a),t.closePath()),e}}]),r}(Lt),Bt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="pattern",t}return Object(f.a)(r,[{key:"createPattern",value:function(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),a=new Mt(this.document,null);a.attributes.viewBox=new tt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.width=new tt(this.document,"width","".concat(n,"px")),a.attributes.height=new tt(this.document,"height","".concat(i,"px")),a.attributes.transform=new tt(this.document,"transform",this.getAttribute("patternTransform").getValue()),a.children=this.children;var s=this.document.createCanvas(n,i),o=s.getContext("2d"),u=this.getAttribute("x"),h=this.getAttribute("y");u.hasValue()&&h.hasValue()&&o.translate(u.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var l=-1;l<=1;l++)o.save(),a.attributes.x=new tt(this.document,"x",c*s.width),a.attributes.y=new tt(this.document,"y",l*s.height),a.render(o),o.restore();return t.createPattern(s,"repeat")}}]),r}(mt),zt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="marker",t}return Object(f.a)(r,[{key:"render",value:function(t,e,r){if(e){var n=e.x,i=e.y,a=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(n,i),"auto"===a&&t.rotate(r),"strokeWidth"===s&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new Mt(this.document,null);o.type=this.type,o.attributes.viewBox=new tt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new tt(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new tt(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new tt(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new tt(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new tt(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new tt(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new tt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),"strokeWidth"===s&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===a&&t.rotate(-r),t.translate(-n,-i)}}}]),r}(mt),Ft=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="defs",t}return Object(f.a)(r,[{key:"render",value:function(){}}]),r}(mt),Ht=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="g",t}return Object(f.a)(r,[{key:"getBoundingBox",value:function(t){var e=new St;return this.children.forEach((function(r){e.addBoundingBox(r.getBoundingBox(t))})),e}}]),r}(At),Ut=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var s;Object(l.a)(this,r),(s=e.call(this,t,n,i)).attributesToInherit=["gradientUnits"],s.stops=[];var o=Object(a.a)(s),u=o.stops;return o.children.forEach((function(t){"stop"===t.type&&u.push(t)})),s}return Object(f.a)(r,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,r){var n=this,i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var a=i.stops,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(r,a[a.length-1].color);if(a.forEach((function(t){s.addColorStop(t.offset,n.addParentOpacity(r,t.color))})),this.getAttribute("gradientTransform").hasValue()){var o=this.document,u=o.screen,h=u.MAX_VIRTUAL_PIXELS,c=u.viewPort,l=Object(g.a)(c.viewPorts,1)[0],f=new Vt(o,null);f.attributes.x=new tt(o,"x",-h/3),f.attributes.y=new tt(o,"y",-h/3),f.attributes.width=new tt(o,"width",h),f.attributes.height=new tt(o,"height",h);var d=new Ht(o,null);d.attributes.transform=new tt(o,"transform",this.getAttribute("gradientTransform").getValue()),d.children=[f];var y=new Mt(o,null);y.attributes.x=new tt(o,"x",0),y.attributes.y=new tt(o,"y",0),y.attributes.width=new tt(o,"width",l.width),y.attributes.height=new tt(o,"height",l.height),y.children=[d];var p=o.createCanvas(l.width,l.height),v=p.getContext("2d");return v.fillStyle=s,y.render(v),v.createPattern(p,"no-repeat")}return s}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach((function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())}))}},{key:"addParentOpacity",value:function(t,e){return t.hasValue()?new tt(this.document,"color",e).addOpacity(t).getColor():e}}]),r}(mt),Xt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return Object(f.a)(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===s&&a===o?null:t.createLinearGradient(i,a,s,o)}}]),r}(Ut),Yt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return Object(f.a)(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=i,o=a;this.getAttribute("fx").hasValue()&&(s=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var u=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return t.createRadialGradient(s,o,h,i,a,u)}}]),r}(Ut),qt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="stop";var s=Math.max(0,Math.min(1,a.getAttribute("offset").getNumber())),o=a.getStyle("stop-opacity"),u=a.getStyle("stop-color",!0);return""===u.getString()&&u.setValue("#000"),o.hasValue()&&(u=u.addOpacity(o)),a.offset=s,a.color=u.getColor(),a}return Object(f.a)(r)}(mt),Qt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var s;Object(l.a)(this,r),(s=e.call(this,t,n,i)).type="animate",s.duration=0,s.initialValue=null,s.initialUnits="",s.removed=!1,s.frozen=!1,t.screen.animations.push(Object(a.a)(s)),s.begin=s.getAttribute("begin").getMilliseconds(),s.maxDuration=s.begin+s.getAttribute("dur").getMilliseconds(),s.from=s.getAttribute("from"),s.to=s.getAttribute("to"),s.values=new tt(t,"values",null);var o=s.getAttribute("values");return o.hasValue()&&s.values.setValue(o.getString().split(";")),s}return Object(f.a)(r,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,a=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(a*=100),"".concat(a).concat(t)}},{key:"update",value:function(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin<this.duration){var a=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var o=s.getString();a="".concat(o,"(").concat(a,")")}r.setValue(a),i=!0}return i}},{key:"getProgress",value:function(){var t=this.document,e=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),i=Math.floor(n),a=Math.ceil(n);r.from=new tt(t,"from",parseFloat(e.getValue()[i])),r.to=new tt(t,"to",parseFloat(e.getValue()[a])),r.progress=(n-i)/(a-i)}else r.from=this.from,r.to=this.to;return r}}]),r}(mt),Wt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="animateColor",t}return Object(f.a)(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=new O.a(r.getColor()),a=new O.a(n.getColor());if(i.ok&&a.ok){var s=i.r+(a.r-i.r)*e,o=i.g+(a.g-i.g)*e,u=i.b+(a.b-i.b)*e;return"rgb(".concat(Math.floor(s),", ").concat(Math.floor(o),", ").concat(Math.floor(u),")")}return this.getAttribute("from").getColor()}}]),r}(Qt),Gt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="animateTransform",t}return Object(f.a)(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=E(r.getString()),a=E(n.getString());return i.map((function(t,r){return t+(a[r]-t)*e})).join(" ")}}]),r}(Qt),$t=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,s){var o;Object(l.a)(this,r),(o=e.call(this,t,n,s)).type="font",o.glyphs={},o.horizAdvX=o.getAttribute("horiz-adv-x").getNumber();var u,h=t.definitions,c=Object(a.a)(o).children,f=Object(i.a)(c);try{for(f.s();!(u=f.n()).done;){var g=u.value;switch(g.type){case"font-face":o.fontFace=g;var d=g.getStyle("font-family");d.hasValue()&&(h[d.getString()]=Object(a.a)(o));break;case"missing-glyph":o.missingGlyph=g;break;case"glyph":var y=g;y.arabicForm?(o.isRTL=!0,o.isArabic=!0,"undefined"===typeof o.glyphs[y.unicode]&&(o.glyphs[y.unicode]={}),o.glyphs[y.unicode][y.arabicForm]=y):o.glyphs[y.unicode]=y}}}catch(p){f.e(p)}finally{f.f()}return o}return Object(f.a)(r,[{key:"render",value:function(){}}]),r}(mt),Zt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="font-face",a.ascent=a.getAttribute("ascent").getNumber(),a.descent=a.getAttribute("descent").getNumber(),a.unitsPerEm=a.getAttribute("units-per-em").getNumber(),a}return Object(f.a)(r)}(mt),Jt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return Object(f.a)(r)}(Ct),Kt=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="tref",t}return Object(f.a)(r,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}]),r}(Et),te=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="a";var s=n.childNodes,o=s[0],u=s.length>0&&Array.from(s).every((function(t){return 3===t.nodeType}));return a.hasText=u,a.text=u?a.getTextFromNode(o):"",a}return Object(f.a)(r,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){Object(s.a)(Object(o.a)(r.prototype),"renderChildren",this).call(this,t);var e=this.document,n=this.x,i=this.y,a=e.screen.mouse,u=new tt(e,"fontSize",wt.parse(e.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new St(n,i-u.getPixels("y"),n+this.measureText(t),i))}else if(this.children.length>0){var h=new Ht(this.document,null);h.children=this.children,h.parent=this,h.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),r}(Et);function ee(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 re(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(r),!0).forEach((function(e){v()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ne=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="textPath",a.textWidth=0,a.textHeight=0,a.pathLength=-1,a.glyphInfo=null,a.letterSpacingCache=[],a.measuresCache=new Map([["",0]]);var s=a.getHrefAttribute().getDefinition();return a.text=a.getTextFromNode(),a.dataArray=a.parsePathData(s),a}return Object(f.a)(r,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach((function(e){var r=e.type,n=e.points;switch(r){case Tt.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case Tt.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case Tt.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case Tt.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case Tt.ARC:var i=Object(g.a)(n,8),a=i[0],s=i[1],o=i[2],u=i[3],h=i[4],c=i[5],l=i[6],f=i[7],d=o>u?o:u,y=o>u?1:o/u,p=o>u?u/o:1;t&&(t.translate(a,s),t.rotate(l),t.scale(y,p),t.arc(0,0,d,h,h+c,Boolean(1-f)),t.scale(1/y,1/p),t.rotate(-l),t.translate(-a,-s));break;case Tt.CLOSE_PATH:t&&t.closePath()}}))}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach((function(n,i){var a=n.p0,s=n.p1,o=n.rotation,u=n.text;t.save(),t.translate(a.x,a.y),t.rotate(o),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),"underline"===e&&(0===i&&t.moveTo(a.x,a.y+r/8),t.lineTo(s.x,s.y+r/5))})),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function(t,e,r,n,i,a,s,o,u){var h=a,c=this.measureText(t,o);" "===o&&"justify"===e&&r<n&&(c+=(n-r)/i),u>-1&&(h+=this.getLetterSpacingAt(u));var l=this.textHeight/20,f=this.getEquidistantPointOnPath(h,l,0),g=this.getEquidistantPointOnPath(h+c,l,0),d={p0:f,p1:g},y=f&&g?Math.atan2(g.y-f.y,g.x-f.x):0;if(s){var p=Math.cos(Math.PI/2+y)*s,v=Math.cos(-y)*s;d.p0=re(re({},f),{},{x:f.x+p,y:f.y+v}),d.p1=re(re({},g),{},{x:g.x+p,y:g.y+v})}return{offset:h+=c,segment:d,rotation:y}}},{key:"measureText",value:function(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,a=this.parent.getAttribute("dx").split().map((function(t){return t.getPixels("x")})),s=this.parent.getAttribute("dy").getPixels("y"),o=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),h=this.parent.getStyle("letter-spacing"),c=0;u.hasValue()&&"inherit"!==u.getValue()?u.hasValue()&&"initial"!==u.getValue()&&"unset"!==u.getValue()&&(c=u.getPixels()):c=h.getPixels();var l=[],f=r.length;this.letterSpacingCache=l;for(var g=0;g<f;g++)l.push("undefined"!==typeof a[g]?a[g]:c);var d=l.reduce((function(t,e,r){return 0===r?0:t+e||0}),0),y=this.measureText(t),p=Math.max(y+d,0);this.textWidth=y,this.textHeight=this.getFontSize(),this.glyphInfo=[];var v=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*v,b=0;"middle"!==o&&"center"!==o||(b=-p/2),"end"!==o&&"right"!==o||(b=-p),b+=m,n.forEach((function(r,a){var u=e.findSegmentToFitChar(t,o,p,v,i,b,s,r,a),h=u.offset,c=u.segment,l=u.rotation;b=h,c.p0&&c.p1&&e.glyphInfo.push({text:n[a],p0:c.p0,p1:c.p1,rotation:l})}))}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var e=[],r=t.pathParser;for(r.reset();!r.isEnd();){var n=r.current,i=n?n.x:0,a=n?n.y:0,s=r.next(),o=s.type,u=[];switch(s.type){case Tt.MOVE_TO:this.pathM(r,u);break;case Tt.LINE_TO:o=this.pathL(r,u);break;case Tt.HORIZ_LINE_TO:o=this.pathH(r,u);break;case Tt.VERT_LINE_TO:o=this.pathV(r,u);break;case Tt.CURVE_TO:this.pathC(r,u);break;case Tt.SMOOTH_CURVE_TO:o=this.pathS(r,u);break;case Tt.QUAD_TO:this.pathQ(r,u);break;case Tt.SMOOTH_QUAD_TO:o=this.pathT(r,u);break;case Tt.ARC:u=this.pathA(r);break;case Tt.CLOSE_PATH:Ct.pathZ(r)}s.type!==Tt.CLOSE_PATH?e.push({type:o,points:u,start:{x:i,y:a},pathLength:this.calcLength(i,a,o,u)}):e.push({type:Tt.CLOSE_PATH,points:[],pathLength:0})}return e}},{key:"pathM",value:function(t,e){var r=Ct.pathM(t).point,n=r.x,i=r.y;e.push(n,i)}},{key:"pathL",value:function(t,e){var r=Ct.pathL(t).point,n=r.x,i=r.y;return e.push(n,i),Tt.LINE_TO}},{key:"pathH",value:function(t,e){var r=Ct.pathH(t).point,n=r.x,i=r.y;return e.push(n,i),Tt.LINE_TO}},{key:"pathV",value:function(t,e){var r=Ct.pathV(t).point,n=r.x,i=r.y;return e.push(n,i),Tt.LINE_TO}},{key:"pathC",value:function(t,e){var r=Ct.pathC(t),n=r.point,i=r.controlPoint,a=r.currentPoint;e.push(n.x,n.y,i.x,i.y,a.x,a.y)}},{key:"pathS",value:function(t,e){var r=Ct.pathS(t),n=r.point,i=r.controlPoint,a=r.currentPoint;return e.push(n.x,n.y,i.x,i.y,a.x,a.y),Tt.CURVE_TO}},{key:"pathQ",value:function(t,e){var r=Ct.pathQ(t),n=r.controlPoint,i=r.currentPoint;e.push(n.x,n.y,i.x,i.y)}},{key:"pathT",value:function(t,e){var r=Ct.pathT(t),n=r.controlPoint,i=r.currentPoint;return e.push(n.x,n.y,i.x,i.y),Tt.QUAD_TO}},{key:"pathA",value:function(t){var e=Ct.pathA(t),r=e.rX,n=e.rY,i=e.sweepFlag,a=e.xAxisRotation,s=e.centp,o=e.a1,u=e.ad;return 0===i&&u>0&&(u-=2*Math.PI),1===i&&u<0&&(u+=2*Math.PI),[s.x,s.y,r,n,o,u,a,i]}},{key:"calcLength",value:function(t,e,r,n){var i=0,a=null,s=null,o=0;switch(r){case Tt.LINE_TO:return this.getLineLength(t,e,n[0],n[1]);case Tt.CURVE_TO:for(i=0,a=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)s=this.getPointOnCubicBezier(o,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case Tt.QUAD_TO:for(i=0,a=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)s=this.getPointOnQuadraticBezier(o,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case Tt.ARC:i=0;var u=n[4],h=n[5],c=n[4]+h,l=Math.PI/180;if(Math.abs(u-c)<l&&(l=Math.abs(u-c)),a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),h<0)for(o=u-l;o>c;o-=l)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(o=u+l;o<c;o+=l)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],c,0),i+=this.getLineLength(a.x,a.y,s.x,s.y)}return 0}},{key:"getPointOnLine",value:function(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,o=(i-r)/(n-e+U),u=Math.sqrt(t*t/(1+o*o));n<e&&(u*=-1);var h=o*u,c=null;if(n===e)c={x:a,y:s+h};else if((s-r)/(a-e+U)===o)c={x:a+u,y:s+h};else{var l=0,f=0,g=this.getLineLength(e,r,n,i);if(g<U)return null;var d=(a-e)*(n-e)+(s-r)*(i-r);l=e+(d/=g*g)*(n-e),f=r+d*(i-r);var y=this.getLineLength(a,s,l,f),p=Math.sqrt(t*t-y*y);u=Math.sqrt(p*p/(1+o*o)),n<e&&(u*=-1),c={x:l+u,y:f+(h=o*u)}}return c}},{key:"getPointOnPath",value:function(t){var e=this.getPathLength(),r=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var a,s=this.dataArray,o=Object(i.a)(s);try{for(o.s();!(a=o.n()).done;){var u=a.value;if(!u||!(u.pathLength<5e-5||r+u.pathLength+5e-5<t)){var h=t-r,c=0;switch(u.type){case Tt.LINE_TO:n=this.getPointOnLine(h,u.start.x,u.start.y,u.points[0],u.points[1],u.start.x,u.start.y);break;case Tt.ARC:var l=u.points[4],f=u.points[5],g=u.points[4]+f;if(c=l+h/u.pathLength*f,f<0&&c<g||f>=0&&c>g)break;n=this.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],c,u.points[6]);break;case Tt.CURVE_TO:(c=h/u.pathLength)>1&&(c=1),n=this.getPointOnCubicBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);break;case Tt.QUAD_TO:(c=h/u.pathLength)>1&&(c=1),n=this.getPointOnQuadraticBezier(c,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3])}if(n)return n;break}r+=u.pathLength}}catch(d){o.e(d)}finally{o.f()}return null}},{key:"getLineLength",value:function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,e){return e.pathLength>0?t+e.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,e,r,n,i,a,s,o,u){return{x:o*Q(t)+a*W(t)+n*G(t)+e*$(t),y:u*Q(t)+s*W(t)+i*G(t)+r*$(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,e,r,n,i,a,s){return{x:a*Z(t)+n*J(t)+e*K(t),y:s*Z(t)+i*J(t)+r*K(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,r,n,i,a){var s=Math.cos(a),o=Math.sin(a),u=r*Math.cos(i),h=n*Math.sin(i);return{x:t+(u*s-h*o),y:e+(u*o+h*s)}}},{key:"buildEquidistantCache",value:function(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var a=0,s=0;s<=r;s+=n){var o=this.getPointOnPath(s),u=this.getPointOnPath(s+n);o&&u&&((a+=this.getLineLength(o.x,o.y,u.x,u.y))>=i&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:s}),a-=i))}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),r}(Et),ie=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,ae=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,i,s){var o;Object(l.a)(this,r),(o=e.call(this,t,i,s)).type="image",o.loaded=!1;var u=o.getHrefAttribute().getString();if(!u)return Object(n.a)(o);var h=u.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(u);return t.images.push(Object(a.a)(o)),h?o.loadSvg(u):o.loadImage(u),o.isSvg=h,o}return Object(f.a)(r,[{key:"loadImage",value:function(t){var e=this;return y()(S().mark((function r(){var n;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,e.document.createImage(t);case 3:n=r.sent,e.image=n,r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),console.error('Error while loading image "'.concat(t,'":'),r.t0);case 10:e.loaded=!0;case 11:case"end":return r.stop()}}),r,null,[[0,7]])})))()}},{key:"loadSvg",value:function(t){var e=this;return y()(S().mark((function r(){var n,i,a,s;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(n=ie.exec(t))){r.next=6;break}i=n[5],"base64"===n[4]?e.image=atob(i):e.image=decodeURIComponent(i),r.next=19;break;case 6:return r.prev=6,r.next=9,e.document.fetch(t);case 9:return a=r.sent,r.next=12,a.text();case 12:s=r.sent,e.image=s,r.next=19;break;case 16:r.prev=16,r.t0=r.catch(6),console.error('Error while loading image "'.concat(t,'":'),r.t0);case 19:e.loaded=!0;case 20:case"end":return r.stop()}}),r,null,[[6,16]])})))()}},{key:"renderChildren",value:function(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(n&&r&&s&&o){if(t.save(),t.translate(i,a),this.isSvg){var u=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:o});u.document.documentElement.parent=this,u.render()}else{var h=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:h.width,height:o,desiredHeight:h.height}),this.loaded&&("undefined"===typeof h.complete||h.complete)&&t.drawImage(h,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new St(t,e,t+r,e+n)}}]),r}(At),se=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="symbol",t}return Object(f.a)(r,[{key:"render",value:function(t){}}]),r}(At),oe=function(){function t(e){Object(l.a)(this,t),this.document=e,this.loaded=!1,e.fonts.push(this)}return Object(f.a)(t,[{key:"load",value:function(t,e){var r=this;return y()(S().mark((function n(){var i,a,s;return S().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i=r.document,n.next=4,i.canvg.parser.load(e);case 4:a=n.sent,s=a.getElementsByTagName("font"),Array.from(s).forEach((function(e){var r=i.createElement(e);i.definitions[t]=r})),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(0),console.error('Error while loading font "'.concat(e,'":'),n.t0);case 12:r.loaded=!0;case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()}}]),t}(),ue=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="style",A(Array.from(n.childNodes).map((function(t){return t.textContent})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),a=n[1].split(";");i.forEach((function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(a.forEach((function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),a=e.substr(r+1,e.length-r).trim();i&&a&&(n[i]=new tt(t,i,a))})),t.styles[r]=n,t.stylesSpecificity[r]=H(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach((function(e){if(e.indexOf('format("svg")')>0){var r=M(e);r&&new oe(t).load(i,r)}}))}}}))}})),a}return Object(f.a)(r)}(mt);ue.parseExternalUrl=M;var he=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="use",t}return Object(f.a)(r,[{key:"setContext",value:function(t){Object(s.a)(Object(o.a)(r.prototype),"setContext",this).call(this,t);var e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}},{key:"path",value:function(t){var e=this.element;e&&e.path(t)}},{key:"renderChildren",value:function(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new Mt(e,null)).attributes.viewBox=new tt(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new tt(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new tt(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children,r.styles.opacity=new tt(e,"opacity",this.calculateOpacity())),"svg"===n.type){var i=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new tt(e,"width",i.getString())),a.hasValue()&&(n.attributes.height=new tt(e,"height",a.getString()))}var s=n.parent;n.parent=this,n.render(t),n.parent=s}}},{key:"getBoundingBox",value:function(t){var e=this.element;return e?e.getBoundingBox(t):null}},{key:"elementTransform",value:function(){var t=this.document,e=this.element;return vt.fromElement(t,e)}},{key:"element",get:function(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}]),r}(At);function ce(t,e,r,n,i,a){return t[r*n*4+4*e+a]}function le(t,e,r,n,i,a,s){t[r*n*4+4*e+a]=s}function fe(t,e,r){return t[e]*r}function ge(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}var de=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="feColorMatrix";var s=E(a.getAttribute("values").getString());switch(a.getAttribute("type").getString("matrix")){case"saturate":var o=s[0];s=[.213+.787*o,.715-.715*o,.072-.072*o,0,0,.213-.213*o,.715+.285*o,.072-.072*o,0,0,.213-.213*o,.715-.715*o,.072+.928*o,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var u=s[0]*Math.PI/180;s=[ge(u,.213,.787,-.213),ge(u,.715,-.715,-.715),ge(u,.072,-.072,.928),0,0,ge(u,.213,-.213,.143),ge(u,.715,.285,.14),ge(u,.072,-.072,-.283),0,0,ge(u,.213,-.213,-.787),ge(u,.715,-.715,.715),ge(u,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return a.matrix=s,a.includeOpacity=a.getAttribute("includeOpacity").hasValue(),a}return Object(f.a)(r,[{key:"apply",value:function(t,e,r,n,i){for(var a=this.includeOpacity,s=this.matrix,o=t.getImageData(0,0,n,i),u=0;u<i;u++)for(var h=0;h<n;h++){var c=ce(o.data,h,u,n,0,0),l=ce(o.data,h,u,n,0,1),f=ce(o.data,h,u,n,0,2),g=ce(o.data,h,u,n,0,3),d=fe(s,0,c)+fe(s,1,l)+fe(s,2,f)+fe(s,3,g)+fe(s,4,1),y=fe(s,5,c)+fe(s,6,l)+fe(s,7,f)+fe(s,8,g)+fe(s,9,1),p=fe(s,10,c)+fe(s,11,l)+fe(s,12,f)+fe(s,13,g)+fe(s,14,1),v=fe(s,15,c)+fe(s,16,l)+fe(s,17,f)+fe(s,18,g)+fe(s,19,1);a&&(d=0,y=0,p=0,v*=g/255),le(o.data,h,u,n,0,0,d),le(o.data,h,u,n,0,1,y),le(o.data,h,u,n,0,2,p),le(o.data,h,u,n,0,3,v)}t.clearRect(0,0,n,i),t.putImageData(o,0,0)}}]),r}(mt),ye=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="mask",t}return Object(f.a)(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!s&&!o){var u=new St;this.children.forEach((function(e){u.addBoundingBox(e.getBoundingBox(t))})),i=Math.floor(u.x1),a=Math.floor(u.y1),s=Math.floor(u.width),o=Math.floor(u.height)}var h=this.removeStyles(e,r.ignoreStyles),c=n.createCanvas(i+s,a+o),l=c.getContext("2d");n.screen.setDefaults(l),this.renderChildren(l),new de(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(l,0,0,i+s,a+o);var f=n.createCanvas(i+s,a+o),g=f.getContext("2d");n.screen.setDefaults(g),e.render(g),g.globalCompositeOperation="destination-in",g.fillStyle=l.createPattern(c,"no-repeat"),g.fillRect(0,0,i+s,a+o),t.fillStyle=g.createPattern(f,"no-repeat"),t.fillRect(0,0,i+s,a+o),this.restoreStyles(e,h)}},{key:"render",value:function(t){}}]),r}(mt);ye.ignoreStyles=["mask","transform","clip-path"];var pe=function(){},ve=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="clipPath",t}return Object(f.a)(r,[{key:"apply",value:function(t){var e=this.document,r=Reflect.getPrototypeOf(t),n=t.beginPath,i=t.closePath;r&&(r.beginPath=pe,r.closePath=pe),Reflect.apply(n,t,[]),this.children.forEach((function(n){if("undefined"!==typeof n.path){var a="undefined"!==typeof n.elementTransform?n.elementTransform():null;a||(a=vt.fromElement(e,n)),a&&a.apply(t),n.path(t),r&&(r.closePath=i),a&&a.unapply(t)}})),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=i)}},{key:"render",value:function(t){}}]),r}(mt),me=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="filter",t}return Object(f.a)(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.children,a=e.getBoundingBox(t);if(a){var s=0,o=0;i.forEach((function(t){var e=t.extraFilterDistance||0;s=Math.max(s,e),o=Math.max(o,e)}));var u=Math.floor(a.width),h=Math.floor(a.height),c=u+2*s,l=h+2*o;if(!(c<1||l<1)){var f=Math.floor(a.x),g=Math.floor(a.y),d=this.removeStyles(e,r.ignoreStyles),y=n.createCanvas(c,l),p=y.getContext("2d");n.screen.setDefaults(p),p.translate(-f+s,-g+o),e.render(p),i.forEach((function(t){"function"===typeof t.apply&&t.apply(p,0,0,c,l)})),t.drawImage(y,0,0,c,l,f-s,g-o,c,l),this.restoreStyles(e,d)}}}},{key:"render",value:function(t){}}]),r}(mt);me.ignoreStyles=["filter","transform","clip-path"];var be=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return Object(f.a)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(mt),xe=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="feMorphology",t}return Object(f.a)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(mt),Oe=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="feComposite",t}return Object(f.a)(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(mt),ke=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(t,n,i){var a;return Object(l.a)(this,r),(a=e.call(this,t,n,i)).type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return Object(f.a)(r,[{key:"apply",value:function(t,e,r,n,i){var a=this.document,s=this.blurRadius,o=a.window?a.window.document.body:null,u=t.canvas;u.id=a.getUniqueId(),o&&(u.style.display="none",o.appendChild(u)),Object(w.a)(u,e,r,n,i,s),o&&o.removeChild(u)}}]),r}(mt),we=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="title",t}return Object(f.a)(r)}(mt),Se=function(t){Object(h.a)(r,t);var e=Object(c.a)(r);function r(){var t;return Object(l.a)(this,r),(t=e.apply(this,arguments)).type="desc",t}return Object(f.a)(r)}(mt),Te={svg:Mt,rect:Vt,circle:_t,ellipse:Rt,line:It,polyline:Lt,polygon:Dt,path:Ct,pattern:Bt,marker:zt,defs:Ft,linearGradient:Xt,radialGradient:Yt,stop:qt,animate:Qt,animateColor:Wt,animateTransform:Gt,font:$t,"font-face":Zt,"missing-glyph":Jt,glyph:Pt,text:Et,tspan:jt,tref:Kt,a:te,textPath:ne,image:ae,g:Ht,symbol:se,style:ue,use:he,mask:ye,clipPath:ve,filter:me,feDropShadow:be,feMorphology:xe,feComposite:Oe,feColorMatrix:de,feGaussianBlur:ke,title:we,desc:Se};function Ae(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 Ce(){return(Ce=y()(S().mark((function t(e){var r,n,i=arguments;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise((function(t,r){n.onload=function(){t(n)},n.onerror=function(t,e,n,i,a){r(a)},n.src=e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Pe=function(){function t(e){Object(l.a)(this,t);var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=void 0===n?12:n,a=r.emSize,s=void 0===a?12:a,o=r.createCanvas,u=void 0===o?t.createCanvas:o,h=r.createImage,c=void 0===h?t.createImage:h,f=r.anonymousCrossOrigin;this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=s,this.createCanvas=u,this.createImage=this.bindCreateImage(c,f),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return Object(f.a)(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"===typeof e?function(r,n){return t(r,"boolean"===typeof n?n:e)}:t}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var t=this.emSizeStack;return t[t.length-1]},set:function(t){this.emSizeStack.push(t)}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}},{key:"createElement",value:function(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return"undefined"!==typeof n?new n(this,e):new bt(this,e)}},{key:"createTextNode",value:function(t){return new Nt(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ae(Object(r),!0).forEach((function(e){v()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({document:this},t))}}]),t}();function Ee(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 je(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(r),!0).forEach((function(e){v()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}Pe.createCanvas=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r},Pe.createImage=function(t){return Ce.apply(this,arguments)},Pe.elementTypes=Te;var Ne=function(){function t(e,r){Object(l.a)(this,t);var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new ht(n),this.screen=new st(e,n),this.options=n;var i=new Pe(this,n),a=i.createDocumentElement(r);this.document=i,this.documentElement=a}return Object(f.a)(t,[{key:"fork",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,r,je(je({},this.options),n))}},{key:"forkString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,r,je(je({},this.options),n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:function(){var t=arguments,e=this;return y()(S().mark((function r(){var n;return S().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:{},e.start(je({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),r.next=4,e.ready();case 4:e.stop();case 5:case"end":return r.stop()}}),r)})))()}},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,je(je({enableRedraw:!0},n),t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r)}}],[{key:"from",value:function(e,r){var n=arguments;return y()(S().mark((function i(){var a,s,o;return S().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return a=n.length>2&&void 0!==n[2]?n[2]:{},s=new ht(a),i.next=4,s.parse(r);case 4:return o=i.sent,i.abrupt("return",new t(e,o,a));case 6:case"end":return i.stop()}}),i)})))()}},{key:"fromString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new ht(n),a=i.parseFromString(r);return new t(e,a,n)}}]),t}()}.call(this,r(432))},2287:function(t,e){t.exports=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,a=r[n].process,s=i.exec(t);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,n=0;n<r.length;n++)for(var i=r[n].example,a=0;a<i.length;a++)t[t.length]=i[a];for(var s in e)t[t.length]=s;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(n=0;n<t.length;n++)try{var u=document.createElement("li"),h=new RGBColor(t[n]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+h.toHex()+"; color:"+h.toHex(),c.appendChild(document.createTextNode("test"));var l=document.createTextNode(" "+t[n]+" -> "+h.toRGB()+" -> "+h.toHex());u.appendChild(c),u.appendChild(l),o.appendChild(u)}catch(f){}return o}}},2288:function(t,e,r){"use strict";r.d(e,"a",(function(){return O}));var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function a(t,e){var r=t[0],n=t[1];return[r*Math.cos(e)-n*Math.sin(e),r*Math.sin(e)+n*Math.cos(e)]}function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var o=Math.PI;function u(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,i=t.rY,s=t.x,u=t.y;n=Math.abs(t.rX),i=Math.abs(t.rY);var h=a([(e-s)/2,(r-u)/2],-t.xRot/180*o),c=h[0],l=h[1],f=Math.pow(c,2)/Math.pow(n,2)+Math.pow(l,2)/Math.pow(i,2);1<f&&(n*=Math.sqrt(f),i*=Math.sqrt(f)),t.rX=n,t.rY=i;var g=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(c,2),d=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-g)/g)),y=n*l/i*d,p=-i*c/n*d,v=a([y,p],t.xRot/180*o);t.cX=v[0]+(e+s)/2,t.cY=v[1]+(r+u)/2,t.phi1=Math.atan2((l-p)/i,(c-y)/n),t.phi2=Math.atan2((-l-p)/i,(-c-y)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*o),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*o),t.phi1*=180/o,t.phi2*=180/o}function h(t,e,r){s(t,e,r);var n=t*t+e*e-r*r;if(0>n)return[];if(0===n)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var i=Math.sqrt(n);return[[(t*r+e*i)/(t*t+e*e),(e*r-t*i)/(t*t+e*e)],[(t*r-e*i)/(t*t+e*e),(e*r+t*i)/(t*t+e*e)]]}var c,l=Math.PI/180;function f(t,e,r){return(1-r)*t+r*e}function g(t,e,r,n){return t+Math.cos(n/180*o)*e+Math.sin(n/180*o)*r}function d(t,e,r,n){var i=1e-6,a=e-t,s=r-e,o=3*a+3*(n-r)-6*s,u=6*(s-a),h=3*a;return Math.abs(o)<i?[-h/u]:function(t,e,r){void 0===r&&(r=1e-6);var n=t*t/4-e;if(n<-r)return[];if(n<=r)return[-t/2];var i=Math.sqrt(n);return[-t/2-i,-t/2+i]}(u/o,h/o,i)}function y(t,e,r,n,i){var a=1-i;return t*(a*a*a)+e*(3*a*a*i)+r*(3*a*i*i)+n*(i*i*i)}!function(t){function e(){return i((function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,e=NaN,r=NaN,n=NaN;return i((function(i,a,s){return i.type&O.SMOOTH_CURVE_TO&&(i.type=O.CURVE_TO,t=isNaN(t)?a:t,e=isNaN(e)?s:e,i.x1=i.relative?a-t:2*a-t,i.y1=i.relative?s-e:2*s-e),i.type&O.CURVE_TO?(t=i.relative?a+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(t=NaN,e=NaN),i.type&O.SMOOTH_QUAD_TO&&(i.type=O.QUAD_TO,r=isNaN(r)?a:r,n=isNaN(n)?s:n,i.x1=i.relative?a-r:2*a-r,i.y1=i.relative?s-n:2*s-n),i.type&O.QUAD_TO?(r=i.relative?a+i.x1:i.x1,n=i.relative?s+i.y1:i.y1):(r=NaN,n=NaN),i}))}function n(){var t=NaN,e=NaN;return i((function(r,n,i){if(r.type&O.SMOOTH_QUAD_TO&&(r.type=O.QUAD_TO,t=isNaN(t)?n:t,e=isNaN(e)?i:e,r.x1=r.relative?n-t:2*n-t,r.y1=r.relative?i-e:2*i-e),r.type&O.QUAD_TO){t=r.relative?n+r.x1:r.x1,e=r.relative?i+r.y1:r.y1;var a=r.x1,s=r.y1;r.type=O.CURVE_TO,r.x1=((r.relative?0:n)+2*a)/3,r.y1=((r.relative?0:i)+2*s)/3,r.x2=(r.x+2*a)/3,r.y2=(r.y+2*s)/3}else t=NaN,e=NaN;return r}))}function i(t){var e=0,r=0,n=NaN,i=NaN;return function(a){if(isNaN(n)&&!(a.type&O.MOVE_TO))throw new Error("path must start with moveto");var s=t(a,e,r,n,i);return a.type&O.CLOSE_PATH&&(e=n,r=i),void 0!==a.x&&(e=a.relative?e+a.x:a.x),void 0!==a.y&&(r=a.relative?r+a.y:a.y),a.type&O.MOVE_TO&&(n=e,i=r),s}}function o(t,e,r,n,a,o){return s(t,e,r,n,a,o),i((function(i,s,u,h){var c=i.x1,l=i.x2,f=i.relative&&!isNaN(h),g=void 0!==i.x?i.x:f?0:s,d=void 0!==i.y?i.y:f?0:u;function y(t){return t*t}i.type&O.HORIZ_LINE_TO&&0!==e&&(i.type=O.LINE_TO,i.y=i.relative?0:u),i.type&O.VERT_LINE_TO&&0!==r&&(i.type=O.LINE_TO,i.x=i.relative?0:s),void 0!==i.x&&(i.x=i.x*t+d*r+(f?0:a)),void 0!==i.y&&(i.y=g*e+i.y*n+(f?0:o)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*r+(f?0:a)),void 0!==i.y1&&(i.y1=c*e+i.y1*n+(f?0:o)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*r+(f?0:a)),void 0!==i.y2&&(i.y2=l*e+i.y2*n+(f?0:o));var p=t*n-e*r;if(void 0!==i.xRot&&(1!==t||0!==e||0!==r||1!==n))if(0===p)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=O.LINE_TO;else{var v=i.xRot*Math.PI/180,m=Math.sin(v),b=Math.cos(v),x=1/y(i.rX),k=1/y(i.rY),w=y(b)*x+y(m)*k,S=2*m*b*(x-k),T=y(m)*x+y(b)*k,A=w*n*n-S*e*n+T*e*e,C=S*(t*n+e*r)-2*(w*r*n+T*t*e),P=w*r*r-S*t*r+T*t*t,E=(Math.atan2(C,A-P)+Math.PI)%Math.PI/2,j=Math.sin(E),N=Math.cos(E);i.rX=Math.abs(p)/Math.sqrt(A*y(N)+C*j*N+P*y(j)),i.rY=Math.abs(p)/Math.sqrt(A*y(j)-C*j*N+P*y(N)),i.xRot=180*E/Math.PI}return void 0!==i.sweepFlag&&0>p&&(i.sweepFlag=+!i.sweepFlag),i}))}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),s(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return i((function(t,e,r){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),i((function(n,i,a,s,o){if(isNaN(s)&&!(n.type&O.MOVE_TO))throw new Error("path must start with moveto");return e&&n.type&O.HORIZ_LINE_TO&&(n.type=O.LINE_TO,n.y=n.relative?0:a),r&&n.type&O.VERT_LINE_TO&&(n.type=O.LINE_TO,n.x=n.relative?0:i),t&&n.type&O.CLOSE_PATH&&(n.type=O.LINE_TO,n.x=n.relative?s-i:s,n.y=n.relative?o-a:o),n.type&O.ARC&&(0===n.rX||0===n.rY)&&(n.type=O.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n}))},t.NORMALIZE_ST=r,t.QT_TO_C=n,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),s(t);var e=NaN,r=NaN,n=NaN,a=NaN;return i((function(i,s,o,u,h){var c=Math.abs,l=!1,f=0,g=0;if(i.type&O.SMOOTH_CURVE_TO&&(f=isNaN(e)?0:s-e,g=isNaN(r)?0:o-r),i.type&(O.CURVE_TO|O.SMOOTH_CURVE_TO)?(e=i.relative?s+i.x2:i.x2,r=i.relative?o+i.y2:i.y2):(e=NaN,r=NaN),i.type&O.SMOOTH_QUAD_TO?(n=isNaN(n)?s:2*s-n,a=isNaN(a)?o:2*o-a):i.type&O.QUAD_TO?(n=i.relative?s+i.x1:i.x1,a=i.relative?o+i.y1:i.y2):(n=NaN,a=NaN),i.type&O.LINE_COMMANDS||i.type&O.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&O.CURVE_TO||i.type&O.SMOOTH_CURVE_TO||i.type&O.QUAD_TO||i.type&O.SMOOTH_QUAD_TO){var d=void 0===i.x?0:i.relative?i.x:i.x-s,y=void 0===i.y?0:i.relative?i.y:i.y-o;f=isNaN(n)?void 0===i.x1?f:i.relative?i.x:i.x1-s:n-s,g=isNaN(a)?void 0===i.y1?g:i.relative?i.y:i.y1-o:a-o;var p=void 0===i.x2?0:i.relative?i.x:i.x2-s,v=void 0===i.y2?0:i.relative?i.y:i.y2-o;c(d)<=t&&c(y)<=t&&c(f)<=t&&c(g)<=t&&c(p)<=t&&c(v)<=t&&(l=!0)}return i.type&O.CLOSE_PATH&&c(s-u)<=t&&c(o-h)<=t&&(l=!0),l?[]:i}))},t.MATRIX=o,t.ROTATE=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),s(t,e,r);var n=Math.sin(t),i=Math.cos(t);return o(i,n,-n,i,e-e*i+r*n,r-e*n-r*i)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),s(t,e),o(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),s(t,e),o(t,0,0,e,0,0)},t.SKEW_X=function(t){return s(t),o(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return s(t),o(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),s(t),o(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),s(t),o(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,e,r){return O.ARC===t.type?function(t,e,r){var n,i,s,o;t.cX||u(t,e,r);for(var h=Math.min(t.phi1,t.phi2),c=Math.max(t.phi1,t.phi2)-h,g=Math.ceil(c/90),d=new Array(g),y=e,p=r,v=0;v<g;v++){var m=f(t.phi1,t.phi2,v/g),b=f(t.phi1,t.phi2,(v+1)/g),x=b-m,k=4/3*Math.tan(x*l/4),w=[Math.cos(m*l)-k*Math.sin(m*l),Math.sin(m*l)+k*Math.cos(m*l)],S=w[0],T=w[1],A=[Math.cos(b*l),Math.sin(b*l)],C=A[0],P=A[1],E=[C+k*Math.sin(b*l),P-k*Math.cos(b*l)],j=E[0],N=E[1];d[v]={relative:t.relative,type:O.CURVE_TO};var M=function(e,r){var n=a([e*t.rX,r*t.rY],t.xRot),i=n[0],s=n[1];return[t.cX+i,t.cY+s]};n=M(S,T),d[v].x1=n[0],d[v].y1=n[1],i=M(j,N),d[v].x2=i[0],d[v].y2=i[1],s=M(C,P),d[v].x=s[0],d[v].y=s[1],t.relative&&(d[v].x1-=y,d[v].y1-=p,d[v].x2-=y,d[v].y2-=p,d[v].x-=y,d[v].y-=p),y=(o=[d[v].x,d[v].y])[0],p=o[1]}return d}(t,t.relative?0:e,t.relative?0:r):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,e,r){return t.relative&&(e=0,r=0),O.ARC===t.type&&u(t,e,r),t}))},t.CLONE=function(){return function(t){var e={};for(var r in t)e[r]=t[r];return e}},t.CALCULATE_BOUNDS=function(){var t=e(),a=n(),s=r(),o=i((function(e,r,n){var i=s(a(t(function(t){var e={};for(var r in t)e[r]=t[r];return e}(e))));function c(t){t>o.maxX&&(o.maxX=t),t<o.minX&&(o.minX=t)}function l(t){t>o.maxY&&(o.maxY=t),t<o.minY&&(o.minY=t)}if(i.type&O.DRAWING_COMMANDS&&(c(r),l(n)),i.type&O.HORIZ_LINE_TO&&c(i.x),i.type&O.VERT_LINE_TO&&l(i.y),i.type&O.LINE_TO&&(c(i.x),l(i.y)),i.type&O.CURVE_TO){c(i.x),l(i.y);for(var f=0,p=d(r,i.x1,i.x2,i.x);f<p.length;f++)0<(V=p[f])&&1>V&&c(y(r,i.x1,i.x2,i.x,V));for(var v=0,m=d(n,i.y1,i.y2,i.y);v<m.length;v++)0<(V=m[v])&&1>V&&l(y(n,i.y1,i.y2,i.y,V))}if(i.type&O.ARC){c(i.x),l(i.y),u(i,r,n);for(var b=i.xRot/180*Math.PI,x=Math.cos(b)*i.rX,k=Math.sin(b)*i.rX,w=-Math.sin(b)*i.rY,S=Math.cos(b)*i.rY,T=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],A=T[0],C=T[1],P=function(t){var e=t[0],r=t[1],n=180*Math.atan2(r,e)/Math.PI;return n<A?n+360:n},E=0,j=h(w,-x,0).map(P);E<j.length;E++)(V=j[E])>A&&V<C&&c(g(i.cX,x,w,V));for(var N=0,M=h(S,-k,0).map(P);N<M.length;N++){var V;(V=M[N])>A&&V<C&&l(g(i.cY,k,S,V))}}return e}));return o.minX=1/0,o.maxX=-1/0,o.minY=1/0,o.maxY=-1/0,o}}(c||(c={}));var p,v=function(){function t(){}return t.prototype.round=function(t){return this.transform(c.ROUND(t))},t.prototype.toAbs=function(){return this.transform(c.TO_ABS())},t.prototype.toRel=function(){return this.transform(c.TO_REL())},t.prototype.normalizeHVZ=function(t,e,r){return this.transform(c.NORMALIZE_HVZ(t,e,r))},t.prototype.normalizeST=function(){return this.transform(c.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(c.QT_TO_C())},t.prototype.aToC=function(){return this.transform(c.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(c.SANITIZE(t))},t.prototype.translate=function(t,e){return this.transform(c.TRANSLATE(t,e))},t.prototype.scale=function(t,e){return this.transform(c.SCALE(t,e))},t.prototype.rotate=function(t,e,r){return this.transform(c.ROTATE(t,e,r))},t.prototype.matrix=function(t,e,r,n,i,a){return this.transform(c.MATRIX(t,e,r,n,i,a))},t.prototype.skewX=function(t){return this.transform(c.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(c.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(c.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(c.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(c.ANNOTATE_ARCS())},t}(),m=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},b=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},x=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return i(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var r=this;void 0===e&&(e=[]);for(var n=function(t){e.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0},i=0;i<t.length;i++){var a=t[i],s=!(this.curCommandType!==O.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=b(a)&&("0"===this.curNumber&&"0"===a||s);if(!b(a)||o)if("e"!==a&&"E"!==a)if("-"!==a&&"+"!==a||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==a||this.curNumberHasExp||this.curNumberHasDecimal||s){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===O.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(u),this.curArgs.length===k[this.curCommandType]&&(O.HORIZ_LINE_TO===this.curCommandType?n({type:O.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):O.VERT_LINE_TO===this.curCommandType?n({type:O.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===O.MOVE_TO||this.curCommandType===O.LINE_TO||this.curCommandType===O.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),O.MOVE_TO===this.curCommandType&&(this.curCommandType=O.LINE_TO)):this.curCommandType===O.CURVE_TO?n({type:O.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===O.SMOOTH_CURVE_TO?n({type:O.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===O.QUAD_TO?n({type:O.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===O.ARC&&n({type:O.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!m(a))if(","===a&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==a&&"-"!==a&&"."!==a)if(o)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==a&&"Z"!==a)if("h"===a||"H"===a)this.curCommandType=O.HORIZ_LINE_TO,this.curCommandRelative="h"===a;else if("v"===a||"V"===a)this.curCommandType=O.VERT_LINE_TO,this.curCommandRelative="v"===a;else if("m"===a||"M"===a)this.curCommandType=O.MOVE_TO,this.curCommandRelative="m"===a;else if("l"===a||"L"===a)this.curCommandType=O.LINE_TO,this.curCommandRelative="l"===a;else if("c"===a||"C"===a)this.curCommandType=O.CURVE_TO,this.curCommandRelative="c"===a;else if("s"===a||"S"===a)this.curCommandType=O.SMOOTH_CURVE_TO,this.curCommandRelative="s"===a;else if("q"===a||"Q"===a)this.curCommandType=O.QUAD_TO,this.curCommandRelative="q"===a;else if("t"===a||"T"===a)this.curCommandType=O.SMOOTH_QUAD_TO,this.curCommandRelative="t"===a;else{if("a"!==a&&"A"!==a)throw new SyntaxError('Unexpected character "'+a+'" at index '+i+".");this.curCommandType=O.ARC,this.curCommandRelative="a"===a}else e.push({type:O.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal="."===a}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,r){void 0===r&&(r=[]);for(var n=0,i=Object.getPrototypeOf(this).parse.call(this,e);n<i.length;n++){var a=i[n],s=t(a);Array.isArray(s)?r.push.apply(r,s):r.push(s)}return r}}})},e}(v),O=function(t){function e(r){var n=t.call(this)||this;return n.commands="string"==typeof r?e.parse(r):r,n}return i(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=c.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var e=[],r=0,n=this.commands;r<n.length;r++){var i=t(n[r]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return this.commands=e,this},e.encode=function(t){return function(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(n.type===O.CLOSE_PATH)e+="z";else if(n.type===O.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===O.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===O.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===O.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===O.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===O.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===O.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===O.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==O.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+r+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return e}(t)},e.parse=function(t){var e=new x,r=[];return e.parse(t,r),e.finish(r),r},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(v),k=((p={})[O.MOVE_TO]=2,p[O.LINE_TO]=2,p[O.HORIZ_LINE_TO]=1,p[O.VERT_LINE_TO]=1,p[O.CLOSE_PATH]=0,p[O.QUAD_TO]=4,p[O.SMOOTH_QUAD_TO]=2,p[O.CURVE_TO]=6,p[O.SMOOTH_CURVE_TO]=4,p[O.ARC]=7,p)},2289:function(t,e,r){"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})(t)}r.d(e,"a",(function(){return o}));var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],a=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function s(t,e,r,i,a){if("string"===typeof t&&(t=document.getElementById(t)),!t||"object"!==n(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=t.getContext("2d");try{return s.getImageData(e,r,i,a)}catch(o){throw new Error("unable to access image data: "+o)}}function o(t,e,r,n,o,h){if(!(isNaN(h)||h<1)){h|=0;var c=s(t,e,r,n,o);c=function(t,e,r,n,s,o){var h,c,l,f,g,d,y,p,v,m,b,x,O,k,w,S,T,A,C,P,E,j,N,M,V,_=t.data,R=2*o+1,I=n-1,L=s-1,D=o+1,B=D*(D+1)/2,z=new u,F=z;for(l=1;l<R;l++)F=F.next=new u,l===D&&(V=F);F.next=z;var H=null,U=null;y=d=0;var X=i[o],Y=a[o];for(c=0;c<s;c++){for(S=T=A=C=p=v=m=b=0,x=D*(P=_[d]),O=D*(E=_[d+1]),k=D*(j=_[d+2]),w=D*(N=_[d+3]),p+=B*P,v+=B*E,m+=B*j,b+=B*N,F=z,l=0;l<D;l++)F.r=P,F.g=E,F.b=j,F.a=N,F=F.next;for(l=1;l<D;l++)f=d+((I<l?I:l)<<2),p+=(F.r=P=_[f])*(M=D-l),v+=(F.g=E=_[f+1])*M,m+=(F.b=j=_[f+2])*M,b+=(F.a=N=_[f+3])*M,S+=P,T+=E,A+=j,C+=N,F=F.next;for(H=z,U=V,h=0;h<n;h++)_[d+3]=N=b*X>>Y,0!==N?(N=255/N,_[d]=(p*X>>Y)*N,_[d+1]=(v*X>>Y)*N,_[d+2]=(m*X>>Y)*N):_[d]=_[d+1]=_[d+2]=0,p-=x,v-=O,m-=k,b-=w,x-=H.r,O-=H.g,k-=H.b,w-=H.a,f=y+((f=h+o+1)<I?f:I)<<2,S+=H.r=_[f],T+=H.g=_[f+1],A+=H.b=_[f+2],C+=H.a=_[f+3],p+=S,v+=T,m+=A,b+=C,H=H.next,x+=P=U.r,O+=E=U.g,k+=j=U.b,w+=N=U.a,S-=P,T-=E,A-=j,C-=N,U=U.next,d+=4;y+=n}for(h=0;h<n;h++){for(T=A=C=S=v=m=b=p=0,x=D*(P=_[d=h<<2]),O=D*(E=_[d+1]),k=D*(j=_[d+2]),w=D*(N=_[d+3]),p+=B*P,v+=B*E,m+=B*j,b+=B*N,F=z,l=0;l<D;l++)F.r=P,F.g=E,F.b=j,F.a=N,F=F.next;for(g=n,l=1;l<=o;l++)d=g+h<<2,p+=(F.r=P=_[d])*(M=D-l),v+=(F.g=E=_[d+1])*M,m+=(F.b=j=_[d+2])*M,b+=(F.a=N=_[d+3])*M,S+=P,T+=E,A+=j,C+=N,F=F.next,l<L&&(g+=n);for(d=h,H=z,U=V,c=0;c<s;c++)_[(f=d<<2)+3]=N=b*X>>Y,N>0?(N=255/N,_[f]=(p*X>>Y)*N,_[f+1]=(v*X>>Y)*N,_[f+2]=(m*X>>Y)*N):_[f]=_[f+1]=_[f+2]=0,p-=x,v-=O,m-=k,b-=w,x-=H.r,O-=H.g,k-=H.b,w-=H.a,f=h+((f=c+D)<L?f:L)*n<<2,p+=S+=H.r=_[f],v+=T+=H.g=_[f+1],m+=A+=H.b=_[f+2],b+=C+=H.a=_[f+3],H=H.next,x+=P=U.r,O+=E=U.g,k+=j=U.b,w+=N=U.a,S-=P,T-=E,A-=j,C-=N,U=U.next,d+=n}return t}(c,0,0,n,o,h),t.getContext("2d").putImageData(c,e,r)}}var u=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},2293:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(129);function i(t,e,r){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(n.a)(t)););return t}(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(r):a.value}})(t,e,r||t)}}}]);