File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/index.es.606f11af.js
Back
import{w as Xe,Z as Cr,Y as qa,u as ea,a as Qa,$ as Za,V as bt,S as ta,a0 as Tr,k as $e,e as ra,N as xt,p as Ct,a1 as Ka,I as Ja,a2 as en,a3 as wr,a4 as tn,M as ia,P as rn,a5 as an,a6 as nn,A as sn,a7 as Tt,_ as Z,d as Er,O as on,U as hn,C as un,v as Ye,R as ln,b as Sr,T as fn,Q as aa,G as cn,a8 as Or,a9 as na,aa as Ar,r as We,ab as wt,f as Nr,ac as vn,ad as gn,ae as dn,af as pn,ag as mn,X as sa,q as yn,s as bn,ah as xn,j as Cn,i as Tn,ai as wn,aj as En}from"./es.string.replace.f897d4b0.js";import{_ as or}from"./jspdf.es.min.763284f3.js";import{x as oa,y as ha}from"./index.3a33b88d.js";var Sn=Cr,On=qa,An=Xe,Nn=ea,Qr=An("species"),Pn=function(n){var e=Sn(n);Nn&&e&&!e[Qr]&&On(e,Qr,{configurable:!0,get:function(){return this}})},Mn=Qa,Rn=Za,In=TypeError,Vn=function(n){if(Mn(n))return n;throw new In(Rn(n)+" is not a constructor")},Zr=bt,kn=Vn,$n=ta,_n=Xe,Dn=_n("species"),ua=function(n,e){var t=Zr(n).constructor,r;return t===void 0||$n(r=Zr(t)[Dn])?e:kn(r)},Ln=TypeError,Bn=function(n,e){if(n<e)throw new Ln("Not enough arguments");return n},Un=Tr,la=/(?:ipad|iphone|ipod).*applewebkit/i.test(Un),q=$e,Fn=tn,zn=ra,Kr=xt,Hn=ia,fa=Ct,Jr=Ka,jn=Ja,ei=en,Xn=Bn,Yn=la,Wn=wr,hr=q.setImmediate,ur=q.clearImmediate,Gn=q.process,Ht=q.Dispatch,qn=q.Function,ti=q.MessageChannel,Qn=q.String,jt=0,Fe={},ri="onreadystatechange",He,pe,Xt,Yt;fa(function(){He=q.location});var Pr=function(n){if(Hn(Fe,n)){var e=Fe[n];delete Fe[n],e()}},Wt=function(n){return function(){Pr(n)}},ii=function(n){Pr(n.data)},ai=function(n){q.postMessage(Qn(n),He.protocol+"//"+He.host)};(!hr||!ur)&&(hr=function(e){Xn(arguments.length,1);var t=Kr(e)?e:qn(e),r=jn(arguments,1);return Fe[++jt]=function(){Fn(t,void 0,r)},pe(jt),jt},ur=function(e){delete Fe[e]},Wn?pe=function(n){Gn.nextTick(Wt(n))}:Ht&&Ht.now?pe=function(n){Ht.now(Wt(n))}:ti&&!Yn?(Xt=new ti,Yt=Xt.port2,Xt.port1.onmessage=ii,pe=zn(Yt.postMessage,Yt)):q.addEventListener&&Kr(q.postMessage)&&!q.importScripts&&He&&He.protocol!=="file:"&&!fa(ai)?(pe=ai,q.addEventListener("message",ii,!1)):ri in ei("script")?pe=function(n){Jr.appendChild(ei("script"))[ri]=function(){Jr.removeChild(this),Pr(n)}}:pe=function(n){setTimeout(Wt(n),0)});var ca={set:hr,clear:ur},ni=$e,Zn=ea,Kn=Object.getOwnPropertyDescriptor,Jn=function(n){if(!Zn)return ni[n];var e=Kn(ni,n);return e&&e.value},va=function(){this.head=null,this.tail=null};va.prototype={add:function(n){var e={item:n,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var n=this.head;if(n){var e=this.head=n.next;return e===null&&(this.tail=null),n.item}}};var ga=va,es=Tr,ts=/ipad|iphone|ipod/i.test(es)&&typeof Pebble<"u",rs=Tr,is=/web0s(?!.*chrome)/i.test(rs),Ie=$e,as=Jn,si=ra,Gt=ca.set,ns=ga,ss=la,os=ts,hs=is,qt=wr,oi=Ie.MutationObserver||Ie.WebKitMutationObserver,hi=Ie.document,ui=Ie.process,nt=Ie.Promise,lr=as("queueMicrotask"),Se,Qt,Zt,st,li;if(!lr){var ot=new ns,ht=function(){var n,e;for(qt&&(n=ui.domain)&&n.exit();e=ot.get();)try{e()}catch(t){throw ot.head&&Se(),t}n&&n.enter()};!ss&&!qt&&!hs&&oi&&hi?(Qt=!0,Zt=hi.createTextNode(""),new oi(ht).observe(Zt,{characterData:!0}),Se=function(){Zt.data=Qt=!Qt}):!os&&nt&&nt.resolve?(st=nt.resolve(void 0),st.constructor=nt,li=si(st.then,st),Se=function(){li(ht)}):qt?Se=function(){ui.nextTick(ht)}:(Gt=si(Gt,Ie),Se=function(){Gt(ht)}),lr=function(n){ot.head||Se(),ot.add(n)}}var us=lr,ls=function(n,e){try{arguments.length===1?console.error(n):console.error(n,e)}catch{}},Mr=function(n){try{return{error:!1,value:n()}}catch(e){return{error:!0,value:e}}},fs=$e,Et=fs.Promise,cs=$e,ze=Et,vs=xt,gs=rn,ds=an,ps=Xe,fi=nn,Kt=sn;ze&&ze.prototype;var ms=ps("species"),fr=!1,da=vs(cs.PromiseRejectionEvent),ys=gs("Promise",function(){var n=ds(ze),e=n!==String(ze);if(!e&&Kt===66)return!0;if(!Kt||Kt<51||!/native code/.test(n)){var t=new ze(function(a){a(1)}),r=function(a){a(function(){},function(){})},i=t.constructor={};if(i[ms]=r,fr=t.then(function(){})instanceof r,!fr)return!0}return!e&&(fi==="BROWSER"||fi==="DENO")&&!da}),Ge={CONSTRUCTOR:ys,REJECTION_EVENT:da,SUBCLASSING:fr},_e={},ci=Tt,bs=TypeError,xs=function(n){var e,t;this.promise=new n(function(r,i){if(e!==void 0||t!==void 0)throw new bs("Bad Promise constructor");e=r,t=i}),this.resolve=ci(e),this.reject=ci(t)};_e.f=function(n){return new xs(n)};var Cs=Z,mt=wr,le=$e,Ve=Ye,vi=Er,gi=on,Ts=hn,ws=Pn,Es=Tt,dt=xt,Ss=Sr,Os=ln,As=ua,pa=ca.set,Rr=us,Ns=ls,Ps=Mr,Ms=ga,ma=un,yt=Et,Ir=Ge,ya=_e,St="Promise",ba=Ir.CONSTRUCTOR,Rs=Ir.REJECTION_EVENT,Is=Ir.SUBCLASSING,Jt=ma.getterFor(St),Vs=ma.set,Ae=yt&&yt.prototype,xe=yt,ut=Ae,xa=le.TypeError,cr=le.document,Vr=le.process,vr=ya.f,ks=vr,$s=!!(cr&&cr.createEvent&&le.dispatchEvent),Ca="unhandledrejection",_s="rejectionhandled",di=0,Ta=1,Ds=2,kr=1,wa=2,lt,pi,Ls,mi,Ea=function(n){var e;return Ss(n)&&dt(e=n.then)?e:!1},Sa=function(n,e){var t=e.value,r=e.state===Ta,i=r?n.ok:n.fail,a=n.resolve,o=n.reject,s=n.domain,h,u,l;try{i?(r||(e.rejection===wa&&Us(e),e.rejection=kr),i===!0?h=t:(s&&s.enter(),h=i(t),s&&(s.exit(),l=!0)),h===n.promise?o(new xa("Promise-chain cycle")):(u=Ea(h))?Ve(u,h,a,o):a(h)):o(t)}catch(c){s&&!l&&s.exit(),o(c)}},Oa=function(n,e){n.notified||(n.notified=!0,Rr(function(){for(var t=n.reactions,r;r=t.get();)Sa(r,n);n.notified=!1,e&&!n.rejection&&Bs(n)}))},Aa=function(n,e,t){var r,i;$s?(r=cr.createEvent("Event"),r.promise=e,r.reason=t,r.initEvent(n,!1,!0),le.dispatchEvent(r)):r={promise:e,reason:t},!Rs&&(i=le["on"+n])?i(r):n===Ca&&Ns("Unhandled promise rejection",t)},Bs=function(n){Ve(pa,le,function(){var e=n.facade,t=n.value,r=yi(n),i;if(r&&(i=Ps(function(){mt?Vr.emit("unhandledRejection",t,e):Aa(Ca,e,t)}),n.rejection=mt||yi(n)?wa:kr,i.error))throw i.value})},yi=function(n){return n.rejection!==kr&&!n.parent},Us=function(n){Ve(pa,le,function(){var e=n.facade;mt?Vr.emit("rejectionHandled",e):Aa(_s,e,n.value)})},Ne=function(n,e,t){return function(r){n(e,r,t)}},Pe=function(n,e,t){n.done||(n.done=!0,t&&(n=t),n.value=e,n.state=Ds,Oa(n,!0))},gr=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw new xa("Promise can't be resolved itself");var r=Ea(e);r?Rr(function(){var i={done:!1};try{Ve(r,e,Ne(gr,i,n),Ne(Pe,i,n))}catch(a){Pe(i,a,n)}}):(n.value=e,n.state=Ta,Oa(n,!1))}catch(i){Pe({done:!1},i,n)}}};if(ba&&(xe=function(e){Os(this,ut),Es(e),Ve(lt,this);var t=Jt(this);try{e(Ne(gr,t),Ne(Pe,t))}catch(r){Pe(t,r)}},ut=xe.prototype,lt=function(e){Vs(this,{type:St,done:!1,notified:!1,parent:!1,reactions:new Ms,rejection:!1,state:di,value:null})},lt.prototype=vi(ut,"then",function(e,t){var r=Jt(this),i=vr(As(this,xe));return r.parent=!0,i.ok=dt(e)?e:!0,i.fail=dt(t)&&t,i.domain=mt?Vr.domain:void 0,r.state===di?r.reactions.add(i):Rr(function(){Sa(i,r)}),i.promise}),pi=function(){var n=new lt,e=Jt(n);this.promise=n,this.resolve=Ne(gr,e),this.reject=Ne(Pe,e)},ya.f=vr=function(n){return n===xe||n===Ls?new pi(n):ks(n)},dt(yt)&&Ae!==Object.prototype)){mi=Ae.then,Is||vi(Ae,"then",function(e,t){var r=this;return new xe(function(i,a){Ve(mi,r,i,a)}).then(e,t)},{unsafe:!0});try{delete Ae.constructor}catch{}gi&&gi(Ae,ut)}Cs({global:!0,constructor:!0,wrap:!0,forced:ba},{Promise:xe});Ts(xe,St,!1);ws(St);var Fs=Et,zs=fn,Hs=Ge.CONSTRUCTOR,Na=Hs||!zs(function(n){Fs.all(n).then(void 0,function(){})}),js=Z,Xs=Ye,Ys=Tt,Ws=_e,Gs=Mr,qs=aa,Qs=Na;js({target:"Promise",stat:!0,forced:Qs},{all:function(e){var t=this,r=Ws.f(t),i=r.resolve,a=r.reject,o=Gs(function(){var s=Ys(t.resolve),h=[],u=0,l=1;qs(e,function(c){var v=u++,f=!1;l++,Xs(s,t,c).then(function(d){f||(f=!0,h[v]=d,--l||i(h))},a)}),--l||i(h)});return o.error&&a(o.value),r.promise}});var Zs=Z,Ks=Ge.CONSTRUCTOR,dr=Et,Js=Cr,eo=xt,to=Er,bi=dr&&dr.prototype;Zs({target:"Promise",proto:!0,forced:Ks,real:!0},{catch:function(n){return this.then(void 0,n)}});if(eo(dr)){var xi=Js("Promise").prototype.catch;bi.catch!==xi&&to(bi,"catch",xi,{unsafe:!0})}var ro=Z,io=Ye,ao=Tt,no=_e,so=Mr,oo=aa,ho=Na;ro({target:"Promise",stat:!0,forced:ho},{race:function(e){var t=this,r=no.f(t),i=r.reject,a=so(function(){var o=ao(t.resolve);oo(e,function(s){io(o,t,s).then(r.resolve,i)})});return a.error&&i(a.value),r.promise}});var uo=Z,lo=_e,fo=Ge.CONSTRUCTOR;uo({target:"Promise",stat:!0,forced:fo},{reject:function(e){var t=lo.f(this),r=t.reject;return r(e),t.promise}});var co=bt,vo=Sr,go=_e,po=function(n,e){if(co(n),vo(e)&&e.constructor===n)return e;var t=go.f(n),r=t.resolve;return r(e),t.promise},mo=Z,yo=Cr,bo=Ge.CONSTRUCTOR,xo=po;yo("Promise");mo({target:"Promise",stat:!0,forced:bo},{resolve:function(e){return xo(this,e)}});function Ci(n,e,t,r,i,a,o){try{var s=n[a](o),h=s.value}catch(u){return void t(u)}s.done?e(h):Promise.resolve(h).then(r,i)}function se(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var a=n.apply(e,t);function o(h){Ci(a,r,i,o,s,"next",h)}function s(h){Ci(a,r,i,o,s,"throw",h)}o(void 0)})}}var Co=Sr,To=cn,wo=Xe,Eo=wo("match"),So=function(n){var e;return Co(n)&&((e=n[Eo])!==void 0?!!e:To(n)==="RegExp")},Oo=So,Ao=TypeError,$r=function(n){if(Oo(n))throw new Ao("The method doesn't accept regular expressions");return n},No=Xe,Po=No("match"),_r=function(n){var e=/./;try{"/./"[n](e)}catch{try{return e[Po]=!1,"/./"[n](e)}catch{}}return!1},Mo=Z,Ro=Or,Io=na.f,Vo=Ar,Ti=We,ko=$r,$o=wt,_o=_r,Do=Ro("".slice),Lo=Math.min,Pa=_o("startsWith"),Bo=!Pa&&!!function(){var n=Io(String.prototype,"startsWith");return n&&!n.writable}();Mo({target:"String",proto:!0,forced:!Bo&&!Pa},{startsWith:function(e){var t=Ti($o(this));ko(e);var r=Vo(Lo(arguments.length>1?arguments[1]:void 0,t.length)),i=Ti(e);return Do(t,r,r+i.length)===i}});function Uo(n,e){if(or(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(or(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Fo(n){var e=Uo(n,"string");return or(e)=="symbol"?e:e+""}function Dr(n,e,t){return(e=Fo(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var zo=Z,Ho=Or,jo=na.f,Xo=Ar,wi=We,Yo=$r,Wo=wt,Go=_r,qo=Ho("".slice),Qo=Math.min,Ma=Go("endsWith"),Zo=!Ma&&!!function(){var n=jo(String.prototype,"endsWith");return n&&!n.writable}();zo({target:"String",proto:!0,forced:!Zo&&!Ma},{endsWith:function(e){var t=wi(Wo(this));Yo(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,a=r===void 0?i:Qo(Xo(r),i),o=wi(e);return qo(t,a-o.length,a)===o}});var er=Ye,Ra=Nr,Ko=vn,Jo=bt,eh=ta,th=wt,rh=ua,ih=dn,ah=Ar,Ei=We,nh=pn,Si=mn,sh=gn,oh=Ct,Oe=sh.UNSUPPORTED_Y,hh=4294967295,uh=Math.min,tr=Ra([].push),rr=Ra("".slice),lh=!oh(function(){var n=/(?:)/,e=n.exec;n.exec=function(){return e.apply(this,arguments)};var t="ab".split(n);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),Oi="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;Ko("split",function(n,e,t){var r="0".split(void 0,0).length?function(i,a){return i===void 0&&a===0?[]:er(e,this,i,a)}:e;return[function(a,o){var s=th(this),h=eh(a)?void 0:nh(a,n);return h?er(h,a,s,o):er(r,Ei(s),a,o)},function(i,a){var o=Jo(this),s=Ei(i);if(!Oi){var h=t(r,o,s,a,r!==e);if(h.done)return h.value}var u=rh(o,RegExp),l=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Oe?"g":"y"),v=new u(Oe?"^(?:"+o.source+")":o,c),f=a===void 0?hh:a>>>0;if(f===0)return[];if(s.length===0)return Si(v,s)===null?[s]:[];for(var d=0,g=0,p=[];g<s.length;){v.lastIndex=Oe?0:g;var y=Si(v,Oe?rr(s,g):s),C;if(y===null||(C=uh(ah(v.lastIndex+(Oe?g:0)),s.length))===d)g=ih(s,g,l);else{if(tr(p,rr(s,d,g)),p.length===f)return p;for(var b=1;b<=y.length-1;b++)if(tr(p,y[b]),p.length===f)return p;g=d=C}}return tr(p,rr(s,d)),p}]},Oi||!lh,Oe);var Ot={exports:{}},Be={exports:{}};(function(){var n,e,t,r,i,a;typeof performance<"u"&&performance!==null&&performance.now?Be.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Be.exports=function(){return(n()-i)/1e6},e=process.hrtime,n=function(){var o;return o=e(),o[0]*1e9+o[1]},r=n(),a=process.uptime()*1e9,i=r-a):Date.now?(Be.exports=function(){return Date.now()-t},t=Date.now()):(Be.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(oa);var fh=Be.exports,ch=fh,ne=typeof window>"u"?oa:window,ft=["moz","webkit"],Me="AnimationFrame",ke=ne["request"+Me],je=ne["cancel"+Me]||ne["cancelRequest"+Me];for(var Le=0;!ke&&Le<ft.length;Le++)ke=ne[ft[Le]+"Request"+Me],je=ne[ft[Le]+"Cancel"+Me]||ne[ft[Le]+"CancelRequest"+Me];if(!ke||!je){var ir=0,Ai=0,me=[],vh=1e3/60;ke=function(n){if(me.length===0){var e=ch(),t=Math.max(0,vh-(e-ir));ir=t+e,setTimeout(function(){var r=me.slice(0);me.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(ir)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return me.push({handle:++Ai,callback:n,cancelled:!1}),Ai},je=function(n){for(var e=0;e<me.length;e++)me[e].handle===n&&(me[e].cancelled=!0)}}Ot.exports=function(n){return ke.call(ne,n)};Ot.exports.cancel=function(){je.apply(ne,arguments)};Ot.exports.polyfill=function(n){n||(n=ne),n.requestAnimationFrame=ke,n.cancelAnimationFrame=je};var gh=Ot.exports;const ar=ha(gh);var dh=sa.PROPER,ph=Ct,Ni=yn,Pi=" ",mh=function(n){return ph(function(){return!!Ni[n]()||Pi[n]()!==Pi||dh&&Ni[n].name!==n})},yh=Z,bh=bn.trim,xh=mh;yh({target:"String",proto:!0,forced:xh("trim")},{trim:function(){return bh(this)}});var Ch=function(n){this.ok=!1,this.alpha=1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};n=e[n]||n;for(var t=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3]),parseFloat(h[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(h){return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],r=0;r<t.length;r++){var i=t[r].re,a=t[r].process,o=i.exec(n);if(o){var s=a(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var h=this.r.toString(16),u=this.g.toString(16),l=this.b.toString(16);return h.length==1&&(h="0"+h),u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),"#"+h+u+l},this.getHelpXML=function(){for(var h=new Array,u=0;u<t.length;u++)for(var l=t[u].example,c=0;c<l.length;c++)h[h.length]=l[c];for(var v in e)h[h.length]=v;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var u=0;u<h.length;u++)try{var d=document.createElement("li"),g=new RGBColor(h[u]),p=document.createElement("div");p.style.cssText="margin: 3px; border: 1px solid black; background:"+g.toHex()+"; color:"+g.toHex(),p.appendChild(document.createTextNode("test"));var y=document.createTextNode(" "+h[u]+" -> "+g.toRGB()+" -> "+g.toHex());d.appendChild(p),d.appendChild(y),f.appendChild(d)}catch{}return f}};const pr=ha(Ch);var Th=Z,wh=Or,Eh=xn.indexOf,Sh=Cn,mr=wh([].indexOf),Ia=!!mr&&1/mr([1],1,-0)<0,Oh=Ia||!Sh("indexOf");Th({target:"Array",proto:!0,forced:Oh},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Ia?mr(this,e,t)||0:Eh(this,e,t)}});var Ah=Z,Nh=Nr,Ph=$r,Mh=wt,Mi=We,Rh=_r,Ih=Nh("".indexOf);Ah({target:"String",proto:!0,forced:!Rh("includes")},{includes:function(e){return!!~Ih(Mi(Mh(this)),Mi(Ph(e)),arguments.length>1?arguments[1]:void 0)}});var Vh=Z,kh=Nr,$h=Tn,_h=kh([].reverse),Ri=[1,2];Vh({target:"Array",proto:!0,forced:String(Ri)===String(Ri.reverse())},{reverse:function(){return $h(this)&&(this.length=this.length),_h(this)}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Va=function(n,e){return(Va=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(n,e)};function ka(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Va(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Dh(n){var e="";Array.isArray(n)||(n=[n]);for(var t=0;t<n.length;t++){var r=n[t];if(r.type===m.CLOSE_PATH)e+="z";else if(r.type===m.HORIZ_LINE_TO)e+=(r.relative?"h":"H")+r.x;else if(r.type===m.VERT_LINE_TO)e+=(r.relative?"v":"V")+r.y;else if(r.type===m.MOVE_TO)e+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===m.LINE_TO)e+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===m.CURVE_TO)e+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===m.SMOOTH_CURVE_TO)e+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===m.QUAD_TO)e+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===m.SMOOTH_QUAD_TO)e+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==m.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+t+".");e+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return e}function yr(n,e){var t=n[0],r=n[1];return[t*Math.cos(e)-r*Math.sin(e),t*Math.sin(e)+r*Math.cos(e)]}function ee(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=0;t<n.length;t++)if(typeof n[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof n[t]+" == typeof "+n[t]);return!0}var he=Math.PI;function nr(n,e,t){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;var r=n.rX,i=n.rY,a=n.x,o=n.y;r=Math.abs(n.rX),i=Math.abs(n.rY);var s=yr([(e-a)/2,(t-o)/2],-n.xRot/180*he),h=s[0],u=s[1],l=Math.pow(h,2)/Math.pow(r,2)+Math.pow(u,2)/Math.pow(i,2);1<l&&(r*=Math.sqrt(l),i*=Math.sqrt(l)),n.rX=r,n.rY=i;var c=Math.pow(r,2)*Math.pow(u,2)+Math.pow(i,2)*Math.pow(h,2),v=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-c)/c)),f=r*u/i*v,d=-i*h/r*v,g=yr([f,d],n.xRot/180*he);n.cX=g[0]+(e+a)/2,n.cY=g[1]+(t+o)/2,n.phi1=Math.atan2((u-d)/i,(h-f)/r),n.phi2=Math.atan2((-u-d)/i,(-h-f)/r),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*he),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*he),n.phi1*=180/he,n.phi2*=180/he}function Ii(n,e,t){ee(n,e,t);var r=n*n+e*e-t*t;if(0>r)return[];if(r===0)return[[n*t/(n*n+e*e),e*t/(n*n+e*e)]];var i=Math.sqrt(r);return[[(n*t+e*i)/(n*n+e*e),(e*t-n*i)/(n*n+e*e)],[(n*t-e*i)/(n*n+e*e),(e*t+n*i)/(n*n+e*e)]]}var L,ie=Math.PI/180;function Vi(n,e,t){return(1-t)*n+t*e}function ki(n,e,t,r){return n+Math.cos(r/180*he)*e+Math.sin(r/180*he)*t}function $i(n,e,t,r){var i=1e-6,a=e-n,o=t-e,s=3*a+3*(r-t)-6*o,h=6*(o-a),u=3*a;return Math.abs(s)<i?[-u/h]:function(l,c,v){v===void 0&&(v=1e-6);var f=l*l/4-c;if(f<-v)return[];if(f<=v)return[-l/2];var d=Math.sqrt(f);return[-l/2-d,-l/2+d]}(h/s,u/s,i)}function _i(n,e,t,r,i){var a=1-i;return n*(a*a*a)+e*(3*a*a*i)+t*(3*a*i*i)+r*(i*i*i)}(function(n){function e(){return i(function(s,h,u){return s.relative&&(s.x1!==void 0&&(s.x1+=h),s.y1!==void 0&&(s.y1+=u),s.x2!==void 0&&(s.x2+=h),s.y2!==void 0&&(s.y2+=u),s.x!==void 0&&(s.x+=h),s.y!==void 0&&(s.y+=u),s.relative=!1),s})}function t(){var s=NaN,h=NaN,u=NaN,l=NaN;return i(function(c,v,f){return c.type&m.SMOOTH_CURVE_TO&&(c.type=m.CURVE_TO,s=isNaN(s)?v:s,h=isNaN(h)?f:h,c.x1=c.relative?v-s:2*v-s,c.y1=c.relative?f-h:2*f-h),c.type&m.CURVE_TO?(s=c.relative?v+c.x2:c.x2,h=c.relative?f+c.y2:c.y2):(s=NaN,h=NaN),c.type&m.SMOOTH_QUAD_TO&&(c.type=m.QUAD_TO,u=isNaN(u)?v:u,l=isNaN(l)?f:l,c.x1=c.relative?v-u:2*v-u,c.y1=c.relative?f-l:2*f-l),c.type&m.QUAD_TO?(u=c.relative?v+c.x1:c.x1,l=c.relative?f+c.y1:c.y1):(u=NaN,l=NaN),c})}function r(){var s=NaN,h=NaN;return i(function(u,l,c){if(u.type&m.SMOOTH_QUAD_TO&&(u.type=m.QUAD_TO,s=isNaN(s)?l:s,h=isNaN(h)?c:h,u.x1=u.relative?l-s:2*l-s,u.y1=u.relative?c-h:2*c-h),u.type&m.QUAD_TO){s=u.relative?l+u.x1:u.x1,h=u.relative?c+u.y1:u.y1;var v=u.x1,f=u.y1;u.type=m.CURVE_TO,u.x1=((u.relative?0:l)+2*v)/3,u.y1=((u.relative?0:c)+2*f)/3,u.x2=(u.x+2*v)/3,u.y2=(u.y+2*f)/3}else s=NaN,h=NaN;return u})}function i(s){var h=0,u=0,l=NaN,c=NaN;return function(v){if(isNaN(l)&&!(v.type&m.MOVE_TO))throw new Error("path must start with moveto");var f=s(v,h,u,l,c);return v.type&m.CLOSE_PATH&&(h=l,u=c),v.x!==void 0&&(h=v.relative?h+v.x:v.x),v.y!==void 0&&(u=v.relative?u+v.y:v.y),v.type&m.MOVE_TO&&(l=h,c=u),f}}function a(s,h,u,l,c,v){return ee(s,h,u,l,c,v),i(function(f,d,g,p){var y=f.x1,C=f.x2,b=f.relative&&!isNaN(p),x=f.x!==void 0?f.x:b?0:d,O=f.y!==void 0?f.y:b?0:g;function S(K){return K*K}f.type&m.HORIZ_LINE_TO&&h!==0&&(f.type=m.LINE_TO,f.y=f.relative?0:g),f.type&m.VERT_LINE_TO&&u!==0&&(f.type=m.LINE_TO,f.x=f.relative?0:d),f.x!==void 0&&(f.x=f.x*s+O*u+(b?0:c)),f.y!==void 0&&(f.y=x*h+f.y*l+(b?0:v)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*u+(b?0:c)),f.y1!==void 0&&(f.y1=y*h+f.y1*l+(b?0:v)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*u+(b?0:c)),f.y2!==void 0&&(f.y2=C*h+f.y2*l+(b?0:v));var T=s*l-h*u;if(f.xRot!==void 0&&(s!==1||h!==0||u!==0||l!==1))if(T===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=m.LINE_TO;else{var A=f.xRot*Math.PI/180,I=Math.sin(A),k=Math.cos(A),_=1/S(f.rX),P=1/S(f.rY),F=S(k)*_+S(I)*P,z=2*I*k*(_-P),B=S(I)*_+S(k)*P,H=F*l*l-z*h*l+B*h*h,U=z*(s*l+h*u)-2*(F*u*l+B*s*h),j=F*u*u-z*s*u+B*s*s,M=(Math.atan2(U,H-j)+Math.PI)%Math.PI/2,V=Math.sin(M),X=Math.cos(M);f.rX=Math.abs(T)/Math.sqrt(H*S(X)+U*V*X+j*S(V)),f.rY=Math.abs(T)/Math.sqrt(H*S(V)-U*V*X+j*S(X)),f.xRot=180*M/Math.PI}return f.sweepFlag!==void 0&&0>T&&(f.sweepFlag=+!f.sweepFlag),f})}function o(){return function(s){var h={};for(var u in s)h[u]=s[u];return h}}n.ROUND=function(s){function h(u){return Math.round(u*s)/s}return s===void 0&&(s=1e13),ee(s),function(u){return u.x1!==void 0&&(u.x1=h(u.x1)),u.y1!==void 0&&(u.y1=h(u.y1)),u.x2!==void 0&&(u.x2=h(u.x2)),u.y2!==void 0&&(u.y2=h(u.y2)),u.x!==void 0&&(u.x=h(u.x)),u.y!==void 0&&(u.y=h(u.y)),u.rX!==void 0&&(u.rX=h(u.rX)),u.rY!==void 0&&(u.rY=h(u.rY)),u}},n.TO_ABS=e,n.TO_REL=function(){return i(function(s,h,u){return s.relative||(s.x1!==void 0&&(s.x1-=h),s.y1!==void 0&&(s.y1-=u),s.x2!==void 0&&(s.x2-=h),s.y2!==void 0&&(s.y2-=u),s.x!==void 0&&(s.x-=h),s.y!==void 0&&(s.y-=u),s.relative=!0),s})},n.NORMALIZE_HVZ=function(s,h,u){return s===void 0&&(s=!0),h===void 0&&(h=!0),u===void 0&&(u=!0),i(function(l,c,v,f,d){if(isNaN(f)&&!(l.type&m.MOVE_TO))throw new Error("path must start with moveto");return h&&l.type&m.HORIZ_LINE_TO&&(l.type=m.LINE_TO,l.y=l.relative?0:v),u&&l.type&m.VERT_LINE_TO&&(l.type=m.LINE_TO,l.x=l.relative?0:c),s&&l.type&m.CLOSE_PATH&&(l.type=m.LINE_TO,l.x=l.relative?f-c:f,l.y=l.relative?d-v:d),l.type&m.ARC&&(l.rX===0||l.rY===0)&&(l.type=m.LINE_TO,delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag),l})},n.NORMALIZE_ST=t,n.QT_TO_C=r,n.INFO=i,n.SANITIZE=function(s){s===void 0&&(s=0),ee(s);var h=NaN,u=NaN,l=NaN,c=NaN;return i(function(v,f,d,g,p){var y=Math.abs,C=!1,b=0,x=0;if(v.type&m.SMOOTH_CURVE_TO&&(b=isNaN(h)?0:f-h,x=isNaN(u)?0:d-u),v.type&(m.CURVE_TO|m.SMOOTH_CURVE_TO)?(h=v.relative?f+v.x2:v.x2,u=v.relative?d+v.y2:v.y2):(h=NaN,u=NaN),v.type&m.SMOOTH_QUAD_TO?(l=isNaN(l)?f:2*f-l,c=isNaN(c)?d:2*d-c):v.type&m.QUAD_TO?(l=v.relative?f+v.x1:v.x1,c=v.relative?d+v.y1:v.y2):(l=NaN,c=NaN),v.type&m.LINE_COMMANDS||v.type&m.ARC&&(v.rX===0||v.rY===0||!v.lArcFlag)||v.type&m.CURVE_TO||v.type&m.SMOOTH_CURVE_TO||v.type&m.QUAD_TO||v.type&m.SMOOTH_QUAD_TO){var O=v.x===void 0?0:v.relative?v.x:v.x-f,S=v.y===void 0?0:v.relative?v.y:v.y-d;b=isNaN(l)?v.x1===void 0?b:v.relative?v.x:v.x1-f:l-f,x=isNaN(c)?v.y1===void 0?x:v.relative?v.y:v.y1-d:c-d;var T=v.x2===void 0?0:v.relative?v.x:v.x2-f,A=v.y2===void 0?0:v.relative?v.y:v.y2-d;y(O)<=s&&y(S)<=s&&y(b)<=s&&y(x)<=s&&y(T)<=s&&y(A)<=s&&(C=!0)}return v.type&m.CLOSE_PATH&&y(f-g)<=s&&y(d-p)<=s&&(C=!0),C?[]:v})},n.MATRIX=a,n.ROTATE=function(s,h,u){h===void 0&&(h=0),u===void 0&&(u=0),ee(s,h,u);var l=Math.sin(s),c=Math.cos(s);return a(c,l,-l,c,h-h*c+u*l,u-h*l-u*c)},n.TRANSLATE=function(s,h){return h===void 0&&(h=0),ee(s,h),a(1,0,0,1,s,h)},n.SCALE=function(s,h){return h===void 0&&(h=s),ee(s,h),a(s,0,0,h,0,0)},n.SKEW_X=function(s){return ee(s),a(1,0,Math.atan(s),1,0,0)},n.SKEW_Y=function(s){return ee(s),a(1,Math.atan(s),0,1,0,0)},n.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ee(s),a(-1,0,0,1,s,0)},n.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ee(s),a(1,0,0,-1,0,s)},n.A_TO_C=function(){return i(function(s,h,u){return m.ARC===s.type?function(l,c,v){var f,d,g,p;l.cX||nr(l,c,v);for(var y=Math.min(l.phi1,l.phi2),C=Math.max(l.phi1,l.phi2)-y,b=Math.ceil(C/90),x=new Array(b),O=c,S=v,T=0;T<b;T++){var A=Vi(l.phi1,l.phi2,T/b),I=Vi(l.phi1,l.phi2,(T+1)/b),k=I-A,_=4/3*Math.tan(k*ie/4),P=[Math.cos(A*ie)-_*Math.sin(A*ie),Math.sin(A*ie)+_*Math.cos(A*ie)],F=P[0],z=P[1],B=[Math.cos(I*ie),Math.sin(I*ie)],H=B[0],U=B[1],j=[H+_*Math.sin(I*ie),U-_*Math.cos(I*ie)],M=j[0],V=j[1];x[T]={relative:l.relative,type:m.CURVE_TO};var X=function(K,re){var oe=yr([K*l.rX,re*l.rY],l.xRot),we=oe[0],Qe=oe[1];return[l.cX+we,l.cY+Qe]};f=X(F,z),x[T].x1=f[0],x[T].y1=f[1],d=X(M,V),x[T].x2=d[0],x[T].y2=d[1],g=X(H,U),x[T].x=g[0],x[T].y=g[1],l.relative&&(x[T].x1-=O,x[T].y1-=S,x[T].x2-=O,x[T].y2-=S,x[T].x-=O,x[T].y-=S),O=(p=[x[T].x,x[T].y])[0],S=p[1]}return x}(s,s.relative?0:h,s.relative?0:u):s})},n.ANNOTATE_ARCS=function(){return i(function(s,h,u){return s.relative&&(h=0,u=0),m.ARC===s.type&&nr(s,h,u),s})},n.CLONE=o,n.CALCULATE_BOUNDS=function(){var s=function(v){var f={};for(var d in v)f[d]=v[d];return f},h=e(),u=r(),l=t(),c=i(function(v,f,d){var g=l(u(h(s(v))));function p(V){V>c.maxX&&(c.maxX=V),V<c.minX&&(c.minX=V)}function y(V){V>c.maxY&&(c.maxY=V),V<c.minY&&(c.minY=V)}if(g.type&m.DRAWING_COMMANDS&&(p(f),y(d)),g.type&m.HORIZ_LINE_TO&&p(g.x),g.type&m.VERT_LINE_TO&&y(g.y),g.type&m.LINE_TO&&(p(g.x),y(g.y)),g.type&m.CURVE_TO){p(g.x),y(g.y);for(var C=0,b=$i(f,g.x1,g.x2,g.x);C<b.length;C++)0<(M=b[C])&&1>M&&p(_i(f,g.x1,g.x2,g.x,M));for(var x=0,O=$i(d,g.y1,g.y2,g.y);x<O.length;x++)0<(M=O[x])&&1>M&&y(_i(d,g.y1,g.y2,g.y,M))}if(g.type&m.ARC){p(g.x),y(g.y),nr(g,f,d);for(var S=g.xRot/180*Math.PI,T=Math.cos(S)*g.rX,A=Math.sin(S)*g.rX,I=-Math.sin(S)*g.rY,k=Math.cos(S)*g.rY,_=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],P=_[0],F=_[1],z=function(V){var X=V[0],K=V[1],re=180*Math.atan2(K,X)/Math.PI;return re<P?re+360:re},B=0,H=Ii(I,-T,0).map(z);B<H.length;B++)(M=H[B])>P&&M<F&&p(ki(g.cX,T,I,M));for(var U=0,j=Ii(k,-A,0).map(z);U<j.length;U++){var M;(M=j[U])>P&&M<F&&y(ki(g.cY,A,k,M))}}return v});return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(L||(L={}));var J,$a=function(){function n(){}return n.prototype.round=function(e){return this.transform(L.ROUND(e))},n.prototype.toAbs=function(){return this.transform(L.TO_ABS())},n.prototype.toRel=function(){return this.transform(L.TO_REL())},n.prototype.normalizeHVZ=function(e,t,r){return this.transform(L.NORMALIZE_HVZ(e,t,r))},n.prototype.normalizeST=function(){return this.transform(L.NORMALIZE_ST())},n.prototype.qtToC=function(){return this.transform(L.QT_TO_C())},n.prototype.aToC=function(){return this.transform(L.A_TO_C())},n.prototype.sanitize=function(e){return this.transform(L.SANITIZE(e))},n.prototype.translate=function(e,t){return this.transform(L.TRANSLATE(e,t))},n.prototype.scale=function(e,t){return this.transform(L.SCALE(e,t))},n.prototype.rotate=function(e,t,r){return this.transform(L.ROTATE(e,t,r))},n.prototype.matrix=function(e,t,r,i,a,o){return this.transform(L.MATRIX(e,t,r,i,a,o))},n.prototype.skewX=function(e){return this.transform(L.SKEW_X(e))},n.prototype.skewY=function(e){return this.transform(L.SKEW_Y(e))},n.prototype.xSymmetry=function(e){return this.transform(L.X_AXIS_SYMMETRY(e))},n.prototype.ySymmetry=function(e){return this.transform(L.Y_AXIS_SYMMETRY(e))},n.prototype.annotateArcs=function(){return this.transform(L.ANNOTATE_ARCS())},n}(),Lh=function(n){return n===" "||n===" "||n==="\r"||n===` `},Di=function(n){return"0".charCodeAt(0)<=n.charCodeAt(0)&&n.charCodeAt(0)<="9".charCodeAt(0)},Bh=function(n){function e(){var t=n.call(this)||this;return t.curNumber="",t.curCommandType=-1,t.curCommandRelative=!1,t.canParseCommandOrComma=!0,t.curNumberHasExp=!1,t.curNumberHasExpDigits=!1,t.curNumberHasDecimal=!1,t.curArgs=[],t}return ka(e,n),e.prototype.finish=function(t){if(t===void 0&&(t=[]),this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,r){var i=this;r===void 0&&(r=[]);for(var a=function(c){r.push(c),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],h=!(this.curCommandType!==m.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),u=Di(s)&&(this.curNumber==="0"&&s==="0"||h);if(!Di(s)||u)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||h){if(this.curNumber&&this.curCommandType!==-1){var l=Number(this.curNumber);if(isNaN(l))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===m.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>l)throw new SyntaxError('Expected positive number, got "'+l+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(l),this.curArgs.length===Uh[this.curCommandType]&&(m.HORIZ_LINE_TO===this.curCommandType?a({type:m.HORIZ_LINE_TO,relative:this.curCommandRelative,x:l}):m.VERT_LINE_TO===this.curCommandType?a({type:m.VERT_LINE_TO,relative:this.curCommandRelative,y:l}):this.curCommandType===m.MOVE_TO||this.curCommandType===m.LINE_TO||this.curCommandType===m.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),m.MOVE_TO===this.curCommandType&&(this.curCommandType=m.LINE_TO)):this.curCommandType===m.CURVE_TO?a({type:m.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===m.SMOOTH_CURVE_TO?a({type:m.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.QUAD_TO?a({type:m.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===m.ARC&&a({type:m.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!Lh(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(u)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=m.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=m.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=m.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=m.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=m.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=m.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=m.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=m.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=m.ARC,this.curCommandRelative=s==="a"}else r.push({type:m.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return r},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,i){i===void 0&&(i=[]);for(var a=0,o=Object.getPrototypeOf(this).parse.call(this,r);a<o.length;a++){var s=o[a],h=t(s);Array.isArray(h)?i.push.apply(i,h):i.push(h)}return i}}})},e}($a),m=function(n){function e(t){var r=n.call(this)||this;return r.commands=typeof t=="string"?e.parse(t):t,r}return ka(e,n),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=L.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],i=0,a=this.commands;i<a.length;i++){var o=t(a[i]);Array.isArray(o)?r.push.apply(r,o):r.push(o)}return this.commands=r,this},e.encode=function(t){return Dh(t)},e.parse=function(t){var r=new Bh,i=[];return r.parse(t,i),r.finish(i),i},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}($a),Uh=((J={})[m.MOVE_TO]=2,J[m.LINE_TO]=2,J[m.HORIZ_LINE_TO]=1,J[m.VERT_LINE_TO]=1,J[m.CLOSE_PATH]=0,J[m.QUAD_TO]=4,J[m.SMOOTH_QUAD_TO]=2,J[m.CURVE_TO]=6,J[m.SMOOTH_CURVE_TO]=4,J[m.ARC]=7,J),Fh=Ye,zh=ia,Hh=wn,jh=En,Li=RegExp.prototype,Xh=function(n){var e=n.flags;return e===void 0&&!("flags"in Li)&&!zh(n,"flags")&&Hh(Li,n)?Fh(jh,n):e},Yh=sa.PROPER,Wh=Er,Gh=bt,Bi=We,qh=Ct,Qh=Xh,Lr="toString",_a=RegExp.prototype,Da=_a[Lr],Zh=qh(function(){return Da.call({source:"a",flags:"b"})!=="/a/b"}),Kh=Yh&&Da.name!==Lr;(Zh||Kh)&&Wh(_a,Lr,function(){var e=Gh(this),t=Bi(e.source),r=Bi(Qh(e));return"/"+t+"/"+r},{unsafe:!0});function pt(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pt=function(e){return typeof e}:pt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(n)}function Jh(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}var eu=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],tu=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function ru(n,e,t,r,i){if(typeof n=="string"&&(n=document.getElementById(n)),!n||pt(n)!=="object"||!("getContext"in n))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=n.getContext("2d");try{return a.getImageData(e,t,r,i)}catch(o){throw new Error("unable to access image data: "+o)}}function iu(n,e,t,r,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=ru(n,e,t,r,i);o=au(o,e,t,r,i,a),n.getContext("2d").putImageData(o,e,t)}}function au(n,e,t,r,i,a){for(var o=n.data,s=2*a+1,h=r-1,u=i-1,l=a+1,c=l*(l+1)/2,v=new Ui,f=v,d,g=1;g<s;g++)f=f.next=new Ui,g===l&&(d=f);f.next=v;for(var p=null,y=null,C=0,b=0,x=eu[a],O=tu[a],S=0;S<i;S++){f=v;for(var T=o[b],A=o[b+1],I=o[b+2],k=o[b+3],_=0;_<l;_++)f.r=T,f.g=A,f.b=I,f.a=k,f=f.next;for(var P=0,F=0,z=0,B=0,H=l*T,U=l*A,j=l*I,M=l*k,V=c*T,X=c*A,K=c*I,re=c*k,oe=1;oe<l;oe++){var we=b+((h<oe?h:oe)<<2),Qe=o[we],Fr=o[we+1],zr=o[we+2],Hr=o[we+3],Ze=l-oe;V+=(f.r=Qe)*Ze,X+=(f.g=Fr)*Ze,K+=(f.b=zr)*Ze,re+=(f.a=Hr)*Ze,P+=Qe,F+=Fr,z+=zr,B+=Hr,f=f.next}p=v,y=d;for(var Rt=0;Rt<r;Rt++){var It=re*x>>>O;if(o[b+3]=It,It!==0){var Vt=255/It;o[b]=(V*x>>>O)*Vt,o[b+1]=(X*x>>>O)*Vt,o[b+2]=(K*x>>>O)*Vt}else o[b]=o[b+1]=o[b+2]=0;V-=H,X-=U,K-=j,re-=M,H-=p.r,U-=p.g,j-=p.b,M-=p.a;var ce=Rt+a+1;ce=C+(ce<h?ce:h)<<2,P+=p.r=o[ce],F+=p.g=o[ce+1],z+=p.b=o[ce+2],B+=p.a=o[ce+3],V+=P,X+=F,K+=z,re+=B,p=p.next;var Ke=y,jr=Ke.r,Xr=Ke.g,Yr=Ke.b,Wr=Ke.a;H+=jr,U+=Xr,j+=Yr,M+=Wr,P-=jr,F-=Xr,z-=Yr,B-=Wr,y=y.next,b+=4}C+=r}for(var Ee=0;Ee<r;Ee++){b=Ee<<2;var ve=o[b],ge=o[b+1],de=o[b+2],W=o[b+3],kt=l*ve,$t=l*ge,_t=l*de,Dt=l*W,Je=c*ve,et=c*ge,tt=c*de,rt=c*W;f=v;for(var Gr=0;Gr<l;Gr++)f.r=ve,f.g=ge,f.b=de,f.a=W,f=f.next;for(var qr=r,Lt=0,Bt=0,Ut=0,Ft=0,it=1;it<=a;it++){b=qr+Ee<<2;var at=l-it;Je+=(f.r=ve=o[b])*at,et+=(f.g=ge=o[b+1])*at,tt+=(f.b=de=o[b+2])*at,rt+=(f.a=W=o[b+3])*at,Ft+=ve,Lt+=ge,Bt+=de,Ut+=W,f=f.next,it<u&&(qr+=r)}b=Ee,p=v,y=d;for(var zt=0;zt<i;zt++){var G=b<<2;o[G+3]=W=rt*x>>>O,W>0?(W=255/W,o[G]=(Je*x>>>O)*W,o[G+1]=(et*x>>>O)*W,o[G+2]=(tt*x>>>O)*W):o[G]=o[G+1]=o[G+2]=0,Je-=kt,et-=$t,tt-=_t,rt-=Dt,kt-=p.r,$t-=p.g,_t-=p.b,Dt-=p.a,G=Ee+((G=zt+l)<u?G:u)*r<<2,Je+=Ft+=p.r=o[G],et+=Lt+=p.g=o[G+1],tt+=Bt+=p.b=o[G+2],rt+=Ut+=p.a=o[G+3],p=p.next,kt+=ve=y.r,$t+=ge=y.g,_t+=de=y.b,Dt+=W=y.a,Ft-=ve,Lt-=ge,Bt-=de,Ut-=W,y=y.next,b+=r}}return n}var Ui=function n(){Jh(this,n),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function nu(){var{DOMParser:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:n,createCanvas(t,r){return new OffscreenCanvas(t,r)},createImage(t){return se(function*(){var r=yield fetch(t),i=yield r.blob(),a=yield createImageBitmap(i);return a})()}};return(typeof DOMParser<"u"||typeof n>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function su(n){var{DOMParser:e,canvas:t,fetch:r}=n;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:t.createCanvas,createImage:t.loadImage}}var xl=Object.freeze({__proto__:null,offscreen:nu,node:su});function De(n){return n.replace(/(?!\u3000)\s+/gm," ")}function ou(n){return n.replace(/^[\n \t]+/,"")}function hu(n){return n.replace(/[\n \t]+$/,"")}function Q(n){var e=(n||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var uu=/^[A-Z-]+$/;function lu(n){return uu.test(n)?n.toLowerCase():n}function La(n){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(n)||[];return e[2]||e[3]||e[4]}function fu(n){if(!n.startsWith("rgb"))return n;var e=3,t=n.replace(/\d+(\.\d+)?/g,(r,i)=>e--&&i?String(Math.round(parseFloat(r))):r);return t}var cu=/(\[[^\]]+\])/g,vu=/(#[^\s+>~.[:]+)/g,gu=/(\.[^\s+>~.[:]+)/g,du=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,pu=/(:[\w-]+\([^)]*\))/gi,mu=/(:[^\s+>~.[:]+)/g,yu=/([^\s+>~.[:]+)/g;function ye(n,e){var t=e.exec(n);return t?[n.replace(e," "),t.length]:[n,0]}function bu(n){var e=[0,0,0],t=n.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[t,r]=ye(t,cu),e[1]+=r,[t,r]=ye(t,vu),e[0]+=r,[t,r]=ye(t,gu),e[1]+=r,[t,r]=ye(t,du),e[2]+=r,[t,r]=ye(t,pu),e[1]+=r,[t,r]=ye(t,mu),e[1]+=r,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,r]=ye(t,yu),e[2]+=r,e.join("")}var Re=1e-8;function Fi(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))}function br(n,e){return(n[0]*e[0]+n[1]*e[1])/(Fi(n)*Fi(e))}function zi(n,e){return(n[0]*e[1]<n[1]*e[0]?-1:1)*Math.acos(br(n,e))}function Hi(n){return n*n*n}function ji(n){return 3*n*n*(1-n)}function Xi(n){return 3*n*(1-n)*(1-n)}function Yi(n){return(1-n)*(1-n)*(1-n)}function Wi(n){return n*n}function Gi(n){return 2*n*(1-n)}function qi(n){return(1-n)*(1-n)}class w{constructor(e,t,r){this.document=e,this.name=t,this.value=r,this.isNormalizedColor=!1}static empty(e){return new w(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:r}=this;return De(this.getString()).trim().split(e).map(i=>new w(t,r,i))}hasValue(e){var{value:t}=this;return t!==null&&t!==""&&(e||t!==0)&&typeof t<"u"}isString(e){var{value:t}=this,r=typeof t=="string";return!r||!e?r:e.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:t}=this,r=parseFloat(t);return this.isString(/%$/)&&(r/=100),r}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=fu(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(r);default:{var o=this.getNumber();return t&&o<1?o*a.computeSize(r):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){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)}}getDefinition(){var e=this.getString(),t=/#([^)'"]+)/.exec(e);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}getFillStyleDefinition(e,t){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,e,t);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,e,t)}return null}getTextBaseline(){return this.hasValue()?w.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),r=t.length,i=0,a=0;a<r&&(t[a]===","&&i++,i!==3);a++);if(e.hasValue()&&this.isString()&&i!==3){var o=new pr(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new w(this.document,this.name,t)}}w.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class xu{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,t){this.viewPorts.push({width:e,height:t})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class ${constructor(e,t){this.x=e,this.y=t}static parse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=t,i=t]=Q(e);return new $(r,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=t,i=r]=Q(e);return new $(r,i)}static parsePath(e){for(var t=Q(e),r=t.length,i=[],a=0;a<r;a+=2)i.push(new $(t[a],t[a+1]));return i}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:t,y:r}=this,i=t*e[0]+r*e[2]+e[4],a=t*e[1]+r*e[3]+e[5];this.x=i,this.y=a}}class Cu{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:t,onMouseMove:r}=this,i=e.ctx.canvas;i.onclick=t,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:t,eventElements:r}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),t.forEach((a,o)=>{for(var{run:s}=a,h=r[o];h;)s(h),h=h.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((a,o)=>{var{x:s,y:h}=a;!i[o]&&t.isPointInPath&&t.isPointInPath(s,h)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((a,o)=>{var{x:s,y:h}=a;!i[o]&&t.isPointInBox(s,h)&&(i[o]=e)})}}mapXY(e,t){for(var{window:r,ctx:i}=this.screen,a=new $(e,t),o=i.canvas;o;)a.x-=o.offsetLeft,a.y-=o.offsetTop,o=o.offsetParent;return r.scrollX&&(a.x+=r.scrollX),r.scrollY&&(a.y+=r.scrollY),a}onClick(e){var{x:t,y:r}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:t,y:r,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:t,y:r}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:t,y:r,run(i){i.onMouseMove&&i.onMouseMove()}})}}var Ba=typeof window<"u"?window:null,Ua=typeof fetch<"u"?fetch.bind(void 0):null;class At{constructor(e){var{fetch:t=Ua,window:r=Ba}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new xu,this.mouse=new Cu(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=t}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(t=>t());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:t,ctx:r,aspectRatio:i,width:a,desiredWidth:o,height:s,desiredHeight:h,minX:u=0,minY:l=0,refX:c,refY:v,clip:f=!1,clipX:d=0,clipY:g=0}=e,p=De(i).replace(/^defer\s/,""),[y,C]=p.split(" "),b=y||"xMidYMid",x=C||"meet",O=a/o,S=s/h,T=Math.min(O,S),A=Math.max(O,S),I=o,k=h;x==="meet"&&(I*=T,k*=T),x==="slice"&&(I*=A,k*=A);var _=new w(t,"refX",c),P=new w(t,"refY",v),F=_.hasValue()&&P.hasValue();if(F&&r.translate(-T*_.getPixels("x"),-T*P.getPixels("y")),f){var z=T*d,B=T*g;r.beginPath(),r.moveTo(z,B),r.lineTo(a,B),r.lineTo(a,s),r.lineTo(z,s),r.closePath(),r.clip()}if(!F){var H=x==="meet"&&T===S,U=x==="slice"&&A===S,j=x==="meet"&&T===O,M=x==="slice"&&A===O;b.startsWith("xMid")&&(H||U)&&r.translate(a/2-I/2,0),b.endsWith("YMid")&&(j||M)&&r.translate(0,s/2-k/2),b.startsWith("xMax")&&(H||U)&&r.translate(a-I,0),b.endsWith("YMax")&&(j||M)&&r.translate(0,s-k)}switch(!0){case b==="none":r.scale(O,S);break;case x==="meet":r.scale(T,T);break;case x==="slice":r.scale(A,A);break}r.translate(-u,-l)}start(e){var{enableRedraw:t=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:a=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:h,scaleHeight:u,offsetX:l,offsetY:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:v,mouse:f}=this,d=1e3/v;if(this.frameDuration=d,this.readyPromise=new Promise(b=>{this.resolveReady=b}),this.isReady()&&this.render(e,a,o,h,u,l,c),!!t){var g=Date.now(),p=g,y=0,C=()=>{g=Date.now(),y=g-p,y>=d&&(p=g-y%d,this.shouldUpdate(i,s)&&(this.render(e,a,o,h,u,l,c),f.runEvents())),this.intervalId=ar(C)};r||f.start(),this.intervalId=ar(C)}}stop(){this.intervalId&&(ar.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:r}=this,i=this.animations.reduce((a,o)=>o.update(r)||a,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,r,i,a,o,s){var{CLIENT_WIDTH:h,CLIENT_HEIGHT:u,viewPort:l,ctx:c,isFirstRender:v}=this,f=c.canvas;l.clear(),f.width&&f.height?l.setCurrent(f.width,f.height):l.setCurrent(h,u);var d=e.getStyle("width"),g=e.getStyle("height");!t&&(v||typeof i!="number"&&typeof a!="number")&&(d.hasValue()&&(f.width=d.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),g.hasValue()&&(f.height=g.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var p=f.clientWidth||f.width,y=f.clientHeight||f.height;if(t&&d.hasValue()&&g.hasValue()&&(p=d.getPixels("x"),y=g.getPixels("y")),l.setCurrent(p,y),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof i=="number"||typeof a=="number"){var C=Q(e.getAttribute("viewBox").getString()),b=0,x=0;if(typeof i=="number"){var O=e.getStyle("width");O.hasValue()?b=O.getPixels("x")/i:isNaN(C[2])||(b=C[2]/i)}if(typeof a=="number"){var S=e.getStyle("height");S.hasValue()?x=S.getPixels("y")/a:isNaN(C[3])||(x=C[3]/a)}b||(b=x),x||(x=b),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var T=e.getStyle("transform",!0,!0);T.setValue("".concat(T.getString()," scale(").concat(1/b,", ").concat(1/x,")"))}r||c.clearRect(0,0,p,y),e.render(c),v&&(this.isFirstRender=!1)}}At.defaultWindow=Ba;At.defaultFetch=Ua;var{defaultFetch:Tu}=At,wu=typeof DOMParser<"u"?DOMParser:null;class sr{constructor(){var{fetch:e=Tu,DOMParser:t=wu}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return se(function*(){return e.startsWith("<")?t.parseFromString(e):t.load(e)})()}parseFromString(e){var t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent);return e}load(e){var t=this;return se(function*(){var r=yield t.fetch(e),i=yield r.text();return t.parseFromString(i)})()}}class Eu{constructor(e,t){this.type="translate",this.point=null,this.point=$.parse(t)}apply(e){var{x:t,y:r}=this.point;e.translate(t||0,r||0)}unapply(e){var{x:t,y:r}=this.point;e.translate(-1*t||0,-1*r||0)}applyToPoint(e){var{x:t,y:r}=this.point;e.applyTransform([1,0,0,1,t||0,r||0])}}class Su{constructor(e,t,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Q(t);this.angle=new w(e,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:t,cy:r,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),h=r+a.getPixels("y");e.translate(s,h),e.rotate(o.getRadians()),e.translate(-s,-h)}unapply(e){var{cx:t,cy:r,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),h=r+a.getPixels("y");e.translate(s,h),e.rotate(-1*o.getRadians()),e.translate(-s,-h)}applyToPoint(e){var{cx:t,cy:r,angle:i}=this,a=i.getRadians();e.applyTransform([1,0,0,1,t||0,r||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-t||0,-r||0])}}class Ou{constructor(e,t,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=$.parseScale(t);(i.x===0||i.y===0)&&(i.x=Re,i.y=Re),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(e){var{scale:{x:t,y:r},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(t,r||t),e.translate(-o,-s)}unapply(e){var{scale:{x:t,y:r},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(1/t,1/r||t),e.translate(-o,-s)}applyToPoint(e){var{x:t,y:r}=this.scale;e.applyTransform([t||0,0,0,r||0,0,0])}}class Fa{constructor(e,t,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Q(t),this.originX=r[0],this.originY=r[1]}apply(e){var{originX:t,originY:r,matrix:i}=this,a=t.getPixels("x"),o=r.getPixels("y");e.translate(a,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-a,-o)}unapply(e){var{originX:t,originY:r,matrix:i}=this,a=i[0],o=i[2],s=i[4],h=i[1],u=i[3],l=i[5],c=0,v=0,f=1,d=1/(a*(u*f-l*v)-o*(h*f-l*c)+s*(h*v-u*c)),g=t.getPixels("x"),p=r.getPixels("y");e.translate(g,p),e.transform(d*(u*f-l*v),d*(l*c-h*f),d*(s*v-o*f),d*(a*f-s*c),d*(o*l-s*u),d*(s*h-a*l)),e.translate(-g,-p)}applyToPoint(e){e.applyTransform(this.matrix)}}class za extends Fa{constructor(e,t,r){super(e,t,r),this.type="skew",this.angle=null,this.angle=new w(e,"angle",t)}}class Au extends za{constructor(e,t,r){super(e,t,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Nu extends za{constructor(e,t,r){super(e,t,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Pu(n){return De(n).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Mu(n){var[e,t]=n.split("(");return[e.trim(),t.trim().replace(")","")]}class Ce{constructor(e,t,r){this.document=e,this.transforms=[];var i=Pu(t);i.forEach(a=>{if(a!=="none"){var[o,s]=Mu(a),h=Ce.transformTypes[o];typeof h<"u"&&this.transforms.push(new h(this.document,s,r))}})}static fromElement(e,t){var r=t.getStyle("transform",!1,!0),[i,a=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,a];return r.hasValue()?new Ce(e,r.getString(),o):null}apply(e){for(var{transforms:t}=this,r=t.length,i=0;i<r;i++)t[i].apply(e)}unapply(e){for(var{transforms:t}=this,r=t.length,i=r-1;i>=0;i--)t[i].unapply(e)}applyToPoint(e){for(var{transforms:t}=this,r=t.length,i=0;i<r;i++)t[i].applyToPoint(e)}}Ce.transformTypes={translate:Eu,rotate:Su,scale:Ou,matrix:Fa,skewX:Au,skewY:Nu};class R{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=t,this.captureTextNodes=r,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(s=>{var h=lu(s.nodeName);this.attributes[h]=new w(e,h,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(s=>s.trim());i.forEach(s=>{if(s){var[h,u]=s.split(":").map(l=>l.trim());this.styles[h]=new w(e,h,u)}})}var{definitions:a}=e,o=this.getAttribute("id");o.hasValue()&&(a[o.getString()]||(a[o.getString()]=this)),Array.from(t.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(r&&(s.nodeType===3||s.nodeType===4)){var h=e.createTextNode(s);h.getText().length>0&&this.addChild(h)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[e];if(!r&&t){var i=new w(this.document,e,"");return this.attributes[e]=i,i}return r||w.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return w.empty(this.document)}getStyle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!r){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var h=new w(this.document,e,"");return this.styles[e]=h,h}return i||w.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var t=Ce.fromElement(this.document,this);t&&t.apply(e);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var i=r.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){var t=e instanceof R?e:this.document.createElement(e);t.parent=this,R.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var t,{node:r}=this;if(typeof r.matches=="function")return r.matches(e);var i=(t=r.getAttribute)===null||t===void 0?void 0:t.call(r,"class");return!i||i===""?!1:i.split(" ").some(a=>".".concat(a)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var r in e)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=e[r],a=t[r];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),a>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=a)}}}removeStyles(e,t){var r=t.reduce((i,a)=>{var o=e.getStyle(a);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[a,s]]},[]);return r}restoreStyles(e,t){t.forEach(r=>{var[i,a]=r;e.getStyle(i,!0).setValue(a)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}R.ignoreChildTypes=["title"];class Ru extends R{constructor(e,t,r){super(e,t,r)}}function Iu(n){var e=n.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function Vu(n){return typeof process>"u"?n:n.trim().split(",").map(Iu).join(",")}function ku(n){if(!n)return"";var e=n.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 $u(n){if(!n)return"";var e=n.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:""}}class Y{constructor(e,t,r,i,a,o){var s=o?typeof o=="string"?Y.parse(o):o:{};this.fontFamily=a||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=r||s.fontWeight,this.fontVariant=t||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r="",i="",a="",o="",s="",h=De(e).trim().split(" "),u={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return h.forEach(l=>{switch(!0){case(!u.fontStyle&&Y.styles.includes(l)):l!=="inherit"&&(r=l),u.fontStyle=!0;break;case(!u.fontVariant&&Y.variants.includes(l)):l!=="inherit"&&(i=l),u.fontStyle=!0,u.fontVariant=!0;break;case(!u.fontWeight&&Y.weights.includes(l)):l!=="inherit"&&(a=l),u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0;break;case!u.fontSize:l!=="inherit"&&([o]=l.split("/")),u.fontStyle=!0,u.fontVariant=!0,u.fontWeight=!0,u.fontSize=!0;break;default:l!=="inherit"&&(s+=l)}}),new Y(r,i,a,o,s,t)}toString(){return[ku(this.fontStyle),this.fontVariant,$u(this.fontWeight),this.fontSize,Vu(this.fontFamily)].join(" ").trim()}}Y.styles="normal|italic|oblique|inherit";Y.variants="normal|small-caps|inherit";Y.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class te{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=t,this.x2=r,this.y2=i,this.addPoint(e,t),this.addPoint(r,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:t,y1:r,x2:i,y2:a}=e;this.addPoint(t,r),this.addPoint(i,a)}}sumCubic(e,t,r,i,a){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*r+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*a}bezierCurveAdd(e,t,r,i,a){var o=6*t-12*r+6*i,s=-3*t+9*r-9*i+3*a,h=3*r-3*t;if(s===0){if(o===0)return;var u=-h/o;0<u&&u<1&&(e?this.addX(this.sumCubic(u,t,r,i,a)):this.addY(this.sumCubic(u,t,r,i,a)));return}var l=Math.pow(o,2)-4*h*s;if(!(l<0)){var c=(-o+Math.sqrt(l))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,r,i,a)):this.addY(this.sumCubic(c,t,r,i,a)));var v=(-o-Math.sqrt(l))/(2*s);0<v&&v<1&&(e?this.addX(this.sumCubic(v,t,r,i,a)):this.addY(this.sumCubic(v,t,r,i,a)))}}addBezierCurve(e,t,r,i,a,o,s,h){this.addPoint(e,t),this.addPoint(s,h),this.bezierCurveAdd(!0,e,r,a,s),this.bezierCurveAdd(!1,t,i,o,h)}addQuadraticCurve(e,t,r,i,a,o){var s=e+.6666666666666666*(r-e),h=t+2/3*(i-t),u=s+1/3*(a-e),l=h+1/3*(o-t);this.addBezierCurve(e,t,s,u,h,l,a,o)}isPointInBox(e,t){var{x1:r,y1:i,x2:a,y2:o}=this;return r<=e&&e<=a&&i<=t&&t<=o}}class E extends m{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new $(0,0),this.control=new $(0,0),this.current=new $(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:t}=this;return e>=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new $(this.command[e],this.command[t]);return this.makeAbsolute(r)}getAsControlPoint(e,t){var r=this.getPoint(e,t);return this.control=r,r}getAsCurrentPoint(e,t){var r=this.getPoint(e,t);return this.current=r,r}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==m.CURVE_TO&&e!==m.SMOOTH_CURVE_TO&&e!==m.QUAD_TO&&e!==m.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:r},control:{x:i,y:a}}=this,o=new $(2*t-i,2*r-a);return o}makeAbsolute(e){if(this.command.relative){var{x:t,y:r}=this.current;e.x+=t,e.y+=r}return e}addMarker(e,t,r){var{points:i,angles:a}=this;r&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=i[i.length-1].angleTo(r)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,t=e.length,r=0;r<t;r++)if(!e[r]){for(var i=r+1;i<t;i++)if(e[i]){e[r]=e[i];break}}return e}}class Te extends R{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,t=this;t;){var r=t.getStyle("opacity",!1,!0);r.hasValue(!0)&&(e*=r.getNumber()),t=t.parent}return e}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!t){var r=this.getStyle("fill"),i=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var s=r.getFillStyleDefinition(this,i);s&&(e.fillStyle=s)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var h=r.getColor();h!=="inherit"&&(e.fillStyle=h==="none"?"rgba(0,0,0,0)":h)}if(i.hasValue()){var u=new w(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=u}if(a.isUrlDefinition()){var l=a.getFillStyleDefinition(this,o);l&&(e.strokeStyle=l)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var c=a.getString();c!=="inherit"&&(e.strokeStyle=c==="none"?"rgba(0,0,0,0)":c)}if(o.hasValue()){var v=new w(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=v}var f=this.getStyle("stroke-width");if(f.hasValue()){var d=f.getPixels();e.lineWidth=d||Re}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),C=this.getStyle("stroke-dasharray"),b=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),p.hasValue()&&(e.lineJoin=p.getString()),y.hasValue()&&(e.miterLimit=y.getNumber()),C.hasValue()&&C.getString()!=="none"){var x=Q(C.getString());typeof e.setLineDash<"u"?e.setLineDash(x):typeof e.webkitLineDash<"u"?e.webkitLineDash=x:typeof e.mozDash<"u"&&!(x.length===1&&x[0]===0)&&(e.mozDash=x);var O=b.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=O:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=O:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=O)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var S=this.getStyle("font"),T=this.getStyle("font-style"),A=this.getStyle("font-variant"),I=this.getStyle("font-weight"),k=this.getStyle("font-size"),_=this.getStyle("font-family"),P=new Y(T.getString(),A.getString(),I.getString(),k.hasValue()?"".concat(k.getPixels(!0),"px"):"",_.getString(),Y.parse(S.getString(),e.font));T.setValue(P.fontStyle),A.setValue(P.fontVariant),I.setValue(P.fontWeight),k.setValue(P.fontSize),_.setValue(P.fontFamily),e.font=P.toString(),k.isPixels()&&(this.document.emSize=k.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class N extends Te{constructor(e,t,r){super(e,t,r),this.type="path",this.pathParser=null,this.pathParser=new E(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,r=new te;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case E.MOVE_TO:this.pathM(e,r);break;case E.LINE_TO:this.pathL(e,r);break;case E.HORIZ_LINE_TO:this.pathH(e,r);break;case E.VERT_LINE_TO:this.pathV(e,r);break;case E.CURVE_TO:this.pathC(e,r);break;case E.SMOOTH_CURVE_TO:this.pathS(e,r);break;case E.QUAD_TO:this.pathQ(e,r);break;case E.SMOOTH_QUAD_TO:this.pathT(e,r);break;case E.ARC:this.pathA(e,r);break;case E.CLOSE_PATH:this.pathZ(e,r);break}return r}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,t=e.getMarkerPoints(),r=e.getMarkerAngles(),i=t.map((a,o)=>[a,r[o]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");e.fillStyle!==""&&(t.getString("inherit")!=="inherit"?e.fill(t.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var r=this.getMarkers();if(r){var i=r.length-1,a=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var h=a.getDefinition(),[u,l]=r[0];h.render(e,u,l)}if(o.isUrlDefinition())for(var c=o.getDefinition(),v=1;v<i;v++){var[f,d]=r[v];c.render(e,f,d)}if(s.isUrlDefinition()){var g=s.getDefinition(),[p,y]=r[i];g.render(e,p,y)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:r}=this,{point:i}=N.pathM(r),{x:a,y:o}=i;r.addMarker(i),t.addPoint(a,o),e&&e.moveTo(a,o)}static pathL(e){var{current:t}=e,r=e.getAsCurrentPoint();return{current:t,point:r}}pathL(e,t){var{pathParser:r}=this,{current:i,point:a}=N.pathL(r),{x:o,y:s}=a;r.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:r}=e,i=new $((r.relative?t.x:0)+r.x,t.y);return e.current=i,{current:t,point:i}}pathH(e,t){var{pathParser:r}=this,{current:i,point:a}=N.pathH(r),{x:o,y:s}=a;r.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:r}=e,i=new $(t.x,(r.relative?t.y:0)+r.y);return e.current=i,{current:t,point:i}}pathV(e,t){var{pathParser:r}=this,{current:i,point:a}=N.pathV(r),{x:o,y:s}=a;r.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:t}=e,r=e.getPoint("x1","y1"),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:a}}pathC(e,t){var{pathParser:r}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=N.pathC(r);r.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,r=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:a}}pathS(e,t){var{pathParser:r}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=N.pathS(r);r.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:t}=e,r=e.getAsControlPoint("x1","y1"),i=e.getAsCurrentPoint();return{current:t,controlPoint:r,currentPoint:i}}pathQ(e,t){var{pathParser:r}=this,{current:i,controlPoint:a,currentPoint:o}=N.pathQ(r);r.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathT(e){var{current:t}=e,r=e.getReflectedControlPoint();e.control=r;var i=e.getAsCurrentPoint();return{current:t,controlPoint:r,currentPoint:i}}pathT(e,t){var{pathParser:r}=this,{current:i,controlPoint:a,currentPoint:o}=N.pathT(r);r.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathA(e){var{current:t,command:r}=e,{rX:i,rY:a,xRot:o,lArcFlag:s,sweepFlag:h}=r,u=o*(Math.PI/180),l=e.getAsCurrentPoint(),c=new $(Math.cos(u)*(t.x-l.x)/2+Math.sin(u)*(t.y-l.y)/2,-Math.sin(u)*(t.x-l.x)/2+Math.cos(u)*(t.y-l.y)/2),v=Math.pow(c.x,2)/Math.pow(i,2)+Math.pow(c.y,2)/Math.pow(a,2);v>1&&(i*=Math.sqrt(v),a*=Math.sqrt(v));var f=(s===h?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(c.y,2)-Math.pow(a,2)*Math.pow(c.x,2))/(Math.pow(i,2)*Math.pow(c.y,2)+Math.pow(a,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var d=new $(f*i*c.y/a,f*-a*c.x/i),g=new $((t.x+l.x)/2+Math.cos(u)*d.x-Math.sin(u)*d.y,(t.y+l.y)/2+Math.sin(u)*d.x+Math.cos(u)*d.y),p=zi([1,0],[(c.x-d.x)/i,(c.y-d.y)/a]),y=[(c.x-d.x)/i,(c.y-d.y)/a],C=[(-c.x-d.x)/i,(-c.y-d.y)/a],b=zi(y,C);return br(y,C)<=-1&&(b=Math.PI),br(y,C)>=1&&(b=0),{currentPoint:l,rX:i,rY:a,sweepFlag:h,xAxisRotation:u,centp:g,a1:p,ad:b}}pathA(e,t){var{pathParser:r}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:h,centp:u,a1:l,ad:c}=N.pathA(r),v=1-s?1:-1,f=l+v*(c/2),d=new $(u.x+a*Math.cos(f),u.y+o*Math.sin(f));if(r.addMarkerAngle(d,f-v*Math.PI/2),r.addMarkerAngle(i,f-v*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(l)&&!isNaN(c)){var g=a>o?a:o,p=a>o?1:a/o,y=a>o?o/a:1;e.translate(u.x,u.y),e.rotate(h),e.scale(p,y),e.arc(0,0,g,l,l+c,!!(1-s)),e.scale(1/p,1/y),e.rotate(-h),e.translate(-u.x,-u.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){N.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class Ha extends N{constructor(e,t,r){super(e,t,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class fe extends Te{constructor(e,t,r){super(e,t,new.target===fe?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,t);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(e.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var t=null;return this.children.forEach((r,i)=>{var a=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(a):t=a}),t}getFontSize(){var{document:e,parent:t}=this,r=Y.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new te(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,r){var i=t[r],a=null;if(e.isArabic){var o=t.length,s=t[r-1],h=t[r+1],u="isolated";if((r===0||s===" ")&&r<o-1&&h!==" "&&(u="terminal"),r>0&&s!==" "&&r<o-1&&h!==" "&&(u="medial"),r>0&&s!==" "&&(r===o-1||h===" ")&&(u="initial"),typeof e.glyphs[i]<"u"){var l=e.glyphs[i];a=l instanceof Ha?l:l[u]}}else a=e.glyphs[i];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var t=e||this.node,r=Array.from(t.parentNode.childNodes),i=r.indexOf(t),a=r.length-1,o=De(t.textContent||"");return i===0&&(o=ou(o)),i===a&&(o=hu(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((r,i)=>{this.renderChild(e,this,this,i)});var{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:t,parent:r}=this,i=this.getText(),a=r.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:o}=a.fontFace,s=Y.parse(t.ctx.font),h=r.getStyle("font-size").getNumber(s.fontSize),u=r.getStyle("font-style").getString(s.fontStyle),l=h/o,c=a.isRTL?i.split("").reverse().join(""):i,v=Q(r.getAttribute("dx").getString()),f=c.length,d=0;d<f;d++){var g=this.getGlyph(a,c,d);e.translate(this.x,this.y),e.scale(l,-l);var p=e.lineWidth;e.lineWidth=e.lineWidth*o/h,u==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),u==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=p,e.scale(1/l,-1/l),e.translate(-this.x,-this.y),this.x+=h*(g.horizAdvX||a.horizAdvX)/o,typeof v[d]<"u"&&!isNaN(v[d])&&(this.x+=v[d])}return}var{x:y,y:C}=this;e.fillStyle&&e.fillText(i,y,C),e.strokeStyle&&e.strokeText(i,y,C)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],t=e.getStyle("text-anchor").getString("start"),r=!1,i=0;t==="start"&&!r||t==="end"&&r?i=e.x-this.minX:t==="end"&&!r||t==="start"&&r?i=e.x-this.maxX:i=e.x-(this.minX+this.maxX)/2;for(var a=this.textChunkStart;a<this.leafTexts.length;a++)this.leafTexts[a].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((t,r)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,r,i){var a=r.children[i];a.children.length>0?a.children.forEach((o,s)=>{t.adjustChildCoordinatesRecursiveCore(e,t,a,s)}):this.adjustChildCoordinates(e,t,r,i)}adjustChildCoordinates(e,t,r,i){var a=r.children[i];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var o=a.getAttribute("x"),s=a.getAttribute("y"),h=a.getAttribute("dx"),u=a.getAttribute("dy"),l=a.getStyle("font-family").getDefinition(),c=!!l&&l.isRTL;i===0&&(o.hasValue()||o.setValue(a.getInheritedAttribute("x")),s.hasValue()||s.setValue(a.getInheritedAttribute("y")),h.hasValue()||h.setValue(a.getInheritedAttribute("dx")),u.hasValue()||u.setValue(a.getInheritedAttribute("dy")));var v=a.measureText(e);return c&&(t.x-=v),o.hasValue()?(t.applyAnchoring(),a.x=o.getPixels("x"),h.hasValue()&&(a.x+=h.getPixels("x"))):(h.hasValue()&&(t.x+=h.getPixels("x")),a.x=t.x),t.x=a.x,c||(t.x+=v),s.hasValue()?(a.y=s.getPixels("y"),u.hasValue()&&(a.y+=u.getPixels("y"))):(u.hasValue()&&(t.y+=u.getPixels("y")),a.y=t.y),t.y=a.y,t.leafTexts.push(a),t.minX=Math.min(t.minX,a.x,a.x+v),t.maxX=Math.max(t.maxX,a.x,a.x+v),a.clearContext(e),e.restore(),a}getChildBoundingBox(e,t,r,i){var a=r.children[i];if(typeof a.getBoundingBox!="function")return null;var o=a.getBoundingBox(e);return o?(a.children.forEach((s,h)=>{var u=t.getChildBoundingBox(e,t,a,h);o.addBoundingBox(u)}),o):null}renderChild(e,t,r,i){var a=r.children[i];a.render(e),a.children.forEach((o,s)=>{t.renderChild(e,t,a,s)})}measureText(e){var{measureCache:t}=this;if(~t)return t;var r=this.getText(),i=this.measureTargetText(e,r);return this.measureCache=i,i}measureTargetText(e,t){if(!t.length)return 0;var{parent:r}=this,i=r.getStyle("font-family").getDefinition();if(i){for(var a=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=Q(r.getAttribute("dx").getString()),h=o.length,u=0,l=0;l<h;l++){var c=this.getGlyph(i,o,l);u+=(c.horizAdvX||i.horizAdvX)*a/i.fontFace.unitsPerEm,typeof s[l]<"u"&&!isNaN(s[l])&&(u+=s[l])}return u}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:v}=e.measureText(t);return this.clearContext(e),e.restore(),v}getInheritedAttribute(e){for(var t=this;t instanceof fe&&t.isFirstChild();){var r=t.parent.getAttribute(e);if(r.hasValue(!0))return r.getValue("0");t=t.parent}return null}}class Nt extends fe{constructor(e,t,r){super(e,t,new.target===Nt?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class _u extends Nt{constructor(){super(...arguments),this.type="textNode"}}class qe extends Te{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:r}=this,{screen:i,window:a}=r,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(o).getPropertyValue("font");var s=new w(r,"fontSize",Y.parse(e.font).fontSize);s.hasValue()&&(r.rootEmSize=s.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:h,height:u}=i.viewPort;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 l=this.getAttribute("refX"),c=this.getAttribute("refY"),v=this.getAttribute("viewBox"),f=v.hasValue()?Q(v.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,p=0,y=0,C=0;f&&(g=f[0],p=f[1]),this.root||(h=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=g,C=p,g=0,p=0)),i.viewPort.setCurrent(h,u),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(h=f[2],u=f[3]),r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:h,height:i.viewPort.height,desiredHeight:u,minX:g,minY:p,refX:l.getValue(),refY:c.getValue(),clip:d,clipX:y,clipY:C}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(h,u))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),a=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),h=i.getNumber(0),u=a.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var l=this.getAttribute("preserveAspectRatio");l.hasValue()&&l.setValue(l.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),a.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(h||e," ").concat(u||t)),s.hasValue()){var c=this.getStyle("width"),v=this.getStyle("height");c.hasValue()&&c.setValue("".concat(e,"px")),v.hasValue()&&v.setValue("".concat(t,"px"))}}}class ja extends N{constructor(){super(...arguments),this.type="rect"}path(e){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),h=o.getPixels("x"),u=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(u=h),s.hasValue()&&!o.hasValue()&&(h=u),h=Math.min(h,i/2),u=Math.min(u,a/2),e){var l=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&i>0&&(e.moveTo(t+h,r),e.lineTo(t+i-h,r),e.bezierCurveTo(t+i-h+l*h,r,t+i,r+u-l*u,t+i,r+u),e.lineTo(t+i,r+a-u),e.bezierCurveTo(t+i,r+a-u+l*u,t+i-h+l*h,r+a,t+i-h,r+a),e.lineTo(t+h,r+a),e.bezierCurveTo(t+h-l*h,r+a,t,r+a-u+l*u,t,r+a-u),e.lineTo(t,r+u),e.bezierCurveTo(t,r+u-l*u,t+h-l*h,r,t+h,r),e.closePath())}return new te(t,r,t+i,r+a)}getMarkers(){return null}}class Du extends N{constructor(){super(...arguments),this.type="circle"}path(e){var t=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(t,r,i,0,Math.PI*2,!1),e.closePath()),new te(t-i,r-i,t+i,r+i)}getMarkers(){return null}}class Lu extends N{constructor(){super(...arguments),this.type="ellipse"}path(e){var t=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&r>0&&i>0&&(e.beginPath(),e.moveTo(a+r,o),e.bezierCurveTo(a+r,o+t*i,a+t*r,o+i,a,o+i),e.bezierCurveTo(a-t*r,o+i,a-r,o+t*i,a-r,o),e.bezierCurveTo(a-r,o-t*i,a-t*r,o-i,a,o-i),e.bezierCurveTo(a+t*r,o-i,a+r,o-t*i,a+r,o),e.closePath()),new te(a-r,o-i,a+r,o+i)}getMarkers(){return null}}class Bu extends N{constructor(){super(...arguments),this.type="line"}getPoints(){return[new $(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new $(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:r},{x:i,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,r),e.lineTo(i,a)),new te(t,r,i,a)}getMarkers(){var[e,t]=this.getPoints(),r=e.angleTo(t);return[[e,r],[t,r]]}}class Xa extends N{constructor(e,t,r){super(e,t,r),this.type="polyline",this.points=[],this.points=$.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:r,y:i}]=t,a=new te(r,i);return e&&(e.beginPath(),e.moveTo(r,i)),t.forEach(o=>{var{x:s,y:h}=o;a.addPoint(s,h),e&&e.lineTo(s,h)}),a}getMarkers(){var{points:e}=this,t=e.length-1,r=[];return e.forEach((i,a)=>{a!==t&&r.push([i,i.angleTo(e[a+1])])}),r.length>0&&r.push([e[e.length-1],r[r.length-1][1]]),r}}class Uu extends Xa{constructor(){super(...arguments),this.type="polygon"}path(e){var t=super.path(e),[{x:r,y:i}]=this.points;return e&&(e.lineTo(r,i),e.closePath()),t}}class Fu extends R{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,r){var i=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),o=new qe(this.document,null);o.attributes.viewBox=new w(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new w(this.document,"width","".concat(i,"px")),o.attributes.height=new w(this.document,"height","".concat(a,"px")),o.attributes.transform=new w(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,a),h=s.getContext("2d"),u=this.getAttribute("x"),l=this.getAttribute("y");u.hasValue()&&l.hasValue()&&h.translate(u.getPixels("x",!0),l.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var c=-1;c<=1;c++)for(var v=-1;v<=1;v++)h.save(),o.attributes.x=new w(this.document,"x",c*s.width),o.attributes.y=new w(this.document,"y",v*s.height),o.render(h),h.restore();var f=e.createPattern(s,"repeat");return f}}class zu extends R{constructor(){super(...arguments),this.type="marker"}render(e,t,r){if(t){var{x:i,y:a}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,a),o==="auto"&&e.rotate(r),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var h=new qe(this.document,null);h.type=this.type,h.attributes.viewBox=new w(this.document,"viewBox",this.getAttribute("viewBox").getValue()),h.attributes.refX=new w(this.document,"refX",this.getAttribute("refX").getValue()),h.attributes.refY=new w(this.document,"refY",this.getAttribute("refY").getValue()),h.attributes.width=new w(this.document,"width",this.getAttribute("markerWidth").getValue()),h.attributes.height=new w(this.document,"height",this.getAttribute("markerHeight").getValue()),h.attributes.overflow=new w(this.document,"overflow",this.getAttribute("overflow").getValue()),h.attributes.fill=new w(this.document,"fill",this.getAttribute("fill").getColor("black")),h.attributes.stroke=new w(this.document,"stroke",this.getAttribute("stroke").getValue("none")),h.children=this.children,h.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-r),e.translate(-i,-a)}}}class Hu extends R{constructor(){super(...arguments),this.type="defs"}render(){}}class Br extends Te{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new te;return this.children.forEach(r=>{t.addBoundingBox(r.getBoundingBox(e))}),t}}class Ya extends R{constructor(e,t,r){super(e,t,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:a}=this;a.forEach(o=>{o.type==="stop"&&i.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,r){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:a}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(r,a[a.length-1].color);if(a.forEach(p=>{o.addColorStop(p.offset,this.addParentOpacity(r,p.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:h,viewPort:u}=s.screen,[l]=u.viewPorts,c=new ja(s,null);c.attributes.x=new w(s,"x",-h/3),c.attributes.y=new w(s,"y",-h/3),c.attributes.width=new w(s,"width",h),c.attributes.height=new w(s,"height",h);var v=new Br(s,null);v.attributes.transform=new w(s,"transform",this.getAttribute("gradientTransform").getValue()),v.children=[c];var f=new qe(s,null);f.attributes.x=new w(s,"x",0),f.attributes.y=new w(s,"y",0),f.attributes.width=new w(s,"width",l.width),f.attributes.height=new w(s,"height",l.height),f.children=[v];var d=s.createCanvas(l.width,l.height),g=d.getContext("2d");return g.fillStyle=o,f.render(g),g.createPattern(d,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var r=new w(this.document,"color",t);return r.addOpacity(e).getColor()}return t}}class ju extends Ya{constructor(e,t,r){super(e,t,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,t){var r=this.getGradientUnits()==="objectBoundingBox",i=r?t.getBoundingBox(e):null;if(r&&!i)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 a=r?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=r?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=r?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),h=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===s&&o===h?null:e.createLinearGradient(a,o,s,h)}}class Xu extends Ya{constructor(e,t,r){super(e,t,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,t){var r=this.getGradientUnits()==="objectBoundingBox",i=t.getBoundingBox(e);if(r&&!i)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 a=r?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=r?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=a,h=o;this.getAttribute("fx").hasValue()&&(s=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(h=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var u=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),l=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,h,l,a,o,u)}}class Yu extends R{constructor(e,t,r){super(e,t,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),a.hasValue()&&(o=o.addOpacity(a)),this.offset=i,this.color=o.getColor()}}class Ur extends R{constructor(e,t,r){super(e,t,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new w(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var{initialUnits:e}=this,{progress:t,from:r,to:i}=this.getProgress(),a=r.getNumber()+(i.getNumber()-r.getNumber())*t;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:t}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=r.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,r.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var h=s.getString();o="".concat(h,"(").concat(o,")")}r.setValue(o),a=!0}return a}getProgress(){var{document:e,values:t}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(t.hasValue()){var i=r.progress*(t.getValue().length-1),a=Math.floor(i),o=Math.ceil(i);r.from=new w(e,"from",parseFloat(t.getValue()[a])),r.to=new w(e,"to",parseFloat(t.getValue()[o])),r.progress=(i-a)/(o-a)}else r.from=this.from,r.to=this.to;return r}}class Wu extends Ur{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=new pr(t.getColor()),a=new pr(r.getColor());if(i.ok&&a.ok){var o=i.r+(a.r-i.r)*e,s=i.g+(a.g-i.g)*e,h=i.b+(a.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(h),")")}return this.getAttribute("from").getColor()}}class Gu extends Ur{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=Q(t.getString()),a=Q(r.getString()),o=i.map((s,h)=>{var u=a[h];return s+(u-s)*e}).join(" ");return o}}class qu extends R{constructor(e,t,r){super(e,t,r),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:a}=this;for(var o of a)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(i[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var h=o;h.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[h.unicode]>"u"&&(this.glyphs[h.unicode]={}),this.glyphs[h.unicode][h.arabicForm]=h):this.glyphs[h.unicode]=h;break}}}render(){}}class Qu extends R{constructor(e,t,r){super(e,t,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class Zu extends N{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Ku extends fe{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}class Ju extends fe{constructor(e,t,r){super(e,t,r),this.type="a";var{childNodes:i}=t,a=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:r,y:i}=this,{mouse:a}=t.screen,o=new w(t,"fontSize",Y.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new te(r,i-o.getPixels("y"),r+this.measureText(e),i))}else if(this.children.length>0){var s=new Br(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function Qi(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ct(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Qi(Object(t),!0).forEach(function(r){Dr(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Qi(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}class el extends fe{constructor(e,t,r){super(e,t,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(e){var{dataArray:t}=this;e&&e.beginPath(),t.forEach(r=>{var{type:i,points:a}=r;switch(i){case E.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case E.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case E.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case E.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case E.ARC:{var[o,s,h,u,l,c,v,f]=a,d=h>u?h:u,g=h>u?1:h/u,p=h>u?u/h:1;e&&(e.translate(o,s),e.rotate(v),e.scale(g,p),e.arc(0,0,d,l,l+c,!!(1-f)),e.scale(1/g,1/p),e.rotate(-v),e.translate(-o,-s));break}case E.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:i}=this,a=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:h,p1:u,rotation:l,text:c}=o;e.save(),e.translate(h.x,h.y),e.rotate(l),e.fillStyle&&e.fillText(c,0,0),e.strokeStyle&&e.strokeText(c,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(h.x,h.y+r/8),e.lineTo(u.x,u.y+r/5))}),t==="underline"&&(e.lineWidth=r/20,e.strokeStyle=a,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,t,r,i,a,o,s,h,u){var l=o,c=this.measureText(e,h);h===" "&&t==="justify"&&r<i&&(c+=(i-r)/a),u>-1&&(l+=this.getLetterSpacingAt(u));var v=this.textHeight/20,f=this.getEquidistantPointOnPath(l,v,0),d=this.getEquidistantPointOnPath(l+c,v,0),g={p0:f,p1:d},p=f&&d?Math.atan2(d.y-f.y,d.x-f.x):0;if(s){var y=Math.cos(Math.PI/2+p)*s,C=Math.cos(-p)*s;g.p0=ct(ct({},f),{},{x:f.x+y,y:f.y+C}),g.p1=ct(ct({},d),{},{x:d.x+y,y:d.y+C})}return l+=c,{offset:l,segment:g,rotation:p}}measureText(e,t){var{measuresCache:r}=this,i=t||this.getText();if(r.has(i))return r.get(i);var a=this.measureTargetText(e,i);return r.set(i,a),a}setTextData(e){if(!this.glyphInfo){var t=this.getText(),r=t.split(""),i=t.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(x=>x.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),h=this.getStyle("letter-spacing"),u=this.parent.getStyle("letter-spacing"),l=0;!h.hasValue()||h.getValue()==="inherit"?l=u.getPixels():h.hasValue()&&h.getValue()!=="initial"&&h.getValue()!=="unset"&&(l=h.getPixels());var c=[],v=t.length;this.letterSpacingCache=c;for(var f=0;f<v;f++)c.push(typeof a[f]<"u"?a[f]:l);var d=c.reduce((x,O,S)=>S===0?0:x+O||0,0),g=this.measureText(e),p=Math.max(g+d,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var y=this.getPathLength(),C=this.getStyle("startOffset").getNumber(0)*y,b=0;(s==="middle"||s==="center")&&(b=-p/2),(s==="end"||s==="right")&&(b=-p),b+=C,r.forEach((x,O)=>{var{offset:S,segment:T,rotation:A}=this.findSegmentToFitChar(e,s,p,y,i,b,o,x,O);b=S,!(!T.p0||!T.p1)&&this.glyphInfo.push({text:r[O],p0:T.p0,p1:T.p1,rotation:A})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:r}=e;for(r.reset();!r.isEnd();){var{current:i}=r,a=i?i.x:0,o=i?i.y:0,s=r.next(),h=s.type,u=[];switch(s.type){case E.MOVE_TO:this.pathM(r,u);break;case E.LINE_TO:h=this.pathL(r,u);break;case E.HORIZ_LINE_TO:h=this.pathH(r,u);break;case E.VERT_LINE_TO:h=this.pathV(r,u);break;case E.CURVE_TO:this.pathC(r,u);break;case E.SMOOTH_CURVE_TO:h=this.pathS(r,u);break;case E.QUAD_TO:this.pathQ(r,u);break;case E.SMOOTH_QUAD_TO:h=this.pathT(r,u);break;case E.ARC:u=this.pathA(r);break;case E.CLOSE_PATH:N.pathZ(r);break}s.type!==E.CLOSE_PATH?t.push({type:h,points:u,start:{x:a,y:o},pathLength:this.calcLength(a,o,h,u)}):t.push({type:E.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:r,y:i}=N.pathM(e).point;t.push(r,i)}pathL(e,t){var{x:r,y:i}=N.pathL(e).point;return t.push(r,i),E.LINE_TO}pathH(e,t){var{x:r,y:i}=N.pathH(e).point;return t.push(r,i),E.LINE_TO}pathV(e,t){var{x:r,y:i}=N.pathV(e).point;return t.push(r,i),E.LINE_TO}pathC(e,t){var{point:r,controlPoint:i,currentPoint:a}=N.pathC(e);t.push(r.x,r.y,i.x,i.y,a.x,a.y)}pathS(e,t){var{point:r,controlPoint:i,currentPoint:a}=N.pathS(e);return t.push(r.x,r.y,i.x,i.y,a.x,a.y),E.CURVE_TO}pathQ(e,t){var{controlPoint:r,currentPoint:i}=N.pathQ(e);t.push(r.x,r.y,i.x,i.y)}pathT(e,t){var{controlPoint:r,currentPoint:i}=N.pathT(e);return t.push(r.x,r.y,i.x,i.y),E.QUAD_TO}pathA(e){var{rX:t,rY:r,sweepFlag:i,xAxisRotation:a,centp:o,a1:s,ad:h}=N.pathA(e);return i===0&&h>0&&(h-=2*Math.PI),i===1&&h<0&&(h+=2*Math.PI),[o.x,o.y,t,r,s,h,a,i]}calcLength(e,t,r,i){var a=0,o=null,s=null,h=0;switch(r){case E.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case E.CURVE_TO:for(a=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),h=.01;h<=1;h+=.01)s=this.getPointOnCubicBezier(h,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case E.QUAD_TO:for(a=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),h=.01;h<=1;h+=.01)s=this.getPointOnQuadraticBezier(h,e,t,i[0],i[1],i[2],i[3]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case E.ARC:{a=0;var u=i[4],l=i[5],c=i[4]+l,v=Math.PI/180;if(Math.abs(u-c)<v&&(v=Math.abs(u-c)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),l<0)for(h=u-v;h>c;h-=v)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(h=u+v;h<c;h+=v)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),a}}return 0}getPointOnLine(e,t,r,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,h=(a-r)/(i-t+Re),u=Math.sqrt(e*e/(1+h*h));i<t&&(u*=-1);var l=h*u,c=null;if(i===t)c={x:o,y:s+l};else if((s-r)/(o-t+Re)===h)c={x:o+u,y:s+l};else{var v=0,f=0,d=this.getLineLength(t,r,i,a);if(d<Re)return null;var g=(o-t)*(i-t)+(s-r)*(a-r);g/=d*d,v=t+g*(i-t),f=r+g*(a-r);var p=this.getLineLength(o,s,v,f),y=Math.sqrt(e*e-p*p);u=Math.sqrt(y*y/(1+h*h)),i<t&&(u*=-1),l=h*u,c={x:v+u,y:f+l}}return c}getPointOnPath(e){var t=this.getPathLength(),r=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:a}=this;for(var o of a){if(o&&(o.pathLength<5e-5||r+o.pathLength+5e-5<e)){r+=o.pathLength;continue}var s=e-r,h=0;switch(o.type){case E.LINE_TO:i=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case E.ARC:{var u=o.points[4],l=o.points[5],c=o.points[4]+l;if(h=u+s/o.pathLength*l,l<0&&h<c||l>=0&&h>c)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],h,o.points[6]);break}case E.CURVE_TO:h=s/o.pathLength,h>1&&(h=1),i=this.getPointOnCubicBezier(h,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case E.QUAD_TO:h=s/o.pathLength,h>1&&(h=1),i=this.getPointOnQuadraticBezier(h,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(i)return i;break}return null}getLineLength(e,t,r,i){return Math.sqrt((r-e)*(r-e)+(i-t)*(i-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,t)=>t.pathLength>0?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,r,i,a,o,s,h,u){var l=h*Hi(e)+o*ji(e)+i*Xi(e)+t*Yi(e),c=u*Hi(e)+s*ji(e)+a*Xi(e)+r*Yi(e);return{x:l,y:c}}getPointOnQuadraticBezier(e,t,r,i,a,o,s){var h=o*Wi(e)+i*Gi(e)+t*qi(e),u=s*Wi(e)+a*Gi(e)+r*qi(e);return{x:h,y:u}}getPointOnEllipticalArc(e,t,r,i,a,o){var s=Math.cos(o),h=Math.sin(o),u={x:r*Math.cos(a),y:i*Math.sin(a)};return{x:e+(u.x*s-u.y*h),y:t+(u.x*h+u.y*s)}}buildEquidistantCache(e,t){var r=this.getPathLength(),i=t||.25,a=e||r/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==i){this.equidistantCache={step:a,precision:i,points:[]};for(var o=0,s=0;s<=r;s+=i){var h=this.getPointOnPath(s),u=this.getPointOnPath(s+i);!h||!u||(o+=this.getLineLength(h.x,h.y,u.x,u.y),o>=a&&(this.equidistantCache.points.push({x:h.x,y:h.y,distance:s}),o-=a))}}}getEquidistantPointOnPath(e,t,r){if(this.buildEquidistantCache(t,r),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var tl=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class rl extends Te{constructor(e,t,r){super(e,t,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var a=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),a?this.loadSvg(i):this.loadImage(i),this.isSvg=a}}loadImage(e){var t=this;return se(function*(){try{var r=yield t.document.createImage(e);t.image=r}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}t.loaded=!0})()}loadSvg(e){var t=this;return se(function*(){var r=tl.exec(e);if(r){var i=r[5];r[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var a=yield t.document.fetch(e),o=yield a.text();t.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}t.loaded=!0})()}renderChildren(e){var{document:t,image:r,loaded:i}=this,a=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),h=this.getStyle("height").getPixels("y");if(!(!i||!r||!s||!h)){if(e.save(),e.translate(a,o),this.isSvg){var u=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:h});u.document.documentElement.parent=this,u.render()}else{var l=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:l.width,height:h,desiredHeight:l.height}),this.loaded&&(typeof l.complete>"u"||l.complete)&&e.drawImage(l,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new te(e,t,e+r,t+i)}}class il extends Te{constructor(){super(...arguments),this.type="symbol"}render(e){}}class al{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var r=this;return se(function*(){try{var{document:i}=r,a=yield i.canvg.parser.load(t),o=a.getElementsByTagName("font");Array.from(o).forEach(s=>{var h=i.createElement(s);i.definitions[e]=h})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}r.loaded=!0})()}}class Wa extends R{constructor(e,t,r){super(e,t,r),this.type="style";var i=De(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=i.split("}");a.forEach(o=>{var s=o.trim();if(s){var h=s.split("{"),u=h[0].split(","),l=h[1].split(";");u.forEach(c=>{var v=c.trim();if(v){var f=e.styles[v]||{};if(l.forEach(p=>{var y=p.indexOf(":"),C=p.substr(0,y).trim(),b=p.substr(y+1,p.length-y).trim();C&&b&&(f[C]=new w(e,C,b))}),e.styles[v]=f,e.stylesSpecificity[v]=bu(v),v==="@font-face"){var d=f["font-family"].getString().replace(/"|'/g,""),g=f.src.getString().split(",");g.forEach(p=>{if(p.indexOf('format("svg")')>0){var y=La(p);y&&new al(e).load(d,y)}})}}})}})}}Wa.parseExternalUrl=La;class nl extends Te{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var t=this.getAttribute("x"),r=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),r.hasValue()&&e.translate(0,r.getPixels("y"))}path(e){var{element:t}=this;t&&t.path(e)}renderChildren(e){var{document:t,element:r}=this;if(r){var i=r;if(r.type==="symbol"&&(i=new qe(t,null),i.attributes.viewBox=new w(t,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new w(t,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new w(t,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new w(t,"opacity",this.calculateOpacity())),i.type==="svg"){var a=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);a.hasValue()&&(i.attributes.width=new w(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new w(t,"height",o.getString()))}var s=i.parent;i.parent=this,i.render(e),i.parent=s}}getBoundingBox(e){var{element:t}=this;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return Ce.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function vt(n,e,t,r,i,a){return n[t*r*4+e*4+a]}function gt(n,e,t,r,i,a,o){n[t*r*4+e*4+a]=o}function D(n,e,t){var r=n[e];return r*t}function ae(n,e,t,r){return e+Math.cos(n)*t+Math.sin(n)*r}class Ga extends R{constructor(e,t,r){super(e,t,r),this.type="feColorMatrix";var i=Q(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=i[0];i=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[ae(o,.213,.787,-.213),ae(o,.715,-.715,-.715),ae(o,.072,-.072,.928),0,0,ae(o,.213,-.213,.143),ae(o,.715,.285,.14),ae(o,.072,-.072,-.283),0,0,ae(o,.213,-.213,-.787),ae(o,.715,-.715,.715),ae(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[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];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,t,r,i,a){for(var{includeOpacity:o,matrix:s}=this,h=e.getImageData(0,0,i,a),u=0;u<a;u++)for(var l=0;l<i;l++){var c=vt(h.data,l,u,i,a,0),v=vt(h.data,l,u,i,a,1),f=vt(h.data,l,u,i,a,2),d=vt(h.data,l,u,i,a,3),g=D(s,0,c)+D(s,1,v)+D(s,2,f)+D(s,3,d)+D(s,4,1),p=D(s,5,c)+D(s,6,v)+D(s,7,f)+D(s,8,d)+D(s,9,1),y=D(s,10,c)+D(s,11,v)+D(s,12,f)+D(s,13,d)+D(s,14,1),C=D(s,15,c)+D(s,16,v)+D(s,17,f)+D(s,18,d)+D(s,19,1);o&&(g=0,p=0,y=0,C*=d/255),gt(h.data,l,u,i,a,0,g),gt(h.data,l,u,i,a,1,p),gt(h.data,l,u,i,a,2,y),gt(h.data,l,u,i,a,3,C)}e.clearRect(0,0,i,a),e.putImageData(h,0,0)}}class Pt extends R{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var h=new te;this.children.forEach(d=>{h.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(h.x1),a=Math.floor(h.y1),o=Math.floor(h.width),s=Math.floor(h.height)}var u=this.removeStyles(t,Pt.ignoreStyles),l=r.createCanvas(i+o,a+s),c=l.getContext("2d");r.screen.setDefaults(c),this.renderChildren(c),new Ga(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,i+o,a+s);var v=r.createCanvas(i+o,a+s),f=v.getContext("2d");r.screen.setDefaults(f),t.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=c.createPattern(l,"no-repeat"),f.fillRect(0,0,i+o,a+s),e.fillStyle=f.createPattern(v,"no-repeat"),e.fillRect(0,0,i+o,a+s),this.restoreStyles(t,u)}render(e){}}Pt.ignoreStyles=["mask","transform","clip-path"];var Zi=()=>{};class sl extends R{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,r=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;r&&(r.beginPath=Zi,r.closePath=Zi),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Ce.fromElement(t,o)),s&&s.apply(e),o.path(e),r&&(r.closePath=a),s&&s.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),r&&(r.beginPath=i,r.closePath=a)}render(e){}}class Mt extends R{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:r,children:i}=this,a=t.getBoundingBox(e);if(a){var o=0,s=0;i.forEach(y=>{var C=y.extraFilterDistance||0;o=Math.max(o,C),s=Math.max(s,C)});var h=Math.floor(a.width),u=Math.floor(a.height),l=h+2*o,c=u+2*s;if(!(l<1||c<1)){var v=Math.floor(a.x),f=Math.floor(a.y),d=this.removeStyles(t,Mt.ignoreStyles),g=r.createCanvas(l,c),p=g.getContext("2d");r.screen.setDefaults(p),p.translate(-v+o,-f+s),t.render(p),i.forEach(y=>{typeof y.apply=="function"&&y.apply(p,0,0,l,c)}),e.drawImage(g,0,0,l,c,v-o,f-s,l,c),this.restoreStyles(t,d)}}}render(e){}}Mt.ignoreStyles=["filter","transform","clip-path"];class ol extends R{constructor(e,t,r){super(e,t,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,r,i,a){}}class hl extends R{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,r,i,a){}}class ul extends R{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,r,i,a){}}class ll extends R{constructor(e,t,r){super(e,t,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,t,r,i,a){var{document:o,blurRadius:s}=this,h=o.window?o.window.document.body:null,u=e.canvas;u.id=o.getUniqueId(),h&&(u.style.display="none",h.appendChild(u)),iu(u,t,r,i,a,s),h&&h.removeChild(u)}}class fl extends R{constructor(){super(...arguments),this.type="title"}}class cl extends R{constructor(){super(...arguments),this.type="desc"}}var vl={svg:qe,rect:ja,circle:Du,ellipse:Lu,line:Bu,polyline:Xa,polygon:Uu,path:N,pattern:Fu,marker:zu,defs:Hu,linearGradient:ju,radialGradient:Xu,stop:Yu,animate:Ur,animateColor:Wu,animateTransform:Gu,font:qu,"font-face":Qu,"missing-glyph":Zu,glyph:Ha,text:fe,tspan:Nt,tref:Ku,a:Ju,textPath:el,image:rl,g:Br,symbol:il,style:Wa,use:nl,mask:Pt,clipPath:sl,filter:Mt,feDropShadow:ol,feMorphology:hl,feComposite:ul,feColorMatrix:Ga,feGaussianBlur:ll,title:fl,desc:cl};function Ki(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function gl(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ki(Object(t),!0).forEach(function(r){Dr(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ki(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function dl(n,e){var t=document.createElement("canvas");return t.width=n,t.height=e,t}function pl(n){return xr.apply(this,arguments)}function xr(){return xr=se(function*(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=document.createElement("img");return e&&(t.crossOrigin="Anonymous"),new Promise((r,i)=>{t.onload=()=>{r(t)},t.onerror=(a,o,s,h,u)=>{i(u)},t.src=n})}),xr.apply(this,arguments)}class ue{constructor(e){var{rootEmSize:t=12,emSize:r=12,createCanvas:i=ue.createCanvas,createImage:a=ue.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=r,this.createCanvas=i,this.createImage=this.bindCreateImage(a,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,t){return typeof t=="boolean"?(r,i)=>e(r,typeof i=="boolean"?i:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:t}=this;t.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,""),r=ue.elementTypes[t];return typeof r<"u"?new r(this,e):new Ru(this,e)}createTextNode(e){return new _u(this,e)}setViewBox(e){this.screen.setViewBox(gl({document:this},e))}}ue.createCanvas=dl;ue.createImage=pl;ue.elementTypes=vl;function Ji(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function be(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ji(Object(t),!0).forEach(function(r){Dr(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ji(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}class Ue{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new sr(r),this.screen=new At(e,r),this.options=r;var i=new ue(this,r),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var r=arguments;return se(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},a=new sr(i),o=yield a.parse(t);return new Ue(e,o,i)})()}static fromString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new sr(r),a=i.parseFromString(t);return new Ue(e,a,r)}fork(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ue.from(e,t,be(be({},this.options),r))}forkString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ue.fromString(e,t,be(be({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return se(function*(){var r=e.length>0&&e[0]!==void 0?e[0]:{};t.start(be({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield t.ready(),t.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:t,screen:r,options:i}=this;r.start(t,be(be({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,t,r)}}export{Ju as AElement,Wu as AnimateColorElement,Ur as AnimateElement,Gu as AnimateTransformElement,te as BoundingBox,Hi as CB1,ji as CB2,Xi as CB3,Yi as CB4,Ue as Canvg,Du as CircleElement,sl as ClipPathElement,Hu as DefsElement,cl as DescElement,ue as Document,R as Element,Lu as EllipseElement,Ga as FeColorMatrixElement,ul as FeCompositeElement,ol as FeDropShadowElement,ll as FeGaussianBlurElement,hl as FeMorphologyElement,Mt as FilterElement,Y as Font,qu as FontElement,Qu as FontFaceElement,Br as GElement,Ha as GlyphElement,Ya as GradientElement,rl as ImageElement,Bu as LineElement,ju as LinearGradientElement,zu as MarkerElement,Pt as MaskElement,Fa as Matrix,Zu as MissingGlyphElement,Cu as Mouse,Re as PSEUDO_ZERO,sr as Parser,N as PathElement,E as PathParser,Fu as PatternElement,$ as Point,Uu as PolygonElement,Xa as PolylineElement,w as Property,Wi as QB1,Gi as QB2,qi as QB3,Xu as RadialGradientElement,ja as RectElement,Te as RenderedElement,Su as Rotate,qe as SVGElement,al as SVGFontLoader,Ou as Scale,At as Screen,za as Skew,Au as SkewX,Nu as SkewY,Yu as StopElement,Wa as StyleElement,il as SymbolElement,Ku as TRefElement,Nt as TSpanElement,fe as TextElement,el as TextPathElement,fl as TitleElement,Ce as Transform,Eu as Translate,Ru as UnknownElement,nl as UseElement,xu as ViewPort,De as compressSpaces,Ue as default,bu as getSelectorSpecificity,lu as normalizeAttributeName,fu as normalizeColor,La as parseExternalUrl,xl as presets,Q as toNumbers,ou as trimLeft,hu as trimRight,Fi as vectorMagnitude,zi as vectorsAngle,br as vectorsRatio};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings