2 lines
228 KiB
JavaScript
2 lines
228 KiB
JavaScript
System.register([],(function(t){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,r,i){return t(i={path:r,exports:{},require:function(t,r){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==r&&i.path)}},i.exports),i.exports}var check=function(t){return t&&t.Math==Math&&t},i=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r&&r)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},o=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!a.call({1:2},1)?function propertyIsEnumerable(t){var r=u(this,t);return!!r&&r.enumerable}:a},createPropertyDescriptor=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},h={}.toString,classofRaw=function(t){return h.call(t).slice(8,-1)},p="".split,y=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?p.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return y(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,r){if(!isObject(t))return t;var i,o;if(r&&"function"==typeof(i=t.toString)&&!isObject(o=i.call(t)))return o;if("function"==typeof(i=t.valueOf)&&!isObject(o=i.call(t)))return o;if(!r&&"function"==typeof(i=t.toString)&&!isObject(o=i.call(t)))return o;throw TypeError("Can't convert object to primitive value")},g={}.hasOwnProperty,has=function(t,r){return g.call(t,r)},v=i.document,d=isObject(v)&&isObject(v.createElement),documentCreateElement=function(t){return d?v.createElement(t):{}},x=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),b=Object.getOwnPropertyDescriptor,S={f:o?b:function getOwnPropertyDescriptor(t,r){if(t=toIndexedObject(t),r=toPrimitive(r,!0),x)try{return b(t,r)}catch(t){}if(has(t,r))return createPropertyDescriptor(!l.f.call(t,r),t[r])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},w=Object.defineProperty,k={f:o?w:function defineProperty(t,r,i){if(anObject(t),r=toPrimitive(r,!0),anObject(i),x)try{return w(t,r,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[r]=i.value),t}},E=o?function(t,r,i){return k.f(t,r,createPropertyDescriptor(1,i))}:function(t,r,i){return t[r]=i,t},setGlobal=function(t,r){try{E(i,t,r)}catch(o){i[t]=r}return r},P="__core-js_shared__",R=i[P]||setGlobal(P,{}),C=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(t){return C.call(t)});var A,T,_,M=R.inspectSource,O=i.WeakMap,N="function"==typeof O&&/native code/.test(M(O)),D=createCommonjsModule((function(t){(t.exports=function(t,r){return R[t]||(R[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),L=0,$=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++L+$).toString(36)},I=D("keys"),sharedKey=function(t){return I[t]||(I[t]=uid(t))},V={},j=i.WeakMap;if(N){var B=new j,G=B.get,z=B.has,U=B.set;A=function(t,r){return U.call(B,t,r),r},T=function(t){return G.call(B,t)||{}},_=function(t){return z.call(B,t)}}else{var q=sharedKey("state");V[q]=!0,A=function(t,r){return E(t,q,r),r},T=function(t){return has(t,q)?t[q]:{}},_=function(t){return has(t,q)}}var W,H,X={set:A,get:T,has:_,enforce:function(t){return _(t)?T(t):A(t,{})},getterFor:function(t){return function(r){var i;if(!isObject(r)||(i=T(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},Y=createCommonjsModule((function(t){var r=X.get,o=X.enforce,a=String(String).split("String");(t.exports=function(t,r,u,l){var h=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;"function"==typeof u&&("string"!=typeof r||has(u,"name")||E(u,"name",r),o(u).source=a.join("string"==typeof r?r:"")),t!==i?(h?!y&&t[r]&&(p=!0):delete t[r],p?t[r]=u:E(t,r,u)):p?t[r]=u:setGlobal(r,u)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&r(this).source||M(this)}))})),Q=i,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,r){return arguments.length<2?aFunction(Q[t])||aFunction(i[t]):Q[t]&&Q[t][r]||i[t]&&i[t][r]},K=Math.ceil,Z=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?Z:K)(t)},J=Math.min,toLength=function(t){return t>0?J(toInteger(t),9007199254740991):0},tt=Math.max,et=Math.min,toAbsoluteIndex=function(t,r){var i=toInteger(t);return i<0?tt(i+r,0):et(i,r)},createMethod=function(t){return function(r,i,o){var a,u=toIndexedObject(r),l=toLength(u.length),h=toAbsoluteIndex(o,l);if(t&&i!=i){for(;l>h;)if((a=u[h++])!=a)return!0}else for(;l>h;h++)if((t||h in u)&&u[h]===i)return t||h||0;return!t&&-1}},rt={includes:createMethod(!0),indexOf:createMethod(!1)},nt=rt.indexOf,objectKeysInternal=function(t,r){var i,o=toIndexedObject(t),a=0,u=[];for(i in o)!has(V,i)&&has(o,i)&&u.push(i);for(;r.length>a;)has(o,i=r[a++])&&(~nt(u,i)||u.push(i));return u},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ot=it.concat("length","prototype"),at={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,ot)}},st={f:Object.getOwnPropertySymbols},ut=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var r=at.f(anObject(t)),i=st.f;return i?r.concat(i(t)):r},copyConstructorProperties=function(t,r){for(var i=ut(r),o=k.f,a=S.f,u=0;u<i.length;u++){var l=i[u];has(t,l)||o(t,l,a(r,l))}},ct=/#|\.prototype\./,isForced=function(t,r){var i=ft[lt(t)];return i==pt||i!=ht&&("function"==typeof r?fails(r):!!r)},lt=isForced.normalize=function(t){return String(t).replace(ct,".").toLowerCase()},ft=isForced.data={},ht=isForced.NATIVE="N",pt=isForced.POLYFILL="P",yt=isForced,gt=S.f,_export=function(t,r){var o,a,u,l,h,p=t.target,y=t.global,g=t.stat;if(o=y?i:g?i[p]||setGlobal(p,{}):(i[p]||{}).prototype)for(a in r){if(l=r[a],u=t.noTargetGet?(h=gt(o,a))&&h.value:o[a],!yt(y?a:p+(g?".":"#")+a,t.forced)&&void 0!==u){if(typeof l==typeof u)continue;copyConstructorProperties(l,u)}(t.sham||u&&u.sham)&&E(l,"sham",!0),Y(o,a,l,t)}},vt=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},toObject=function(t){return Object(requireObjectCoercible(t))},createProperty=function(t,r,i){var o=toPrimitive(r);o in t?k.f(t,o,createPropertyDescriptor(0,i)):t[o]=i},dt=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),mt=dt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xt=D("wks"),bt=i.Symbol,St=mt?bt:bt&&bt.withoutSetter||uid,wellKnownSymbol=function(t){return has(xt,t)||(dt&&has(bt,t)?xt[t]=bt[t]:xt[t]=St("Symbol."+t)),xt[t]},wt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,r){var i;return vt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!vt(i.prototype)?isObject(i)&&null===(i=i[wt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===r?0:r)},kt=getBuiltIn("navigator","userAgent")||"",Et=i.process,Pt=Et&&Et.versions,Rt=Pt&&Pt.v8;Rt?H=(W=Rt.split("."))[0]+W[1]:kt&&(!(W=kt.match(/Edge\/(\d+)/))||W[1]>=74)&&(W=kt.match(/Chrome\/(\d+)/))&&(H=W[1]);var Ct=H&&+H,At=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return Ct>=51||!fails((function(){var r=[];return(r.constructor={})[At]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},Tt=wellKnownSymbol("isConcatSpreadable"),_t=9007199254740991,Mt="Maximum allowed index exceeded",Ot=Ct>=51||!fails((function(){var t=[];return t[Tt]=!1,t.concat()[0]!==t})),Nt=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var r=t[Tt];return void 0!==r?!!r:vt(t)};_export({target:"Array",proto:!0,forced:!Ot||!Nt},{concat:function concat(t){var r,i,o,a,u,l=toObject(this),h=arraySpeciesCreate(l,0),p=0;for(r=-1,o=arguments.length;r<o;r++)if(isConcatSpreadable(u=-1===r?l:arguments[r])){if(p+(a=toLength(u.length))>_t)throw TypeError(Mt);for(i=0;i<a;i++,p++)i in u&&createProperty(h,p,u[i])}else{if(p>=_t)throw TypeError(Mt);createProperty(h,p++,u)}return h.length=p,h}});var Dt,Lt=Object.keys||function keys(t){return objectKeysInternal(t,it)},$t=o?Object.defineProperties:function defineProperties(t,r){anObject(t);for(var i,o=Lt(r),a=o.length,u=0;a>u;)k.f(t,i=o[u++],r[i]);return t},It=getBuiltIn("document","documentElement"),Ft=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{Dt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,r;NullProtoObject=Dt?function(t){t.write(scriptTag("")),t.close();var r=t.parentWindow.Object;return t=null,r}(Dt):((r=documentCreateElement("iframe")).style.display="none",It.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var i=it.length;i--;)delete NullProtoObject.prototype[it[i]];return NullProtoObject()};V[Ft]=!0;var Vt=Object.create||function create(t,r){var i;return null!==t?(EmptyConstructor.prototype=anObject(t),i=new EmptyConstructor,EmptyConstructor.prototype=null,i[Ft]=t):i=NullProtoObject(),void 0===r?i:$t(i,r)},jt=wellKnownSymbol("unscopables"),Bt=Array.prototype;null==Bt[jt]&&k.f(Bt,jt,{configurable:!0,value:Vt(null)});var Gt,zt,Ut,addToUnscopables=function(t){Bt[jt][t]=!0},qt={},Wt=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ht=sharedKey("IE_PROTO"),Xt=Object.prototype,Yt=Wt?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Ht)?t[Ht]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Xt:null},Qt=wellKnownSymbol("iterator"),Kt=!1;[].keys&&("next"in(Ut=[].keys())?(zt=Yt(Yt(Ut)))!==Object.prototype&&(Gt=zt):Kt=!0),null==Gt&&(Gt={}),has(Gt,Qt)||E(Gt,Qt,(function(){return this}));var Zt={IteratorPrototype:Gt,BUGGY_SAFARI_ITERATORS:Kt},Jt=k.f,te=wellKnownSymbol("toStringTag"),setToStringTag=function(t,r,i){t&&!has(t=i?t:t.prototype,te)&&Jt(t,te,{configurable:!0,value:r})},ee=Zt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,r,i){var o=r+" Iterator";return t.prototype=Vt(ee,{next:createPropertyDescriptor(1,i)}),setToStringTag(t,o,!1),qt[o]=returnThis$1,t},re=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),r=i instanceof Array}catch(t){}return function setPrototypeOf(i,o){return anObject(i),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(o),r?t.call(i,o):i.__proto__=o,i}}():void 0),ne=Zt.IteratorPrototype,ie=Zt.BUGGY_SAFARI_ITERATORS,oe=wellKnownSymbol("iterator"),ae="keys",se="values",ue="entries",returnThis$2=function(){return this},defineIterator=function(t,r,i,o,a,u,l){createIteratorConstructor(i,r,o);var h,p,y,getIterationMethod=function(t){if(t===a&&b)return b;if(!ie&&t in d)return d[t];switch(t){case ae:return function keys(){return new i(this,t)};case se:return function values(){return new i(this,t)};case ue:return function entries(){return new i(this,t)}}return function(){return new i(this)}},g=r+" Iterator",v=!1,d=t.prototype,x=d[oe]||d["@@iterator"]||a&&d[a],b=!ie&&x||getIterationMethod(a),S="Array"==r&&d.entries||x;if(S&&(h=Yt(S.call(new t)),ne!==Object.prototype&&h.next&&(Yt(h)!==ne&&(re?re(h,ne):"function"!=typeof h[oe]&&E(h,oe,returnThis$2)),setToStringTag(h,g,!0))),a==se&&x&&x.name!==se&&(v=!0,b=function values(){return x.call(this)}),d[oe]!==b&&E(d,oe,b),qt[r]=b,a)if(p={values:getIterationMethod(se),keys:u?b:getIterationMethod(ae),entries:getIterationMethod(ue)},l)for(y in p)(ie||v||!(y in d))&&Y(d,y,p[y]);else _export({target:r,proto:!0,forced:ie||v},p);return p},ce="Array Iterator",le=X.set,fe=X.getterFor(ce),he=defineIterator(Array,"Array",(function(t,r){le(this,{type:ce,target:toIndexedObject(t),index:0,kind:r})}),(function(){var t=fe(this),r=t.target,i=t.kind,o=t.index++;return!r||o>=r.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:o,done:!1}:"values"==i?{value:r[o],done:!1}:{value:[o,r[o]],done:!1}}),"values");qt.Arguments=qt.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var pe={};pe[wellKnownSymbol("toStringTag")]="z";var ye="[object z]"===String(pe),ge=wellKnownSymbol("toStringTag"),ve="Arguments"==classofRaw(function(){return arguments}()),de=ye?classofRaw:function(t){var r,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=Object(t),ge))?i:ve?classofRaw(r):"Object"==(o=classofRaw(r))&&"function"==typeof r.callee?"Arguments":o},me=ye?{}.toString:function toString(){return"[object "+de(this)+"]"};ye||Y(Object.prototype,"toString",me,{unsafe:!0});var xe=i.Promise,redefineAll=function(t,r,i){for(var o in r)Y(t,o,r[o],i);return t},be=wellKnownSymbol("species"),setSpecies=function(t){var r=getBuiltIn(t),i=k.f;o&&r&&!r[be]&&i(r,be,{configurable:!0,get:function(){return this}})},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},anInstance=function(t,r,i){if(!(t instanceof r))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t},Se=wellKnownSymbol("iterator"),we=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(qt.Array===t||we[Se]===t)},functionBindContext=function(t,r,i){if(aFunction$1(t),void 0===r)return t;switch(i){case 0:return function(){return t.call(r)};case 1:return function(i){return t.call(r,i)};case 2:return function(i,o){return t.call(r,i,o)};case 3:return function(i,o,a){return t.call(r,i,o,a)}}return function(){return t.apply(r,arguments)}},ke=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[ke]||t["@@iterator"]||qt[de(t)]},callWithSafeIterationClosing=function(t,r,i,o){try{return o?r(anObject(i)[0],i[1]):r(i)}catch(r){var a=t.return;throw void 0!==a&&anObject(a.call(t)),r}},Ee=createCommonjsModule((function(t){var Result=function(t,r){this.stopped=t,this.result=r};(t.exports=function(t,r,i,o,a){var u,l,h,p,y,g,v,d=functionBindContext(r,i,o?2:1);if(a)u=t;else{if("function"!=typeof(l=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(l)){for(h=0,p=toLength(t.length);p>h;h++)if((y=o?d(anObject(v=t[h])[0],v[1]):d(t[h]))&&y instanceof Result)return y;return new Result(!1)}u=l.call(t)}for(g=u.next;!(v=g.call(u)).done;)if("object"==typeof(y=callWithSafeIterationClosing(u,d,v.value,o))&&y&&y instanceof Result)return y;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),Pe=wellKnownSymbol("iterator"),Re=!1;try{var Ce=0,Ae={next:function(){return{done:!!Ce++}},return:function(){Re=!0}};Ae[Pe]=function(){return this},Array.from(Ae,(function(){throw 2}))}catch(t){}var Te,_e,Me,checkCorrectnessOfIteration=function(t,r){if(!r&&!Re)return!1;var i=!1;try{var o={};o[Pe]=function(){return{next:function(){return{done:i=!0}}}},t(o)}catch(t){}return i},Oe=wellKnownSymbol("species"),speciesConstructor=function(t,r){var i,o=anObject(t).constructor;return void 0===o||null==(i=anObject(o)[Oe])?r:aFunction$1(i)},Ne=/(iphone|ipod|ipad).*applewebkit/i.test(kt),De=i.location,Le=i.setImmediate,$e=i.clearImmediate,Ie=i.process,Fe=i.MessageChannel,Ve=i.Dispatch,je=0,Be={},Ge="onreadystatechange",run=function(t){if(Be.hasOwnProperty(t)){var r=Be[t];delete Be[t],r()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){i.postMessage(t+"",De.protocol+"//"+De.host)};Le&&$e||(Le=function setImmediate(t){for(var r=[],i=1;arguments.length>i;)r.push(arguments[i++]);return Be[++je]=function(){("function"==typeof t?t:Function(t)).apply(void 0,r)},Te(je),je},$e=function clearImmediate(t){delete Be[t]},"process"==classofRaw(Ie)?Te=function(t){Ie.nextTick(runner(t))}:Ve&&Ve.now?Te=function(t){Ve.now(runner(t))}:Fe&&!Ne?(Me=(_e=new Fe).port2,_e.port1.onmessage=listener,Te=functionBindContext(Me.postMessage,Me,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||fails(post)||"file:"===De.protocol?Te=Ge in documentCreateElement("script")?function(t){It.appendChild(documentCreateElement("script")).onreadystatechange=function(){It.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(Te=post,i.addEventListener("message",listener,!1)));var ze,Ue,qe,We,He,Xe,Ye,Qe,Ke={set:Le,clear:$e},Ze=S.f,Je=Ke.set,tr=i.MutationObserver||i.WebKitMutationObserver,er=i.process,rr=i.Promise,nr="process"==classofRaw(er),ir=Ze(i,"queueMicrotask"),or=ir&&ir.value;or||(ze=function(){var t,r;for(nr&&(t=er.domain)&&t.exit();Ue;){r=Ue.fn,Ue=Ue.next;try{r()}catch(t){throw Ue?We():qe=void 0,t}}qe=void 0,t&&t.enter()},nr?We=function(){er.nextTick(ze)}:tr&&!Ne?(He=!0,Xe=document.createTextNode(""),new tr(ze).observe(Xe,{characterData:!0}),We=function(){Xe.data=He=!He}):rr&&rr.resolve?(Ye=rr.resolve(void 0),Qe=Ye.then,We=function(){Qe.call(Ye,ze)}):We=function(){Je.call(i,ze)});var ar,sr,ur,cr,lr=or||function(t){var r={fn:t,next:void 0};qe&&(qe.next=r),Ue||(Ue=r,We()),qe=r},PromiseCapability=function(t){var r,i;this.promise=new t((function(t,o){if(void 0!==r||void 0!==i)throw TypeError("Bad Promise constructor");r=t,i=o})),this.resolve=aFunction$1(r),this.reject=aFunction$1(i)},fr={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,r){if(anObject(t),isObject(r)&&r.constructor===t)return r;var i=fr.f(t);return(0,i.resolve)(r),i.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},hr=Ke.set,pr=wellKnownSymbol("species"),yr="Promise",gr=X.get,vr=X.set,dr=X.getterFor(yr),mr=xe,xr=i.TypeError,br=i.document,Sr=i.process,wr=getBuiltIn("fetch"),kr=fr.f,Er=kr,Pr="process"==classofRaw(Sr),Rr=!!(br&&br.createEvent&&i.dispatchEvent),Cr="unhandledrejection",Ar=yt(yr,(function(){if(!(M(mr)!==String(mr))){if(66===Ct)return!0;if(!Pr&&"function"!=typeof PromiseRejectionEvent)return!0}if(Ct>=51&&/native code/.test(mr))return!1;var t=mr.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[pr]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),Tr=Ar||!checkCorrectnessOfIteration((function(t){mr.all(t).catch((function(){}))})),isThenable=function(t){var r;return!(!isObject(t)||"function"!=typeof(r=t.then))&&r},notify$1=function(t,r,i){if(!r.notified){r.notified=!0;var o=r.reactions;lr((function(){for(var a=r.value,u=1==r.state,l=0;o.length>l;){var h,p,y,g=o[l++],v=u?g.ok:g.fail,d=g.resolve,x=g.reject,b=g.domain;try{v?(u||(2===r.rejection&&onHandleUnhandled(t,r),r.rejection=1),!0===v?h=a:(b&&b.enter(),h=v(a),b&&(b.exit(),y=!0)),h===g.promise?x(xr("Promise-chain cycle")):(p=isThenable(h))?p.call(h,d,x):d(h)):x(a)}catch(t){b&&!y&&b.exit(),x(t)}}r.reactions=[],r.notified=!1,i&&!r.rejection&&onUnhandled(t,r)}))}},dispatchEvent=function(t,r,o){var a,u;Rr?((a=br.createEvent("Event")).promise=r,a.reason=o,a.initEvent(t,!1,!0),i.dispatchEvent(a)):a={promise:r,reason:o},(u=i["on"+t])?u(a):t===Cr&&function(t,r){var o=i.console;o&&o.error&&(1===arguments.length?o.error(t):o.error(t,r))}("Unhandled promise rejection",o)},onUnhandled=function(t,r){hr.call(i,(function(){var i,o=r.value;if(isUnhandled(r)&&(i=perform((function(){Pr?Sr.emit("unhandledRejection",o,t):dispatchEvent(Cr,t,o)})),r.rejection=Pr||isUnhandled(r)?2:1,i.error))throw i.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,r){hr.call(i,(function(){Pr?Sr.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,r.value)}))},bind=function(t,r,i,o){return function(a){t(r,i,a,o)}},internalReject=function(t,r,i,o){r.done||(r.done=!0,o&&(r=o),r.value=i,r.state=2,notify$1(t,r,!0))},internalResolve=function(t,r,i,o){if(!r.done){r.done=!0,o&&(r=o);try{if(t===i)throw xr("Promise can't be resolved itself");var a=isThenable(i);a?lr((function(){var o={done:!1};try{a.call(i,bind(internalResolve,t,o,r),bind(internalReject,t,o,r))}catch(i){internalReject(t,o,i,r)}})):(r.value=i,r.state=1,notify$1(t,r,!1))}catch(i){internalReject(t,{done:!1},i,r)}}};Ar&&(mr=function Promise(t){anInstance(this,mr,yr),aFunction$1(t),ar.call(this);var r=gr(this);try{t(bind(internalResolve,this,r),bind(internalReject,this,r))}catch(t){internalReject(this,r,t)}},(ar=function Promise(t){vr(this,{type:yr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(mr.prototype,{then:function then(t,r){var i=dr(this),o=kr(speciesConstructor(this,mr));return o.ok="function"!=typeof t||t,o.fail="function"==typeof r&&r,o.domain=Pr?Sr.domain:void 0,i.parent=!0,i.reactions.push(o),0!=i.state&¬ify$1(this,i,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),sr=function(){var t=new ar,r=gr(t);this.promise=t,this.resolve=bind(internalResolve,t,r),this.reject=bind(internalReject,t,r)},fr.f=kr=function(t){return t===mr||t===ur?new sr(t):Er(t)},"function"==typeof xe&&(cr=xe.prototype.then,Y(xe.prototype,"then",(function then(t,r){var i=this;return new mr((function(t,r){cr.call(i,t,r)})).then(t,r)}),{unsafe:!0}),"function"==typeof wr&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(mr,wr.apply(i,arguments))}}))),_export({global:!0,wrap:!0,forced:Ar},{Promise:mr}),setToStringTag(mr,yr,!1),setSpecies(yr),ur=getBuiltIn(yr),_export({target:yr,stat:!0,forced:Ar},{reject:function reject(t){var r=kr(this);return r.reject.call(void 0,t),r.promise}}),_export({target:yr,stat:!0,forced:Ar},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:yr,stat:!0,forced:Tr},{all:function all(t){var r=this,i=kr(r),o=i.resolve,a=i.reject,u=perform((function(){var i=aFunction$1(r.resolve),u=[],l=0,h=1;Ee(t,(function(t){var p=l++,y=!1;u.push(void 0),h++,i.call(r,t).then((function(t){y||(y=!0,u[p]=t,--h||o(u))}),a)})),--h||o(u)}));return u.error&&a(u.value),i.promise},race:function race(t){var r=this,i=kr(r),o=i.reject,a=perform((function(){var a=aFunction$1(r.resolve);Ee(t,(function(t){a.call(r,t).then(i.resolve,o)}))}));return a.error&&o(a.value),i.promise}});var regexpFlags=function(){var t=anObject(this),r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.sticky&&(r+="y"),r};function RE(t,r){return RegExp(t,r)}var _r,Mr,Or={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Nr=RegExp.prototype.exec,Dr=String.prototype.replace,Lr=Nr,$r=(_r=/a/,Mr=/b*/g,Nr.call(_r,"a"),Nr.call(Mr,"a"),0!==_r.lastIndex||0!==Mr.lastIndex),Ir=Or.UNSUPPORTED_Y||Or.BROKEN_CARET,Fr=void 0!==/()??/.exec("")[1];($r||Fr||Ir)&&(Lr=function exec(t){var r,i,o,a,u=this,l=Ir&&u.sticky,h=regexpFlags.call(u),p=u.source,y=0,g=t;return l&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(t).slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==t[u.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,y++),i=new RegExp("^(?:"+p+")",h)),Fr&&(i=new RegExp("^"+p+"$(?!\\s)",h)),$r&&(r=u.lastIndex),o=Nr.call(l?i:u,g),l?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:$r&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Fr&&o&&o.length>1&&Dr.call(o[0],i,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o});var Vr=Lr;_export({target:"RegExp",proto:!0,forced:/./.exec!==Vr},{exec:Vr});var createMethod$1=function(t){return function(r,i){var o,a,u=String(requireObjectCoercible(r)),l=toInteger(i),h=u.length;return l<0||l>=h?t?"":void 0:(o=u.charCodeAt(l))<55296||o>56319||l+1===h||(a=u.charCodeAt(l+1))<56320||a>57343?t?u.charAt(l):o:t?u.slice(l,l+2):a-56320+(o-55296<<10)+65536}},jr={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},Br=jr.charAt,Gr="String Iterator",zr=X.set,Ur=X.getterFor(Gr);defineIterator(String,"String",(function(t){zr(this,{type:Gr,string:String(t),index:0})}),(function next(){var t,r=Ur(this),i=r.string,o=r.index;return o>=i.length?{value:void 0,done:!0}:(t=Br(i,o),r.index+=t.length,{value:t,done:!1})}));var qr=wellKnownSymbol("species"),Wr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Hr="$0"==="a".replace(/./,"$0"),Xr=wellKnownSymbol("replace"),Yr=!!/./[Xr]&&""===/./[Xr]("a","$0"),Qr=!fails((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),fixRegexpWellKnownSymbolLogic=function(t,r,i,o){var a=wellKnownSymbol(t),u=!fails((function(){var r={};return r[a]=function(){return 7},7!=""[t](r)})),l=u&&!fails((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[qr]=function(){return i},i.flags="",i[a]=/./[a]),i.exec=function(){return r=!0,null},i[a](""),!r}));if(!u||!l||"replace"===t&&(!Wr||!Hr||Yr)||"split"===t&&!Qr){var h=/./[a],p=i(a,""[t],(function(t,r,i,o,a){return r.exec===Vr?u&&!a?{done:!0,value:h.call(r,i,o)}:{done:!0,value:t.call(i,r,o)}:{done:!1}}),{REPLACE_KEEPS_$0:Hr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Yr}),y=p[0],g=p[1];Y(String.prototype,t,y),Y(RegExp.prototype,a,2==r?function(t,r){return g.call(t,this,r)}:function(t){return g.call(t,this)})}o&&E(RegExp.prototype[a],"sham",!0)},Kr=jr.charAt,advanceStringIndex=function(t,r,i){return r+(i?Kr(t,r).length:1)},regexpExecAbstract=function(t,r){var i=t.exec;if("function"==typeof i){var o=i.call(t,r);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return Vr.call(t,r)},Zr=Math.max,Jr=Math.min,tn=Math.floor,en=/\$([$&'`]|\d\d?|<[^>]*>)/g,rn=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,r,i,o){var a=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,u=o.REPLACE_KEEPS_$0,l=a?"$":"$0";return[function replace(i,o){var a=requireObjectCoercible(this),u=null==i?void 0:i[t];return void 0!==u?u.call(i,a,o):r.call(String(a),i,o)},function(t,o){if(!a&&u||"string"==typeof o&&-1===o.indexOf(l)){var h=i(r,t,this,o);if(h.done)return h.value}var p=anObject(t),y=String(this),g="function"==typeof o;g||(o=String(o));var v=p.global;if(v){var d=p.unicode;p.lastIndex=0}for(var x=[];;){var b=regexpExecAbstract(p,y);if(null===b)break;if(x.push(b),!v)break;""===String(b[0])&&(p.lastIndex=advanceStringIndex(y,toLength(p.lastIndex),d))}for(var S,w="",k=0,E=0;E<x.length;E++){b=x[E];for(var P=String(b[0]),R=Zr(Jr(toInteger(b.index),y.length),0),C=[],A=1;A<b.length;A++)C.push(void 0===(S=b[A])?S:String(S));var T=b.groups;if(g){var _=[P].concat(C,R,y);void 0!==T&&_.push(T);var M=String(o.apply(void 0,_))}else M=getSubstitution(P,y,R,C,T,o);R>=k&&(w+=y.slice(k,R)+M,k=R+P.length)}return w+y.slice(k)}];function getSubstitution(t,i,o,a,u,l){var h=o+t.length,p=a.length,y=rn;return void 0!==u&&(u=toObject(u),y=en),r.call(l,y,(function(r,l){var y;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,o);case"'":return i.slice(h);case"<":y=u[l.slice(1,-1)];break;default:var g=+l;if(0===g)return r;if(g>p){var v=tn(g/10);return 0===v?r:v<=p?void 0===a[v-1]?l.charAt(1):a[v-1]+l.charAt(1):r}y=a[g-1]}return void 0===y?"":y}))}}));var nn={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},on=wellKnownSymbol("iterator"),an=wellKnownSymbol("toStringTag"),sn=he.values;for(var un in nn){var cn=i[un],ln=cn&&cn.prototype;if(ln){if(ln[on]!==sn)try{E(ln,on,sn)}catch(t){ln[on]=sn}if(ln[an]||E(ln,an,un),nn[un])for(var fn in he)if(ln[fn]!==he[fn])try{E(ln,fn,he[fn])}catch(t){ln[fn]=he[fn]}}}var hn=wellKnownSymbol("iterator"),pn=!fails((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,i="";return t.pathname="c%20d",r.forEach((function(t,o){r.delete("b"),i+=o+t})),!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[hn]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host})),yn=Object.assign,gn=Object.defineProperty,vn=!yn||fails((function(){if(o&&1!==yn({b:1},yn(gn({},"a",{enumerable:!0,get:function(){gn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},i=Symbol(),a="abcdefghijklmnopqrst";return t[i]=7,a.split("").forEach((function(t){r[t]=t})),7!=yn({},t)[i]||Lt(yn({},r)).join("")!=a}))?function assign(t,r){for(var i=toObject(t),a=arguments.length,u=1,h=st.f,p=l.f;a>u;)for(var g,v=y(arguments[u++]),d=h?Lt(v).concat(h(v)):Lt(v),x=d.length,b=0;x>b;)g=d[b++],o&&!p.call(v,g)||(i[g]=v[g]);return i}:yn,dn=function from(t){var r,i,o,a,u,l,h=toObject(t),p="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,v=void 0!==g,d=getIteratorMethod(h),x=0;if(v&&(g=functionBindContext(g,y>2?arguments[2]:void 0,2)),null==d||p==Array&&isArrayIteratorMethod(d))for(i=new p(r=toLength(h.length));r>x;x++)l=v?g(h[x],x):h[x],createProperty(i,x,l);else for(u=(a=d.call(h)).next,i=new p;!(o=u.call(a)).done;x++)l=v?callWithSafeIterationClosing(a,g,[o.value,x],!0):o.value,createProperty(i,x,l);return i.length=x,i},mn=2147483647,xn=/[^\0-\u007E]/,bn=/[.\u3002\uFF0E\uFF61]/g,Sn="Overflow: input needs wider integers to process",wn=Math.floor,kn=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,i){var o=0;for(t=i?wn(t/700):t>>1,t+=wn(t/r);t>455;o+=36)t=wn(t/35);return wn(o+36*t/(t+38))},encode=function(t){var r,i,o=[],a=(t=function(t){for(var r=[],i=0,o=t.length;i<o;){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<o){var u=t.charCodeAt(i++);56320==(64512&u)?r.push(((1023&a)<<10)+(1023&u)+65536):(r.push(a),i--)}else r.push(a)}return r}(t)).length,u=128,l=0,h=72;for(r=0;r<t.length;r++)(i=t[r])<128&&o.push(kn(i));var p=o.length,y=p;for(p&&o.push("-");y<a;){var g=mn;for(r=0;r<t.length;r++)(i=t[r])>=u&&i<g&&(g=i);var v=y+1;if(g-u>wn((mn-l)/v))throw RangeError(Sn);for(l+=(g-u)*v,u=g,r=0;r<t.length;r++){if((i=t[r])<u&&++l>mn)throw RangeError(Sn);if(i==u){for(var d=l,x=36;;x+=36){var b=x<=h?1:x>=h+26?26:x-h;if(d<b)break;var S=d-b,w=36-b;o.push(kn(digitToBasic(b+S%w))),d=wn(S/w)}o.push(kn(digitToBasic(d))),h=adapt(l,v,y==p),l=0,++y}}++l,++u}return o.join("")},getIterator=function(t){var r=getIteratorMethod(t);if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return anObject(r.call(t))},En=getBuiltIn("fetch"),Pn=getBuiltIn("Headers"),Rn=wellKnownSymbol("iterator"),Cn="URLSearchParams",An="URLSearchParamsIterator",Tn=X.set,_n=X.getterFor(Cn),Mn=X.getterFor(An),On=/\+/g,Nn=Array(4),percentSequence=function(t){return Nn[t-1]||(Nn[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(r){return t}},deserialize=function(t){var r=t.replace(On," "),i=4;try{return decodeURIComponent(r)}catch(t){for(;i;)r=r.replace(percentSequence(i--),percentDecode);return r}},Dn=/[!'()~]|%20/g,Ln={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return Ln[t]},serialize=function(t){return encodeURIComponent(t).replace(Dn,replacer)},parseSearchParams=function(t,r){if(r)for(var i,o,a=r.split("&"),u=0;u<a.length;)(i=a[u++]).length&&(o=i.split("="),t.push({key:deserialize(o.shift()),value:deserialize(o.join("="))}))},updateSearchParams=function(t){this.entries.length=0,parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,r){if(t<r)throw TypeError("Not enough arguments")},$n=createIteratorConstructor((function Iterator(t,r){Tn(this,{type:An,iterator:getIterator(_n(t).entries),kind:r})}),"Iterator",(function next(){var t=Mn(this),r=t.kind,i=t.iterator.next(),o=i.value;return i.done||(i.value="keys"===r?o.key:"values"===r?o.value:[o.key,o.value]),i})),In=function URLSearchParams(){anInstance(this,In,Cn);var t,r,i,o,a,u,l,h,p,y=arguments.length>0?arguments[0]:void 0,g=this,v=[];if(Tn(g,{type:Cn,entries:v,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==y)if(isObject(y))if("function"==typeof(t=getIteratorMethod(y)))for(i=(r=t.call(y)).next;!(o=i.call(r)).done;){if((l=(u=(a=getIterator(anObject(o.value))).next).call(a)).done||(h=u.call(a)).done||!u.call(a).done)throw TypeError("Expected sequence with length 2");v.push({key:l.value+"",value:h.value+""})}else for(p in y)has(y,p)&&v.push({key:p,value:y[p]+""});else parseSearchParams(v,"string"==typeof y?"?"===y.charAt(0)?y.slice(1):y:y+"")},Fn=In.prototype;redefineAll(Fn,{append:function append(t,r){validateArgumentsLength(arguments.length,2);var i=_n(this);i.entries.push({key:t+"",value:r+""}),i.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var r=_n(this),i=r.entries,o=t+"",a=0;a<i.length;)i[a].key===o?i.splice(a,1):a++;r.updateURL()},get:function get(t){validateArgumentsLength(arguments.length,1);for(var r=_n(this).entries,i=t+"",o=0;o<r.length;o++)if(r[o].key===i)return r[o].value;return null},getAll:function getAll(t){validateArgumentsLength(arguments.length,1);for(var r=_n(this).entries,i=t+"",o=[],a=0;a<r.length;a++)r[a].key===i&&o.push(r[a].value);return o},has:function has(t){validateArgumentsLength(arguments.length,1);for(var r=_n(this).entries,i=t+"",o=0;o<r.length;)if(r[o++].key===i)return!0;return!1},set:function set(t,r){validateArgumentsLength(arguments.length,1);for(var i,o=_n(this),a=o.entries,u=!1,l=t+"",h=r+"",p=0;p<a.length;p++)(i=a[p]).key===l&&(u?a.splice(p--,1):(u=!0,i.value=h));u||a.push({key:l,value:h}),o.updateURL()},sort:function sort(){var t,r,i,o=_n(this),a=o.entries,u=a.slice();for(a.length=0,i=0;i<u.length;i++){for(t=u[i],r=0;r<i;r++)if(a[r].key>t.key){a.splice(r,0,t);break}r===i&&a.push(t)}o.updateURL()},forEach:function forEach(t){for(var r,i=_n(this).entries,o=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3),a=0;a<i.length;)o((r=i[a++]).value,r.key,this)},keys:function keys(){return new $n(this,"keys")},values:function values(){return new $n(this,"values")},entries:function entries(){return new $n(this,"entries")}},{enumerable:!0}),Y(Fn,Rn,Fn.entries),Y(Fn,"toString",(function toString(){for(var t,r=_n(this).entries,i=[],o=0;o<r.length;)t=r[o++],i.push(serialize(t.key)+"="+serialize(t.value));return i.join("&")}),{enumerable:!0}),setToStringTag(In,Cn),_export({global:!0,forced:!pn},{URLSearchParams:In}),pn||"function"!=typeof En||"function"!=typeof Pn||_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){var r,i,o,a=[t];return arguments.length>1&&(isObject(r=arguments[1])&&(i=r.body,de(i)===Cn&&((o=r.headers?new Pn(r.headers):new Pn).has("content-type")||o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),r=Vt(r,{body:createPropertyDescriptor(0,String(i)),headers:createPropertyDescriptor(0,o)}))),a.push(r)),En.apply(this,a)}});var Vn,jn={URLSearchParams:In,getState:_n},Bn=jr.codeAt,Gn=i.URL,zn=jn.URLSearchParams,Un=jn.getState,qn=X.set,Wn=X.getterFor("URL"),Hn=Math.floor,Xn=Math.pow,Yn="Invalid scheme",Qn="Invalid host",Kn="Invalid port",Zn=/[A-Za-z]/,Jn=/[\d+-.A-Za-z]/,ti=/\d/,ei=/^(0x|0X)/,ri=/^[0-7]+$/,ni=/^\d+$/,ii=/^[\dA-Fa-f]+$/,oi=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,ai=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,si=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,ui=/[\u0009\u000A\u000D]/g,parseHost=function(t,r){var i,o,a;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return Qn;if(!(i=parseIPv6(r.slice(1,-1))))return Qn;t.host=i}else if(isSpecial(t)){if(r=function(t){var r,i,o=[],a=t.toLowerCase().replace(bn,".").split(".");for(r=0;r<a.length;r++)i=a[r],o.push(xn.test(i)?"xn--"+encode(i):i);return o.join(".")}(r),oi.test(r))return Qn;if(null===(i=parseIPv4(r)))return Qn;t.host=i}else{if(ai.test(r))return Qn;for(i="",o=dn(r),a=0;a<o.length;a++)i+=percentEncode(o[a],ci);t.host=i}},parseIPv4=function(t){var r,i,o,a,u,l,h,p=t.split(".");if(p.length&&""==p[p.length-1]&&p.pop(),(r=p.length)>4)return t;for(i=[],o=0;o<r;o++){if(""==(a=p[o]))return t;if(u=10,a.length>1&&"0"==a.charAt(0)&&(u=ei.test(a)?16:8,a=a.slice(8==u?1:2)),""===a)l=0;else{if(!(10==u?ni:8==u?ri:ii).test(a))return t;l=parseInt(a,u)}i.push(l)}for(o=0;o<r;o++)if(l=i[o],o==r-1){if(l>=Xn(256,5-r))return null}else if(l>255)return null;for(h=i.pop(),o=0;o<i.length;o++)h+=i[o]*Xn(256,3-o);return h},parseIPv6=function(t){var r,i,o,a,u,l,h,p=[0,0,0,0,0,0,0,0],y=0,g=null,v=0,char=function(){return t.charAt(v)};if(":"==char()){if(":"!=t.charAt(1))return;v+=2,g=++y}for(;char();){if(8==y)return;if(":"!=char()){for(r=i=0;i<4&&ii.test(char());)r=16*r+parseInt(char(),16),v++,i++;if("."==char()){if(0==i)return;if(v-=i,y>6)return;for(o=0;char();){if(a=null,o>0){if(!("."==char()&&o<4))return;v++}if(!ti.test(char()))return;for(;ti.test(char());){if(u=parseInt(char(),10),null===a)a=u;else{if(0==a)return;a=10*a+u}if(a>255)return;v++}p[y]=256*p[y]+a,2!=++o&&4!=o||y++}if(4!=o)return;break}if(":"==char()){if(v++,!char())return}else if(char())return;p[y++]=r}else{if(null!==g)return;v++,g=++y}}if(null!==g)for(l=y-g,y=7;0!=y&&l>0;)h=p[y],p[y--]=p[g+l-1],p[g+--l]=h;else if(8!=y)return;return p},serializeHost=function(t){var r,i,o,a;if("number"==typeof t){for(r=[],i=0;i<4;i++)r.unshift(t%256),t=Hn(t/256);return r.join(".")}if("object"==typeof t){for(r="",o=function(t){for(var r=null,i=1,o=null,a=0,u=0;u<8;u++)0!==t[u]?(a>i&&(r=o,i=a),o=null,a=0):(null===o&&(o=u),++a);return a>i&&(r=o,i=a),r}(t),i=0;i<8;i++)a&&0===t[i]||(a&&(a=!1),o===i?(r+=i?":":"::",a=!0):(r+=t[i].toString(16),i<7&&(r+=":")));return"["+r+"]"}return t},ci={},li=vn({},ci,{" ":1,'"':1,"<":1,">":1,"`":1}),fi=vn({},li,{"#":1,"?":1,"{":1,"}":1}),hi=vn({},fi,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=Bn(t,0);return i>32&&i<127&&!has(r,t)?t:encodeURIComponent(t)},pi={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(pi,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,r){var i;return 2==t.length&&Zn.test(t.charAt(0))&&(":"==(i=t.charAt(1))||!r&&"|"==i)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(r=t.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(t){var r=t.path,i=r.length;!i||"file"==t.scheme&&1==i&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},yi={},gi={},vi={},di={},mi={},xi={},bi={},Si={},wi={},ki={},Ei={},Pi={},Ri={},Ci={},Ai={},Ti={},_i={},Mi={},Oi={},Ni={},Di={},parseURL=function(t,r,i,o){var a,u,l,h,p,y=i||yi,g=0,v="",d=!1,x=!1,b=!1;for(i||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,r=r.replace(si,"")),r=r.replace(ui,""),a=dn(r);g<=a.length;){switch(u=a[g],y){case yi:if(!u||!Zn.test(u)){if(i)return Yn;y=vi;continue}v+=u.toLowerCase(),y=gi;break;case gi:if(u&&(Jn.test(u)||"+"==u||"-"==u||"."==u))v+=u.toLowerCase();else{if(":"!=u){if(i)return Yn;v="",y=vi,g=0;continue}if(i&&(isSpecial(t)!=has(pi,v)||"file"==v&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=v,i)return void(isSpecial(t)&&pi[t.scheme]==t.port&&(t.port=null));v="","file"==t.scheme?y=Ci:isSpecial(t)&&o&&o.scheme==t.scheme?y=di:isSpecial(t)?y=Si:"/"==a[g+1]?(y=mi,g++):(t.cannotBeABaseURL=!0,t.path.push(""),y=Oi)}break;case vi:if(!o||o.cannotBeABaseURL&&"#"!=u)return Yn;if(o.cannotBeABaseURL&&"#"==u){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,y=Di;break}y="file"==o.scheme?Ci:xi;continue;case di:if("/"!=u||"/"!=a[g+1]){y=xi;continue}y=wi,g++;break;case mi:if("/"==u){y=ki;break}y=Mi;continue;case xi:if(t.scheme=o.scheme,u==Vn)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==u||"\\"==u&&isSpecial(t))y=bi;else if("?"==u)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",y=Ni;else{if("#"!=u){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),y=Mi;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",y=Di}break;case bi:if(!isSpecial(t)||"/"!=u&&"\\"!=u){if("/"!=u){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,y=Mi;continue}y=ki}else y=wi;break;case Si:if(y=wi,"/"!=u||"/"!=v.charAt(g+1))continue;g++;break;case wi:if("/"!=u&&"\\"!=u){y=ki;continue}break;case ki:if("@"==u){d&&(v="%40"+v),d=!0,l=dn(v);for(var S=0;S<l.length;S++){var w=l[S];if(":"!=w||b){var k=percentEncode(w,hi);b?t.password+=k:t.username+=k}else b=!0}v=""}else if(u==Vn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)){if(d&&""==v)return"Invalid authority";g-=dn(v).length+1,v="",y=Ei}else v+=u;break;case Ei:case Pi:if(i&&"file"==t.scheme){y=Ti;continue}if(":"!=u||x){if(u==Vn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)){if(isSpecial(t)&&""==v)return Qn;if(i&&""==v&&(includesCredentials(t)||null!==t.port))return;if(h=parseHost(t,v))return h;if(v="",y=_i,i)return;continue}"["==u?x=!0:"]"==u&&(x=!1),v+=u}else{if(""==v)return Qn;if(h=parseHost(t,v))return h;if(v="",y=Ri,i==Pi)return}break;case Ri:if(!ti.test(u)){if(u==Vn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)||i){if(""!=v){var E=parseInt(v,10);if(E>65535)return Kn;t.port=isSpecial(t)&&E===pi[t.scheme]?null:E,v=""}if(i)return;y=_i;continue}return Kn}v+=u;break;case Ci:if(t.scheme="file","/"==u||"\\"==u)y=Ai;else{if(!o||"file"!=o.scheme){y=Mi;continue}if(u==Vn)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==u)t.host=o.host,t.path=o.path.slice(),t.query="",y=Ni;else{if("#"!=u){startsWithWindowsDriveLetter(a.slice(g).join(""))||(t.host=o.host,t.path=o.path.slice(),shortenURLsPath(t)),y=Mi;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",y=Di}}break;case Ai:if("/"==u||"\\"==u){y=Ti;break}o&&"file"==o.scheme&&!startsWithWindowsDriveLetter(a.slice(g).join(""))&&(isWindowsDriveLetter(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),y=Mi;continue;case Ti:if(u==Vn||"/"==u||"\\"==u||"?"==u||"#"==u){if(!i&&isWindowsDriveLetter(v))y=Mi;else if(""==v){if(t.host="",i)return;y=_i}else{if(h=parseHost(t,v))return h;if("localhost"==t.host&&(t.host=""),i)return;v="",y=_i}continue}v+=u;break;case _i:if(isSpecial(t)){if(y=Mi,"/"!=u&&"\\"!=u)continue}else if(i||"?"!=u)if(i||"#"!=u){if(u!=Vn&&(y=Mi,"/"!=u))continue}else t.fragment="",y=Di;else t.query="",y=Ni;break;case Mi:if(u==Vn||"/"==u||"\\"==u&&isSpecial(t)||!i&&("?"==u||"#"==u)){if(".."===(p=(p=v).toLowerCase())||"%2e."===p||".%2e"===p||"%2e%2e"===p?(shortenURLsPath(t),"/"==u||"\\"==u&&isSpecial(t)||t.path.push("")):isSingleDot(v)?"/"==u||"\\"==u&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(v)&&(t.host&&(t.host=""),v=v.charAt(0)+":"),t.path.push(v)),v="","file"==t.scheme&&(u==Vn||"?"==u||"#"==u))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==u?(t.query="",y=Ni):"#"==u&&(t.fragment="",y=Di)}else v+=percentEncode(u,fi);break;case Oi:"?"==u?(t.query="",y=Ni):"#"==u?(t.fragment="",y=Di):u!=Vn&&(t.path[0]+=percentEncode(u,ci));break;case Ni:i||"#"!=u?u!=Vn&&("'"==u&&isSpecial(t)?t.query+="%27":t.query+="#"==u?"%23":percentEncode(u,ci)):(t.fragment="",y=Di);break;case Di:u!=Vn&&(t.fragment+=percentEncode(u,li))}g++}},Li=function URL(t){var r,i,a=anInstance(this,Li,"URL"),u=arguments.length>1?arguments[1]:void 0,l=String(t),h=qn(a,{type:"URL"});if(void 0!==u)if(u instanceof Li)r=Wn(u);else if(i=parseURL(r={},String(u)))throw TypeError(i);if(i=parseURL(h,l,null,r))throw TypeError(i);var p=h.searchParams=new zn,y=Un(p);y.updateSearchParams(h.query),y.updateURL=function(){h.query=String(p)||null},o||(a.href=serializeURL.call(a),a.origin=getOrigin.call(a),a.protocol=getProtocol.call(a),a.username=getUsername.call(a),a.password=getPassword.call(a),a.host=getHost.call(a),a.hostname=getHostname.call(a),a.port=getPort.call(a),a.pathname=getPathname.call(a),a.search=getSearch.call(a),a.searchParams=getSearchParams.call(a),a.hash=getHash.call(a))},$i=Li.prototype,serializeURL=function(){var t=Wn(this),r=t.scheme,i=t.username,o=t.password,a=t.host,u=t.port,l=t.path,h=t.query,p=t.fragment,y=r+":";return null!==a?(y+="//",includesCredentials(t)&&(y+=i+(o?":"+o:"")+"@"),y+=serializeHost(a),null!==u&&(y+=":"+u)):"file"==r&&(y+="//"),y+=t.cannotBeABaseURL?l[0]:l.length?"/"+l.join("/"):"",null!==h&&(y+="?"+h),null!==p&&(y+="#"+p),y},getOrigin=function(){var t=Wn(this),r=t.scheme,i=t.port;if("blob"==r)try{return new URL(r.path[0]).origin}catch(t){return"null"}return"file"!=r&&isSpecial(t)?r+"://"+serializeHost(t.host)+(null!==i?":"+i:""):"null"},getProtocol=function(){return Wn(this).scheme+":"},getUsername=function(){return Wn(this).username},getPassword=function(){return Wn(this).password},getHost=function(){var t=Wn(this),r=t.host,i=t.port;return null===r?"":null===i?serializeHost(r):serializeHost(r)+":"+i},getHostname=function(){var t=Wn(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=Wn(this).port;return null===t?"":String(t)},getPathname=function(){var t=Wn(this),r=t.path;return t.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var t=Wn(this).query;return t?"?"+t:""},getSearchParams=function(){return Wn(this).searchParams},getHash=function(){var t=Wn(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,r){return{get:t,set:r,configurable:!0,enumerable:!0}};if(o&&$t($i,{href:accessorDescriptor(serializeURL,(function(t){var r=Wn(this),i=String(t),o=parseURL(r,i);if(o)throw TypeError(o);Un(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var r=Wn(this);parseURL(r,String(t)+":",yi)})),username:accessorDescriptor(getUsername,(function(t){var r=Wn(this),i=dn(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var o=0;o<i.length;o++)r.username+=percentEncode(i[o],hi)}})),password:accessorDescriptor(getPassword,(function(t){var r=Wn(this),i=dn(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.password="";for(var o=0;o<i.length;o++)r.password+=percentEncode(i[o],hi)}})),host:accessorDescriptor(getHost,(function(t){var r=Wn(this);r.cannotBeABaseURL||parseURL(r,String(t),Ei)})),hostname:accessorDescriptor(getHostname,(function(t){var r=Wn(this);r.cannotBeABaseURL||parseURL(r,String(t),Pi)})),port:accessorDescriptor(getPort,(function(t){var r=Wn(this);cannotHaveUsernamePasswordPort(r)||(""==(t=String(t))?r.port=null:parseURL(r,t,Ri))})),pathname:accessorDescriptor(getPathname,(function(t){var r=Wn(this);r.cannotBeABaseURL||(r.path=[],parseURL(r,t+"",_i))})),search:accessorDescriptor(getSearch,(function(t){var r=Wn(this);""==(t=String(t))?r.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),r.query="",parseURL(r,t,Ni)),Un(r.searchParams).updateSearchParams(r.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var r=Wn(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),r.fragment="",parseURL(r,t,Di)):r.fragment=null}))}),Y($i,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),Y($i,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Gn){var Ii=Gn.createObjectURL,Fi=Gn.revokeObjectURL;Ii&&Y(Li,"createObjectURL",(function createObjectURL(t){return Ii.apply(Gn,arguments)})),Fi&&Y(Li,"revokeObjectURL",(function revokeObjectURL(t){return Fi.apply(Gn,arguments)}))}setToStringTag(Li,"URL"),_export({global:!0,forced:!pn,sham:!o},{URL:Li});var Vi=at.f,ji={}.toString,Bi="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Gi={f:function getOwnPropertyNames(t){return Bi&&"[object Window]"==ji.call(t)?function(t){try{return Vi(t)}catch(t){return Bi.slice()}}(t):Vi(toIndexedObject(t))}},zi={f:wellKnownSymbol},Ui=k.f,defineWellKnownSymbol=function(t){var r=Q.Symbol||(Q.Symbol={});has(r,t)||Ui(r,t,{value:zi.f(t)})},qi=[].push,createMethod$2=function(t){var r=1==t,i=2==t,o=3==t,a=4==t,u=6==t,l=5==t||u;return function(h,p,g,v){for(var d,x,b=toObject(h),S=y(b),w=functionBindContext(p,g,3),k=toLength(S.length),E=0,P=v||arraySpeciesCreate,R=r?P(h,k):i?P(h,0):void 0;k>E;E++)if((l||E in S)&&(x=w(d=S[E],E,b),t))if(r)R[E]=x;else if(x)switch(t){case 3:return!0;case 5:return d;case 6:return E;case 2:qi.call(R,d)}else if(a)return!1;return u?-1:o||a?a:R}},Wi={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6)},Hi=Wi.forEach,Xi=sharedKey("hidden"),Yi="Symbol",Qi=wellKnownSymbol("toPrimitive"),Ki=X.set,Zi=X.getterFor(Yi),Ji=Object.prototype,to=i.Symbol,eo=getBuiltIn("JSON","stringify"),ro=S.f,no=k.f,io=Gi.f,oo=l.f,ao=D("symbols"),so=D("op-symbols"),uo=D("string-to-symbol-registry"),co=D("symbol-to-string-registry"),lo=D("wks"),fo=i.QObject,ho=!fo||!fo.prototype||!fo.prototype.findChild,po=o&&fails((function(){return 7!=Vt(no({},"a",{get:function(){return no(this,"a",{value:7}).a}})).a}))?function(t,r,i){var o=ro(Ji,r);o&&delete Ji[r],no(t,r,i),o&&t!==Ji&&no(Ji,r,o)}:no,wrap=function(t,r){var i=ao[t]=Vt(to.prototype);return Ki(i,{type:Yi,tag:t,description:r}),o||(i.description=r),i},yo=mt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof to},go=function defineProperty(t,r,i){t===Ji&&go(so,r,i),anObject(t);var o=toPrimitive(r,!0);return anObject(i),has(ao,o)?(i.enumerable?(has(t,Xi)&&t[Xi][o]&&(t[Xi][o]=!1),i=Vt(i,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Xi)||no(t,Xi,createPropertyDescriptor(1,{})),t[Xi][o]=!0),po(t,o,i)):no(t,o,i)},vo=function defineProperties(t,r){anObject(t);var i=toIndexedObject(r),a=Lt(i).concat(So(i));return Hi(a,(function(r){o&&!mo.call(i,r)||go(t,r,i[r])})),t},mo=function propertyIsEnumerable(t){var r=toPrimitive(t,!0),i=oo.call(this,r);return!(this===Ji&&has(ao,r)&&!has(so,r))&&(!(i||!has(this,r)||!has(ao,r)||has(this,Xi)&&this[Xi][r])||i)},xo=function getOwnPropertyDescriptor(t,r){var i=toIndexedObject(t),o=toPrimitive(r,!0);if(i!==Ji||!has(ao,o)||has(so,o)){var a=ro(i,o);return!a||!has(ao,o)||has(i,Xi)&&i[Xi][o]||(a.enumerable=!0),a}},bo=function getOwnPropertyNames(t){var r=io(toIndexedObject(t)),i=[];return Hi(r,(function(t){has(ao,t)||has(V,t)||i.push(t)})),i},So=function getOwnPropertySymbols(t){var r=t===Ji,i=io(r?so:toIndexedObject(t)),o=[];return Hi(i,(function(t){!has(ao,t)||r&&!has(Ji,t)||o.push(ao[t])})),o};if(dt||(Y((to=function Symbol(){if(this instanceof to)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=uid(t),setter=function(t){this===Ji&&setter.call(so,t),has(this,Xi)&&has(this[Xi],r)&&(this[Xi][r]=!1),po(this,r,createPropertyDescriptor(1,t))};return o&&ho&&po(Ji,r,{configurable:!0,set:setter}),wrap(r,t)}).prototype,"toString",(function toString(){return Zi(this).tag})),Y(to,"withoutSetter",(function(t){return wrap(uid(t),t)})),l.f=mo,k.f=go,S.f=xo,at.f=Gi.f=bo,st.f=So,zi.f=function(t){return wrap(wellKnownSymbol(t),t)},o&&(no(to.prototype,"description",{configurable:!0,get:function description(){return Zi(this).description}}),Y(Ji,"propertyIsEnumerable",mo,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!dt,sham:!dt},{Symbol:to}),Hi(Lt(lo),(function(t){defineWellKnownSymbol(t)})),_export({target:Yi,stat:!0,forced:!dt},{for:function(t){var r=String(t);if(has(uo,r))return uo[r];var i=to(r);return uo[r]=i,co[i]=r,i},keyFor:function keyFor(t){if(!yo(t))throw TypeError(t+" is not a symbol");if(has(co,t))return co[t]},useSetter:function(){ho=!0},useSimple:function(){ho=!1}}),_export({target:"Object",stat:!0,forced:!dt,sham:!o},{create:function create(t,r){return void 0===r?Vt(t):vo(Vt(t),r)},defineProperty:go,defineProperties:vo,getOwnPropertyDescriptor:xo}),_export({target:"Object",stat:!0,forced:!dt},{getOwnPropertyNames:bo,getOwnPropertySymbols:So}),_export({target:"Object",stat:!0,forced:fails((function(){st.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return st.f(toObject(t))}}),eo){var wo=!dt||fails((function(){var t=to();return"[null]"!=eo([t])||"{}"!=eo({a:t})||"{}"!=eo(Object(t))}));_export({target:"JSON",stat:!0,forced:wo},{stringify:function stringify(t,r,i){for(var o,a=[t],u=1;arguments.length>u;)a.push(arguments[u++]);if(o=r,(isObject(r)||void 0!==t)&&!yo(t))return vt(r)||(r=function(t,r){if("function"==typeof o&&(r=o.call(this,t,r)),!yo(r))return r}),a[1]=r,eo.apply(null,a)}})}to.prototype[Qi]||E(to.prototype,Qi,to.prototype.valueOf),setToStringTag(to,Yi),V[Xi]=!0;var ko=k.f,Eo=i.Symbol;if(o&&"function"==typeof Eo&&(!("description"in Eo.prototype)||void 0!==Eo().description)){var Po={},Ro=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),r=this instanceof Ro?new Eo(t):void 0===t?Eo():Eo(t);return""===t&&(Po[r]=!0),r};copyConstructorProperties(Ro,Eo);var Co=Ro.prototype=Eo.prototype;Co.constructor=Ro;var Ao=Co.toString,To="Symbol(test)"==String(Eo("test")),_o=/^Symbol\((.*)\)[^)]+$/;ko(Co,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,r=Ao.call(t);if(has(Po,t))return"";var i=To?r.slice(7,-1):r.replace(_o,"$1");return""===i?void 0:i}}),_export({global:!0,forced:!0},{Symbol:Ro})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var arrayMethodIsStrict=function(t,r){var i=[][t];return!!i&&fails((function(){i.call(null,r||function(){throw 1},1)}))},Mo=Object.defineProperty,Oo={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,r){if(has(Oo,t))return Oo[t];r||(r={});var i=[][t],a=!!has(r,"ACCESSORS")&&r.ACCESSORS,u=has(r,0)?r[0]:thrower,l=has(r,1)?r[1]:void 0;return Oo[t]=!!i&&!fails((function(){if(a&&!o)return!0;var t={length:-1};a?Mo(t,1,{enumerable:!0,get:thrower}):t[1]=1,i.call(t,u,l)}))},No=Wi.forEach,Do=arrayMethodIsStrict("forEach"),Lo=arrayMethodUsesToLength("forEach"),$o=Do&&Lo?[].forEach:function forEach(t){return No(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=$o},{forEach:$o});var Io=[].reverse,Fo=[1,2];_export({target:"Array",proto:!0,forced:String(Fo)===String(Fo.reverse())},{reverse:function reverse(){return vt(this)&&(this.length=this.length),Io.call(this)}});var Vo=arrayMethodHasSpeciesSupport("slice"),jo=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),Bo=wellKnownSymbol("species"),Go=[].slice,zo=Math.max;_export({target:"Array",proto:!0,forced:!Vo||!jo},{slice:function slice(t,r){var i,o,a,u=toIndexedObject(this),l=toLength(u.length),h=toAbsoluteIndex(t,l),p=toAbsoluteIndex(void 0===r?l:r,l);if(vt(u)&&("function"!=typeof(i=u.constructor)||i!==Array&&!vt(i.prototype)?isObject(i)&&null===(i=i[Bo])&&(i=void 0):i=void 0,i===Array||void 0===i))return Go.call(u,h,p);for(o=new(void 0===i?Array:i)(zo(p-h,0)),a=0;h<p;h++,a++)h in u&&createProperty(o,a,u[h]);return o.length=a,o}});var Uo=Date.prototype,qo="Invalid Date",Wo="toString",Ho=Uo.toString,Xo=Uo.getTime;new Date(NaN)+""!=qo&&Y(Uo,Wo,(function toString(){var t=Xo.call(this);return t==t?Ho.call(this):qo}));var Yo=k.f,Qo=Function.prototype,Ko=Qo.toString,Zo=/^\s*function ([^ (]*)/,Jo="name";o&&!(Jo in Qo)&&Yo(Qo,Jo,{configurable:!0,get:function(){try{return Ko.call(this).match(Zo)[1]}catch(t){return""}}}),setToStringTag(i.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!o},{create:Vt}),_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:k.f});var ta=fails((function(){Yt(1)}));_export({target:"Object",stat:!0,forced:ta,sham:!Wt},{getPrototypeOf:function getPrototypeOf(t){return Yt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:re});var ea="toString",ra=RegExp.prototype,na=ra.toString,ia=fails((function(){return"/a/b"!=na.call({source:"a",flags:"b"})})),oa=na.name!=ea;for(var aa in(ia||oa)&&Y(RegExp.prototype,ea,(function toString(){var t=anObject(this),r=String(t.source),i=t.flags;return"/"+r+"/"+String(void 0===i&&t instanceof RegExp&&!("flags"in ra)?regexpFlags.call(t):i)}),{unsafe:!0}),nn){var sa=i[aa],ua=sa&&sa.prototype;if(ua&&ua.forEach!==$o)try{E(ua,"forEach",$o)}catch(t){ua.forEach=$o}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,r,i,o,a,u,l){try{var h=t[u](l),p=h.value}catch(t){return void i(t)}h.done?r(p):Promise.resolve(p).then(o,a)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}var ca=createCommonjsModule((function(t){var r=function(t){var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var a=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(a.prototype),l=new Context(o||[]);return u._invoke=function makeInvokeMethod(t,r,i){var o=p;return function invoke(a,u){if(o===g)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw u;return doneResult()}for(i.method=a,i.arg=u;;){var l=i.delegate;if(l){var h=maybeInvokeDelegate(l,i);if(h){if(h===d)continue;return h}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var x=tryCatch(t,r,i);if("normal"===x.type){if(o=i.done?v:y,x.arg===d)continue;return{value:x.arg,done:i.done}}"throw"===x.type&&(o=v,i.method="throw",i.arg=x.arg)}}}(t,i,l),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var p="suspendedStart",y="suspendedYield",g="executing",v="completed",d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var x={};x[u]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(values([])));S&&S!==i&&o.call(S,u)&&(x=S);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(x);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){var i;this._invoke=function enqueue(a,u){function callInvokeWithMethodAndArg(){return new r((function(i,l){!function invoke(i,a,u,l){var h=tryCatch(t[i],t,a);if("throw"!==h.type){var p=h.arg,y=p.value;return y&&"object"===_typeof(y)&&o.call(y,"__await")?r.resolve(y.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(y).then((function(t){p.value=t,u(p)}),(function(t){return invoke("throw",t,u,l)}))}l(h.arg)}(a,u,i,l)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,i){var o=t.iterator[i.method];if(o===r){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=r,maybeInvokeDelegate(t,i),"throw"===i.method))return d;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var a=tryCatch(o,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,d;var u=a.arg;return u?u.done?(i[t.resultName]=u.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=r),i.delegate=null,d):u:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,l=function next(){for(;++a<t.length;)if(o.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=r,next.done=!0,next};return l.next=l}}return{next:doneResult}}function doneResult(){return{value:r,done:!0}}return GeneratorFunction.prototype=w.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,h,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[l]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(r,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(r,i,o,a),u);return t.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(w),define(w,h,"Generator"),w[u]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var i in t)r.push(i);return r.reverse(),function next(){for(;r.length;){var i=r.pop();if(i in t)return next.value=i,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(resetTryEntry),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var i=this;function handle(o,a){return l.type="throw",l.arg=t,i.next=o,a&&(i.method="next",i.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var h=o.call(u,"catchLoc"),p=o.call(u,"finallyLoc");if(h&&p){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,d):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,i,o){return this.delegate={iterator:values(t),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}})),la="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var fa=defaultSetTimout,ha=defaultClearTimeout;function runTimeout(t){if(fa===setTimeout)return setTimeout(t,0);if((fa===defaultSetTimout||!fa)&&setTimeout)return fa=setTimeout,setTimeout(t,0);try{return fa(t,0)}catch(r){try{return fa.call(null,t,0)}catch(r){return fa.call(this,t,0)}}}"function"==typeof la.setTimeout&&(fa=setTimeout),"function"==typeof la.clearTimeout&&(ha=clearTimeout);var pa,ya=[],ga=!1,va=-1;function cleanUpNextTick(){ga&&pa&&(ga=!1,pa.length?ya=pa.concat(ya):va=-1,ya.length&&drainQueue())}function drainQueue(){if(!ga){var t=runTimeout(cleanUpNextTick);ga=!0;for(var r=ya.length;r;){for(pa=ya,ya=[];++va<r;)pa&&pa[va].run();va=-1,r=ya.length}pa=null,ga=!1,function runClearTimeout(t){if(ha===clearTimeout)return clearTimeout(t);if((ha===defaultClearTimeout||!ha)&&clearTimeout)return ha=clearTimeout,clearTimeout(t);try{return ha(t)}catch(r){try{return ha.call(null,t)}catch(r){return ha.call(this,t)}}}(t)}}function Item(t,r){this.fun=t,this.array=r}Item.prototype.run=function(){this.fun.apply(null,this.array)};function noop(){}var da=noop,ma=noop,xa=noop,ba=noop,Sa=noop,wa=noop,ka=noop;var Ea=la.performance||{},Pa=Ea.now||Ea.mozNow||Ea.msNow||Ea.oNow||Ea.webkitNow||function(){return(new Date).getTime()};var Ra=new Date;var Ca={nextTick:function nextTick(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)r[i-1]=arguments[i];ya.push(new Item(t,r)),1!==ya.length||ga||runTimeout(drainQueue)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:da,addListener:ma,once:xa,off:ba,removeListener:Sa,removeAllListeners:wa,emit:ka,binding:function binding(t){throw new Error("process.binding is not supported")},cwd:function cwd(){return"/"},chdir:function chdir(t){throw new Error("process.chdir is not supported")},umask:function umask(){return 0},hrtime:function hrtime(t){var r=.001*Pa.call(Ea),i=Math.floor(r),o=Math.floor(r%1*1e9);return t&&(i-=t[0],(o-=t[1])<0&&(i--,o+=1e9)),[i,o]},platform:"browser",release:{},config:{},uptime:function uptime(){return(new Date-Ra)/1e3}},Aa=Wi.every,Ta=arrayMethodIsStrict("every"),_a=arrayMethodUsesToLength("every");_export({target:"Array",proto:!0,forced:!Ta||!_a},{every:function every(t){return Aa(this,t,arguments.length>1?arguments[1]:void 0)}});_export({target:"Array",proto:!0},{fill:function fill(t){for(var r=toObject(this),i=toLength(r.length),o=arguments.length,a=toAbsoluteIndex(o>1?arguments[1]:void 0,i),u=o>2?arguments[2]:void 0,l=void 0===u?i:toAbsoluteIndex(u,i);l>a;)r[a++]=t;return r}}),addToUnscopables("fill");var Ma=Wi.filter,Oa=arrayMethodHasSpeciesSupport("filter"),Na=arrayMethodUsesToLength("filter");_export({target:"Array",proto:!0,forced:!Oa||!Na},{filter:function filter(t){return Ma(this,t,arguments.length>1?arguments[1]:void 0)}});var Da=!checkCorrectnessOfIteration((function(t){Array.from(t)}));_export({target:"Array",stat:!0,forced:Da},{from:dn});var La=rt.includes,$a=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!$a},{includes:function includes(t){return La(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ia=rt.indexOf,Fa=[].indexOf,Va=!!Fa&&1/[1].indexOf(1,-0)<0,ja=arrayMethodIsStrict("indexOf"),Ba=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:Va||!ja||!Ba},{indexOf:function indexOf(t){return Va?Fa.apply(this,arguments)||0:Ia(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Array",stat:!0},{isArray:vt});var Ga=[].join,za=y!=Object,Ua=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:za||!Ua},{join:function join(t){return Ga.call(toIndexedObject(this),void 0===t?",":t)}});var qa=Wi.map,Wa=arrayMethodHasSpeciesSupport("map"),Ha=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!Wa||!Ha},{map:function map(t){return qa(this,t,arguments.length>1?arguments[1]:void 0)}});var createMethod$3=function(t){return function(r,i,o,a){aFunction$1(i);var u=toObject(r),l=y(u),h=toLength(u.length),p=t?h-1:0,g=t?-1:1;if(o<2)for(;;){if(p in l){a=l[p],p+=g;break}if(p+=g,t?p<0:h<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:h>p;p+=g)p in l&&(a=i(a,l[p],p,u));return a}},Xa={left:createMethod$3(!1),right:createMethod$3(!0)}.left,Ya=arrayMethodIsStrict("reduce"),Qa=arrayMethodUsesToLength("reduce",{1:0});_export({target:"Array",proto:!0,forced:!Ya||!Qa},{reduce:function reduce(t){return Xa(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ka=Wi.some,Za=arrayMethodIsStrict("some"),Ja=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!Za||!Ja},{some:function some(t){return Ka(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Date",stat:!0},{now:function now(){return(new Date).getTime()}});var ts=[].slice,es={},construct=function(t,r,i){if(!(r in es)){for(var o=[],a=0;a<r;a++)o[a]="a["+a+"]";es[r]=Function("C,a","return new C("+o.join(",")+")")}return es[r](t,i)},rs=Function.bind||function bind(t){var r=aFunction$1(this),i=ts.call(arguments,1),o=function bound(){var a=i.concat(ts.call(arguments));return this instanceof o?construct(r,a.length,a):r.apply(t,a)};return isObject(r.prototype)&&(o.prototype=r.prototype),o};_export({target:"Function",proto:!0},{bind:rs});var ns=!fails((function(){return Object.isExtensible(Object.preventExtensions({}))})),is=createCommonjsModule((function(t){var r=k.f,i=uid("meta"),o=0,a=Object.isExtensible||function(){return!0},setMetadata=function(t){r(t,i,{value:{objectID:"O"+ ++o,weakData:{}}})},u=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!isObject(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!has(t,i)){if(!a(t))return"F";if(!r)return"E";setMetadata(t)}return t[i].objectID},getWeakData:function(t,r){if(!has(t,i)){if(!a(t))return!0;if(!r)return!1;setMetadata(t)}return t[i].weakData},onFreeze:function(t){return ns&&u.REQUIRED&&a(t)&&!has(t,i)&&setMetadata(t),t}};V[i]=!0})),inheritIfRequired=function(t,r,i){var o,a;return re&&"function"==typeof(o=r.constructor)&&o!==i&&isObject(a=o.prototype)&&a!==i.prototype&&re(t,a),t},os=k.f,as=is.fastKey,ss=X.set,us=X.getterFor,cs=(function(t,r,o){var a=-1!==t.indexOf("Map"),u=-1!==t.indexOf("Weak"),l=a?"set":"add",h=i[t],p=h&&h.prototype,y=h,g={},fixMethod=function(t){var r=p[t];Y(p,t,"add"==t?function add(t){return r.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(u&&!isObject(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return u&&!isObject(t)?void 0:r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(u&&!isObject(t))&&r.call(this,0===t?0:t)}:function set(t,i){return r.call(this,0===t?0:t,i),this})};if(yt(t,"function"!=typeof h||!(u||p.forEach&&!fails((function(){(new h).entries().next()})))))y=o.getConstructor(r,t,a,l),is.REQUIRED=!0;else if(yt(t,!0)){var v=new y,d=v[l](u?{}:-0,1)!=v,x=fails((function(){v.has(1)})),b=checkCorrectnessOfIteration((function(t){new h(t)})),S=!u&&fails((function(){for(var t=new h,r=5;r--;)t[l](r,r);return!t.has(-0)}));b||((y=r((function(r,i){anInstance(r,y,t);var o=inheritIfRequired(new h,r,y);return null!=i&&Ee(i,o[l],o,a),o}))).prototype=p,p.constructor=y),(x||S)&&(fixMethod("delete"),fixMethod("has"),a&&fixMethod("get")),(S||d)&&fixMethod(l),u&&p.clear&&delete p.clear}g[t]=y,_export({global:!0,forced:y!=h},g),setToStringTag(y,t),u||o.setStrong(y,t,a)}("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,r,i,a){var u=t((function(t,l){anInstance(t,u,r),ss(t,{type:r,index:Vt(null),first:void 0,last:void 0,size:0}),o||(t.size=0),null!=l&&Ee(l,t[a],t,i)})),l=us(r),define=function(t,r,i){var a,u,h=l(t),p=getEntry(t,r);return p?p.value=i:(h.last=p={index:u=as(r,!0),key:r,value:i,previous:a=h.last,next:void 0,removed:!1},h.first||(h.first=p),a&&(a.next=p),o?h.size++:t.size++,"F"!==u&&(h.index[u]=p)),t},getEntry=function(t,r){var i,o=l(t),a=as(r);if("F"!==a)return o.index[a];for(i=o.first;i;i=i.next)if(i.key==r)return i};return redefineAll(u.prototype,{clear:function clear(){for(var t=l(this),r=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete r[i.index],i=i.next;t.first=t.last=void 0,o?t.size=0:this.size=0},delete:function(t){var r=this,i=l(r),a=getEntry(r,t);if(a){var u=a.next,h=a.previous;delete i.index[a.index],a.removed=!0,h&&(h.next=u),u&&(u.previous=h),i.first==a&&(i.first=u),i.last==a&&(i.last=h),o?i.size--:r.size--}return!!a},forEach:function forEach(t){for(var r,i=l(this),o=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.next:i.first;)for(o(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function has(t){return!!getEntry(this,t)}}),redefineAll(u.prototype,i?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}}),o&&os(u.prototype,"size",{get:function(){return l(this).size}}),u},setStrong:function(t,r,i){var o=r+" Iterator",a=us(r),u=us(o);defineIterator(t,r,(function(t,r){ss(this,{type:o,target:t,state:a(t),kind:r,last:void 0})}),(function(){for(var t=u(this),r=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?"keys"==r?{value:i.key,done:!1}:"values"==r?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),setSpecies(r)}}),"\t\n\v\f\r \u2028\u2029\ufeff"),ls="["+cs+"]",fs=RegExp("^"+ls+ls+"*"),hs=RegExp(ls+ls+"*$"),createMethod$4=function(t){return function(r){var i=String(requireObjectCoercible(r));return 1&t&&(i=i.replace(fs,"")),2&t&&(i=i.replace(hs,"")),i}},ps={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},ys=at.f,gs=S.f,vs=k.f,ds=ps.trim,ms="Number",xs=i.Number,bs=xs.prototype,Ss=classofRaw(Vt(bs))==ms,toNumber=function(t){var r,i,o,a,u,l,h,p,y=toPrimitive(t,!1);if("string"==typeof y&&y.length>2)if(43===(r=(y=ds(y)).charCodeAt(0))||45===r){if(88===(i=y.charCodeAt(2))||120===i)return NaN}else if(48===r){switch(y.charCodeAt(1)){case 66:case 98:o=2,a=49;break;case 79:case 111:o=8,a=55;break;default:return+y}for(l=(u=y.slice(2)).length,h=0;h<l;h++)if((p=u.charCodeAt(h))<48||p>a)return NaN;return parseInt(u,o)}return+y};if(yt(ms,!xs(" 0o1")||!xs("0b1")||xs("+0x1"))){for(var ws,ks=function Number(t){var r=arguments.length<1?0:t,i=this;return i instanceof ks&&(Ss?fails((function(){bs.valueOf.call(i)})):classofRaw(i)!=ms)?inheritIfRequired(new xs(toNumber(r)),i,ks):toNumber(r)},Es=o?ys(xs):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Ps=0;Es.length>Ps;Ps++)has(xs,ws=Es[Ps])&&!has(ks,ws)&&vs(ks,ws,gs(xs,ws));ks.prototype=bs,bs.constructor=ks,Y(i,ms,ks)}_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:$t});var Rs=is.onFreeze,Cs=Object.freeze,As=fails((function(){Cs(1)}));_export({target:"Object",stat:!0,forced:As,sham:!ns},{freeze:function freeze(t){return Cs&&isObject(t)?Cs(Rs(t)):t}});var Ts=S.f,_s=fails((function(){Ts(1)}));_export({target:"Object",stat:!0,forced:!o||_s,sham:!o},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return Ts(toIndexedObject(t),r)}}),_export({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,o=toIndexedObject(t),a=S.f,u=ut(o),l={},h=0;u.length>h;)void 0!==(i=a(o,r=u[h++]))&&createProperty(l,r,i);return l}});var Ms=fails((function(){Lt(1)}));_export({target:"Object",stat:!0,forced:Ms},{keys:function keys(t){return Lt(toObject(t))}});var Os=ps.trim,Ns=i.parseFloat,Ds=1/Ns(cs+"-0")!=-1/0?function parseFloat(t){var r=Os(String(t)),i=Ns(r);return 0===i&&"-"==r.charAt(0)?-0:i}:Ns;_export({global:!0,forced:parseFloat!=Ds},{parseFloat:Ds});var Ls=ps.trim,$s=i.parseInt,Is=/^[+-]?0[Xx]/,Fs=8!==$s(cs+"08")||22!==$s(cs+"0x16")?function parseInt(t,r){var i=Ls(String(t));return $s(i,r>>>0||(Is.test(i)?16:10))}:$s;_export({global:!0,forced:parseInt!=Fs},{parseInt:Fs});var Vs=getBuiltIn("Reflect","apply"),js=Function.apply,Bs=!fails((function(){Vs((function(){}))}));_export({target:"Reflect",stat:!0,forced:Bs},{apply:function apply(t,r,i){return aFunction$1(t),anObject(i),Vs?Vs(t,r,i):js.call(t,r,i)}});var Gs=getBuiltIn("Reflect","construct"),zs=fails((function(){function F(){}return!(Gs((function(){}),[],F)instanceof F)})),Us=!fails((function(){Gs((function(){}))})),qs=zs||Us;_export({target:"Reflect",stat:!0,forced:qs,sham:qs},{construct:function construct(t,r){aFunction$1(t),anObject(r);var i=arguments.length<3?t:aFunction$1(arguments[2]);if(Us&&!zs)return Gs(t,r,i);if(t==i){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var o=[null];return o.push.apply(o,r),new(rs.apply(t,o))}var a=i.prototype,u=Vt(isObject(a)?a:Object.prototype),l=Function.apply.call(t,u,r);return isObject(l)?l:u}});var Ws=S.f;_export({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(t,r){var i=Ws(anObject(t),r);return!(i&&!i.configurable)&&delete t[r]}}),_export({target:"Reflect",stat:!0,sham:!Wt},{getPrototypeOf:function getPrototypeOf(t){return Yt(anObject(t))}});var Hs=wellKnownSymbol("match"),isRegexp=function(t){var r;return isObject(t)&&(void 0!==(r=t[Hs])?!!r:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},Xs=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Xs]=!1,"/./"[t](r)}catch(t){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}}),fixRegexpWellKnownSymbolLogic("match",1,(function(t,r,i){return[function match(r){var i=requireObjectCoercible(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i):new RegExp(r)[t](String(i))},function(t){var o=i(r,t,this);if(o.done)return o.value;var a=anObject(t),u=String(this);if(!a.global)return regexpExecAbstract(a,u);var l=a.unicode;a.lastIndex=0;for(var h,p=[],y=0;null!==(h=regexpExecAbstract(a,u));){var g=String(h[0]);p[y]=g,""===g&&(a.lastIndex=advanceStringIndex(u,toLength(a.lastIndex),l)),y++}return 0===y?null:p}]}));var Ys=[].push,Qs=Math.min,Ks=4294967295,Zs=!fails((function(){return!RegExp(Ks,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(t,r,i){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var o=String(requireObjectCoercible(this)),a=void 0===i?Ks:i>>>0;if(0===a)return[];if(void 0===t)return[o];if(!isRegexp(t))return r.call(o,t,a);for(var u,l,h,p=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,v=new RegExp(t.source,y+"g");(u=Vr.call(v,o))&&!((l=v.lastIndex)>g&&(p.push(o.slice(g,u.index)),u.length>1&&u.index<o.length&&Ys.apply(p,u.slice(1)),h=u[0].length,g=l,p.length>=a));)v.lastIndex===u.index&&v.lastIndex++;return g===o.length?!h&&v.test("")||p.push(""):p.push(o.slice(g)),p.length>a?p.slice(0,a):p}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:r.call(this,t,i)}:r,[function split(r,i){var a=requireObjectCoercible(this),u=null==r?void 0:r[t];return void 0!==u?u.call(r,a,i):o.call(String(a),r,i)},function(t,a){var u=i(o,t,this,a,o!==r);if(u.done)return u.value;var l=anObject(t),h=String(this),p=speciesConstructor(l,RegExp),y=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Zs?"y":"g"),v=new p(Zs?l:"^(?:"+l.source+")",g),d=void 0===a?Ks:a>>>0;if(0===d)return[];if(0===h.length)return null===regexpExecAbstract(v,h)?[h]:[];for(var x=0,b=0,S=[];b<h.length;){v.lastIndex=Zs?b:0;var w,k=regexpExecAbstract(v,Zs?h:h.slice(b));if(null===k||(w=Qs(toLength(v.lastIndex+(Zs?0:b)),h.length))===x)b=advanceStringIndex(h,b,y);else{if(S.push(h.slice(x,b)),S.length===d)return S;for(var E=1;E<=k.length-1;E++)if(S.push(k[E]),S.length===d)return S;b=x=w}}return S.push(h.slice(x)),S}]}),!Zs);var Js,tu=S.f,eu="".startsWith,ru=Math.min,nu=correctIsRegexpLogic("startsWith"),iu=!(nu||(Js=tu(String.prototype,"startsWith"),!Js||Js.writable));_export({target:"String",proto:!0,forced:!iu&&!nu},{startsWith:function startsWith(t){var r=String(requireObjectCoercible(this));notARegexp(t);var i=toLength(ru(arguments.length>1?arguments[1]:void 0,r.length)),o=String(t);return eu?eu.call(r,o,i):r.slice(i,i+o.length)===o}});var ou=ps.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!cs[t]()||"
"!="
"[t]()||cs[t].name!==t}))}("trim")},{trim:function trim(){return ou(this)}});var au=function _arrayWithHoles(t){if(Array.isArray(t))return t};var su=function _iterableToArrayLimit(t,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],o=!0,a=!1,u=void 0;try{for(var l,h=t[Symbol.iterator]();!(o=(l=h.next()).done)&&(i.push(l.value),!r||i.length!==r);o=!0);}catch(t){a=!0,u=t}finally{try{o||null==h.return||h.return()}finally{if(a)throw u}}return i}};var uu=function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o};var cu=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return uu(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?uu(t,r):void 0}};var lu=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var fu=function _slicedToArray(t,r){return au(t)||su(t,r)||cu(t,r)||lu()},hu=ca;function asyncGeneratorStep$1(t,r,i,o,a,u,l){try{var h=t[u](l),p=h.value}catch(t){return void i(t)}h.done?r(p):Promise.resolve(p).then(o,a)}var pu=function _asyncToGenerator$1(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var u=t.apply(r,i);function _next(t){asyncGeneratorStep$1(u,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep$1(u,o,a,_next,_throw,"throw",t)}_next(void 0)}))}};var yu=function _defineProperty(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t};var gu=function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")};function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}for(var vu=function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),t},du=createCommonjsModule((function(t){(function(){var r,i,o,a,u,l;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=Ca&&Ca.hrtime?(t.exports=function(){return(r()-u)/1e6},i=Ca.hrtime,a=(r=function getNanoSeconds(){var t;return 1e9*(t=i())[0]+t[1]})(),l=1e9*Ca.uptime(),u=a-l):Date.now?(t.exports=function(){return Date.now()-o},o=Date.now()):(t.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(r)})),mu="undefined"==typeof window?r:window,xu=["moz","webkit"],bu="AnimationFrame",Su=mu["request"+bu],wu=mu["cancel"+bu]||mu["cancelRequest"+bu],ku=0;!Su&&ku<xu.length;ku++)Su=mu[xu[ku]+"Request"+bu],wu=mu[xu[ku]+"Cancel"+bu]||mu[xu[ku]+"CancelRequest"+bu];if(!Su||!wu){var Eu=0,Pu=0,Ru=[];Su=function raf(t){if(0===Ru.length){var r=du(),i=Math.max(0,16.666666666666668-(r-Eu));Eu=i+r,setTimeout((function(){var t=Ru.slice(0);Ru.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(Eu)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return Ru.push({handle:++Pu,callback:t,cancelled:!1}),Pu},wu=function caf(t){for(var r=0;r<Ru.length;r++)Ru[r].handle===t&&(Ru[r].cancelled=!0)}}var Cu=function raf_1(t){return Su.call(mu,t)};Cu.cancel=function cancel(){wu.apply(mu,arguments)},Cu.polyfill=function polyfill(t){t||(t=mu),t.requestAnimationFrame=Su,t.cancelAnimationFrame=wu};var Au=function rgbcolor(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{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 process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function process(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function process(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function process(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],o=0;o<i.length;o++){var a=i[o].re,u=i[o].process,l=a.exec(t);if(l){var h=u(l);this.r=h[0],this.g=h[1],this.b=h[2],h.length>3&&(this.alpha=h[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,o=0;o<i.length;o++)for(var a=i[o].example,u=0;u<a.length;u++)t[t.length]=a[u];for(var l in r)t[t.length]=l;var h=document.createElement("ul");h.setAttribute("id","rgbcolor-examples");for(o=0;o<t.length;o++)try{var p=document.createElement("li"),y=new RGBColor(t[o]),g=document.createElement("div");g.style.cssText="margin: 3px; border: 1px solid black; background:"+y.toHex()+"; color:"+y.toHex(),g.appendChild(document.createTextNode("test"));var v=document.createTextNode(" "+t[o]+" -> "+y.toRGB()+" -> "+y.toHex());p.appendChild(g),p.appendChild(v),h.appendChild(p)}catch(t){}return h}},Tu=createCommonjsModule((function(t){function _typeof(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=_typeof=function _typeof(t){return typeof t}:t.exports=_typeof=function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(r)}t.exports=_typeof}));var _u=function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var Mu=function _possibleConstructorReturn(t,r){return!r||"object"!==Tu(r)&&"function"!=typeof r?_u(t):r},Ou=createCommonjsModule((function(t){function _getPrototypeOf(r){return t.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(r)}t.exports=_getPrototypeOf})),Nu=createCommonjsModule((function(t){function _setPrototypeOf(r,i){return t.exports=_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){return t.__proto__=r,t},_setPrototypeOf(r,i)}t.exports=_setPrototypeOf}));var Du=function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&Nu(t,r)};var Lu=function _arrayWithoutHoles(t){if(Array.isArray(t))return uu(t)};var $u=function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)};var Iu=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var Fu=function _toConsumableArray(t){return Lu(t)||$u(t)||cu(t)||Iu()};_export({target:"Reflect",stat:!0},{get:function get$1(t,r){var i,o,a=arguments.length<3?t:arguments[2];return anObject(t)===a?t[r]:(i=S.f(t,r))?has(i,"value")?i.value:void 0===i.get?void 0:i.get.call(a):isObject(o=Yt(t))?get$1(o,r,a):void 0}});var Vu=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=Ou(t)););return t},ju=createCommonjsModule((function(t){function _get(r,i,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=_get=Reflect.get:t.exports=_get=function _get(t,r,i){var o=Vu(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(i):a.value}},_get(r,i,o||r)}t.exports=_get}));function _typeof$1(t){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Bu=[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],Gu=[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 processCanvasRGBA(t,r,i,o,a,u){if(!(isNaN(u)||u<1)){u|=0;var l=function getImageDataFromCanvas(t,r,i,o,a){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==_typeof$1(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var u=t.getContext("2d");try{return u.getImageData(r,i,o,a)}catch(t){throw new Error("unable to access image data: "+t)}}(t,r,i,o,a);l=function processImageDataRGBA(t,r,i,o,a,u){for(var l,h=t.data,p=2*u+1,y=o-1,g=a-1,v=u+1,d=v*(v+1)/2,x=new zu,b=x,S=1;S<p;S++)b=b.next=new zu,S===v&&(l=b);b.next=x;for(var w=null,k=null,E=0,P=0,R=Bu[u],C=Gu[u],A=0;A<a;A++){b=x;for(var T=h[P],_=h[P+1],M=h[P+2],O=h[P+3],N=0;N<v;N++)b.r=T,b.g=_,b.b=M,b.a=O,b=b.next;for(var D=0,L=0,$=0,I=0,V=v*T,j=v*_,B=v*M,G=v*O,z=d*T,U=d*_,q=d*M,W=d*O,H=1;H<v;H++){var X=P+((y<H?y:H)<<2),Y=h[X],Q=h[X+1],K=h[X+2],Z=h[X+3],J=v-H;z+=(b.r=Y)*J,U+=(b.g=Q)*J,q+=(b.b=K)*J,W+=(b.a=Z)*J,D+=Y,L+=Q,$+=K,I+=Z,b=b.next}w=x,k=l;for(var tt=0;tt<o;tt++){var et=W*R>>C;if(h[P+3]=et,0!==et){var rt=255/et;h[P]=(z*R>>C)*rt,h[P+1]=(U*R>>C)*rt,h[P+2]=(q*R>>C)*rt}else h[P]=h[P+1]=h[P+2]=0;z-=V,U-=j,q-=B,W-=G,V-=w.r,j-=w.g,B-=w.b,G-=w.a;var nt=tt+u+1;nt=E+(nt<y?nt:y)<<2,z+=D+=w.r=h[nt],U+=L+=w.g=h[nt+1],q+=$+=w.b=h[nt+2],W+=I+=w.a=h[nt+3],w=w.next;var it=k,ot=it.r,at=it.g,st=it.b,ut=it.a;V+=ot,j+=at,B+=st,G+=ut,D-=ot,L-=at,$-=st,I-=ut,k=k.next,P+=4}E+=o}for(var ct=0;ct<o;ct++){var lt=h[P=ct<<2],ft=h[P+1],ht=h[P+2],pt=h[P+3],yt=v*lt,gt=v*ft,vt=v*ht,dt=v*pt,mt=d*lt,xt=d*ft,bt=d*ht,St=d*pt;b=x;for(var wt=0;wt<v;wt++)b.r=lt,b.g=ft,b.b=ht,b.a=pt,b=b.next;for(var kt=o,Et=0,Pt=0,Rt=0,Ct=0,At=1;At<=u;At++){P=kt+ct<<2;var Tt=v-At;mt+=(b.r=lt=h[P])*Tt,xt+=(b.g=ft=h[P+1])*Tt,bt+=(b.b=ht=h[P+2])*Tt,St+=(b.a=pt=h[P+3])*Tt,Ct+=lt,Et+=ft,Pt+=ht,Rt+=pt,b=b.next,At<g&&(kt+=o)}P=ct,w=x,k=l;for(var _t=0;_t<a;_t++){var Mt=P<<2;h[Mt+3]=pt=St*R>>C,pt>0?(pt=255/pt,h[Mt]=(mt*R>>C)*pt,h[Mt+1]=(xt*R>>C)*pt,h[Mt+2]=(bt*R>>C)*pt):h[Mt]=h[Mt+1]=h[Mt+2]=0,mt-=yt,xt-=gt,bt-=vt,St-=dt,yt-=w.r,gt-=w.g,vt-=w.b,dt-=w.a,Mt=ct+((Mt=_t+v)<g?Mt:g)*o<<2,mt+=Ct+=w.r=h[Mt],xt+=Et+=w.g=h[Mt+1],bt+=Pt+=w.b=h[Mt+2],St+=Rt+=w.a=h[Mt+3],w=w.next,yt+=lt=k.r,gt+=ft=k.g,vt+=ht=k.b,dt+=pt=k.a,Ct-=lt,Et-=ft,Pt-=ht,Rt-=pt,k=k.next,P+=o}}return t}(l,0,0,o,a,u),t.getContext("2d").putImageData(l,r,i)}}var zu=function BlurStack(){!function _classCallCheck$1(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BlurStack),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function compressSpaces(t){return t.replace(/(?!\u3000)\s+/gm," ")}function toNumbers(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var Uu=/^[A-Z-]+$/;function normalizeAttributeName(t){return Uu.test(t)?t.toLowerCase():t}function parseExternalUrl(t){var r=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return r[2]||r[3]||r[4]}var qu=/(\[[^\]]+\])/g,Wu=/(#[^\s\+>~\.\[:]+)/g,Hu=/(\.[^\s\+>~\.\[:]+)/g,Xu=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,Yu=/(:[\w-]+\([^\)]*\))/gi,Qu=/(:[^\s\+>~\.\[:]+)/g,Ku=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(t,r){var i=t.match(r);return i?[t.replace(r," "),i.length]:[t,0]}var Zu=1e-8;function vectorMagnitude(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function vectorsRatio(t,r){return(t[0]*r[0]+t[1]*r[1])/(vectorMagnitude(t)*vectorMagnitude(r))}function vectorsAngle(t,r){return(t[0]*r[1]<t[1]*r[0]?-1:1)*Math.acos(vectorsRatio(t,r))}function CB1(t){return t*t*t}function CB2(t){return 3*t*t*(1-t)}function CB3(t){return 3*t*(1-t)*(1-t)}function CB4(t){return(1-t)*(1-t)*(1-t)}function QB1(t){return t*t}function QB2(t){return 2*t*(1-t)}function QB3(t){return(1-t)*(1-t)}(function createCommonjsModule$1(t,r){return t(r={exports:{}},r.exports),r.exports})((function(t){var r=function(t){var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function wrap(t,r,i,o){var a=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(a.prototype),l=new Context(o||[]);return u._invoke=function makeInvokeMethod(t,r,i){var o=p;return function invoke(a,u){if(o===g)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw u;return doneResult()}for(i.method=a,i.arg=u;;){var l=i.delegate;if(l){var h=maybeInvokeDelegate(l,i);if(h){if(h===d)continue;return h}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var x=tryCatch(t,r,i);if("normal"===x.type){if(o=i.done?v:y,x.arg===d)continue;return{value:x.arg,done:i.done}}"throw"===x.type&&(o=v,i.method="throw",i.arg=x.arg)}}}(t,i,l),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var p="suspendedStart",y="suspendedYield",g="executing",v="completed",d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var x={};x[u]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(values([])));S&&S!==i&&o.call(S,u)&&(x=S);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(x);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function AsyncIterator(t,r){var i;this._invoke=function enqueue(a,u){function callInvokeWithMethodAndArg(){return new r((function(i,l){!function invoke(i,a,u,l){var h=tryCatch(t[i],t,a);if("throw"!==h.type){var p=h.arg,y=p.value;return y&&"object"===_typeof(y)&&o.call(y,"__await")?r.resolve(y.__await).then((function(t){invoke("next",t,u,l)}),(function(t){invoke("throw",t,u,l)})):r.resolve(y).then((function(t){p.value=t,u(p)}),(function(t){return invoke("throw",t,u,l)}))}l(h.arg)}(a,u,i,l)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,i){var o=t.iterator[i.method];if(o===r){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=r,maybeInvokeDelegate(t,i),"throw"===i.method))return d;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var a=tryCatch(o,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,d;var u=a.arg;return u?u.done?(i[t.resultName]=u.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=r),i.delegate=null,d):u:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,l=function next(){for(;++a<t.length;)if(o.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=r,next.done=!0,next};return l.next=l}}return{next:doneResult}}function doneResult(){return{value:r,done:!0}}return GeneratorFunction.prototype=w.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[h]=GeneratorFunction.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,h in t||(t[h]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[l]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(r,i,o,a,u){void 0===u&&(u=Promise);var l=new AsyncIterator(wrap(r,i,o,a),u);return t.isGeneratorFunction(i)?l:l.next().then((function(t){return t.done?t.value:l.next()}))},defineIteratorMethods(w),w[h]="Generator",w[u]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var i in t)r.push(i);return r.reverse(),function next(){for(;r.length;){var i=r.pop();if(i in t)return next.value=i,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(resetTryEntry),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var i=this;function handle(o,a){return l.type="throw",l.arg=t,i.next=o,a&&(i.method="next",i.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var h=o.call(u,"catchLoc"),p=o.call(u,"finallyLoc");if(h&&p){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var u=a;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var l=u?u.completion:{};return l.type=t,l.arg=r,u?(this.method="next",this.next=u.finallyLoc,d):this.complete(l)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,i,o){return this.delegate={iterator:values(t),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}));var Ju=function(){function Property(t,r,i){gu(this,Property),this.document=t,this.name=r,this.value=i,this.isNormalizedColor=!1}return vu(Property,[{key:"hasValue",value:function hasValue(){var t=this.value;return null!==t&&""!==t&&0!==t&&void 0!==t}},{key:"isString",value:function isString(t){var r=this.value,i="string"==typeof r;return i&&t?t.test(r):i}},{key:"isUrlDefinition",value:function isUrlDefinition(){return this.isString(/^url\(/)}},{key:"isPixels",value:function isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case/px$/.test(t):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function setValue(t){return this.value=t,this}},{key:"getValue",value:function getValue(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var r=this.value,i=parseFloat(r);return this.isString(/%$/)&&(i/=100),i}},{key:"getString",value:function getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getColor",value:function getColor(t){var r=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=function normalizeColor(t){if(!t.startsWith("rgb"))return t;var r=3;return t.replace(/\d+(\.\d+)?/g,(function(t,i){return r--&&i?String(Math.round(parseFloat(t))):t}))}(r),this.value=r),r}},{key:"getDpi",value:function getDpi(){return 96}},{key:"getRem",value:function getRem(){return this.document.rootEmSize}},{key:"getEm",value:function getEm(){return this.document.emSize}},{key:"getUnits",value:function getUnits(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function getPixels(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var i="boolean"==typeof t?[void 0,t]:[t],o=fu(i,2),a=o[0],u=o[1],l=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(l.computeSize("x"),l.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(l.computeSize("x"),l.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*l.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*l.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&u:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*l.computeSize(a);default:var h=this.getNumber();return r&&h<1?h*l.computeSize(a):h}}},{key:"getMilliseconds",value:function getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function 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)}}},{key:"getDefinition",value:function getDefinition(){var t=this.getString(),r=t.match(/#([^\)'"]+)/);return r&&(r=r[1]),r||(r=t),this.document.definitions[r]}},{key:"getFillStyleDefinition",value:function getFillStyleDefinition(t,r){var i=this.getDefinition();if(!i)return null;if("function"==typeof i.createGradient)return i.createGradient(this.document.ctx,t,r);if("function"==typeof i.createPattern){if(i.getHrefAttribute().hasValue()){var o=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),o.hasValue()&&i.getAttribute("patternTransform",!0).setValue(o.value)}return i.createPattern(this.document.ctx,t,r)}return null}},{key:"getTextBaseline",value:function getTextBaseline(){return this.hasValue()?Property.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function addOpacity(t){for(var r=this.getColor(),i=r.length,o=0,a=0;a<i&&(","===r[a]&&o++,3!==o);a++);if(t.hasValue()&&this.isString()&&3!==o){var u=new Au(r);u.ok&&(u.alpha=t.getNumber(),r=u.toRGBA())}return new Property(this.document,this.name,r)}}],[{key:"empty",value:function empty(t){return new Property(t,"EMPTY","")}}]),Property}();Ju.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var tc=function(){function ViewPort(){gu(this,ViewPort),this.viewPorts=[]}return vu(ViewPort,[{key:"clear",value:function clear(){this.viewPorts=[]}},{key:"setCurrent",value:function setCurrent(t,r){this.viewPorts.push({width:t,height:r})}},{key:"removeCurrent",value:function removeCurrent(){this.viewPorts.pop()}},{key:"getCurrent",value:function getCurrent(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function get(){return this.getCurrent().width}},{key:"height",get:function get(){return this.getCurrent().height}}]),ViewPort}(),ec=function(){function Point(t,r){gu(this,Point),this.x=t,this.y=r}return vu(Point,[{key:"angleTo",value:function angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function applyTransform(t){var r=this.x,i=this.y,o=r*t[0]+i*t[2]+t[4],a=r*t[1]+i*t[3]+t[5];this.x=o,this.y=a}}],[{key:"parse",value:function parse(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=toNumbers(t),o=fu(i,2),a=o[0],u=void 0===a?r:a,l=o[1],h=void 0===l?r:l;return new Point(u,h)}},{key:"parseScale",value:function parseScale(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=toNumbers(t),o=fu(i,2),a=o[0],u=void 0===a?r:a,l=o[1],h=void 0===l?u:l;return new Point(u,h)}},{key:"parsePath",value:function parsePath(t){for(var r=toNumbers(t),i=r.length,o=[],a=0;a<i;a+=2)o.push(new Point(r[a],r[a+1]));return o}}]),Point}(),rc=function(){function Mouse(t){gu(this,Mouse),this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return vu(Mouse,[{key:"isWorking",value:function isWorking(){return this.working}},{key:"start",value:function start(){if(!this.working){var t=this.screen,r=this.onClick,i=this.onMouseMove,o=t.ctx.canvas;o.onclick=r,o.onmousemove=i,this.working=!0}}},{key:"stop",value:function stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function hasEvents(){return this.working&&this.events.length>0}},{key:"runEvents",value:function runEvents(){if(this.working){var t=this.screen,r=this.events,i=this.eventElements,o=t.ctx.canvas.style;o&&(o.cursor=""),r.forEach((function(t,r){for(var o=t.run,a=i[r];a;)o(a),a=a.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function checkPath(t,r){if(this.working&&r){var i=this.events,o=this.eventElements;i.forEach((function(i,a){var u=i.x,l=i.y;!o[a]&&r.isPointInPath&&r.isPointInPath(u,l)&&(o[a]=t)}))}}},{key:"checkBoundingBox",value:function checkBoundingBox(t,r){if(this.working&&r){var i=this.events,o=this.eventElements;i.forEach((function(i,a){var u=i.x,l=i.y;!o[a]&&r.isPointInBox(u,l)&&(o[a]=t)}))}}},{key:"mapXY",value:function mapXY(t,r){for(var i=this.screen,o=i.window,a=i.ctx,u=new ec(t,r),l=a.canvas;l;)u.x-=l.offsetLeft,u.y-=l.offsetTop,l=l.offsetParent;return o.scrollX&&(u.x+=o.scrollX),o.scrollY&&(u.y+=o.scrollY),u}},{key:"onClick",value:function onClick(t){var r=this.mapXY((t||event).clientX,(t||event).clientY),i=r.x,o=r.y;this.events.push({type:"onclick",x:i,y:o,run:function run(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function onMouseMove(t){var r=this.mapXY((t||event).clientX,(t||event).clientY),i=r.x,o=r.y;this.events.push({type:"onmousemove",x:i,y:o,run:function run(t){t.onMouseMove&&t.onMouseMove()}})}}]),Mouse}(),nc="undefined"!=typeof window?window:null,ic="undefined"!=typeof fetch?fetch.bind(void 0):null,oc=function(){function Screen(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.fetch,o=void 0===i?ic:i,a=r.window,u=void 0===a?nc:a;gu(this,Screen),this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new tc,this.mouse=new rc(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=u,this.fetch=o}return vu(Screen,[{key:"wait",value:function wait(t){this.waits.push(t)}},{key:"ready",value:function ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function isReady(){if(this.isReadyLock)return!0;var t=this.waits.every((function(t){return t()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function setViewBox(t){var r=t.document,i=t.ctx,o=t.aspectRatio,a=t.width,u=t.desiredWidth,l=t.height,h=t.desiredHeight,p=t.minX,y=void 0===p?0:p,g=t.minY,v=void 0===g?0:g,d=t.refX,x=t.refY,b=t.clip,S=void 0!==b&&b,w=t.clipX,k=void 0===w?0:w,E=t.clipY,P=void 0===E?0:E,R=compressSpaces(o).replace(/^defer\s/,"").split(" "),C=fu(R,2),A=C[0]||"xMidYMid",T=C[1]||"meet",_=a/u,M=l/h,O=Math.min(_,M),N=Math.max(_,M),D=u,L=h;"meet"===T&&(D*=O,L*=O),"slice"===T&&(D*=N,L*=N);var $=new Ju(r,"refX",d),I=new Ju(r,"refY",x),V=$.hasValue()&&I.hasValue();if(V&&i.translate(-O*$.getPixels("x"),-O*I.getPixels("y")),S){var j=O*k,B=O*P;i.beginPath(),i.moveTo(j,B),i.lineTo(a,B),i.lineTo(a,l),i.lineTo(j,l),i.closePath(),i.clip()}if(!V){var G="meet"===T&&O===M,z="slice"===T&&N===M,U="meet"===T&&O===_,q="slice"===T&&N===_;/^xMid/.test(A)&&(G||z)&&i.translate(a/2-D/2,0),/YMid$/.test(A)&&(U||q)&&i.translate(0,l/2-L/2),/^xMax/.test(A)&&(G||z)&&i.translate(a-D,0),/YMax$/.test(A)&&(U||q)&&i.translate(0,l-L)}switch(!0){case"none"===A:i.scale(_,M);break;case"meet"===T:i.scale(O,O);break;case"slice"===T:i.scale(N,N)}i.translate(-y,-v)}},{key:"start",value:function start(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.enableRedraw,a=void 0!==o&&o,u=i.ignoreMouse,l=void 0!==u&&u,h=i.ignoreAnimation,p=void 0!==h&&h,y=i.ignoreDimensions,g=void 0!==y&&y,v=i.ignoreClear,d=void 0!==v&&v,x=i.forceRedraw,b=i.scaleWidth,S=i.scaleHeight,w=i.offsetX,k=i.offsetY,E=this.FRAMERATE,P=this.mouse,R=1e3/E;if(this.frameDuration=R,this.readyPromise=new Promise((function(t){r.resolveReady=t})),this.isReady()&&this.render(t,g,d,b,S,w,k),a){var C=Date.now(),A=C,T=0,_=function tick(){C=Date.now(),(T=C-A)>=R&&(A=C-T%R,r.shouldUpdate(p,x)&&(r.render(t,g,d,b,S,w,k),P.runEvents())),r.intervalId=Cu(tick)};l||P.start(),this.intervalId=Cu(_)}}},{key:"stop",value:function stop(){this.intervalId&&(Cu.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function shouldUpdate(t,r){if(!t){var i=this.frameDuration,shouldUpdate=this.animations.reduce((function(t,r){return r.update(i)||t}),!1);if(shouldUpdate)return!0}return!("function"!=typeof r||!r())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function render(t,r,i,o,a,u,l){var h=this.CLIENT_WIDTH,p=this.CLIENT_HEIGHT,y=this.viewPort,g=this.ctx,v=this.isFirstRender,d=g.canvas;y.clear(),d.width&&d.height?y.setCurrent(d.width,d.height):y.setCurrent(h,p);var x=t.getStyle("width"),b=t.getStyle("height");!r&&(v||"number"!=typeof o&&"number"!=typeof a)&&(x.hasValue()&&(d.width=x.getPixels("x"),d.style&&(d.style.width="".concat(d.width,"px"))),b.hasValue()&&(d.height=b.getPixels("y"),d.style&&(d.style.height="".concat(d.height,"px"))));var S=d.clientWidth||d.width,w=d.clientHeight||d.height;if(r&&x.hasValue()&&b.hasValue()&&(S=x.getPixels("x"),w=b.getPixels("y")),y.setCurrent(S,w),"number"==typeof u&&t.getAttribute("x",!0).setValue(u),"number"==typeof l&&t.getAttribute("y",!0).setValue(l),"number"==typeof o||"number"==typeof a){var k=toNumbers(t.getAttribute("viewBox").getString()),E=0,P=0;if("number"==typeof o){var R=t.getStyle("width");R.hasValue()?E=R.getPixels("x")/o:isNaN(k[2])||(E=k[2]/o)}if("number"==typeof a){var C=t.getStyle("height");C.hasValue()?P=C.getPixels("y")/a:isNaN(k[3])||(P=k[3]/a)}E||(E=P),P||(P=E),t.getAttribute("width",!0).setValue(o),t.getAttribute("height",!0).setValue(a);var A=t.getStyle("transform",!0,!0);A.setValue("".concat(A.getString()," scale(").concat(1/E,", ").concat(1/P,")"))}i||g.clearRect(0,0,S,w),t.render(g),v&&(this.isFirstRender=!1)}}]),Screen}();oc.defaultWindow=nc,oc.defaultFetch=ic;var ac=oc.defaultFetch,sc="undefined"!=typeof DOMParser?DOMParser:null,uc=function(){function Parser(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.fetch,i=void 0===r?ac:r,o=t.DOMParser,a=void 0===o?sc:o;gu(this,Parser),this.fetch=i,this.DOMParser=a}var t,r;return vu(Parser,[{key:"parse",value:(r=pu(hu.mark((function _callee(t){return hu.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!/^</.test(t)){r.next=2;break}return r.abrupt("return",this.parseFromString(t));case 2:return r.abrupt("return",this.load(t));case 3:case"end":return r.stop()}}),_callee,this)}))),function parse(t){return r.apply(this,arguments)})},{key:"parseFromString",value:function parseFromString(t){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(t,"image/svg+xml"))}catch(i){return this.checkDocument(r.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function checkDocument(t){var r=t.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return t}},{key:"load",value:(t=pu(hu.mark((function _callee2(t){var r,i;return hu.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.fetch(t);case 2:return r=o.sent,o.next=5,r.text();case 5:return i=o.sent,o.abrupt("return",this.parseFromString(i));case 7:case"end":return o.stop()}}),_callee2,this)}))),function load(r){return t.apply(this,arguments)})}]),Parser}(),cc=function(){function Translate(t,r){gu(this,Translate),this.type="translate",this.point=null,this.point=ec.parse(r)}return vu(Translate,[{key:"apply",value:function apply(t){var r=this.point,i=r.x,o=r.y;t.translate(i||0,o||0)}},{key:"unapply",value:function unapply(t){var r=this.point,i=r.x,o=r.y;t.translate(-1*i||0,-1*o||0)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.point,i=r.x,o=r.y;t.applyTransform([1,0,0,1,i||0,o||0])}}]),Translate}(),lc=function(){function Rotate(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];gu(this,Rotate),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var o=toNumbers(r);this.angle=new Ju(t,"angle",o[0]),this.cx=(o[1]||0)+(i[0]||0),this.cy=(o[2]||0)+(i[1]||0)}return vu(Rotate,[{key:"apply",value:function apply(t){var r=this.cx,i=this.cy,o=this.angle;t.translate(r,i),t.rotate(o.getRadians()),t.translate(-r,-i)}},{key:"unapply",value:function unapply(t){var r=this.cx,i=this.cy,o=this.angle;t.translate(r,i),t.rotate(-1*o.getRadians()),t.translate(-r,-i)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.cx,i=this.cy,o=this.angle.getRadians();t.applyTransform([1,0,0,1,r||0,i||0]),t.applyTransform([Math.cos(o),Math.sin(o),-Math.sin(o),Math.cos(o),0,0]),t.applyTransform([1,0,0,1,-r||0,-i||0])}}]),Rotate}(),fc=function(){function Scale(t,r){gu(this,Scale),this.type="scale",this.scale=null;var i=ec.parseScale(r);0!==i.x&&0!==i.y||(i.x=Zu,i.y=Zu),this.scale=i}return vu(Scale,[{key:"apply",value:function apply(t){var r=this.scale,i=r.x,o=r.y;t.scale(i,o||i)}},{key:"unapply",value:function unapply(t){var r=this.scale,i=r.x,o=r.y;t.scale(1/i,1/o||i)}},{key:"applyToPoint",value:function applyToPoint(t){var r=this.scale,i=r.x,o=r.y;t.applyTransform([i||0,0,0,o||0,0,0])}}]),Scale}(),hc=function(){function Matrix(t,r){gu(this,Matrix),this.type="matrix",this.matrix=[],this.matrix=toNumbers(r)}return vu(Matrix,[{key:"apply",value:function apply(t){var r=this.matrix;t.transform(r[0],r[1],r[2],r[3],r[4],r[5])}},{key:"unapply",value:function unapply(t){var r=this.matrix,i=r[0],o=r[2],a=r[4],u=r[1],l=r[3],h=r[5],p=1/(i*(1*l-0*h)-o*(1*u-0*h)+a*(0*u-0*l));t.transform(p*(1*l-0*h),p*(0*h-1*u),p*(0*a-1*o),p*(1*i-0*a),p*(o*h-a*l),p*(a*u-i*h))}},{key:"applyToPoint",value:function applyToPoint(t){t.applyTransform(this.matrix)}}]),Matrix}();function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var pc=function(t){Du(Skew,t);var r=function _createSuper(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(Skew);function Skew(t,i){var o;return gu(this,Skew),(o=r.call(this,t,i)).type="skew",o.angle=null,o.angle=new Ju(t,"angle",i),o}return Skew}(hc);function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var yc=function(t){Du(SkewX,t);var r=function _createSuper$1(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$1()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(SkewX);function SkewX(t,i){var o;return gu(this,SkewX),(o=r.call(this,t,i)).type="skewX",o.matrix=[1,0,Math.tan(o.angle.getRadians()),1,0,0],o}return SkewX}(pc);function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var gc=function(t){Du(SkewY,t);var r=function _createSuper$2(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$2()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(SkewY);function SkewY(t,i){var o;return gu(this,SkewY),(o=r.call(this,t,i)).type="skewY",o.matrix=[1,Math.tan(o.angle.getRadians()),0,1,0,0],o}return SkewY}(pc);var vc=function(){function Transform(t,r,i){var o=this;gu(this,Transform),this.document=t,this.transforms=[];var a=function parseTransforms(t){return compressSpaces(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r),u=i?toNumbers(i):[];a.forEach((function(t){if("none"!==t){var r=function parseTransform(t){var r=t.split("("),i=fu(r,2),o=i[0],a=i[1];return[o.trim(),a.trim().replace(")","")]}(t),i=fu(r,2),a=i[0],l=i[1],h=Transform.transformTypes[a];void 0!==h&&o.transforms.push(new h(o.document,l,u))}}))}return vu(Transform,[{key:"apply",value:function apply(t){for(var r=this.transforms,i=r.length,o=0;o<i;o++)r[o].apply(t)}},{key:"unapply",value:function unapply(t){for(var r=this.transforms,i=r.length-1;i>=0;i--)r[i].unapply(t)}},{key:"applyToPoint",value:function applyToPoint(t){for(var r=this.transforms,i=r.length,o=0;o<i;o++)r[o].applyToPoint(t)}}],[{key:"fromElement",value:function fromElement(t,r){var i=r.getStyle("transform",!1,!0),o=r.getStyle("transform-origin",!1,!0);return i.hasValue()?new Transform(t,i.getString(),o.getString()):null}}]),Transform}();vc.transformTypes={translate:cc,rotate:lc,scale:fc,matrix:hc,skewX:yc,skewY:gc};var dc=function(){function Element(t,r){var i=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(gu(this,Element),this.document=t,this.node=r,this.captureTextNodes=o,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(r){var o=normalizeAttributeName(r.nodeName);i.attributes[o]=new Ju(t,o,r.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var a=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));a.forEach((function(r){if(r){var o=r.split(":").map((function(t){return t.trim()})),a=fu(o,2),u=a[0],l=a[1];i.styles[u]=new Ju(t,u,l)}}))}var u=t.definitions,l=this.getAttribute("id");l.hasValue()&&(u[l.getValue()]||(u[l.getValue()]=this)),Array.from(r.childNodes).forEach((function(r){if(1===r.nodeType)i.addChild(r);else if(o&&(3===r.nodeType||4===r.nodeType)){var a=t.createTextNode(r);a.getText().length>0&&i.addChild(a)}}))}}return vu(Element,[{key:"getAttribute",value:function getAttribute(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.attributes[t];if(!i&&r){var o=new Ju(this.document,t,"");return this.attributes[t]=o,o}return i||Ju.empty(this.document)}},{key:"getHrefAttribute",value:function getHrefAttribute(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return Ju.empty(this.document)}},{key:"getStyle",value:function getStyle(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.styles[t];if(o)return o;var a=this.getAttribute(t);if(a&&a.hasValue())return this.styles[t]=a,a;if(!i){var u=this.parent;if(u){var l=u.getStyle(t);if(l&&l.hasValue())return l}}if(r){var h=new Ju(this.document,t,"");return this.styles[t]=h,h}return o||Ju.empty(this.document)}},{key:"render",value:function render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function setContext(t){}},{key:"applyEffects",value:function applyEffects(t){var r=vc.fromElement(this.document,this);r&&r.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var o=i.getDefinition();o&&o.apply(t)}}},{key:"clearContext",value:function clearContext(t){}},{key:"renderChildren",value:function renderChildren(t){this.children.forEach((function(r){r.render(t)}))}},{key:"addChild",value:function addChild(t){var r=t instanceof Element?t:this.document.createElement(t);r.parent=this,Element.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function matchesSelector(t){var r=this.node;if("function"==typeof r.matches)return r.matches(t);var i=r.getAttribute("class");return!(!i||""===i)&&i.split(" ").some((function(r){if(".".concat(r)===t)return!0}))}},{key:"addStylesFromStyleDefinition",value:function addStylesFromStyleDefinition(){var t=this.document,r=t.styles,i=t.stylesSpecificity;for(var o in r)if("@"!==o[0]&&this.matchesSelector(o)){var a=r[o],u=i[o];if(a)for(var l in a){var h=this.stylesSpecificity[l];void 0===h&&(h="000"),u>=h&&(this.styles[l]=a[l],this.stylesSpecificity[l]=u)}}}},{key:"removeStyles",value:function removeStyles(t,r){return r.reduce((function(r,i){var o=t.getStyle(i);if(!o.hasValue())return r;var a=o.getString();return o.setValue(""),[].concat(Fu(r),[[i,a]])}),[])}},{key:"restoreStyles",value:function restoreStyles(t,r){r.forEach((function(r){var i=fu(r,2),o=i[0],a=i[1];t.getStyle(o,!0).setValue(a)}))}}]),Element}();function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}dc.ignoreChildTypes=["title"];var mc=function(t){Du(UnknownElement,t);var r=function _createSuper$3(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$3()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(UnknownElement);function UnknownElement(t,i,o){return gu(this,UnknownElement),r.call(this,t,i,o)}return UnknownElement}(dc);function wrapFontFamily(t){var r=t.trim();return/^('|")/.test(r)?r:'"'.concat(r,'"')}function prepareFontStyle(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return r;default:return/^oblique\s+(-|)\d+deg$/.test(r)?r:""}}function prepareFontWeight(t){if(!t)return"";var r=t.trim().toLowerCase();switch(r){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return r;default:return/^[\d.]+$/.test(r)?r:""}}var xc=function(){function Font(t,r,i,o,a,u){gu(this,Font);var l=u?"string"==typeof u?Font.parse(u):u:{};this.fontFamily=a||l.fontFamily,this.fontSize=o||l.fontSize,this.fontStyle=t||l.fontStyle,this.fontWeight=i||l.fontWeight,this.fontVariant=r||l.fontVariant}return vu(Font,[{key:"toString",value:function toString(){return[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===Ca?t:t.trim().split(",").map(wrapFontFamily).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function parse(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i="",o="",a="",u="",l="",h=compressSpaces(t).trim().split(" "),p={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return h.forEach((function(t){switch(!0){case!p.fontStyle&&Font.styles.includes(t):"inherit"!==t&&(i=t),p.fontStyle=!0;break;case!p.fontVariant&&Font.variants.includes(t):"inherit"!==t&&(o=t),p.fontStyle=!0,p.fontVariant=!0;break;case!p.fontWeight&&Font.weights.includes(t):"inherit"!==t&&(a=t),p.fontStyle=!0,p.fontVariant=!0,p.fontWeight=!0;break;case!p.fontSize:if("inherit"!==t){var r=t.split("/"),h=fu(r,1);u=h[0]}p.fontStyle=!0,p.fontVariant=!0,p.fontWeight=!0,p.fontSize=!0;break;default:"inherit"!==t&&(l+=t)}})),new Font(i,o,a,u,l,r)}}]),Font}();xc.styles="normal|italic|oblique|inherit",xc.variants="normal|small-caps|inherit",xc.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var bc=function(){function BoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;gu(this,BoundingBox),this.x1=t,this.y1=r,this.x2=i,this.y2=o,this.addPoint(t,r),this.addPoint(i,o)}return vu(BoundingBox,[{key:"addPoint",value:function addPoint(t,r){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==r&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}},{key:"addX",value:function addX(t){this.addPoint(t,null)}},{key:"addY",value:function addY(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function addBoundingBox(t){if(t){var r=t.x1,i=t.y1,o=t.x2,a=t.y2;this.addPoint(r,i),this.addPoint(o,a)}}},{key:"sumCubic",value:function sumCubic(t,r,i,o,a){return Math.pow(1-t,3)*r+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*o+Math.pow(t,3)*a}},{key:"bezierCurveAdd",value:function bezierCurveAdd(t,r,i,o,a){var u=6*r-12*i+6*o,l=-3*r+9*i-9*o+3*a,h=3*i-3*r;if(0!==l){var p=Math.pow(u,2)-4*h*l;if(!(p<0)){var y=(-u+Math.sqrt(p))/(2*l);0<y&&y<1&&(t?this.addX(this.sumCubic(y,r,i,o,a)):this.addY(this.sumCubic(y,r,i,o,a)));var g=(-u-Math.sqrt(p))/(2*l);0<g&&g<1&&(t?this.addX(this.sumCubic(g,r,i,o,a)):this.addY(this.sumCubic(g,r,i,o,a)))}}else{if(0===u)return;var v=-h/u;0<v&&v<1&&(t?this.addX(this.sumCubic(v,r,i,o,a)):this.addY(this.sumCubic(v,r,i,o,a)))}}},{key:"addBezierCurve",value:function addBezierCurve(t,r,i,o,a,u,l,h){this.addPoint(t,r),this.addPoint(l,h),this.bezierCurveAdd(!0,t,i,a,l),this.bezierCurveAdd(!1,r,o,u,h)}},{key:"addQuadraticCurve",value:function addQuadraticCurve(t,r,i,o,a,u){var l=t+2/3*(i-t),h=r+2/3*(o-r),p=l+1/3*(a-t),y=h+1/3*(u-r);this.addBezierCurve(t,r,l,p,h,y,a,u)}},{key:"isPointInBox",value:function isPointInBox(t,r){var i=this.x1,o=this.y1,a=this.x2,u=this.y2;return i<=t&&t<=a&&o<=r&&r<=u}},{key:"x",get:function get(){return this.x1}},{key:"y",get:function get(){return this.y1}},{key:"width",get:function get(){return this.x2-this.x1}},{key:"height",get:function get(){return this.y2-this.y1}}]),BoundingBox}();function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Sc=function(t){Du(RenderedElement,t);var r=function _createSuper$4(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$4()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(RenderedElement);function RenderedElement(){var t;return gu(this,RenderedElement),(t=r.apply(this,arguments)).modifiedEmSizeStack=!1,t}return vu(RenderedElement,[{key:"calculateOpacity",value:function calculateOpacity(){for(var t=1,r=this;r;){var i=r.getStyle("opacity",!1,!0);i.hasValue()&&(t*=i.getNumber()),r=r.parent}return t}},{key:"setContext",value:function setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!r){var i=this.getStyle("fill"),o=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),u=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var l=i.getFillStyleDefinition(this,o);l&&(t.fillStyle=l)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var h=i.getColor();"inherit"!==h&&(t.fillStyle="none"===h?"rgba(0,0,0,0)":h)}if(o.hasValue()){var p=new Ju(this.document,"fill",t.fillStyle).addOpacity(o).getColor();t.fillStyle=p}if(a.isUrlDefinition()){var y=a.getFillStyleDefinition(this,u);y&&(t.strokeStyle=y)}else if(a.hasValue()){"currentColor"===a.getString()&&a.setValue(this.getStyle("color").getColor());var g=a.getString();"inherit"!==g&&(t.strokeStyle="none"===g?"rgba(0,0,0,0)":g)}if(u.hasValue()){var v=new Ju(this.document,"stroke",t.strokeStyle).addOpacity(u).getString();t.strokeStyle=v}var d=this.getStyle("stroke-width");if(d.hasValue()){var x=d.getPixels();t.lineWidth=x||Zu}var b=this.getStyle("stroke-linecap"),S=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),k=this.getStyle("paint-order"),E=this.getStyle("stroke-dasharray"),P=this.getStyle("stroke-dashoffset");if(b.hasValue()&&(t.lineCap=b.getString()),S.hasValue()&&(t.lineJoin=S.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),k.hasValue()&&(t.paintOrder=k.getValue()),E.hasValue()&&"none"!==E.getString()){var R=toNumbers(E.getString());void 0!==t.setLineDash?t.setLineDash(R):void 0!==t.webkitLineDash?t.webkitLineDash=R:void 0===t.mozDash||1===R.length&&0===R[0]||(t.mozDash=R);var C=P.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=C:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=C:void 0!==t.mozDashOffset&&(t.mozDashOffset=C)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var A=this.getStyle("font"),T=this.getStyle("font-style"),_=this.getStyle("font-variant"),M=this.getStyle("font-weight"),O=this.getStyle("font-size"),N=this.getStyle("font-family"),D=new xc(T.getString(),_.getString(),M.getString(),O.hasValue()?"".concat(O.getPixels(!0),"px"):"",N.getString(),xc.parse(A.getString(),t.font));T.setValue(D.fontStyle),_.setValue(D.fontVariant),M.setValue(D.fontWeight),O.setValue(D.fontSize),N.setValue(D.fontFamily),t.font=D.toString(),O.isPixels()&&(this.document.emSize=O.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function clearContext(t){ju(Ou(RenderedElement.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),RenderedElement}(dc);function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var wc=function(t){Du(TextElement,t);var r=function _createSuper$5(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$5()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TextElement);function TextElement(t,i,o){var a;return gu(this,TextElement),(a=r.call(this,t,i,(this instanceof TextElement?this.constructor:void 0)===TextElement||o)).type="text",a.x=0,a.y=0,a.measureCache=-1,a}return vu(TextElement,[{key:"setContext",value:function setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ju(Ou(TextElement.prototype),"setContext",this).call(this,t,r);var i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}},{key:"initializeCoordinates",value:function initializeCoordinates(t){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var r=this.getAttribute("dx"),i=this.getAttribute("dy");r.hasValue()&&(this.x+=r.getPixels("x")),i.hasValue()&&(this.y+=i.getPixels("y")),this.x+=this.getAnchorDelta(t,this,0)}},{key:"getBoundingBox",value:function getBoundingBox(t){var r=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(t);var i=null;return this.children.forEach((function(o,a){var u=r.getChildBoundingBox(t,r,r,a);i?i.addBoundingBox(u):i=u})),i}},{key:"getFontSize",value:function getFontSize(){var t=this.document,r=this.parent,i=xc.parse(t.ctx.font).fontSize;return r.getStyle("font-size").getNumber(i)}},{key:"getTElementBoundingBox",value:function getTElementBoundingBox(t){var r=this.getFontSize();return new bc(this.x,this.y-r,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function getGlyph(t,r,i){var o=r[i],a=null;if(t.isArabic){var u=r.length,l=r[i-1],h=r[i+1],p="isolated";(0===i||" "===l)&&i<u-2&&" "!==h&&(p="terminal"),i>0&&" "!==l&&i<u-2&&" "!==h&&(p="medial"),i>0&&" "!==l&&(i===u-1||" "===h)&&(p="initial"),void 0!==t.glyphs[o]&&((a=t.glyphs[o][p])||"glyph"!==t.glyphs[o].type||(a=t.glyphs[o]))}else a=t.glyphs[o];return a||(a=t.missingGlyph),a}},{key:"getText",value:function getText(){return""}},{key:"getTextFromNode",value:function getTextFromNode(t){var r=t||this.node,i=Array.from(r.parentNode.childNodes),o=i.indexOf(r),a=i.length-1,u=compressSpaces(r.value||r.text||r.textContent||"");return 0===o&&(u=function trimLeft(t){return t.replace(/^[\n \t]+/,"")}(u)),o===a&&(u=function trimRight(t){return t.replace(/[\n \t]+$/,"")}(u)),u}},{key:"renderChildren",value:function renderChildren(t){var r=this;if("text"===this.type){this.initializeCoordinates(t),this.children.forEach((function(i,o){r.renderChild(t,r,r,o)}));var i=this.document.screen.mouse;i.isWorking()&&i.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function renderTElementChildren(t){var r=this.document,i=this.parent,o=this.getText(),a=i.getStyle("font-family").getDefinition();if(a)for(var u=a.fontFace.unitsPerEm,l=xc.parse(r.ctx.font),h=i.getStyle("font-size").getNumber(l.fontSize),p=i.getStyle("font-style").getString(l.fontStyle),y=h/u,g=a.isRTL?o.split("").reverse().join(""):o,v=toNumbers(i.getAttribute("dx").getString()),d=g.length,x=0;x<d;x++){var b=this.getGlyph(a,g,x);t.translate(this.x,this.y),t.scale(y,-y);var S=t.lineWidth;t.lineWidth=t.lineWidth*u/h,"italic"===p&&t.transform(1,0,.4,1,0,0),b.render(t),"italic"===p&&t.transform(1,0,-.4,1,0,0),t.lineWidth=S,t.scale(1/y,-1/y),t.translate(-this.x,-this.y),this.x+=h*(b.horizAdvX||a.horizAdvX)/u,void 0===v[x]||isNaN(v[x])||(this.x+=v[x])}else{var w=this.x,k=this.y;"stroke"===t.paintOrder?(t.strokeStyle&&t.strokeText(o,w,k),t.fillStyle&&t.fillText(o,w,k)):(t.fillStyle&&t.fillText(o,w,k),t.strokeStyle&&t.strokeText(o,w,k))}}},{key:"getAnchorDelta",value:function getAnchorDelta(t,r,i){var o=this.getStyle("text-anchor").getString("start");if("start"!==o){for(var a=r.children,u=a.length,l=null,h=0,p=i;p<u&&(l=a[p],!(p>i&&l.getAttribute("x").hasValue()||l.getAttribute("text-anchor").hasValue()));p++)h+=l.measureTextRecursive(t);return-1*("end"===o?h:h/2)}return 0}},{key:"adjustChildCoordinates",value:function adjustChildCoordinates(t,r,i,o){var a=i.children[o];if("function"!=typeof a.measureText)return a;t.save(),a.setContext(t,!0);var u=a.getAttribute("x"),l=a.getAttribute("y"),h=a.getAttribute("dx"),p=a.getAttribute("dy"),y=a.getAttribute("text-anchor").getString("start");if(0===o&&"textNode"!==a.type&&(u.hasValue()||u.setValue(r.getAttribute("x").getValue("0")),l.hasValue()||l.setValue(r.getAttribute("y").getValue("0")),h.hasValue()||h.setValue(r.getAttribute("dx").getValue("0")),p.hasValue()||p.setValue(r.getAttribute("dy").getValue("0"))),u.hasValue()){if(a.x=u.getPixels("x")+r.getAnchorDelta(t,i,o),"start"!==y){var g=a.measureTextRecursive(t);a.x+=-1*("end"===y?g:g/2)}h.hasValue()&&(a.x+=h.getPixels("x"))}else{if("start"!==y){var v=a.measureTextRecursive(t);r.x+=-1*("end"===y?v:v/2)}h.hasValue()&&(r.x+=h.getPixels("x")),a.x=r.x}return r.x=a.x+a.measureText(t),l.hasValue()?(a.y=l.getPixels("y"),p.hasValue()&&(a.y+=p.getPixels("y"))):(p.hasValue()&&(r.y+=p.getPixels("y")),a.y=r.y),r.y=a.y,a.clearContext(t),t.restore(),a}},{key:"getChildBoundingBox",value:function getChildBoundingBox(t,r,i,o){var a=this.adjustChildCoordinates(t,r,i,o),u=a.getBoundingBox(t);return u?(a.children.forEach((function(i,o){var l=r.getChildBoundingBox(t,r,a,o);u.addBoundingBox(l)})),u):null}},{key:"renderChild",value:function renderChild(t,r,i,o){var a=this.adjustChildCoordinates(t,r,i,o);a.render(t),a.children.forEach((function(i,o){r.renderChild(t,r,a,o)}))}},{key:"measureTextRecursive",value:function measureTextRecursive(t){return this.children.reduce((function(r,i){return r+i.measureTextRecursive(t)}),this.measureText(t))}},{key:"measureText",value:function measureText(t){var r=this.measureCache;if(~r)return r;var i=this.getText(),o=this.measureTargetText(t,i);return this.measureCache=o,o}},{key:"measureTargetText",value:function measureTargetText(t,r){if(!r.length)return 0;var i=this.parent,o=i.getStyle("font-family").getDefinition();if(o){for(var a=this.getFontSize(),u=o.isRTL?r.split("").reverse().join(""):r,l=toNumbers(i.getAttribute("dx").getString()),h=u.length,p=0,y=0;y<h;y++){p+=(this.getGlyph(o,u,y).horizAdvX||o.horizAdvX)*a/o.fontFace.unitsPerEm,void 0===l[y]||isNaN(l[y])||(p+=l[y])}return p}if(!t.measureText)return 10*r.length;t.save(),this.setContext(t,!0);var g=t.measureText(r).width;return this.clearContext(t),t.restore(),g}}]),TextElement}(Sc);function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var kc=function(t){Du(TSpanElement,t);var r=function _createSuper$6(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$6()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TSpanElement);function TSpanElement(t,i,o){var a;return gu(this,TSpanElement),(a=r.call(this,t,i,(this instanceof TSpanElement?this.constructor:void 0)===TSpanElement||o)).type="tspan",a.text=a.children.length>0?"":a.getTextFromNode(),a}return vu(TSpanElement,[{key:"getText",value:function getText(){return this.text}}]),TSpanElement}(wc);function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ec=function(t){Du(TextNode,t);var r=function _createSuper$7(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$7()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TextNode);function TextNode(){var t;return gu(this,TextNode),(t=r.apply(this,arguments)).type="textNode",t}return TextNode}(kc);var Pc=function(){function PathParser(t){gu(this,PathParser),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=function preparePath(t){return compressSpaces(t.replace(/,/gm," ").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2").replace(/([0-9])([+\-])/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $2 $3 ")).trim()}(t).split(" ")}return vu(PathParser,[{key:"reset",value:function reset(){this.i=-1,this.command="",this.previousCommand="",this.start=new ec(0,0),this.control=new ec(0,0),this.current=new ec(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function isEnd(){return this.i>=this.tokens.length-1}},{key:"isCommandOrEnd",value:function isCommandOrEnd(){if(this.isEnd())return!0;var t=this.i,r=this.tokens;return/^[A-Za-z]$/.test(r[t+1])}},{key:"isRelativeCommand",value:function isRelativeCommand(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0;default:return!1}}},{key:"getToken",value:function getToken(){return this.i++,this.tokens[this.i]}},{key:"getScalar",value:function getScalar(){return parseFloat(this.getToken())}},{key:"nextCommand",value:function nextCommand(){this.previousCommand=this.command,this.command=this.getToken()}},{key:"getPoint",value:function getPoint(){var t=new ec(this.getScalar(),this.getScalar());return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function getAsControlPoint(){var t=this.getPoint();return this.control=t,t}},{key:"getAsCurrentPoint",value:function getAsCurrentPoint(){var t=this.getPoint();return this.current=t,t}},{key:"getReflectedControlPoint",value:function getReflectedControlPoint(){var t=this.previousCommand.toLowerCase();if("c"!==t&&"s"!==t&&"q"!==t&&"t"!==t)return this.current;var r=this.current,i=r.x,o=r.y,a=this.control,u=a.x,l=a.y;return new ec(2*i-u,2*o-l)}},{key:"makeAbsolute",value:function makeAbsolute(t){if(this.isRelativeCommand()){var r=this.current,i=r.x,o=r.y;t.x+=i,t.y+=o}return t}},{key:"addMarker",value:function addMarker(t,r,i){var o=this.points,a=this.angles;i&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=o[o.length-1].angleTo(i)),this.addMarkerAngle(t,r?r.angleTo(t):null)}},{key:"addMarkerAngle",value:function addMarkerAngle(t,r){this.points.push(t),this.angles.push(r)}},{key:"getMarkerPoints",value:function getMarkerPoints(){return this.points}},{key:"getMarkerAngles",value:function getMarkerAngles(){for(var t=this.angles,r=t.length,i=0;i<r;i++)if(!t[i])for(var o=i+1;o<r;o++)if(t[o]){t[i]=t[o];break}return t}}]),PathParser}();function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Rc=function(t){Du(PathElement,t);var r=function _createSuper$8(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$8()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(PathElement);function PathElement(t,i,o){var a;return gu(this,PathElement),(a=r.call(this,t,i,o)).type="path",a.pathParser=null,a.pathParser=new Pc(a.getAttribute("d").getString()),a}return vu(PathElement,[{key:"path",value:function path(t){var r=this.pathParser,i=new bc;for(r.reset(),t&&t.beginPath();!r.isEnd();)switch(r.nextCommand(),r.command){case"M":case"m":this.pathM(t,i);break;case"L":case"l":this.pathL(t,i);break;case"H":case"h":this.pathH(t,i);break;case"V":case"v":this.pathV(t,i);break;case"C":case"c":this.pathC(t,i);break;case"S":case"s":this.pathS(t,i);break;case"Q":case"q":this.pathQ(t,i);break;case"T":case"t":this.pathT(t,i);break;case"A":case"a":this.pathA(t,i);break;case"Z":case"z":this.pathZ(t,i)}return i}},{key:"getBoundingBox",value:function getBoundingBox(t){return this.path()}},{key:"getMarkers",value:function getMarkers(){var t=this.pathParser,r=t.getMarkerPoints(),i=t.getMarkerAngles();return r.map((function(t,r){return[t,i[r]]}))}},{key:"renderChildren",value:function renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var r=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==r.getString("inherit")?t.fill(r.getString()):t.fill()),""!==t.strokeStyle&&t.stroke();var i=this.getMarkers();if(i){var o=i.length-1,a=this.getStyle("marker-start"),u=this.getStyle("marker-mid"),l=this.getStyle("marker-end");if(a.isUrlDefinition()){var h=a.getDefinition(),p=fu(i[0],2),y=p[0],g=p[1];h.render(t,y,g)}if(u.isUrlDefinition())for(var v=u.getDefinition(),d=1;d<o;d++){var x=fu(i[d],2),b=x[0],S=x[1];v.render(t,b,S)}if(l.isUrlDefinition()){var w=l.getDefinition(),k=fu(i[o],2),E=k[0],P=k[1];w.render(t,E,P)}}}},{key:"pathM",value:function pathM(t,r){var i=this.pathParser,o=i.getAsCurrentPoint(),a=o.x,u=o.y;for(i.addMarker(o),r.addPoint(a,u),t&&t.moveTo(a,u),i.start=i.current;!i.isCommandOrEnd();){var l=i.getAsCurrentPoint(),h=l.x,p=l.y;i.addMarker(l,i.start),r.addPoint(h,p),t&&t.lineTo(h,p)}}},{key:"pathL",value:function pathL(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getAsCurrentPoint(),u=a.x,l=a.y;i.addMarker(a,o),r.addPoint(u,l),t&&t.lineTo(u,l)}}},{key:"pathH",value:function pathH(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=new ec((i.isRelativeCommand()?o.x:0)+i.getScalar(),o.y);i.addMarker(a,o),i.current=a,r.addPoint(a.x,a.y),t&&t.lineTo(a.x,a.y)}}},{key:"pathV",value:function pathV(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=new ec(o.x,(i.isRelativeCommand()?o.y:0)+i.getScalar());i.addMarker(a,o),i.current=a,r.addPoint(a.x,a.y),t&&t.lineTo(a.x,a.y)}}},{key:"pathC",value:function pathC(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getPoint(),u=i.getAsControlPoint(),l=i.getAsCurrentPoint();i.addMarker(l,u,a),r.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,l.x,l.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,l.x,l.y)}}},{key:"pathS",value:function pathS(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getReflectedControlPoint(),u=i.getAsControlPoint(),l=i.getAsCurrentPoint();i.addMarker(l,u,a),r.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,l.x,l.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,l.x,l.y)}}},{key:"pathQ",value:function pathQ(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getAsControlPoint(),u=i.getAsCurrentPoint();i.addMarker(u,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}}},{key:"pathT",value:function pathT(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getReflectedControlPoint();i.control=a;var u=i.getAsCurrentPoint();i.addMarker(u,a,a),r.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}}},{key:"pathA",value:function pathA(t,r){for(var i=this.pathParser;!i.isCommandOrEnd();){var o=i.current,a=i.getScalar(),u=i.getScalar(),l=i.getScalar()*(Math.PI/180),h=i.getScalar(),p=i.getScalar(),y=i.getAsCurrentPoint(),g=new ec(Math.cos(l)*(o.x-y.x)/2+Math.sin(l)*(o.y-y.y)/2,-Math.sin(l)*(o.x-y.x)/2+Math.cos(l)*(o.y-y.y)/2),v=Math.pow(g.x,2)/Math.pow(a,2)+Math.pow(g.y,2)/Math.pow(u,2);v>1&&(a*=Math.sqrt(v),u*=Math.sqrt(v));var d=(h===p?-1:1)*Math.sqrt((Math.pow(a,2)*Math.pow(u,2)-Math.pow(a,2)*Math.pow(g.y,2)-Math.pow(u,2)*Math.pow(g.x,2))/(Math.pow(a,2)*Math.pow(g.y,2)+Math.pow(u,2)*Math.pow(g.x,2)));isNaN(d)&&(d=0);var x=new ec(d*a*g.y/u,d*-u*g.x/a),b=new ec((o.x+y.x)/2+Math.cos(l)*x.x-Math.sin(l)*x.y,(o.y+y.y)/2+Math.sin(l)*x.x+Math.cos(l)*x.y),S=vectorsAngle([1,0],[(g.x-x.x)/a,(g.y-x.y)/u]),w=[(g.x-x.x)/a,(g.y-x.y)/u],k=[(-g.x-x.x)/a,(-g.y-x.y)/u],E=vectorsAngle(w,k);vectorsRatio(w,k)<=-1&&(E=Math.PI),vectorsRatio(w,k)>=1&&(E=0);var P=1-p?1:-1,R=S+P*(E/2),C=new ec(b.x+a*Math.cos(R),b.y+u*Math.sin(R));if(i.addMarkerAngle(C,R-P*Math.PI/2),i.addMarkerAngle(y,R-P*Math.PI),r.addPoint(y.x,y.y),t&&!isNaN(S)&&!isNaN(E)){var A=a>u?a:u,T=a>u?1:a/u,_=a>u?u/a:1;t.translate(b.x,b.y),t.rotate(l),t.scale(T,_),t.arc(0,0,A,S,S+E,Boolean(1-p)),t.scale(1/T,1/_),t.rotate(-l),t.translate(-b.x,-b.y)}}}},{key:"pathZ",value:function pathZ(t,r){var i=this.pathParser;t&&r.x1!==r.x2&&r.y1!==r.y2&&t.closePath(),i.current=i.start}}]),PathElement}(Sc);function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Cc=function(t){Du(SVGElement,t);var r=function _createSuper$9(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$9()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(SVGElement);function SVGElement(){var t;return gu(this,SVGElement),(t=r.apply(this,arguments)).type="svg",t.root=!1,t}return vu(SVGElement,[{key:"clearContext",value:function clearContext(t){ju(Ou(SVGElement.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function setContext(t){var r=this.document,i=r.screen,o=r.window,a=t.canvas;if(i.setDefaults(t),a.style&&void 0!==t.font&&o&&void 0!==o.getComputedStyle){t.font=o.getComputedStyle(a).getPropertyValue("font");var u=new Ju(r,"fontSize",xc.parse(t.font).fontSize);u.hasValue()&&(r.rootEmSize=u.getPixels("y"),r.emSize=r.rootEmSize)}ju(Ou(SVGElement.prototype),"setContext",this).call(this,t),this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y"));var l=i.viewPort,h=l.width,p=l.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var y=this.getAttribute("refX"),g=this.getAttribute("refY"),v=this.getAttribute("viewBox"),d=v.hasValue()?toNumbers(v.getString()):null,x=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),b=0,S=0,w=0,k=0;d&&(b=d[0],S=d[1]),this.root||(h=this.getStyle("width").getPixels("x"),p=this.getStyle("height").getPixels("y"),"marker"===this.type&&(w=b,k=S,b=0,S=0)),i.viewPort.setCurrent(h,p),d&&(h=d[2],p=d[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:h,height:i.viewPort.height,desiredHeight:p,minX:b,minY:S,refX:y.getValue(),refY:g.getValue(),clip:x,clipX:w,clipY:k}),d&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(h,p))}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.getAttribute("width",!0),a=this.getAttribute("height",!0),u=this.getAttribute("viewBox"),l=this.getAttribute("style"),h=o.getNumber(0),p=a.getNumber(0);if(i)if("string"==typeof i)this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var y=this.getAttribute("preserveAspectRatio");y.hasValue()&&y.setValue(y.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(o.setValue(t),a.setValue(r),u.hasValue()||u.setValue("0 0 ".concat(h||t," ").concat(p||r)),l.hasValue()){var g=this.getStyle("width"),v=this.getStyle("height");g.hasValue()&&g.setValue("".concat(t,"px")),v.hasValue()&&v.setValue("".concat(r,"px"))}}}]),SVGElement}(Sc);function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ac=function(t){Du(RectElement,t);var r=function _createSuper$a(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$a()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(RectElement);function RectElement(){var t;return gu(this,RectElement),(t=r.apply(this,arguments)).type="rect",t}return vu(RectElement,[{key:"path",value:function path(t){var r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y"),u=this.getAttribute("rx"),l=this.getAttribute("ry"),h=u.getPixels("x"),p=l.getPixels("y");if(u.hasValue()&&!l.hasValue()&&(p=h),l.hasValue()&&!u.hasValue()&&(h=p),h=Math.min(h,o/2),p=Math.min(p,a/2),t){var y=(Math.sqrt(2)-1)/3*4;t.beginPath(),a>0&&o>0&&(t.moveTo(r+h,i),t.lineTo(r+o-h,i),t.bezierCurveTo(r+o-h+y*h,i,r+o,i+p-y*p,r+o,i+p),t.lineTo(r+o,i+a-p),t.bezierCurveTo(r+o,i+a-p+y*p,r+o-h+y*h,i+a,r+o-h,i+a),t.lineTo(r+h,i+a),t.bezierCurveTo(r+h-y*h,i+a,r,i+a-p+y*p,r,i+a-p),t.lineTo(r,i+p),t.bezierCurveTo(r,i+p-y*p,r+h-y*h,i,r+h,i),t.closePath())}return new bc(r,i,r+o,i+a)}},{key:"getMarkers",value:function getMarkers(){return null}}]),RectElement}(Rc);function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Tc=function(t){Du(CircleElement,t);var r=function _createSuper$b(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$b()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(CircleElement);function CircleElement(){var t;return gu(this,CircleElement),(t=r.apply(this,arguments)).type="circle",t}return vu(CircleElement,[{key:"path",value:function path(t){var r=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),o=this.getAttribute("r").getPixels();return t&&o>0&&(t.beginPath(),t.arc(r,i,o,0,2*Math.PI,!1),t.closePath()),new bc(r-o,i-o,r+o,i+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),CircleElement}(Rc);function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var _c=function(t){Du(EllipseElement,t);var r=function _createSuper$c(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$c()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(EllipseElement);function EllipseElement(){var t;return gu(this,EllipseElement),(t=r.apply(this,arguments)).type="ellipse",t}return vu(EllipseElement,[{key:"path",value:function path(t){var r=(Math.sqrt(2)-1)/3*4,i=this.getAttribute("rx").getPixels("x"),o=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),u=this.getAttribute("cy").getPixels("y");return t&&i>0&&o>0&&(t.beginPath(),t.moveTo(a+i,u),t.bezierCurveTo(a+i,u+r*o,a+r*i,u+o,a,u+o),t.bezierCurveTo(a-r*i,u+o,a-i,u+r*o,a-i,u),t.bezierCurveTo(a-i,u-r*o,a-r*i,u-o,a,u-o),t.bezierCurveTo(a+r*i,u-o,a+i,u-r*o,a+i,u),t.closePath()),new bc(a-i,u-o,a+i,u+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),EllipseElement}(Rc);function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Mc=function(t){Du(LineElement,t);var r=function _createSuper$d(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$d()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(LineElement);function LineElement(){var t;return gu(this,LineElement),(t=r.apply(this,arguments)).type="line",t}return vu(LineElement,[{key:"getPoints",value:function getPoints(){return[new ec(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new ec(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function path(t){var r=this.getPoints(),i=fu(r,2),o=i[0],a=o.x,u=o.y,l=i[1],h=l.x,p=l.y;return t&&(t.beginPath(),t.moveTo(a,u),t.lineTo(h,p)),new bc(a,u,h,p)}},{key:"getMarkers",value:function getMarkers(){var t=this.getPoints(),r=fu(t,2),i=r[0],o=r[1],a=i.angleTo(o);return[[i,a],[o,a]]}}]),LineElement}(Rc);function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Oc=function(t){Du(PolylineElement,t);var r=function _createSuper$e(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$e()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(PolylineElement);function PolylineElement(t,i,o){var a;return gu(this,PolylineElement),(a=r.call(this,t,i,o)).type="polyline",a.points=[],a.points=ec.parsePath(a.getAttribute("points").getString()),a}return vu(PolylineElement,[{key:"path",value:function path(t){var r=this.points,i=fu(r,1)[0],o=i.x,a=i.y,u=new bc(o,a);return t&&(t.beginPath(),t.moveTo(o,a)),r.forEach((function(r){var i=r.x,o=r.y;u.addPoint(i,o),t&&t.lineTo(i,o)})),u}},{key:"getMarkers",value:function getMarkers(){var t=this.points,r=t.length-1,i=[];return t.forEach((function(o,a){a!==r&&i.push([o,o.angleTo(t[a+1])])})),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}}]),PolylineElement}(Rc);function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Nc=function(t){Du(PolygonElement,t);var r=function _createSuper$f(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$f()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(PolygonElement);function PolygonElement(){var t;return gu(this,PolygonElement),(t=r.apply(this,arguments)).type="polygon",t}return vu(PolygonElement,[{key:"path",value:function path(t){var r=ju(Ou(PolygonElement.prototype),"path",this).call(this,t),i=fu(this.points,1)[0],o=i.x,a=i.y;return t&&(t.lineTo(o,a),t.closePath()),r}}]),PolygonElement}(Oc);function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Dc=function(t){Du(PatternElement,t);var r=function _createSuper$g(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$g()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(PatternElement);function PatternElement(){var t;return gu(this,PatternElement),(t=r.apply(this,arguments)).type="pattern",t}return vu(PatternElement,[{key:"createPattern",value:function createPattern(t,r,i){var o=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),u=new Cc(this.document,null);u.attributes.viewBox=new Ju(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.width=new Ju(this.document,"width","".concat(o,"px")),u.attributes.height=new Ju(this.document,"height","".concat(a,"px")),u.attributes.transform=new Ju(this.document,"transform",this.getAttribute("patternTransform").getValue()),u.children=this.children;var l=this.document.createCanvas(o,a),h=l.getContext("2d"),p=this.getAttribute("x"),y=this.getAttribute("y");p.hasValue()&&y.hasValue()&&h.translate(p.getPixels("x",!0),y.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var g=-1;g<=1;g++)for(var v=-1;v<=1;v++)h.save(),u.attributes.x=new Ju(this.document,"x",g*l.width),u.attributes.y=new Ju(this.document,"y",v*l.height),u.render(h),h.restore();return t.createPattern(l,"repeat")}}]),PatternElement}(dc);function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Lc=function(t){Du(MarkerElement,t);var r=function _createSuper$h(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$h()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(MarkerElement);function MarkerElement(){var t;return gu(this,MarkerElement),(t=r.apply(this,arguments)).type="marker",t}return vu(MarkerElement,[{key:"render",value:function render(t,r,i){if(r){var o=r.x,a=r.y,u=this.getAttribute("orient").getValue("auto"),l=this.getAttribute("markerUnits").getValue("strokeWidth");t.translate(o,a),"auto"===u&&t.rotate(i),"strokeWidth"===l&&t.scale(t.lineWidth,t.lineWidth),t.save();var h=new Cc(this.document,null);h.type=this.type,h.attributes.viewBox=new Ju(this.document,"viewBox",this.getAttribute("viewBox").getValue()),h.attributes.refX=new Ju(this.document,"refX",this.getAttribute("refX").getValue()),h.attributes.refY=new Ju(this.document,"refY",this.getAttribute("refY").getValue()),h.attributes.width=new Ju(this.document,"width",this.getAttribute("markerWidth").getValue()),h.attributes.height=new Ju(this.document,"height",this.getAttribute("markerHeight").getValue()),h.attributes.overflow=new Ju(this.document,"overflow",this.getAttribute("overflow").getValue()),h.attributes.fill=new Ju(this.document,"fill",this.getAttribute("fill").getColor("black")),h.attributes.stroke=new Ju(this.document,"stroke",this.getAttribute("stroke").getValue("none")),h.children=this.children,h.render(t),t.restore(),"strokeWidth"===l&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===u&&t.rotate(-i),t.translate(-o,-a)}}}]),MarkerElement}(dc);function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var $c=function(t){Du(DefsElement,t);var r=function _createSuper$i(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$i()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(DefsElement);function DefsElement(){var t;return gu(this,DefsElement),(t=r.apply(this,arguments)).type="defs",t}return vu(DefsElement,[{key:"render",value:function render(){}}]),DefsElement}(dc);function _isNativeReflectConstruct$j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Ic=function(t){Du(GElement,t);var r=function _createSuper$j(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$j()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(GElement);function GElement(){var t;return gu(this,GElement),(t=r.apply(this,arguments)).type="g",t}return vu(GElement,[{key:"getBoundingBox",value:function getBoundingBox(t){var r=new bc;return this.children.forEach((function(i){r.addBoundingBox(i.getBoundingBox(t))})),r}}]),GElement}(Sc);function _isNativeReflectConstruct$k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Fc=function(t){Du(GradientElement,t);var r=function _createSuper$k(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$k()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(GradientElement);function GradientElement(t,i,o){var a;gu(this,GradientElement),(a=r.call(this,t,i,o)).attributesToInherit=["gradientUnits"],a.stops=[];var u=_u(a),l=u.stops;return u.children.forEach((function(t){"stop"===t.type&&l.push(t)})),a}return vu(GradientElement,[{key:"getGradientUnits",value:function getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function createGradient(t,r,i){var o=this,a=this;this.getHrefAttribute().hasValue()&&(a=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(a));var u=a.stops,l=this.getGradient(t,r);if(!l)return this.addParentOpacity(i,u[u.length-1].color);if(u.forEach((function(t){l.addColorStop(t.offset,o.addParentOpacity(i,t.color))})),this.getAttribute("gradientTransform").hasValue()){var h=this.document,p=h.screen,y=p.MAX_VIRTUAL_PIXELS,g=p.viewPort,v=fu(g.viewPorts,1)[0],d=new Ac(h,null);d.attributes.x=new Ju(h,"x",-y/3),d.attributes.y=new Ju(h,"y",-y/3),d.attributes.width=new Ju(h,"width",y),d.attributes.height=new Ju(h,"height",y);var x=new Ic(h,null);x.attributes.transform=new Ju(h,"transform",this.getAttribute("gradientTransform").getValue()),x.children=[d];var b=new Cc(h,null);b.attributes.x=new Ju(h,"x",0),b.attributes.y=new Ju(h,"y",0),b.attributes.width=new Ju(h,"width",v.width),b.attributes.height=new Ju(h,"height",v.height),b.children=[x];var S=h.createCanvas(v.width,v.height),w=S.getContext("2d");return w.fillStyle=l,b.render(w),w.createPattern(S,"no-repeat")}return l}},{key:"inheritStopContainer",value:function inheritStopContainer(t){var r=this;this.attributesToInherit.forEach((function(i){!r.getAttribute(i).hasValue()&&t.getAttribute(i).hasValue()&&r.getAttribute(i,!0).setValue(t.getAttribute(i).getValue())}))}},{key:"addParentOpacity",value:function addParentOpacity(t,r){return t.hasValue()?new Ju(this.document,"color",r).addOpacity(t).getColor():r}}]),GradientElement}(dc);function _isNativeReflectConstruct$l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Vc=function(t){Du(LinearGradientElement,t);var r=function _createSuper$l(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$l()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(LinearGradientElement);function LinearGradientElement(t,i,o){var a;return gu(this,LinearGradientElement),(a=r.call(this,t,i,o)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return vu(LinearGradientElement,[{key:"getGradient",value:function getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),o=i?r.getBoundingBox(t):null;if(i&&!o)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=i?o.x+o.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),u=i?o.y+o.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),l=i?o.x+o.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),h=i?o.y+o.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===l&&u===h?null:t.createLinearGradient(a,u,l,h)}}]),LinearGradientElement}(Fc);function _isNativeReflectConstruct$m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var jc=function(t){Du(RadialGradientElement,t);var r=function _createSuper$m(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$m()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(RadialGradientElement);function RadialGradientElement(t,i,o){var a;return gu(this,RadialGradientElement),(a=r.call(this,t,i,o)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return vu(RadialGradientElement,[{key:"getGradient",value:function getGradient(t,r){var i="objectBoundingBox"===this.getGradientUnits(),o=r.getBoundingBox(t);if(i&&!o)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=i?o.x+o.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),u=i?o.y+o.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),l=a,h=u;this.getAttribute("fx").hasValue()&&(l=i?o.x+o.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(h=i?o.y+o.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var p=i?(o.width+o.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),y=this.getAttribute("fr").getPixels();return t.createRadialGradient(l,h,y,a,u,p)}}]),RadialGradientElement}(Fc);function _isNativeReflectConstruct$n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Bc=function(t){Du(StopElement,t);var r=function _createSuper$n(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$n()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(StopElement);function StopElement(t,i,o){var a;gu(this,StopElement),(a=r.call(this,t,i,o)).type="stop";var u=Math.max(0,Math.min(1,a.getAttribute("offset").getNumber())),l=a.getStyle("stop-opacity"),h=a.getStyle("stop-color",!0);return""===h.getString()&&h.setValue("#000"),l.hasValue()&&(h=h.addOpacity(l)),a.offset=u,a.color=h.getColor(),a}return StopElement}(dc);function _isNativeReflectConstruct$o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Gc=function(t){Du(AnimateElement,t);var r=function _createSuper$o(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$o()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(AnimateElement);function AnimateElement(t,i,o){var a;return gu(this,AnimateElement),(a=r.call(this,t,i,o)).type="animate",a.duration=0,a.initialValue=null,a.initialUnits="",a.removed=!1,a.frozen=!1,t.screen.animations.push(_u(a)),a.begin=a.getAttribute("begin").getMilliseconds(),a.maxDuration=a.begin+a.getAttribute("dur").getMilliseconds(),a.from=a.getAttribute("from"),a.to=a.getAttribute("to"),a.values=a.getAttribute("values"),a.values.hasValue()&&a.values.setValue(a.values.getString().split(";")),a}return vu(AnimateElement,[{key:"getProperty",value:function getProperty(){var t=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}},{key:"calcValue",value:function calcValue(){var t=this.initialUnits,r=this.getProgress(),i=r.progress,o=r.from,a=r.to,u=o.getNumber()+(a.getNumber()-o.getNumber())*i;return"%"===t&&(u*=100),"".concat(u).concat(t)}},{key:"update",value:function update(t){var r=this.parent,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var o=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==o||this.frozen){if("remove"===o&&!this.removed)return this.removed=!0,i.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=i.getString();return!1}this.duration+=t;var a=!1;if(this.begin<this.duration){var u=this.calcValue(),l=this.getAttribute("type");if(l.hasValue()){var h=l.getString();u="".concat(h,"(").concat(u,")")}i.setValue(u),a=!0}return a}},{key:"getProgress",value:function getProgress(){var t=this.document,r=this.values,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var o=i.progress*(r.getValue().length-1),a=Math.floor(o),u=Math.ceil(o);i.from=new Ju(t,"from",parseFloat(r.getValue()[a])),i.to=new Ju(t,"to",parseFloat(r.getValue()[u])),i.progress=(o-a)/(u-a)}else i.from=this.from,i.to=this.to;return i}}]),AnimateElement}(dc);function _isNativeReflectConstruct$p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var zc=function(t){Du(AnimateColorElement,t);var r=function _createSuper$p(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$p()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(AnimateColorElement);function AnimateColorElement(){var t;return gu(this,AnimateColorElement),(t=r.apply(this,arguments)).type="animateColor",t}return vu(AnimateColorElement,[{key:"calcValue",value:function calcValue(){var t=this.getProgress(),r=t.progress,i=t.from,o=t.to,a=new Au(i.getColor()),u=new Au(o.getColor());if(a.ok&&u.ok){var l=a.r+(u.r-a.r)*r,h=a.g+(u.g-a.g)*r,p=a.b+(u.b-a.b)*r;return"rgb(".concat(parseInt(l,10),", ").concat(parseInt(h,10),", ").concat(parseInt(p,10),")")}return this.getAttribute("from").getColor()}}]),AnimateColorElement}(Gc);function _isNativeReflectConstruct$q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Uc=function(t){Du(AnimateTransformElement,t);var r=function _createSuper$q(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$q()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(AnimateTransformElement);function AnimateTransformElement(){var t;return gu(this,AnimateTransformElement),(t=r.apply(this,arguments)).type="animateTransform",t}return vu(AnimateTransformElement,[{key:"calcValue",value:function calcValue(){var t=this.getProgress(),r=t.progress,i=t.from,o=t.to,a=toNumbers(i.getString()),u=toNumbers(o.getString());return a.map((function(t,i){return t+(u[i]-t)*r})).join(" ")}}]),AnimateTransformElement}(Gc);function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function _unsupportedIterableToArray$1(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray$1(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray$1(t,r)}(t))){var r=0,i=function F(){};return{s:i,n:function n(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,u=!0,l=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){l=!0,a=t},f:function f(){try{u||null==o.return||o.return()}finally{if(l)throw a}}}}function _arrayLikeToArray$1(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _isNativeReflectConstruct$r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var qc=function(t){Du(FontElement,t);var r=function _createSuper$r(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$r()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FontElement);function FontElement(t,i,o){var a;gu(this,FontElement),(a=r.call(this,t,i,o)).type="font",a.glyphs={},a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber();var u,l=t.definitions,h=_createForOfIteratorHelper(_u(a).children);try{for(h.s();!(u=h.n()).done;){var p=u.value;switch(p.type){case"font-face":a.fontFace=p;var y=p.getStyle("font-family");y.hasValue()&&(l[y.getString()]=_u(a));break;case"missing-glyph":a.missingGlyph=p;break;case"glyph":var g=p;g.arabicForm?(a.isRTL=!0,a.isArabic=!0,void 0===a.glyphs[g.unicode]&&(a.glyphs[g.unicode]={}),a.glyphs[g.unicode][g.arabicForm]=g):a.glyphs[g.unicode]=g}}}catch(t){h.e(t)}finally{h.f()}return a}return vu(FontElement,[{key:"render",value:function render(){}}]),FontElement}(dc);function _isNativeReflectConstruct$s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Wc=function(t){Du(FontFaceElement,t);var r=function _createSuper$s(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$s()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FontFaceElement);function FontFaceElement(t,i,o){var a;return gu(this,FontFaceElement),(a=r.call(this,t,i,o)).type="font-face",a.ascent=a.getAttribute("ascent").getNumber(),a.descent=a.getAttribute("descent").getNumber(),a.unitsPerEm=a.getAttribute("units-per-em").getNumber(),a}return FontFaceElement}(dc);function _isNativeReflectConstruct$t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Hc=function(t){Du(MissingGlyphElement,t);var r=function _createSuper$t(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$t()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(MissingGlyphElement);function MissingGlyphElement(){var t;return gu(this,MissingGlyphElement),(t=r.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return MissingGlyphElement}(Rc);function _isNativeReflectConstruct$u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Xc=function(t){Du(GlyphElement,t);var r=function _createSuper$u(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$u()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(GlyphElement);function GlyphElement(t,i,o){var a;return gu(this,GlyphElement),(a=r.call(this,t,i,o)).type="glyph",a.horizAdvX=a.getAttribute("horiz-adv-x").getNumber(),a.unicode=a.getAttribute("unicode").getString(),a.arabicForm=a.getAttribute("arabic-form").getString(),a}return GlyphElement}(Rc);function _isNativeReflectConstruct$v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Yc=function(t){Du(TRefElement,t);var r=function _createSuper$v(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$v()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TRefElement);function TRefElement(){var t;return gu(this,TRefElement),(t=r.apply(this,arguments)).type="tref",t}return vu(TRefElement,[{key:"getText",value:function getText(){var t=this.getHrefAttribute().getDefinition();if(t){var r=t.children[0];if(r)return r.getText()}return""}}]),TRefElement}(wc);function _isNativeReflectConstruct$w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Qc=function(t){Du(AElement,t);var r=function _createSuper$w(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$w()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(AElement);function AElement(t,i,o){var a;gu(this,AElement),(a=r.call(this,t,i,o)).type="a";var u=i.childNodes,l=u[0],h=u.length>0&&Array.from(u).every((function(t){return 3===t.nodeType}));return a.hasText=h,a.text=h?a.getTextFromNode(l):"",a}return vu(AElement,[{key:"getText",value:function getText(){return this.text}},{key:"renderChildren",value:function renderChildren(t){if(this.hasText){ju(Ou(AElement.prototype),"renderChildren",this).call(this,t);var r=this.document,i=this.x,o=this.y,a=r.screen.mouse,u=new Ju(r,"fontSize",xc.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new bc(i,o-u.getPixels("y"),i+this.measureText(t),o))}else if(this.children.length>0){var l=new Ic(this.document,null);l.children=this.children,l.parent=this,l.render(t)}}},{key:"onClick",value:function onClick(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}]),AElement}(wc);function _createForOfIteratorHelper$1(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function _unsupportedIterableToArray$1$1(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray$1$1(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray$1$1(t,r)}(t))){var r=0,i=function F(){};return{s:i,n:function n(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,u=!0,l=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){l=!0,a=t},f:function f(){try{u||null==o.return||o.return()}finally{if(l)throw a}}}}function _arrayLikeToArray$1$1(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _isNativeReflectConstruct$x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Kc=function(t){Du(TextPathElement,t);var r=function _createSuper$x(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$x()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TextPathElement);function TextPathElement(t,i,o){var a;gu(this,TextPathElement),(a=r.call(this,t,i,o)).type="textPath",a.textWidth=0,a.textHeight=0,a.pathLength=-1,a.glyphInfo=null,a.letterSpacingCache=[],a.measuresCache=new Map([["",0]]);var u=a.getHrefAttribute().getDefinition();return a.text=a.getTextFromNode(),a.dataArray=a.parsePathData(u),a}return vu(TextPathElement,[{key:"getText",value:function getText(){return this.text}},{key:"path",value:function path(t){var r=this.dataArray;t&&t.beginPath(),r.forEach((function(r){var i=r.command,o=r.points;switch(i){case"L":t&&t.lineTo(o[0],o[1]);break;case"M":t&&t.moveTo(o[0],o[1]);break;case"C":t&&t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t&&t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],u=o[1],l=o[2],h=o[3],p=o[4],y=o[5],g=o[6],v=o[7],d=l>h?l:h,x=l>h?1:l/h,b=l>h?h/l:1;t&&(t.translate(a,u),t.rotate(g),t.scale(x,b),t.arc(0,0,d,p,p+y,Boolean(1-v)),t.scale(1/x,1/b),t.rotate(-g),t.translate(-a,-u));break;case"z":t&&t.closePath()}}))}},{key:"renderChildren",value:function renderChildren(t){this.setTextData(t),t.save();var r=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),o=this.glyphInfo,a=t.fillStyle;"underline"===r&&t.beginPath(),o.forEach((function(a,u){var l=a.p0,h=a.p1,p=a.text;t.save(),t.translate(l.x,l.y),t.rotate(o[u].rotation),t.fillStyle&&t.fillText(p,0,0),t.strokeStyle&&t.strokeText(p,0,0),t.restore(),"underline"===r&&(0===u&&t.moveTo(l.x,l.y+i/8),t.lineTo(h.x,h.y+i/5))})),"underline"===r&&(t.lineWidth=i/20,t.strokeStyle=a,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function getLetterSpacingAt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function findSegmentToFitChar(t,r,i,o,a,u,l,h){var p=u,y=this.measureText(t,l);" "===l&&"justify"===r&&i<o&&(y+=(o-i)/a),h>-1&&(p+=this.getLetterSpacingAt(h));var g=this.textHeight/20,v={p0:this.getEquidistantPointOnPath(p,g),p1:this.getEquidistantPointOnPath(p+y,g)};return{offset:p+=y,segment:v}}},{key:"measureText",value:function measureText(t,r){var i=this.measuresCache,o=r||this.getText();if(i.has(o))return i.get(o);var a=this.measureTargetText(t,o);return i.set(o,a),a}},{key:"setTextData",value:function setTextData(t){var r=this;if(!this.glyphInfo){var i=this.getText(),o=i.split(""),a=i.split(" ").length-1,u=toNumbers(this.parent.getAttribute("dx").getString("0")),l=this.parent.getStyle("text-anchor").getString("start"),h=this.getStyle("letter-spacing"),p=this.parent.getStyle("letter-spacing"),y=0;h.hasValue()&&"inherit"!==h.getValue()?h.hasValue()&&"initial"!==h.getValue()&&"unset"!==h.getValue()&&(y=h.getPixels()):y=p.getPixels();var g=[],v=i.length;this.letterSpacingCache=g;for(var d=0;d<v;d++)g.push(void 0!==u[d]?u[d]:y);var x=g.reduce((function(t,r){return t+r||0}),0);this.textWidth=this.measureText(t),this.textHeight=this.getFontSize();var b=Math.max(this.textWidth+x,0);this.glyphInfo=[];var S=this.getPathLength(),w=this.getStyle("startOffset").getNumber(0)*S,k=0;"middle"!==l&&"center"!==l||(k=-b/2),"end"!==l&&"right"!==l||(k=-b),k+=w,o.forEach((function(i,u){var h=r.findSegmentToFitChar(t,l,b,S,a,k,i,u),p=h.offset,y=h.segment;if(k=p,y.p0&&y.p1){var g=r.getLineLength(y.p0.x,y.p0.y,y.p1.x,y.p1.y),v=r.getPointOnLine(0+g/2,y.p0.x,y.p0.y,y.p1.x,y.p1.y),d=Math.atan2(y.p1.y-y.p0.y,y.p1.x-y.p0.x);r.glyphInfo.push({transposeX:v.x,transposeY:v.y,text:o[u],p0:y.p0,p1:y.p1,rotation:d})}}))}}},{key:"parsePathData",value:function parsePathData(t){if(this.pathLength=-1,!t)return[];var r=[],i=t.pathParser;for(i.reset();!i.isEnd();){var o=i.current,a=o?o.x:0,u=o?o.y:0,l="",h=[];i.nextCommand();var p=i.command.toUpperCase();switch(i.command){case"M":case"m":l=this.pathM(i,h);break;case"L":case"l":l=this.pathL(i,h);break;case"H":case"h":l=this.pathH(i,h);break;case"V":case"v":l=this.pathV(i,h);break;case"C":case"c":this.pathC(i,h);break;case"S":case"s":l=this.pathS(i,h);break;case"Q":case"q":this.pathQ(i,h);break;case"T":case"t":l=this.pathT(i,h);break;case"A":case"a":h=this.pathA(i);break;case"Z":case"z":i.current=i.start}"Z"!==p?r.push({command:l||p,points:h,start:{x:a,y:u},pathLength:this.calcLength(a,u,l||p,h)}):r.push({command:"z",points:[],pathLength:0})}return r}},{key:"pathM",value:function pathM(t,r){var i=t.getAsCurrentPoint();for(r.push(i.x,i.y),t.start=t.current;!t.isCommandOrEnd();){var o=t.getAsCurrentPoint();return r.push(o.x,o.y),"L"}}},{key:"pathL",value:function pathL(t,r){for(;!t.isCommandOrEnd();){var i=t.getAsCurrentPoint();r.push(i.x,i.y)}return"L"}},{key:"pathH",value:function pathH(t,r){for(;!t.isCommandOrEnd();){var i=t.current,o=new ec((t.isRelativeCommand()?i.x:0)+t.getScalar(),i.y);r.push(o.x,o.y),t.current=o}return"L"}},{key:"pathV",value:function pathV(t,r){for(;!t.isCommandOrEnd();){var i=t.current,o=new ec(i.x,(t.isRelativeCommand()?i.y:0)+t.getScalar());r.push(o.x,o.y),t.current=o}return"L"}},{key:"pathC",value:function pathC(t,r){for(;!t.isCommandOrEnd();){var i=t.getPoint(),o=t.getAsControlPoint(),a=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y,a.x,a.y)}}},{key:"pathS",value:function pathS(t,r){for(;!t.isCommandOrEnd();){var i=t.getReflectedControlPoint(),o=t.getAsControlPoint(),a=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y,a.x,a.y)}return"C"}},{key:"pathQ",value:function pathQ(t,r){for(;!t.isCommandOrEnd();){var i=t.getAsControlPoint(),o=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y)}}},{key:"pathT",value:function pathT(t,r){for(;!t.isCommandOrEnd();){var i=t.getReflectedControlPoint();t.control=i;var o=t.getAsCurrentPoint();r.push(i.x,i.y,o.x,o.y)}return"Q"}},{key:"pathA",value:function pathA(t){for(;!t.isCommandOrEnd();){var r=t.current,i=t.getScalar(),o=t.getScalar(),a=t.getScalar()*(Math.PI/180),u=t.getScalar(),l=t.getScalar(),h=t.getAsCurrentPoint(),p=new ec(Math.cos(a)*(r.x-h.x)/2+Math.sin(a)*(r.y-h.y)/2,-Math.sin(a)*(r.x-h.x)/2+Math.cos(a)*(r.y-h.y)/2),y=Math.pow(p.x,2)/Math.pow(i,2)+Math.pow(p.y,2)/Math.pow(o,2);y>1&&(i*=Math.sqrt(y),o*=Math.sqrt(y));var g=(u===l?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(o,2)-Math.pow(i,2)*Math.pow(p.y,2)-Math.pow(o,2)*Math.pow(p.x,2))/(Math.pow(i,2)*Math.pow(p.y,2)+Math.pow(o,2)*Math.pow(p.x,2)));isNaN(g)&&(g=0);var v=new ec(g*i*p.y/o,g*-o*p.x/i),d=new ec((r.x+h.x)/2+Math.cos(a)*v.x-Math.sin(a)*v.y,(r.y+h.y)/2+Math.sin(a)*v.x+Math.cos(a)*v.y),x=vectorsAngle([1,0],[(p.x-v.x)/i,(p.y-v.y)/o]),b=[(p.x-v.x)/i,(p.y-v.y)/o],S=[(-p.x-v.x)/i,(-p.y-v.y)/o],w=vectorsAngle(b,S);return vectorsRatio(b,S)<=-1&&(w=Math.PI),vectorsRatio(b,S)>=1&&(w=0),0===l&&w>0&&(w-=2*Math.PI),1===l&&w<0&&(w+=2*Math.PI),[d.x,d.y,i,o,x,w,a,l]}}},{key:"calcLength",value:function calcLength(t,r,i,o){var a=0,u=null,l=null,h=0;switch(i){case"L":return this.getLineLength(t,r,o[0],o[1]);case"C":for(a=0,u=this.getPointOnCubicBezier(0,t,r,o[0],o[1],o[2],o[3],o[4],o[5]),h=.01;h<=1;h+=.01)l=this.getPointOnCubicBezier(h,t,r,o[0],o[1],o[2],o[3],o[4],o[5]),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return a;case"Q":for(a=0,u=this.getPointOnQuadraticBezier(0,t,r,o[0],o[1],o[2],o[3]),h=.01;h<=1;h+=.01)l=this.getPointOnQuadraticBezier(h,t,r,o[0],o[1],o[2],o[3]),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return a;case"A":a=0;var p=o[4],y=o[5],g=o[4]+y,v=Math.PI/180;if(Math.abs(p-g)<v&&(v=Math.abs(p-g)),u=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],p,0),y<0)for(h=p-v;h>g;h-=v)l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;else for(h=p+v;h<g;h+=v)l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],h,0),a+=this.getLineLength(u.x,u.y,l.x,l.y),u=l;return l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],g,0),a+=this.getLineLength(u.x,u.y,l.x,l.y)}return 0}},{key:"getPointOnLine",value:function getPointOnLine(t,r,i,o,a){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:i,h=(a-i)/(o-r+Zu),p=Math.sqrt(t*t/(1+h*h));o<r&&(p*=-1);var y=h*p,g=null;if(o===r)g={x:u,y:l+y};else if((l-i)/(u-r+Zu)===h)g={x:u+p,y:l+y};else{var v=0,d=0,x=this.getLineLength(r,i,o,a);if(x<Zu)return null;var b=(u-r)*(o-r)+(l-i)*(a-i);v=r+(b/=x*x)*(o-r),d=i+b*(a-i);var S=this.getLineLength(u,l,v,d),w=Math.sqrt(t*t-S*S);p=Math.sqrt(w*w/(1+h*h)),o<r&&(p*=-1),g={x:v+p,y:d+(y=h*p)}}return g}},{key:"getPointOnPath",value:function getPointOnPath(t){var r=this.getPathLength(),i=0,o=null;if(t<-5e-5||t-5e-5>r)return null;var a,u=_createForOfIteratorHelper$1(this.dataArray);try{for(u.s();!(a=u.n()).done;){var l=a.value;if(!l||!(l.pathLength<5e-5||i+l.pathLength+5e-5<t)){var h=t-i,p=0;switch(l.command){case"L":o=this.getPointOnLine(h,l.start.x,l.start.y,l.points[0],l.points[1],l.start.x,l.start.y);break;case"A":var y=l.points[4],g=l.points[5],v=l.points[4]+g;if(p=y+h/l.pathLength*g,g<0&&p<v||g>=0&&p>v)break;o=this.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],p,l.points[6]);break;case"C":(p=h/l.pathLength)>1&&(p=1),o=this.getPointOnCubicBezier(p,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case"Q":(p=h/l.pathLength)>1&&(p=1),o=this.getPointOnQuadraticBezier(p,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3])}if(o)return o;break}i+=l.pathLength}}catch(t){u.e(t)}finally{u.f()}return null}},{key:"getLineLength",value:function getLineLength(t,r,i,o){return Math.sqrt((i-t)*(i-t)+(o-r)*(o-r))}},{key:"getPathLength",value:function getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,r){return r.pathLength>0?t+r.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function getPointOnCubicBezier(t,r,i,o,a,u,l,h,p){return{x:h*CB1(t)+u*CB2(t)+o*CB3(t)+r*CB4(t),y:p*CB1(t)+l*CB2(t)+a*CB3(t)+i*CB4(t)}}},{key:"getPointOnQuadraticBezier",value:function getPointOnQuadraticBezier(t,r,i,o,a,u,l){return{x:u*QB1(t)+o*QB2(t)+r*QB3(t),y:l*QB1(t)+a*QB2(t)+i*QB3(t)}}},{key:"getPointOnEllipticalArc",value:function getPointOnEllipticalArc(t,r,i,o,a,u){var l=Math.cos(u),h=Math.sin(u),p=i*Math.cos(a),y=o*Math.sin(a);return{x:t+(p*l-y*h),y:r+(p*h+y*l)}}},{key:"buildEquidistantCache",value:function buildEquidistantCache(t,r){var i=this.getPathLength(),o=r||.25,a=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==o){this.equidistantCache={step:a,precision:o,points:[]};for(var u=0,l=0;l<=i;l+=o){var h=this.getPointOnPath(l),p=this.getPointOnPath(l+o);h&&p&&((u+=this.getLineLength(h.x,h.y,p.x,p.y))>=a&&(this.equidistantCache.points.push({x:h.x,y:h.y,distance:l}),u-=a))}}}},{key:"getEquidistantPointOnPath",value:function getEquidistantPointOnPath(t,r,i){if(this.buildEquidistantCache(r,i),t<0||t-this.getPathLength()>5e-5)return null;var o=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[o]||null}}]),TextPathElement}(wc);function _isNativeReflectConstruct$y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Zc=function(t){Du(ImageElement,t);var r,i,o=function _createSuper$y(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$y()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(ImageElement);function ImageElement(t,r,i){var a;gu(this,ImageElement),(a=o.call(this,t,r,i)).type="image",a.loaded=!1;var u=a.getHrefAttribute().getString();if(!u)return Mu(a);var l=/\.svg$/.test(u);return t.images.push(_u(a)),l?a.loadSvg(u):a.loadImage(u),a.isSvg=l,a}return vu(ImageElement,[{key:"loadImage",value:(i=pu(hu.mark((function _callee(t){var r;return hu.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,this.document.createImage(t);case 3:r=i.sent,this.image=r,i.next=10;break;case 7:i.prev=7,i.t0=i.catch(0),console.error('Error while loading image "'.concat(t,'":'),i.t0);case 10:this.loaded=!0;case 11:case"end":return i.stop()}}),_callee,this,[[0,7]])}))),function loadImage(t){return i.apply(this,arguments)})},{key:"loadSvg",value:(r=pu(hu.mark((function _callee2(t){var r,i;return hu.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,this.document.fetch(t);case 3:return r=o.sent,o.next=6,r.text();case 6:i=o.sent,this.image=i,o.next=13;break;case 10:o.prev=10,o.t0=o.catch(0),console.error('Error while loading image "'.concat(t,'":'),o.t0);case 13:this.loaded=!0;case 14:case"end":return o.stop()}}),_callee2,this,[[0,10]])}))),function loadSvg(t){return r.apply(this,arguments)})},{key:"renderChildren",value:function renderChildren(t){var r=this.document,i=this.image,o=this.loaded,a=this.getAttribute("x").getPixels("x"),u=this.getAttribute("y").getPixels("y"),l=this.getStyle("width").getPixels("x"),h=this.getStyle("height").getPixels("y");if(o&&i&&l&&h){if(t.save(),this.isSvg)r.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:a,offsetY:u,scaleWidth:l,scaleHeight:h}).render();else{var p=this.image;t.translate(a,u),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:l,desiredWidth:p.width,height:h,desiredHeight:p.height}),this.loaded&&(void 0===p.complete||p.complete)&&t.drawImage(p,0,0)}t.restore()}}},{key:"getBoundingBox",value:function getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");return new bc(t,r,t+i,r+o)}}]),ImageElement}(Sc);function _isNativeReflectConstruct$z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Jc=function(t){Du(SymbolElement,t);var r=function _createSuper$z(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$z()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(SymbolElement);function SymbolElement(){var t;return gu(this,SymbolElement),(t=r.apply(this,arguments)).type="symbol",t}return vu(SymbolElement,[{key:"render",value:function render(t){}}]),SymbolElement}(Sc),tl=function(){function SVGFontLoader(t){gu(this,SVGFontLoader),this.document=t,this.loaded=!1,t.fonts.push(this)}var t;return vu(SVGFontLoader,[{key:"load",value:(t=pu(hu.mark((function _callee(t,r){var i,o,a;return hu.wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,i=this.document,u.next=4,i.canvg.parser.load(r);case 4:o=u.sent,a=o.getElementsByTagName("font"),Array.from(a).forEach((function(r){var o=i.createElement(r);i.definitions[t]=o})),u.next=12;break;case 9:u.prev=9,u.t0=u.catch(0),console.error('Error while loading font "'.concat(r,'":'),u.t0);case 12:this.loaded=!0;case 13:case"end":return u.stop()}}),_callee,this,[[0,9]])}))),function load(r,i){return t.apply(this,arguments)})}]),SVGFontLoader}();function _isNativeReflectConstruct$A(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var el=function(t){Du(StyleElement,t);var r=function _createSuper$A(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$A()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(StyleElement);function StyleElement(t,i,o){var a;return gu(this,StyleElement),(a=r.call(this,t,i,o)).type="style",compressSpaces(Array.from(i.childNodes).map((function(t){return t.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((function(r){var i=r.trim();if(i){var o=i.split("{"),a=o[0].split(","),u=o[1].split(";");a.forEach((function(r){var i=r.trim();if(i){var o=t.styles[i]||{};if(u.forEach((function(r){var i=r.indexOf(":"),a=r.substr(0,i).trim(),u=r.substr(i+1,r.length-i).trim();a&&u&&(o[a]=new Ju(t,a,u))})),t.styles[i]=o,t.stylesSpecificity[i]=function getSelectorSpecificity(t){var r=[0,0,0],i=t.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),o=0,a=findSelectorMatch(i,qu),u=fu(a,2);i=u[0],o=u[1],r[1]+=o;var l=findSelectorMatch(i,Wu),h=fu(l,2);i=h[0],o=h[1],r[0]+=o;var p=findSelectorMatch(i,Hu),y=fu(p,2);i=y[0],o=y[1],r[1]+=o;var g=findSelectorMatch(i,Xu),v=fu(g,2);i=v[0],o=v[1],r[2]+=o;var d=findSelectorMatch(i,Yu),x=fu(d,2);i=x[0],o=x[1],r[1]+=o;var b=findSelectorMatch(i,Qu),S=fu(b,2);i=S[0],o=S[1],r[1]+=o;var w=findSelectorMatch(i=i.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),Ku),k=fu(w,2);return i=k[0],o=k[1],r[2]+=o,r.join("")}(i),"@font-face"===i){var a=o["font-family"].getString().replace(/"|'/g,"");o.src.getString().split(",").forEach((function(r){if(r.indexOf('format("svg")')>0){var i=parseExternalUrl(r);i&&new tl(t).load(a,i)}}))}}}))}})),a}return StyleElement}(dc);function _isNativeReflectConstruct$B(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}el.parseExternalUrl=parseExternalUrl;var rl=function(t){Du(UseElement,t);var r=function _createSuper$B(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$B()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(UseElement);function UseElement(){var t;return gu(this,UseElement),(t=r.apply(this,arguments)).type="use",t}return vu(UseElement,[{key:"setContext",value:function setContext(t){ju(Ou(UseElement.prototype),"setContext",this).call(this,t);var r=this.getAttribute("x"),i=this.getAttribute("y");r.hasValue()&&t.translate(r.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}},{key:"path",value:function path(t){var r=this.element;r&&r.path(t)}},{key:"renderChildren",value:function renderChildren(t){var r=this.document,i=this.element;if(i){var o=i;if("symbol"===i.type&&((o=new Cc(r,null)).attributes.viewBox=new Ju(r,"viewBox",i.getAttribute("viewBox").getString()),o.attributes.preserveAspectRatio=new Ju(r,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),o.attributes.overflow=new Ju(r,"overflow",i.getAttribute("overflow").getString()),o.children=i.children),"svg"===o.type){var a=this.getStyle("width",!1,!0),u=this.getStyle("height",!1,!0);a.hasValue()&&(o.attributes.width=new Ju(r,"width",a.getString())),u.hasValue()&&(o.attributes.height=new Ju(r,"height",u.getString()))}var l=o.parent;o.parent=this,o.render(t),o.parent=l}}},{key:"getBoundingBox",value:function getBoundingBox(t){var r=this.element;return r?r.getBoundingBox(t):null}},{key:"elementTransform",value:function elementTransform(){var t=this.document,r=this.element;return vc.fromElement(t,r)}},{key:"element",get:function get(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),UseElement}(Sc);function _isNativeReflectConstruct$C(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function imGet(t,r,i,o,a,u){return t[i*o*4+4*r+u]}function imSet(t,r,i,o,a,u,l){t[i*o*4+4*r+u]=l}function m(t,r,i){var o=t[r];return o*(o<0?i-255:i)}function c(t,r,i,o){return r+Math.cos(t)*i+Math.sin(t)*o}var nl=function(t){Du(FeColorMatrixElement,t);var r=function _createSuper$C(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$C()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FeColorMatrixElement);function FeColorMatrixElement(t,i,o){var a;gu(this,FeColorMatrixElement),(a=r.call(this,t,i,o)).type="feColorMatrix";var u=toNumbers(a.getAttribute("values").getString());switch(a.getAttribute("type").getString("matrix")){case"saturate":var l=u[0];u=[.213+.787*l,.715-.715*l,.072-.072*l,0,0,.213-.213*l,.715+.285*l,.072-.072*l,0,0,.213-.213*l,.715-.715*l,.072+.928*l,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=u[0]*Math.PI/180;u=[c(h,.213,.787,-.213),c(h,.715,-.715,-.715),c(h,.072,-.072,.928),0,0,c(h,.213,-.213,.143),c(h,.715,.285,.14),c(h,.072,-.072,-.283),0,0,c(h,.213,-.213,-.787),c(h,.715,-.715,.715),c(h,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return a.matrix=u,a.includeOpacity=a.getAttribute("includeOpacity").hasValue(),a}return vu(FeColorMatrixElement,[{key:"apply",value:function apply(t,r,i,o,a){for(var u=this.includeOpacity,l=this.matrix,h=t.getImageData(0,0,o,a),p=0;p<a;p++)for(var y=0;y<o;y++){var g=imGet(h.data,y,p,o,0,0),v=imGet(h.data,y,p,o,0,1),d=imGet(h.data,y,p,o,0,2),x=imGet(h.data,y,p,o,0,3),b=m(l,0,g)+m(l,1,v)+m(l,2,d)+m(l,3,x)+m(l,4,1),S=m(l,5,g)+m(l,6,v)+m(l,7,d)+m(l,8,x)+m(l,9,1),w=m(l,10,g)+m(l,11,v)+m(l,12,d)+m(l,13,x)+m(l,14,1),k=m(l,15,g)+m(l,16,v)+m(l,17,d)+m(l,18,x)+m(l,19,1);u&&(b=S=w=0,k*=x/255),imSet(h.data,y,p,o,0,0,b),imSet(h.data,y,p,o,0,1,S),imSet(h.data,y,p,o,0,2,w),imSet(h.data,y,p,o,0,3,k)}t.clearRect(0,0,o,a),t.putImageData(h,0,0)}}]),FeColorMatrixElement}(dc);function _isNativeReflectConstruct$D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var il=function(t){Du(MaskElement,t);var r=function _createSuper$D(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$D()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(MaskElement);function MaskElement(){var t;return gu(this,MaskElement),(t=r.apply(this,arguments)).type="mask",t}return vu(MaskElement,[{key:"apply",value:function apply(t,r){var i=this.document,o=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),u=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y");if(!u&&!l){var h=new bc;this.children.forEach((function(r){h.addBoundingBox(r.getBoundingBox(t))})),o=Math.floor(h.x1),a=Math.floor(h.y1),u=Math.floor(h.width),l=Math.floor(h.height)}var p=this.removeStyles(r,MaskElement.ignoreStyles),y=i.createCanvas(o+u,a+l),g=y.getContext("2d");i.screen.setDefaults(g),this.renderChildren(g),new nl(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(g,0,0,o+u,a+l);var v=i.createCanvas(o+u,a+l),d=v.getContext("2d");i.screen.setDefaults(d),r.render(d),d.globalCompositeOperation="destination-in",d.fillStyle=g.createPattern(y,"no-repeat"),d.fillRect(0,0,o+u,a+l),t.fillStyle=d.createPattern(v,"no-repeat"),t.fillRect(0,0,o+u,a+l),this.restoreStyles(r,p)}},{key:"render",value:function render(t){}}]),MaskElement}(dc);function _isNativeReflectConstruct$E(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}il.ignoreStyles=["mask","transform","clip-path"];var ol=function noop(){},al=function(t){Du(ClipPathElement,t);var r=function _createSuper$E(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$E()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(ClipPathElement);function ClipPathElement(){var t;return gu(this,ClipPathElement),(t=r.apply(this,arguments)).type="clipPath",t}return vu(ClipPathElement,[{key:"apply",value:function apply(t){var r=this.document,i=Reflect.getPrototypeOf(t),o=t.beginPath,a=t.closePath;i&&(i.beginPath=ol,i.closePath=ol),Reflect.apply(o,t,[]),this.children.forEach((function(o){if(void 0!==o.path){var u=void 0!==o.elementTransform?o.elementTransform():null;u||(u=vc.fromElement(r,o)),u&&u.apply(t),o.path(t),i&&(i.closePath=a),u&&u.unapply(t)}})),Reflect.apply(a,t,[]),t.clip(),i&&(i.beginPath=o,i.closePath=a)}},{key:"render",value:function render(t){}}]),ClipPathElement}(dc);function _isNativeReflectConstruct$F(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var sl=function(t){Du(FilterElement,t);var r=function _createSuper$F(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$F()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FilterElement);function FilterElement(){var t;return gu(this,FilterElement),(t=r.apply(this,arguments)).type="filter",t}return vu(FilterElement,[{key:"apply",value:function apply(t,r){var i=this.document,o=this.children,a=r.getBoundingBox(t);if(a){var u=0,l=0;o.forEach((function(t){var r=t.extraFilterDistance||0;u=Math.max(u,r),l=Math.max(l,r)}));var h=Math.floor(a.width),p=Math.floor(a.height),y=h+2*u,g=p+2*l;if(!(y<1||g<1)){var v=Math.floor(a.x),d=Math.floor(a.y),x=this.removeStyles(r,FilterElement.ignoreStyles),b=i.createCanvas(y,g),S=b.getContext("2d");i.screen.setDefaults(S),S.translate(-v+u,-d+l),r.render(S),o.forEach((function(t){"function"==typeof t.apply&&t.apply(S,0,0,y,g)})),t.drawImage(b,0,0,y,g,v-u,d-l,y,g),this.restoreStyles(r,x)}}}},{key:"render",value:function render(t){}}]),FilterElement}(dc);function _isNativeReflectConstruct$G(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _isNativeReflectConstruct$H(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _isNativeReflectConstruct$I(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _isNativeReflectConstruct$J(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _isNativeReflectConstruct$K(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _isNativeReflectConstruct$L(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}sl.ignoreStyles=["filter","transform","clip-path"];var ul={svg:Cc,rect:Ac,circle:Tc,ellipse:_c,line:Mc,polyline:Oc,polygon:Nc,path:Rc,pattern:Dc,marker:Lc,defs:$c,linearGradient:Vc,radialGradient:jc,stop:Bc,animate:Gc,animateColor:zc,animateTransform:Uc,font:qc,"font-face":Wc,"missing-glyph":Hc,glyph:Xc,text:wc,tspan:kc,tref:Yc,a:Qc,textPath:Kc,image:Zc,g:Ic,symbol:Jc,style:el,use:rl,mask:il,clipPath:al,filter:sl,feDropShadow:function(t){Du(FeDropShadowElement,t);var r=function _createSuper$G(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$G()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FeDropShadowElement);function FeDropShadowElement(t,i,o){var a;return gu(this,FeDropShadowElement),(a=r.call(this,t,i,o)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return vu(FeDropShadowElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeDropShadowElement}(dc),feMorphology:function(t){Du(FeMorphologyElement,t);var r=function _createSuper$H(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$H()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FeMorphologyElement);function FeMorphologyElement(){var t;return gu(this,FeMorphologyElement),(t=r.apply(this,arguments)).type="feMorphology",t}return vu(FeMorphologyElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeMorphologyElement}(dc),feComposite:function(t){Du(FeCompositeElement,t);var r=function _createSuper$I(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$I()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FeCompositeElement);function FeCompositeElement(){var t;return gu(this,FeCompositeElement),(t=r.apply(this,arguments)).type="feComposite",t}return vu(FeCompositeElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeCompositeElement}(dc),feColorMatrix:nl,feGaussianBlur:function(t){Du(FeGaussianBlurElement,t);var r=function _createSuper$J(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$J()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(FeGaussianBlurElement);function FeGaussianBlurElement(t,i,o){var a;return gu(this,FeGaussianBlurElement),(a=r.call(this,t,i,o)).type="feGaussianBlur",a.blurRadius=Math.floor(a.getAttribute("stdDeviation").getNumber()),a.extraFilterDistance=a.blurRadius,a}return vu(FeGaussianBlurElement,[{key:"apply",value:function apply(t,r,i,o,a){var u=this.document,l=this.blurRadius,h=u.window?u.window.document.body:null,p=t.canvas;p.id=u.getUniqueId(),h&&(p.style.display="none",h.appendChild(p)),processCanvasRGBA(p,r,i,o,a,l),h&&h.removeChild(p)}}]),FeGaussianBlurElement}(dc),title:function(t){Du(TitleElement,t);var r=function _createSuper$K(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$K()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(TitleElement);function TitleElement(){var t;return gu(this,TitleElement),(t=r.apply(this,arguments)).type="title",t}return TitleElement}(dc),desc:function(t){Du(DescElement,t);var r=function _createSuper$L(t){return function(){var r,i=Ou(t);if(_isNativeReflectConstruct$L()){var o=Ou(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mu(this,r)}}(DescElement);function DescElement(){var t;return gu(this,DescElement),(t=r.apply(this,arguments)).type="desc",t}return DescElement}(dc)};function ownKeys$1(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _createImage(){return(_createImage=pu(hu.mark((function _callee(t){var r,i,o=arguments;return hu.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],i=document.createElement("img"),r&&(i.crossOrigin="Anonymous"),a.abrupt("return",new Promise((function(r,o){i.onload=function(){r(i)},i.onerror=function(){o()},i.src=t})));case 4:case"end":return a.stop()}}),_callee)})))).apply(this,arguments)}var cl=function(){function Document(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.rootEmSize,o=void 0===i?12:i,a=r.emSize,u=void 0===a?12:a,l=r.createCanvas,h=void 0===l?Document.createCanvas:l,p=r.createImage,y=void 0===p?Document.createImage:p,g=r.anonymousCrossOrigin;gu(this,Document),this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=o,this.emSize=u,this.createCanvas=h,this.createImage=this.bindCreateImage(y,g),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return vu(Document,[{key:"bindCreateImage",value:function bindCreateImage(t,r){return"boolean"==typeof r?function(i,o){return t(i,"boolean"==typeof o?o:r)}:t}},{key:"popEmSize",value:function popEmSize(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function getUniqueId(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function isImagesLoaded(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function isFontsLoaded(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function createDocumentElement(t){var r=this.createElement(t.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}},{key:"createElement",value:function createElement(t){var r=t.nodeName.replace(/^[^:]+:/,""),i=Document.elementTypes[r];return void 0!==i?new i(this,t):new mc(this,t)}},{key:"createTextNode",value:function createTextNode(t){return new Ec(this,t)}},{key:"setViewBox",value:function setViewBox(t){this.screen.setViewBox(function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(i),!0).forEach((function(r){yu(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$1(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({document:this},t))}},{key:"window",get:function get(){return this.screen.window}},{key:"fetch",get:function get(){return this.screen.fetch}},{key:"ctx",get:function get(){return this.screen.ctx}},{key:"emSize",get:function get(){var t=this.emSizeStack;return t[t.length-1]},set:function set(t){this.emSizeStack.push(t)}}]),Document}();function ownKeys$1$1(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread$1(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1$1(Object(i),!0).forEach((function(r){yu(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys$1$1(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}cl.createCanvas=function createCanvas(t,r){var i=document.createElement("canvas");return i.width=t,i.height=r,i},cl.createImage=function createImage(t){return _createImage.apply(this,arguments)},cl.elementTypes=ul;var ll=function(){function Canvg(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};gu(this,Canvg),this.parser=new uc(i),this.screen=new oc(t,i),this.options=i;var o=new cl(this,i),a=o.createDocumentElement(r);this.document=o,this.documentElement=a}var t,r;return vu(Canvg,[{key:"fork",value:function fork(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.from(t,r,_objectSpread$1({},this.options,{},i))}},{key:"forkString",value:function forkString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.fromString(t,r,_objectSpread$1({},this.options,{},i))}},{key:"ready",value:function ready(){return this.screen.ready()}},{key:"isReady",value:function isReady(){return this.screen.isReady()}},{key:"render",value:(r=pu(hu.mark((function _callee(){var t,r=arguments;return hu.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},this.start(_objectSpread$1({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},t)),i.next=4,this.ready();case 4:this.stop();case 5:case"end":return i.stop()}}),_callee,this)}))),function render(){return r.apply(this,arguments)})},{key:"start",value:function start(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.documentElement,i=this.screen,o=this.options;i.start(r,_objectSpread$1({enableRedraw:!0},o,{},t))}},{key:"stop",value:function stop(){this.screen.stop()}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,r,i)}}],[{key:"from",value:(t=pu(hu.mark((function _callee2(t,r){var i,o,a,u=arguments;return hu.wrap((function _callee2$(l){for(;;)switch(l.prev=l.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:{},o=new uc(i),l.next=4,o.parse(r);case 4:return a=l.sent,l.abrupt("return",new Canvg(t,a,i));case 6:case"end":return l.stop()}}),_callee2)}))),function from(r,i){return t.apply(this,arguments)})},{key:"fromString",value:function fromString(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=new uc(i),a=o.parseFromString(r);return new Canvg(t,a,i)}}]),Canvg}();function __variableDynamicImportRuntime0__(t){switch(t){case"./locale/en.js":return Promise.resolve().then((function(){return hl}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return pl}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}var fl=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var r;return regeneratorRuntime.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(t),".js"));case 3:r=i.sent,i.next=12;break;case 6:return i.prev=6,i.t0=i.catch(0),console.error("Missing translation (".concat(t,") - using 'en'")),i.next=11,Promise.resolve().then((function(){return hl}));case 11:r=i.sent;case 12:return i.abrupt("return",r.default);case 13:case"end":return i.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(r){return t.apply(this,arguments)}}(),hl=(t("default",{name:"server_moinsave",init:function init(t){var r=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee3(){var i,o,a,u,l;return regeneratorRuntime.wrap((function _callee3$(h){for(;;)switch(h.prev=h.next){case 0:return i=t.$,o=t.encode64,t.importLocale,a=r,h.next=4,fl(a.curPrefs.lang);case 4:u=h.sent,l=a.canvas,"/+modify",i('<iframe name="output_frame" title="'.concat(u.hiddenframe,'"\n style="width: 0; height: 0;" src="data:text/html;base64,PGh0bWw+PC9odG1sPg=="/>')).appendTo("body"),a.setCustomHandlers({save:function save(t,r){return _asyncToGenerator(regeneratorRuntime.mark((function _callee2(){var t,a,h,p,y,g,v,d;return regeneratorRuntime.wrap((function _callee2$(x){for(;;)switch(x.prev=x.next){case 0:return t='<?xml version="1.0"?>\n'+r,a=new URL(location),h=a.pathname,p=h.replace(/\/+get\//,""),y=o(t),i("#export_canvas").length||i("<canvas>",{id:"export_canvas"}).hide().appendTo("body"),(g=i("#export_canvas")[0]).width=l.contentW,g.height=l.contentH,x.next=10,ll(g,t);case 10:v=g.toDataURL("image/png"),d=o(v),i("<form>").attr({method:"post",action:"/+modify/"+p,target:"output_frame"}).append('\n <input type="hidden" name="png_data" value="'.concat(d,'">\n <input type="hidden" name="filepath" value="').concat(y,'">\n <input type="hidden" name="filename" value="drawing.svg">\n <input type="hidden" name="contenttype" value="application/x-svgdraw">\n ')).appendTo("body").submit().remove(),i.alert(u.saved),top.window.location="/"+p;case 15:case"end":return x.stop()}}),_callee2)})))()}});case 9:case"end":return h.stop()}}),_callee3)})))()}}),Object.freeze({__proto__:null,default:{saved:"Saved! Return to Item View!",hiddenframe:"Moinsave frame to store hidden values"}})),pl=Object.freeze({__proto__:null,default:{saved:"已保存! 返回视图!",hiddenframe:"Moinsave frame to store hidden values"}})}}}));
|