@ianicdev/datatables2 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datatables.js +1 -1
- package/dist/datatables.mjs +1 -1
- package/dist/{index-BiAkzGw0.js → index-B72z8mEp.js} +79 -79
- package/dist/{index-VMQ_rT2L.mjs → index-daHrn-R8.mjs} +28558 -28508
- package/dist/{index.es-DE6sPf6p.js → index.es-C5TP_Aqs.js} +6 -6
- package/dist/{index.es-C69qHdeQ.mjs → index.es-Dwaj4zef.mjs} +1137 -1133
- package/dist/style.css +1 -1
- package/package.json +23 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-BiAkzGw0.js");var ct=function(a){return a&&a.Math===Math&&a},D=ct(typeof globalThis=="object"&&globalThis)||ct(typeof window=="object"&&window)||ct(typeof self=="object"&&self)||ct(typeof he.commonjsGlobal=="object"&&he.commonjsGlobal)||ct(typeof he.commonjsGlobal=="object"&&he.commonjsGlobal)||function(){return this}()||Function("return this")(),$t={},k=function(a){try{return!!a()}catch{return!0}},sh=k,ve=!sh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),oh=k,Sr=!oh(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),uh=Sr,Ht=Function.prototype.call,Y=uh?Ht.bind(Ht):function(){return Ht.apply(Ht,arguments)},ko={},Lo={}.propertyIsEnumerable,Bo=Object.getOwnPropertyDescriptor,lh=Bo&&!Lo.call({1:2},1);ko.f=lh?function(e){var t=Bo(this,e);return!!t&&t.enumerable}:Lo;var Pi=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Fo=Sr,jo=Function.prototype,Ha=jo.call,hh=Fo&&jo.bind.bind(Ha,Ha),L=Fo?hh:function(a){return function(){return Ha.apply(a,arguments)}},Uo=L,vh=Uo({}.toString),fh=Uo("".slice),Ge=function(a){return fh(vh(a),8,-1)},ch=L,gh=k,dh=Ge,Zr=Object,ph=ch("".split),Go=gh(function(){return!Zr("z").propertyIsEnumerable(0)})?function(a){return dh(a)==="String"?ph(a,""):Zr(a)}:Zr,ze=function(a){return a==null},yh=ze,mh=TypeError,fe=function(a){if(yh(a))throw new mh("Can't call method on "+a);return a},bh=Go,xh=fe,wt=function(a){return bh(xh(a))},Jr=typeof document=="object"&&document.all,B=typeof Jr>"u"&&Jr!==void 0?function(a){return typeof a=="function"||a===Jr}:function(a){return typeof a=="function"},Eh=B,ce=function(a){return typeof a=="object"?a!==null:Eh(a)},ea=D,Sh=B,Th=function(a){return Sh(a)?a:void 0},He=function(a,e){return arguments.length<2?Th(ea[a]):ea[a]&&ea[a][e]},Oh=L,Tr=Oh({}.isPrototypeOf),Or=typeof navigator<"u"&&String(navigator.userAgent)||"",zo=D,ta=Or,Rn=zo.process,Nn=zo.Deno,In=Rn&&Rn.versions||Nn&&Nn.version,Mn=In&&In.v8,le,dr;Mn&&(le=Mn.split("."),dr=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!dr&&ta&&(le=ta.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=ta.match(/Chrome\/(\d+)/),le&&(dr=+le[1])));var Ri=dr,_n=Ri,$h=k,wh=D,Ch=wh.String,Ho=!!Object.getOwnPropertySymbols&&!$h(function(){var a=Symbol("symbol detection");return!Ch(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&_n&&_n<41}),Ah=Ho,Yo=Ah&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ph=He,Rh=B,Nh=Tr,Ih=Yo,Mh=Object,Xo=Ih?function(a){return typeof a=="symbol"}:function(a){var e=Ph("Symbol");return Rh(e)&&Nh(e.prototype,Mh(a))},_h=String,$r=function(a){try{return _h(a)}catch{return"Object"}},Vh=B,Dh=$r,kh=TypeError,Oe=function(a){if(Vh(a))return a;throw new kh(Dh(a)+" is not a function")},Lh=Oe,Bh=ze,lt=function(a,e){var t=a[e];return Bh(t)?void 0:Lh(t)},ra=Y,aa=B,ia=ce,Fh=TypeError,jh=function(a,e){var t,r;if(e==="string"&&aa(t=a.toString)&&!ia(r=ra(t,a))||aa(t=a.valueOf)&&!ia(r=ra(t,a))||e!=="string"&&aa(t=a.toString)&&!ia(r=ra(t,a)))return r;throw new Fh("Can't convert object to primitive value")},Wo={exports:{}},Vn=D,Uh=Object.defineProperty,Ni=function(a,e){try{Uh(Vn,a,{value:e,configurable:!0,writable:!0})}catch{Vn[a]=e}return e},Gh=D,zh=Ni,Dn="__core-js_shared__",kn=Wo.exports=Gh[Dn]||zh(Dn,{});(kn.versions||(kn.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ii=Wo.exports,Ln=Ii,Mi=function(a,e){return Ln[a]||(Ln[a]=e||{})},Hh=fe,Yh=Object,wr=function(a){return Yh(Hh(a))},Xh=L,Wh=wr,qh=Xh({}.hasOwnProperty),ge=Object.hasOwn||function(e,t){return qh(Wh(e),t)},Qh=L,Kh=0,Zh=Math.random(),Jh=Qh(1 .toString),qo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+Jh(++Kh+Zh,36)},ev=D,tv=Mi,Bn=ge,rv=qo,av=Ho,iv=Yo,tt=ev.Symbol,na=tv("wks"),nv=iv?tt.for||tt:tt&&tt.withoutSetter||rv,z=function(a){return Bn(na,a)||(na[a]=av&&Bn(tt,a)?tt[a]:nv("Symbol."+a)),na[a]},sv=Y,Fn=ce,jn=Xo,ov=lt,uv=jh,lv=z,hv=TypeError,vv=lv("toPrimitive"),fv=function(a,e){if(!Fn(a)||jn(a))return a;var t=ov(a,vv),r;if(t){if(e===void 0&&(e="default"),r=sv(t,a,e),!Fn(r)||jn(r))return r;throw new hv("Can't convert object to primitive value")}return e===void 0&&(e="number"),uv(a,e)},cv=fv,gv=Xo,Qo=function(a){var e=cv(a,"string");return gv(e)?e:e+""},dv=D,Un=ce,Ya=dv.document,pv=Un(Ya)&&Un(Ya.createElement),Cr=function(a){return pv?Ya.createElement(a):{}},yv=ve,mv=k,bv=Cr,Ko=!yv&&!mv(function(){return Object.defineProperty(bv("div"),"a",{get:function(){return 7}}).a!==7}),xv=ve,Ev=Y,Sv=ko,Tv=Pi,Ov=wt,$v=Qo,wv=ge,Cv=Ko,Gn=Object.getOwnPropertyDescriptor;$t.f=xv?Gn:function(e,t){if(e=Ov(e),t=$v(t),Cv)try{return Gn(e,t)}catch{}if(wv(e,t))return Tv(!Ev(Sv.f,e,t),e[t])};var $e={},Av=ve,Pv=k,Zo=Av&&Pv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Rv=ce,Nv=String,Iv=TypeError,J=function(a){if(Rv(a))return a;throw new Iv(Nv(a)+" is not an object")},Mv=ve,_v=Ko,Vv=Zo,Yt=J,zn=Qo,Dv=TypeError,sa=Object.defineProperty,kv=Object.getOwnPropertyDescriptor,oa="enumerable",ua="configurable",la="writable";$e.f=Mv?Vv?function(e,t,r){if(Yt(e),t=zn(t),Yt(r),typeof e=="function"&&t==="prototype"&&"value"in r&&la in r&&!r[la]){var i=kv(e,t);i&&i[la]&&(e[t]=r.value,r={configurable:ua in r?r[ua]:i[ua],enumerable:oa in r?r[oa]:i[oa],writable:!1})}return sa(e,t,r)}:sa:function(e,t,r){if(Yt(e),t=zn(t),Yt(r),_v)try{return sa(e,t,r)}catch{}if("get"in r||"set"in r)throw new Dv("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Lv=ve,Bv=$e,Fv=Pi,Ct=Lv?function(a,e,t){return Bv.f(a,e,Fv(1,t))}:function(a,e,t){return a[e]=t,a},Jo={exports:{}},Xa=ve,jv=ge,eu=Function.prototype,Uv=Xa&&Object.getOwnPropertyDescriptor,_i=jv(eu,"name"),Gv=_i&&(function(){}).name==="something",zv=_i&&(!Xa||Xa&&Uv(eu,"name").configurable),Ar={EXISTS:_i,PROPER:Gv,CONFIGURABLE:zv},Hv=L,Yv=B,Wa=Ii,Xv=Hv(Function.toString);Yv(Wa.inspectSource)||(Wa.inspectSource=function(a){return Xv(a)});var Vi=Wa.inspectSource,Wv=D,qv=B,Hn=Wv.WeakMap,Qv=qv(Hn)&&/native code/.test(String(Hn)),Kv=Mi,Zv=qo,Yn=Kv("keys"),Di=function(a){return Yn[a]||(Yn[a]=Zv(a))},ki={},Jv=Qv,tu=D,ef=ce,tf=Ct,ha=ge,va=Ii,rf=Di,af=ki,Xn="Object already initialized",qa=tu.TypeError,nf=tu.WeakMap,pr,St,yr,sf=function(a){return yr(a)?St(a):pr(a,{})},of=function(a){return function(e){var t;if(!ef(e)||(t=St(e)).type!==a)throw new qa("Incompatible receiver, "+a+" required");return t}};if(Jv||va.state){var pe=va.state||(va.state=new nf);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,pr=function(a,e){if(pe.has(a))throw new qa(Xn);return e.facade=a,pe.set(a,e),e},St=function(a){return pe.get(a)||{}},yr=function(a){return pe.has(a)}}else{var Qe=rf("state");af[Qe]=!0,pr=function(a,e){if(ha(a,Qe))throw new qa(Xn);return e.facade=a,tf(a,Qe,e),e},St=function(a){return ha(a,Qe)?a[Qe]:{}},yr=function(a){return ha(a,Qe)}}var Pr={set:pr,get:St,has:yr,enforce:sf,getterFor:of},Li=L,uf=k,lf=B,Xt=ge,Qa=ve,hf=Ar.CONFIGURABLE,vf=Vi,ru=Pr,ff=ru.enforce,cf=ru.get,Wn=String,ur=Object.defineProperty,gf=Li("".slice),df=Li("".replace),pf=Li([].join),yf=Qa&&!uf(function(){return ur(function(){},"length",{value:8}).length!==8}),mf=String(String).split("String"),bf=Jo.exports=function(a,e,t){gf(Wn(e),0,7)==="Symbol("&&(e="["+df(Wn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Xt(a,"name")||hf&&a.name!==e)&&(Qa?ur(a,"name",{value:e,configurable:!0}):a.name=e),yf&&t&&Xt(t,"arity")&&a.length!==t.arity&&ur(a,"length",{value:t.arity});try{t&&Xt(t,"constructor")&&t.constructor?Qa&&ur(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=ff(a);return Xt(r,"source")||(r.source=pf(mf,typeof e=="string"?e:"")),a};Function.prototype.toString=bf(function(){return lf(this)&&cf(this).source||vf(this)},"toString");var au=Jo.exports,xf=B,Ef=$e,Sf=au,Tf=Ni,Ye=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(xf(t)&&Sf(t,n,r),r.global)i?a[e]=t:Tf(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Ef.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},iu={},Of=Math.ceil,$f=Math.floor,wf=Math.trunc||function(e){var t=+e;return(t>0?$f:Of)(t)},Cf=wf,Rr=function(a){var e=+a;return e!==e||e===0?0:Cf(e)},Af=Rr,Pf=Math.max,Rf=Math.min,Nf=function(a,e){var t=Af(a);return t<0?Pf(t+e,0):Rf(t,e)},If=Rr,Mf=Math.min,ht=function(a){var e=If(a);return e>0?Mf(e,9007199254740991):0},_f=ht,Bi=function(a){return _f(a.length)},Vf=wt,Df=Nf,kf=Bi,qn=function(a){return function(e,t,r){var i=Vf(e),n=kf(i);if(n===0)return!a&&-1;var o=Df(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},nu={includes:qn(!0),indexOf:qn(!1)},Lf=L,fa=ge,Bf=wt,Ff=nu.indexOf,jf=ki,Qn=Lf([].push),su=function(a,e){var t=Bf(a),r=0,i=[],n;for(n in t)!fa(jf,n)&&fa(t,n)&&Qn(i,n);for(;e.length>r;)fa(t,n=e[r++])&&(~Ff(i,n)||Qn(i,n));return i},Fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Uf=su,Gf=Fi,zf=Gf.concat("length","prototype");iu.f=Object.getOwnPropertyNames||function(e){return Uf(e,zf)};var ou={};ou.f=Object.getOwnPropertySymbols;var Hf=He,Yf=L,Xf=iu,Wf=ou,qf=J,Qf=Yf([].concat),Kf=Hf("Reflect","ownKeys")||function(e){var t=Xf.f(qf(e)),r=Wf.f;return r?Qf(t,r(e)):t},Kn=ge,Zf=Kf,Jf=$t,ec=$e,tc=function(a,e,t){for(var r=Zf(e),i=ec.f,n=Jf.f,o=0;o<r.length;o++){var s=r[o];!Kn(a,s)&&!(t&&Kn(t,s))&&i(a,s,n(e,s))}},rc=k,ac=B,ic=/#|\.prototype\./,At=function(a,e){var t=sc[nc(a)];return t===uc?!0:t===oc?!1:ac(e)?rc(e):!!e},nc=At.normalize=function(a){return String(a).replace(ic,".").toLowerCase()},sc=At.data={},oc=At.NATIVE="N",uc=At.POLYFILL="P",uu=At,Wt=D,lc=$t.f,hc=Ct,vc=Ye,fc=Ni,cc=tc,gc=uu,ee=function(a,e){var t=a.target,r=a.global,i=a.stat,n,o,s,u,l,h;if(r?o=Wt:i?o=Wt[t]||fc(t,{}):o=Wt[t]&&Wt[t].prototype,o)for(s in e){if(l=e[s],a.dontCallGetSet?(h=lc(o,s),u=h&&h.value):u=o[s],n=gc(r?s:t+(i?".":"#")+s,a.forced),!n&&u!==void 0){if(typeof l==typeof u)continue;cc(l,u)}(a.sham||u&&u.sham)&&hc(l,"sham",!0),vc(o,s,l,a)}},dc=D,pc=Ge,Pt=pc(dc.process)==="process",yc=L,mc=Oe,bc=function(a,e,t){try{return yc(mc(Object.getOwnPropertyDescriptor(a,e)[t]))}catch{}},xc=ce,Ec=function(a){return xc(a)||a===null},Sc=Ec,Tc=String,Oc=TypeError,$c=function(a){if(Sc(a))return a;throw new Oc("Can't set "+Tc(a)+" as a prototype")},wc=bc,Cc=ce,Ac=fe,Pc=$c,lu=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,e={},t;try{t=wc(Object.prototype,"__proto__","set"),t(e,[]),a=e instanceof Array}catch{}return function(i,n){return Ac(i),Pc(n),Cc(i)&&(a?t(i,n):i.__proto__=n),i}}():void 0),Rc=$e.f,Nc=ge,Ic=z,Zn=Ic("toStringTag"),Nr=function(a,e,t){a&&!t&&(a=a.prototype),a&&!Nc(a,Zn)&&Rc(a,Zn,{configurable:!0,value:e})},Jn=au,Mc=$e,_c=function(a,e,t){return t.get&&Jn(t.get,e,{getter:!0}),t.set&&Jn(t.set,e,{setter:!0}),Mc.f(a,e,t)},Vc=He,Dc=_c,kc=z,Lc=ve,es=kc("species"),Bc=function(a){var e=Vc(a);Lc&&e&&!e[es]&&Dc(e,es,{configurable:!0,get:function(){return this}})},Fc=Tr,jc=TypeError,Uc=function(a,e){if(Fc(e,a))return a;throw new jc("Incorrect invocation")},Gc=z,zc=Gc("toStringTag"),hu={};hu[zc]="z";var Hc=String(hu)==="[object z]",Yc=Hc,Xc=B,lr=Ge,Wc=z,qc=Wc("toStringTag"),Qc=Object,Kc=lr(function(){return arguments}())==="Arguments",Zc=function(a,e){try{return a[e]}catch{}},ji=Yc?lr:function(a){var e,t,r;return a===void 0?"Undefined":a===null?"Null":typeof(t=Zc(e=Qc(a),qc))=="string"?t:Kc?lr(e):(r=lr(e))==="Object"&&Xc(e.callee)?"Arguments":r},Jc=L,eg=k,vu=B,tg=ji,rg=He,ag=Vi,fu=function(){},cu=rg("Reflect","construct"),Ui=/^\s*(?:class|function)\b/,ig=Jc(Ui.exec),ng=!Ui.test(fu),gt=function(e){if(!vu(e))return!1;try{return cu(fu,[],e),!0}catch{return!1}},gu=function(e){if(!vu(e))return!1;switch(tg(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ng||!!ig(Ui,ag(e))}catch{return!0}};gu.sham=!0;var sg=!cu||eg(function(){var a;return gt(gt.call)||!gt(Object)||!gt(function(){a=!0})||a})?gu:gt,og=sg,ug=$r,lg=TypeError,hg=function(a){if(og(a))return a;throw new lg(ug(a)+" is not a constructor")},ts=J,vg=hg,fg=ze,cg=z,gg=cg("species"),du=function(a,e){var t=ts(a).constructor,r;return t===void 0||fg(r=ts(t)[gg])?e:vg(r)},dg=Sr,pu=Function.prototype,rs=pu.apply,as=pu.call,yu=typeof Reflect=="object"&&Reflect.apply||(dg?as.bind(rs):function(){return as.apply(rs,arguments)}),pg=Ge,yg=L,Ir=function(a){if(pg(a)==="Function")return yg(a)},is=Ir,mg=Oe,bg=Sr,xg=is(is.bind),Gi=function(a,e){return mg(a),e===void 0?a:bg?xg(a,e):function(){return a.apply(e,arguments)}},Eg=He,mu=Eg("document","documentElement"),Sg=L,Tg=Sg([].slice),Og=TypeError,$g=function(a,e){if(a<e)throw new Og("Not enough arguments");return a},wg=Or,bu=/(?:ipad|iphone|ipod).*applewebkit/i.test(wg),ie=D,Cg=yu,Ag=Gi,ns=B,Pg=ge,xu=k,ss=mu,Rg=Tg,os=Cr,Ng=$g,Ig=bu,Mg=Pt,Ka=ie.setImmediate,Za=ie.clearImmediate,_g=ie.process,ca=ie.Dispatch,Vg=ie.Function,us=ie.MessageChannel,Dg=ie.String,ga=0,xt={},ls="onreadystatechange",Tt,Ve,da,pa;xu(function(){Tt=ie.location});var zi=function(a){if(Pg(xt,a)){var e=xt[a];delete xt[a],e()}},ya=function(a){return function(){zi(a)}},hs=function(a){zi(a.data)},vs=function(a){ie.postMessage(Dg(a),Tt.protocol+"//"+Tt.host)};(!Ka||!Za)&&(Ka=function(e){Ng(arguments.length,1);var t=ns(e)?e:Vg(e),r=Rg(arguments,1);return xt[++ga]=function(){Cg(t,void 0,r)},Ve(ga),ga},Za=function(e){delete xt[e]},Mg?Ve=function(a){_g.nextTick(ya(a))}:ca&&ca.now?Ve=function(a){ca.now(ya(a))}:us&&!Ig?(da=new us,pa=da.port2,da.port1.onmessage=hs,Ve=Ag(pa.postMessage,pa)):ie.addEventListener&&ns(ie.postMessage)&&!ie.importScripts&&Tt&&Tt.protocol!=="file:"&&!xu(vs)?(Ve=vs,ie.addEventListener("message",hs,!1)):ls in os("script")?Ve=function(a){ss.appendChild(os("script"))[ls]=function(){ss.removeChild(this),zi(a)}}:Ve=function(a){setTimeout(ya(a),0)});var Eu={set:Ka,clear:Za},fs=D,kg=ve,Lg=Object.getOwnPropertyDescriptor,Bg=function(a){if(!kg)return fs[a];var e=Lg(fs,a);return e&&e.value},Su=function(){this.head=null,this.tail=null};Su.prototype={add:function(a){var e={item:a,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var a=this.head;if(a){var e=this.head=a.next;return e===null&&(this.tail=null),a.item}}};var Tu=Su,Fg=Or,jg=/ipad|iphone|ipod/i.test(Fg)&&typeof Pebble<"u",Ug=Or,Gg=/web0s(?!.*chrome)/i.test(Ug),st=D,zg=Bg,cs=Gi,ma=Eu.set,Hg=Tu,Yg=bu,Xg=jg,Wg=Gg,ba=Pt,gs=st.MutationObserver||st.WebKitMutationObserver,ds=st.document,ps=st.process,qt=st.Promise,Ja=zg("queueMicrotask"),Ke,xa,Ea,Qt,ys;if(!Ja){var Kt=new Hg,Zt=function(){var a,e;for(ba&&(a=ps.domain)&&a.exit();e=Kt.get();)try{e()}catch(t){throw Kt.head&&Ke(),t}a&&a.enter()};!Yg&&!ba&&!Wg&&gs&&ds?(xa=!0,Ea=ds.createTextNode(""),new gs(Zt).observe(Ea,{characterData:!0}),Ke=function(){Ea.data=xa=!xa}):!Xg&&qt&&qt.resolve?(Qt=qt.resolve(void 0),Qt.constructor=qt,ys=cs(Qt.then,Qt),Ke=function(){ys(Zt)}):ba?Ke=function(){ps.nextTick(Zt)}:(ma=cs(ma,st),Ke=function(){ma(Zt)}),Ja=function(a){Kt.head||Ke(),Kt.add(a)}}var qg=Ja,Qg=function(a,e){try{arguments.length===1?console.error(a):console.error(a,e)}catch{}},Hi=function(a){try{return{error:!1,value:a()}}catch(e){return{error:!0,value:e}}},Kg=D,Mr=Kg.Promise,Ou=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",Zg=Ou,Jg=Pt,ed=!Zg&&!Jg&&typeof window=="object"&&typeof document=="object",td=D,Et=Mr,rd=B,ad=uu,id=Vi,nd=z,sd=ed,od=Ou,Sa=Ri;Et&&Et.prototype;var ud=nd("species"),ei=!1,$u=rd(td.PromiseRejectionEvent),ld=ad("Promise",function(){var a=id(Et),e=a!==String(Et);if(!e&&Sa===66)return!0;if(!Sa||Sa<51||!/native code/.test(a)){var t=new Et(function(n){n(1)}),r=function(n){n(function(){},function(){})},i=t.constructor={};if(i[ud]=r,ei=t.then(function(){})instanceof r,!ei)return!0}return!e&&(sd||od)&&!$u}),Rt={CONSTRUCTOR:ld,REJECTION_EVENT:$u,SUBCLASSING:ei},vt={},ms=Oe,hd=TypeError,vd=function(a){var e,t;this.promise=new a(function(r,i){if(e!==void 0||t!==void 0)throw new hd("Bad Promise constructor");e=r,t=i}),this.resolve=ms(e),this.reject=ms(t)};vt.f=function(a){return new vd(a)};var fd=ee,mr=Pt,Ae=D,ot=Y,bs=Ye,xs=lu,cd=Nr,gd=Bc,dd=Oe,hr=B,pd=ce,yd=Uc,md=du,wu=Eu.set,Yi=qg,bd=Qg,xd=Hi,Ed=Tu,Cu=Pr,br=Mr,Xi=Rt,Au=vt,_r="Promise",Pu=Xi.CONSTRUCTOR,Sd=Xi.REJECTION_EVENT,Td=Xi.SUBCLASSING,Ta=Cu.getterFor(_r),Od=Cu.set,et=br&&br.prototype,Be=br,Jt=et,Ru=Ae.TypeError,ti=Ae.document,Wi=Ae.process,ri=Au.f,$d=ri,wd=!!(ti&&ti.createEvent&&Ae.dispatchEvent),Nu="unhandledrejection",Cd="rejectionhandled",Es=0,Iu=1,Ad=2,qi=1,Mu=2,er,Ss,Pd,Ts,_u=function(a){var e;return pd(a)&&hr(e=a.then)?e:!1},Vu=function(a,e){var t=e.value,r=e.state===Iu,i=r?a.ok:a.fail,n=a.resolve,o=a.reject,s=a.domain,u,l,h;try{i?(r||(e.rejection===Mu&&Nd(e),e.rejection=qi),i===!0?u=t:(s&&s.enter(),u=i(t),s&&(s.exit(),h=!0)),u===a.promise?o(new Ru("Promise-chain cycle")):(l=_u(u))?ot(l,u,n,o):n(u)):o(t)}catch(f){s&&!h&&s.exit(),o(f)}},Du=function(a,e){a.notified||(a.notified=!0,Yi(function(){for(var t=a.reactions,r;r=t.get();)Vu(r,a);a.notified=!1,e&&!a.rejection&&Rd(a)}))},ku=function(a,e,t){var r,i;wd?(r=ti.createEvent("Event"),r.promise=e,r.reason=t,r.initEvent(a,!1,!0),Ae.dispatchEvent(r)):r={promise:e,reason:t},!Sd&&(i=Ae["on"+a])?i(r):a===Nu&&bd("Unhandled promise rejection",t)},Rd=function(a){ot(wu,Ae,function(){var e=a.facade,t=a.value,r=Os(a),i;if(r&&(i=xd(function(){mr?Wi.emit("unhandledRejection",t,e):ku(Nu,e,t)}),a.rejection=mr||Os(a)?Mu:qi,i.error))throw i.value})},Os=function(a){return a.rejection!==qi&&!a.parent},Nd=function(a){ot(wu,Ae,function(){var e=a.facade;mr?Wi.emit("rejectionHandled",e):ku(Cd,e,a.value)})},rt=function(a,e,t){return function(r){a(e,r,t)}},it=function(a,e,t){a.done||(a.done=!0,t&&(a=t),a.value=e,a.state=Ad,Du(a,!0))},ai=function(a,e,t){if(!a.done){a.done=!0,t&&(a=t);try{if(a.facade===e)throw new Ru("Promise can't be resolved itself");var r=_u(e);r?Yi(function(){var i={done:!1};try{ot(r,e,rt(ai,i,a),rt(it,i,a))}catch(n){it(i,n,a)}}):(a.value=e,a.state=Iu,Du(a,!1))}catch(i){it({done:!1},i,a)}}};if(Pu&&(Be=function(e){yd(this,Jt),dd(e),ot(er,this);var t=Ta(this);try{e(rt(ai,t),rt(it,t))}catch(r){it(t,r)}},Jt=Be.prototype,er=function(e){Od(this,{type:_r,done:!1,notified:!1,parent:!1,reactions:new Ed,rejection:!1,state:Es,value:void 0})},er.prototype=bs(Jt,"then",function(e,t){var r=Ta(this),i=ri(md(this,Be));return r.parent=!0,i.ok=hr(e)?e:!0,i.fail=hr(t)&&t,i.domain=mr?Wi.domain:void 0,r.state===Es?r.reactions.add(i):Yi(function(){Vu(i,r)}),i.promise}),Ss=function(){var a=new er,e=Ta(a);this.promise=a,this.resolve=rt(ai,e),this.reject=rt(it,e)},Au.f=ri=function(a){return a===Be||a===Pd?new Ss(a):$d(a)},hr(br)&&et!==Object.prototype)){Ts=et.then,Td||bs(et,"then",function(e,t){var r=this;return new Be(function(i,n){ot(Ts,r,i,n)}).then(e,t)},{unsafe:!0});try{delete et.constructor}catch{}xs&&xs(et,Jt)}fd({global:!0,constructor:!0,wrap:!0,forced:Pu},{Promise:Be});cd(Be,_r,!1);gd(_r);var Nt={},Id=z,Md=Nt,_d=Id("iterator"),Vd=Array.prototype,Dd=function(a){return a!==void 0&&(Md.Array===a||Vd[_d]===a)},kd=ji,$s=lt,Ld=ze,Bd=Nt,Fd=z,jd=Fd("iterator"),Lu=function(a){if(!Ld(a))return $s(a,jd)||$s(a,"@@iterator")||Bd[kd(a)]},Ud=Y,Gd=Oe,zd=J,Hd=$r,Yd=Lu,Xd=TypeError,Wd=function(a,e){var t=arguments.length<2?Yd(a):e;if(Gd(t))return zd(Ud(t,a));throw new Xd(Hd(a)+" is not iterable")},qd=Y,ws=J,Qd=lt,Kd=function(a,e,t){var r,i;ws(a);try{if(r=Qd(a,"return"),!r){if(e==="throw")throw t;return t}r=qd(r,a)}catch(n){i=!0,r=n}if(e==="throw")throw t;if(i)throw r;return ws(r),t},Zd=Gi,Jd=Y,ep=J,tp=$r,rp=Dd,ap=Bi,Cs=Tr,ip=Wd,np=Lu,As=Kd,sp=TypeError,vr=function(a,e){this.stopped=a,this.result=e},Ps=vr.prototype,Bu=function(a,e,t){var r=t&&t.that,i=!!(t&&t.AS_ENTRIES),n=!!(t&&t.IS_RECORD),o=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),u=Zd(e,r),l,h,f,c,v,d,g,p=function(x){return l&&As(l,"normal",x),new vr(!0,x)},y=function(x){return i?(ep(x),s?u(x[0],x[1],p):u(x[0],x[1])):s?u(x,p):u(x)};if(n)l=a.iterator;else if(o)l=a;else{if(h=np(a),!h)throw new sp(tp(a)+" is not iterable");if(rp(h)){for(f=0,c=ap(a);c>f;f++)if(v=y(a[f]),v&&Cs(Ps,v))return v;return new vr(!1)}l=ip(a,h)}for(d=n?a.next:l.next;!(g=Jd(d,l)).done;){try{v=y(g.value)}catch(x){As(l,"throw",x)}if(typeof v=="object"&&v&&Cs(Ps,v))return v}return new vr(!1)},op=z,Fu=op("iterator"),ju=!1;try{var up=0,Rs={next:function(){return{done:!!up++}},return:function(){ju=!0}};Rs[Fu]=function(){return this},Array.from(Rs,function(){throw 2})}catch{}var lp=function(a,e){try{if(!e&&!ju)return!1}catch{return!1}var t=!1;try{var r={};r[Fu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},hp=Mr,vp=lp,fp=Rt.CONSTRUCTOR,Uu=fp||!vp(function(a){hp.all(a).then(void 0,function(){})}),cp=ee,gp=Y,dp=Oe,pp=vt,yp=Hi,mp=Bu,bp=Uu;cp({target:"Promise",stat:!0,forced:bp},{all:function(e){var t=this,r=pp.f(t),i=r.resolve,n=r.reject,o=yp(function(){var s=dp(t.resolve),u=[],l=0,h=1;mp(e,function(f){var c=l++,v=!1;h++,gp(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var xp=ee,Ep=Rt.CONSTRUCTOR,ii=Mr,Sp=He,Tp=B,Op=Ye,Ns=ii&&ii.prototype;xp({target:"Promise",proto:!0,forced:Ep,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Tp(ii)){var Is=Sp("Promise").prototype.catch;Ns.catch!==Is&&Op(Ns,"catch",Is,{unsafe:!0})}var $p=ee,wp=Y,Cp=Oe,Ap=vt,Pp=Hi,Rp=Bu,Np=Uu;$p({target:"Promise",stat:!0,forced:Np},{race:function(e){var t=this,r=Ap.f(t),i=r.reject,n=Pp(function(){var o=Cp(t.resolve);Rp(e,function(s){wp(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Ip=ee,Mp=vt,_p=Rt.CONSTRUCTOR;Ip({target:"Promise",stat:!0,forced:_p},{reject:function(e){var t=Mp.f(this),r=t.reject;return r(e),t.promise}});var Vp=J,Dp=ce,kp=vt,Lp=function(a,e){if(Vp(a),Dp(e)&&e.constructor===a)return e;var t=kp.f(a),r=t.resolve;return r(e),t.promise},Bp=ee,Fp=He,jp=Rt.CONSTRUCTOR,Up=Lp;Fp("Promise");Bp({target:"Promise",stat:!0,forced:jp},{resolve:function(e){return Up(this,e)}});function Ms(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Se(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Ms(n,r,i,o,s,"next",u)}function s(u){Ms(n,r,i,o,s,"throw",u)}o(void 0)})}}var Gp=ji,zp=String,ye=function(a){if(Gp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return zp(a)},Hp=J,Gu=function(){var a=Hp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Qi=k,Yp=D,Ki=Yp.RegExp,Zi=Qi(function(){var a=Ki("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),Xp=Zi||Qi(function(){return!Ki("a","y").sticky}),Wp=Zi||Qi(function(){var a=Ki("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),zu={BROKEN_CARET:Wp,MISSED_STICKY:Xp,UNSUPPORTED_Y:Zi},Hu={},qp=su,Qp=Fi,Kp=Object.keys||function(e){return qp(e,Qp)},Zp=ve,Jp=Zo,ey=$e,ty=J,ry=wt,ay=Kp;Hu.f=Zp&&!Jp?Object.defineProperties:function(e,t){ty(e);for(var r=ry(t),i=ay(t),n=i.length,o=0,s;n>o;)ey.f(e,s=i[o++],r[s]);return e};var iy=J,ny=Hu,_s=Fi,sy=ki,oy=mu,uy=Cr,ly=Di,Vs=">",Ds="<",ni="prototype",si="script",Yu=ly("IE_PROTO"),Oa=function(){},Xu=function(a){return Ds+si+Vs+a+Ds+"/"+si+Vs},ks=function(a){a.write(Xu("")),a.close();var e=a.parentWindow.Object;return a=null,e},hy=function(){var a=uy("iframe"),e="java"+si+":",t;return a.style.display="none",oy.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Xu("document.F=Object")),t.close(),t.F},tr,fr=function(){try{tr=new ActiveXObject("htmlfile")}catch{}fr=typeof document<"u"?document.domain&&tr?ks(tr):hy():ks(tr);for(var a=_s.length;a--;)delete fr[ni][_s[a]];return fr()};sy[Yu]=!0;var Ji=Object.create||function(e,t){var r;return e!==null?(Oa[ni]=iy(e),r=new Oa,Oa[ni]=null,r[Yu]=e):r=fr(),t===void 0?r:ny.f(r,t)},vy=k,fy=D,cy=fy.RegExp,gy=vy(function(){var a=cy(".","s");return!(a.dotAll&&a.test(`
|
|
2
|
-
`)&&a.flags==="s")}),
|
|
3
|
-
`)&&(p="(?: "+p+")",x=" "+x,y++),s=new RegExp("^(?:"+p+")",g)),li&&(s=new RegExp("^"+p+"$(?!\\s)",g)),ui&&(u=t.lastIndex),l=at(xr,d?s:t,x),d?l?(l.input=$a(l.input,y),l[0]=$a(l[0],y),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:ui&&l&&(t.lastIndex=t.global?l.index+l[0].length:u),li&&l&&l.length>1&&at(Cy,l[0],s,function(){for(h=1;h<arguments.length-2;h++)arguments[h]===void 0&&(l[h]=void 0)}),l&&v)for(l.groups=f=Ty(null),h=0;h<v.length;h++)c=v[h],f[c[0]]=l[c[1]];return l});var en=oi,Iy=ee,Ls=en;Iy({target:"RegExp",proto:!0,forced:/./.exec!==Ls},{exec:Ls});var Bs=Y,Fs=Ye,My=en,js=k,qu=z,_y=Ct,Vy=qu("species"),wa=RegExp.prototype,tn=function(a,e,t,r){var i=qu(a),n=!js(function(){var l={};return l[i]=function(){return 7},""[a](l)!==7}),o=n&&!js(function(){var l=!1,h=/a/;return a==="split"&&(h={},h.constructor={},h.constructor[Vy]=function(){return h},h.flags="",h[i]=/./[i]),h.exec=function(){return l=!0,null},h[i](""),!l});if(!n||!o||t){var s=/./[i],u=e(i,""[a],function(l,h,f,c,v){var d=h.exec;return d===My||d===wa.exec?n&&!v?{done:!0,value:Bs(s,h,f,c)}:{done:!0,value:Bs(l,f,h,c)}:{done:!1}});Fs(String.prototype,a,u[0]),Fs(wa,i,u[1])}r&&_y(wa[i],"sham",!0)},rn=L,Dy=Rr,ky=ye,Ly=fe,By=rn("".charAt),Us=rn("".charCodeAt),Fy=rn("".slice),Gs=function(a){return function(e,t){var r=ky(Ly(e)),i=Dy(t),n=r.length,o,s;return i<0||i>=n?a?"":void 0:(o=Us(r,i),o<55296||o>56319||i+1===n||(s=Us(r,i+1))<56320||s>57343?a?By(r,i):o:a?Fy(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},jy={codeAt:Gs(!1),charAt:Gs(!0)},Uy=jy.charAt,an=function(a,e,t){return e+(t?Uy(a,e).length:1)},zs=Y,Gy=J,zy=B,Hy=Ge,Yy=en,Xy=TypeError,nn=function(a,e){var t=a.exec;if(zy(t)){var r=zs(t,a,e);return r!==null&&Gy(r),r}if(Hy(a)==="RegExp")return zs(Yy,a,e);throw new Xy("RegExp#exec called on incompatible receiver")},Wy=Y,qy=tn,Qy=J,Ky=ze,Zy=ht,Ca=ye,Jy=fe,em=lt,tm=an,Hs=nn;qy("match",function(a,e,t){return[function(i){var n=Jy(this),o=Ky(i)?void 0:em(i,a);return o?Wy(o,i,n):new RegExp(i)[a](Ca(n))},function(r){var i=Qy(this),n=Ca(r),o=t(e,i,n);if(o.done)return o.value;if(!i.global)return Hs(i,n);var s=i.unicode;i.lastIndex=0;for(var u=[],l=0,h;(h=Hs(i,n))!==null;){var f=Ca(h[0]);u[l]=f,f===""&&(i.lastIndex=tm(n,Zy(i.lastIndex),s)),l++}return l===0?null:u}]});var sn=L,rm=wr,am=Math.floor,Aa=sn("".charAt),im=sn("".replace),Pa=sn("".slice),nm=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,sm=/\$([$&'`]|\d{1,2})/g,om=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=sm;return i!==void 0&&(i=rm(i),u=nm),im(n,u,function(l,h){var f;switch(Aa(h,0)){case"$":return"$";case"&":return a;case"`":return Pa(e,0,t);case"'":return Pa(e,o);case"<":f=i[Pa(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=am(c/10);return v===0?l:v<=s?r[v-1]===void 0?Aa(h,1):r[v-1]+Aa(h,1):l}f=r[c-1]}return f===void 0?"":f})},um=yu,Ys=Y,Dr=L,lm=tn,hm=k,vm=J,fm=B,cm=ze,gm=Rr,dm=ht,Ze=ye,pm=fe,ym=an,mm=lt,bm=om,xm=nn,Em=z,hi=Em("replace"),Sm=Math.max,Tm=Math.min,Om=Dr([].concat),Ra=Dr([].push),Xs=Dr("".indexOf),Ws=Dr("".slice),$m=function(a){return a===void 0?a:String(a)},wm=function(){return"a".replace(/./,"$0")==="$0"}(),qs=function(){return/./[hi]?/./[hi]("a","$0")==="":!1}(),Cm=!hm(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$<a>")!=="7"});lm("replace",function(a,e,t){var r=qs?"$":"$0";return[function(n,o){var s=pm(this),u=cm(n)?void 0:mm(n,hi);return u?Ys(u,n,s,o):Ys(e,Ze(s),n,o)},function(i,n){var o=vm(this),s=Ze(i);if(typeof n=="string"&&Xs(n,r)===-1&&Xs(n,"$<")===-1){var u=t(e,o,s,n);if(u.done)return u.value}var l=fm(n);l||(n=Ze(n));var h=o.global,f;h&&(f=o.unicode,o.lastIndex=0);for(var c=[],v;v=xm(o,s),!(v===null||(Ra(c,v),!h));){var d=Ze(v[0]);d===""&&(o.lastIndex=ym(s,dm(o.lastIndex),f))}for(var g="",p=0,y=0;y<c.length;y++){v=c[y];for(var x=Ze(v[0]),b=Sm(Tm(gm(v.index),s.length),0),E=[],w,O=1;O<v.length;O++)Ra(E,$m(v[O]));var S=v.groups;if(l){var C=Om([x],E,b,s);S!==void 0&&Ra(C,S),w=Ze(um(n,void 0,C))}else w=bm(x,s,b,E,S,n);b>=p&&(g+=Ws(s,p,b)+w,p=b+x.length)}return g+Ws(s,p)}]},!Cm||!wm||qs);var Am=ce,Pm=Ge,Rm=z,Nm=Rm("match"),Im=function(a){var e;return Am(a)&&((e=a[Nm])!==void 0?!!e:Pm(a)==="RegExp")},Mm=Im,_m=TypeError,on=function(a){if(Mm(a))throw new _m("The method doesn't accept regular expressions");return a},Vm=z,Dm=Vm("match"),un=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[Dm]=!1,"/./"[a](e)}catch{}}return!1},km=ee,Lm=Ir,Bm=$t.f,Fm=ht,Qs=ye,jm=on,Um=fe,Gm=un,zm=Lm("".slice),Hm=Math.min,Qu=Gm("startsWith"),Ym=!Qu&&!!function(){var a=Bm(String.prototype,"startsWith");return a&&!a.writable}();km({target:"String",proto:!0,forced:!Ym&&!Qu},{startsWith:function(e){var t=Qs(Um(this));jm(e);var r=Fm(Hm(arguments.length>1?arguments[1]:void 0,t.length)),i=Qs(e);return zm(t,r,r+i.length)===i}});var Xm=z,Wm=Ji,qm=$e.f,vi=Xm("unscopables"),fi=Array.prototype;fi[vi]===void 0&&qm(fi,vi,{configurable:!0,value:Wm(null)});var Qm=function(a){fi[vi][a]=!0},Km=k,Zm=!Km(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),Jm=ge,e0=B,t0=wr,r0=Di,a0=Zm,Ks=r0("IE_PROTO"),ci=Object,i0=ci.prototype,Ku=a0?ci.getPrototypeOf:function(a){var e=t0(a);if(Jm(e,Ks))return e[Ks];var t=e.constructor;return e0(t)&&e instanceof t?t.prototype:e instanceof ci?i0:null},n0=k,s0=B,o0=ce,Zs=Ku,u0=Ye,l0=z,gi=l0("iterator"),Zu=!1,Ue,Na,Ia;[].keys&&(Ia=[].keys(),"next"in Ia?(Na=Zs(Zs(Ia)),Na!==Object.prototype&&(Ue=Na)):Zu=!0);var h0=!o0(Ue)||n0(function(){var a={};return Ue[gi].call(a)!==a});h0&&(Ue={});s0(Ue[gi])||u0(Ue,gi,function(){return this});var Ju={IteratorPrototype:Ue,BUGGY_SAFARI_ITERATORS:Zu},v0=Ju.IteratorPrototype,f0=Ji,c0=Pi,g0=Nr,d0=Nt,p0=function(){return this},y0=function(a,e,t,r){var i=e+" Iterator";return a.prototype=f0(v0,{next:c0(+!r,t)}),g0(a,i,!1),d0[i]=p0,a},m0=ee,b0=Y,el=Ar,x0=B,E0=y0,Js=Ku,eo=lu,S0=Nr,T0=Ct,Ma=Ye,O0=z,$0=Nt,tl=Ju,w0=el.PROPER,C0=el.CONFIGURABLE,to=tl.IteratorPrototype,rr=tl.BUGGY_SAFARI_ITERATORS,dt=O0("iterator"),ro="keys",pt="values",ao="entries",A0=function(){return this},P0=function(a,e,t,r,i,n,o){E0(t,e,r);var s=function(y){if(y===i&&c)return c;if(!rr&&y&&y in h)return h[y];switch(y){case ro:return function(){return new t(this,y)};case pt:return function(){return new t(this,y)};case ao:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[dt]||h["@@iterator"]||i&&h[i],c=!rr&&f||s(i),v=e==="Array"&&h.entries||f,d,g,p;if(v&&(d=Js(v.call(new a)),d!==Object.prototype&&d.next&&(Js(d)!==to&&(eo?eo(d,to):x0(d[dt])||Ma(d,dt,A0)),S0(d,u,!0))),w0&&i===pt&&f&&f.name!==pt&&(C0?T0(h,"name",pt):(l=!0,c=function(){return b0(f,this)})),i)if(g={values:s(pt),keys:n?c:s(ro),entries:s(ao)},o)for(p in g)(rr||l||!(p in h))&&Ma(h,p,g[p]);else m0({target:e,proto:!0,forced:rr||l},g);return h[dt]!==c&&Ma(h,dt,c,{name:i}),$0[e]=c,g},R0=function(a,e){return{value:a,done:e}},N0=wt,ln=Qm,io=Nt,rl=Pr,I0=$e.f,M0=P0,ar=R0,_0=ve,al="Array Iterator",V0=rl.set,D0=rl.getterFor(al),k0=M0(Array,"Array",function(a,e){V0(this,{type:al,target:N0(a),index:0,kind:e})},function(){var a=D0(this),e=a.target,t=a.index++;if(!e||t>=e.length)return a.target=void 0,ar(void 0,!0);switch(a.kind){case"keys":return ar(t,!1);case"values":return ar(e[t],!1)}return ar([t,e[t]],!1)},"values"),no=io.Arguments=io.Array;ln("keys");ln("values");ln("entries");if(_0&&no.name!=="values")try{I0(no,"name",{value:"values"})}catch{}var L0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},B0=Cr,_a=B0("span").classList,so=_a&&_a.constructor&&_a.constructor.prototype,F0=so===Object.prototype?void 0:so,oo=D,il=L0,j0=F0,mt=k0,uo=Ct,U0=Nr,G0=z,Va=G0("iterator"),Da=mt.values,nl=function(a,e){if(a){if(a[Va]!==Da)try{uo(a,Va,Da)}catch{a[Va]=Da}if(U0(a,e,!0),il[e]){for(var t in mt)if(a[t]!==mt[t])try{uo(a,t,mt[t])}catch{a[t]=mt[t]}}}};for(var ka in il)nl(oo[ka]&&oo[ka].prototype,ka);nl(j0,"DOMTokenList");function z0(a,e){if(he._typeof(a)!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(he._typeof(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function H0(a){var e=z0(a,"string");return he._typeof(e)=="symbol"?e:e+""}function hn(a,e,t){return(e=H0(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var Y0=Oe,X0=wr,W0=Go,q0=Bi,lo=TypeError,ho="Reduce of empty array with no initial value",vo=function(a){return function(e,t,r,i){var n=X0(e),o=W0(n),s=q0(n);if(Y0(t),s===0&&r<2)throw new lo(ho);var u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw new lo(ho)}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},Q0={left:vo(!1),right:vo(!0)},K0=k,sl=function(a,e){var t=[][a];return!!t&&K0(function(){t.call(null,e||function(){return 1},1)})},Z0=ee,J0=Q0.left,eb=sl,fo=Ri,tb=Pt,rb=!tb&&fo>79&&fo<83,ab=rb||!eb("reduce");Z0({target:"Array",proto:!0,forced:ab},{reduce:function(e){var t=arguments.length;return J0(this,e,t,t>1?arguments[1]:void 0)}});var ib=ee,nb=Ir,sb=$t.f,ob=ht,co=ye,ub=on,lb=fe,hb=un,vb=nb("".slice),fb=Math.min,ol=hb("endsWith"),cb=!ol&&!!function(){var a=sb(String.prototype,"endsWith");return a&&!a.writable}();ib({target:"String",proto:!0,forced:!cb&&!ol},{endsWith:function(e){var t=co(lb(this));ub(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,n=r===void 0?i:fb(ob(r),i),o=co(e);return vb(t,n-o.length,n)===o}});var La=Y,ul=L,gb=tn,db=J,pb=ze,yb=fe,mb=du,bb=an,xb=ht,go=ye,Eb=lt,po=nn,Sb=zu,Tb=k,Je=Sb.UNSUPPORTED_Y,Ob=4294967295,$b=Math.min,Ba=ul([].push),Fa=ul("".slice),wb=!Tb(function(){var a=/(?:)/,e=a.exec;a.exec=function(){return e.apply(this,arguments)};var t="ab".split(a);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),yo="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;gb("split",function(a,e,t){var r="0".split(void 0,0).length?function(i,n){return i===void 0&&n===0?[]:La(e,this,i,n)}:e;return[function(n,o){var s=yb(this),u=pb(n)?void 0:Eb(n,a);return u?La(u,n,s,o):La(r,go(s),n,o)},function(i,n){var o=db(this),s=go(i);if(!yo){var u=t(r,o,s,n,r!==e);if(u.done)return u.value}var l=mb(o,RegExp),h=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Je?"g":"y"),c=new l(Je?"^(?:"+o.source+")":o,f),v=n===void 0?Ob:n>>>0;if(v===0)return[];if(s.length===0)return po(c,s)===null?[s]:[];for(var d=0,g=0,p=[];g<s.length;){c.lastIndex=Je?0:g;var y=po(c,Je?Fa(s,g):s),x;if(y===null||(x=$b(xb(c.lastIndex+(Je?g:0)),s.length))===d)g=bb(s,g,h);else{if(Ba(p,Fa(s,d,g)),p.length===v)return p;for(var b=1;b<=y.length-1;b++)if(Ba(p,y[b]),p.length===v)return p;g=d=x}}return Ba(p,Fa(s,d)),p}]},yo||!wb,Je);var kr={exports:{}},bt={exports:{}};(function(){var a,e,t,r,i,n;typeof performance<"u"&&performance!==null&&performance.now?bt.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(bt.exports=function(){return(a()-i)/1e6},e=process.hrtime,a=function(){var o;return o=e(),o[0]*1e9+o[1]},r=a(),n=process.uptime()*1e9,i=r-n):Date.now?(bt.exports=function(){return Date.now()-t},t=Date.now()):(bt.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(he.commonjsGlobal);var Cb=bt.exports,Ab=Cb,xe=typeof window>"u"?he.commonjsGlobal:window,ir=["moz","webkit"],nt="AnimationFrame",ut=xe["request"+nt],Ot=xe["cancel"+nt]||xe["cancelRequest"+nt];for(var yt=0;!ut&&yt<ir.length;yt++)ut=xe[ir[yt]+"Request"+nt],Ot=xe[ir[yt]+"Cancel"+nt]||xe[ir[yt]+"CancelRequest"+nt];if(!ut||!Ot){var ja=0,mo=0,De=[],Pb=1e3/60;ut=function(a){if(De.length===0){var e=Ab(),t=Math.max(0,Pb-(e-ja));ja=t+e,setTimeout(function(){var r=De.slice(0);De.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(ja)}catch(n){setTimeout(function(){throw n},0)}},Math.round(t))}return De.push({handle:++mo,callback:a,cancelled:!1}),mo},Ot=function(a){for(var e=0;e<De.length;e++)De[e].handle===a&&(De[e].cancelled=!0)}}kr.exports=function(a){return ut.call(xe,a)};kr.exports.cancel=function(){Ot.apply(xe,arguments)};kr.exports.polyfill=function(a){a||(a=xe),a.requestAnimationFrame=ut,a.cancelAnimationFrame=Ot};var Rb=kr.exports;const Ua=he.getDefaultExportFromCjs(Rb);var ll=`
|
|
4
|
-
\v\f\r \u2028\u2029\uFEFF`,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-B72z8mEp.js");var ct=function(a){return a&&a.Math===Math&&a},D=ct(typeof globalThis=="object"&&globalThis)||ct(typeof window=="object"&&window)||ct(typeof self=="object"&&self)||ct(typeof he.commonjsGlobal=="object"&&he.commonjsGlobal)||ct(typeof he.commonjsGlobal=="object"&&he.commonjsGlobal)||function(){return this}()||Function("return this")(),wt={},k=function(a){try{return!!a()}catch{return!0}},vh=k,ve=!vh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),fh=k,Or=!fh(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),ch=Or,Yt=Function.prototype.call,Y=ch?Yt.bind(Yt):function(){return Yt.apply(Yt,arguments)},Uo={},Go={}.propertyIsEnumerable,zo=Object.getOwnPropertyDescriptor,gh=zo&&!Go.call({1:2},1);Uo.f=gh?function(e){var t=zo(this,e);return!!t&&t.enumerable}:Go;var Ni=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},Ho=Or,Yo=Function.prototype,Xa=Yo.call,dh=Ho&&Yo.bind.bind(Xa,Xa),L=Ho?dh:function(a){return function(){return Xa.apply(a,arguments)}},Xo=L,ph=Xo({}.toString),yh=Xo("".slice),Ge=function(a){return yh(ph(a),8,-1)},mh=L,bh=k,xh=Ge,ea=Object,Th=mh("".split),Wo=bh(function(){return!ea("z").propertyIsEnumerable(0)})?function(a){return xh(a)==="String"?Th(a,""):ea(a)}:ea,ze=function(a){return a==null},Eh=ze,Sh=TypeError,fe=function(a){if(Eh(a))throw new Sh("Can't call method on "+a);return a},Oh=Wo,$h=fe,Ct=function(a){return Oh($h(a))},ta=typeof document=="object"&&document.all,B=typeof ta>"u"&&ta!==void 0?function(a){return typeof a=="function"||a===ta}:function(a){return typeof a=="function"},wh=B,ce=function(a){return typeof a=="object"?a!==null:wh(a)},ra=D,Ch=B,Ah=function(a){return Ch(a)?a:void 0},He=function(a,e){return arguments.length<2?Ah(ra[a]):ra[a]&&ra[a][e]},Ph=L,$r=Ph({}.isPrototypeOf),Rh=D,In=Rh.navigator,Mn=In&&In.userAgent,At=Mn?String(Mn):"",qo=D,aa=At,_n=qo.process,Vn=qo.Deno,Dn=_n&&_n.versions||Vn&&Vn.version,kn=Dn&&Dn.v8,le,yr;kn&&(le=kn.split("."),yr=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!yr&&aa&&(le=aa.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=aa.match(/Chrome\/(\d+)/),le&&(yr=+le[1])));var Ii=yr,Ln=Ii,Nh=k,Ih=D,Mh=Ih.String,Qo=!!Object.getOwnPropertySymbols&&!Nh(function(){var a=Symbol("symbol detection");return!Mh(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&Ln&&Ln<41}),_h=Qo,Ko=_h&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Vh=He,Dh=B,kh=$r,Lh=Ko,Bh=Object,Zo=Lh?function(a){return typeof a=="symbol"}:function(a){var e=Vh("Symbol");return Dh(e)&&kh(e.prototype,Bh(a))},Fh=String,wr=function(a){try{return Fh(a)}catch{return"Object"}},jh=B,Uh=wr,Gh=TypeError,Oe=function(a){if(jh(a))return a;throw new Gh(Uh(a)+" is not a function")},zh=Oe,Hh=ze,lt=function(a,e){var t=a[e];return Hh(t)?void 0:zh(t)},ia=Y,na=B,sa=ce,Yh=TypeError,Xh=function(a,e){var t,r;if(e==="string"&&na(t=a.toString)&&!sa(r=ia(t,a))||na(t=a.valueOf)&&!sa(r=ia(t,a))||e!=="string"&&na(t=a.toString)&&!sa(r=ia(t,a)))return r;throw new Yh("Can't convert object to primitive value")},Jo={exports:{}},Bn=D,Wh=Object.defineProperty,Mi=function(a,e){try{Wh(Bn,a,{value:e,configurable:!0,writable:!0})}catch{Bn[a]=e}return e},qh=D,Qh=Mi,Fn="__core-js_shared__",jn=Jo.exports=qh[Fn]||Qh(Fn,{});(jn.versions||(jn.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var _i=Jo.exports,Un=_i,Vi=function(a,e){return Un[a]||(Un[a]=e||{})},Kh=fe,Zh=Object,Cr=function(a){return Zh(Kh(a))},Jh=L,ev=Cr,tv=Jh({}.hasOwnProperty),ge=Object.hasOwn||function(e,t){return tv(ev(e),t)},rv=L,av=0,iv=Math.random(),nv=rv(1 .toString),eu=function(a){return"Symbol("+(a===void 0?"":a)+")_"+nv(++av+iv,36)},sv=D,ov=Vi,Gn=ge,uv=eu,lv=Qo,hv=Ko,tt=sv.Symbol,oa=ov("wks"),vv=hv?tt.for||tt:tt&&tt.withoutSetter||uv,z=function(a){return Gn(oa,a)||(oa[a]=lv&&Gn(tt,a)?tt[a]:vv("Symbol."+a)),oa[a]},fv=Y,zn=ce,Hn=Zo,cv=lt,gv=Xh,dv=z,pv=TypeError,yv=dv("toPrimitive"),mv=function(a,e){if(!zn(a)||Hn(a))return a;var t=cv(a,yv),r;if(t){if(e===void 0&&(e="default"),r=fv(t,a,e),!zn(r)||Hn(r))return r;throw new pv("Can't convert object to primitive value")}return e===void 0&&(e="number"),gv(a,e)},bv=mv,xv=Zo,tu=function(a){var e=bv(a,"string");return xv(e)?e:e+""},Tv=D,Yn=ce,Wa=Tv.document,Ev=Yn(Wa)&&Yn(Wa.createElement),Ar=function(a){return Ev?Wa.createElement(a):{}},Sv=ve,Ov=k,$v=Ar,ru=!Sv&&!Ov(function(){return Object.defineProperty($v("div"),"a",{get:function(){return 7}}).a!==7}),wv=ve,Cv=Y,Av=Uo,Pv=Ni,Rv=Ct,Nv=tu,Iv=ge,Mv=ru,Xn=Object.getOwnPropertyDescriptor;wt.f=wv?Xn:function(e,t){if(e=Rv(e),t=Nv(t),Mv)try{return Xn(e,t)}catch{}if(Iv(e,t))return Pv(!Cv(Av.f,e,t),e[t])};var $e={},_v=ve,Vv=k,au=_v&&Vv(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Dv=ce,kv=String,Lv=TypeError,J=function(a){if(Dv(a))return a;throw new Lv(kv(a)+" is not an object")},Bv=ve,Fv=ru,jv=au,Xt=J,Wn=tu,Uv=TypeError,ua=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,la="enumerable",ha="configurable",va="writable";$e.f=Bv?jv?function(e,t,r){if(Xt(e),t=Wn(t),Xt(r),typeof e=="function"&&t==="prototype"&&"value"in r&&va in r&&!r[va]){var i=Gv(e,t);i&&i[va]&&(e[t]=r.value,r={configurable:ha in r?r[ha]:i[ha],enumerable:la in r?r[la]:i[la],writable:!1})}return ua(e,t,r)}:ua:function(e,t,r){if(Xt(e),t=Wn(t),Xt(r),Fv)try{return ua(e,t,r)}catch{}if("get"in r||"set"in r)throw new Uv("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var zv=ve,Hv=$e,Yv=Ni,Pt=zv?function(a,e,t){return Hv.f(a,e,Yv(1,t))}:function(a,e,t){return a[e]=t,a},iu={exports:{}},qa=ve,Xv=ge,nu=Function.prototype,Wv=qa&&Object.getOwnPropertyDescriptor,Di=Xv(nu,"name"),qv=Di&&(function(){}).name==="something",Qv=Di&&(!qa||qa&&Wv(nu,"name").configurable),Pr={EXISTS:Di,PROPER:qv,CONFIGURABLE:Qv},Kv=L,Zv=B,Qa=_i,Jv=Kv(Function.toString);Zv(Qa.inspectSource)||(Qa.inspectSource=function(a){return Jv(a)});var ki=Qa.inspectSource,ef=D,tf=B,qn=ef.WeakMap,rf=tf(qn)&&/native code/.test(String(qn)),af=Vi,nf=eu,Qn=af("keys"),Li=function(a){return Qn[a]||(Qn[a]=nf(a))},Bi={},sf=rf,su=D,of=ce,uf=Pt,fa=ge,ca=_i,lf=Li,hf=Bi,Kn="Object already initialized",Ka=su.TypeError,vf=su.WeakMap,mr,St,br,ff=function(a){return br(a)?St(a):mr(a,{})},cf=function(a){return function(e){var t;if(!of(e)||(t=St(e)).type!==a)throw new Ka("Incompatible receiver, "+a+" required");return t}};if(sf||ca.state){var pe=ca.state||(ca.state=new vf);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,mr=function(a,e){if(pe.has(a))throw new Ka(Kn);return e.facade=a,pe.set(a,e),e},St=function(a){return pe.get(a)||{}},br=function(a){return pe.has(a)}}else{var Qe=lf("state");hf[Qe]=!0,mr=function(a,e){if(fa(a,Qe))throw new Ka(Kn);return e.facade=a,uf(a,Qe,e),e},St=function(a){return fa(a,Qe)?a[Qe]:{}},br=function(a){return fa(a,Qe)}}var Rr={set:mr,get:St,has:br,enforce:ff,getterFor:cf},Fi=L,gf=k,df=B,Wt=ge,Za=ve,pf=Pr.CONFIGURABLE,yf=ki,ou=Rr,mf=ou.enforce,bf=ou.get,Zn=String,hr=Object.defineProperty,xf=Fi("".slice),Tf=Fi("".replace),Ef=Fi([].join),Sf=Za&&!gf(function(){return hr(function(){},"length",{value:8}).length!==8}),Of=String(String).split("String"),$f=iu.exports=function(a,e,t){xf(Zn(e),0,7)==="Symbol("&&(e="["+Tf(Zn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Wt(a,"name")||pf&&a.name!==e)&&(Za?hr(a,"name",{value:e,configurable:!0}):a.name=e),Sf&&t&&Wt(t,"arity")&&a.length!==t.arity&&hr(a,"length",{value:t.arity});try{t&&Wt(t,"constructor")&&t.constructor?Za&&hr(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=mf(a);return Wt(r,"source")||(r.source=Ef(Of,typeof e=="string"?e:"")),a};Function.prototype.toString=$f(function(){return df(this)&&bf(this).source||yf(this)},"toString");var uu=iu.exports,wf=B,Cf=$e,Af=uu,Pf=Mi,Ye=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(wf(t)&&Af(t,n,r),r.global)i?a[e]=t:Pf(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Cf.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},lu={},Rf=Math.ceil,Nf=Math.floor,If=Math.trunc||function(e){var t=+e;return(t>0?Nf:Rf)(t)},Mf=If,Nr=function(a){var e=+a;return e!==e||e===0?0:Mf(e)},_f=Nr,Vf=Math.max,Df=Math.min,kf=function(a,e){var t=_f(a);return t<0?Vf(t+e,0):Df(t,e)},Lf=Nr,Bf=Math.min,ht=function(a){var e=Lf(a);return e>0?Bf(e,9007199254740991):0},Ff=ht,ji=function(a){return Ff(a.length)},jf=Ct,Uf=kf,Gf=ji,Jn=function(a){return function(e,t,r){var i=jf(e),n=Gf(i);if(n===0)return!a&&-1;var o=Uf(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},hu={includes:Jn(!0),indexOf:Jn(!1)},zf=L,ga=ge,Hf=Ct,Yf=hu.indexOf,Xf=Bi,es=zf([].push),vu=function(a,e){var t=Hf(a),r=0,i=[],n;for(n in t)!ga(Xf,n)&&ga(t,n)&&es(i,n);for(;e.length>r;)ga(t,n=e[r++])&&(~Yf(i,n)||es(i,n));return i},Ui=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wf=vu,qf=Ui,Qf=qf.concat("length","prototype");lu.f=Object.getOwnPropertyNames||function(e){return Wf(e,Qf)};var fu={};fu.f=Object.getOwnPropertySymbols;var Kf=He,Zf=L,Jf=lu,ec=fu,tc=J,rc=Zf([].concat),ac=Kf("Reflect","ownKeys")||function(e){var t=Jf.f(tc(e)),r=ec.f;return r?rc(t,r(e)):t},ts=ge,ic=ac,nc=wt,sc=$e,oc=function(a,e,t){for(var r=ic(e),i=sc.f,n=nc.f,o=0;o<r.length;o++){var s=r[o];!ts(a,s)&&!(t&&ts(t,s))&&i(a,s,n(e,s))}},uc=k,lc=B,hc=/#|\.prototype\./,Rt=function(a,e){var t=fc[vc(a)];return t===gc?!0:t===cc?!1:lc(e)?uc(e):!!e},vc=Rt.normalize=function(a){return String(a).replace(hc,".").toLowerCase()},fc=Rt.data={},cc=Rt.NATIVE="N",gc=Rt.POLYFILL="P",cu=Rt,qt=D,dc=wt.f,pc=Pt,yc=Ye,mc=Mi,bc=oc,xc=cu,ee=function(a,e){var t=a.target,r=a.global,i=a.stat,n,o,s,u,l,h;if(r?o=qt:i?o=qt[t]||mc(t,{}):o=qt[t]&&qt[t].prototype,o)for(s in e){if(l=e[s],a.dontCallGetSet?(h=dc(o,s),u=h&&h.value):u=o[s],n=xc(r?s:t+(i?".":"#")+s,a.forced),!n&&u!==void 0){if(typeof l==typeof u)continue;bc(l,u)}(a.sham||u&&u.sham)&&pc(l,"sham",!0),yc(o,s,l,a)}},gt=D,Tc=At,Ec=Ge,Qt=function(a){return Tc.slice(0,a.length)===a},gu=function(){return Qt("Bun/")?"BUN":Qt("Cloudflare-Workers")?"CLOUDFLARE":Qt("Deno/")?"DENO":Qt("Node.js/")?"NODE":gt.Bun&&typeof Bun.version=="string"?"BUN":gt.Deno&&typeof Deno.version=="object"?"DENO":Ec(gt.process)==="process"?"NODE":gt.window&>.document?"BROWSER":"REST"}(),Sc=gu,Ir=Sc==="NODE",Oc=L,$c=Oe,wc=function(a,e,t){try{return Oc($c(Object.getOwnPropertyDescriptor(a,e)[t]))}catch{}},Cc=ce,Ac=function(a){return Cc(a)||a===null},Pc=Ac,Rc=String,Nc=TypeError,Ic=function(a){if(Pc(a))return a;throw new Nc("Can't set "+Rc(a)+" as a prototype")},Mc=wc,_c=ce,Vc=fe,Dc=Ic,du=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,e={},t;try{t=Mc(Object.prototype,"__proto__","set"),t(e,[]),a=e instanceof Array}catch{}return function(i,n){return Vc(i),Dc(n),_c(i)&&(a?t(i,n):i.__proto__=n),i}}():void 0),kc=$e.f,Lc=ge,Bc=z,rs=Bc("toStringTag"),Mr=function(a,e,t){a&&!t&&(a=a.prototype),a&&!Lc(a,rs)&&kc(a,rs,{configurable:!0,value:e})},as=uu,Fc=$e,jc=function(a,e,t){return t.get&&as(t.get,e,{getter:!0}),t.set&&as(t.set,e,{setter:!0}),Fc.f(a,e,t)},Uc=He,Gc=jc,zc=z,Hc=ve,is=zc("species"),Yc=function(a){var e=Uc(a);Hc&&e&&!e[is]&&Gc(e,is,{configurable:!0,get:function(){return this}})},Xc=$r,Wc=TypeError,qc=function(a,e){if(Xc(e,a))return a;throw new Wc("Incorrect invocation")},Qc=z,Kc=Qc("toStringTag"),pu={};pu[Kc]="z";var Zc=String(pu)==="[object z]",Jc=Zc,eg=B,vr=Ge,tg=z,rg=tg("toStringTag"),ag=Object,ig=vr(function(){return arguments}())==="Arguments",ng=function(a,e){try{return a[e]}catch{}},Gi=Jc?vr:function(a){var e,t,r;return a===void 0?"Undefined":a===null?"Null":typeof(t=ng(e=ag(a),rg))=="string"?t:ig?vr(e):(r=vr(e))==="Object"&&eg(e.callee)?"Arguments":r},sg=L,og=k,yu=B,ug=Gi,lg=He,hg=ki,mu=function(){},bu=lg("Reflect","construct"),zi=/^\s*(?:class|function)\b/,vg=sg(zi.exec),fg=!zi.test(mu),dt=function(e){if(!yu(e))return!1;try{return bu(mu,[],e),!0}catch{return!1}},xu=function(e){if(!yu(e))return!1;switch(ug(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fg||!!vg(zi,hg(e))}catch{return!0}};xu.sham=!0;var cg=!bu||og(function(){var a;return dt(dt.call)||!dt(Object)||!dt(function(){a=!0})||a})?xu:dt,gg=cg,dg=wr,pg=TypeError,yg=function(a){if(gg(a))return a;throw new pg(dg(a)+" is not a constructor")},ns=J,mg=yg,bg=ze,xg=z,Tg=xg("species"),Tu=function(a,e){var t=ns(a).constructor,r;return t===void 0||bg(r=ns(t)[Tg])?e:mg(r)},Eg=Or,Eu=Function.prototype,ss=Eu.apply,os=Eu.call,Su=typeof Reflect=="object"&&Reflect.apply||(Eg?os.bind(ss):function(){return os.apply(ss,arguments)}),Sg=Ge,Og=L,_r=function(a){if(Sg(a)==="Function")return Og(a)},us=_r,$g=Oe,wg=Or,Cg=us(us.bind),Hi=function(a,e){return $g(a),e===void 0?a:wg?Cg(a,e):function(){return a.apply(e,arguments)}},Ag=He,Ou=Ag("document","documentElement"),Pg=L,Rg=Pg([].slice),Ng=TypeError,Ig=function(a,e){if(a<e)throw new Ng("Not enough arguments");return a},Mg=At,$u=/(?:ipad|iphone|ipod).*applewebkit/i.test(Mg),ie=D,_g=Su,Vg=Hi,ls=B,Dg=ge,wu=k,hs=Ou,kg=Rg,vs=Ar,Lg=Ig,Bg=$u,Fg=Ir,Ja=ie.setImmediate,ei=ie.clearImmediate,jg=ie.process,da=ie.Dispatch,Ug=ie.Function,fs=ie.MessageChannel,Gg=ie.String,pa=0,Tt={},cs="onreadystatechange",Ot,Ve,ya,ma;wu(function(){Ot=ie.location});var Yi=function(a){if(Dg(Tt,a)){var e=Tt[a];delete Tt[a],e()}},ba=function(a){return function(){Yi(a)}},gs=function(a){Yi(a.data)},ds=function(a){ie.postMessage(Gg(a),Ot.protocol+"//"+Ot.host)};(!Ja||!ei)&&(Ja=function(e){Lg(arguments.length,1);var t=ls(e)?e:Ug(e),r=kg(arguments,1);return Tt[++pa]=function(){_g(t,void 0,r)},Ve(pa),pa},ei=function(e){delete Tt[e]},Fg?Ve=function(a){jg.nextTick(ba(a))}:da&&da.now?Ve=function(a){da.now(ba(a))}:fs&&!Bg?(ya=new fs,ma=ya.port2,ya.port1.onmessage=gs,Ve=Vg(ma.postMessage,ma)):ie.addEventListener&&ls(ie.postMessage)&&!ie.importScripts&&Ot&&Ot.protocol!=="file:"&&!wu(ds)?(Ve=ds,ie.addEventListener("message",gs,!1)):cs in vs("script")?Ve=function(a){hs.appendChild(vs("script"))[cs]=function(){hs.removeChild(this),Yi(a)}}:Ve=function(a){setTimeout(ba(a),0)});var Cu={set:Ja,clear:ei},ps=D,zg=ve,Hg=Object.getOwnPropertyDescriptor,Yg=function(a){if(!zg)return ps[a];var e=Hg(ps,a);return e&&e.value},Au=function(){this.head=null,this.tail=null};Au.prototype={add:function(a){var e={item:a,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var a=this.head;if(a){var e=this.head=a.next;return e===null&&(this.tail=null),a.item}}};var Pu=Au,Xg=At,Wg=/ipad|iphone|ipod/i.test(Xg)&&typeof Pebble<"u",qg=At,Qg=/web0s(?!.*chrome)/i.test(qg),st=D,Kg=Yg,ys=Hi,xa=Cu.set,Zg=Pu,Jg=$u,ed=Wg,td=Qg,Ta=Ir,ms=st.MutationObserver||st.WebKitMutationObserver,bs=st.document,xs=st.process,Kt=st.Promise,ti=Kg("queueMicrotask"),Ke,Ea,Sa,Zt,Ts;if(!ti){var Jt=new Zg,er=function(){var a,e;for(Ta&&(a=xs.domain)&&a.exit();e=Jt.get();)try{e()}catch(t){throw Jt.head&&Ke(),t}a&&a.enter()};!Jg&&!Ta&&!td&&ms&&bs?(Ea=!0,Sa=bs.createTextNode(""),new ms(er).observe(Sa,{characterData:!0}),Ke=function(){Sa.data=Ea=!Ea}):!ed&&Kt&&Kt.resolve?(Zt=Kt.resolve(void 0),Zt.constructor=Kt,Ts=ys(Zt.then,Zt),Ke=function(){Ts(er)}):Ta?Ke=function(){xs.nextTick(er)}:(xa=ys(xa,st),Ke=function(){xa(er)}),ti=function(a){Jt.head||Ke(),Jt.add(a)}}var rd=ti,ad=function(a,e){try{arguments.length===1?console.error(a):console.error(a,e)}catch{}},Xi=function(a){try{return{error:!1,value:a()}}catch(e){return{error:!0,value:e}}},id=D,Vr=id.Promise,nd=D,Et=Vr,sd=B,od=cu,ud=ki,ld=z,Es=gu,Oa=Ii;Et&&Et.prototype;var hd=ld("species"),ri=!1,Ru=sd(nd.PromiseRejectionEvent),vd=od("Promise",function(){var a=ud(Et),e=a!==String(Et);if(!e&&Oa===66)return!0;if(!Oa||Oa<51||!/native code/.test(a)){var t=new Et(function(n){n(1)}),r=function(n){n(function(){},function(){})},i=t.constructor={};if(i[hd]=r,ri=t.then(function(){})instanceof r,!ri)return!0}return!e&&(Es==="BROWSER"||Es==="DENO")&&!Ru}),Nt={CONSTRUCTOR:vd,REJECTION_EVENT:Ru,SUBCLASSING:ri},vt={},Ss=Oe,fd=TypeError,cd=function(a){var e,t;this.promise=new a(function(r,i){if(e!==void 0||t!==void 0)throw new fd("Bad Promise constructor");e=r,t=i}),this.resolve=Ss(e),this.reject=Ss(t)};vt.f=function(a){return new cd(a)};var gd=ee,xr=Ir,Ae=D,ot=Y,Os=Ye,$s=du,dd=Mr,pd=Yc,yd=Oe,fr=B,md=ce,bd=qc,xd=Tu,Nu=Cu.set,Wi=rd,Td=ad,Ed=Xi,Sd=Pu,Iu=Rr,Tr=Vr,qi=Nt,Mu=vt,Dr="Promise",_u=qi.CONSTRUCTOR,Od=qi.REJECTION_EVENT,$d=qi.SUBCLASSING,$a=Iu.getterFor(Dr),wd=Iu.set,et=Tr&&Tr.prototype,Be=Tr,tr=et,Vu=Ae.TypeError,ai=Ae.document,Qi=Ae.process,ii=Mu.f,Cd=ii,Ad=!!(ai&&ai.createEvent&&Ae.dispatchEvent),Du="unhandledrejection",Pd="rejectionhandled",ws=0,ku=1,Rd=2,Ki=1,Lu=2,rr,Cs,Nd,As,Bu=function(a){var e;return md(a)&&fr(e=a.then)?e:!1},Fu=function(a,e){var t=e.value,r=e.state===ku,i=r?a.ok:a.fail,n=a.resolve,o=a.reject,s=a.domain,u,l,h;try{i?(r||(e.rejection===Lu&&Md(e),e.rejection=Ki),i===!0?u=t:(s&&s.enter(),u=i(t),s&&(s.exit(),h=!0)),u===a.promise?o(new Vu("Promise-chain cycle")):(l=Bu(u))?ot(l,u,n,o):n(u)):o(t)}catch(f){s&&!h&&s.exit(),o(f)}},ju=function(a,e){a.notified||(a.notified=!0,Wi(function(){for(var t=a.reactions,r;r=t.get();)Fu(r,a);a.notified=!1,e&&!a.rejection&&Id(a)}))},Uu=function(a,e,t){var r,i;Ad?(r=ai.createEvent("Event"),r.promise=e,r.reason=t,r.initEvent(a,!1,!0),Ae.dispatchEvent(r)):r={promise:e,reason:t},!Od&&(i=Ae["on"+a])?i(r):a===Du&&Td("Unhandled promise rejection",t)},Id=function(a){ot(Nu,Ae,function(){var e=a.facade,t=a.value,r=Ps(a),i;if(r&&(i=Ed(function(){xr?Qi.emit("unhandledRejection",t,e):Uu(Du,e,t)}),a.rejection=xr||Ps(a)?Lu:Ki,i.error))throw i.value})},Ps=function(a){return a.rejection!==Ki&&!a.parent},Md=function(a){ot(Nu,Ae,function(){var e=a.facade;xr?Qi.emit("rejectionHandled",e):Uu(Pd,e,a.value)})},rt=function(a,e,t){return function(r){a(e,r,t)}},it=function(a,e,t){a.done||(a.done=!0,t&&(a=t),a.value=e,a.state=Rd,ju(a,!0))},ni=function(a,e,t){if(!a.done){a.done=!0,t&&(a=t);try{if(a.facade===e)throw new Vu("Promise can't be resolved itself");var r=Bu(e);r?Wi(function(){var i={done:!1};try{ot(r,e,rt(ni,i,a),rt(it,i,a))}catch(n){it(i,n,a)}}):(a.value=e,a.state=ku,ju(a,!1))}catch(i){it({done:!1},i,a)}}};if(_u&&(Be=function(e){bd(this,tr),yd(e),ot(rr,this);var t=$a(this);try{e(rt(ni,t),rt(it,t))}catch(r){it(t,r)}},tr=Be.prototype,rr=function(e){wd(this,{type:Dr,done:!1,notified:!1,parent:!1,reactions:new Sd,rejection:!1,state:ws,value:null})},rr.prototype=Os(tr,"then",function(e,t){var r=$a(this),i=ii(xd(this,Be));return r.parent=!0,i.ok=fr(e)?e:!0,i.fail=fr(t)&&t,i.domain=xr?Qi.domain:void 0,r.state===ws?r.reactions.add(i):Wi(function(){Fu(i,r)}),i.promise}),Cs=function(){var a=new rr,e=$a(a);this.promise=a,this.resolve=rt(ni,e),this.reject=rt(it,e)},Mu.f=ii=function(a){return a===Be||a===Nd?new Cs(a):Cd(a)},fr(Tr)&&et!==Object.prototype)){As=et.then,$d||Os(et,"then",function(e,t){var r=this;return new Be(function(i,n){ot(As,r,i,n)}).then(e,t)},{unsafe:!0});try{delete et.constructor}catch{}$s&&$s(et,tr)}gd({global:!0,constructor:!0,wrap:!0,forced:_u},{Promise:Be});dd(Be,Dr,!1);pd(Dr);var It={},_d=z,Vd=It,Dd=_d("iterator"),kd=Array.prototype,Ld=function(a){return a!==void 0&&(Vd.Array===a||kd[Dd]===a)},Bd=Gi,Rs=lt,Fd=ze,jd=It,Ud=z,Gd=Ud("iterator"),Gu=function(a){if(!Fd(a))return Rs(a,Gd)||Rs(a,"@@iterator")||jd[Bd(a)]},zd=Y,Hd=Oe,Yd=J,Xd=wr,Wd=Gu,qd=TypeError,Qd=function(a,e){var t=arguments.length<2?Wd(a):e;if(Hd(t))return Yd(zd(t,a));throw new qd(Xd(a)+" is not iterable")},Kd=Y,Ns=J,Zd=lt,Jd=function(a,e,t){var r,i;Ns(a);try{if(r=Zd(a,"return"),!r){if(e==="throw")throw t;return t}r=Kd(r,a)}catch(n){i=!0,r=n}if(e==="throw")throw t;if(i)throw r;return Ns(r),t},ep=Hi,tp=Y,rp=J,ap=wr,ip=Ld,np=ji,Is=$r,sp=Qd,op=Gu,Ms=Jd,up=TypeError,cr=function(a,e){this.stopped=a,this.result=e},_s=cr.prototype,zu=function(a,e,t){var r=t&&t.that,i=!!(t&&t.AS_ENTRIES),n=!!(t&&t.IS_RECORD),o=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),u=ep(e,r),l,h,f,c,v,d,g,p=function(x){return l&&Ms(l,"normal",x),new cr(!0,x)},y=function(x){return i?(rp(x),s?u(x[0],x[1],p):u(x[0],x[1])):s?u(x,p):u(x)};if(n)l=a.iterator;else if(o)l=a;else{if(h=op(a),!h)throw new up(ap(a)+" is not iterable");if(ip(h)){for(f=0,c=np(a);c>f;f++)if(v=y(a[f]),v&&Is(_s,v))return v;return new cr(!1)}l=sp(a,h)}for(d=n?a.next:l.next;!(g=tp(d,l)).done;){try{v=y(g.value)}catch(x){Ms(l,"throw",x)}if(typeof v=="object"&&v&&Is(_s,v))return v}return new cr(!1)},lp=z,Hu=lp("iterator"),Yu=!1;try{var hp=0,Vs={next:function(){return{done:!!hp++}},return:function(){Yu=!0}};Vs[Hu]=function(){return this},Array.from(Vs,function(){throw 2})}catch{}var vp=function(a,e){try{if(!e&&!Yu)return!1}catch{return!1}var t=!1;try{var r={};r[Hu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},fp=Vr,cp=vp,gp=Nt.CONSTRUCTOR,Xu=gp||!cp(function(a){fp.all(a).then(void 0,function(){})}),dp=ee,pp=Y,yp=Oe,mp=vt,bp=Xi,xp=zu,Tp=Xu;dp({target:"Promise",stat:!0,forced:Tp},{all:function(e){var t=this,r=mp.f(t),i=r.resolve,n=r.reject,o=bp(function(){var s=yp(t.resolve),u=[],l=0,h=1;xp(e,function(f){var c=l++,v=!1;h++,pp(s,t,f).then(function(d){v||(v=!0,u[c]=d,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Ep=ee,Sp=Nt.CONSTRUCTOR,si=Vr,Op=He,$p=B,wp=Ye,Ds=si&&si.prototype;Ep({target:"Promise",proto:!0,forced:Sp,real:!0},{catch:function(a){return this.then(void 0,a)}});if($p(si)){var ks=Op("Promise").prototype.catch;Ds.catch!==ks&&wp(Ds,"catch",ks,{unsafe:!0})}var Cp=ee,Ap=Y,Pp=Oe,Rp=vt,Np=Xi,Ip=zu,Mp=Xu;Cp({target:"Promise",stat:!0,forced:Mp},{race:function(e){var t=this,r=Rp.f(t),i=r.reject,n=Np(function(){var o=Pp(t.resolve);Ip(e,function(s){Ap(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var _p=ee,Vp=vt,Dp=Nt.CONSTRUCTOR;_p({target:"Promise",stat:!0,forced:Dp},{reject:function(e){var t=Vp.f(this),r=t.reject;return r(e),t.promise}});var kp=J,Lp=ce,Bp=vt,Fp=function(a,e){if(kp(a),Lp(e)&&e.constructor===a)return e;var t=Bp.f(a),r=t.resolve;return r(e),t.promise},jp=ee,Up=He,Gp=Nt.CONSTRUCTOR,zp=Fp;Up("Promise");jp({target:"Promise",stat:!0,forced:Gp},{resolve:function(e){return zp(this,e)}});function Ls(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ee(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Ls(n,r,i,o,s,"next",u)}function s(u){Ls(n,r,i,o,s,"throw",u)}o(void 0)})}}var Hp=Gi,Yp=String,ye=function(a){if(Hp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Yp(a)},Xp=J,Wu=function(){var a=Xp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Zi=k,Wp=D,Ji=Wp.RegExp,en=Zi(function(){var a=Ji("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),qp=en||Zi(function(){return!Ji("a","y").sticky}),Qp=en||Zi(function(){var a=Ji("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),qu={BROKEN_CARET:Qp,MISSED_STICKY:qp,UNSUPPORTED_Y:en},Qu={},Kp=vu,Zp=Ui,Jp=Object.keys||function(e){return Kp(e,Zp)},ey=ve,ty=au,ry=$e,ay=J,iy=Ct,ny=Jp;Qu.f=ey&&!ty?Object.defineProperties:function(e,t){ay(e);for(var r=iy(t),i=ny(t),n=i.length,o=0,s;n>o;)ry.f(e,s=i[o++],r[s]);return e};var sy=J,oy=Qu,Bs=Ui,uy=Bi,ly=Ou,hy=Ar,vy=Li,Fs=">",js="<",oi="prototype",ui="script",Ku=vy("IE_PROTO"),wa=function(){},Zu=function(a){return js+ui+Fs+a+js+"/"+ui+Fs},Us=function(a){a.write(Zu("")),a.close();var e=a.parentWindow.Object;return a=null,e},fy=function(){var a=hy("iframe"),e="java"+ui+":",t;return a.style.display="none",ly.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Zu("document.F=Object")),t.close(),t.F},ar,gr=function(){try{ar=new ActiveXObject("htmlfile")}catch{}gr=typeof document<"u"?document.domain&&ar?Us(ar):fy():Us(ar);for(var a=Bs.length;a--;)delete gr[oi][Bs[a]];return gr()};uy[Ku]=!0;var tn=Object.create||function(e,t){var r;return e!==null?(wa[oi]=sy(e),r=new wa,wa[oi]=null,r[Ku]=e):r=gr(),t===void 0?r:oy.f(r,t)},cy=k,gy=D,dy=gy.RegExp,py=cy(function(){var a=dy(".","s");return!(a.dotAll&&a.test(`
|
|
2
|
+
`)&&a.flags==="s")}),yy=k,my=D,by=my.RegExp,xy=yy(function(){var a=by("(?<a>b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$<a>c")!=="bc"}),at=Y,kr=L,Ty=ye,Ey=Wu,Sy=qu,Oy=Vi,$y=tn,wy=Rr.get,Cy=py,Ay=xy,Py=Oy("native-string-replace",String.prototype.replace),Er=RegExp.prototype.exec,li=Er,Ry=kr("".charAt),Ny=kr("".indexOf),Iy=kr("".replace),Ca=kr("".slice),hi=function(){var a=/a/,e=/b*/g;return at(Er,a,"a"),at(Er,e,"a"),a.lastIndex!==0||e.lastIndex!==0}(),Ju=Sy.BROKEN_CARET,vi=/()??/.exec("")[1]!==void 0,My=hi||vi||Ju||Cy||Ay;My&&(li=function(e){var t=this,r=wy(t),i=Ty(e),n=r.raw,o,s,u,l,h,f,c;if(n)return n.lastIndex=t.lastIndex,o=at(li,n,i),t.lastIndex=n.lastIndex,o;var v=r.groups,d=Ju&&t.sticky,g=at(Ey,t),p=t.source,y=0,x=i;if(d&&(g=Iy(g,"y",""),Ny(g,"g")===-1&&(g+="g"),x=Ca(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Ry(i,t.lastIndex-1)!==`
|
|
3
|
+
`)&&(p="(?: "+p+")",x=" "+x,y++),s=new RegExp("^(?:"+p+")",g)),vi&&(s=new RegExp("^"+p+"$(?!\\s)",g)),hi&&(u=t.lastIndex),l=at(Er,d?s:t,x),d?l?(l.input=Ca(l.input,y),l[0]=Ca(l[0],y),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:hi&&l&&(t.lastIndex=t.global?l.index+l[0].length:u),vi&&l&&l.length>1&&at(Py,l[0],s,function(){for(h=1;h<arguments.length-2;h++)arguments[h]===void 0&&(l[h]=void 0)}),l&&v)for(l.groups=f=$y(null),h=0;h<v.length;h++)c=v[h],f[c[0]]=l[c[1]];return l});var rn=li,_y=ee,Gs=rn;_y({target:"RegExp",proto:!0,forced:/./.exec!==Gs},{exec:Gs});var zs=Y,Hs=Ye,Vy=rn,Ys=k,el=z,Dy=Pt,ky=el("species"),Aa=RegExp.prototype,an=function(a,e,t,r){var i=el(a),n=!Ys(function(){var l={};return l[i]=function(){return 7},""[a](l)!==7}),o=n&&!Ys(function(){var l=!1,h=/a/;return a==="split"&&(h={},h.constructor={},h.constructor[ky]=function(){return h},h.flags="",h[i]=/./[i]),h.exec=function(){return l=!0,null},h[i](""),!l});if(!n||!o||t){var s=/./[i],u=e(i,""[a],function(l,h,f,c,v){var d=h.exec;return d===Vy||d===Aa.exec?n&&!v?{done:!0,value:zs(s,h,f,c)}:{done:!0,value:zs(l,f,h,c)}:{done:!1}});Hs(String.prototype,a,u[0]),Hs(Aa,i,u[1])}r&&Dy(Aa[i],"sham",!0)},nn=L,Ly=Nr,By=ye,Fy=fe,jy=nn("".charAt),Xs=nn("".charCodeAt),Uy=nn("".slice),Ws=function(a){return function(e,t){var r=By(Fy(e)),i=Ly(t),n=r.length,o,s;return i<0||i>=n?a?"":void 0:(o=Xs(r,i),o<55296||o>56319||i+1===n||(s=Xs(r,i+1))<56320||s>57343?a?jy(r,i):o:a?Uy(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Gy={codeAt:Ws(!1),charAt:Ws(!0)},zy=Gy.charAt,sn=function(a,e,t){return e+(t?zy(a,e).length:1)},qs=Y,Hy=J,Yy=B,Xy=Ge,Wy=rn,qy=TypeError,on=function(a,e){var t=a.exec;if(Yy(t)){var r=qs(t,a,e);return r!==null&&Hy(r),r}if(Xy(a)==="RegExp")return qs(Wy,a,e);throw new qy("RegExp#exec called on incompatible receiver")},Qy=Y,Ky=an,Zy=J,Jy=ze,em=ht,Pa=ye,tm=fe,rm=lt,am=sn,Qs=on;Ky("match",function(a,e,t){return[function(i){var n=tm(this),o=Jy(i)?void 0:rm(i,a);return o?Qy(o,i,n):new RegExp(i)[a](Pa(n))},function(r){var i=Zy(this),n=Pa(r),o=t(e,i,n);if(o.done)return o.value;if(!i.global)return Qs(i,n);var s=i.unicode;i.lastIndex=0;for(var u=[],l=0,h;(h=Qs(i,n))!==null;){var f=Pa(h[0]);u[l]=f,f===""&&(i.lastIndex=am(n,em(i.lastIndex),s)),l++}return l===0?null:u}]});var un=L,im=Cr,nm=Math.floor,Ra=un("".charAt),sm=un("".replace),Na=un("".slice),om=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,um=/\$([$&'`]|\d{1,2})/g,lm=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=um;return i!==void 0&&(i=im(i),u=om),sm(n,u,function(l,h){var f;switch(Ra(h,0)){case"$":return"$";case"&":return a;case"`":return Na(e,0,t);case"'":return Na(e,o);case"<":f=i[Na(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=nm(c/10);return v===0?l:v<=s?r[v-1]===void 0?Ra(h,1):r[v-1]+Ra(h,1):l}f=r[c-1]}return f===void 0?"":f})},hm=Su,Ks=Y,Lr=L,vm=an,fm=k,cm=J,gm=B,dm=ze,pm=Nr,ym=ht,Ze=ye,mm=fe,bm=sn,xm=lt,Tm=lm,Em=on,Sm=z,fi=Sm("replace"),Om=Math.max,$m=Math.min,wm=Lr([].concat),Ia=Lr([].push),Zs=Lr("".indexOf),Js=Lr("".slice),Cm=function(a){return a===void 0?a:String(a)},Am=function(){return"a".replace(/./,"$0")==="$0"}(),eo=function(){return/./[fi]?/./[fi]("a","$0")==="":!1}(),Pm=!fm(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$<a>")!=="7"});vm("replace",function(a,e,t){var r=eo?"$":"$0";return[function(n,o){var s=mm(this),u=dm(n)?void 0:xm(n,fi);return u?Ks(u,n,s,o):Ks(e,Ze(s),n,o)},function(i,n){var o=cm(this),s=Ze(i);if(typeof n=="string"&&Zs(n,r)===-1&&Zs(n,"$<")===-1){var u=t(e,o,s,n);if(u.done)return u.value}var l=gm(n);l||(n=Ze(n));var h=o.global,f;h&&(f=o.unicode,o.lastIndex=0);for(var c=[],v;v=Em(o,s),!(v===null||(Ia(c,v),!h));){var d=Ze(v[0]);d===""&&(o.lastIndex=bm(s,ym(o.lastIndex),f))}for(var g="",p=0,y=0;y<c.length;y++){v=c[y];for(var x=Ze(v[0]),b=Om($m(pm(v.index),s.length),0),T=[],w,O=1;O<v.length;O++)Ia(T,Cm(v[O]));var E=v.groups;if(l){var C=wm([x],T,b,s);E!==void 0&&Ia(C,E),w=Ze(hm(n,void 0,C))}else w=Tm(x,s,b,T,E,n);b>=p&&(g+=Js(s,p,b)+w,p=b+x.length)}return g+Js(s,p)}]},!Pm||!Am||eo);var Rm=ce,Nm=Ge,Im=z,Mm=Im("match"),_m=function(a){var e;return Rm(a)&&((e=a[Mm])!==void 0?!!e:Nm(a)==="RegExp")},Vm=_m,Dm=TypeError,ln=function(a){if(Vm(a))throw new Dm("The method doesn't accept regular expressions");return a},km=z,Lm=km("match"),hn=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[Lm]=!1,"/./"[a](e)}catch{}}return!1},Bm=ee,Fm=_r,jm=wt.f,Um=ht,to=ye,Gm=ln,zm=fe,Hm=hn,Ym=Fm("".slice),Xm=Math.min,tl=Hm("startsWith"),Wm=!tl&&!!function(){var a=jm(String.prototype,"startsWith");return a&&!a.writable}();Bm({target:"String",proto:!0,forced:!Wm&&!tl},{startsWith:function(e){var t=to(zm(this));Gm(e);var r=Um(Xm(arguments.length>1?arguments[1]:void 0,t.length)),i=to(e);return Ym(t,r,r+i.length)===i}});var qm=z,Qm=tn,Km=$e.f,ci=qm("unscopables"),gi=Array.prototype;gi[ci]===void 0&&Km(gi,ci,{configurable:!0,value:Qm(null)});var Zm=function(a){gi[ci][a]=!0},Jm=k,e0=!Jm(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),t0=ge,r0=B,a0=Cr,i0=Li,n0=e0,ro=i0("IE_PROTO"),di=Object,s0=di.prototype,rl=n0?di.getPrototypeOf:function(a){var e=a0(a);if(t0(e,ro))return e[ro];var t=e.constructor;return r0(t)&&e instanceof t?t.prototype:e instanceof di?s0:null},o0=k,u0=B,l0=ce,ao=rl,h0=Ye,v0=z,pi=v0("iterator"),al=!1,Ue,Ma,_a;[].keys&&(_a=[].keys(),"next"in _a?(Ma=ao(ao(_a)),Ma!==Object.prototype&&(Ue=Ma)):al=!0);var f0=!l0(Ue)||o0(function(){var a={};return Ue[pi].call(a)!==a});f0&&(Ue={});u0(Ue[pi])||h0(Ue,pi,function(){return this});var il={IteratorPrototype:Ue,BUGGY_SAFARI_ITERATORS:al},c0=il.IteratorPrototype,g0=tn,d0=Ni,p0=Mr,y0=It,m0=function(){return this},b0=function(a,e,t,r){var i=e+" Iterator";return a.prototype=g0(c0,{next:d0(+!r,t)}),p0(a,i,!1),y0[i]=m0,a},x0=ee,T0=Y,nl=Pr,E0=B,S0=b0,io=rl,no=du,O0=Mr,$0=Pt,Va=Ye,w0=z,C0=It,sl=il,A0=nl.PROPER,P0=nl.CONFIGURABLE,so=sl.IteratorPrototype,ir=sl.BUGGY_SAFARI_ITERATORS,pt=w0("iterator"),oo="keys",yt="values",uo="entries",R0=function(){return this},N0=function(a,e,t,r,i,n,o){S0(t,e,r);var s=function(y){if(y===i&&c)return c;if(!ir&&y&&y in h)return h[y];switch(y){case oo:return function(){return new t(this,y)};case yt:return function(){return new t(this,y)};case uo:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[pt]||h["@@iterator"]||i&&h[i],c=!ir&&f||s(i),v=e==="Array"&&h.entries||f,d,g,p;if(v&&(d=io(v.call(new a)),d!==Object.prototype&&d.next&&(io(d)!==so&&(no?no(d,so):E0(d[pt])||Va(d,pt,R0)),O0(d,u,!0))),A0&&i===yt&&f&&f.name!==yt&&(P0?$0(h,"name",yt):(l=!0,c=function(){return T0(f,this)})),i)if(g={values:s(yt),keys:n?c:s(oo),entries:s(uo)},o)for(p in g)(ir||l||!(p in h))&&Va(h,p,g[p]);else x0({target:e,proto:!0,forced:ir||l},g);return h[pt]!==c&&Va(h,pt,c,{name:i}),C0[e]=c,g},I0=function(a,e){return{value:a,done:e}},M0=Ct,vn=Zm,lo=It,ol=Rr,_0=$e.f,V0=N0,nr=I0,D0=ve,ul="Array Iterator",k0=ol.set,L0=ol.getterFor(ul),B0=V0(Array,"Array",function(a,e){k0(this,{type:ul,target:M0(a),index:0,kind:e})},function(){var a=L0(this),e=a.target,t=a.index++;if(!e||t>=e.length)return a.target=null,nr(void 0,!0);switch(a.kind){case"keys":return nr(t,!1);case"values":return nr(e[t],!1)}return nr([t,e[t]],!1)},"values"),ho=lo.Arguments=lo.Array;vn("keys");vn("values");vn("entries");if(D0&&ho.name!=="values")try{_0(ho,"name",{value:"values"})}catch{}var F0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},j0=Ar,Da=j0("span").classList,vo=Da&&Da.constructor&&Da.constructor.prototype,U0=vo===Object.prototype?void 0:vo,fo=D,ll=F0,G0=U0,bt=B0,co=Pt,z0=Mr,H0=z,ka=H0("iterator"),La=bt.values,hl=function(a,e){if(a){if(a[ka]!==La)try{co(a,ka,La)}catch{a[ka]=La}if(z0(a,e,!0),ll[e]){for(var t in bt)if(a[t]!==bt[t])try{co(a,t,bt[t])}catch{a[t]=bt[t]}}}};for(var Ba in ll)hl(fo[Ba]&&fo[Ba].prototype,Ba);hl(G0,"DOMTokenList");function Y0(a,e){if(he._typeof(a)!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(he._typeof(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function X0(a){var e=Y0(a,"string");return he._typeof(e)=="symbol"?e:e+""}function fn(a,e,t){return(e=X0(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var W0=Oe,q0=Cr,Q0=Wo,K0=ji,go=TypeError,po="Reduce of empty array with no initial value",yo=function(a){return function(e,t,r,i){var n=q0(e),o=Q0(n),s=K0(n);if(W0(t),s===0&&r<2)throw new go(po);var u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw new go(po)}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},Z0={left:yo(!1),right:yo(!0)},J0=k,vl=function(a,e){var t=[][a];return!!t&&J0(function(){t.call(null,e||function(){return 1},1)})},eb=ee,tb=Z0.left,rb=vl,mo=Ii,ab=Ir,ib=!ab&&mo>79&&mo<83,nb=ib||!rb("reduce");eb({target:"Array",proto:!0,forced:nb},{reduce:function(e){var t=arguments.length;return tb(this,e,t,t>1?arguments[1]:void 0)}});var sb=ee,ob=_r,ub=wt.f,lb=ht,bo=ye,hb=ln,vb=fe,fb=hn,cb=ob("".slice),gb=Math.min,fl=fb("endsWith"),db=!fl&&!!function(){var a=ub(String.prototype,"endsWith");return a&&!a.writable}();sb({target:"String",proto:!0,forced:!db&&!fl},{endsWith:function(e){var t=bo(vb(this));hb(e);var r=arguments.length>1?arguments[1]:void 0,i=t.length,n=r===void 0?i:gb(lb(r),i),o=bo(e);return cb(t,n-o.length,n)===o}});var Fa=Y,cl=L,pb=an,yb=J,mb=ze,bb=fe,xb=Tu,Tb=sn,Eb=ht,xo=ye,Sb=lt,To=on,Ob=qu,$b=k,Je=Ob.UNSUPPORTED_Y,wb=4294967295,Cb=Math.min,ja=cl([].push),Ua=cl("".slice),Ab=!$b(function(){var a=/(?:)/,e=a.exec;a.exec=function(){return e.apply(this,arguments)};var t="ab".split(a);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),Eo="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;pb("split",function(a,e,t){var r="0".split(void 0,0).length?function(i,n){return i===void 0&&n===0?[]:Fa(e,this,i,n)}:e;return[function(n,o){var s=bb(this),u=mb(n)?void 0:Sb(n,a);return u?Fa(u,n,s,o):Fa(r,xo(s),n,o)},function(i,n){var o=yb(this),s=xo(i);if(!Eo){var u=t(r,o,s,n,r!==e);if(u.done)return u.value}var l=xb(o,RegExp),h=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Je?"g":"y"),c=new l(Je?"^(?:"+o.source+")":o,f),v=n===void 0?wb:n>>>0;if(v===0)return[];if(s.length===0)return To(c,s)===null?[s]:[];for(var d=0,g=0,p=[];g<s.length;){c.lastIndex=Je?0:g;var y=To(c,Je?Ua(s,g):s),x;if(y===null||(x=Cb(Eb(c.lastIndex+(Je?g:0)),s.length))===d)g=Tb(s,g,h);else{if(ja(p,Ua(s,d,g)),p.length===v)return p;for(var b=1;b<=y.length-1;b++)if(ja(p,y[b]),p.length===v)return p;g=d=x}}return ja(p,Ua(s,d)),p}]},Eo||!Ab,Je);var Br={exports:{}},xt={exports:{}};(function(){var a,e,t,r,i,n;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(xt.exports=function(){return(a()-i)/1e6},e=process.hrtime,a=function(){var o;return o=e(),o[0]*1e9+o[1]},r=a(),n=process.uptime()*1e9,i=r-n):Date.now?(xt.exports=function(){return Date.now()-t},t=Date.now()):(xt.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(he.commonjsGlobal);var Pb=xt.exports,Rb=Pb,xe=typeof window>"u"?he.commonjsGlobal:window,sr=["moz","webkit"],nt="AnimationFrame",ut=xe["request"+nt],$t=xe["cancel"+nt]||xe["cancelRequest"+nt];for(var mt=0;!ut&&mt<sr.length;mt++)ut=xe[sr[mt]+"Request"+nt],$t=xe[sr[mt]+"Cancel"+nt]||xe[sr[mt]+"CancelRequest"+nt];if(!ut||!$t){var Ga=0,So=0,De=[],Nb=1e3/60;ut=function(a){if(De.length===0){var e=Rb(),t=Math.max(0,Nb-(e-Ga));Ga=t+e,setTimeout(function(){var r=De.slice(0);De.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(Ga)}catch(n){setTimeout(function(){throw n},0)}},Math.round(t))}return De.push({handle:++So,callback:a,cancelled:!1}),So},$t=function(a){for(var e=0;e<De.length;e++)De[e].handle===a&&(De[e].cancelled=!0)}}Br.exports=function(a){return ut.call(xe,a)};Br.exports.cancel=function(){$t.apply(xe,arguments)};Br.exports.polyfill=function(a){a||(a=xe),a.requestAnimationFrame=ut,a.cancelAnimationFrame=$t};var Ib=Br.exports;const za=he.getDefaultExportFromCjs(Ib);var gl=`
|
|
4
|
+
\v\f\r \u2028\u2029\uFEFF`,Mb=L,_b=fe,Vb=ye,yi=gl,Oo=Mb("".replace),Db=RegExp("^["+yi+"]+"),kb=RegExp("(^|[^"+yi+"])["+yi+"]+$"),Ha=function(a){return function(e){var t=Vb(_b(e));return a&1&&(t=Oo(t,Db,"")),a&2&&(t=Oo(t,kb,"$1")),t}},Lb={start:Ha(1),end:Ha(2),trim:Ha(3)},Bb=Pr.PROPER,Fb=k,$o=gl,wo="
",jb=function(a){return Fb(function(){return!!$o[a]()||wo[a]()!==wo||Bb&&$o[a].name!==a})},Ub=ee,Gb=Lb.trim,zb=jb;Ub({target:"String",proto:!0,forced:zb("trim")},{trim:function(){return Gb(this)}});var Hb=function(a){this.ok=!1,this.alpha=1,a.charAt(0)=="#"&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.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"};a=e[a]||a;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(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3]),parseFloat(u[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(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],r=0;r<t.length;r++){var i=t[r].re,n=t[r].process,o=i.exec(a);if(o){var s=n(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 u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l<t.length;l++)for(var h=t[l].example,f=0;f<h.length;f++)u[u.length]=h[f];for(var c in e)u[u.length]=c;var v=document.createElement("ul");v.setAttribute("id","rgbcolor-examples");for(var l=0;l<u.length;l++)try{var d=document.createElement("li"),g=new RGBColor(u[l]),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(" "+u[l]+" -> "+g.toRGB()+" -> "+g.toHex());d.appendChild(p),d.appendChild(y),v.appendChild(d)}catch{}return v}};const mi=he.getDefaultExportFromCjs(Hb);var Yb=ee,Xb=_r,Wb=hu.indexOf,qb=vl,bi=Xb([].indexOf),dl=!!bi&&1/bi([1],1,-0)<0,Qb=dl||!qb("indexOf");Yb({target:"Array",proto:!0,forced:Qb},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return dl?bi(this,e,t)||0:Wb(this,e,t)}});var Kb=ee,Zb=L,Jb=ln,e1=fe,Co=ye,t1=hn,r1=Zb("".indexOf);Kb({target:"String",proto:!0,forced:!t1("includes")},{includes:function(e){return!!~r1(Co(e1(this)),Co(Jb(e)),arguments.length>1?arguments[1]:void 0)}});var a1=Ge,i1=Array.isArray||function(e){return a1(e)==="Array"},n1=ee,s1=L,o1=i1,u1=s1([].reverse),Ao=[1,2];n1({target:"Array",proto:!0,forced:String(Ao)===String(Ao.reverse())},{reverse:function(){return o1(this)&&(this.length=this.length),u1(this)}});/*! *****************************************************************************
|
|
5
5
|
Copyright (c) Microsoft Corporation.
|
|
6
6
|
|
|
7
7
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -14,5 +14,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
14
14
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
15
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
16
|
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
-
***************************************************************************** */var vl=function(a,e){return(vl=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])})(a,e)};function fl(a,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=a}vl(a,e),a.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function o1(a){var e="";Array.isArray(a)||(a=[a]);for(var t=0;t<a.length;t++){var r=a[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 mi(a,e){var t=a[0],r=a[1];return[t*Math.cos(e)-r*Math.sin(e),t*Math.sin(e)+r*Math.cos(e)]}function ue(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];for(var t=0;t<a.length;t++)if(typeof a[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof a[t]+" == typeof "+a[t]);return!0}var Ce=Math.PI;function za(a,e,t){a.lArcFlag=a.lArcFlag===0?0:1,a.sweepFlag=a.sweepFlag===0?0:1;var r=a.rX,i=a.rY,n=a.x,o=a.y;r=Math.abs(a.rX),i=Math.abs(a.rY);var s=mi([(e-n)/2,(t-o)/2],-a.xRot/180*Ce),u=s[0],l=s[1],h=Math.pow(u,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),a.rX=r,a.rY=i;var f=Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(u,2),c=(a.lArcFlag!==a.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-f)/f)),v=r*l/i*c,d=-i*u/r*c,g=mi([v,d],a.xRot/180*Ce);a.cX=g[0]+(e+n)/2,a.cY=g[1]+(t+o)/2,a.phi1=Math.atan2((l-d)/i,(u-v)/r),a.phi2=Math.atan2((-l-d)/i,(-u-v)/r),a.sweepFlag===0&&a.phi2>a.phi1&&(a.phi2-=2*Ce),a.sweepFlag===1&&a.phi2<a.phi1&&(a.phi2+=2*Ce),a.phi1*=180/Ce,a.phi2*=180/Ce}function Oo(a,e,t){ue(a,e,t);var r=a*a+e*e-t*t;if(0>r)return[];if(r===0)return[[a*t/(a*a+e*e),e*t/(a*a+e*e)]];var i=Math.sqrt(r);return[[(a*t+e*i)/(a*a+e*e),(e*t-a*i)/(a*a+e*e)],[(a*t-e*i)/(a*a+e*e),(e*t+a*i)/(a*a+e*e)]]}var U,me=Math.PI/180;function $o(a,e,t){return(1-t)*a+t*e}function wo(a,e,t,r){return a+Math.cos(r/180*Ce)*e+Math.sin(r/180*Ce)*t}function Co(a,e,t,r){var i=1e-6,n=e-a,o=t-e,s=3*n+3*(r-t)-6*o,u=6*(o-n),l=3*n;return Math.abs(s)<i?[-l/u]:function(h,f,c){var v=h*h/4-f;if(v<-c)return[];if(v<=c)return[-h/2];var d=Math.sqrt(v);return[-h/2-d,-h/2+d]}(u/s,l/s,i)}function Ao(a,e,t,r,i){var n=1-i;return a*(n*n*n)+e*(3*n*n*i)+t*(3*n*i*i)+r*(i*i*i)}(function(a){function e(){return i(function(s,u,l){return s.relative&&(s.x1!==void 0&&(s.x1+=u),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=u),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=u),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function t(){var s=NaN,u=NaN,l=NaN,h=NaN;return i(function(f,c,v){return f.type&m.SMOOTH_CURVE_TO&&(f.type=m.CURVE_TO,s=isNaN(s)?c:s,u=isNaN(u)?v:u,f.x1=f.relative?c-s:2*c-s,f.y1=f.relative?v-u:2*v-u),f.type&m.CURVE_TO?(s=f.relative?c+f.x2:f.x2,u=f.relative?v+f.y2:f.y2):(s=NaN,u=NaN),f.type&m.SMOOTH_QUAD_TO&&(f.type=m.QUAD_TO,l=isNaN(l)?c:l,h=isNaN(h)?v:h,f.x1=f.relative?c-l:2*c-l,f.y1=f.relative?v-h:2*v-h),f.type&m.QUAD_TO?(l=f.relative?c+f.x1:f.x1,h=f.relative?v+f.y1:f.y1):(l=NaN,h=NaN),f})}function r(){var s=NaN,u=NaN;return i(function(l,h,f){if(l.type&m.SMOOTH_QUAD_TO&&(l.type=m.QUAD_TO,s=isNaN(s)?h:s,u=isNaN(u)?f:u,l.x1=l.relative?h-s:2*h-s,l.y1=l.relative?f-u:2*f-u),l.type&m.QUAD_TO){s=l.relative?h+l.x1:l.x1,u=l.relative?f+l.y1:l.y1;var c=l.x1,v=l.y1;l.type=m.CURVE_TO,l.x1=((l.relative?0:h)+2*c)/3,l.y1=((l.relative?0:f)+2*v)/3,l.x2=(l.x+2*c)/3,l.y2=(l.y+2*v)/3}else s=NaN,u=NaN;return l})}function i(s){var u=0,l=0,h=NaN,f=NaN;return function(c){if(isNaN(h)&&!(c.type&m.MOVE_TO))throw new Error("path must start with moveto");var v=s(c,u,l,h,f);return c.type&m.CLOSE_PATH&&(u=h,l=f),c.x!==void 0&&(u=c.relative?u+c.x:c.x),c.y!==void 0&&(l=c.relative?l+c.y:c.y),c.type&m.MOVE_TO&&(h=u,f=l),v}}function n(s,u,l,h,f,c){return ue(s,u,l,h,f,c),i(function(v,d,g,p){var y=v.x1,x=v.x2,b=v.relative&&!isNaN(p),E=v.x!==void 0?v.x:b?0:d,w=v.y!==void 0?v.y:b?0:g;function O(se){return se*se}v.type&m.HORIZ_LINE_TO&&u!==0&&(v.type=m.LINE_TO,v.y=v.relative?0:g),v.type&m.VERT_LINE_TO&&l!==0&&(v.type=m.LINE_TO,v.x=v.relative?0:d),v.x!==void 0&&(v.x=v.x*s+w*l+(b?0:f)),v.y!==void 0&&(v.y=E*u+v.y*h+(b?0:c)),v.x1!==void 0&&(v.x1=v.x1*s+v.y1*l+(b?0:f)),v.y1!==void 0&&(v.y1=y*u+v.y1*h+(b?0:c)),v.x2!==void 0&&(v.x2=v.x2*s+v.y2*l+(b?0:f)),v.y2!==void 0&&(v.y2=x*u+v.y2*h+(b?0:c));var S=s*h-u*l;if(v.xRot!==void 0&&(s!==1||u!==0||l!==0||h!==1))if(S===0)delete v.rX,delete v.rY,delete v.xRot,delete v.lArcFlag,delete v.sweepFlag,v.type=m.LINE_TO;else{var C=v.xRot*Math.PI/180,I=Math.sin(C),_=Math.cos(C),F=1/O(v.rX),R=1/O(v.rY),X=O(_)*F+O(I)*R,W=2*I*_*(F-R),G=O(I)*F+O(_)*R,q=X*h*h-W*u*h+G*u*u,H=W*(s*h+u*l)-2*(X*l*h+G*s*u),Q=X*l*l-W*s*l+G*s*s,N=(Math.atan2(H,q-Q)+Math.PI)%Math.PI/2,M=Math.sin(N),Z=Math.cos(N);v.rX=Math.abs(S)/Math.sqrt(q*O(Z)+H*M*Z+Q*O(M)),v.rY=Math.abs(S)/Math.sqrt(q*O(M)-H*M*Z+Q*O(Z)),v.xRot=180*N/Math.PI}return v.sweepFlag!==void 0&&0>S&&(v.sweepFlag=+!v.sweepFlag),v})}function o(){return function(s){var u={};for(var l in s)u[l]=s[l];return u}}a.ROUND=function(s){function u(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ue(s),function(l){return l.x1!==void 0&&(l.x1=u(l.x1)),l.y1!==void 0&&(l.y1=u(l.y1)),l.x2!==void 0&&(l.x2=u(l.x2)),l.y2!==void 0&&(l.y2=u(l.y2)),l.x!==void 0&&(l.x=u(l.x)),l.y!==void 0&&(l.y=u(l.y)),l.rX!==void 0&&(l.rX=u(l.rX)),l.rY!==void 0&&(l.rY=u(l.rY)),l}},a.TO_ABS=e,a.TO_REL=function(){return i(function(s,u,l){return s.relative||(s.x1!==void 0&&(s.x1-=u),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=u),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=u),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},a.NORMALIZE_HVZ=function(s,u,l){return s===void 0&&(s=!0),u===void 0&&(u=!0),l===void 0&&(l=!0),i(function(h,f,c,v,d){if(isNaN(v)&&!(h.type&m.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&m.HORIZ_LINE_TO&&(h.type=m.LINE_TO,h.y=h.relative?0:c),l&&h.type&m.VERT_LINE_TO&&(h.type=m.LINE_TO,h.x=h.relative?0:f),s&&h.type&m.CLOSE_PATH&&(h.type=m.LINE_TO,h.x=h.relative?v-f:v,h.y=h.relative?d-c:d),h.type&m.ARC&&(h.rX===0||h.rY===0)&&(h.type=m.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},a.NORMALIZE_ST=t,a.QT_TO_C=r,a.INFO=i,a.SANITIZE=function(s){s===void 0&&(s=0),ue(s);var u=NaN,l=NaN,h=NaN,f=NaN;return i(function(c,v,d,g,p){var y=Math.abs,x=!1,b=0,E=0;if(c.type&m.SMOOTH_CURVE_TO&&(b=isNaN(u)?0:v-u,E=isNaN(l)?0:d-l),c.type&(m.CURVE_TO|m.SMOOTH_CURVE_TO)?(u=c.relative?v+c.x2:c.x2,l=c.relative?d+c.y2:c.y2):(u=NaN,l=NaN),c.type&m.SMOOTH_QUAD_TO?(h=isNaN(h)?v:2*v-h,f=isNaN(f)?d:2*d-f):c.type&m.QUAD_TO?(h=c.relative?v+c.x1:c.x1,f=c.relative?d+c.y1:c.y2):(h=NaN,f=NaN),c.type&m.LINE_COMMANDS||c.type&m.ARC&&(c.rX===0||c.rY===0||!c.lArcFlag)||c.type&m.CURVE_TO||c.type&m.SMOOTH_CURVE_TO||c.type&m.QUAD_TO||c.type&m.SMOOTH_QUAD_TO){var w=c.x===void 0?0:c.relative?c.x:c.x-v,O=c.y===void 0?0:c.relative?c.y:c.y-d;b=isNaN(h)?c.x1===void 0?b:c.relative?c.x:c.x1-v:h-v,E=isNaN(f)?c.y1===void 0?E:c.relative?c.y:c.y1-d:f-d;var S=c.x2===void 0?0:c.relative?c.x:c.x2-v,C=c.y2===void 0?0:c.relative?c.y:c.y2-d;y(w)<=s&&y(O)<=s&&y(b)<=s&&y(E)<=s&&y(S)<=s&&y(C)<=s&&(x=!0)}return c.type&m.CLOSE_PATH&&y(v-g)<=s&&y(d-p)<=s&&(x=!0),x?[]:c})},a.MATRIX=n,a.ROTATE=function(s,u,l){u===void 0&&(u=0),l===void 0&&(l=0),ue(s,u,l);var h=Math.sin(s),f=Math.cos(s);return n(f,h,-h,f,u-u*f+l*h,l-u*h-l*f)},a.TRANSLATE=function(s,u){return u===void 0&&(u=0),ue(s,u),n(1,0,0,1,s,u)},a.SCALE=function(s,u){return u===void 0&&(u=s),ue(s,u),n(s,0,0,u,0,0)},a.SKEW_X=function(s){return ue(s),n(1,0,Math.atan(s),1,0,0)},a.SKEW_Y=function(s){return ue(s),n(1,Math.atan(s),0,1,0,0)},a.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(-1,0,0,1,s,0)},a.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(1,0,0,-1,0,s)},a.A_TO_C=function(){return i(function(s,u,l){return m.ARC===s.type?function(h,f,c){var v,d,g,p;h.cX||za(h,f,c);for(var y=Math.min(h.phi1,h.phi2),x=Math.max(h.phi1,h.phi2)-y,b=Math.ceil(x/90),E=new Array(b),w=f,O=c,S=0;S<b;S++){var C=$o(h.phi1,h.phi2,S/b),I=$o(h.phi1,h.phi2,(S+1)/b),_=I-C,F=4/3*Math.tan(_*me/4),R=[Math.cos(C*me)-F*Math.sin(C*me),Math.sin(C*me)+F*Math.cos(C*me)],X=R[0],W=R[1],G=[Math.cos(I*me),Math.sin(I*me)],q=G[0],H=G[1],Q=[q+F*Math.sin(I*me),H-F*Math.cos(I*me)],N=Q[0],M=Q[1];E[S]={relative:h.relative,type:m.CURVE_TO};var Z=function(se,de){var we=mi([se*h.rX,de*h.rY],h.xRot),We=we[0],Dt=we[1];return[h.cX+We,h.cY+Dt]};v=Z(X,W),E[S].x1=v[0],E[S].y1=v[1],d=Z(N,M),E[S].x2=d[0],E[S].y2=d[1],g=Z(q,H),E[S].x=g[0],E[S].y=g[1],h.relative&&(E[S].x1-=w,E[S].y1-=O,E[S].x2-=w,E[S].y2-=O,E[S].x-=w,E[S].y-=O),w=(p=[E[S].x,E[S].y])[0],O=p[1]}return E}(s,s.relative?0:u,s.relative?0:l):s})},a.ANNOTATE_ARCS=function(){return i(function(s,u,l){return s.relative&&(u=0,l=0),m.ARC===s.type&&za(s,u,l),s})},a.CLONE=o,a.CALCULATE_BOUNDS=function(){var s=function(c){var v={};for(var d in c)v[d]=c[d];return v},u=e(),l=r(),h=t(),f=i(function(c,v,d){var g=h(l(u(s(c))));function p(M){M>f.maxX&&(f.maxX=M),M<f.minX&&(f.minX=M)}function y(M){M>f.maxY&&(f.maxY=M),M<f.minY&&(f.minY=M)}if(g.type&m.DRAWING_COMMANDS&&(p(v),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 x=0,b=Co(v,g.x1,g.x2,g.x);x<b.length;x++)0<(N=b[x])&&1>N&&p(Ao(v,g.x1,g.x2,g.x,N));for(var E=0,w=Co(d,g.y1,g.y2,g.y);E<w.length;E++)0<(N=w[E])&&1>N&&y(Ao(d,g.y1,g.y2,g.y,N))}if(g.type&m.ARC){p(g.x),y(g.y),za(g,v,d);for(var O=g.xRot/180*Math.PI,S=Math.cos(O)*g.rX,C=Math.sin(O)*g.rX,I=-Math.sin(O)*g.rY,_=Math.cos(O)*g.rY,F=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],R=F[0],X=F[1],W=function(M){var Z=M[0],se=M[1],de=180*Math.atan2(se,Z)/Math.PI;return de<R?de+360:de},G=0,q=Oo(I,-S,0).map(W);G<q.length;G++)(N=q[G])>R&&N<X&&p(wo(g.cX,S,I,N));for(var H=0,Q=Oo(_,-C,0).map(W);H<Q.length;H++){var N;(N=Q[H])>R&&N<X&&y(wo(g.cY,C,_,N))}}return c});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}})(U||(U={}));var oe,cl=function(){function a(){}return a.prototype.round=function(e){return this.transform(U.ROUND(e))},a.prototype.toAbs=function(){return this.transform(U.TO_ABS())},a.prototype.toRel=function(){return this.transform(U.TO_REL())},a.prototype.normalizeHVZ=function(e,t,r){return this.transform(U.NORMALIZE_HVZ(e,t,r))},a.prototype.normalizeST=function(){return this.transform(U.NORMALIZE_ST())},a.prototype.qtToC=function(){return this.transform(U.QT_TO_C())},a.prototype.aToC=function(){return this.transform(U.A_TO_C())},a.prototype.sanitize=function(e){return this.transform(U.SANITIZE(e))},a.prototype.translate=function(e,t){return this.transform(U.TRANSLATE(e,t))},a.prototype.scale=function(e,t){return this.transform(U.SCALE(e,t))},a.prototype.rotate=function(e,t,r){return this.transform(U.ROTATE(e,t,r))},a.prototype.matrix=function(e,t,r,i,n,o){return this.transform(U.MATRIX(e,t,r,i,n,o))},a.prototype.skewX=function(e){return this.transform(U.SKEW_X(e))},a.prototype.skewY=function(e){return this.transform(U.SKEW_Y(e))},a.prototype.xSymmetry=function(e){return this.transform(U.X_AXIS_SYMMETRY(e))},a.prototype.ySymmetry=function(e){return this.transform(U.Y_AXIS_SYMMETRY(e))},a.prototype.annotateArcs=function(){return this.transform(U.ANNOTATE_ARCS())},a}(),u1=function(a){return a===" "||a===" "||a==="\r"||a===`
|
|
18
|
-
`},Po=function(a){return 48<=a.charCodeAt(0)&&a.charCodeAt(0)<=57},l1=function(a){function e(){var t=a.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 fl(e,a),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 n=function(f){r.push(f),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],u=!(this.curCommandType!==m.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=Po(s)&&(this.curNumber==="0"&&s==="0"||u);if(!Po(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||u){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===m.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" 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(h),this.curArgs.length===h1[this.curCommandType]&&(m.HORIZ_LINE_TO===this.curCommandType?n({type:m.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):m.VERT_LINE_TO===this.curCommandType?n({type:m.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===m.MOVE_TO||this.curCommandType===m.LINE_TO||this.curCommandType===m.SMOOTH_QUAD_TO?(n({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?n({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?n({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?n({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&&n({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(!u1(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)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 n=0,o=Object.getPrototypeOf(this).parse.call(this,r);n<o.length;n++){var s=o[n],u=t(s);Array.isArray(u)?i.push.apply(i,u):i.push(u)}return i}}})},e}(cl),m=function(a){function e(t){var r=a.call(this)||this;return r.commands=typeof t=="string"?e.parse(t):t,r}return fl(e,a),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=U.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],i=0,n=this.commands;i<n.length;i++){var o=t(n[i]);Array.isArray(o)?r.push.apply(r,o):r.push(o)}return this.commands=r,this},e.encode=function(t){return o1(t)},e.parse=function(t){var r=new l1,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}(cl),h1=((oe={})[m.MOVE_TO]=2,oe[m.LINE_TO]=2,oe[m.HORIZ_LINE_TO]=1,oe[m.VERT_LINE_TO]=1,oe[m.CLOSE_PATH]=0,oe[m.QUAD_TO]=4,oe[m.SMOOTH_QUAD_TO]=2,oe[m.CURVE_TO]=6,oe[m.SMOOTH_CURVE_TO]=4,oe[m.ARC]=7,oe),v1=Y,f1=ge,c1=Tr,g1=Gu,Ro=RegExp.prototype,d1=function(a){var e=a.flags;return e===void 0&&!("flags"in Ro)&&!f1(a,"flags")&&c1(Ro,a)?v1(g1,a):e},p1=Ar.PROPER,y1=Ye,m1=J,No=ye,b1=k,x1=d1,vn="toString",gl=RegExp.prototype,dl=gl[vn],E1=b1(function(){return dl.call({source:"a",flags:"b"})!=="/a/b"}),S1=p1&&dl.name!==vn;(E1||S1)&&y1(gl,vn,function(){var e=m1(this),t=No(e.source),r=No(x1(e));return"/"+t+"/"+r},{unsafe:!0});function cr(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cr=function(e){return typeof e}:cr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cr(a)}function T1(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}var O1=[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],$1=[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 w1(a,e,t,r,i){if(typeof a=="string"&&(a=document.getElementById(a)),!a||cr(a)!=="object"||!("getContext"in a))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=a.getContext("2d");try{return n.getImageData(e,t,r,i)}catch(o){throw new Error("unable to access image data: "+o)}}function C1(a,e,t,r,i,n){if(!(isNaN(n)||n<1)){n|=0;var o=w1(a,e,t,r,i);o=A1(o,e,t,r,i,n),a.getContext("2d").putImageData(o,e,t)}}function A1(a,e,t,r,i,n){for(var o=a.data,s=2*n+1,u=r-1,l=i-1,h=n+1,f=h*(h+1)/2,c=new Io,v=c,d,g=1;g<s;g++)v=v.next=new Io,g===h&&(d=v);v.next=c;for(var p=null,y=null,x=0,b=0,E=O1[n],w=$1[n],O=0;O<i;O++){v=c;for(var S=o[b],C=o[b+1],I=o[b+2],_=o[b+3],F=0;F<h;F++)v.r=S,v.g=C,v.b=I,v.a=_,v=v.next;for(var R=0,X=0,W=0,G=0,q=h*S,H=h*C,Q=h*I,N=h*_,M=f*S,Z=f*C,se=f*I,de=f*_,we=1;we<h;we++){var We=b+((u<we?u:we)<<2),Dt=o[We],En=o[We+1],Sn=o[We+2],Tn=o[We+3],kt=h-we;M+=(v.r=Dt)*kt,Z+=(v.g=En)*kt,se+=(v.b=Sn)*kt,de+=(v.a=Tn)*kt,R+=Dt,X+=En,W+=Sn,G+=Tn,v=v.next}p=c,y=d;for(var Fr=0;Fr<r;Fr++){var jr=de*E>>>w;if(o[b+3]=jr,jr!==0){var Ur=255/jr;o[b]=(M*E>>>w)*Ur,o[b+1]=(Z*E>>>w)*Ur,o[b+2]=(se*E>>>w)*Ur}else o[b]=o[b+1]=o[b+2]=0;M-=q,Z-=H,se-=Q,de-=N,q-=p.r,H-=p.g,Q-=p.b,N-=p.a;var Ne=Fr+n+1;Ne=x+(Ne<u?Ne:u)<<2,R+=p.r=o[Ne],X+=p.g=o[Ne+1],W+=p.b=o[Ne+2],G+=p.a=o[Ne+3],M+=R,Z+=X,se+=W,de+=G,p=p.next;var Lt=y,On=Lt.r,$n=Lt.g,wn=Lt.b,Cn=Lt.a;q+=On,H+=$n,Q+=wn,N+=Cn,R-=On,X-=$n,W-=wn,G-=Cn,y=y.next,b+=4}x+=r}for(var qe=0;qe<r;qe++){b=qe<<2;var Ie=o[b],Me=o[b+1],_e=o[b+2],te=o[b+3],Gr=h*Ie,zr=h*Me,Hr=h*_e,Yr=h*te,Bt=f*Ie,Ft=f*Me,jt=f*_e,Ut=f*te;v=c;for(var An=0;An<h;An++)v.r=Ie,v.g=Me,v.b=_e,v.a=te,v=v.next;for(var Pn=r,Xr=0,Wr=0,qr=0,Qr=0,Gt=1;Gt<=n;Gt++){b=Pn+qe<<2;var zt=h-Gt;Bt+=(v.r=Ie=o[b])*zt,Ft+=(v.g=Me=o[b+1])*zt,jt+=(v.b=_e=o[b+2])*zt,Ut+=(v.a=te=o[b+3])*zt,Qr+=Ie,Xr+=Me,Wr+=_e,qr+=te,v=v.next,Gt<l&&(Pn+=r)}b=qe,p=c,y=d;for(var Kr=0;Kr<i;Kr++){var re=b<<2;o[re+3]=te=Ut*E>>>w,te>0?(te=255/te,o[re]=(Bt*E>>>w)*te,o[re+1]=(Ft*E>>>w)*te,o[re+2]=(jt*E>>>w)*te):o[re]=o[re+1]=o[re+2]=0,Bt-=Gr,Ft-=zr,jt-=Hr,Ut-=Yr,Gr-=p.r,zr-=p.g,Hr-=p.b,Yr-=p.a,re=qe+((re=Kr+h)<l?re:l)*r<<2,Bt+=Qr+=p.r=o[re],Ft+=Xr+=p.g=o[re+1],jt+=Wr+=p.b=o[re+2],Ut+=qr+=p.a=o[re+3],p=p.next,Gr+=Ie=y.r,zr+=Me=y.g,Hr+=_e=y.b,Yr+=te=y.a,Qr-=Ie,Xr-=Me,Wr-=_e,qr-=te,y=y.next,b+=r}}return a}var Io=function a(){T1(this,a),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function P1(){var{DOMParser:a}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:a,createCanvas(t,r){return new OffscreenCanvas(t,r)},createImage(t){return Se(function*(){var r=yield fetch(t),i=yield r.blob(),n=yield createImageBitmap(i);return n})()}};return(typeof DOMParser<"u"||typeof a>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function R1(a){var{DOMParser:e,canvas:t,fetch:r}=a;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:t.createCanvas,createImage:t.loadImage}}var N1=Object.freeze({__proto__:null,offscreen:P1,node:R1});function Xe(a){return a.replace(/(?!\u3000)\s+/gm," ")}function pl(a){return a.replace(/^[\n \t]+/,"")}function yl(a){return a.replace(/[\n \t]+$/,"")}function ae(a){var e=(a||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var I1=/^[A-Z-]+$/;function ml(a){return I1.test(a)?a.toLowerCase():a}function fn(a){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(a)||[];return e[2]||e[3]||e[4]}function bl(a){if(!a.startsWith("rgb"))return a;var e=3,t=a.replace(/\d+(\.\d+)?/g,(r,i)=>e--&&i?String(Math.round(parseFloat(r))):r);return t}var M1=/(\[[^\]]+\])/g,_1=/(#[^\s+>~.[:]+)/g,V1=/(\.[^\s+>~.[:]+)/g,D1=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,k1=/(:[\w-]+\([^)]*\))/gi,L1=/(:[^\s+>~.[:]+)/g,B1=/([^\s+>~.[:]+)/g;function ke(a,e){var t=e.exec(a);return t?[a.replace(e," "),t.length]:[a,0]}function xl(a){var e=[0,0,0],t=a.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[t,r]=ke(t,M1),e[1]+=r,[t,r]=ke(t,_1),e[0]+=r,[t,r]=ke(t,V1),e[1]+=r,[t,r]=ke(t,D1),e[2]+=r,[t,r]=ke(t,k1),e[1]+=r,[t,r]=ke(t,L1),e[1]+=r,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,r]=ke(t,B1),e[2]+=r,e.join("")}var je=1e-8;function bi(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))}function Er(a,e){return(a[0]*e[0]+a[1]*e[1])/(bi(a)*bi(e))}function xi(a,e){return(a[0]*e[1]<a[1]*e[0]?-1:1)*Math.acos(Er(a,e))}function Ei(a){return a*a*a}function Si(a){return 3*a*a*(1-a)}function Ti(a){return 3*a*(1-a)*(1-a)}function Oi(a){return(1-a)*(1-a)*(1-a)}function $i(a){return a*a}function wi(a){return 2*a*(1-a)}function Ci(a){return(1-a)*(1-a)}class T{constructor(e,t,r){this.document=e,this.name=t,this.value=r,this.isNormalizedColor=!1}static empty(e){return new T(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:r}=this;return Xe(this.getString()).trim().split(e).map(i=>new T(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=bl(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:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.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()*n.computeSize(r);default:{var o=this.getNumber();return t&&o<1?o*n.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()?T.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),r=t.length,i=0,n=0;n<r&&(t[n]===","&&i++,i!==3);n++);if(e.hasValue()&&this.isString()&&i!==3){var o=new pi(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new T(this.document,this.name,t)}}T.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 El{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 V{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]=ae(e);return new V(r,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=t,i=r]=ae(e);return new V(r,i)}static parsePath(e){for(var t=ae(e),r=t.length,i=[],n=0;n<r;n+=2)i.push(new V(t[n],t[n+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],n=t*e[1]+r*e[3]+e[5];this.x=i,this.y=n}}class Sl{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((n,o)=>{for(var{run:s}=n,u=r[o];u;)s(u),u=u.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInPath&&t.isPointInPath(s,u)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInBox(s,u)&&(i[o]=e)})}}mapXY(e,t){for(var{window:r,ctx:i}=this.screen,n=new V(e,t),o=i.canvas;o;)n.x-=o.offsetLeft,n.y-=o.offsetTop,o=o.offsetParent;return r.scrollX&&(n.x+=r.scrollX),r.scrollY&&(n.y+=r.scrollY),n}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 Tl=typeof window<"u"?window:null,Ol=typeof fetch<"u"?fetch.bind(void 0):null;class It{constructor(e){var{fetch:t=Ol,window:r=Tl}=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 El,this.mouse=new Sl(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:n,desiredWidth:o,height:s,desiredHeight:u,minX:l=0,minY:h=0,refX:f,refY:c,clip:v=!1,clipX:d=0,clipY:g=0}=e,p=Xe(i).replace(/^defer\s/,""),[y,x]=p.split(" "),b=y||"xMidYMid",E=x||"meet",w=n/o,O=s/u,S=Math.min(w,O),C=Math.max(w,O),I=o,_=u;E==="meet"&&(I*=S,_*=S),E==="slice"&&(I*=C,_*=C);var F=new T(t,"refX",f),R=new T(t,"refY",c),X=F.hasValue()&&R.hasValue();if(X&&r.translate(-S*F.getPixels("x"),-S*R.getPixels("y")),v){var W=S*d,G=S*g;r.beginPath(),r.moveTo(W,G),r.lineTo(n,G),r.lineTo(n,s),r.lineTo(W,s),r.closePath(),r.clip()}if(!X){var q=E==="meet"&&S===O,H=E==="slice"&&C===O,Q=E==="meet"&&S===w,N=E==="slice"&&C===w;b.startsWith("xMid")&&(q||H)&&r.translate(n/2-I/2,0),b.endsWith("YMid")&&(Q||N)&&r.translate(0,s/2-_/2),b.startsWith("xMax")&&(q||H)&&r.translate(n-I,0),b.endsWith("YMax")&&(Q||N)&&r.translate(0,s-_)}switch(!0){case b==="none":r.scale(w,O);break;case E==="meet":r.scale(S,S);break;case E==="slice":r.scale(C,C);break}r.translate(-l,-h)}start(e){var{enableRedraw:t=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:n=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:u,scaleHeight:l,offsetX:h,offsetY:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:c,mouse:v}=this,d=1e3/c;if(this.frameDuration=d,this.readyPromise=new Promise(b=>{this.resolveReady=b}),this.isReady()&&this.render(e,n,o,u,l,h,f),!!t){var g=Date.now(),p=g,y=0,x=()=>{g=Date.now(),y=g-p,y>=d&&(p=g-y%d,this.shouldUpdate(i,s)&&(this.render(e,n,o,u,l,h,f),v.runEvents())),this.intervalId=Ua(x)};r||v.start(),this.intervalId=Ua(x)}}stop(){this.intervalId&&(Ua.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:r}=this,i=this.animations.reduce((n,o)=>o.update(r)||n,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,r,i,n,o,s){var{CLIENT_WIDTH:u,CLIENT_HEIGHT:l,viewPort:h,ctx:f,isFirstRender:c}=this,v=f.canvas;h.clear(),v.width&&v.height?h.setCurrent(v.width,v.height):h.setCurrent(u,l);var d=e.getStyle("width"),g=e.getStyle("height");!t&&(c||typeof i!="number"&&typeof n!="number")&&(d.hasValue()&&(v.width=d.getPixels("x"),v.style&&(v.style.width="".concat(v.width,"px"))),g.hasValue()&&(v.height=g.getPixels("y"),v.style&&(v.style.height="".concat(v.height,"px"))));var p=v.clientWidth||v.width,y=v.clientHeight||v.height;if(t&&d.hasValue()&&g.hasValue()&&(p=d.getPixels("x"),y=g.getPixels("y")),h.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 n=="number"){var x=ae(e.getAttribute("viewBox").getString()),b=0,E=0;if(typeof i=="number"){var w=e.getStyle("width");w.hasValue()?b=w.getPixels("x")/i:isNaN(x[2])||(b=x[2]/i)}if(typeof n=="number"){var O=e.getStyle("height");O.hasValue()?E=O.getPixels("y")/n:isNaN(x[3])||(E=x[3]/n)}b||(b=E),E||(E=b),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(n);var S=e.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/b,", ").concat(1/E,")"))}r||f.clearRect(0,0,p,y),e.render(f),c&&(this.isFirstRender=!1)}}It.defaultWindow=Tl;It.defaultFetch=Ol;var{defaultFetch:F1}=It,j1=typeof DOMParser<"u"?DOMParser:null;class gr{constructor(){var{fetch:e=F1,DOMParser:t=j1}=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 $l{constructor(e,t){this.type="translate",this.point=null,this.point=V.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 wl{constructor(e,t,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=ae(t);this.angle=new T(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:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(o.getRadians()),e.translate(-s,-u)}unapply(e){var{cx:t,cy:r,originX:i,originY:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(-1*o.getRadians()),e.translate(-s,-u)}applyToPoint(e){var{cx:t,cy:r,angle:i}=this,n=i.getRadians();e.applyTransform([1,0,0,1,t||0,r||0]),e.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),e.applyTransform([1,0,0,1,-t||0,-r||0])}}class Cl{constructor(e,t,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=V.parseScale(t);(i.x===0||i.y===0)&&(i.x=je,i.y=je),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(e){var{scale:{x:t,y:r},originX:i,originY:n}=this,o=i.getPixels("x"),s=n.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:n}=this,o=i.getPixels("x"),s=n.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 cn{constructor(e,t,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ae(t),this.originX=r[0],this.originY=r[1]}apply(e){var{originX:t,originY:r,matrix:i}=this,n=t.getPixels("x"),o=r.getPixels("y");e.translate(n,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-n,-o)}unapply(e){var{originX:t,originY:r,matrix:i}=this,n=i[0],o=i[2],s=i[4],u=i[1],l=i[3],h=i[5],f=0,c=0,v=1,d=1/(n*(l*v-h*c)-o*(u*v-h*f)+s*(u*c-l*f)),g=t.getPixels("x"),p=r.getPixels("y");e.translate(g,p),e.transform(d*(l*v-h*c),d*(h*f-u*v),d*(s*c-o*v),d*(n*v-s*f),d*(o*h-s*l),d*(s*u-n*h)),e.translate(-g,-p)}applyToPoint(e){e.applyTransform(this.matrix)}}class gn extends cn{constructor(e,t,r){super(e,t,r),this.type="skew",this.angle=null,this.angle=new T(e,"angle",t)}}class Al extends gn{constructor(e,t,r){super(e,t,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Pl extends gn{constructor(e,t,r){super(e,t,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function U1(a){return Xe(a).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function G1(a){var[e,t]=a.split("(");return[e.trim(),t.trim().replace(")","")]}class Pe{constructor(e,t,r){this.document=e,this.transforms=[];var i=U1(t);i.forEach(n=>{if(n!=="none"){var[o,s]=G1(n),u=Pe.transformTypes[o];typeof u<"u"&&this.transforms.push(new u(this.document,s,r))}})}static fromElement(e,t){var r=t.getStyle("transform",!1,!0),[i,n=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,n];return r.hasValue()?new Pe(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)}}Pe.transformTypes={translate:$l,rotate:wl,scale:Cl,matrix:cn,skewX:Al,skewY:Pl};class P{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 u=ml(s.nodeName);this.attributes[u]=new T(e,u,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[u,l]=s.split(":").map(h=>h.trim());this.styles[u]=new T(e,u,l)}})}var{definitions:n}=e,o=this.getAttribute("id");o.hasValue()&&(n[o.getString()]||(n[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 u=e.createTextNode(s);u.getText().length>0&&this.addChild(u)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[e];if(!r&&t){var i=new T(this.document,e,"");return this.attributes[e]=i,i}return r||T.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return T.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 n=this.getAttribute(e);if(n!=null&&n.hasValue())return this.styles[e]=n,n;if(!r){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var u=new T(this.document,e,"");return this.styles[e]=u,u}return i||T.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=Pe.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 P?e:this.document.createElement(e);t.parent=this,P.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(n=>".".concat(n)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var r in e)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=e[r],n=t[r];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),n>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=n)}}}removeStyles(e,t){var r=t.reduce((i,n)=>{var o=e.getStyle(n);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[n,s]]},[]);return r}restoreStyles(e,t){t.forEach(r=>{var[i,n]=r;e.getStyle(i,!0).setValue(n)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}P.ignoreChildTypes=["title"];class Rl extends P{constructor(e,t,r){super(e,t,r)}}function z1(a){var e=a.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function H1(a){return typeof process>"u"?a:a.trim().split(",").map(z1).join(",")}function Y1(a){if(!a)return"";var e=a.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 X1(a){if(!a)return"";var e=a.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 K{constructor(e,t,r,i,n,o){var s=o?typeof o=="string"?K.parse(o):o:{};this.fontFamily=n||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="",n="",o="",s="",u=Xe(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach(h=>{switch(!0){case(!l.fontStyle&&K.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&K.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&K.weights.includes(h)):h!=="inherit"&&(n=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([o]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(s+=h)}}),new K(r,i,n,o,s,t)}toString(){return[Y1(this.fontStyle),this.fontVariant,X1(this.fontWeight),this.fontSize,H1(this.fontFamily)].join(" ").trim()}}K.styles="normal|italic|oblique|inherit";K.variants="normal|small-caps|inherit";K.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ne{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:n}=e;this.addPoint(t,r),this.addPoint(i,n)}}sumCubic(e,t,r,i,n){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)*n}bezierCurveAdd(e,t,r,i,n){var o=6*t-12*r+6*i,s=-3*t+9*r-9*i+3*n,u=3*r-3*t;if(s===0){if(o===0)return;var l=-u/o;0<l&&l<1&&(e?this.addX(this.sumCubic(l,t,r,i,n)):this.addY(this.sumCubic(l,t,r,i,n)));return}var h=Math.pow(o,2)-4*u*s;if(!(h<0)){var f=(-o+Math.sqrt(h))/(2*s);0<f&&f<1&&(e?this.addX(this.sumCubic(f,t,r,i,n)):this.addY(this.sumCubic(f,t,r,i,n)));var c=(-o-Math.sqrt(h))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,r,i,n)):this.addY(this.sumCubic(c,t,r,i,n)))}}addBezierCurve(e,t,r,i,n,o,s,u){this.addPoint(e,t),this.addPoint(s,u),this.bezierCurveAdd(!0,e,r,n,s),this.bezierCurveAdd(!1,t,i,o,u)}addQuadraticCurve(e,t,r,i,n,o){var s=e+.6666666666666666*(r-e),u=t+2/3*(i-t),l=s+1/3*(n-e),h=u+1/3*(o-t);this.addBezierCurve(e,t,s,l,u,h,n,o)}isPointInBox(e,t){var{x1:r,y1:i,x2:n,y2:o}=this;return r<=e&&e<=n&&i<=t&&t<=o}}class $ 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 V(0,0),this.control=new V(0,0),this.current=new V(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 V(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:n}}=this,o=new V(2*t-i,2*r-n);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:n}=this;r&&n.length>0&&!n[n.length-1]&&(n[n.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 Re extends P{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"),n=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 u=r.getColor();u!=="inherit"&&(e.fillStyle=u==="none"?"rgba(0,0,0,0)":u)}if(i.hasValue()){var l=new T(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(n.isUrlDefinition()){var h=n.getFillStyleDefinition(this,o);h&&(e.strokeStyle=h)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var f=n.getString();f!=="inherit"&&(e.strokeStyle=f==="none"?"rgba(0,0,0,0)":f)}if(o.hasValue()){var c=new T(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=c}var v=this.getStyle("stroke-width");if(v.hasValue()){var d=v.getPixels();e.lineWidth=d||je}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),x=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()),x.hasValue()&&x.getString()!=="none"){var E=ae(x.getString());typeof e.setLineDash<"u"?e.setLineDash(E):typeof e.webkitLineDash<"u"?e.webkitLineDash=E:typeof e.mozDash<"u"&&!(E.length===1&&E[0]===0)&&(e.mozDash=E);var w=b.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=w:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=w:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),S=this.getStyle("font-style"),C=this.getStyle("font-variant"),I=this.getStyle("font-weight"),_=this.getStyle("font-size"),F=this.getStyle("font-family"),R=new K(S.getString(),C.getString(),I.getString(),_.hasValue()?"".concat(_.getPixels(!0),"px"):"",F.getString(),K.parse(O.getString(),e.font));S.setValue(R.fontStyle),C.setValue(R.fontVariant),I.setValue(R.fontWeight),_.setValue(R.fontSize),F.setValue(R.fontFamily),e.font=R.toString(),_.isPixels()&&(this.document.emSize=_.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class A extends Re{constructor(e,t,r){super(e,t,r),this.type="path",this.pathParser=null,this.pathParser=new $(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,r=new ne;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case $.MOVE_TO:this.pathM(e,r);break;case $.LINE_TO:this.pathL(e,r);break;case $.HORIZ_LINE_TO:this.pathH(e,r);break;case $.VERT_LINE_TO:this.pathV(e,r);break;case $.CURVE_TO:this.pathC(e,r);break;case $.SMOOTH_CURVE_TO:this.pathS(e,r);break;case $.QUAD_TO:this.pathQ(e,r);break;case $.SMOOTH_QUAD_TO:this.pathT(e,r);break;case $.ARC:this.pathA(e,r);break;case $.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((n,o)=>[n,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,n=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(n.isUrlDefinition()){var u=n.getDefinition(),[l,h]=r[0];u.render(e,l,h)}if(o.isUrlDefinition())for(var f=o.getDefinition(),c=1;c<i;c++){var[v,d]=r[c];f.render(e,v,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}=A.pathM(r),{x:n,y:o}=i;r.addMarker(i),t.addPoint(n,o),e&&e.moveTo(n,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:n}=A.pathL(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:r}=e,i=new V((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:n}=A.pathH(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:r}=e,i=new V(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:n}=A.pathV(r),{x:o,y:s}=n;r.addMarker(n,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"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathC(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathC(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,r=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathS(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathS(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.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:n,currentPoint:o}=A.pathQ(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.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:n,currentPoint:o}=A.pathT(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.y,o.x,o.y)}static pathA(e){var{current:t,command:r}=e,{rX:i,rY:n,xRot:o,lArcFlag:s,sweepFlag:u}=r,l=o*(Math.PI/180),h=e.getAsCurrentPoint(),f=new V(Math.cos(l)*(t.x-h.x)/2+Math.sin(l)*(t.y-h.y)/2,-Math.sin(l)*(t.x-h.x)/2+Math.cos(l)*(t.y-h.y)/2),c=Math.pow(f.x,2)/Math.pow(i,2)+Math.pow(f.y,2)/Math.pow(n,2);c>1&&(i*=Math.sqrt(c),n*=Math.sqrt(c));var v=(s===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(n,2)-Math.pow(i,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(i,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)));isNaN(v)&&(v=0);var d=new V(v*i*f.y/n,v*-n*f.x/i),g=new V((t.x+h.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+h.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),p=xi([1,0],[(f.x-d.x)/i,(f.y-d.y)/n]),y=[(f.x-d.x)/i,(f.y-d.y)/n],x=[(-f.x-d.x)/i,(-f.y-d.y)/n],b=xi(y,x);return Er(y,x)<=-1&&(b=Math.PI),Er(y,x)>=1&&(b=0),{currentPoint:h,rX:i,rY:n,sweepFlag:u,xAxisRotation:l,centp:g,a1:p,ad:b}}pathA(e,t){var{pathParser:r}=this,{currentPoint:i,rX:n,rY:o,sweepFlag:s,xAxisRotation:u,centp:l,a1:h,ad:f}=A.pathA(r),c=1-s?1:-1,v=h+c*(f/2),d=new V(l.x+n*Math.cos(v),l.y+o*Math.sin(v));if(r.addMarkerAngle(d,v-c*Math.PI/2),r.addMarkerAngle(i,v-c*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(h)&&!isNaN(f)){var g=n>o?n:o,p=n>o?1:n/o,y=n>o?o/n:1;e.translate(l.x,l.y),e.rotate(u),e.scale(p,y),e.arc(0,0,g,h,h+f,!!(1-s)),e.scale(1/p,1/y),e.rotate(-u),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){A.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class dn extends A{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 Te extends Re{constructor(e,t,r){super(e,t,new.target===Te?!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 n=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(n):t=n}),t}getFontSize(){var{document:e,parent:t}=this,r=K.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new ne(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,r){var i=t[r],n=null;if(e.isArabic){var o=t.length,s=t[r-1],u=t[r+1],l="isolated";if((r===0||s===" ")&&r<o-1&&u!==" "&&(l="terminal"),r>0&&s!==" "&&r<o-1&&u!==" "&&(l="medial"),r>0&&s!==" "&&(r===o-1||u===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var h=e.glyphs[i];n=h instanceof dn?h:h[l]}}else n=e.glyphs[i];return n||(n=e.missingGlyph),n}getText(){return""}getTextFromNode(e){var t=e||this.node,r=Array.from(t.parentNode.childNodes),i=r.indexOf(t),n=r.length-1,o=Xe(t.textContent||"");return i===0&&(o=pl(o)),i===n&&(o=yl(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(),n=r.getStyle("font-family").getDefinition();if(n){for(var{unitsPerEm:o}=n.fontFace,s=K.parse(t.ctx.font),u=r.getStyle("font-size").getNumber(s.fontSize),l=r.getStyle("font-style").getString(s.fontStyle),h=u/o,f=n.isRTL?i.split("").reverse().join(""):i,c=ae(r.getAttribute("dx").getString()),v=f.length,d=0;d<v;d++){var g=this.getGlyph(n,f,d);e.translate(this.x,this.y),e.scale(h,-h);var p=e.lineWidth;e.lineWidth=e.lineWidth*o/u,l==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=p,e.scale(1/h,-1/h),e.translate(-this.x,-this.y),this.x+=u*(g.horizAdvX||n.horizAdvX)/o,typeof c[d]<"u"&&!isNaN(c[d])&&(this.x+=c[d])}return}var{x:y,y:x}=this;e.fillStyle&&e.fillText(i,y,x),e.strokeStyle&&e.strokeText(i,y,x)}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 n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((t,r)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,r,i){var n=r.children[i];n.children.length>0?n.children.forEach((o,s)=>{t.adjustChildCoordinatesRecursiveCore(e,t,n,s)}):this.adjustChildCoordinates(e,t,r,i)}adjustChildCoordinates(e,t,r,i){var n=r.children[i];if(typeof n.measureText!="function")return n;e.save(),n.setContext(e,!0);var o=n.getAttribute("x"),s=n.getAttribute("y"),u=n.getAttribute("dx"),l=n.getAttribute("dy"),h=n.getStyle("font-family").getDefinition(),f=!!h&&h.isRTL;i===0&&(o.hasValue()||o.setValue(n.getInheritedAttribute("x")),s.hasValue()||s.setValue(n.getInheritedAttribute("y")),u.hasValue()||u.setValue(n.getInheritedAttribute("dx")),l.hasValue()||l.setValue(n.getInheritedAttribute("dy")));var c=n.measureText(e);return f&&(t.x-=c),o.hasValue()?(t.applyAnchoring(),n.x=o.getPixels("x"),u.hasValue()&&(n.x+=u.getPixels("x"))):(u.hasValue()&&(t.x+=u.getPixels("x")),n.x=t.x),t.x=n.x,f||(t.x+=c),s.hasValue()?(n.y=s.getPixels("y"),l.hasValue()&&(n.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),n.y=t.y),t.y=n.y,t.leafTexts.push(n),t.minX=Math.min(t.minX,n.x,n.x+c),t.maxX=Math.max(t.maxX,n.x,n.x+c),n.clearContext(e),e.restore(),n}getChildBoundingBox(e,t,r,i){var n=r.children[i];if(typeof n.getBoundingBox!="function")return null;var o=n.getBoundingBox(e);return o?(n.children.forEach((s,u)=>{var l=t.getChildBoundingBox(e,t,n,u);o.addBoundingBox(l)}),o):null}renderChild(e,t,r,i){var n=r.children[i];n.render(e),n.children.forEach((o,s)=>{t.renderChild(e,t,n,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 n=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=ae(r.getAttribute("dx").getString()),u=o.length,l=0,h=0;h<u;h++){var f=this.getGlyph(i,o,h);l+=(f.horizAdvX||i.horizAdvX)*n/i.fontFace.unitsPerEm,typeof s[h]<"u"&&!isNaN(s[h])&&(l+=s[h])}return l}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:c}=e.measureText(t);return this.clearContext(e),e.restore(),c}getInheritedAttribute(e){for(var t=this;t instanceof Te&&t.isFirstChild();){var r=t.parent.getAttribute(e);if(r.hasValue(!0))return r.getValue("0");t=t.parent}return null}}class Mt extends Te{constructor(e,t,r){super(e,t,new.target===Mt?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class W1 extends Mt{constructor(){super(...arguments),this.type="textNode"}}class ft extends Re{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:r}=this,{screen:i,window:n}=r,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&n&&typeof n.getComputedStyle<"u"){e.font=n.getComputedStyle(o).getPropertyValue("font");var s=new T(r,"fontSize",K.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:u,height:l}=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 h=this.getAttribute("refX"),f=this.getAttribute("refY"),c=this.getAttribute("viewBox"),v=c.hasValue()?ae(c.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,p=0,y=0,x=0;v&&(g=v[0],p=v[1]),this.root||(u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=g,x=p,g=0,p=0)),i.viewPort.setCurrent(u,l),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")),v&&(u=v[2],l=v[3]),r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:u,height:i.viewPort.height,desiredHeight:l,minX:g,minY:p,refX:h.getValue(),refY:f.getValue(),clip:d,clipX:y,clipY:x}),v&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(u,l))}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),n=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),u=i.getNumber(0),l=n.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),n.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(u||e," ").concat(l||t)),s.hasValue()){var f=this.getStyle("width"),c=this.getStyle("height");f.hasValue()&&f.setValue("".concat(e,"px")),c.hasValue()&&c.setValue("".concat(t,"px"))}}}class pn extends A{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"),n=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),u=o.getPixels("x"),l=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(l=u),s.hasValue()&&!o.hasValue()&&(u=l),u=Math.min(u,i/2),l=Math.min(l,n/2),e){var h=4*((Math.sqrt(2)-1)/3);e.beginPath(),n>0&&i>0&&(e.moveTo(t+u,r),e.lineTo(t+i-u,r),e.bezierCurveTo(t+i-u+h*u,r,t+i,r+l-h*l,t+i,r+l),e.lineTo(t+i,r+n-l),e.bezierCurveTo(t+i,r+n-l+h*l,t+i-u+h*u,r+n,t+i-u,r+n),e.lineTo(t+u,r+n),e.bezierCurveTo(t+u-h*u,r+n,t,r+n-l+h*l,t,r+n-l),e.lineTo(t,r+l),e.bezierCurveTo(t,r+l-h*l,t+u-h*u,r,t+u,r),e.closePath())}return new ne(t,r,t+i,r+n)}getMarkers(){return null}}class Nl extends A{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 ne(t-i,r-i,t+i,r+i)}getMarkers(){return null}}class Il extends A{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"),n=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&r>0&&i>0&&(e.beginPath(),e.moveTo(n+r,o),e.bezierCurveTo(n+r,o+t*i,n+t*r,o+i,n,o+i),e.bezierCurveTo(n-t*r,o+i,n-r,o+t*i,n-r,o),e.bezierCurveTo(n-r,o-t*i,n-t*r,o-i,n,o-i),e.bezierCurveTo(n+t*r,o-i,n+r,o-t*i,n+r,o),e.closePath()),new ne(n-r,o-i,n+r,o+i)}getMarkers(){return null}}class Ml extends A{constructor(){super(...arguments),this.type="line"}getPoints(){return[new V(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new V(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:r},{x:i,y:n}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,r),e.lineTo(i,n)),new ne(t,r,i,n)}getMarkers(){var[e,t]=this.getPoints(),r=e.angleTo(t);return[[e,r],[t,r]]}}class yn extends A{constructor(e,t,r){super(e,t,r),this.type="polyline",this.points=[],this.points=V.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:r,y:i}]=t,n=new ne(r,i);return e&&(e.beginPath(),e.moveTo(r,i)),t.forEach(o=>{var{x:s,y:u}=o;n.addPoint(s,u),e&&e.lineTo(s,u)}),n}getMarkers(){var{points:e}=this,t=e.length-1,r=[];return e.forEach((i,n)=>{n!==t&&r.push([i,i.angleTo(e[n+1])])}),r.length>0&&r.push([e[e.length-1],r[r.length-1][1]]),r}}class _l extends yn{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 Vl extends P{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,r){var i=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),o=new ft(this.document,null);o.attributes.viewBox=new T(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new T(this.document,"width","".concat(i,"px")),o.attributes.height=new T(this.document,"height","".concat(n,"px")),o.attributes.transform=new T(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,n),u=s.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&u.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var f=-1;f<=1;f++)for(var c=-1;c<=1;c++)u.save(),o.attributes.x=new T(this.document,"x",f*s.width),o.attributes.y=new T(this.document,"y",c*s.height),o.render(u),u.restore();var v=e.createPattern(s,"repeat");return v}}class Dl extends P{constructor(){super(...arguments),this.type="marker"}render(e,t,r){if(t){var{x:i,y:n}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,n),o==="auto"&&e.rotate(r),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var u=new ft(this.document,null);u.type=this.type,u.attributes.viewBox=new T(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new T(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new T(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new T(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new T(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new T(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new T(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new T(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-r),e.translate(-i,-n)}}}class kl extends P{constructor(){super(...arguments),this.type="defs"}render(){}}class Lr extends Re{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new ne;return this.children.forEach(r=>{t.addBoundingBox(r.getBoundingBox(e))}),t}}class mn extends P{constructor(e,t,r){super(e,t,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:n}=this;n.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:n}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(r,n[n.length-1].color);if(n.forEach(p=>{o.addColorStop(p.offset,this.addParentOpacity(r,p.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:u,viewPort:l}=s.screen,[h]=l.viewPorts,f=new pn(s,null);f.attributes.x=new T(s,"x",-u/3),f.attributes.y=new T(s,"y",-u/3),f.attributes.width=new T(s,"width",u),f.attributes.height=new T(s,"height",u);var c=new Lr(s,null);c.attributes.transform=new T(s,"transform",this.getAttribute("gradientTransform").getValue()),c.children=[f];var v=new ft(s,null);v.attributes.x=new T(s,"x",0),v.attributes.y=new T(s,"y",0),v.attributes.width=new T(s,"width",h.width),v.attributes.height=new T(s,"height",h.height),v.children=[c];var d=s.createCanvas(h.width,h.height),g=d.getContext("2d");return g.fillStyle=o,v.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 T(this.document,"color",t);return r.addOpacity(e).getColor()}return t}}class Ll extends mn{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 n=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"),u=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===s&&o===u?null:e.createLinearGradient(n,o,s,u)}}class Bl extends mn{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 n=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=n,u=o;this.getAttribute("fx").hasValue()&&(s=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,u,h,n,o,l)}}class Fl extends P{constructor(e,t,r){super(e,t,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),n.hasValue()&&(o=o.addOpacity(n)),this.offset=i,this.color=o.getColor()}}class Br extends P{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 T(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(),n=r.getNumber()+(i.getNumber()-r.getNumber())*t;return e==="%"&&(n*=100),"".concat(n).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 n=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var u=s.getString();o="".concat(u,"(").concat(o,")")}r.setValue(o),n=!0}return n}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),n=Math.floor(i),o=Math.ceil(i);r.from=new T(e,"from",parseFloat(t.getValue()[n])),r.to=new T(e,"to",parseFloat(t.getValue()[o])),r.progress=(i-n)/(o-n)}else r.from=this.from,r.to=this.to;return r}}class jl extends Br{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=new pi(t.getColor()),n=new pi(r.getColor());if(i.ok&&n.ok){var o=i.r+(n.r-i.r)*e,s=i.g+(n.g-i.g)*e,u=i.b+(n.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(u),")")}return this.getAttribute("from").getColor()}}class Ul extends Br{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=ae(t.getString()),n=ae(r.getString()),o=i.map((s,u)=>{var l=n[u];return s+(l-s)*e}).join(" ");return o}}class Gl extends P{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:n}=this;for(var o of n)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 u=o;u.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[u.unicode]>"u"&&(this.glyphs[u.unicode]={}),this.glyphs[u.unicode][u.arabicForm]=u):this.glyphs[u.unicode]=u;break}}}render(){}}class zl extends P{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 Hl extends A{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Yl extends Te{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 Xl extends Te{constructor(e,t,r){super(e,t,r),this.type="a";var{childNodes:i}=t,n=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:r,y:i}=this,{mouse:n}=t.screen,o=new T(t,"fontSize",K.parse(t.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new ne(r,i-o.getPixels("y"),r+this.measureText(e),i))}else if(this.children.length>0){var s=new Lr(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 Mo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function nr(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Mo(Object(t),!0).forEach(function(r){hn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Mo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class Wl extends Te{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:n}=r;switch(i){case $.LINE_TO:e&&e.lineTo(n[0],n[1]);break;case $.MOVE_TO:e&&e.moveTo(n[0],n[1]);break;case $.CURVE_TO:e&&e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case $.QUAD_TO:e&&e.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case $.ARC:{var[o,s,u,l,h,f,c,v]=n,d=u>l?u:l,g=u>l?1:u/l,p=u>l?l/u:1;e&&(e.translate(o,s),e.rotate(c),e.scale(g,p),e.arc(0,0,d,h,h+f,!!(1-v)),e.scale(1/g,1/p),e.rotate(-c),e.translate(-o,-s));break}case $.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,n=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:u,p1:l,rotation:h,text:f}=o;e.save(),e.translate(u.x,u.y),e.rotate(h),e.fillStyle&&e.fillText(f,0,0),e.strokeStyle&&e.strokeText(f,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(u.x,u.y+r/8),e.lineTo(l.x,l.y+r/5))}),t==="underline"&&(e.lineWidth=r/20,e.strokeStyle=n,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,n,o,s,u,l){var h=o,f=this.measureText(e,u);u===" "&&t==="justify"&&r<i&&(f+=(i-r)/n),l>-1&&(h+=this.getLetterSpacingAt(l));var c=this.textHeight/20,v=this.getEquidistantPointOnPath(h,c,0),d=this.getEquidistantPointOnPath(h+f,c,0),g={p0:v,p1:d},p=v&&d?Math.atan2(d.y-v.y,d.x-v.x):0;if(s){var y=Math.cos(Math.PI/2+p)*s,x=Math.cos(-p)*s;g.p0=nr(nr({},v),{},{x:v.x+y,y:v.y+x}),g.p1=nr(nr({},d),{},{x:d.x+y,y:d.y+x})}return h+=f,{offset:h,segment:g,rotation:p}}measureText(e,t){var{measuresCache:r}=this,i=t||this.getText();if(r.has(i))return r.get(i);var n=this.measureTargetText(e,i);return r.set(i,n),n}setTextData(e){if(!this.glyphInfo){var t=this.getText(),r=t.split(""),i=t.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(E=>E.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!u.hasValue()||u.getValue()==="inherit"?h=l.getPixels():u.hasValue()&&u.getValue()!=="initial"&&u.getValue()!=="unset"&&(h=u.getPixels());var f=[],c=t.length;this.letterSpacingCache=f;for(var v=0;v<c;v++)f.push(typeof n[v]<"u"?n[v]:h);var d=f.reduce((E,w,O)=>O===0?0:E+w||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(),x=this.getStyle("startOffset").getNumber(0)*y,b=0;(s==="middle"||s==="center")&&(b=-p/2),(s==="end"||s==="right")&&(b=-p),b+=x,r.forEach((E,w)=>{var{offset:O,segment:S,rotation:C}=this.findSegmentToFitChar(e,s,p,y,i,b,o,E,w);b=O,!(!S.p0||!S.p1)&&this.glyphInfo.push({text:r[w],p0:S.p0,p1:S.p1,rotation:C})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:r}=e;for(r.reset();!r.isEnd();){var{current:i}=r,n=i?i.x:0,o=i?i.y:0,s=r.next(),u=s.type,l=[];switch(s.type){case $.MOVE_TO:this.pathM(r,l);break;case $.LINE_TO:u=this.pathL(r,l);break;case $.HORIZ_LINE_TO:u=this.pathH(r,l);break;case $.VERT_LINE_TO:u=this.pathV(r,l);break;case $.CURVE_TO:this.pathC(r,l);break;case $.SMOOTH_CURVE_TO:u=this.pathS(r,l);break;case $.QUAD_TO:this.pathQ(r,l);break;case $.SMOOTH_QUAD_TO:u=this.pathT(r,l);break;case $.ARC:l=this.pathA(r);break;case $.CLOSE_PATH:A.pathZ(r);break}s.type!==$.CLOSE_PATH?t.push({type:u,points:l,start:{x:n,y:o},pathLength:this.calcLength(n,o,u,l)}):t.push({type:$.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:r,y:i}=A.pathM(e).point;t.push(r,i)}pathL(e,t){var{x:r,y:i}=A.pathL(e).point;return t.push(r,i),$.LINE_TO}pathH(e,t){var{x:r,y:i}=A.pathH(e).point;return t.push(r,i),$.LINE_TO}pathV(e,t){var{x:r,y:i}=A.pathV(e).point;return t.push(r,i),$.LINE_TO}pathC(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathC(e);t.push(r.x,r.y,i.x,i.y,n.x,n.y)}pathS(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathS(e);return t.push(r.x,r.y,i.x,i.y,n.x,n.y),$.CURVE_TO}pathQ(e,t){var{controlPoint:r,currentPoint:i}=A.pathQ(e);t.push(r.x,r.y,i.x,i.y)}pathT(e,t){var{controlPoint:r,currentPoint:i}=A.pathT(e);return t.push(r.x,r.y,i.x,i.y),$.QUAD_TO}pathA(e){var{rX:t,rY:r,sweepFlag:i,xAxisRotation:n,centp:o,a1:s,ad:u}=A.pathA(e);return i===0&&u>0&&(u-=2*Math.PI),i===1&&u<0&&(u+=2*Math.PI),[o.x,o.y,t,r,s,u,n,i]}calcLength(e,t,r,i){var n=0,o=null,s=null,u=0;switch(r){case $.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case $.CURVE_TO:for(n=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)s=this.getPointOnCubicBezier(u,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.QUAD_TO:for(n=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)s=this.getPointOnQuadraticBezier(u,e,t,i[0],i[1],i[2],i[3]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.ARC:{n=0;var l=i[4],h=i[5],f=i[4]+h,c=Math.PI/180;if(Math.abs(l-f)<c&&(c=Math.abs(l-f)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),h<0)for(u=l-c;u>f;u-=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(u=l+c;u<f;u+=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),n}}return 0}getPointOnLine(e,t,r,i,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,u=(n-r)/(i-t+je),l=Math.sqrt(e*e/(1+u*u));i<t&&(l*=-1);var h=u*l,f=null;if(i===t)f={x:o,y:s+h};else if((s-r)/(o-t+je)===u)f={x:o+l,y:s+h};else{var c=0,v=0,d=this.getLineLength(t,r,i,n);if(d<je)return null;var g=(o-t)*(i-t)+(s-r)*(n-r);g/=d*d,c=t+g*(i-t),v=r+g*(n-r);var p=this.getLineLength(o,s,c,v),y=Math.sqrt(e*e-p*p);l=Math.sqrt(y*y/(1+u*u)),i<t&&(l*=-1),h=u*l,f={x:c+l,y:v+h}}return f}getPointOnPath(e){var t=this.getPathLength(),r=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:n}=this;for(var o of n){if(o&&(o.pathLength<5e-5||r+o.pathLength+5e-5<e)){r+=o.pathLength;continue}var s=e-r,u=0;switch(o.type){case $.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 $.ARC:{var l=o.points[4],h=o.points[5],f=o.points[4]+h;if(u=l+s/o.pathLength*h,h<0&&u<f||h>=0&&u>f)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],u,o.points[6]);break}case $.CURVE_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnCubicBezier(u,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 $.QUAD_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnQuadraticBezier(u,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,n,o,s,u,l){var h=u*Ei(e)+o*Si(e)+i*Ti(e)+t*Oi(e),f=l*Ei(e)+s*Si(e)+n*Ti(e)+r*Oi(e);return{x:h,y:f}}getPointOnQuadraticBezier(e,t,r,i,n,o,s){var u=o*$i(e)+i*wi(e)+t*Ci(e),l=s*$i(e)+n*wi(e)+r*Ci(e);return{x:u,y:l}}getPointOnEllipticalArc(e,t,r,i,n,o){var s=Math.cos(o),u=Math.sin(o),l={x:r*Math.cos(n),y:i*Math.sin(n)};return{x:e+(l.x*s-l.y*u),y:t+(l.x*u+l.y*s)}}buildEquidistantCache(e,t){var r=this.getPathLength(),i=t||.25,n=e||r/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==i){this.equidistantCache={step:n,precision:i,points:[]};for(var o=0,s=0;s<=r;s+=i){var u=this.getPointOnPath(s),l=this.getPointOnPath(s+i);!u||!l||(o+=this.getLineLength(u.x,u.y,l.x,l.y),o>=n&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:s}),o-=n))}}}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 q1=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class ql extends Re{constructor(e,t,r){super(e,t,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var n=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),n?this.loadSvg(i):this.loadImage(i),this.isSvg=n}}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=q1.exec(e);if(r){var i=r[5];r[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var n=yield t.document.fetch(e),o=yield n.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,n=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!(!i||!r||!s||!u)){if(e.save(),e.translate(n,o),this.isSvg){var l=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:u});l.document.documentElement.parent=this,l.render()}else{var h=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:h.width,height:u,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&e.drawImage(h,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 ne(e,t,e+r,t+i)}}class Ql extends Re{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Kl{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,n=yield i.canvg.parser.load(t),o=n.getElementsByTagName("font");Array.from(o).forEach(s=>{var u=i.createElement(s);i.definitions[e]=u})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}r.loaded=!0})()}}class bn extends P{constructor(e,t,r){super(e,t,r),this.type="style";var i=Xe(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),n=i.split("}");n.forEach(o=>{var s=o.trim();if(s){var u=s.split("{"),l=u[0].split(","),h=u[1].split(";");l.forEach(f=>{var c=f.trim();if(c){var v=e.styles[c]||{};if(h.forEach(p=>{var y=p.indexOf(":"),x=p.substr(0,y).trim(),b=p.substr(y+1,p.length-y).trim();x&&b&&(v[x]=new T(e,x,b))}),e.styles[c]=v,e.stylesSpecificity[c]=xl(c),c==="@font-face"){var d=v["font-family"].getString().replace(/"|'/g,""),g=v.src.getString().split(",");g.forEach(p=>{if(p.indexOf('format("svg")')>0){var y=fn(p);y&&new Kl(e).load(d,y)}})}}})}})}}bn.parseExternalUrl=fn;class Zl extends Re{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 ft(t,null),i.attributes.viewBox=new T(t,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new T(t,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new T(t,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new T(t,"opacity",this.calculateOpacity())),i.type==="svg"){var n=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);n.hasValue()&&(i.attributes.width=new T(t,"width",n.getString())),o.hasValue()&&(i.attributes.height=new T(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 Pe.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function sr(a,e,t,r,i,n){return a[t*r*4+e*4+n]}function or(a,e,t,r,i,n,o){a[t*r*4+e*4+n]=o}function j(a,e,t){var r=a[e];return r*t}function be(a,e,t,r){return e+Math.cos(a)*t+Math.sin(a)*r}class xn extends P{constructor(e,t,r){super(e,t,r),this.type="feColorMatrix";var i=ae(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var n=i[0];i=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[be(o,.213,.787,-.213),be(o,.715,-.715,-.715),be(o,.072,-.072,.928),0,0,be(o,.213,-.213,.143),be(o,.715,.285,.14),be(o,.072,-.072,-.283),0,0,be(o,.213,-.213,-.787),be(o,.715,-.715,.715),be(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,n){for(var{includeOpacity:o,matrix:s}=this,u=e.getImageData(0,0,i,n),l=0;l<n;l++)for(var h=0;h<i;h++){var f=sr(u.data,h,l,i,n,0),c=sr(u.data,h,l,i,n,1),v=sr(u.data,h,l,i,n,2),d=sr(u.data,h,l,i,n,3),g=j(s,0,f)+j(s,1,c)+j(s,2,v)+j(s,3,d)+j(s,4,1),p=j(s,5,f)+j(s,6,c)+j(s,7,v)+j(s,8,d)+j(s,9,1),y=j(s,10,f)+j(s,11,c)+j(s,12,v)+j(s,13,d)+j(s,14,1),x=j(s,15,f)+j(s,16,c)+j(s,17,v)+j(s,18,d)+j(s,19,1);o&&(g=0,p=0,y=0,x*=d/255),or(u.data,h,l,i,n,0,g),or(u.data,h,l,i,n,1,p),or(u.data,h,l,i,n,2,y),or(u.data,h,l,i,n,3,x)}e.clearRect(0,0,i,n),e.putImageData(u,0,0)}}class _t extends P{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var u=new ne;this.children.forEach(d=>{u.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(u.x1),n=Math.floor(u.y1),o=Math.floor(u.width),s=Math.floor(u.height)}var l=this.removeStyles(t,_t.ignoreStyles),h=r.createCanvas(i+o,n+s),f=h.getContext("2d");r.screen.setDefaults(f),this.renderChildren(f),new xn(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,i+o,n+s);var c=r.createCanvas(i+o,n+s),v=c.getContext("2d");r.screen.setDefaults(v),t.render(v),v.globalCompositeOperation="destination-in",v.fillStyle=f.createPattern(h,"no-repeat"),v.fillRect(0,0,i+o,n+s),e.fillStyle=v.createPattern(c,"no-repeat"),e.fillRect(0,0,i+o,n+s),this.restoreStyles(t,l)}render(e){}}_t.ignoreStyles=["mask","transform","clip-path"];var _o=()=>{};class Jl extends P{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,r=Reflect.getPrototypeOf(e),{beginPath:i,closePath:n}=e;r&&(r.beginPath=_o,r.closePath=_o),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Pe.fromElement(t,o)),s&&s.apply(e),o.path(e),r&&(r.closePath=n),s&&s.unapply(e)}}),Reflect.apply(n,e,[]),e.clip(),r&&(r.beginPath=i,r.closePath=n)}render(e){}}class Vt extends P{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:r,children:i}=this,n=t.getBoundingBox(e);if(n){var o=0,s=0;i.forEach(y=>{var x=y.extraFilterDistance||0;o=Math.max(o,x),s=Math.max(s,x)});var u=Math.floor(n.width),l=Math.floor(n.height),h=u+2*o,f=l+2*s;if(!(h<1||f<1)){var c=Math.floor(n.x),v=Math.floor(n.y),d=this.removeStyles(t,Vt.ignoreStyles),g=r.createCanvas(h,f),p=g.getContext("2d");r.screen.setDefaults(p),p.translate(-c+o,-v+s),t.render(p),i.forEach(y=>{typeof y.apply=="function"&&y.apply(p,0,0,h,f)}),e.drawImage(g,0,0,h,f,c-o,v-s,h,f),this.restoreStyles(t,d)}}}render(e){}}Vt.ignoreStyles=["filter","transform","clip-path"];class eh extends P{constructor(e,t,r){super(e,t,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,r,i,n){}}class th extends P{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,r,i,n){}}class rh extends P{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,r,i,n){}}class ah extends P{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,n){var{document:o,blurRadius:s}=this,u=o.window?o.window.document.body:null,l=e.canvas;l.id=o.getUniqueId(),u&&(l.style.display="none",u.appendChild(l)),C1(l,t,r,i,n,s),u&&u.removeChild(l)}}class ih extends P{constructor(){super(...arguments),this.type="title"}}class nh extends P{constructor(){super(...arguments),this.type="desc"}}var Q1={svg:ft,rect:pn,circle:Nl,ellipse:Il,line:Ml,polyline:yn,polygon:_l,path:A,pattern:Vl,marker:Dl,defs:kl,linearGradient:Ll,radialGradient:Bl,stop:Fl,animate:Br,animateColor:jl,animateTransform:Ul,font:Gl,"font-face":zl,"missing-glyph":Hl,glyph:dn,text:Te,tspan:Mt,tref:Yl,a:Xl,textPath:Wl,image:ql,g:Lr,symbol:Ql,style:bn,use:Zl,mask:_t,clipPath:Jl,filter:Vt,feDropShadow:eh,feMorphology:th,feComposite:rh,feColorMatrix:xn,feGaussianBlur:ah,title:ih,desc:nh};function Vo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function K1(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vo(Object(t),!0).forEach(function(r){hn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Vo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Z1(a,e){var t=document.createElement("canvas");return t.width=a,t.height=e,t}function J1(a){return Ai.apply(this,arguments)}function Ai(){return Ai=Se(function*(a){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=(n,o,s,u,l)=>{i(l)},t.src=a})}),Ai.apply(this,arguments)}class Ee{constructor(e){var{rootEmSize:t=12,emSize:r=12,createCanvas:i=Ee.createCanvas,createImage:n=Ee.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(n,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=Ee.elementTypes[t];return typeof r<"u"?new r(this,e):new Rl(this,e)}createTextNode(e){return new W1(this,e)}setViewBox(e){this.screen.setViewBox(K1({document:this},e))}}Ee.createCanvas=Z1;Ee.createImage=J1;Ee.elementTypes=Q1;function Do(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function Le(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Do(Object(t),!0).forEach(function(r){hn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Do(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class Fe{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new gr(r),this.screen=new It(e,r),this.options=r;var i=new Ee(this,r),n=i.createDocumentElement(t);this.document=i,this.documentElement=n}static from(e,t){var r=arguments;return Se(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},n=new gr(i),o=yield n.parse(t);return new Fe(e,o,i)})()}static fromString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new gr(r),n=i.parseFromString(t);return new Fe(e,n,r)}fork(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fe.from(e,t,Le(Le({},this.options),r))}forkString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fe.fromString(e,t,Le(Le({},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(Le({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,Le(Le({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)}}exports.AElement=Xl;exports.AnimateColorElement=jl;exports.AnimateElement=Br;exports.AnimateTransformElement=Ul;exports.BoundingBox=ne;exports.CB1=Ei;exports.CB2=Si;exports.CB3=Ti;exports.CB4=Oi;exports.Canvg=Fe;exports.CircleElement=Nl;exports.ClipPathElement=Jl;exports.DefsElement=kl;exports.DescElement=nh;exports.Document=Ee;exports.Element=P;exports.EllipseElement=Il;exports.FeColorMatrixElement=xn;exports.FeCompositeElement=rh;exports.FeDropShadowElement=eh;exports.FeGaussianBlurElement=ah;exports.FeMorphologyElement=th;exports.FilterElement=Vt;exports.Font=K;exports.FontElement=Gl;exports.FontFaceElement=zl;exports.GElement=Lr;exports.GlyphElement=dn;exports.GradientElement=mn;exports.ImageElement=ql;exports.LineElement=Ml;exports.LinearGradientElement=Ll;exports.MarkerElement=Dl;exports.MaskElement=_t;exports.Matrix=cn;exports.MissingGlyphElement=Hl;exports.Mouse=Sl;exports.PSEUDO_ZERO=je;exports.Parser=gr;exports.PathElement=A;exports.PathParser=$;exports.PatternElement=Vl;exports.Point=V;exports.PolygonElement=_l;exports.PolylineElement=yn;exports.Property=T;exports.QB1=$i;exports.QB2=wi;exports.QB3=Ci;exports.RadialGradientElement=Bl;exports.RectElement=pn;exports.RenderedElement=Re;exports.Rotate=wl;exports.SVGElement=ft;exports.SVGFontLoader=Kl;exports.Scale=Cl;exports.Screen=It;exports.Skew=gn;exports.SkewX=Al;exports.SkewY=Pl;exports.StopElement=Fl;exports.StyleElement=bn;exports.SymbolElement=Ql;exports.TRefElement=Yl;exports.TSpanElement=Mt;exports.TextElement=Te;exports.TextPathElement=Wl;exports.TitleElement=ih;exports.Transform=Pe;exports.Translate=$l;exports.UnknownElement=Rl;exports.UseElement=Zl;exports.ViewPort=El;exports.compressSpaces=Xe;exports.default=Fe;exports.getSelectorSpecificity=xl;exports.normalizeAttributeName=ml;exports.normalizeColor=bl;exports.parseExternalUrl=fn;exports.presets=N1;exports.toNumbers=ae;exports.trimLeft=pl;exports.trimRight=yl;exports.vectorMagnitude=bi;exports.vectorsAngle=xi;exports.vectorsRatio=Er;
|
|
17
|
+
***************************************************************************** */var pl=function(a,e){return(pl=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])})(a,e)};function yl(a,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=a}pl(a,e),a.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function l1(a){var e="";Array.isArray(a)||(a=[a]);for(var t=0;t<a.length;t++){var r=a[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 xi(a,e){var t=a[0],r=a[1];return[t*Math.cos(e)-r*Math.sin(e),t*Math.sin(e)+r*Math.cos(e)]}function ue(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];for(var t=0;t<a.length;t++)if(typeof a[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof a[t]+" == typeof "+a[t]);return!0}var Ce=Math.PI;function Ya(a,e,t){a.lArcFlag=a.lArcFlag===0?0:1,a.sweepFlag=a.sweepFlag===0?0:1;var r=a.rX,i=a.rY,n=a.x,o=a.y;r=Math.abs(a.rX),i=Math.abs(a.rY);var s=xi([(e-n)/2,(t-o)/2],-a.xRot/180*Ce),u=s[0],l=s[1],h=Math.pow(u,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),a.rX=r,a.rY=i;var f=Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(u,2),c=(a.lArcFlag!==a.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-f)/f)),v=r*l/i*c,d=-i*u/r*c,g=xi([v,d],a.xRot/180*Ce);a.cX=g[0]+(e+n)/2,a.cY=g[1]+(t+o)/2,a.phi1=Math.atan2((l-d)/i,(u-v)/r),a.phi2=Math.atan2((-l-d)/i,(-u-v)/r),a.sweepFlag===0&&a.phi2>a.phi1&&(a.phi2-=2*Ce),a.sweepFlag===1&&a.phi2<a.phi1&&(a.phi2+=2*Ce),a.phi1*=180/Ce,a.phi2*=180/Ce}function Po(a,e,t){ue(a,e,t);var r=a*a+e*e-t*t;if(0>r)return[];if(r===0)return[[a*t/(a*a+e*e),e*t/(a*a+e*e)]];var i=Math.sqrt(r);return[[(a*t+e*i)/(a*a+e*e),(e*t-a*i)/(a*a+e*e)],[(a*t-e*i)/(a*a+e*e),(e*t+a*i)/(a*a+e*e)]]}var U,me=Math.PI/180;function Ro(a,e,t){return(1-t)*a+t*e}function No(a,e,t,r){return a+Math.cos(r/180*Ce)*e+Math.sin(r/180*Ce)*t}function Io(a,e,t,r){var i=1e-6,n=e-a,o=t-e,s=3*n+3*(r-t)-6*o,u=6*(o-n),l=3*n;return Math.abs(s)<i?[-l/u]:function(h,f,c){var v=h*h/4-f;if(v<-c)return[];if(v<=c)return[-h/2];var d=Math.sqrt(v);return[-h/2-d,-h/2+d]}(u/s,l/s,i)}function Mo(a,e,t,r,i){var n=1-i;return a*(n*n*n)+e*(3*n*n*i)+t*(3*n*i*i)+r*(i*i*i)}(function(a){function e(){return i(function(s,u,l){return s.relative&&(s.x1!==void 0&&(s.x1+=u),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=u),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=u),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function t(){var s=NaN,u=NaN,l=NaN,h=NaN;return i(function(f,c,v){return f.type&m.SMOOTH_CURVE_TO&&(f.type=m.CURVE_TO,s=isNaN(s)?c:s,u=isNaN(u)?v:u,f.x1=f.relative?c-s:2*c-s,f.y1=f.relative?v-u:2*v-u),f.type&m.CURVE_TO?(s=f.relative?c+f.x2:f.x2,u=f.relative?v+f.y2:f.y2):(s=NaN,u=NaN),f.type&m.SMOOTH_QUAD_TO&&(f.type=m.QUAD_TO,l=isNaN(l)?c:l,h=isNaN(h)?v:h,f.x1=f.relative?c-l:2*c-l,f.y1=f.relative?v-h:2*v-h),f.type&m.QUAD_TO?(l=f.relative?c+f.x1:f.x1,h=f.relative?v+f.y1:f.y1):(l=NaN,h=NaN),f})}function r(){var s=NaN,u=NaN;return i(function(l,h,f){if(l.type&m.SMOOTH_QUAD_TO&&(l.type=m.QUAD_TO,s=isNaN(s)?h:s,u=isNaN(u)?f:u,l.x1=l.relative?h-s:2*h-s,l.y1=l.relative?f-u:2*f-u),l.type&m.QUAD_TO){s=l.relative?h+l.x1:l.x1,u=l.relative?f+l.y1:l.y1;var c=l.x1,v=l.y1;l.type=m.CURVE_TO,l.x1=((l.relative?0:h)+2*c)/3,l.y1=((l.relative?0:f)+2*v)/3,l.x2=(l.x+2*c)/3,l.y2=(l.y+2*v)/3}else s=NaN,u=NaN;return l})}function i(s){var u=0,l=0,h=NaN,f=NaN;return function(c){if(isNaN(h)&&!(c.type&m.MOVE_TO))throw new Error("path must start with moveto");var v=s(c,u,l,h,f);return c.type&m.CLOSE_PATH&&(u=h,l=f),c.x!==void 0&&(u=c.relative?u+c.x:c.x),c.y!==void 0&&(l=c.relative?l+c.y:c.y),c.type&m.MOVE_TO&&(h=u,f=l),v}}function n(s,u,l,h,f,c){return ue(s,u,l,h,f,c),i(function(v,d,g,p){var y=v.x1,x=v.x2,b=v.relative&&!isNaN(p),T=v.x!==void 0?v.x:b?0:d,w=v.y!==void 0?v.y:b?0:g;function O(se){return se*se}v.type&m.HORIZ_LINE_TO&&u!==0&&(v.type=m.LINE_TO,v.y=v.relative?0:g),v.type&m.VERT_LINE_TO&&l!==0&&(v.type=m.LINE_TO,v.x=v.relative?0:d),v.x!==void 0&&(v.x=v.x*s+w*l+(b?0:f)),v.y!==void 0&&(v.y=T*u+v.y*h+(b?0:c)),v.x1!==void 0&&(v.x1=v.x1*s+v.y1*l+(b?0:f)),v.y1!==void 0&&(v.y1=y*u+v.y1*h+(b?0:c)),v.x2!==void 0&&(v.x2=v.x2*s+v.y2*l+(b?0:f)),v.y2!==void 0&&(v.y2=x*u+v.y2*h+(b?0:c));var E=s*h-u*l;if(v.xRot!==void 0&&(s!==1||u!==0||l!==0||h!==1))if(E===0)delete v.rX,delete v.rY,delete v.xRot,delete v.lArcFlag,delete v.sweepFlag,v.type=m.LINE_TO;else{var C=v.xRot*Math.PI/180,I=Math.sin(C),_=Math.cos(C),F=1/O(v.rX),R=1/O(v.rY),X=O(_)*F+O(I)*R,W=2*I*_*(F-R),G=O(I)*F+O(_)*R,q=X*h*h-W*u*h+G*u*u,H=W*(s*h+u*l)-2*(X*l*h+G*s*u),Q=X*l*l-W*s*l+G*s*s,N=(Math.atan2(H,q-Q)+Math.PI)%Math.PI/2,M=Math.sin(N),Z=Math.cos(N);v.rX=Math.abs(E)/Math.sqrt(q*O(Z)+H*M*Z+Q*O(M)),v.rY=Math.abs(E)/Math.sqrt(q*O(M)-H*M*Z+Q*O(Z)),v.xRot=180*N/Math.PI}return v.sweepFlag!==void 0&&0>E&&(v.sweepFlag=+!v.sweepFlag),v})}function o(){return function(s){var u={};for(var l in s)u[l]=s[l];return u}}a.ROUND=function(s){function u(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),ue(s),function(l){return l.x1!==void 0&&(l.x1=u(l.x1)),l.y1!==void 0&&(l.y1=u(l.y1)),l.x2!==void 0&&(l.x2=u(l.x2)),l.y2!==void 0&&(l.y2=u(l.y2)),l.x!==void 0&&(l.x=u(l.x)),l.y!==void 0&&(l.y=u(l.y)),l.rX!==void 0&&(l.rX=u(l.rX)),l.rY!==void 0&&(l.rY=u(l.rY)),l}},a.TO_ABS=e,a.TO_REL=function(){return i(function(s,u,l){return s.relative||(s.x1!==void 0&&(s.x1-=u),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=u),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=u),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},a.NORMALIZE_HVZ=function(s,u,l){return s===void 0&&(s=!0),u===void 0&&(u=!0),l===void 0&&(l=!0),i(function(h,f,c,v,d){if(isNaN(v)&&!(h.type&m.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&m.HORIZ_LINE_TO&&(h.type=m.LINE_TO,h.y=h.relative?0:c),l&&h.type&m.VERT_LINE_TO&&(h.type=m.LINE_TO,h.x=h.relative?0:f),s&&h.type&m.CLOSE_PATH&&(h.type=m.LINE_TO,h.x=h.relative?v-f:v,h.y=h.relative?d-c:d),h.type&m.ARC&&(h.rX===0||h.rY===0)&&(h.type=m.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},a.NORMALIZE_ST=t,a.QT_TO_C=r,a.INFO=i,a.SANITIZE=function(s){s===void 0&&(s=0),ue(s);var u=NaN,l=NaN,h=NaN,f=NaN;return i(function(c,v,d,g,p){var y=Math.abs,x=!1,b=0,T=0;if(c.type&m.SMOOTH_CURVE_TO&&(b=isNaN(u)?0:v-u,T=isNaN(l)?0:d-l),c.type&(m.CURVE_TO|m.SMOOTH_CURVE_TO)?(u=c.relative?v+c.x2:c.x2,l=c.relative?d+c.y2:c.y2):(u=NaN,l=NaN),c.type&m.SMOOTH_QUAD_TO?(h=isNaN(h)?v:2*v-h,f=isNaN(f)?d:2*d-f):c.type&m.QUAD_TO?(h=c.relative?v+c.x1:c.x1,f=c.relative?d+c.y1:c.y2):(h=NaN,f=NaN),c.type&m.LINE_COMMANDS||c.type&m.ARC&&(c.rX===0||c.rY===0||!c.lArcFlag)||c.type&m.CURVE_TO||c.type&m.SMOOTH_CURVE_TO||c.type&m.QUAD_TO||c.type&m.SMOOTH_QUAD_TO){var w=c.x===void 0?0:c.relative?c.x:c.x-v,O=c.y===void 0?0:c.relative?c.y:c.y-d;b=isNaN(h)?c.x1===void 0?b:c.relative?c.x:c.x1-v:h-v,T=isNaN(f)?c.y1===void 0?T:c.relative?c.y:c.y1-d:f-d;var E=c.x2===void 0?0:c.relative?c.x:c.x2-v,C=c.y2===void 0?0:c.relative?c.y:c.y2-d;y(w)<=s&&y(O)<=s&&y(b)<=s&&y(T)<=s&&y(E)<=s&&y(C)<=s&&(x=!0)}return c.type&m.CLOSE_PATH&&y(v-g)<=s&&y(d-p)<=s&&(x=!0),x?[]:c})},a.MATRIX=n,a.ROTATE=function(s,u,l){u===void 0&&(u=0),l===void 0&&(l=0),ue(s,u,l);var h=Math.sin(s),f=Math.cos(s);return n(f,h,-h,f,u-u*f+l*h,l-u*h-l*f)},a.TRANSLATE=function(s,u){return u===void 0&&(u=0),ue(s,u),n(1,0,0,1,s,u)},a.SCALE=function(s,u){return u===void 0&&(u=s),ue(s,u),n(s,0,0,u,0,0)},a.SKEW_X=function(s){return ue(s),n(1,0,Math.atan(s),1,0,0)},a.SKEW_Y=function(s){return ue(s),n(1,Math.atan(s),0,1,0,0)},a.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(-1,0,0,1,s,0)},a.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ue(s),n(1,0,0,-1,0,s)},a.A_TO_C=function(){return i(function(s,u,l){return m.ARC===s.type?function(h,f,c){var v,d,g,p;h.cX||Ya(h,f,c);for(var y=Math.min(h.phi1,h.phi2),x=Math.max(h.phi1,h.phi2)-y,b=Math.ceil(x/90),T=new Array(b),w=f,O=c,E=0;E<b;E++){var C=Ro(h.phi1,h.phi2,E/b),I=Ro(h.phi1,h.phi2,(E+1)/b),_=I-C,F=4/3*Math.tan(_*me/4),R=[Math.cos(C*me)-F*Math.sin(C*me),Math.sin(C*me)+F*Math.cos(C*me)],X=R[0],W=R[1],G=[Math.cos(I*me),Math.sin(I*me)],q=G[0],H=G[1],Q=[q+F*Math.sin(I*me),H-F*Math.cos(I*me)],N=Q[0],M=Q[1];T[E]={relative:h.relative,type:m.CURVE_TO};var Z=function(se,de){var we=xi([se*h.rX,de*h.rY],h.xRot),We=we[0],kt=we[1];return[h.cX+We,h.cY+kt]};v=Z(X,W),T[E].x1=v[0],T[E].y1=v[1],d=Z(N,M),T[E].x2=d[0],T[E].y2=d[1],g=Z(q,H),T[E].x=g[0],T[E].y=g[1],h.relative&&(T[E].x1-=w,T[E].y1-=O,T[E].x2-=w,T[E].y2-=O,T[E].x-=w,T[E].y-=O),w=(p=[T[E].x,T[E].y])[0],O=p[1]}return T}(s,s.relative?0:u,s.relative?0:l):s})},a.ANNOTATE_ARCS=function(){return i(function(s,u,l){return s.relative&&(u=0,l=0),m.ARC===s.type&&Ya(s,u,l),s})},a.CLONE=o,a.CALCULATE_BOUNDS=function(){var s=function(c){var v={};for(var d in c)v[d]=c[d];return v},u=e(),l=r(),h=t(),f=i(function(c,v,d){var g=h(l(u(s(c))));function p(M){M>f.maxX&&(f.maxX=M),M<f.minX&&(f.minX=M)}function y(M){M>f.maxY&&(f.maxY=M),M<f.minY&&(f.minY=M)}if(g.type&m.DRAWING_COMMANDS&&(p(v),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 x=0,b=Io(v,g.x1,g.x2,g.x);x<b.length;x++)0<(N=b[x])&&1>N&&p(Mo(v,g.x1,g.x2,g.x,N));for(var T=0,w=Io(d,g.y1,g.y2,g.y);T<w.length;T++)0<(N=w[T])&&1>N&&y(Mo(d,g.y1,g.y2,g.y,N))}if(g.type&m.ARC){p(g.x),y(g.y),Ya(g,v,d);for(var O=g.xRot/180*Math.PI,E=Math.cos(O)*g.rX,C=Math.sin(O)*g.rX,I=-Math.sin(O)*g.rY,_=Math.cos(O)*g.rY,F=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],R=F[0],X=F[1],W=function(M){var Z=M[0],se=M[1],de=180*Math.atan2(se,Z)/Math.PI;return de<R?de+360:de},G=0,q=Po(I,-E,0).map(W);G<q.length;G++)(N=q[G])>R&&N<X&&p(No(g.cX,E,I,N));for(var H=0,Q=Po(_,-C,0).map(W);H<Q.length;H++){var N;(N=Q[H])>R&&N<X&&y(No(g.cY,C,_,N))}}return c});return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}})(U||(U={}));var oe,ml=function(){function a(){}return a.prototype.round=function(e){return this.transform(U.ROUND(e))},a.prototype.toAbs=function(){return this.transform(U.TO_ABS())},a.prototype.toRel=function(){return this.transform(U.TO_REL())},a.prototype.normalizeHVZ=function(e,t,r){return this.transform(U.NORMALIZE_HVZ(e,t,r))},a.prototype.normalizeST=function(){return this.transform(U.NORMALIZE_ST())},a.prototype.qtToC=function(){return this.transform(U.QT_TO_C())},a.prototype.aToC=function(){return this.transform(U.A_TO_C())},a.prototype.sanitize=function(e){return this.transform(U.SANITIZE(e))},a.prototype.translate=function(e,t){return this.transform(U.TRANSLATE(e,t))},a.prototype.scale=function(e,t){return this.transform(U.SCALE(e,t))},a.prototype.rotate=function(e,t,r){return this.transform(U.ROTATE(e,t,r))},a.prototype.matrix=function(e,t,r,i,n,o){return this.transform(U.MATRIX(e,t,r,i,n,o))},a.prototype.skewX=function(e){return this.transform(U.SKEW_X(e))},a.prototype.skewY=function(e){return this.transform(U.SKEW_Y(e))},a.prototype.xSymmetry=function(e){return this.transform(U.X_AXIS_SYMMETRY(e))},a.prototype.ySymmetry=function(e){return this.transform(U.Y_AXIS_SYMMETRY(e))},a.prototype.annotateArcs=function(){return this.transform(U.ANNOTATE_ARCS())},a}(),h1=function(a){return a===" "||a===" "||a==="\r"||a===`
|
|
18
|
+
`},_o=function(a){return 48<=a.charCodeAt(0)&&a.charCodeAt(0)<=57},v1=function(a){function e(){var t=a.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 yl(e,a),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 n=function(f){r.push(f),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],u=!(this.curCommandType!==m.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=_o(s)&&(this.curNumber==="0"&&s==="0"||u);if(!_o(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||u){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===m.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" 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(h),this.curArgs.length===f1[this.curCommandType]&&(m.HORIZ_LINE_TO===this.curCommandType?n({type:m.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):m.VERT_LINE_TO===this.curCommandType?n({type:m.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===m.MOVE_TO||this.curCommandType===m.LINE_TO||this.curCommandType===m.SMOOTH_QUAD_TO?(n({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?n({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?n({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?n({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&&n({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(!h1(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)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 n=0,o=Object.getPrototypeOf(this).parse.call(this,r);n<o.length;n++){var s=o[n],u=t(s);Array.isArray(u)?i.push.apply(i,u):i.push(u)}return i}}})},e}(ml),m=function(a){function e(t){var r=a.call(this)||this;return r.commands=typeof t=="string"?e.parse(t):t,r}return yl(e,a),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=U.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],i=0,n=this.commands;i<n.length;i++){var o=t(n[i]);Array.isArray(o)?r.push.apply(r,o):r.push(o)}return this.commands=r,this},e.encode=function(t){return l1(t)},e.parse=function(t){var r=new v1,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}(ml),f1=((oe={})[m.MOVE_TO]=2,oe[m.LINE_TO]=2,oe[m.HORIZ_LINE_TO]=1,oe[m.VERT_LINE_TO]=1,oe[m.CLOSE_PATH]=0,oe[m.QUAD_TO]=4,oe[m.SMOOTH_QUAD_TO]=2,oe[m.CURVE_TO]=6,oe[m.SMOOTH_CURVE_TO]=4,oe[m.ARC]=7,oe),c1=Y,g1=ge,d1=$r,p1=Wu,Vo=RegExp.prototype,y1=function(a){var e=a.flags;return e===void 0&&!("flags"in Vo)&&!g1(a,"flags")&&d1(Vo,a)?c1(p1,a):e},m1=Pr.PROPER,b1=Ye,x1=J,Do=ye,T1=k,E1=y1,cn="toString",bl=RegExp.prototype,xl=bl[cn],S1=T1(function(){return xl.call({source:"a",flags:"b"})!=="/a/b"}),O1=m1&&xl.name!==cn;(S1||O1)&&b1(bl,cn,function(){var e=x1(this),t=Do(e.source),r=Do(E1(e));return"/"+t+"/"+r},{unsafe:!0});function dr(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dr=function(e){return typeof e}:dr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(a)}function $1(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}var w1=[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],C1=[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 A1(a,e,t,r,i){if(typeof a=="string"&&(a=document.getElementById(a)),!a||dr(a)!=="object"||!("getContext"in a))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=a.getContext("2d");try{return n.getImageData(e,t,r,i)}catch(o){throw new Error("unable to access image data: "+o)}}function P1(a,e,t,r,i,n){if(!(isNaN(n)||n<1)){n|=0;var o=A1(a,e,t,r,i);o=R1(o,e,t,r,i,n),a.getContext("2d").putImageData(o,e,t)}}function R1(a,e,t,r,i,n){for(var o=a.data,s=2*n+1,u=r-1,l=i-1,h=n+1,f=h*(h+1)/2,c=new ko,v=c,d,g=1;g<s;g++)v=v.next=new ko,g===h&&(d=v);v.next=c;for(var p=null,y=null,x=0,b=0,T=w1[n],w=C1[n],O=0;O<i;O++){v=c;for(var E=o[b],C=o[b+1],I=o[b+2],_=o[b+3],F=0;F<h;F++)v.r=E,v.g=C,v.b=I,v.a=_,v=v.next;for(var R=0,X=0,W=0,G=0,q=h*E,H=h*C,Q=h*I,N=h*_,M=f*E,Z=f*C,se=f*I,de=f*_,we=1;we<h;we++){var We=b+((u<we?u:we)<<2),kt=o[We],Sn=o[We+1],On=o[We+2],$n=o[We+3],Lt=h-we;M+=(v.r=kt)*Lt,Z+=(v.g=Sn)*Lt,se+=(v.b=On)*Lt,de+=(v.a=$n)*Lt,R+=kt,X+=Sn,W+=On,G+=$n,v=v.next}p=c,y=d;for(var Ur=0;Ur<r;Ur++){var Gr=de*T>>>w;if(o[b+3]=Gr,Gr!==0){var zr=255/Gr;o[b]=(M*T>>>w)*zr,o[b+1]=(Z*T>>>w)*zr,o[b+2]=(se*T>>>w)*zr}else o[b]=o[b+1]=o[b+2]=0;M-=q,Z-=H,se-=Q,de-=N,q-=p.r,H-=p.g,Q-=p.b,N-=p.a;var Ne=Ur+n+1;Ne=x+(Ne<u?Ne:u)<<2,R+=p.r=o[Ne],X+=p.g=o[Ne+1],W+=p.b=o[Ne+2],G+=p.a=o[Ne+3],M+=R,Z+=X,se+=W,de+=G,p=p.next;var Bt=y,wn=Bt.r,Cn=Bt.g,An=Bt.b,Pn=Bt.a;q+=wn,H+=Cn,Q+=An,N+=Pn,R-=wn,X-=Cn,W-=An,G-=Pn,y=y.next,b+=4}x+=r}for(var qe=0;qe<r;qe++){b=qe<<2;var Ie=o[b],Me=o[b+1],_e=o[b+2],te=o[b+3],Hr=h*Ie,Yr=h*Me,Xr=h*_e,Wr=h*te,Ft=f*Ie,jt=f*Me,Ut=f*_e,Gt=f*te;v=c;for(var Rn=0;Rn<h;Rn++)v.r=Ie,v.g=Me,v.b=_e,v.a=te,v=v.next;for(var Nn=r,qr=0,Qr=0,Kr=0,Zr=0,zt=1;zt<=n;zt++){b=Nn+qe<<2;var Ht=h-zt;Ft+=(v.r=Ie=o[b])*Ht,jt+=(v.g=Me=o[b+1])*Ht,Ut+=(v.b=_e=o[b+2])*Ht,Gt+=(v.a=te=o[b+3])*Ht,Zr+=Ie,qr+=Me,Qr+=_e,Kr+=te,v=v.next,zt<l&&(Nn+=r)}b=qe,p=c,y=d;for(var Jr=0;Jr<i;Jr++){var re=b<<2;o[re+3]=te=Gt*T>>>w,te>0?(te=255/te,o[re]=(Ft*T>>>w)*te,o[re+1]=(jt*T>>>w)*te,o[re+2]=(Ut*T>>>w)*te):o[re]=o[re+1]=o[re+2]=0,Ft-=Hr,jt-=Yr,Ut-=Xr,Gt-=Wr,Hr-=p.r,Yr-=p.g,Xr-=p.b,Wr-=p.a,re=qe+((re=Jr+h)<l?re:l)*r<<2,Ft+=Zr+=p.r=o[re],jt+=qr+=p.g=o[re+1],Ut+=Qr+=p.b=o[re+2],Gt+=Kr+=p.a=o[re+3],p=p.next,Hr+=Ie=y.r,Yr+=Me=y.g,Xr+=_e=y.b,Wr+=te=y.a,Zr-=Ie,qr-=Me,Qr-=_e,Kr-=te,y=y.next,b+=r}}return a}var ko=function a(){$1(this,a),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function N1(){var{DOMParser:a}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:a,createCanvas(t,r){return new OffscreenCanvas(t,r)},createImage(t){return Ee(function*(){var r=yield fetch(t),i=yield r.blob(),n=yield createImageBitmap(i);return n})()}};return(typeof DOMParser<"u"||typeof a>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function I1(a){var{DOMParser:e,canvas:t,fetch:r}=a;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:t.createCanvas,createImage:t.loadImage}}var M1=Object.freeze({__proto__:null,offscreen:N1,node:I1});function Xe(a){return a.replace(/(?!\u3000)\s+/gm," ")}function Tl(a){return a.replace(/^[\n \t]+/,"")}function El(a){return a.replace(/[\n \t]+$/,"")}function ae(a){var e=(a||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var _1=/^[A-Z-]+$/;function Sl(a){return _1.test(a)?a.toLowerCase():a}function gn(a){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(a)||[];return e[2]||e[3]||e[4]}function Ol(a){if(!a.startsWith("rgb"))return a;var e=3,t=a.replace(/\d+(\.\d+)?/g,(r,i)=>e--&&i?String(Math.round(parseFloat(r))):r);return t}var V1=/(\[[^\]]+\])/g,D1=/(#[^\s+>~.[:]+)/g,k1=/(\.[^\s+>~.[:]+)/g,L1=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,B1=/(:[\w-]+\([^)]*\))/gi,F1=/(:[^\s+>~.[:]+)/g,j1=/([^\s+>~.[:]+)/g;function ke(a,e){var t=e.exec(a);return t?[a.replace(e," "),t.length]:[a,0]}function $l(a){var e=[0,0,0],t=a.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[t,r]=ke(t,V1),e[1]+=r,[t,r]=ke(t,D1),e[0]+=r,[t,r]=ke(t,k1),e[1]+=r,[t,r]=ke(t,L1),e[2]+=r,[t,r]=ke(t,B1),e[1]+=r,[t,r]=ke(t,F1),e[1]+=r,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,r]=ke(t,j1),e[2]+=r,e.join("")}var je=1e-8;function Ti(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))}function Sr(a,e){return(a[0]*e[0]+a[1]*e[1])/(Ti(a)*Ti(e))}function Ei(a,e){return(a[0]*e[1]<a[1]*e[0]?-1:1)*Math.acos(Sr(a,e))}function Si(a){return a*a*a}function Oi(a){return 3*a*a*(1-a)}function $i(a){return 3*a*(1-a)*(1-a)}function wi(a){return(1-a)*(1-a)*(1-a)}function Ci(a){return a*a}function Ai(a){return 2*a*(1-a)}function Pi(a){return(1-a)*(1-a)}class S{constructor(e,t,r){this.document=e,this.name=t,this.value=r,this.isNormalizedColor=!1}static empty(e){return new S(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:r}=this;return Xe(this.getString()).trim().split(e).map(i=>new S(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=Ol(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:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.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()*n.computeSize(r);default:{var o=this.getNumber();return t&&o<1?o*n.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()?S.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),r=t.length,i=0,n=0;n<r&&(t[n]===","&&i++,i!==3);n++);if(e.hasValue()&&this.isString()&&i!==3){var o=new mi(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new S(this.document,this.name,t)}}S.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 wl{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 V{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]=ae(e);return new V(r,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=t,i=r]=ae(e);return new V(r,i)}static parsePath(e){for(var t=ae(e),r=t.length,i=[],n=0;n<r;n+=2)i.push(new V(t[n],t[n+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],n=t*e[1]+r*e[3]+e[5];this.x=i,this.y=n}}class Cl{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((n,o)=>{for(var{run:s}=n,u=r[o];u;)s(u),u=u.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInPath&&t.isPointInPath(s,u)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:r,eventElements:i}=this;r.forEach((n,o)=>{var{x:s,y:u}=n;!i[o]&&t.isPointInBox(s,u)&&(i[o]=e)})}}mapXY(e,t){for(var{window:r,ctx:i}=this.screen,n=new V(e,t),o=i.canvas;o;)n.x-=o.offsetLeft,n.y-=o.offsetTop,o=o.offsetParent;return r.scrollX&&(n.x+=r.scrollX),r.scrollY&&(n.y+=r.scrollY),n}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 Al=typeof window<"u"?window:null,Pl=typeof fetch<"u"?fetch.bind(void 0):null;class Mt{constructor(e){var{fetch:t=Pl,window:r=Al}=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 wl,this.mouse=new Cl(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:n,desiredWidth:o,height:s,desiredHeight:u,minX:l=0,minY:h=0,refX:f,refY:c,clip:v=!1,clipX:d=0,clipY:g=0}=e,p=Xe(i).replace(/^defer\s/,""),[y,x]=p.split(" "),b=y||"xMidYMid",T=x||"meet",w=n/o,O=s/u,E=Math.min(w,O),C=Math.max(w,O),I=o,_=u;T==="meet"&&(I*=E,_*=E),T==="slice"&&(I*=C,_*=C);var F=new S(t,"refX",f),R=new S(t,"refY",c),X=F.hasValue()&&R.hasValue();if(X&&r.translate(-E*F.getPixels("x"),-E*R.getPixels("y")),v){var W=E*d,G=E*g;r.beginPath(),r.moveTo(W,G),r.lineTo(n,G),r.lineTo(n,s),r.lineTo(W,s),r.closePath(),r.clip()}if(!X){var q=T==="meet"&&E===O,H=T==="slice"&&C===O,Q=T==="meet"&&E===w,N=T==="slice"&&C===w;b.startsWith("xMid")&&(q||H)&&r.translate(n/2-I/2,0),b.endsWith("YMid")&&(Q||N)&&r.translate(0,s/2-_/2),b.startsWith("xMax")&&(q||H)&&r.translate(n-I,0),b.endsWith("YMax")&&(Q||N)&&r.translate(0,s-_)}switch(!0){case b==="none":r.scale(w,O);break;case T==="meet":r.scale(E,E);break;case T==="slice":r.scale(C,C);break}r.translate(-l,-h)}start(e){var{enableRedraw:t=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:n=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:u,scaleHeight:l,offsetX:h,offsetY:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:c,mouse:v}=this,d=1e3/c;if(this.frameDuration=d,this.readyPromise=new Promise(b=>{this.resolveReady=b}),this.isReady()&&this.render(e,n,o,u,l,h,f),!!t){var g=Date.now(),p=g,y=0,x=()=>{g=Date.now(),y=g-p,y>=d&&(p=g-y%d,this.shouldUpdate(i,s)&&(this.render(e,n,o,u,l,h,f),v.runEvents())),this.intervalId=za(x)};r||v.start(),this.intervalId=za(x)}}stop(){this.intervalId&&(za.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:r}=this,i=this.animations.reduce((n,o)=>o.update(r)||n,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,r,i,n,o,s){var{CLIENT_WIDTH:u,CLIENT_HEIGHT:l,viewPort:h,ctx:f,isFirstRender:c}=this,v=f.canvas;h.clear(),v.width&&v.height?h.setCurrent(v.width,v.height):h.setCurrent(u,l);var d=e.getStyle("width"),g=e.getStyle("height");!t&&(c||typeof i!="number"&&typeof n!="number")&&(d.hasValue()&&(v.width=d.getPixels("x"),v.style&&(v.style.width="".concat(v.width,"px"))),g.hasValue()&&(v.height=g.getPixels("y"),v.style&&(v.style.height="".concat(v.height,"px"))));var p=v.clientWidth||v.width,y=v.clientHeight||v.height;if(t&&d.hasValue()&&g.hasValue()&&(p=d.getPixels("x"),y=g.getPixels("y")),h.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 n=="number"){var x=ae(e.getAttribute("viewBox").getString()),b=0,T=0;if(typeof i=="number"){var w=e.getStyle("width");w.hasValue()?b=w.getPixels("x")/i:isNaN(x[2])||(b=x[2]/i)}if(typeof n=="number"){var O=e.getStyle("height");O.hasValue()?T=O.getPixels("y")/n:isNaN(x[3])||(T=x[3]/n)}b||(b=T),T||(T=b),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(n);var E=e.getStyle("transform",!0,!0);E.setValue("".concat(E.getString()," scale(").concat(1/b,", ").concat(1/T,")"))}r||f.clearRect(0,0,p,y),e.render(f),c&&(this.isFirstRender=!1)}}Mt.defaultWindow=Al;Mt.defaultFetch=Pl;var{defaultFetch:U1}=Mt,G1=typeof DOMParser<"u"?DOMParser:null;class pr{constructor(){var{fetch:e=U1,DOMParser:t=G1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return Ee(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 Ee(function*(){var r=yield t.fetch(e),i=yield r.text();return t.parseFromString(i)})()}}class Rl{constructor(e,t){this.type="translate",this.point=null,this.point=V.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 Nl{constructor(e,t,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=ae(t);this.angle=new S(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:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(o.getRadians()),e.translate(-s,-u)}unapply(e){var{cx:t,cy:r,originX:i,originY:n,angle:o}=this,s=t+i.getPixels("x"),u=r+n.getPixels("y");e.translate(s,u),e.rotate(-1*o.getRadians()),e.translate(-s,-u)}applyToPoint(e){var{cx:t,cy:r,angle:i}=this,n=i.getRadians();e.applyTransform([1,0,0,1,t||0,r||0]),e.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),e.applyTransform([1,0,0,1,-t||0,-r||0])}}class Il{constructor(e,t,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=V.parseScale(t);(i.x===0||i.y===0)&&(i.x=je,i.y=je),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(e){var{scale:{x:t,y:r},originX:i,originY:n}=this,o=i.getPixels("x"),s=n.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:n}=this,o=i.getPixels("x"),s=n.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 dn{constructor(e,t,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ae(t),this.originX=r[0],this.originY=r[1]}apply(e){var{originX:t,originY:r,matrix:i}=this,n=t.getPixels("x"),o=r.getPixels("y");e.translate(n,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-n,-o)}unapply(e){var{originX:t,originY:r,matrix:i}=this,n=i[0],o=i[2],s=i[4],u=i[1],l=i[3],h=i[5],f=0,c=0,v=1,d=1/(n*(l*v-h*c)-o*(u*v-h*f)+s*(u*c-l*f)),g=t.getPixels("x"),p=r.getPixels("y");e.translate(g,p),e.transform(d*(l*v-h*c),d*(h*f-u*v),d*(s*c-o*v),d*(n*v-s*f),d*(o*h-s*l),d*(s*u-n*h)),e.translate(-g,-p)}applyToPoint(e){e.applyTransform(this.matrix)}}class pn extends dn{constructor(e,t,r){super(e,t,r),this.type="skew",this.angle=null,this.angle=new S(e,"angle",t)}}class Ml extends pn{constructor(e,t,r){super(e,t,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class _l extends pn{constructor(e,t,r){super(e,t,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function z1(a){return Xe(a).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function H1(a){var[e,t]=a.split("(");return[e.trim(),t.trim().replace(")","")]}class Pe{constructor(e,t,r){this.document=e,this.transforms=[];var i=z1(t);i.forEach(n=>{if(n!=="none"){var[o,s]=H1(n),u=Pe.transformTypes[o];typeof u<"u"&&this.transforms.push(new u(this.document,s,r))}})}static fromElement(e,t){var r=t.getStyle("transform",!1,!0),[i,n=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,n];return r.hasValue()?new Pe(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)}}Pe.transformTypes={translate:Rl,rotate:Nl,scale:Il,matrix:dn,skewX:Ml,skewY:_l};class P{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 u=Sl(s.nodeName);this.attributes[u]=new S(e,u,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[u,l]=s.split(":").map(h=>h.trim());this.styles[u]=new S(e,u,l)}})}var{definitions:n}=e,o=this.getAttribute("id");o.hasValue()&&(n[o.getString()]||(n[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 u=e.createTextNode(s);u.getText().length>0&&this.addChild(u)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[e];if(!r&&t){var i=new S(this.document,e,"");return this.attributes[e]=i,i}return r||S.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return S.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 n=this.getAttribute(e);if(n!=null&&n.hasValue())return this.styles[e]=n,n;if(!r){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var u=new S(this.document,e,"");return this.styles[e]=u,u}return i||S.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=Pe.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 P?e:this.document.createElement(e);t.parent=this,P.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(n=>".".concat(n)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var r in e)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=e[r],n=t[r];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),n>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=n)}}}removeStyles(e,t){var r=t.reduce((i,n)=>{var o=e.getStyle(n);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[n,s]]},[]);return r}restoreStyles(e,t){t.forEach(r=>{var[i,n]=r;e.getStyle(i,!0).setValue(n)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}P.ignoreChildTypes=["title"];class Vl extends P{constructor(e,t,r){super(e,t,r)}}function Y1(a){var e=a.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function X1(a){return typeof process>"u"?a:a.trim().split(",").map(Y1).join(",")}function W1(a){if(!a)return"";var e=a.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 q1(a){if(!a)return"";var e=a.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 K{constructor(e,t,r,i,n,o){var s=o?typeof o=="string"?K.parse(o):o:{};this.fontFamily=n||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="",n="",o="",s="",u=Xe(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach(h=>{switch(!0){case(!l.fontStyle&&K.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&K.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&K.weights.includes(h)):h!=="inherit"&&(n=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([o]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(s+=h)}}),new K(r,i,n,o,s,t)}toString(){return[W1(this.fontStyle),this.fontVariant,q1(this.fontWeight),this.fontSize,X1(this.fontFamily)].join(" ").trim()}}K.styles="normal|italic|oblique|inherit";K.variants="normal|small-caps|inherit";K.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ne{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:n}=e;this.addPoint(t,r),this.addPoint(i,n)}}sumCubic(e,t,r,i,n){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)*n}bezierCurveAdd(e,t,r,i,n){var o=6*t-12*r+6*i,s=-3*t+9*r-9*i+3*n,u=3*r-3*t;if(s===0){if(o===0)return;var l=-u/o;0<l&&l<1&&(e?this.addX(this.sumCubic(l,t,r,i,n)):this.addY(this.sumCubic(l,t,r,i,n)));return}var h=Math.pow(o,2)-4*u*s;if(!(h<0)){var f=(-o+Math.sqrt(h))/(2*s);0<f&&f<1&&(e?this.addX(this.sumCubic(f,t,r,i,n)):this.addY(this.sumCubic(f,t,r,i,n)));var c=(-o-Math.sqrt(h))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,r,i,n)):this.addY(this.sumCubic(c,t,r,i,n)))}}addBezierCurve(e,t,r,i,n,o,s,u){this.addPoint(e,t),this.addPoint(s,u),this.bezierCurveAdd(!0,e,r,n,s),this.bezierCurveAdd(!1,t,i,o,u)}addQuadraticCurve(e,t,r,i,n,o){var s=e+.6666666666666666*(r-e),u=t+2/3*(i-t),l=s+1/3*(n-e),h=u+1/3*(o-t);this.addBezierCurve(e,t,s,l,u,h,n,o)}isPointInBox(e,t){var{x1:r,y1:i,x2:n,y2:o}=this;return r<=e&&e<=n&&i<=t&&t<=o}}class $ 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 V(0,0),this.control=new V(0,0),this.current=new V(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 V(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:n}}=this,o=new V(2*t-i,2*r-n);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:n}=this;r&&n.length>0&&!n[n.length-1]&&(n[n.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 Re extends P{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"),n=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 u=r.getColor();u!=="inherit"&&(e.fillStyle=u==="none"?"rgba(0,0,0,0)":u)}if(i.hasValue()){var l=new S(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(n.isUrlDefinition()){var h=n.getFillStyleDefinition(this,o);h&&(e.strokeStyle=h)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var f=n.getString();f!=="inherit"&&(e.strokeStyle=f==="none"?"rgba(0,0,0,0)":f)}if(o.hasValue()){var c=new S(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=c}var v=this.getStyle("stroke-width");if(v.hasValue()){var d=v.getPixels();e.lineWidth=d||je}var g=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),x=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()),x.hasValue()&&x.getString()!=="none"){var T=ae(x.getString());typeof e.setLineDash<"u"?e.setLineDash(T):typeof e.webkitLineDash<"u"?e.webkitLineDash=T:typeof e.mozDash<"u"&&!(T.length===1&&T[0]===0)&&(e.mozDash=T);var w=b.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=w:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=w:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=w)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),E=this.getStyle("font-style"),C=this.getStyle("font-variant"),I=this.getStyle("font-weight"),_=this.getStyle("font-size"),F=this.getStyle("font-family"),R=new K(E.getString(),C.getString(),I.getString(),_.hasValue()?"".concat(_.getPixels(!0),"px"):"",F.getString(),K.parse(O.getString(),e.font));E.setValue(R.fontStyle),C.setValue(R.fontVariant),I.setValue(R.fontWeight),_.setValue(R.fontSize),F.setValue(R.fontFamily),e.font=R.toString(),_.isPixels()&&(this.document.emSize=_.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class A extends Re{constructor(e,t,r){super(e,t,r),this.type="path",this.pathParser=null,this.pathParser=new $(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,r=new ne;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case $.MOVE_TO:this.pathM(e,r);break;case $.LINE_TO:this.pathL(e,r);break;case $.HORIZ_LINE_TO:this.pathH(e,r);break;case $.VERT_LINE_TO:this.pathV(e,r);break;case $.CURVE_TO:this.pathC(e,r);break;case $.SMOOTH_CURVE_TO:this.pathS(e,r);break;case $.QUAD_TO:this.pathQ(e,r);break;case $.SMOOTH_QUAD_TO:this.pathT(e,r);break;case $.ARC:this.pathA(e,r);break;case $.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((n,o)=>[n,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,n=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(n.isUrlDefinition()){var u=n.getDefinition(),[l,h]=r[0];u.render(e,l,h)}if(o.isUrlDefinition())for(var f=o.getDefinition(),c=1;c<i;c++){var[v,d]=r[c];f.render(e,v,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}=A.pathM(r),{x:n,y:o}=i;r.addMarker(i),t.addPoint(n,o),e&&e.moveTo(n,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:n}=A.pathL(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:r}=e,i=new V((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:n}=A.pathH(r),{x:o,y:s}=n;r.addMarker(n,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:r}=e,i=new V(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:n}=A.pathV(r),{x:o,y:s}=n;r.addMarker(n,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"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathC(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathC(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,r=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),n=e.getAsCurrentPoint();return{current:t,point:r,controlPoint:i,currentPoint:n}}pathS(e,t){var{pathParser:r}=this,{current:i,point:n,controlPoint:o,currentPoint:s}=A.pathS(r);r.addMarker(s,o,n),t.addBezierCurve(i.x,i.y,n.x,n.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(n.x,n.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:n,currentPoint:o}=A.pathQ(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.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:n,currentPoint:o}=A.pathT(r);r.addMarker(o,n,n),t.addQuadraticCurve(i.x,i.y,n.x,n.y,o.x,o.y),e&&e.quadraticCurveTo(n.x,n.y,o.x,o.y)}static pathA(e){var{current:t,command:r}=e,{rX:i,rY:n,xRot:o,lArcFlag:s,sweepFlag:u}=r,l=o*(Math.PI/180),h=e.getAsCurrentPoint(),f=new V(Math.cos(l)*(t.x-h.x)/2+Math.sin(l)*(t.y-h.y)/2,-Math.sin(l)*(t.x-h.x)/2+Math.cos(l)*(t.y-h.y)/2),c=Math.pow(f.x,2)/Math.pow(i,2)+Math.pow(f.y,2)/Math.pow(n,2);c>1&&(i*=Math.sqrt(c),n*=Math.sqrt(c));var v=(s===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(n,2)-Math.pow(i,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(i,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)));isNaN(v)&&(v=0);var d=new V(v*i*f.y/n,v*-n*f.x/i),g=new V((t.x+h.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+h.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),p=Ei([1,0],[(f.x-d.x)/i,(f.y-d.y)/n]),y=[(f.x-d.x)/i,(f.y-d.y)/n],x=[(-f.x-d.x)/i,(-f.y-d.y)/n],b=Ei(y,x);return Sr(y,x)<=-1&&(b=Math.PI),Sr(y,x)>=1&&(b=0),{currentPoint:h,rX:i,rY:n,sweepFlag:u,xAxisRotation:l,centp:g,a1:p,ad:b}}pathA(e,t){var{pathParser:r}=this,{currentPoint:i,rX:n,rY:o,sweepFlag:s,xAxisRotation:u,centp:l,a1:h,ad:f}=A.pathA(r),c=1-s?1:-1,v=h+c*(f/2),d=new V(l.x+n*Math.cos(v),l.y+o*Math.sin(v));if(r.addMarkerAngle(d,v-c*Math.PI/2),r.addMarkerAngle(i,v-c*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(h)&&!isNaN(f)){var g=n>o?n:o,p=n>o?1:n/o,y=n>o?o/n:1;e.translate(l.x,l.y),e.rotate(u),e.scale(p,y),e.arc(0,0,g,h,h+f,!!(1-s)),e.scale(1/p,1/y),e.rotate(-u),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){A.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class yn extends A{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 Se extends Re{constructor(e,t,r){super(e,t,new.target===Se?!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 n=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(n):t=n}),t}getFontSize(){var{document:e,parent:t}=this,r=K.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new ne(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,r){var i=t[r],n=null;if(e.isArabic){var o=t.length,s=t[r-1],u=t[r+1],l="isolated";if((r===0||s===" ")&&r<o-1&&u!==" "&&(l="terminal"),r>0&&s!==" "&&r<o-1&&u!==" "&&(l="medial"),r>0&&s!==" "&&(r===o-1||u===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var h=e.glyphs[i];n=h instanceof yn?h:h[l]}}else n=e.glyphs[i];return n||(n=e.missingGlyph),n}getText(){return""}getTextFromNode(e){var t=e||this.node,r=Array.from(t.parentNode.childNodes),i=r.indexOf(t),n=r.length-1,o=Xe(t.textContent||"");return i===0&&(o=Tl(o)),i===n&&(o=El(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(),n=r.getStyle("font-family").getDefinition();if(n){for(var{unitsPerEm:o}=n.fontFace,s=K.parse(t.ctx.font),u=r.getStyle("font-size").getNumber(s.fontSize),l=r.getStyle("font-style").getString(s.fontStyle),h=u/o,f=n.isRTL?i.split("").reverse().join(""):i,c=ae(r.getAttribute("dx").getString()),v=f.length,d=0;d<v;d++){var g=this.getGlyph(n,f,d);e.translate(this.x,this.y),e.scale(h,-h);var p=e.lineWidth;e.lineWidth=e.lineWidth*o/u,l==="italic"&&e.transform(1,0,.4,1,0,0),g.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=p,e.scale(1/h,-1/h),e.translate(-this.x,-this.y),this.x+=u*(g.horizAdvX||n.horizAdvX)/o,typeof c[d]<"u"&&!isNaN(c[d])&&(this.x+=c[d])}return}var{x:y,y:x}=this;e.fillStyle&&e.fillText(i,y,x),e.strokeStyle&&e.strokeText(i,y,x)}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 n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((t,r)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,r,i){var n=r.children[i];n.children.length>0?n.children.forEach((o,s)=>{t.adjustChildCoordinatesRecursiveCore(e,t,n,s)}):this.adjustChildCoordinates(e,t,r,i)}adjustChildCoordinates(e,t,r,i){var n=r.children[i];if(typeof n.measureText!="function")return n;e.save(),n.setContext(e,!0);var o=n.getAttribute("x"),s=n.getAttribute("y"),u=n.getAttribute("dx"),l=n.getAttribute("dy"),h=n.getStyle("font-family").getDefinition(),f=!!h&&h.isRTL;i===0&&(o.hasValue()||o.setValue(n.getInheritedAttribute("x")),s.hasValue()||s.setValue(n.getInheritedAttribute("y")),u.hasValue()||u.setValue(n.getInheritedAttribute("dx")),l.hasValue()||l.setValue(n.getInheritedAttribute("dy")));var c=n.measureText(e);return f&&(t.x-=c),o.hasValue()?(t.applyAnchoring(),n.x=o.getPixels("x"),u.hasValue()&&(n.x+=u.getPixels("x"))):(u.hasValue()&&(t.x+=u.getPixels("x")),n.x=t.x),t.x=n.x,f||(t.x+=c),s.hasValue()?(n.y=s.getPixels("y"),l.hasValue()&&(n.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),n.y=t.y),t.y=n.y,t.leafTexts.push(n),t.minX=Math.min(t.minX,n.x,n.x+c),t.maxX=Math.max(t.maxX,n.x,n.x+c),n.clearContext(e),e.restore(),n}getChildBoundingBox(e,t,r,i){var n=r.children[i];if(typeof n.getBoundingBox!="function")return null;var o=n.getBoundingBox(e);return o?(n.children.forEach((s,u)=>{var l=t.getChildBoundingBox(e,t,n,u);o.addBoundingBox(l)}),o):null}renderChild(e,t,r,i){var n=r.children[i];n.render(e),n.children.forEach((o,s)=>{t.renderChild(e,t,n,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 n=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=ae(r.getAttribute("dx").getString()),u=o.length,l=0,h=0;h<u;h++){var f=this.getGlyph(i,o,h);l+=(f.horizAdvX||i.horizAdvX)*n/i.fontFace.unitsPerEm,typeof s[h]<"u"&&!isNaN(s[h])&&(l+=s[h])}return l}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:c}=e.measureText(t);return this.clearContext(e),e.restore(),c}getInheritedAttribute(e){for(var t=this;t instanceof Se&&t.isFirstChild();){var r=t.parent.getAttribute(e);if(r.hasValue(!0))return r.getValue("0");t=t.parent}return null}}class _t extends Se{constructor(e,t,r){super(e,t,new.target===_t?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class Q1 extends _t{constructor(){super(...arguments),this.type="textNode"}}class ft extends Re{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:r}=this,{screen:i,window:n}=r,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&n&&typeof n.getComputedStyle<"u"){e.font=n.getComputedStyle(o).getPropertyValue("font");var s=new S(r,"fontSize",K.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:u,height:l}=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 h=this.getAttribute("refX"),f=this.getAttribute("refY"),c=this.getAttribute("viewBox"),v=c.hasValue()?ae(c.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,p=0,y=0,x=0;v&&(g=v[0],p=v[1]),this.root||(u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=g,x=p,g=0,p=0)),i.viewPort.setCurrent(u,l),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")),v&&(u=v[2],l=v[3]),r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:u,height:i.viewPort.height,desiredHeight:l,minX:g,minY:p,refX:h.getValue(),refY:f.getValue(),clip:d,clipX:y,clipY:x}),v&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(u,l))}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),n=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),u=i.getNumber(0),l=n.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),n.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(u||e," ").concat(l||t)),s.hasValue()){var f=this.getStyle("width"),c=this.getStyle("height");f.hasValue()&&f.setValue("".concat(e,"px")),c.hasValue()&&c.setValue("".concat(t,"px"))}}}class mn extends A{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"),n=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),u=o.getPixels("x"),l=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(l=u),s.hasValue()&&!o.hasValue()&&(u=l),u=Math.min(u,i/2),l=Math.min(l,n/2),e){var h=4*((Math.sqrt(2)-1)/3);e.beginPath(),n>0&&i>0&&(e.moveTo(t+u,r),e.lineTo(t+i-u,r),e.bezierCurveTo(t+i-u+h*u,r,t+i,r+l-h*l,t+i,r+l),e.lineTo(t+i,r+n-l),e.bezierCurveTo(t+i,r+n-l+h*l,t+i-u+h*u,r+n,t+i-u,r+n),e.lineTo(t+u,r+n),e.bezierCurveTo(t+u-h*u,r+n,t,r+n-l+h*l,t,r+n-l),e.lineTo(t,r+l),e.bezierCurveTo(t,r+l-h*l,t+u-h*u,r,t+u,r),e.closePath())}return new ne(t,r,t+i,r+n)}getMarkers(){return null}}class Dl extends A{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 ne(t-i,r-i,t+i,r+i)}getMarkers(){return null}}class kl extends A{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"),n=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&r>0&&i>0&&(e.beginPath(),e.moveTo(n+r,o),e.bezierCurveTo(n+r,o+t*i,n+t*r,o+i,n,o+i),e.bezierCurveTo(n-t*r,o+i,n-r,o+t*i,n-r,o),e.bezierCurveTo(n-r,o-t*i,n-t*r,o-i,n,o-i),e.bezierCurveTo(n+t*r,o-i,n+r,o-t*i,n+r,o),e.closePath()),new ne(n-r,o-i,n+r,o+i)}getMarkers(){return null}}class Ll extends A{constructor(){super(...arguments),this.type="line"}getPoints(){return[new V(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new V(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:r},{x:i,y:n}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,r),e.lineTo(i,n)),new ne(t,r,i,n)}getMarkers(){var[e,t]=this.getPoints(),r=e.angleTo(t);return[[e,r],[t,r]]}}class bn extends A{constructor(e,t,r){super(e,t,r),this.type="polyline",this.points=[],this.points=V.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:r,y:i}]=t,n=new ne(r,i);return e&&(e.beginPath(),e.moveTo(r,i)),t.forEach(o=>{var{x:s,y:u}=o;n.addPoint(s,u),e&&e.lineTo(s,u)}),n}getMarkers(){var{points:e}=this,t=e.length-1,r=[];return e.forEach((i,n)=>{n!==t&&r.push([i,i.angleTo(e[n+1])])}),r.length>0&&r.push([e[e.length-1],r[r.length-1][1]]),r}}class Bl extends bn{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 Fl extends P{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,r){var i=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),o=new ft(this.document,null);o.attributes.viewBox=new S(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new S(this.document,"width","".concat(i,"px")),o.attributes.height=new S(this.document,"height","".concat(n,"px")),o.attributes.transform=new S(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,n),u=s.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&u.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var f=-1;f<=1;f++)for(var c=-1;c<=1;c++)u.save(),o.attributes.x=new S(this.document,"x",f*s.width),o.attributes.y=new S(this.document,"y",c*s.height),o.render(u),u.restore();var v=e.createPattern(s,"repeat");return v}}class jl extends P{constructor(){super(...arguments),this.type="marker"}render(e,t,r){if(t){var{x:i,y:n}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,n),o==="auto"&&e.rotate(r),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var u=new ft(this.document,null);u.type=this.type,u.attributes.viewBox=new S(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new S(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new S(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new S(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new S(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new S(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new S(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new S(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-r),e.translate(-i,-n)}}}class Ul extends P{constructor(){super(...arguments),this.type="defs"}render(){}}class Fr extends Re{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new ne;return this.children.forEach(r=>{t.addBoundingBox(r.getBoundingBox(e))}),t}}class xn extends P{constructor(e,t,r){super(e,t,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:n}=this;n.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:n}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(r,n[n.length-1].color);if(n.forEach(p=>{o.addColorStop(p.offset,this.addParentOpacity(r,p.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:u,viewPort:l}=s.screen,[h]=l.viewPorts,f=new mn(s,null);f.attributes.x=new S(s,"x",-u/3),f.attributes.y=new S(s,"y",-u/3),f.attributes.width=new S(s,"width",u),f.attributes.height=new S(s,"height",u);var c=new Fr(s,null);c.attributes.transform=new S(s,"transform",this.getAttribute("gradientTransform").getValue()),c.children=[f];var v=new ft(s,null);v.attributes.x=new S(s,"x",0),v.attributes.y=new S(s,"y",0),v.attributes.width=new S(s,"width",h.width),v.attributes.height=new S(s,"height",h.height),v.children=[c];var d=s.createCanvas(h.width,h.height),g=d.getContext("2d");return g.fillStyle=o,v.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 S(this.document,"color",t);return r.addOpacity(e).getColor()}return t}}class Gl extends xn{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 n=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"),u=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===s&&o===u?null:e.createLinearGradient(n,o,s,u)}}class zl extends xn{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 n=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=n,u=o;this.getAttribute("fx").hasValue()&&(s=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,u,h,n,o,l)}}class Hl extends P{constructor(e,t,r){super(e,t,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),n.hasValue()&&(o=o.addOpacity(n)),this.offset=i,this.color=o.getColor()}}class jr extends P{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 S(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(),n=r.getNumber()+(i.getNumber()-r.getNumber())*t;return e==="%"&&(n*=100),"".concat(n).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 n=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var u=s.getString();o="".concat(u,"(").concat(o,")")}r.setValue(o),n=!0}return n}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),n=Math.floor(i),o=Math.ceil(i);r.from=new S(e,"from",parseFloat(t.getValue()[n])),r.to=new S(e,"to",parseFloat(t.getValue()[o])),r.progress=(i-n)/(o-n)}else r.from=this.from,r.to=this.to;return r}}class Yl extends jr{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=new mi(t.getColor()),n=new mi(r.getColor());if(i.ok&&n.ok){var o=i.r+(n.r-i.r)*e,s=i.g+(n.g-i.g)*e,u=i.b+(n.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(u),")")}return this.getAttribute("from").getColor()}}class Xl extends jr{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:r}=this.getProgress(),i=ae(t.getString()),n=ae(r.getString()),o=i.map((s,u)=>{var l=n[u];return s+(l-s)*e}).join(" ");return o}}class Wl extends P{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:n}=this;for(var o of n)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 u=o;u.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[u.unicode]>"u"&&(this.glyphs[u.unicode]={}),this.glyphs[u.unicode][u.arabicForm]=u):this.glyphs[u.unicode]=u;break}}}render(){}}class ql extends P{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 Ql extends A{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Kl extends Se{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 Zl extends Se{constructor(e,t,r){super(e,t,r),this.type="a";var{childNodes:i}=t,n=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:r,y:i}=this,{mouse:n}=t.screen,o=new S(t,"fontSize",K.parse(t.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new ne(r,i-o.getPixels("y"),r+this.measureText(e),i))}else if(this.children.length>0){var s=new Fr(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 Lo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function or(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Lo(Object(t),!0).forEach(function(r){fn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Lo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class Jl extends Se{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:n}=r;switch(i){case $.LINE_TO:e&&e.lineTo(n[0],n[1]);break;case $.MOVE_TO:e&&e.moveTo(n[0],n[1]);break;case $.CURVE_TO:e&&e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case $.QUAD_TO:e&&e.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case $.ARC:{var[o,s,u,l,h,f,c,v]=n,d=u>l?u:l,g=u>l?1:u/l,p=u>l?l/u:1;e&&(e.translate(o,s),e.rotate(c),e.scale(g,p),e.arc(0,0,d,h,h+f,!!(1-v)),e.scale(1/g,1/p),e.rotate(-c),e.translate(-o,-s));break}case $.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,n=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:u,p1:l,rotation:h,text:f}=o;e.save(),e.translate(u.x,u.y),e.rotate(h),e.fillStyle&&e.fillText(f,0,0),e.strokeStyle&&e.strokeText(f,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(u.x,u.y+r/8),e.lineTo(l.x,l.y+r/5))}),t==="underline"&&(e.lineWidth=r/20,e.strokeStyle=n,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,n,o,s,u,l){var h=o,f=this.measureText(e,u);u===" "&&t==="justify"&&r<i&&(f+=(i-r)/n),l>-1&&(h+=this.getLetterSpacingAt(l));var c=this.textHeight/20,v=this.getEquidistantPointOnPath(h,c,0),d=this.getEquidistantPointOnPath(h+f,c,0),g={p0:v,p1:d},p=v&&d?Math.atan2(d.y-v.y,d.x-v.x):0;if(s){var y=Math.cos(Math.PI/2+p)*s,x=Math.cos(-p)*s;g.p0=or(or({},v),{},{x:v.x+y,y:v.y+x}),g.p1=or(or({},d),{},{x:d.x+y,y:d.y+x})}return h+=f,{offset:h,segment:g,rotation:p}}measureText(e,t){var{measuresCache:r}=this,i=t||this.getText();if(r.has(i))return r.get(i);var n=this.measureTargetText(e,i);return r.set(i,n),n}setTextData(e){if(!this.glyphInfo){var t=this.getText(),r=t.split(""),i=t.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(T=>T.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!u.hasValue()||u.getValue()==="inherit"?h=l.getPixels():u.hasValue()&&u.getValue()!=="initial"&&u.getValue()!=="unset"&&(h=u.getPixels());var f=[],c=t.length;this.letterSpacingCache=f;for(var v=0;v<c;v++)f.push(typeof n[v]<"u"?n[v]:h);var d=f.reduce((T,w,O)=>O===0?0:T+w||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(),x=this.getStyle("startOffset").getNumber(0)*y,b=0;(s==="middle"||s==="center")&&(b=-p/2),(s==="end"||s==="right")&&(b=-p),b+=x,r.forEach((T,w)=>{var{offset:O,segment:E,rotation:C}=this.findSegmentToFitChar(e,s,p,y,i,b,o,T,w);b=O,!(!E.p0||!E.p1)&&this.glyphInfo.push({text:r[w],p0:E.p0,p1:E.p1,rotation:C})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:r}=e;for(r.reset();!r.isEnd();){var{current:i}=r,n=i?i.x:0,o=i?i.y:0,s=r.next(),u=s.type,l=[];switch(s.type){case $.MOVE_TO:this.pathM(r,l);break;case $.LINE_TO:u=this.pathL(r,l);break;case $.HORIZ_LINE_TO:u=this.pathH(r,l);break;case $.VERT_LINE_TO:u=this.pathV(r,l);break;case $.CURVE_TO:this.pathC(r,l);break;case $.SMOOTH_CURVE_TO:u=this.pathS(r,l);break;case $.QUAD_TO:this.pathQ(r,l);break;case $.SMOOTH_QUAD_TO:u=this.pathT(r,l);break;case $.ARC:l=this.pathA(r);break;case $.CLOSE_PATH:A.pathZ(r);break}s.type!==$.CLOSE_PATH?t.push({type:u,points:l,start:{x:n,y:o},pathLength:this.calcLength(n,o,u,l)}):t.push({type:$.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:r,y:i}=A.pathM(e).point;t.push(r,i)}pathL(e,t){var{x:r,y:i}=A.pathL(e).point;return t.push(r,i),$.LINE_TO}pathH(e,t){var{x:r,y:i}=A.pathH(e).point;return t.push(r,i),$.LINE_TO}pathV(e,t){var{x:r,y:i}=A.pathV(e).point;return t.push(r,i),$.LINE_TO}pathC(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathC(e);t.push(r.x,r.y,i.x,i.y,n.x,n.y)}pathS(e,t){var{point:r,controlPoint:i,currentPoint:n}=A.pathS(e);return t.push(r.x,r.y,i.x,i.y,n.x,n.y),$.CURVE_TO}pathQ(e,t){var{controlPoint:r,currentPoint:i}=A.pathQ(e);t.push(r.x,r.y,i.x,i.y)}pathT(e,t){var{controlPoint:r,currentPoint:i}=A.pathT(e);return t.push(r.x,r.y,i.x,i.y),$.QUAD_TO}pathA(e){var{rX:t,rY:r,sweepFlag:i,xAxisRotation:n,centp:o,a1:s,ad:u}=A.pathA(e);return i===0&&u>0&&(u-=2*Math.PI),i===1&&u<0&&(u+=2*Math.PI),[o.x,o.y,t,r,s,u,n,i]}calcLength(e,t,r,i){var n=0,o=null,s=null,u=0;switch(r){case $.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case $.CURVE_TO:for(n=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)s=this.getPointOnCubicBezier(u,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.QUAD_TO:for(n=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)s=this.getPointOnQuadraticBezier(u,e,t,i[0],i[1],i[2],i[3]),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return n;case $.ARC:{n=0;var l=i[4],h=i[5],f=i[4]+h,c=Math.PI/180;if(Math.abs(l-f)<c&&(c=Math.abs(l-f)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),h<0)for(u=l-c;u>f;u-=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(u=l+c;u<f;u+=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),n+=this.getLineLength(o.x,o.y,s.x,s.y),n}}return 0}getPointOnLine(e,t,r,i,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,u=(n-r)/(i-t+je),l=Math.sqrt(e*e/(1+u*u));i<t&&(l*=-1);var h=u*l,f=null;if(i===t)f={x:o,y:s+h};else if((s-r)/(o-t+je)===u)f={x:o+l,y:s+h};else{var c=0,v=0,d=this.getLineLength(t,r,i,n);if(d<je)return null;var g=(o-t)*(i-t)+(s-r)*(n-r);g/=d*d,c=t+g*(i-t),v=r+g*(n-r);var p=this.getLineLength(o,s,c,v),y=Math.sqrt(e*e-p*p);l=Math.sqrt(y*y/(1+u*u)),i<t&&(l*=-1),h=u*l,f={x:c+l,y:v+h}}return f}getPointOnPath(e){var t=this.getPathLength(),r=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:n}=this;for(var o of n){if(o&&(o.pathLength<5e-5||r+o.pathLength+5e-5<e)){r+=o.pathLength;continue}var s=e-r,u=0;switch(o.type){case $.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 $.ARC:{var l=o.points[4],h=o.points[5],f=o.points[4]+h;if(u=l+s/o.pathLength*h,h<0&&u<f||h>=0&&u>f)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],u,o.points[6]);break}case $.CURVE_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnCubicBezier(u,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 $.QUAD_TO:u=s/o.pathLength,u>1&&(u=1),i=this.getPointOnQuadraticBezier(u,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,n,o,s,u,l){var h=u*Si(e)+o*Oi(e)+i*$i(e)+t*wi(e),f=l*Si(e)+s*Oi(e)+n*$i(e)+r*wi(e);return{x:h,y:f}}getPointOnQuadraticBezier(e,t,r,i,n,o,s){var u=o*Ci(e)+i*Ai(e)+t*Pi(e),l=s*Ci(e)+n*Ai(e)+r*Pi(e);return{x:u,y:l}}getPointOnEllipticalArc(e,t,r,i,n,o){var s=Math.cos(o),u=Math.sin(o),l={x:r*Math.cos(n),y:i*Math.sin(n)};return{x:e+(l.x*s-l.y*u),y:t+(l.x*u+l.y*s)}}buildEquidistantCache(e,t){var r=this.getPathLength(),i=t||.25,n=e||r/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==i){this.equidistantCache={step:n,precision:i,points:[]};for(var o=0,s=0;s<=r;s+=i){var u=this.getPointOnPath(s),l=this.getPointOnPath(s+i);!u||!l||(o+=this.getLineLength(u.x,u.y,l.x,l.y),o>=n&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:s}),o-=n))}}}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 K1=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class eh extends Re{constructor(e,t,r){super(e,t,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var n=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),n?this.loadSvg(i):this.loadImage(i),this.isSvg=n}}loadImage(e){var t=this;return Ee(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 Ee(function*(){var r=K1.exec(e);if(r){var i=r[5];r[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var n=yield t.document.fetch(e),o=yield n.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,n=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!(!i||!r||!s||!u)){if(e.save(),e.translate(n,o),this.isSvg){var l=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:u});l.document.documentElement.parent=this,l.render()}else{var h=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:h.width,height:u,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&e.drawImage(h,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 ne(e,t,e+r,t+i)}}class th extends Re{constructor(){super(...arguments),this.type="symbol"}render(e){}}class rh{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var r=this;return Ee(function*(){try{var{document:i}=r,n=yield i.canvg.parser.load(t),o=n.getElementsByTagName("font");Array.from(o).forEach(s=>{var u=i.createElement(s);i.definitions[e]=u})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}r.loaded=!0})()}}class Tn extends P{constructor(e,t,r){super(e,t,r),this.type="style";var i=Xe(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),n=i.split("}");n.forEach(o=>{var s=o.trim();if(s){var u=s.split("{"),l=u[0].split(","),h=u[1].split(";");l.forEach(f=>{var c=f.trim();if(c){var v=e.styles[c]||{};if(h.forEach(p=>{var y=p.indexOf(":"),x=p.substr(0,y).trim(),b=p.substr(y+1,p.length-y).trim();x&&b&&(v[x]=new S(e,x,b))}),e.styles[c]=v,e.stylesSpecificity[c]=$l(c),c==="@font-face"){var d=v["font-family"].getString().replace(/"|'/g,""),g=v.src.getString().split(",");g.forEach(p=>{if(p.indexOf('format("svg")')>0){var y=gn(p);y&&new rh(e).load(d,y)}})}}})}})}}Tn.parseExternalUrl=gn;class ah extends Re{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 ft(t,null),i.attributes.viewBox=new S(t,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new S(t,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new S(t,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new S(t,"opacity",this.calculateOpacity())),i.type==="svg"){var n=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);n.hasValue()&&(i.attributes.width=new S(t,"width",n.getString())),o.hasValue()&&(i.attributes.height=new S(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 Pe.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function ur(a,e,t,r,i,n){return a[t*r*4+e*4+n]}function lr(a,e,t,r,i,n,o){a[t*r*4+e*4+n]=o}function j(a,e,t){var r=a[e];return r*t}function be(a,e,t,r){return e+Math.cos(a)*t+Math.sin(a)*r}class En extends P{constructor(e,t,r){super(e,t,r),this.type="feColorMatrix";var i=ae(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var n=i[0];i=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[be(o,.213,.787,-.213),be(o,.715,-.715,-.715),be(o,.072,-.072,.928),0,0,be(o,.213,-.213,.143),be(o,.715,.285,.14),be(o,.072,-.072,-.283),0,0,be(o,.213,-.213,-.787),be(o,.715,-.715,.715),be(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,n){for(var{includeOpacity:o,matrix:s}=this,u=e.getImageData(0,0,i,n),l=0;l<n;l++)for(var h=0;h<i;h++){var f=ur(u.data,h,l,i,n,0),c=ur(u.data,h,l,i,n,1),v=ur(u.data,h,l,i,n,2),d=ur(u.data,h,l,i,n,3),g=j(s,0,f)+j(s,1,c)+j(s,2,v)+j(s,3,d)+j(s,4,1),p=j(s,5,f)+j(s,6,c)+j(s,7,v)+j(s,8,d)+j(s,9,1),y=j(s,10,f)+j(s,11,c)+j(s,12,v)+j(s,13,d)+j(s,14,1),x=j(s,15,f)+j(s,16,c)+j(s,17,v)+j(s,18,d)+j(s,19,1);o&&(g=0,p=0,y=0,x*=d/255),lr(u.data,h,l,i,n,0,g),lr(u.data,h,l,i,n,1,p),lr(u.data,h,l,i,n,2,y),lr(u.data,h,l,i,n,3,x)}e.clearRect(0,0,i,n),e.putImageData(u,0,0)}}class Vt extends P{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var u=new ne;this.children.forEach(d=>{u.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(u.x1),n=Math.floor(u.y1),o=Math.floor(u.width),s=Math.floor(u.height)}var l=this.removeStyles(t,Vt.ignoreStyles),h=r.createCanvas(i+o,n+s),f=h.getContext("2d");r.screen.setDefaults(f),this.renderChildren(f),new En(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,i+o,n+s);var c=r.createCanvas(i+o,n+s),v=c.getContext("2d");r.screen.setDefaults(v),t.render(v),v.globalCompositeOperation="destination-in",v.fillStyle=f.createPattern(h,"no-repeat"),v.fillRect(0,0,i+o,n+s),e.fillStyle=v.createPattern(c,"no-repeat"),e.fillRect(0,0,i+o,n+s),this.restoreStyles(t,l)}render(e){}}Vt.ignoreStyles=["mask","transform","clip-path"];var Bo=()=>{};class ih extends P{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,r=Reflect.getPrototypeOf(e),{beginPath:i,closePath:n}=e;r&&(r.beginPath=Bo,r.closePath=Bo),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Pe.fromElement(t,o)),s&&s.apply(e),o.path(e),r&&(r.closePath=n),s&&s.unapply(e)}}),Reflect.apply(n,e,[]),e.clip(),r&&(r.beginPath=i,r.closePath=n)}render(e){}}class Dt extends P{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:r,children:i}=this,n=t.getBoundingBox(e);if(n){var o=0,s=0;i.forEach(y=>{var x=y.extraFilterDistance||0;o=Math.max(o,x),s=Math.max(s,x)});var u=Math.floor(n.width),l=Math.floor(n.height),h=u+2*o,f=l+2*s;if(!(h<1||f<1)){var c=Math.floor(n.x),v=Math.floor(n.y),d=this.removeStyles(t,Dt.ignoreStyles),g=r.createCanvas(h,f),p=g.getContext("2d");r.screen.setDefaults(p),p.translate(-c+o,-v+s),t.render(p),i.forEach(y=>{typeof y.apply=="function"&&y.apply(p,0,0,h,f)}),e.drawImage(g,0,0,h,f,c-o,v-s,h,f),this.restoreStyles(t,d)}}}render(e){}}Dt.ignoreStyles=["filter","transform","clip-path"];class nh extends P{constructor(e,t,r){super(e,t,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,r,i,n){}}class sh extends P{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,r,i,n){}}class oh extends P{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,r,i,n){}}class uh extends P{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,n){var{document:o,blurRadius:s}=this,u=o.window?o.window.document.body:null,l=e.canvas;l.id=o.getUniqueId(),u&&(l.style.display="none",u.appendChild(l)),P1(l,t,r,i,n,s),u&&u.removeChild(l)}}class lh extends P{constructor(){super(...arguments),this.type="title"}}class hh extends P{constructor(){super(...arguments),this.type="desc"}}var Z1={svg:ft,rect:mn,circle:Dl,ellipse:kl,line:Ll,polyline:bn,polygon:Bl,path:A,pattern:Fl,marker:jl,defs:Ul,linearGradient:Gl,radialGradient:zl,stop:Hl,animate:jr,animateColor:Yl,animateTransform:Xl,font:Wl,"font-face":ql,"missing-glyph":Ql,glyph:yn,text:Se,tspan:_t,tref:Kl,a:Zl,textPath:Jl,image:eh,g:Fr,symbol:th,style:Tn,use:ah,mask:Vt,clipPath:ih,filter:Dt,feDropShadow:nh,feMorphology:sh,feComposite:oh,feColorMatrix:En,feGaussianBlur:uh,title:lh,desc:hh};function Fo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function J1(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Fo(Object(t),!0).forEach(function(r){fn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Fo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function e2(a,e){var t=document.createElement("canvas");return t.width=a,t.height=e,t}function t2(a){return Ri.apply(this,arguments)}function Ri(){return Ri=Ee(function*(a){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=(n,o,s,u,l)=>{i(l)},t.src=a})}),Ri.apply(this,arguments)}class Te{constructor(e){var{rootEmSize:t=12,emSize:r=12,createCanvas:i=Te.createCanvas,createImage:n=Te.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(n,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=Te.elementTypes[t];return typeof r<"u"?new r(this,e):new Vl(this,e)}createTextNode(e){return new Q1(this,e)}setViewBox(e){this.screen.setViewBox(J1({document:this},e))}}Te.createCanvas=e2;Te.createImage=t2;Te.elementTypes=Z1;function jo(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function Le(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(t),!0).forEach(function(r){fn(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):jo(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}class Fe{constructor(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new pr(r),this.screen=new Mt(e,r),this.options=r;var i=new Te(this,r),n=i.createDocumentElement(t);this.document=i,this.documentElement=n}static from(e,t){var r=arguments;return Ee(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},n=new pr(i),o=yield n.parse(t);return new Fe(e,o,i)})()}static fromString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new pr(r),n=i.parseFromString(t);return new Fe(e,n,r)}fork(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fe.from(e,t,Le(Le({},this.options),r))}forkString(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fe.fromString(e,t,Le(Le({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return Ee(function*(){var r=e.length>0&&e[0]!==void 0?e[0]:{};t.start(Le({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,Le(Le({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)}}exports.AElement=Zl;exports.AnimateColorElement=Yl;exports.AnimateElement=jr;exports.AnimateTransformElement=Xl;exports.BoundingBox=ne;exports.CB1=Si;exports.CB2=Oi;exports.CB3=$i;exports.CB4=wi;exports.Canvg=Fe;exports.CircleElement=Dl;exports.ClipPathElement=ih;exports.DefsElement=Ul;exports.DescElement=hh;exports.Document=Te;exports.Element=P;exports.EllipseElement=kl;exports.FeColorMatrixElement=En;exports.FeCompositeElement=oh;exports.FeDropShadowElement=nh;exports.FeGaussianBlurElement=uh;exports.FeMorphologyElement=sh;exports.FilterElement=Dt;exports.Font=K;exports.FontElement=Wl;exports.FontFaceElement=ql;exports.GElement=Fr;exports.GlyphElement=yn;exports.GradientElement=xn;exports.ImageElement=eh;exports.LineElement=Ll;exports.LinearGradientElement=Gl;exports.MarkerElement=jl;exports.MaskElement=Vt;exports.Matrix=dn;exports.MissingGlyphElement=Ql;exports.Mouse=Cl;exports.PSEUDO_ZERO=je;exports.Parser=pr;exports.PathElement=A;exports.PathParser=$;exports.PatternElement=Fl;exports.Point=V;exports.PolygonElement=Bl;exports.PolylineElement=bn;exports.Property=S;exports.QB1=Ci;exports.QB2=Ai;exports.QB3=Pi;exports.RadialGradientElement=zl;exports.RectElement=mn;exports.RenderedElement=Re;exports.Rotate=Nl;exports.SVGElement=ft;exports.SVGFontLoader=rh;exports.Scale=Il;exports.Screen=Mt;exports.Skew=pn;exports.SkewX=Ml;exports.SkewY=_l;exports.StopElement=Hl;exports.StyleElement=Tn;exports.SymbolElement=th;exports.TRefElement=Kl;exports.TSpanElement=_t;exports.TextElement=Se;exports.TextPathElement=Jl;exports.TitleElement=lh;exports.Transform=Pe;exports.Translate=Rl;exports.UnknownElement=Vl;exports.UseElement=ah;exports.ViewPort=wl;exports.compressSpaces=Xe;exports.default=Fe;exports.getSelectorSpecificity=$l;exports.normalizeAttributeName=Sl;exports.normalizeColor=Ol;exports.parseExternalUrl=gn;exports.presets=M1;exports.toNumbers=ae;exports.trimLeft=Tl;exports.trimRight=El;exports.vectorMagnitude=Ti;exports.vectorsAngle=Ei;exports.vectorsRatio=Sr;
|