PageSourceSearch

https://sema-yazar-burs-basvuru.web.app/static/js/907.192c02cb.chunk.js

js sema-yazar-burs-basvuru.web.app collected 2026-10-03 12:35:20 UTC 99,776 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksema_front=self.webpackChunksema_front||[]).push([[907],{907:function(t,e,i){i.r(e),i.d(e,{AElement:function(){return Kt},AnimateColorElement:function(){return Wt},AnimateElement:function(){return Ht},AnimateTransformElement:function(){return qt},BoundingBox:function(){return wt},CB1:function(){return H},CB2:function(){return W},CB3:function(){return q},CB4:function(){return G},Canvg:function(){return Ee},CircleElement:function(){return Nt},ClipPathElement:function(){return de},DefsElement:function(){return Ft},DescElement:function(){return we},Document:function(){return Ce},Element:function(){return pt},EllipseElement:function(){return Dt},FeColorMatrixElement:function(){return ge},FeCompositeElement:function(){return be},FeDropShadowElement:function(){return me},FeGaussianBlurElement:function(){return ke},FeMorphologyElement:function(){return xe},FilterElement:function(){return pe},Font:function(){return St},FontElement:function(){return Gt},FontFaceElement:function(){return $t},GElement:function(){return _t},GlyphElement:function(){return Ct},GradientElement:function(){return Xt},ImageElement:function(){return re},LineElement:function(){return Bt},LinearGradientElement:function(){return jt},MarkerElement:function(){return Rt},MaskElement:function(){return ye},Matrix:function(){return ft},MissingGlyphElement:function(){return Qt},Mouse:function(){return it},PSEUDO_ZERO:function(){return X},Parser:function(){return ut},PathElement:function(){return At},PathParser:function(){return Pt},PatternElement:function(){return It},Point:function(){return et},PolygonElement:function(){return Lt},PolylineElement:function(){return zt},Property:function(){return K},QB1:function(){return $},QB2:function(){return Q},QB3:function(){return J},RadialGradientElement:function(){return Ut},RectElement:function(){return Ot},RenderedElement:function(){return Zt},Rotate:function(){return lt},SVGElement:function(){return Mt},SVGFontLoader:function(){return se},Scale:function(){return ct},Screen:function(){return at},Skew:function(){return gt},SkewX:function(){return yt},SkewY:function(){return vt},StopElement:function(){return Yt},StyleElement:function(){return oe},SymbolElement:function(){return ae},TRefElement:function(){return Jt},TSpanElement:function(){return Vt},TextElement:function(){return Tt},TextPathElement:function(){return ie},TitleElement:function(){return Se},Transform:function(){return dt},Translate:function(){return ht},UnknownElement:function(){return mt},UseElement:function(){return ue},ViewPort:function(){return tt},compressSpaces:function(){return Z},default:function(){return Ee},getSelectorSpecificity:function(){return _},normalizeAttributeName:function(){return E},normalizeColor:function(){return O},parseExternalUrl:function(){return M},presets:function(){return P},toNumbers:function(){return T},trimLeft:function(){return A},trimRight:function(){return C},vectorMagnitude:function(){return j},vectorsAngle:function(){return Y},vectorsRatio:function(){return U}});var n=i(82963),r=i(37762),a=i(97326),s=i(11752),o=i(61120),u=i(93433),h=i(60136),l=i(29388),c=i(15671),f=i(43144),g=i(29439),y=i(74165);i(1078);function v(t,e,i,n,r,a,s){try{var o=t[a](s),u=o.value}catch(h){return void i(h)}o.done?e(u):Promise.resolve(u).then(n,r)}function d(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var a=t.apply(e,i);function s(t){v(a,n,r,s,o,"next",t)}function o(t){v(a,n,r,s,o,"throw",t)}s(void 0)}))}}i(48214),i(82414),i(4009),i(95598),i(46411);function p(t){return p="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},p(t)}function m(t){var e=function(t,e){if("object"!==p(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===p(e)?e:String(e)}function x(t,e,i){return(e=m(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i(89878),i(57529),i(77278);var b=i(55475),k=(i(5180),i(25001)),S=(i(48882),i(59849),i(64802)),w=(i(78590),i(48605));var P=Object.freeze({__proto__:null,offscreen:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).DOMParser,e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return d((0,y.Z)().mark((function e(){var i,n,r;return(0,y.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return i=e.sent,e.next=5,i.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return r=e.sent,e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})))()}};return"undefined"===typeof DOMParser&&"undefined"!==typeof t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){var e=t.DOMParser,i=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:i.createCanvas,createImage:i.loadImage}}});function Z(t){return t.replace(/(?!\u3000)\s+/gm," ")}function A(t){return t.replace(/^[\n \t]+/,"")}function C(t){return t.replace(/[\n \t]+$/,"")}function T(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var V=/^[A-Z-]+$/;function E(t){return V.test(t)?t.toLowerCase():t}function M(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function O(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,(function(t,i){return e--&&i?String(Math.round(parseFloat(t))):t}))}var N=/(\[[^\]]+\])/g,D=/(#[^\s+>~.[:]+)/g,B=/(\.[^\s+>~.[:]+)/g,z=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,L=/(:[\w-]+\([^)]*\))/gi,I=/(:[^\s+>~.[:]+)/g,R=/([^\s+>~.[:]+)/g;function F(t,e){var i=e.exec(t);return i?[t.replace(e," "),i.length]:[t,0]}function _(t){var e=[0,0,0],i=t.replace(/:not\(([^)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," "),n=0,r=F(i,N),a=(0,g.Z)(r,2);i=a[0],n=a[1],e[1]+=n;var s=F(i,D),o=(0,g.Z)(s,2);i=o[0],n=o[1],e[0]+=n;var u=F(i,B),h=(0,g.Z)(u,2);i=h[0],n=h[1],e[1]+=n;var l=F(i,z),c=(0,g.Z)(l,2);i=c[0],n=c[1],e[2]+=n;var f=F(i,L),y=(0,g.Z)(f,2);i=y[0],n=y[1],e[1]+=n;var v=F(i,I),d=(0,g.Z)(v,2);i=d[0],n=d[1],e[1]+=n;var p=F(i=i.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),R),m=(0,g.Z)(p,2);return i=m[0],n=m[1],e[2]+=n,e.join("")}var X=1e-8;function j(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function U(t,e){return(t[0]*e[0]+t[1]*e[1])/(j(t)*j(e))}function Y(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(U(t,e))}function H(t){return t*t*t}function W(t){return 3*t*t*(1-t)}function q(t){return 3*t*(1-t)*(1-t)}function G(t){return(1-t)*(1-t)*(1-t)}function $(t){return t*t}function Q(t){return 2*t*(1-t)}function J(t){return(1-t)*(1-t)}var K=function(){function t(e,i,n){(0,c.Z)(this,t),this.document=e,this.name=i,this.value=n,this.isNormalizedColor=!1}return(0,f.Z)(t,[{key:"split",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",i=this.document,n=this.name;return Z(this.getString()).trim().split(e).map((function(e){return new t(i,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,i="string"===typeof e;return i&&t?t.test(e):i}},{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,i=parseFloat(e);return this.isString(/%$/)&&(i/=100),i}},{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=O(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}}
1,{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 i="boolean"===typeof t?[void 0,t]:[t],n=(0,g.Z)(i,2),r=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(r);default:var o=this.getNumber();return e&&o<1?o*s.computeSize(r):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 i=this.getDefinition();if(!i)return null;if("function"===typeof i.createGradient)return i.createGradient(this.document.ctx,t,e);if("function"===typeof i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&i.getAttribute("patternTransform",!0).setValue(n.value)}return i.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 i=this.getColor(),n=i.length,r=0,a=0;a<n&&(","===i[a]&&r++,3!==r);a++);if(e.hasValue()&&this.isString()&&3!==r){var s=new k(i);s.ok&&(s.alpha=e.getNumber(),i=s.toRGBA())}return new t(this.document,this.name,i)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();K.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 tt=function(){function t(){(0,c.Z)(this,t),this.viewPorts=[]}return(0,f.Z)(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}(),et=function(){function t(e,i){(0,c.Z)(this,t),this.x=e,this.y=i}return(0,f.Z)(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,i=this.y,n=e*t[0]+i*t[2]+t[4],r=e*t[1]+i*t[3]+t[5];this.x=n,this.y=r}}],[{key:"parse",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=T(e),r=(0,g.Z)(n,2),a=r[0],s=void 0===a?i:a,o=r[1];return new t(s,void 0===o?i:o)}},{key:"parseScale",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=T(e),r=(0,g.Z)(n,2),a=r[0],s=void 0===a?i:a,o=r[1];return new t(s,void 0===o?s:o)}},{key:"parsePath",value:function(e){for(var i=T(e),n=i.length,r=[],a=0;a<n;a+=2)r.push(new t(i[a],i[a+1]));return r}}]),t}(),it=function(){function t(e){(0,c.Z)(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(0,f.Z)(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,e=this.onClick,i=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=i,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,i=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach((function(t,e){for(var n=t.run,r=i[e];r;)n(r),r=r.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var i=this.events,n=this.eventElements;
1i.forEach((function(i,r){var a=i.x,s=i.y;!n[r]&&e.isPointInPath&&e.isPointInPath(a,s)&&(n[r]=t)}))}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var i=this.events,n=this.eventElements;i.forEach((function(i,r){var a=i.x,s=i.y;!n[r]&&e.isPointInBox(a,s)&&(n[r]=t)}))}}},{key:"mapXY",value:function(t,e){for(var i=this.screen,n=i.window,r=i.ctx,a=new et(t,e),s=r.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),i=e.x,n=e.y;this.events.push({type:"onclick",x:i,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY(t.clientX,t.clientY),i=e.x,n=e.y;this.events.push({type:"onmousemove",x:i,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),nt="undefined"!==typeof window?window:null,rt="undefined"!==typeof fetch?fetch.bind(void 0):null,at=function(){function t(e){(0,c.Z)(this,t);var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.fetch,r=void 0===n?rt:n,a=i.window,s=void 0===a?nt:a;this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new tt,this.mouse=new it(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=s,this.fetch=r}return(0,f.Z)(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,i=t.ctx,n=t.aspectRatio,r=t.width,a=t.desiredWidth,s=t.height,o=t.desiredHeight,u=t.minX,h=void 0===u?0:u,l=t.minY,c=void 0===l?0:l,f=t.refX,y=t.refY,v=t.clip,d=void 0!==v&&v,p=t.clipX,m=void 0===p?0:p,x=t.clipY,b=void 0===x?0:x,k=Z(n).replace(/^defer\s/,"").split(" "),S=(0,g.Z)(k,2),w=S[0]||"xMidYMid",P=S[1]||"meet",A=r/a,C=s/o,T=Math.min(A,C),V=Math.max(A,C),E=a,M=o;"meet"===P&&(E*=T,M*=T),"slice"===P&&(E*=V,M*=V);var O=new K(e,"refX",f),N=new K(e,"refY",y),D=O.hasValue()&&N.hasValue();if(D&&i.translate(-T*O.getPixels("x"),-T*N.getPixels("y")),d){var B=T*m,z=T*b;i.beginPath(),i.moveTo(B,z),i.lineTo(r,z),i.lineTo(r,s),i.lineTo(B,s),i.closePath(),i.clip()}if(!D){var L="meet"===P&&T===C,I="slice"===P&&V===C,R="meet"===P&&T===A,F="slice"===P&&V===A;w.startsWith("xMid")&&(L||I)&&i.translate(r/2-E/2,0),w.endsWith("YMid")&&(R||F)&&i.translate(0,s/2-M/2),w.startsWith("xMax")&&(L||I)&&i.translate(r-E,0),w.endsWith("YMax")&&(R||F)&&i.translate(0,s-M)}switch(!0){case"none"===w:i.scale(A,C);break;case"meet"===P:i.scale(T,T);break;case"slice"===P:i.scale(V,V)}i.translate(-h,-c)}},{key:"start",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.enableRedraw,r=void 0!==n&&n,a=i.ignoreMouse,s=void 0!==a&&a,o=i.ignoreAnimation,u=void 0!==o&&o,h=i.ignoreDimensions,l=void 0!==h&&h,c=i.ignoreClear,f=void 0!==c&&c,g=i.forceRedraw,y=i.scaleWidth,v=i.scaleHeight,d=i.offsetX,p=i.offsetY,m=this.FRAMERATE,x=this.mouse,k=1e3/m;if(this.frameDuration=k,this.readyPromise=new Promise((function(t){e.resolveReady=t})),this.isReady()&&this.render(t,l,f,y,v,d,p),r){var S=Date.now(),w=S,P=0;s||x.start(),this.intervalId=b((function i(){S=Date.now(),(P=S-w)>=k&&(w=S-P%k,e.shouldUpdate(u,g)&&(e.render(t,l,f,y,v,d,p),x.runEvents())),e.intervalId=b(i)}))}}},{key:"stop",value:function(){this.intervalId&&(b.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var i=this.frameDuration,n=this.animations.reduce((function(t,e){return e.update(i)||t}),!1);if(n)return!0}return!("function"!==typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}}
1,{key:"render",value:function(t,e,i,n,r,a,s){var o=this.CLIENT_WIDTH,u=this.CLIENT_HEIGHT,h=this.viewPort,l=this.ctx,c=this.isFirstRender,f=l.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(o,u);var g=t.getStyle("width"),y=t.getStyle("height");!e&&(c||"number"!==typeof n&&"number"!==typeof r)&&(g.hasValue()&&(f.width=g.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),y.hasValue()&&(f.height=y.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var v=f.clientWidth||f.width,d=f.clientHeight||f.height;if(e&&g.hasValue()&&y.hasValue()&&(v=g.getPixels("x"),d=y.getPixels("y")),h.setCurrent(v,d),"number"===typeof a&&t.getAttribute("x",!0).setValue(a),"number"===typeof s&&t.getAttribute("y",!0).setValue(s),"number"===typeof n||"number"===typeof r){var p=T(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"===typeof n){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/n:isNaN(p[2])||(m=p[2]/n)}if("number"===typeof r){var k=t.getStyle("height");k.hasValue()?x=k.getPixels("y")/r:isNaN(p[3])||(x=p[3]/r)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(r);var S=t.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}i||l.clearRect(0,0,v,d),t.render(l),c&&(this.isFirstRender=!1)}}]),t}();at.defaultWindow=nt,at.defaultFetch=rt;var st=at.defaultFetch,ot="undefined"!==typeof DOMParser?DOMParser:null,ut=function(){function t(){(0,c.Z)(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.fetch,n=void 0===i?st:i,r=e.DOMParser,a=void 0===r?ot:r;this.fetch=n,this.DOMParser=a}return(0,f.Z)(t,[{key:"parse",value:function(t){var e=this;return d((0,y.Z)().mark((function i(){return(0,y.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!t.startsWith("<")){i.next=2;break}return i.abrupt("return",e.parseFromString(t));case 2:return i.abrupt("return",e.load(t));case 3:case"end":return i.stop()}}),i)})))()}},{key:"parseFromString",value:function(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(i){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 d((0,y.Z)().mark((function i(){var n,r;return(0,y.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.fetch(t);case 2:return n=i.sent,i.next=5,n.text();case 5:return r=i.sent,i.abrupt("return",e.parseFromString(r));case 7:case"end":return i.stop()}}),i)})))()}}]),t}(),ht=function(){function t(e,i){(0,c.Z)(this,t),this.type="translate",this.point=null,this.point=et.parse(i)}return(0,f.Z)(t,[{key:"apply",value:function(t){var e=this.point,i=e.x,n=e.y;t.translate(i||0,n||0)}},{key:"unapply",value:function(t){var e=this.point,i=e.x,n=e.y;t.translate(-1*i||0,-1*n||0)}},{key:"applyToPoint",value:function(t){var e=this.point,i=e.x,n=e.y;t.applyTransform([1,0,0,1,i||0,n||0])}}]),t}(),lt=function(){function t(e,i,n){(0,c.Z)(this,t),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var r=T(i);this.angle=new K(e,"angle",r[0]),this.originX=n[0],this.originY=n[1],this.cx=r[1]||0,this.cy=r[2]||0}return(0,f.Z)(t,[{key:"apply",value:function(t){var e=this.cx,i=this.cy,n=this.originX,r=this.originY,a=this.angle,s=e+n.getPixels("x"),o=i+r.getPixels("y");t.translate(s,o),t.rotate(a.getRadians()),t.translate(-s,-o)}},{key:"unapply",value:function(t){var e=this.cx,i=this.cy,n=this.originX,r=this.originY,a=this.angle,s=e+n.getPixels("x"),o=i+r.getPixels("y");t.translate(s,o),t.rotate(-1*a.getRadians()),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var e=this.cx,i=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,i||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,-i||0])}}]),t}(),ct=function(){function t(e,i,n){(0,c.Z)(this,t),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var r=et.parseScale(i);0!==r.x&&0!==r.y||(r.x=X,r.y=X),this.scale=r,this.originX=n[0],this.originY=n[1]}return(0,f.Z)(t,[{key:"apply",value:function(t){var e=this.scale,i=e.x,n=e.y,r=this.originX,a=this.originY,s=r.getPixels("x"),o=a.getPixels("y");t.translate(s,o),t.scale(i,n||i),t.translate(-s,-o)}},{key:"unapply",value:function(t){var e=this.scale,i=e.x,n=e.y,r=this.originX,a=this.originY,s=r.getPixels("x"),o=a.getPixels("y");t.translate(s,o),t.scale(1/i,1/n||i),t.translate(-s,-o)}},{key:"applyToPoint",value:function(t){var e=this.scale,i=e.x,n=e.y;t.applyTransform([i||0,0,0,n||0,0,0])}}]),t}(),ft=function(){function t(e,i,n){(0,c.Z)(this,t),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=T(i),this.originX=n[0],this.originY=n[1]}return(0,f.Z)(t,[{key:"apply",value:function(t){var e=this.originX,i=this.originY,n=this.matrix,r=e.getPixels("x"),a=i.getPixels("y");t.translate(r,a),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-r,-a)}},{key:"unapply",value:function(t){var e=this.originX,i=this.originY,n=this.matrix,r=n[0],a=n[2],s=n[4],o=n[1],u=n[3],h=n[5],l=1/(r*(1*u-0*h)-a*(1*o-0*h)+s*(0*o-0*u)),c=e.getPixels("x"),f=i.getPixels("y");t.translate(c,f),t.transform(l*(1*u-0*h),l*(0*h-1*o),l*(0*s-1*a),l*(1*r-0*s),l*(a
1*h-s*u),l*(s*o-r*h)),t.translate(-c,-f)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}(),gt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="skew",a.angle=null,a.angle=new K(t,"angle",n),a}return(0,f.Z)(i)}(ft),yt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="skewX",a.matrix=[1,0,Math.tan(a.angle.getRadians()),1,0,0],a}return(0,f.Z)(i)}(gt),vt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="skewY",a.matrix=[1,Math.tan(a.angle.getRadians()),0,1,0,0],a}return(0,f.Z)(i)}(gt);var dt=function(){function t(e,i,n){var r=this;(0,c.Z)(this,t),this.document=e,this.transforms=[];var a=function(t){return Z(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(i);a.forEach((function(e){if("none"!==e){var i=function(t){var e=t.split("("),i=(0,g.Z)(e,2),n=i[0],r=i[1];return[n.trim(),r.trim().replace(")","")]}(e),a=(0,g.Z)(i,2),s=a[0],o=a[1],u=t.transformTypes[s];"undefined"!==typeof u&&r.transforms.push(new u(r.document,o,n))}}))}return(0,f.Z)(t,[{key:"apply",value:function(t){for(var e=this.transforms,i=e.length,n=0;n<i;n++)e[n].apply(t)}},{key:"unapply",value:function(t){for(var e=this.transforms,i=e.length-1;i>=0;i--)e[i].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,i=e.length,n=0;n<i;n++)e[n].applyToPoint(t)}}],[{key:"fromElement",value:function(e,i){var n=i.getStyle("transform",!1,!0),r=i.getStyle("transform-origin",!1,!0).split(),a=(0,g.Z)(r,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}();dt.transformTypes={translate:ht,rotate:lt,scale:ct,matrix:ft,skewX:yt,skewY:vt};var pt=function(){function t(e,i){var n=this;(0,c.Z)(this,t);var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=e,this.node=i,this.captureTextNodes=r,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],i&&1===i.nodeType){if(Array.from(i.attributes).forEach((function(t){var i=E(t.nodeName);n.attributes[i]=new K(e,i,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue())this.getAttribute("style").getString().split(";").map((function(t){return t.trim()})).forEach((function(t){if(t){var i=t.split(":").map((function(t){return t.trim()})),r=(0,g.Z)(i,2),a=r[0],s=r[1];n.styles[a]=new K(e,a,s)}}));var a=e.definitions,s=this.getAttribute("id");s.hasValue()&&(a[s.getString()]||(a[s.getString()]=this)),Array.from(i.childNodes).forEach((function(t){if(1===t.nodeType)n.addChild(t);else if(r&&(3===t.nodeType||4===t.nodeType)){var i=e.createTextNode(t);i.getText().length>0&&n.addChild(i)}}))}}return(0,f.Z)(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.attributes[t];if(!i&&e){var n=new K(this.document,t,"");return this.attributes[t]=n,n}return i||K.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return K.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var r=this.getAttribute(t);if(null!==r&&void 0!==r&&r.hasValue())return this.styles[t]=r,r;if(!i){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 K(this.document,t,"");return this.styles[t]=o,o}return n||K.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 i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);
1t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var e=dt.fromElement(this.document,this);e&&e.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var n=i.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 i=e instanceof t?e:this.document.createElement(e);i.parent=this,t.ignoreChildTypes.includes(i.type)||this.children.push(i)}},{key:"matchesSelector",value:function(t){var e,i=this.node;if("function"===typeof i.matches)return i.matches(t);var n=null===(e=i.getAttribute)||void 0===e?void 0:e.call(i,"class");return!(!n||""===n)&&n.split(" ").some((function(e){return".".concat(e)===t}))}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,i=t.stylesSpecificity;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var r=e[n],a=i[n];if(r)for(var s in r){var o=this.stylesSpecificity[s];"undefined"===typeof o&&(o="000"),a>=o&&(this.styles[s]=r[s],this.stylesSpecificity[s]=a)}}}},{key:"removeStyles",value:function(t,e){return e.reduce((function(e,i){var n=t.getStyle(i);if(!n.hasValue())return e;var r=n.getString();return n.setValue(""),[].concat((0,u.Z)(e),[[i,r]])}),[])}},{key:"restoreStyles",value:function(t,e){e.forEach((function(e){var i=(0,g.Z)(e,2),n=i[0],r=i[1];t.getStyle(n,!0).setValue(r)}))}},{key:"isFirstChild",value:function(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}]),t}();pt.ignoreChildTypes=["title"];var mt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){return(0,c.Z)(this,i),e.call(this,t,n,r)}return(0,f.Z)(i)}(pt);function xt(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function bt(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 St=function(){function t(e,i,n,r,a,s){(0,c.Z)(this,t);var o=s?"string"===typeof s?t.parse(s):s:{};this.fontFamily=a||o.fontFamily,this.fontSize=r||o.fontSize,this.fontStyle=e||o.fontStyle,this.fontWeight=n||o.fontWeight,this.fontVariant=i||o.fontVariant}return(0,f.Z)(t,[{key:"toString",value:function(){return[bt(this.fontStyle),this.fontVariant,kt(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"===typeof process?t:t.trim().split(",").map(xt).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function(){var e=arguments.length>1?arguments[1]:void 0,i="",n="",r="",a="",s="",o=Z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),u={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach((function(e){switch(!0){case!u.fontStyle&&t.styles.includes(e):"inherit"!==e&&(i=e),u.fontStyle=!0;break;case!u.fontVariant&&t.variants.includes(e):"inherit"!==e&&(n=e),u.fontStyle=!0,u.fontVariant=!0;break;case!u.fontWeight&&t.weights.includes(e):"inherit"!==e&&(r=e),u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0;break;case!u.fontSize:if("inherit"!==e){var o=e.split("/"),h=(0,g.Z)(o,1);a=h[0]}u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0,u.fontSize=!0;break;default:"inherit"!==e&&(s+=e)}})),new t(i,n,r,a,s,e)}}]),t}();St.styles="normal|italic|oblique|inherit",St.variants="normal|small-caps|inherit",St.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var wt=function(){function t(){(0,c.Z)(this,t);var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=e,this.y1=i,this.x2=n,this.y2=r,this.addPoint(e,i),this.addPoint(n,r)}return(0,f.Z)(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)}}
1,{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,i=t.y1,n=t.x2,r=t.y2;this.addPoint(e,i),this.addPoint(n,r)}}},{key:"sumCubic",value:function(t,e,i,n,r){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*r}},{key:"bezierCurveAdd",value:function(t,e,i,n,r){var a=6*e-12*i+6*n,s=-3*e+9*i-9*n+3*r,o=3*i-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,i,n,r)):this.addY(this.sumCubic(h,e,i,n,r)));var l=(-a-Math.sqrt(u))/(2*s);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,i,n,r)):this.addY(this.sumCubic(l,e,i,n,r)))}}else{if(0===a)return;var c=-o/a;0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,i,n,r)):this.addY(this.sumCubic(c,e,i,n,r)))}}},{key:"addBezierCurve",value:function(t,e,i,n,r,a,s,o){this.addPoint(t,e),this.addPoint(s,o),this.bezierCurveAdd(!0,t,i,r,s),this.bezierCurveAdd(!1,e,n,a,o)}},{key:"addQuadraticCurve",value:function(t,e,i,n,r,a){var s=t+2/3*(i-t),o=e+2/3*(n-e),u=s+1/3*(r-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,s,u,o,h,r,a)}},{key:"isPointInBox",value:function(t,e){var i=this.x1,n=this.y1,r=this.x2,a=this.y2;return i<=t&&t<=r&&n<=e&&e<=a}}]),t}(),Pt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t){var n;return(0,c.Z)(this,i),(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(0,f.Z)(i,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new et(0,0),this.control=new et(0,0),this.current=new et(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",i=new et(this.command[t],this.command[e]);return this.makeAbsolute(i)}},{key:"getAsControlPoint",value:function(t,e){var i=this.getPoint(t,e);return this.control=i,i}},{key:"getAsCurrentPoint",value:function(t,e){var i=this.getPoint(t,e);return this.current=i,i}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.type;if(t!==S.OU.CURVE_TO&&t!==S.OU.SMOOTH_CURVE_TO&&t!==S.OU.QUAD_TO&&t!==S.OU.SMOOTH_QUAD_TO)return this.current;var e=this.current,i=e.x,n=e.y,r=this.control,a=r.x,s=r.y;return new et(2*i-a,2*n-s)}},{key:"makeAbsolute",value:function(t){if(this.command.relative){var e=this.current,i=e.x,n=e.y;t.x+=i,t.y+=n}return t}},{key:"addMarker",value:function(t,e,i){var n=this.points,r=this.angles;i&&r.length>0&&!r[r.length-1]&&(r[r.length-1]=n[n.length-1].angleTo(i)),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,i=0;i<e;i++)if(!t[i])for(var n=i+1;n<e;n++)if(t[n]){t[i]=t[n];break}return t}}]),i}(S.OU),Zt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).modifiedEmSizeStack=!1,t}return(0,f.Z)(i,[{key:"calculateOpacity",value:function(){for(var t=1,e=this;e;){var i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.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 i=this.getStyle("fill"),n=this.getStyle("fill-opacity"),r=this.getStyle("stroke"),a=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var s=i.getFillStyleDefinition(this,n);s&&(t.fillStyle=s)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var o=i.getColor();"inherit"!==o&&(t.fillStyle="none"===o?"rgba(0,0,0,0)":o)}if(n.hasValue()){var u=new K(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=u}if(r.isUrlDefinition()){var h=r.getFillStyleDefinition(this,a);h&&(t.strokeStyle=h)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var l=r.getString();"inherit"!==l&&(t.strokeStyle="none"===l?"rgba(0,0,0,0)":l)}if(a.hasValue()){var c=new K(this.document,"stroke",t.strokeStyle).addOpacity(a).getString();t.strokeStyle=c}var f=this.getStyle("stroke-width");if(f.hasValue()){var g=f.getPixels();t.lineWidth=g||X}var y=this.getStyle("stroke-linecap"),v=this.getStyle("stroke-linejoin"),d=this.getStyle("stroke-miterlimit"),p=this.getStyle("stroke-dasharray"),m=this.getStyle("stroke-dashoffset");if(y.hasValue()&&(t.lineCap=y.getString()),v.hasValue()&&(t.lineJoin=v.getString()),d.hasValue()&&(t.miterLimit=d.getNumber()),p.hasValue()&&"none"!==p.getString()){var x=T(p.getString());"undefined"!==typeof t.setLineDash?t.setLineDash(x):"undefined"!==typeof t.webkitLineDash?t.webkitLineDash=x:"undefined"===typeof t.mozDash||1===x.length&&0===x[0]||(t.mozDash=x);var b=m.getPixels();"undefined"!==typeof t.lineDashOffset?t.lineDashOffset=b:"undefined"!==typeof t.webkitLineDashOffset?t.webkitLineDashOffset=b:"undefined"!==typeof t.mozDashOffset&&(t.mozDashOffset=b)}}if(this.modifiedEmSizeStack=!1,"undefined"!==typeof t.font){var k=this.getStyle("font"),S=this.getStyle("font-style"),w=this.getStyle("font-variant"),P=this.getStyle("font-weight"),Z=this.getStyle("font-size"),A=this.getStyle("font-family"),C=new St(S.getString(),w.getString(),P.getString(),Z.hasValue()?"".concat(Z.getPixels(!0),"px"):"",A.getString(),St.parse(k.get
1String(),t.font));S.setValue(C.fontStyle),w.setValue(C.fontVariant),P.setValue(C.fontWeight),Z.setValue(C.fontSize),A.setValue(C.fontFamily),t.font=C.toString(),Z.isPixels()&&(this.document.emSize=Z.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){(0,s.Z)((0,o.Z)(i.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),i}(pt),At=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="path",a.pathParser=null,a.pathParser=new Pt(a.getAttribute("d").getString()),a}return(0,f.Z)(i,[{key:"path",value:function(t){var e=this.pathParser,i=new wt;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Pt.MOVE_TO:this.pathM(t,i);break;case Pt.LINE_TO:this.pathL(t,i);break;case Pt.HORIZ_LINE_TO:this.pathH(t,i);break;case Pt.VERT_LINE_TO:this.pathV(t,i);break;case Pt.CURVE_TO:this.pathC(t,i);break;case Pt.SMOOTH_CURVE_TO:this.pathS(t,i);break;case Pt.QUAD_TO:this.pathQ(t,i);break;case Pt.SMOOTH_QUAD_TO:this.pathT(t,i);break;case Pt.ARC:this.pathA(t,i);break;case Pt.CLOSE_PATH:this.pathZ(t,i)}return i}},{key:"getBoundingBox",value:function(t){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,e=t.getMarkerPoints(),i=t.getMarkerAngles();return e.map((function(t,e){return[t,i[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 i=this.getMarkers();if(i){var n=i.length-1,r=this.getStyle("marker-start"),a=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(r.isUrlDefinition()){var o=r.getDefinition(),u=(0,g.Z)(i[0],2),h=u[0],l=u[1];o.render(t,h,l)}if(a.isUrlDefinition())for(var c=a.getDefinition(),f=1;f<n;f++){var y=(0,g.Z)(i[f],2),v=y[0],d=y[1];c.render(t,v,d)}if(s.isUrlDefinition()){var p=s.getDefinition(),m=(0,g.Z)(i[n],2),x=m[0],b=m[1];p.render(t,x,b)}}}},{key:"pathM",value:function(t,e){var n=this.pathParser,r=i.pathM(n).point,a=r.x,s=r.y;n.addMarker(r),e.addPoint(a,s),t&&t.moveTo(a,s)}},{key:"pathL",value:function(t,e){var n=this.pathParser,r=i.pathL(n),a=r.current,s=r.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,r=i.pathH(n),a=r.current,s=r.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,r=i.pathV(n),a=r.current,s=r.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,r=i.pathC(n),a=r.current,s=r.point,o=r.controlPoint,u=r.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,r=i.pathS(n),a=r.current,s=r.point,o=r.controlPoint,u=r.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,r=i.pathQ(n),a=r.current,s=r.controlPoint,o=r.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,r=i.pathT(n),a=r.current,s=r.controlPoint,o=r.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,r=i.pathA(n),a=r.currentPoint,s=r.rX,o=r.rY,u=r.sweepFlag,h=r.xAxisRotation,l=r.centp,c=r.a1,f=r.ad,g=1-u?1:-1,y=c+g*(f/2),v=new et(l.x+s*Math.cos(y),l.y+o*Math.sin(y));if(n.addMarkerAngle(v,y-g*Math.PI/2),n.addMarkerAngle(a,y-g*Math.PI),e.addPoint(a.x,a.y),t&&!isNaN(c)&&!isNaN(f)){var d=s>o?s:o,p=s>o?1:s/o,m=s>o?o/s:1;t.translate(l.x,l.y),t.rotate(h),t.scale(p,m),t.arc(0,0,d,c,c+f,Boolean(1-u)),t.scale(1/p,1/m),t.rotate(-h),t.translate(-l.x,-l.y)}}},{key:"pathZ",value:function(t,e){i.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,i=t.command,n=new et((i.relative?e.x:0)+i.x,e.y);return t.current=n,{current:e,point:n}}},{key:"pathV",value:function(t){var e=t.current,i=t.command,n=new et(e.x,(i.relative?e.y:0)+i.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,i=t.getReflectedControlPoint();return t.control=i,{current:e,controlPoint:i,currentPoint:t.getAsCurrentPoint()}}},{key:"pathA",value:function(t){var e=t.current,i=t.command,n=i.rX,r=i.rY,a=i.xRot,s=i.lArcFlag,o=i.sweepFlag,u=a*(Math.PI/180),h=t.getAsCurrentPoint(),l=new et(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),c=Math.pow(l.x,2)/Math.pow(n,2)+Math.pow(l.y,2)/Math.pow(r,2);c>1&&(n*=Math.sqrt(c),r*=Math.sqrt(c));var f=(s===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(r,2)-Math.pow(n,2)*Math.pow(l.y,2)-Math.pow(r,2)*Math.pow(l.x,2))/(Math.pow(n,2)*Math.pow(l.y,2)+Math.pow(r,2)*Math.pow(l.x,2)));isNaN(f)&&(f=0);var g=new et(f*n*l.y/r,f*-r*l.x/n),y=new et((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),v=Y([1,0],[(l.x-g.x)/n,(l.y-g.y)/r]),d=[(l.x-g.x)/n,(l.y-g.y)/r],p=[(-l.x-g.x)/n,(-l.y-g.y)/r],m=Y(d,p);return U(d,p)<=-1&&(m=Math.PI),U(d,p)>=1&&(m=0),{currentPoint:h,rX:n,rY:r,sweepFlag:o,xAxisRotation:u,centp:y,a1:v,ad:m}}},{key:"pathZ",value:function(t){t.current=t.start}}]),i}(Zt),Ct=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="glyph",a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber(),a.unicode=
1a.getAttribute("unicode").getString(),a.arabicForm=a.getAttribute("arabic-form").getString(),a}return(0,f.Z)(i)}(At),Tt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,(this instanceof i?this.constructor:void 0)===i||r)).type="text",a.x=0,a.y=0,a.measureCache=-1,a}return(0,f.Z)(i,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,s.Z)((0,o.Z)(i.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 i=null;return this.children.forEac
1h((function(n,r){var a=e.getChildBoundingBox(t,e,e,r);i?i.addBoundingBox(a):i=a})),i}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,i=St.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(i)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new wt(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,i){var n=e[i],r=null;if(t.isArabic){var a=e.length,s=e[i-1],o=e[i+1],u="isolated";if((0===i||" "===s)&&i<a-1&&" "!==o&&(u="terminal"),i>0&&" "!==s&&i<a-1&&" "!==o&&(u="medial"),i>0&&" "!==s&&(i===a-1||" "===o)&&(u="initial"),"undefined"!==typeof t.glyphs[n]){var h=t.glyphs[n];r=h instanceof Ct?h:h[u]}}else r=t.glyphs[n];return r||(r=t.missingGlyph),r}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,i=Array.from(e.parentNode.childNodes),n=i.indexOf(e),r=i.length-1,a=Z(e.textContent||"");return 0===n&&(a=A(a)),n===r&&(a=C(a)),a}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((function(i,n){e.renderChild(t,e,e,n)}));var i=this.document.screen.mouse;i.isWorking()&&i.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var e=this.document,i=this.parent,n=this.getText(),r=i.getStyle("font-family").getDefinition();if(r)for(var a=r.fontFace.unitsPerEm,s=St.parse(e.ctx.font),o=i.getStyle("font-size").getNumber(s.fontSize),u=i.getStyle("font-style").getString(s.fontStyle),h=o/a,l=r.isRTL?n.split("").reverse().join(""):n,c=T(i.getAttribute("dx").getString()),f=l.length,g=0;g<f;g++){var y=this.getGlyph(r,l,g);t.translate(this.x,this.y),t.scale(h,-h);var v=t.lineWidth;t.lineWidth=t.lineWidth*a/o,"italic"===u&&t.transform(1,0,.4,1,0,0),y.render(t),"italic"===u&&t.transform(1,0,-.4,1,0,0),t.lineWidth=v,t.scale(1/h,-1/h),t.translate(-this.x,-this.y),this.x+=o*(y.horizAdvX||r.horizAdvX)/a,"undefined"===typeof c[g]||isNaN(c[g])||(this.x+=c[g])}else{var d=this.x,p=this.y;t.fillStyle&&t.fillText(n,d,p),t.strokeStyle&&t.strokeText(n,d,p)}}},{key:"applyAnchoring",value:function(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),i=0;i="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+=i;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(i,n){e.adjustChildCoordinatesRecursiveCore(t,e,e,n)})),this.applyAnchoring()}},{key:"adjustChildCoordinatesRecursiveCore",value:function(t,e,i,n){var r=i.children[n];r.children.length>0?r.children.forEach((function(i,n){e.adjustChildCoordinatesRecursiveCore(t,e,r,n)})):this.adjustChildCoordinates(t,e,i,n)}},{key:"adjustChildCoordinates",value:function(t,e,i,n){var r=i.children[n];if("function"!==typeof r.measureText)return r;t.save(),r.setContext(t,!0);var a=r.getAttribute("x"),s=r.getAttribute("y"),o=r.getAttribute("dx"),u=r.getAttribute("dy"),h=r.getStyle("font-family").getDefinition(),l=Boolean(h)&&h.isRTL;0===n&&(a.hasValue()||a.setValue(r.getInheritedAttribute("x")),s.hasValue()||s.setValue(r.getInheritedAttribute("y")),o.hasValue()||o.setValue(r.getInheritedAttribute("dx")),u.hasValue()||u.setValue(r.getInheritedAttribute("dy")));var c=r.measureText(t);return l&&(e.x-=c),a.hasValue()?(e.applyAnchoring(),r.x=a.getPixels("x"),o.hasValue()&&(r.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),r.x=e.x),e.x=r.x,l||(e.x+=c),s.hasValue()?(r.y=s.getPixels("y"),u.hasValue()&&(r.y+=u.getPixels("y"))):(u.hasValue()&&(e.y+=u.getPixels("y")),r.y=e.y),e.y=r.y,e.leafTexts.push(r),e.minX=Math.min(e.minX,r.x,r.x+c),e.maxX=Math.max(e.maxX,r.x,r.x+c),r.clearContext(t),t.restore(),r}}
1,{key:"getChildBoundingBox",value:function(t,e,i,n){var r=i.children[n];if("function"!==typeof r.getBoundingBox)return null;var a=r.getBoundingBox(t);return a?(r.children.forEach((function(i,n){var s=e.getChildBoundingBox(t,e,r,n);a.addBoundingBox(s)})),a):null}},{key:"renderChild",value:function(t,e,i,n){var r=i.children[n];r.render(t),r.children.forEach((function(i,n){e.renderChild(t,e,r,n)}))}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var i=this.getText(),n=this.measureTargetText(t,i);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var i=this.parent,n=i.getStyle("font-family").getDefinition();if(n){for(var r=this.getFontSize(),a=n.isRTL?e.split("").reverse().join(""):e,s=T(i.getAttribute("dx").getString()),o=a.length,u=0,h=0;h<o;h++){u+=(this.getGlyph(n,a,h).horizAdvX||n.horizAdvX)*r/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 l=t.measureText(e).width;return this.clearContext(t),t.restore(),l}},{key:"getInheritedAttribute",value:function(t){for(var e=this;e instanceof i&&e.isFirstChild();){var n=e.parent.getAttribute(t);if(n.hasValue(!0))return n.getValue("0");e=e.parent}return null}}]),i}(Zt),Vt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,(this instanceof i?this.constructor:void 0)===i||r)).type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return(0,f.Z)(i,[{key:"getText",value:function(){return this.text}}]),i}(Tt),Et=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="textNode",t}return(0,f.Z)(i)}(Vt),Mt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="svg",t.root=!1,t}return(0,f.Z)(i,[{key:"setContext",value:function(t){var e,n=this.document,r=n.screen,a=n.window,u=t.canvas;if(r.setDefaults(t),u.style&&"undefined"!==typeof t.font&&a&&"undefined"!==typeof a.getComputedStyle){t.font=a.getComputedStyle(u).getPropertyValue("font");var h=new K(n,"fontSize",St.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 l=r.viewPort,c=l.width,f=l.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"),y=this.getAttribute("refY"),v=this.getAttribute("viewBox"),d=v.hasValue()?T(v.getString()):null,p=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),m=0,x=0,b=0,k=0;d&&(m=d[0],x=d[1]),this.root||(c=this.getStyle("width").getPixels("x"),f=this.getStyle("height").getPixels("y"),"marker"===this.type&&(b=m,k=x,m=0,x=0)),r.viewPort.setCurrent(c,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%"),(0,s.Z)((0,o.Z)(i.prototype),"setContext",this).call(this,t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),d&&(c=d[2],f=d[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:c,height:r.viewPort.height,desiredHeight:f,minX:m,minY:x,refX:g.getValue(),refY:y.getValue(),clip:p,clipX:b,clipY:k}),d&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(c,f))}},{key:"clearContext",value:function(t){(0,s.Z)((0,o.Z)(i.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,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),r=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),s=this.getAttribute("style"),o=n.getNumber(0),u=r.getNumber(0);if(i)if("string"===typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),r.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(o||t," ").concat(u||e)),s.hasValue()){var l=this.getStyle("width"),c=this.getStyle("height");l.hasValue()&&l.setValue("".concat(t,"px")),c.hasValue()&&c.setValue("".concat(e,"px"))}}}]),i}(Zt),Ot=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="rect",t}return(0,f.Z)(i,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),r=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,r/2),t){var h=(Math.sqrt(2)-1)/3*4;t.beginPath(),r>0&&n>0&&(t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.bezierCurveTo(e+n-o+h*o,i,e+n,i+u-h*u,e+n,i+u),t.lineTo(e+n,i+r-u),t.bezierCurveTo(e+n,i+r-u+h*u,e+n-o+h*o,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.bezierCurveTo(e+o-h*o,i+r,e,i+r-u+h*u,e,i+r-u),t.lineTo(e,i+u),t.bezierCurveTo(e,i+u-h*u,e+o-h*o,i,e+o,i),t.closePath())}return new wt(e,i,e+n,i+r)}},{key:"getMarkers",value:function(){return null}}]),i}(At),Nt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="circle",t}return(0,f.Z)(i,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!1),t.closePath()),new wt(e-n,i-n,e+n,i+n)}},{key:"getMarkers",value:function(){return null}}]),i}(At),Dt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="ellipse",t}return(0,f.Z)(i,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),r=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&i>0&&n>0&&(t.beginPath(),t.moveTo(r+i,a),t.bezierCurveTo(r+i,a+e*n,r+e*i,a+n,r,a+n),t.bezierCurveTo(r-e*i,a+n,r-i,a+e*n,r-i,a),t.bezierCurveTo(r-i,a-e*n,r-e*i,a-n,r,a-n),t.bezierCurveTo(r+e*i,a-n,r+i,a-e*n,r+i,a),t.closePath()),new wt(r-i,a-n,r+i,a+n)}},{key:"getMarkers",value:function(){return null}}]),i}(At),Bt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="line",t}return(0,f.Z)(i,[{key:"getPoints",value:function(){return[new et(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new et(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),i=(0,g.Z)(e,2),n=i[0],r=n.x,a=n.y,s=i[1],o=s.x,u=s.y;return t&&(t.beginPath(),t.moveTo(r,a),t.lineTo(o,u)),new wt(r,a,o,u)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=(0,g.Z)(t,2),i=e[0],n=e[1],r=i.angleTo(n);return[[i,r],[n,r]]}}]),i}(At),zt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="polyline",a.points=[],a.points=et.parsePath(a.getAttribute("points").getString()),a}return(0,f.Z)(i,[{key:"path",value:function(t){var e=this.points,i=(0,g.Z)(e,1)[0],n=i.x,r=i.y,a=new wt(n,r);return t&&(t.beginPath(),t.moveTo(n,r)),e.forEach((function(e){var i=e.x,n=e.y;a.addPoint(i,n),t&&t.lineTo(i,n)})),a}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,i=[];return t.forEach((function(n,r){r!==e&&i.push([n,n.angleTo(t[r+1])])})),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}}]),i}(At),Lt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="polygon",t}return(0,f.Z)(i,[{key:"path",value:function(t){var e=(0,s.Z)((0,o.Z)(i.prototype),"path",this).call(this,t),n=(0,g.Z)(this.points,1)[0],r=n.x,a=n.y;return t&&(t.lineTo(r,a),t.closePath()),e}}]),i}(zt),It=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="pattern",t}
1return(0,f.Z)(i,[{key:"createPattern",value:function(t,e,i){var n=this.getStyle("width").getPixels("x",!0),r=this.getStyle("height").getPixels("y",!0),a=new Mt(this.document,null);a.attributes.viewBox=new K(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.width=new K(this.document,"width","".concat(n,"px")),a.attributes.height=new K(this.document,"height","".concat(r,"px")),a.attributes.transform=new K(this.document,"transform",this.getAttribute("patternTransform").getValue()),a.children=this.children;var s=this.document.createCanvas(n,r),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)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var l=-1;l<=1;l++)for(var c=-1;c<=1;c++)o.save(),a.attributes.x=new K(this.document,"x",l*s.width),a.attributes.y=new K(this.document,"y",c*s.height),a.render(o),o.restore();return t.createPattern(s,"repeat")}}]),i}(pt),Rt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="marker",t}return(0,f.Z)(i,[{key:"render",value:function(t,e,i){if(e){var n=e.x,r=e.y,a=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(n,r),"auto"===a&&t.rotate(i),"strokeWidth"===s&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new Mt(this.document,null);
1o.type=this.type,o.attributes.viewBox=new K(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new K(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new K(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new K(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new K(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new K(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new K(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new K(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(-i),t.translate(-n,-r)}}}]),i}(pt),Ft=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="defs",t}return(0,f.Z)(i,[{key:"render",value:function(){}}]),i}(pt),_t=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="g",t}return(0,f.Z)(i,[{key:"getBoundingBox",value:function(t){var e=new wt;return this.children.forEach((function(i){e.addBoundingBox(i.getBoundingBox(t))})),e}}]),i}(Zt),Xt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var s;(0,c.Z)(this,i),(s=e.call(this,t,n,r)).attributesToInherit=["gradientUnits"],s.stops=[];var o=(0,a.Z)(s),u=o.stops;return o.children.forEach((function(t){"stop"===t.type&&u.push(t)})),s}return(0,f.Z)(i,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,i){var n=this,r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));var a=r.stops,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(i,a[a.length-1].color);if(a.forEach((function(t){s.addColorStop(t.offset,n.addParentOpacity(i,t.color))})),this.getAttribute("gradientTransform").hasValue()){var o=this.document,u=o.screen,h=u.MAX_VIRTUAL_PIXELS,l=u.viewPort,c=(0,g.Z)(l.viewPorts,1)[0],f=new Ot(o,null);f.attributes.x=new K(o,"x",-h/3),f.attributes.y=new K(o,"y",-h/3),f.attributes.width=new K(o,"width",h),f.attributes.height=new K(o,"height",h);var y=new _t(o,null);y.attributes.transform=new K(o,"transform",this.getAttribute("gradientTransform").getValue()),y.children=[f];var v=new Mt(o,null);v.attributes.x=new K(o,"x",0),v.attributes.y=new K(o,"y",0),v.attributes.width=new K(o,"width",c.width),v.attributes.height=new K(o,"height",c.height),v.children=[y];var d=o.createCanvas(c.width,c.height),p=d.getContext("2d");return p.fillStyle=s,v.render(p),p.createPattern(d,"no-repeat")}return s}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach((function(i){!e.getAttribute(i).hasValue()&&t.getAttribute(i).hasValue()&&e.getAttribute(i,!0).setValue(t.getAttribute(i).getValue())}))}},{key:"addParentOpacity",value:function(t,e){return t.hasValue()?new K(this.document,"color",e).addOpacity(t).getColor():e}}]),i}(pt),jt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return(0,f.Z)(i,[{key:"getGradient",value:function(t,e){var i="objectBoundingBox"===this.getGradientUnits(),n=i?e.getBoundingBox(t):null;if(i&&!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 r=i?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=i?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=i?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=i?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return r===s&&a===o?null:t.createLinearGradient(r,a,s,o)}}]),i}(Xt),Ut=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return(0,f.Z)(i,[{key:"getGradient",value:function(t,e){var i="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(i&&!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 r=i?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=i?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=r,o=a;this.getAttribute("fx").hasValue()&&(s=i?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=i?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var u=i?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return t.createRadialGradient(s,o,h,r,a,u)}}]),i}(Xt),Yt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;(0,c.Z)(this,i),(a=e.call(this,t,n,r)).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)
1),a.offset=s,a.color=u.getColor(),a}return(0,f.Z)(i)}(pt),Ht=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var s;(0,c.Z)(this,i),(s=e.call(this,t,n,r)).type="animate",s.duration=0,s.initialValue=null,s.initialUnits="",s.removed=!1,s.frozen=!1,t.screen.animations.push((0,a.Z)(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 K(t,"values",null);var o=s.getAttribute("values");return o.hasValue()&&s.values.setValue(o.getString().split(";")),s}return(0,f.Z)(i,[{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(),i=e.progress,n=e.from,r=e.to,a=n.getNumber()+(r.getNumber()-n.getNumber())*i;return"%"===t&&(a*=100),"".concat(a).concat(t)}},{key:"update",value:function(t){var e=this.parent,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.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,i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=i.getString();return!1}this.duration+=t;var r=!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,")")}i.setValue(a),r=!0}return r}},{key:"getProgress",value:function(){var t=this.document,e=this.values,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=i.progress*(e.getValue().length-1),r=Math.floor(n),a=Math.ceil(n);i.from=new K(t,"from",parseFloat(e.getValue()[r])),i.to=new K(t,"to",parseFloat(e.getValue()[a])),i.progress=(n-r)/(a-r)}else i.from=this.from,i.to=this.to;return i}}]),i}(pt),Wt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="animateColor",t}return(0,f.Z)(i,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,i=t.from,n=t.to,r=new k(i.getColor()),a=new k(n.getColor());if(r.ok&&a.ok){var s=r.r+(a.r-r.r)*e,o=r.g+(a.g-r.g)*e,u=r.b+(a.b-r.b)*e;return"rgb(".concat(Math.floor(s),", ").concat(Math.floor(o),", ").concat(Math.floor(u),")")}return this.getAttribute("from").getColor()}}]),i}(Ht),qt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="animateTransform",t}return(0,f.Z)(i,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,i=t.from,n=t.to,r=T(i.getString()),a=T(n.getString()),s=r.map((function(t,i){return t+(a[i]-t)*e})).join(" ");return s}}]),i}(Ht),Gt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,s){var o;(0,c.Z)(this,i),(o=e.call(this,t,n,s)).type="font",o.glyphs={},o.horizAdvX=o.getAttribute("horiz-adv-x").getNumber();var u,h=t.definitions,l=(0,a.Z)(o).children,f=(0,r.Z)(l);try{for(f.s();!(u=f.n()).done;){var g=u.value;switch(g.type){case"font-face":o.fontFace=g;var y=g.getStyle("font-family");y.hasValue()&&(h[y.getString()]=(0,a.Z)(o));break;case"missing-glyph":o.missingGlyph=g;break;case"glyph":var v=g;v.arabicForm?(o.isRTL=!0,o.isArabic=!0,"undefined"===typeof o.glyphs[v.unicode]&&(o.glyphs[v.unicode]={}),o.glyphs[v.unicode][v.arabicForm]=v):o.glyphs[v.unicode]=v}}}catch(d){f.e(d)}finally{f.f()}return o}return(0,f.Z)(i,[{key:"render",value:function(){}}]),i}(pt),$t=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).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(0,f.Z)(i)}(pt),Qt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return(0,f.Z)(i)}(At),Jt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="tref",t}return(0,f.Z)(i,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}]),i}(Tt),Kt=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;(0,c.Z)(this,i),(a=e.call(this,t,n,r)).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(0,f.Z)(i,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){(0,s.Z)((0,o.Z)(i.prototype),"renderChildren",this).call(this,t);var e=this.document,n=this.x,r=this.y,a=e.screen.mouse,u=new K(e,"fontSize",St.parse(e.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new wt(n,r-u.getPixels("y"),n+this.measureText(t),r))}else if(this.children.length>0){var h=new _t(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"}}]),i}(Tt);function te(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ee(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
1e%2?te(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ie=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;(0,c.Z)(this,i),(a=e.call(this,t,n,r)).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(0,f.Z)(i,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach((function(e){var i=e.type,n=e.points;switch(i){case Pt.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case Pt.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case Pt.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case Pt.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case Pt.ARC:var r=(0,g.Z)(n,8),a=r[0],s=r[1],o=r[2],u=r[3],h=r[4],l=r[5],c=r[6],f=r[7],y=o>u?o:u,v=o>u?1:o/u,d=o>u?u/o:1;t&&(t.translate(a,s),t.rotate(c),t.scale(v,d),t.arc(0,0,y,h,h+l,Boolean(1-f)),t.scale(1/v,1/d),t.rotate(-c),t.translate(-a,-s));break;case Pt.CLOSE_PATH:t&&t.closePath()}}))}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),n=this.glyphInfo,r=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach((function(n,r){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===r&&t.moveTo(a.x,a.y+i/8),t.lineTo(s.x,s.y+i/5))})),"underline"===e&&(t.lineWidth=i/20,t.strokeStyle=r,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,i,n,r,a,s,o,u){var h=a,l=this.measureText(t,o);" "===o&&"justify"===e&&i<n&&(l+=(n-i)/r),u>-1&&(h+=this.getLetterSpacingAt(u));var c=this.textHeight/20,f=this.getEquidistantPointOnPath(h,c,0),g=this.getEquidistantPointOnPath(h+l,c,0),y={p0:f,p1:g},v=f&&g?Math.atan2(g.y-f.y,g.x-f.x):0;if(s){var d=Math.cos(Math.PI/2+v)*s,p=Math.cos(-v)*s;y.p0=ee(ee({},f),{},{x:f.x+d,y:f.y+p}),y.p1=ee(ee({},g),{},{x:g.x+d,y:g.y+p})}return{offset:h+=l,segment:y,rotation:v}}},{key:"measureText",value:function(t,e){var i=this.measuresCache,n=e||this.getText();if(i.has(n))return i.get(n);var r=this.measureTargetText(t,n);return i.set(n,r),r}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var i=this.getText(),n=i.split(""),r=i.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"),l=0;u.hasValue()&&"inherit"!==u.getValue()?u.hasValue()&&"initial"!==u.getValue()&&"unset"!==u.getValue()&&(l=u.getPixels()):l=h.getPixels();var c=[],f=i.length;this.letterSpacingCache=c;for(var g=0;g<f;g++)c.push("undefined"!==typeof a[g]?a[g]:l);var y=c.reduce((function(t,e,i){return 0===i?0:t+e||0}),0),v=this.measureText(t),d=Math.max(v+y,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var p=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*p,x=0;"middle"!==o&&"center"!==o||(x=-d/2),"end"!==o&&"right"!==o||(x=-d),x+=m,n.forEach((function(i,a){var u=e.findSegmentToFitChar(t,o,d,p,r,x,s,i,a),h=u.offset,l=u.segment,c=u.rotation;x=h,l.p0&&l.p1&&e.glyphInfo.push({text:n[a],p0:l.p0,p1:l.p1,rotation:c})}))}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var e=[],i=t.pathParser;for(i.reset();!i.isEnd();){var n=i.current,r=n?n.x:0,a=n?n.y:0,s=i.next(),o=s.type,u=[];switch(s.type){case Pt.MOVE_TO:this.pathM(i,u);break;case Pt.LINE_TO:o=this.pathL(i,u);break;case Pt.HORIZ_LINE_TO:o=this.pathH(i,u);break;case Pt.VERT_LINE_TO:o=this.pathV(i,u);break;case Pt.CURVE_TO:this.pathC(i,u);break;case Pt.SMOOTH_CURVE_TO:o=this.pathS(i,u);break;case Pt.QUAD_TO:this.pathQ(i,u);break;case Pt.SMOOTH_QUAD_TO:o=this.pathT(i,u);break;case Pt.ARC:u=this.pathA(i);break;case Pt.CLOSE_PATH:At.pathZ(i)}s.type!==Pt.CLOSE_PATH?e.push({type:o,points:u,start:{x:r,y:a},pathLength:this.calcLength(r,a,o,u)}):e.push({type:Pt.CLOSE_PATH,points:[],pathLength:0})}return e}}
1,{key:"pathM",value:function(t,e){var i=At.pathM(t).point,n=i.x,r=i.y;e.push(n,r)}},{key:"pathL",value:function(t,e){var i=At.pathL(t).point,n=i.x,r=i.y;return e.push(n,r),Pt.LINE_TO}},{key:"pathH",value:function(t,e){var i=At.pathH(t).point,n=i.x,r=i.y;return e.push(n,r),Pt.LINE_TO}},{key:"pathV",value:function(t,e){var i=At.pathV(t).point,n=i.x,r=i.y;return e.push(n,r),Pt.LINE_TO}},{key:"pathC",value:function(t,e){var i=At.pathC(t),n=i.point,r=i.controlPoint,a=i.currentPoint;e.push(n.x,n.y,r.x,r.y,a.x,a.y)}},{key:"pathS",value:function(t,e){var i=At.pathS(t),n=i.point,r=i.controlPoint,a=i.currentPoint;return e.push(n.x,n.y,r.x,r.y,a.x,a.y),Pt.CURVE_TO}},{key:"pathQ",value:function(t,e){var i=At.pathQ(t),n=i.controlPoint,r=i.currentPoint;e.push(n.x,n.y,r.x,r.y)}},{key:"pathT",value:function(t,e){var i=At.pathT(t),n=i.controlPoint,r=i.currentPoint;return e.push(n.x,n.y,r.x,r.y),Pt.QUAD_TO}},{key:"pathA",value:function(t){var e=At.pathA(t),i=e.rX,n=e.rY,r=e.sweepFlag,a=e.xAxisRotation,s=e.centp,o=e.a1,u=e.ad;return 0===r&&u>0&&(u-=2*Math.PI),1===r&&u<0&&(u+=2*Math.PI),[s.x,s.y,i,n,o,u,a,r]}},{key:"calcLength",value:function(t,e,i,n){var r=0,a=null,s=null,o=0;switch(i){case Pt.LINE_TO:return this.getLineLength(t,e,n[0],n[1]);case Pt.CURVE_TO:for(r=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]),r+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return r;case Pt.QUAD_TO:for(r=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]),r+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return r;case Pt.ARC:r=0;var u=n[4],h=n[5],l=n[4]+h,c=Math.PI/180;if(Math.abs(u-l)<c&&(c=Math.abs(u-l)),a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),h<0)for(o=u-c;o>l;o-=c)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),r+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(o=u+c;o<l;o+=c)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),r+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),r+=this.getLineLength(a.x,a.y,s.x,s.y)}return 0}},{key:"getPointOnLine",value:function(t,e,i,n,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i,o=(r-i)/(n-e+X),u=Math.sqrt(t*t/(1+o*o));n<e&&(u*=-1);var h=o*u,l=null;if(n===e)l={x:a,y:s+h};else if((s-i)/(a-e+X)===o)l={x:a+u,y:s+h};else{var c,f,g=this.getLineLength(e,i,n,r);if(g<X)return null;var y=(a-e)*(n-e)+(s-i)*(r-i);c=e+(y/=g*g)*(n-e),f=i+y*(r-i);var v=this.getLineLength(a,s,c,f),d=Math.sqrt(t*t-v*v);u=Math.sqrt(d*d/(1+o*o)),n<e&&(u*=-1),l={x:c+u,y:f+(h=o*u)}}return l}},{key:"getPointOnPath",value:function(t){var e=this.getPathLength(),i=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var a,s=this.dataArray,o=(0,r.Z)(s);try{for(o.s();!(a=o.n()).done;){var u=a.value;if(!u||!(u.pathLength<5e-5||i+u.pathLength+5e-5<t)){var h=t-i,l=0;switch(u.type){case Pt.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 Pt.ARC:var c=u.points[4],f=u.points[5],g=u.points[4]+f;if(l=c+h/u.pathLength*f,f<0&&l<g||f>=0&&l>g)break;n=this.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],l,u.points[6]);break;case Pt.CURVE_TO:(l=h/u.pathLength)>1&&(l=1),n=this.getPointOnCubicBezier(l,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 Pt.QUAD_TO:(l=h/u.pathLength)>1&&(l=1),n=this.getPointOnQuadraticBezier(l,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3])}if(n)return n;break}i+=u.pathLength}}catch(y){o.e(y)}finally{o.f()}return null}},{key:"getLineLength",value:function(t,e,i,n){return Math.sqrt((i-t)*(i-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,i,n,r,a,s,o,u){return{x:o*H(t)+a*W(t)+n*q(t)+e*G(t),y:u*H(t)+s*W(t)+r*q(t)+i*G(t)}}}
1,{key:"getPointOnQuadraticBezier",value:function(t,e,i,n,r,a,s){return{x:a*$(t)+n*Q(t)+e*J(t),y:s*$(t)+r*Q(t)+i*J(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,i,n,r,a){var s=Math.cos(a),o=Math.sin(a),u=i*Math.cos(r),h=n*Math.sin(r);return{x:t+(u*s-h*o),y:e+(u*o+h*s)}}},{key:"buildEquidistantCache",value:function(t,e){var i=this.getPathLength(),n=e||.25,r=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==r||this.equidistantCache.precision!==n){this.equidistantCache={step:r,precision:n,points:[]};for(var a=0,s=0;s<=i;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))>=r&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:s}),a-=r))}}}},{key:"getEquidistantPointOnPath",value:function(t,e,i){if(this.buildEquidistantCache(e,i),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}}]),i}(Tt),ne=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,re=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,r,s){var o;(0,c.Z)(this,i),(o=e.call(this,t,r,s)).type="image",o.loaded=!1;var u=o.getHrefAttribute().getString();if(!u)return(0,n.Z)(o);var h=u.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(u);return t.images.push((0,a.Z)(o)),h?o.loadSvg(u):o.loadImage(u),o.isSvg=h,o}return(0,f.Z)(i,[{key:"loadImage",value:function(t){var e=this;return d((0,y.Z)().mark((function i(){var n;return(0,y.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,e.document.createImage(t);case 3:n=i.sent,e.image=n,i.next=10;break;case 7:i.prev=7,i.t0=i.catch(0),console.error('Error while loading image "'.concat(t,'":'),i.t0);case 10:e.loaded=!0;case 11:case"end":return i.stop()}}),i,null,[[0,7]])})))()}},{key:"loadSvg",value:function(t){var e=this;return d((0,y.Z)().mark((function i(){var n,r,a,s;return(0,y.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!(n=ne.exec(t))){i.next=6;break}r=n[5],"base64"===n[4]?e.image=atob(r):e.image=decodeURIComponent(r),i.next=19;break;case 6:return i.prev=6,i.next=9,e.document.fetch(t);case 9:return a=i.sent,i.next=12,a.text();case 12:s=i.sent,e.image=s,i.next=19;break;case 16:i.prev=16,i.t0=i.catch(6),console.error('Error while loading image "'.concat(t,'":'),i.t0);case 19:e.loaded=!0;case 20:case"end":return i.stop()}}),i,null,[[6,16]])})))()}},{key:"renderChildren",value:function(t){var e=this.document,i=this.image,n=this.loaded,r=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&&i&&s&&o){if(t.save(),t.translate(r,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"),i=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new wt(t,e,t+i,e+n)}}]),i}(Zt),ae=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="symbol",t}return(0,f.Z)(i,[{key:"render",value:function(t){}}]),i}(Zt),se=function(){function t(e){(0,c.Z)(this,t),this.document=e,this.loaded=!1,e.fonts.push(this)}return(0,f.Z)(t,[{key:"load",value:function(t,e){var i=this;return d((0,y.Z)().mark((function n(){var r,a,s;return(0,y.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=i.document,n.next=4,r.canvg.parser.load(e);case 4:a=n.sent,s=a.getElementsByTagName("font"),Array.from(s).forEach((function(e){var i=r.createElement(e);r.definitions[t]=i})),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:i.loaded=!0;case 13:case"end":return n.stop()}}),n,null,[[0,9]])})))()}}]),t}(),oe=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="style",Z(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 i=e.trim();if(i){var n=i.split("{"),r=n[0].split(","),a=n[1].split(";");r.forEach((function(e){var i=e.trim();if(i){var n=t.styles[i]||{};
1if(a.forEach((function(e){var i=e.indexOf(":"),r=e.substr(0,i).trim(),a=e.substr(i+1,e.length-i).trim();r&&a&&(n[r]=new K(t,r,a))})),t.styles[i]=n,t.stylesSpecificity[i]=_(i),"@font-face"===i){var r=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach((function(e){if(e.indexOf('format("svg")')>0){var i=M(e);i&&new se(t).load(r,i)}}))}}}))}})),a}return(0,f.Z)(i)}(pt);oe.parseExternalUrl=M;var ue=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="use",t}return(0,f.Z)(i,[{key:"setContext",value:function(t){(0,s.Z)((0,o.Z)(i.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,i=this.element;if(i){var n=i;if("symbol"===i.type&&((n=new Mt(e,null)).attributes.viewBox=new K(e,"viewBox",i.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new K(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new K(e,"overflow",i.getAttribute("overflow").getString()),n.children=i.children,i.styles.opacity=new K(e,"opacity",this.calculateOpacity())),"svg"===n.type){var r=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);r.hasValue()&&(n.attributes.width=new K(e,"width",r.getString())),a.hasValue()&&(n.attributes.height=new K(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 dt.fromElement(t,e)}},{key:"element",get:function(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}]),i}(Zt);function he(t,e,i,n,r,a){return t[i*n*4+4*e+a]}function le(t,e,i,n,r,a,s){t[i*n*4+4*e+a]=s}function ce(t,e,i){return t[e]*i}function fe(t,e,i,n){return e+Math.cos(t)*i+Math.sin(t)*n}var ge=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="feColorMatrix";var s=T(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=[fe(u,.213,.787,-.213),fe(u,.715,-.715,-.715),fe(u,.072,-.072,.928),0,0,fe(u,.213,-.213,.143),fe(u,.715,.285,.14),fe(u,.072,-.072,-.283),0,0,fe(u,.213,-.213,-.787),fe(u,.715,-.715,.715),fe(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(0,f.Z)(i,[{key:"apply",value:function(t,e,i,n,r){for(var a=this.includeOpacity,s=this.matrix,o=t.getImageData(0,0,n,r),u=0;u<r;u++)for(var h=0;h<n;h++){var l=he(o.data,h,u,n,0,0),c=he(o.data,h,u,n,0,1),f=he(o.data,h,u,n,0,2),g=he(o.data,h,u,n,0,3),y=ce(s,0,l)+ce(s,1,c)+ce(s,2,f)+ce(s,3,g)+ce(s,4,1),v=ce(s,5,l)+ce(s,6,c)+ce(s,7,f)+ce(s,8,g)+ce(s,9,1),d=ce(s,10,l)+ce(s,11,c)+ce(s,12,f)+ce(s,13,g)+ce(s,14,1),p=ce(s,15,l)+ce(s,16,c)+ce(s,17,f)+ce(s,18,g)+ce(s,19,1);a&&(y=0,v=0,d=0,p*=g/255),le(o.data,h,u,n,0,0,y),le(o.data,h,u,n,0,1,v),le(o.data,h,u,n,0,2,d),le(o.data,h,u,n,0,3,p)}t.clearRect(0,0,n,r),t.putImageData(o,0,0)}}]),i}(pt),ye=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="mask",t}return(0,f.Z)(i,[{key:"apply",value:function(t,e){var n=this.document,r=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 wt;this.children.forEach((function(e){u.addBoundingBox(e.getBoundingBox(t))})),r=Math.floor(u.x1),a=Math.floor(u.y1),s=Math.floor(u.width),o=Math.floor(u.height)}var h=this.removeStyles(e,i.ignoreStyles),l=n.createCanvas(r+s,a+o),c=l.getContext("2d");n.screen.setDefaults(c),this.renderChildren(c),new ge(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,r+s,a+o);var f=n.createCanvas(r+s,a+o),g=f.getContext("2d");n.screen.setDefaults(g),e.render(g),g.globalCompositeOperation="destination-in",g.fillStyle=c.createPattern(l,"no-repeat"),g.fillRect(0,0,r+s,a+o),t.fillStyle=g.createPattern(f,"no-repeat"),t.fillRect(0,0,r+s,a+o),this.restoreStyles(e,h)}},{key:"render",value:function(t){}}
1]),i}(pt);ye.ignoreStyles=["mask","transform","clip-path"];var ve=function(){},de=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="clipPath",t}return(0,f.Z)(i,[{key:"apply",value:function(t){var e=this.document,i=Reflect.getPrototypeOf(t),n=t.beginPath,r=t.closePath;i&&(i.beginPath=ve,i.closePath=ve),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=dt.fromElement(e,n)),a&&a.apply(t),n.path(t),i&&(i.closePath=r),a&&a.unapply(t)}})),Reflect.apply(r,t,[]),t.clip(),i&&(i.beginPath=n,i.closePath=r)}},{key:"render",value:function(t){}}]),i}(pt),pe=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="filter",t}return(0,f.Z)(i,[{key:"apply",value:function(t,e){var n=this.document,r=this.children,a=e.getBoundingBox(t);if(a){var s=0,o=0;r.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),l=u+2*s,c=h+2*o;if(!(l<1||c<1)){var f=Math.floor(a.x),g=Math.floor(a.y),y=this.removeStyles(e,i.ignoreStyles),v=n.createCanvas(l,c),d=v.getContext("2d");n.screen.setDefaults(d),d.translate(-f+s,-g+o),e.render(d),r.forEach((function(t){"function"===typeof t.apply&&t.apply(d,0,0,l,c)})),t.drawImage(v,0,0,l,c,f-s,g-o,l,c),this.restoreStyles(e,y)}}}},{key:"render",value:function(t){}}]),i}(pt);pe.ignoreStyles=["filter","transform","clip-path"];var me=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return(0,f.Z)(i,[{key:"apply",value:function(t,e,i,n,r){}}]),i}(pt),xe=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="feMorphology",t}return(0,f.Z)(i,[{key:"apply",value:function(t,e,i,n,r){}}]),i}(pt),be=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="feComposite",t}return(0,f.Z)(i,[{key:"apply",value:function(t,e,i,n,r){}}]),i}(pt),ke=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(t,n,r){var a;return(0,c.Z)(this,i),(a=e.call(this,t,n,r)).type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return(0,f.Z)(i,[{key:"apply",value:function(t,e,i,n,r){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)),(0,w.vR)(u,e,i,n,r,s),o&&o.removeChild(u)}}]),i}(pt),Se=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="title",t}return(0,f.Z)(i)}(pt),we=function(t){(0,h.Z)(i,t);var e=(0,l.Z)(i);function i(){var t;return(0,c.Z)(this,i),(t=e.apply(this,arguments)).type="desc",t}return(0,f.Z)(i)}(pt),Pe={svg:Mt,rect:Ot,circle:Nt,ellipse:Dt,line:Bt,polyline:zt,polygon:Lt,path:At,pattern:It,marker:Rt,defs:Ft,linearGradient:jt,radialGradient:Ut,stop:Yt,animate:Ht,animateColor:Wt,animateTransform:qt,font:Gt,"font-face":$t,"missing-glyph":Qt,glyph:Ct,text:Tt,tspan:Vt,tref:Jt,a:Kt,textPath:ie,image:re,g:_t,symbol:ae,style:oe,use:ue,mask:ye,clipPath:de,filter:pe,feDropShadow:me,feMorphology:xe,feComposite:be,feColorMatrix:ge,feGaussianBlur:ke,title:Se,desc:we};function Ze(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ae(){return Ae=d((0,y.Z)().mark((function t(e){var i,n,r=arguments;return(0,y.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.length>1&&void 0!==r[1]&&r[1],n=document.createElement("img"),i&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise((function(t,i){n.onload=function(){t(n)},n.onerror=function(t,e,n,r,a){i(a)},n.src=e})));case 4:case"end":return t.stop()}}),t)}))),Ae.apply(this,arguments)}var Ce=function(){function t(e){(0,c.Z)(this,t);var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.rootEmSize,r=void 0===n?12:n,a=i.emSize,s=void 0===a?12:a,o=i.createCanvas,u=void 0===o?t.createCanvas:o,h=i.createImage,l=void 0===h?t.createImage:h,f=i.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=r,this.emSize=s,this.createCanvas=u,this.createImage=this.bindCreateImage(l,f),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return(0,f.Z)(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"===typeof e?function(i,n){return t(i,"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 i=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[i];return"undefined"!==typeof n?new n(this,e):new mt(this,e)}},{key:"createTextNode",value:function(t){return new Et(this,t)}}
1,{key:"setViewBox",value:function(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ze(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ze(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({document:this},t))}}]),t}();function Te(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ve(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}Ce.createCanvas=function(t,e){var i=document.createElement("canvas");return i.width=t,i.height=e,i},Ce.createImage=function(t){return Ae.apply(this,arguments)},Ce.elementTypes=Pe;var Ee=function(){function t(e,i){(0,c.Z)(this,t);var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new ut(n),this.screen=new at(e,n),this.options=n;var r=new Ce(this,n),a=r.createDocumentElement(i);this.document=r,this.documentElement=a}return(0,f.Z)(t,[{key:"fork",value:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,i,Ve(Ve({},this.options),n))}},{key:"forkString",value:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,i,Ve(Ve({},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 d((0,y.Z)().mark((function i(){var n;return(0,y.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:{},e.start(Ve({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),i.next=4,e.ready();case 4:e.stop();case 5:case"end":return i.stop()}}),i)})))()}},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,i=this.screen,n=this.options;i.start(e,Ve(Ve({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,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,i)}}],[{key:"from",value:function(e,i){var n=arguments;return d((0,y.Z)().mark((function r(){var a,s,o;return(0,y.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=new ut(a=n.length>2&&void 0!==n[2]?n[2]:{}),r.next=4,s.parse(i);case 4:return o=r.sent,r.abrupt("return",new t(e,o,a));case 6:case"end":return r.stop()}}),r)})))()}},{key:"fromString",value:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new t(e,new ut(n).parseFromString(i),n)}}]),t}()}}]);
2//# sourceMappingURL=907.192c02cb.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.