!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).canvg={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){var e={exports:{}};return t(e,e.exports),e.exports}var i,o,a=function(t){return t&&t.Math==Math&&t},u=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||function(){return this}()||Function("return this")(),s=function(t,e){try{Object.defineProperty(u,t,{value:e,configurable:!0,writable:!0})}catch(r){u[t]=e}return e},c="__core-js_shared__",l=u[c]||s(c,{}),f=n((function(t){(t.exports=function(t,e){return l[t]||(l[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},p=function(t){return Object(h(t))},v={}.hasOwnProperty,y=Object.hasOwn||function(t,e){return v.call(p(t),e)},d=0,g=Math.random(),m=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++d+g).toString(36)},x=function(t){return"function"==typeof t},b=function(t){return x(t)?t:void 0},w=function(t,e){return arguments.length<2?b(u[t]):u[t]&&u[t][e]},S=w("navigator","userAgent")||"",O=u.process,k=u.Deno,T=O&&O.versions||k&&k.version,A=T&&T.v8;A?o=(i=A.split("."))[0]<4?1:i[0]+i[1]:S&&(!(i=S.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=S.match(/Chrome\/(\d+)/))&&(o=i[1]);var R=o&&+o,P=function(t){try{return!!t()}catch(t){return!0}},E=!!Object.getOwnPropertySymbols&&!P((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&R&&R<41})),C=E&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,M=f("wks"),N=u.Symbol,_=C?N:N&&N.withoutSetter||m,I=function(t){return y(M,t)&&(E||"string"==typeof M[t])||(E&&y(N,t)?M[t]=N[t]:M[t]=_("Symbol."+t)),M[t]},V={};V[I("toStringTag")]="z";var L="[object z]"===String(V),B=!P((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=function(t){return"object"==typeof t?null!==t:x(t)},j=u.document,F=D(j)&&D(j.createElement),z=function(t){return F?j.createElement(t):{}},U=!B&&!P((function(){return 7!=Object.defineProperty(z("div"),"a",{get:function(){return 7}}).a})),H=function(t){if(D(t))return t;throw TypeError(String(t)+" is not an object")},X=C?function(t){return"symbol"==typeof t}:function(t){var e=w("Symbol");return x(e)&&Object(t)instanceof e},Y=function(t){try{return String(t)}catch(t){return"Object"}},G=function(t){if(x(t))return t;throw TypeError(Y(t)+" is not a function")},W=function(t,e){var r=t[e];return null==r?void 0:G(r)},q=I("toPrimitive"),$=function(t,e){if(!D(t)||X(t))return t;var r,n=W(t,q);if(n){if(void 0===e&&(e="default"),r=n.call(t,e),!D(r)||X(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&x(r=t.toString)&&!D(n=r.call(t)))return n;if(x(r=t.valueOf)&&!D(n=r.call(t)))return n;if("string"!==e&&x(r=t.toString)&&!D(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(t,e)},Q=function(t){var e=$(t,"string");return X(e)?e:String(e)},Z=Object.defineProperty,K={f:B?Z:function(t,e,r){if(H(t),e=Q(e),H(r),U)try{return Z(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},J=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},tt=B?function(t,e,r){return K.f(t,e,J(1,r))}:function(t,e,r){return t[e]=r,t},et=Function.toString;x(l.inspectSource)||(l.inspectSource=function(t){return et.call(t)});var rt,nt,it,ot=l.inspectSource,at=u.WeakMap,ut=x(at)&&/native code/.test(ot(at)),st=f("keys"),ct=function(t){return st[t]||(st[t]=m(t))},lt={},ft="Object already initialized",ht=u.WeakMap;if(ut||l.state){var pt=l.state||(l.state=new ht),vt=pt.get,yt=pt.has,dt=pt.set;rt=function(t,e){if(yt.call(pt,t))throw new TypeError(ft);return e.facade=t,dt.call(pt,t,e),e},nt=function(t){return vt.call(pt,t)||{}},it=function(t){return yt.call(pt,t)}}else{var gt=ct("state");lt[gt]=!0,rt=function(t,e){if(y(t,gt))throw new TypeError(ft);return e.facade=t,tt(t,gt,e),e},nt=function(t){return y(t,gt)?t[gt]:{}},it=function(t){return y(t,gt)}}var mt={set:rt,get:nt,has:it,enforce:function(t){return it(t)?nt(t):rt(t,{})},getterFor:function(t){return function(e){var r;if(!D(e)||(r=nt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},xt=Function.prototype,bt=B&&Object.getOwnPropertyDescriptor,wt=y(xt,"name"),St={EXISTS:wt,PROPER:wt&&"something"===function(){}.name,CONFIGURABLE:wt&&(!B||B&&bt(xt,"name").configurable)},Ot=n((function(t){var e=St.CONFIGURABLE,r=mt.get,n=mt.enforce,i=String(String).split("String");(t.exports=function(t,r,o,a){var c,l=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet,p=a&&void 0!==a.name?a.name:r;x(o)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!y(o,"name")||e&&o.name!==p)&&tt(o,"name",p),(c=n(o)).source||(c.source=i.join("string"==typeof p?p:""))),t!==u?(l?!h&&t[r]&&(f=!0):delete t[r],f?t[r]=o:tt(t,r,o)):f?t[r]=o:s(r,o)})(Function.prototype,"toString",(function(){return x(this)&&r(this).source||ot(this)}))})),kt={}.toString,Tt=function(t){return kt.call(t).slice(8,-1)},At=I("toStringTag"),Rt="Arguments"==Tt(function(){return arguments}()),Pt=L?Tt:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),At))?r:Rt?Tt(e):"Object"==(n=Tt(e))&&x(e.callee)?"Arguments":n},Et=L?{}.toString:function(){return"[object "+Pt(this)+"]"};L||Ot(Object.prototype,"toString",Et,{unsafe:!0});var Ct={}.propertyIsEnumerable,Mt=Object.getOwnPropertyDescriptor,Nt={f:Mt&&!Ct.call({1:2},1)?function(t){var e=Mt(this,t);return!!e&&e.enumerable}:Ct},_t="".split,It=P((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==Tt(t)?_t.call(t,""):Object(t)}:Object,Vt=function(t){return It(h(t))},Lt=Object.getOwnPropertyDescriptor,Bt={f:B?Lt:function(t,e){if(t=Vt(t),e=Q(e),U)try{return Lt(t,e)}catch(t){}if(y(t,e))return J(!Nt.f.call(t,e),t[e])}},Dt=Math.ceil,jt=Math.floor,Ft=function(t){var e=+t;return e!=e||0===e?0:(e>0?jt:Dt)(e)},zt=Math.max,Ut=Math.min,Ht=function(t,e){var r=Ft(t);return r<0?zt(r+e,0):Ut(r,e)},Xt=Math.min,Yt=function(t){return t>0?Xt(Ft(t),9007199254740991):0},Gt=function(t){return Yt(t.length)},Wt=function(t){return function(e,r,n){var i,o=Vt(e),a=Gt(o),u=Ht(n,a);if(t&&r!=r){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},qt={includes:Wt(!0),indexOf:Wt(!1)},$t=qt.indexOf,Qt=function(t,e){var r,n=Vt(t),i=0,o=[];for(r in n)!y(lt,r)&&y(n,r)&&o.push(r);for(;e.length>i;)y(n,r=e[i++])&&(~$t(o,r)||o.push(r));return o},Zt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Kt=Zt.concat("length","prototype"),Jt={f:Object.getOwnPropertyNames||function(t){return Qt(t,Kt)}},te={f:Object.getOwnPropertySymbols},ee=w("Reflect","ownKeys")||function(t){var e=Jt.f(H(t)),r=te.f;return r?e.concat(r(t)):e},re=function(t,e){for(var r=ee(e),n=K.f,i=Bt.f,o=0;oo;o++)if((u=d(t[o]))&&u instanceof Ce)return u;return new Ce(!1)}n=Pe(t,i)}for(s=n.next;!(c=s.call(n)).done;){try{u=d(c.value)}catch(t){Ee(n,"throw",t)}if("object"==typeof u&&u&&u instanceof Ce)return u}return new Ce(!1)},Ne=I("iterator"),_e=!1;try{var Ie=0,Ve={next:function(){return{done:!!Ie++}},return:function(){_e=!0}};Ve[Ne]=function(){return this},Array.from(Ve,(function(){throw 2}))}catch(t){}var Le,Be,De,je,Fe=function(t,e){if(!e&&!_e)return!1;var r=!1;try{var n={};n[Ne]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},ze=[],Ue=w("Reflect","construct"),He=/^\s*(?:class|function)\b/,Xe=He.exec,Ye=!He.exec((function(){})),Ge=function(t){if(!x(t))return!1;try{return Ue(Object,ze,t),!0}catch(t){return!1}},We=!Ue||P((function(){var t;return Ge(Ge.call)||!Ge(Object)||!Ge((function(){t=!0}))||t}))?function(t){if(!x(t))return!1;switch(Pt(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ye||!!Xe.call(He,ot(t))}:Ge,qe=I("species"),$e=function(t,e){var r,n=H(t).constructor;return void 0===n||null==(r=H(n)[qe])?e:function(t){if(We(t))return t;throw TypeError(Y(t)+" is not a constructor")}(r)},Qe=w("document","documentElement"),Ze=/(?:ipad|iphone|ipod).*applewebkit/i.test(S),Ke="process"==Tt(u.process),Je=u.setImmediate,tr=u.clearImmediate,er=u.process,rr=u.MessageChannel,nr=u.Dispatch,ir=0,or={},ar="onreadystatechange";try{Le=u.location}catch(t){}var ur=function(t){if(or.hasOwnProperty(t)){var e=or[t];delete or[t],e()}},sr=function(t){return function(){ur(t)}},cr=function(t){ur(t.data)},lr=function(t){u.postMessage(String(t),Le.protocol+"//"+Le.host)};Je&&tr||(Je=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return or[++ir]=function(){(x(t)?t:Function(t)).apply(void 0,e)},Be(ir),ir},tr=function(t){delete or[t]},Ke?Be=function(t){er.nextTick(sr(t))}:nr&&nr.now?Be=function(t){nr.now(sr(t))}:rr&&!Ze?(je=(De=new rr).port2,De.port1.onmessage=cr,Be=Te(je.postMessage,je,1)):u.addEventListener&&x(u.postMessage)&&!u.importScripts&&Le&&"file:"!==Le.protocol&&!P(lr)?(Be=lr,u.addEventListener("message",cr,!1)):Be=ar in z("script")?function(t){Qe.appendChild(z("script")).onreadystatechange=function(){Qe.removeChild(this),ur(t)}}:function(t){setTimeout(sr(t),0)});var fr,hr,pr,vr,yr,dr,gr,mr,xr={set:Je,clear:tr},br=/ipad|iphone|ipod/i.test(S)&&void 0!==u.Pebble,wr=/web0s(?!.*chrome)/i.test(S),Sr=Bt.f,Or=xr.set,kr=u.MutationObserver||u.WebKitMutationObserver,Tr=u.document,Ar=u.process,Rr=u.Promise,Pr=Sr(u,"queueMicrotask"),Er=Pr&&Pr.value;Er||(fr=function(){var t,e;for(Ke&&(t=Ar.domain)&&t.exit();hr;){e=hr.fn,hr=hr.next;try{e()}catch(t){throw hr?vr():pr=void 0,t}}pr=void 0,t&&t.enter()},Ze||Ke||wr||!kr||!Tr?!br&&Rr&&Rr.resolve?((gr=Rr.resolve(void 0)).constructor=Rr,mr=gr.then,vr=function(){mr.call(gr,fr)}):vr=Ke?function(){Ar.nextTick(fr)}:function(){Or.call(u,fr)}:(yr=!0,dr=Tr.createTextNode(""),new kr(fr).observe(dr,{characterData:!0}),vr=function(){dr.data=yr=!yr}));var Cr,Mr,Nr,_r,Ir=Er||function(t){var e={fn:t,next:void 0};pr&&(pr.next=e),hr||(hr=e,vr()),pr=e},Vr=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=G(e),this.reject=G(r)},Lr={f:function(t){return new Vr(t)}},Br=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Dr="object"==typeof window,jr=xr.set,Fr=I("species"),zr="Promise",Ur=mt.get,Hr=mt.set,Xr=mt.getterFor(zr),Yr=he&&he.prototype,Gr=he,Wr=Yr,qr=u.TypeError,$r=u.document,Qr=u.process,Zr=Lr.f,Kr=Zr,Jr=!!($r&&$r.createEvent&&u.dispatchEvent),tn=x(u.PromiseRejectionEvent),en="unhandledrejection",rn=!1,nn=ce(zr,(function(){var t=ot(Gr),e=t!==String(Gr);if(!e&&66===R)return!0;if(R>=51&&/native code/.test(t))return!1;var r=new Gr((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[Fr]=n,!(rn=r.then((function(){}))instanceof n)||!e&&Dr&&!tn})),on=nn||!Fe((function(t){Gr.all(t).catch((function(){}))})),an=function(t){var e;return!(!D(t)||!x(e=t.then))&&e},un=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;Ir((function(){for(var n=t.value,i=1==t.state,o=0;r.length>o;){var a,u,s,c=r[o++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&fn(t),t.rejection=1),!0===l?a=n:(p&&p.enter(),a=l(n),p&&(p.exit(),s=!0)),a===c.promise?h(qr("Promise-chain cycle")):(u=an(a))?u.call(a,f,h):f(a)):h(n)}catch(t){p&&!s&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&cn(t)}))}},sn=function(t,e,r){var n,i;Jr?((n=$r.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),u.dispatchEvent(n)):n={promise:e,reason:r},!tn&&(i=u["on"+t])?i(n):t===en&&function(t,e){var r=u.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},cn=function(t){jr.call(u,(function(){var e,r=t.facade,n=t.value;if(ln(t)&&(e=Br((function(){Ke?Qr.emit("unhandledRejection",n,r):sn(en,r,n)})),t.rejection=Ke||ln(t)?2:1,e.error))throw e.value}))},ln=function(t){return 1!==t.rejection&&!t.parent},fn=function(t){jr.call(u,(function(){var e=t.facade;Ke?Qr.emit("rejectionHandled",e):sn("rejectionhandled",e,t.value)}))},hn=function(t,e,r){return function(n){t(e,n,r)}},pn=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,un(t,!0))},vn=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw qr("Promise can't be resolved itself");var n=an(e);n?Ir((function(){var r={done:!1};try{n.call(e,hn(vn,r,t),hn(pn,r,t))}catch(e){pn(r,e,t)}})):(t.value=e,t.state=1,un(t,!1))}catch(e){pn({done:!1},e,t)}}};if(nn&&(Wr=(Gr=function(t){be(this,Gr,zr),G(t),Cr.call(this);var e=Ur(this);try{t(hn(vn,e),hn(pn,e))}catch(t){pn(e,t)}}).prototype,(Cr=function(t){Hr(this,{type:zr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=pe(Wr,{then:function(t,e){var r=Xr(this),n=Zr($e(this,Gr));return n.ok=!x(t)||t,n.fail=x(e)&&e,n.domain=Ke?Qr.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&un(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Mr=function(){var t=new Cr,e=Ur(t);this.promise=t,this.resolve=hn(vn,e),this.reject=hn(pn,e)},Lr.f=Zr=function(t){return t===Gr||t===Nr?new Mr(t):Kr(t)},x(he)&&Yr!==Object.prototype)){_r=Yr.then,rn||(Ot(Yr,"then",(function(t,e){var r=this;return new Gr((function(t,e){_r.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Ot(Yr,"catch",Wr.catch,{unsafe:!0}));try{delete Yr.constructor}catch(t){}ve&&ve(Yr,Wr)}fe({global:!0,wrap:!0,forced:nn},{Promise:Gr}),ge(Gr,zr,!1),xe(zr),Nr=w(zr),fe({target:zr,stat:!0,forced:nn},{reject:function(t){var e=Zr(this);return e.reject.call(void 0,t),e.promise}}),fe({target:zr,stat:!0,forced:nn},{resolve:function(t){return function(t,e){if(H(t),D(e)&&e.constructor===t)return e;var r=Lr.f(t);return(0,r.resolve)(e),r.promise}(this,t)}}),fe({target:zr,stat:!0,forced:on},{all:function(t){var e=this,r=Zr(e),n=r.resolve,i=r.reject,o=Br((function(){var r=G(e.resolve),o=[],a=0,u=1;Me(t,(function(t){var s=a++,c=!1;o.push(void 0),u++,r.call(e,t).then((function(t){c||(c=!0,o[s]=t,--u||n(o))}),i)})),--u||n(o)}));return o.error&&i(o.value),r.promise},race:function(t){var e=this,r=Zr(e),n=r.reject,i=Br((function(){var i=G(e.resolve);Me(t,(function(t){i.call(e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var yn=Bt.f;fe({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=yn(H(t),e);return!(r&&!r.configurable)&&delete t[e]}});var dn=n((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new P(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=T(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?v:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function d(){}function g(){}function m(){}var x={};s(x,o,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(E([])));w&&w!==r&&n.call(w,o)&&(x=w);var S=m.prototype=d.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})),gn=r(n((function(t){function e(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function u(t){e(a,i,o,u,s,"next",t)}function s(t){e(a,i,o,u,s,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0})));var mn=Object.freeze({__proto__:null,offscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.DOMParser,r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return gn(dn.mark((function e(){var r,n,i;return dn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))()}};return"undefined"==typeof DOMParser&&void 0!==e||Reflect.deleteProperty(r,"DOMParser"),r},node:function(t){var e=t.DOMParser,r=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}}),xn=Array.isArray||function(t){return"Array"==Tt(t)},bn=I("species"),wn=function(t,e){return new(function(t){var e;return xn(t)&&(e=t.constructor,(We(e)&&(e===Array||xn(e.prototype))||D(e)&&null===(e=e[bn]))&&(e=void 0)),void 0===e?Array:e}(t))(0===e?0:e)},Sn=[].push,On=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,a=7==t,u=5==t||o;return function(s,c,l,f){for(var h,v,y=p(s),d=It(y),g=Te(c,l,3),m=Gt(d),x=0,b=f||wn,w=e?b(s,m):r||a?b(s,0):void 0;m>x;x++)if((u||x in d)&&(v=g(h=d[x],x,y),t))if(e)w[x]=v;else if(v)switch(t){case 3:return!0;case 5:return h;case 6:return x;case 2:Sn.call(w,h)}else switch(t){case 4:return!1;case 7:Sn.call(w,h)}return o?-1:n||i?i:w}},kn={forEach:On(0),map:On(1),filter:On(2),some:On(3),every:On(4),find:On(5),findIndex:On(6),filterReject:On(7)},Tn=I("species"),An=function(t){return R>=51||!P((function(){var e=[];return(e.constructor={})[Tn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Rn=kn.map,Pn=An("map");fe({target:"Array",proto:!0,forced:!Pn},{map:function(t){return Rn(this,t,arguments.length>1?arguments[1]:void 0)}});var En=function(t){if("Symbol"===Pt(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},Cn="\t\n\v\f\r                 \u2028\u2029\ufeff",Mn="["+Cn+"]",Nn=RegExp("^"+Mn+Mn+"*"),_n=RegExp(Mn+Mn+"*$"),In=function(t){return function(e){var r=En(h(e));return 1&t&&(r=r.replace(Nn,"")),2&t&&(r=r.replace(_n,"")),r}},Vn={start:In(1),end:In(2),trim:In(3)},Ln=Vn.trim,Bn=u.parseFloat,Dn=u.Symbol,jn=Dn&&Dn.iterator,Fn=1/Bn(Cn+"-0")!=-1/0||jn&&!P((function(){Bn(Object(jn))}))?function(t){var e=Ln(En(t)),r=Bn(e);return 0===r&&"-"==e.charAt(0)?-0:r}:Bn;fe({global:!0,forced:parseFloat!=Fn},{parseFloat:Fn});var zn,Un=function(){var t=H(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Hn=u.RegExp,Xn={UNSUPPORTED_Y:P((function(){var t=Hn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:P((function(){var t=Hn("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Yn=Object.keys||function(t){return Qt(t,Zt)},Gn=B?Object.defineProperties:function(t,e){H(t);for(var r,n=Yn(e),i=n.length,o=0;i>o;)K.f(t,r=n[o++],e[r]);return t},Wn=ct("IE_PROTO"),qn=function(){},$n=function(t){return"