3 lines
228 KiB
JavaScript
3 lines
228 KiB
JavaScript
var t="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},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},i=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,u={f:a&&!o.call({1:2},1)?function propertyIsEnumerable(t){var r=a(this,t);return!!r&&r.enumerable}:o},createPropertyDescriptor=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},l={}.toString,classofRaw=function(t){return l.call(t).slice(8,-1)},h="".split,p=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?h.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 p(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")},y={}.hasOwnProperty,has=function(t,r){return y.call(t,r)},g=r.document,v=isObject(g)&&isObject(g.createElement),documentCreateElement=function(t){return v?g.createElement(t):{}},d=!i&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),x=Object.getOwnPropertyDescriptor,b={f:i?x:function getOwnPropertyDescriptor(t,r){if(t=toIndexedObject(t),r=toPrimitive(r,!0),d)try{return x(t,r)}catch(t){}if(has(t,r))return createPropertyDescriptor(!u.f.call(t,r),t[r])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},S=Object.defineProperty,w={f:i?S:function defineProperty(t,r,i){if(anObject(t),r=toPrimitive(r,!0),anObject(i),d)try{return S(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}},k=i?function(t,r,i){return w.f(t,r,createPropertyDescriptor(1,i))}:function(t,r,i){return t[r]=i,t},setGlobal=function(t,i){try{k(r,t,i)}catch(o){r[t]=i}return i},E=r["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),P=Function.toString;"function"!=typeof E.inspectSource&&(E.inspectSource=function(t){return P.call(t)});var R,C,A,T=E.inspectSource,_=r.WeakMap,M="function"==typeof _&&/native code/.test(T(_)),O=createCommonjsModule((function(t){(t.exports=function(t,r){return E[t]||(E[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),N=0,L=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++N+L).toString(36)},D=O("keys"),sharedKey=function(t){return D[t]||(D[t]=uid(t))},I={},$=r.WeakMap;if(M){var V=new $,j=V.get,B=V.has,G=V.set;R=function(t,r){return G.call(V,t,r),r},C=function(t){return j.call(V,t)||{}},A=function(t){return B.call(V,t)}}else{var z=sharedKey("state");I[z]=!0,R=function(t,r){return k(t,z,r),r},C=function(t){return has(t,z)?t[z]:{}},A=function(t){return has(t,z)}}var U,q,W={set:R,get:C,has:A,enforce:function(t){return A(t)?C(t):R(t,{})},getterFor:function(t){return function(r){var i;if(!isObject(r)||(i=C(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},H=createCommonjsModule((function(t){var i=W.get,o=W.enforce,a=String(String).split("String");(t.exports=function(t,i,u,l){var h=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;"function"==typeof u&&("string"!=typeof i||has(u,"name")||k(u,"name",i),o(u).source=a.join("string"==typeof i?i:"")),t!==r?(h?!y&&t[i]&&(p=!0):delete t[i],p?t[i]=u:k(t,i,u)):p?t[i]=u:setGlobal(i,u)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&i(this).source||T(this)}))})),X=r,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,i){return arguments.length<2?aFunction(X[t])||aFunction(r[t]):X[t]&&X[t][i]||r[t]&&r[t][i]},Y=Math.ceil,Q=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?Q:Y)(t)},K=Math.min,toLength=function(t){return t>0?K(toInteger(t),9007199254740991):0},Z=Math.max,J=Math.min,toAbsoluteIndex=function(t,r){var i=toInteger(t);return i<0?Z(i+r,0):J(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}},tt={includes:createMethod(!0),indexOf:createMethod(!1)},et=tt.indexOf,objectKeysInternal=function(t,r){var i,o=toIndexedObject(t),a=0,u=[];for(i in o)!has(I,i)&&has(o,i)&&u.push(i);for(;r.length>a;)has(o,i=r[a++])&&(~et(u,i)||u.push(i));return u},rt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],nt=rt.concat("length","prototype"),it={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,nt)}},ot={f:Object.getOwnPropertySymbols},at=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var r=it.f(anObject(t)),i=ot.f;return i?r.concat(i(t)):r},copyConstructorProperties=function(t,r){for(var i=at(r),o=w.f,a=b.f,u=0;u<i.length;u++){var l=i[u];has(t,l)||o(t,l,a(r,l))}},st=/#|\.prototype\./,isForced=function(t,r){var i=ct[ut(t)];return i==ft||i!=lt&&("function"==typeof r?fails(r):!!r)},ut=isForced.normalize=function(t){return String(t).replace(st,".").toLowerCase()},ct=isForced.data={},lt=isForced.NATIVE="N",ft=isForced.POLYFILL="P",ht=isForced,pt=b.f,_export=function(t,i){var o,a,u,l,h,p=t.target,y=t.global,g=t.stat;if(o=y?r:g?r[p]||setGlobal(p,{}):(r[p]||{}).prototype)for(a in i){if(l=i[a],u=t.noTargetGet?(h=pt(o,a))&&h.value:o[a],!ht(y?a:p+(g?".":"#")+a,t.forced)&&void 0!==u){if(typeof l==typeof u)continue;copyConstructorProperties(l,u)}(t.sham||u&&u.sham)&&k(l,"sham",!0),H(o,a,l,t)}},yt=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?w.f(t,o,createPropertyDescriptor(0,i)):t[o]=i},gt=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),vt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,dt=O("wks"),mt=r.Symbol,xt=vt?mt:mt&&mt.withoutSetter||uid,wellKnownSymbol=function(t){return has(dt,t)||(gt&&has(mt,t)?dt[t]=mt[t]:dt[t]=xt("Symbol."+t)),dt[t]},bt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,r){var i;return yt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!yt(i.prototype)?isObject(i)&&null===(i=i[bt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===r?0:r)},St=getBuiltIn("navigator","userAgent")||"",wt=r.process,kt=wt&&wt.versions,Et=kt&&kt.v8;Et?q=(U=Et.split("."))[0]+U[1]:St&&(!(U=St.match(/Edge\/(\d+)/))||U[1]>=74)&&(U=St.match(/Chrome\/(\d+)/))&&(q=U[1]);var Pt=q&&+q,Rt=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return Pt>=51||!fails((function(){var r=[];return(r.constructor={})[Rt]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},Ct=wellKnownSymbol("isConcatSpreadable"),At=Pt>=51||!fails((function(){var t=[];return t[Ct]=!1,t.concat()[0]!==t})),Tt=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var r=t[Ct];return void 0!==r?!!r:yt(t)};_export({target:"Array",proto:!0,forced:!At||!Tt},{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))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(i=0;i<a;i++,p++)i in u&&createProperty(h,p,u[i])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty(h,p++,u)}return h.length=p,h}});var _t,Mt=Object.keys||function keys(t){return objectKeysInternal(t,rt)},Ot=i?Object.defineProperties:function defineProperties(t,r){anObject(t);for(var i,o=Mt(r),a=o.length,u=0;a>u;)w.f(t,i=o[u++],r[i]);return t},Nt=getBuiltIn("document","documentElement"),Lt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{_t=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,r;NullProtoObject=_t?function(t){t.write(scriptTag("")),t.close();var r=t.parentWindow.Object;return t=null,r}(_t):((r=documentCreateElement("iframe")).style.display="none",Nt.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var i=rt.length;i--;)delete NullProtoObject.prototype[rt[i]];return NullProtoObject()};I[Lt]=!0;var Dt=Object.create||function create(t,r){var i;return null!==t?(EmptyConstructor.prototype=anObject(t),i=new EmptyConstructor,EmptyConstructor.prototype=null,i[Lt]=t):i=NullProtoObject(),void 0===r?i:Ot(i,r)},It=wellKnownSymbol("unscopables"),$t=Array.prototype;null==$t[It]&&w.f($t,It,{configurable:!0,value:Dt(null)});var Ft,Vt,jt,addToUnscopables=function(t){$t[It][t]=!0},Bt={},Gt=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),zt=sharedKey("IE_PROTO"),Ut=Object.prototype,qt=Gt?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,zt)?t[zt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ut:null},Wt=wellKnownSymbol("iterator"),Ht=!1;[].keys&&("next"in(jt=[].keys())?(Vt=qt(qt(jt)))!==Object.prototype&&(Ft=Vt):Ht=!0),null==Ft&&(Ft={}),has(Ft,Wt)||k(Ft,Wt,(function(){return this}));var Xt={IteratorPrototype:Ft,BUGGY_SAFARI_ITERATORS:Ht},Yt=w.f,Qt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,r,i){t&&!has(t=i?t:t.prototype,Qt)&&Yt(t,Qt,{configurable:!0,value:r})},Kt=Xt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,r,i){var o=r+" Iterator";return t.prototype=Dt(Kt,{next:createPropertyDescriptor(1,i)}),setToStringTag(t,o,!1),Bt[o]=returnThis$1,t},Zt=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),Jt=Xt.IteratorPrototype,te=Xt.BUGGY_SAFARI_ITERATORS,ee=wellKnownSymbol("iterator"),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(!te&&t in d)return d[t];switch(t){case"keys":return function keys(){return new i(this,t)};case"values":return function values(){return new i(this,t)};case"entries":return function entries(){return new i(this,t)}}return function(){return new i(this)}},g=r+" Iterator",v=!1,d=t.prototype,x=d[ee]||d["@@iterator"]||a&&d[a],b=!te&&x||getIterationMethod(a),S="Array"==r&&d.entries||x;if(S&&(h=qt(S.call(new t)),Jt!==Object.prototype&&h.next&&(qt(h)!==Jt&&(Zt?Zt(h,Jt):"function"!=typeof h[ee]&&k(h,ee,returnThis$2)),setToStringTag(h,g,!0))),"values"==a&&x&&"values"!==x.name&&(v=!0,b=function values(){return x.call(this)}),d[ee]!==b&&k(d,ee,b),Bt[r]=b,a)if(p={values:getIterationMethod("values"),keys:u?b:getIterationMethod("keys"),entries:getIterationMethod("entries")},l)for(y in p)(te||v||!(y in d))&&H(d,y,p[y]);else _export({target:r,proto:!0,forced:te||v},p);return p},re=W.set,ne=W.getterFor("Array Iterator"),ie=defineIterator(Array,"Array",(function(t,r){re(this,{type:"Array Iterator",target:toIndexedObject(t),index:0,kind:r})}),(function(){var t=ne(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");Bt.Arguments=Bt.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var oe={};oe[wellKnownSymbol("toStringTag")]="z";var ae="[object z]"===String(oe),se=wellKnownSymbol("toStringTag"),ue="Arguments"==classofRaw(function(){return arguments}()),ce=ae?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),se))?i:ue?classofRaw(r):"Object"==(o=classofRaw(r))&&"function"==typeof r.callee?"Arguments":o},le=ae?{}.toString:function toString(){return"[object "+ce(this)+"]"};ae||H(Object.prototype,"toString",le,{unsafe:!0});var fe=r.Promise,redefineAll=function(t,r,i){for(var o in r)H(t,o,r[o],i);return t},he=wellKnownSymbol("species"),setSpecies=function(t){var r=getBuiltIn(t),o=w.f;i&&r&&!r[he]&&o(r,he,{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},pe=wellKnownSymbol("iterator"),ye=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Bt.Array===t||ye[pe]===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)}},ge=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[ge]||t["@@iterator"]||Bt[ce(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}},ve=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)}})),de=wellKnownSymbol("iterator"),me=!1;try{var xe=0,be={next:function(){return{done:!!xe++}},return:function(){me=!0}};be[de]=function(){return this},Array.from(be,(function(){throw 2}))}catch(t){}var Se,we,ke,checkCorrectnessOfIteration=function(t,r){if(!r&&!me)return!1;var i=!1;try{var o={};o[de]=function(){return{next:function(){return{done:i=!0}}}},t(o)}catch(t){}return i},Ee=wellKnownSymbol("species"),speciesConstructor=function(t,r){var i,o=anObject(t).constructor;return void 0===o||null==(i=anObject(o)[Ee])?r:aFunction$1(i)},Pe=/(iphone|ipod|ipad).*applewebkit/i.test(St),Re=r.location,Ce=r.setImmediate,Ae=r.clearImmediate,Te=r.process,_e=r.MessageChannel,Me=r.Dispatch,Oe=0,Ne={},run=function(t){if(Ne.hasOwnProperty(t)){var r=Ne[t];delete Ne[t],r()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){r.postMessage(t+"",Re.protocol+"//"+Re.host)};Ce&&Ae||(Ce=function setImmediate(t){for(var r=[],i=1;arguments.length>i;)r.push(arguments[i++]);return Ne[++Oe]=function(){("function"==typeof t?t:Function(t)).apply(void 0,r)},Se(Oe),Oe},Ae=function clearImmediate(t){delete Ne[t]},"process"==classofRaw(Te)?Se=function(t){Te.nextTick(runner(t))}:Me&&Me.now?Se=function(t){Me.now(runner(t))}:_e&&!Pe?(ke=(we=new _e).port2,we.port1.onmessage=listener,Se=functionBindContext(ke.postMessage,ke,1)):!r.addEventListener||"function"!=typeof postMessage||r.importScripts||fails(post)||"file:"===Re.protocol?Se="onreadystatechange"in documentCreateElement("script")?function(t){Nt.appendChild(documentCreateElement("script")).onreadystatechange=function(){Nt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(Se=post,r.addEventListener("message",listener,!1)));var Le,De,Ie,$e,Fe,Ve,je,Be,Ge={set:Ce,clear:Ae},ze=b.f,Ue=Ge.set,qe=r.MutationObserver||r.WebKitMutationObserver,We=r.process,He=r.Promise,Xe="process"==classofRaw(We),Ye=ze(r,"queueMicrotask"),Qe=Ye&&Ye.value;Qe||(Le=function(){var t,r;for(Xe&&(t=We.domain)&&t.exit();De;){r=De.fn,De=De.next;try{r()}catch(t){throw De?$e():Ie=void 0,t}}Ie=void 0,t&&t.enter()},Xe?$e=function(){We.nextTick(Le)}:qe&&!Pe?(Fe=!0,Ve=document.createTextNode(""),new qe(Le).observe(Ve,{characterData:!0}),$e=function(){Ve.data=Fe=!Fe}):He&&He.resolve?(je=He.resolve(void 0),Be=je.then,$e=function(){Be.call(je,Le)}):$e=function(){Ue.call(r,Le)});var Ke,Ze,Je,tr,er=Qe||function(t){var r={fn:t,next:void 0};Ie&&(Ie.next=r),De||(De=r,$e()),Ie=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)},rr={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,r){if(anObject(t),isObject(r)&&r.constructor===t)return r;var i=rr.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}}},nr=Ge.set,ir=wellKnownSymbol("species"),or="Promise",ar=W.get,sr=W.set,ur=W.getterFor(or),cr=fe,lr=r.TypeError,fr=r.document,hr=r.process,pr=getBuiltIn("fetch"),yr=rr.f,gr=yr,vr="process"==classofRaw(hr),dr=!!(fr&&fr.createEvent&&r.dispatchEvent),mr=ht(or,(function(){if(!(T(cr)!==String(cr))){if(66===Pt)return!0;if(!vr&&"function"!=typeof PromiseRejectionEvent)return!0}if(Pt>=51&&/native code/.test(cr))return!1;var t=cr.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[ir]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),xr=mr||!checkCorrectnessOfIteration((function(t){cr.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;er((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(lr("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,i,o){var a,u;dr?((a=fr.createEvent("Event")).promise=i,a.reason=o,a.initEvent(t,!1,!0),r.dispatchEvent(a)):a={promise:i,reason:o},(u=r["on"+t])?u(a):"unhandledrejection"===t&&function(t,i){var o=r.console;o&&o.error&&(1===arguments.length?o.error(t):o.error(t,i))}("Unhandled promise rejection",o)},onUnhandled=function(t,i){nr.call(r,(function(){var r,o=i.value;if(isUnhandled(i)&&(r=perform((function(){vr?hr.emit("unhandledRejection",o,t):dispatchEvent("unhandledrejection",t,o)})),i.rejection=vr||isUnhandled(i)?2:1,r.error))throw r.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,i){nr.call(r,(function(){vr?hr.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,i.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 lr("Promise can't be resolved itself");var a=isThenable(i);a?er((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)}}};mr&&(cr=function Promise(t){anInstance(this,cr,or),aFunction$1(t),Ke.call(this);var r=ar(this);try{t(bind(internalResolve,this,r),bind(internalReject,this,r))}catch(t){internalReject(this,r,t)}},(Ke=function Promise(t){sr(this,{type:or,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(cr.prototype,{then:function then(t,r){var i=ur(this),o=yr(speciesConstructor(this,cr));return o.ok="function"!=typeof t||t,o.fail="function"==typeof r&&r,o.domain=vr?hr.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)}}),Ze=function(){var t=new Ke,r=ar(t);this.promise=t,this.resolve=bind(internalResolve,t,r),this.reject=bind(internalReject,t,r)},rr.f=yr=function(t){return t===cr||t===Je?new Ze(t):gr(t)},"function"==typeof fe&&(tr=fe.prototype.then,H(fe.prototype,"then",(function then(t,r){var i=this;return new cr((function(t,r){tr.call(i,t,r)})).then(t,r)}),{unsafe:!0}),"function"==typeof pr&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(cr,pr.apply(r,arguments))}}))),_export({global:!0,wrap:!0,forced:mr},{Promise:cr}),setToStringTag(cr,or,!1),setSpecies(or),Je=getBuiltIn(or),_export({target:or,stat:!0,forced:mr},{reject:function reject(t){var r=yr(this);return r.reject.call(void 0,t),r.promise}}),_export({target:or,stat:!0,forced:mr},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:or,stat:!0,forced:xr},{all:function all(t){var r=this,i=yr(r),o=i.resolve,a=i.reject,u=perform((function(){var i=aFunction$1(r.resolve),u=[],l=0,h=1;ve(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=yr(r),o=i.reject,a=perform((function(){var a=aFunction$1(r.resolve);ve(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 br,Sr,wr={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")}))},kr=RegExp.prototype.exec,Er=String.prototype.replace,Pr=kr,Rr=(br=/a/,Sr=/b*/g,kr.call(br,"a"),kr.call(Sr,"a"),0!==br.lastIndex||0!==Sr.lastIndex),Cr=wr.UNSUPPORTED_Y||wr.BROKEN_CARET,Ar=void 0!==/()??/.exec("")[1];(Rr||Ar||Cr)&&(Pr=function exec(t){var r,i,o,a,u=this,l=Cr&&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)),Ar&&(i=new RegExp("^"+p+"$(?!\\s)",h)),Rr&&(r=u.lastIndex),o=kr.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:Rr&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Ar&&o&&o.length>1&&Er.call(o[0],i,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o});var Tr=Pr;_export({target:"RegExp",proto:!0,forced:/./.exec!==Tr},{exec:Tr});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}},_r={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},Mr=_r.charAt,Or=W.set,Nr=W.getterFor("String Iterator");defineIterator(String,"String",(function(t){Or(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,r=Nr(this),i=r.string,o=r.index;return o>=i.length?{value:void 0,done:!0}:(t=Mr(i,o),r.index+=t.length,{value:t,done:!1})}));var Lr=wellKnownSymbol("species"),Dr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Ir="$0"==="a".replace(/./,"$0"),$r=wellKnownSymbol("replace"),Fr=!!/./[$r]&&""===/./[$r]("a","$0"),Vr=!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[Lr]=function(){return i},i.flags="",i[a]=/./[a]),i.exec=function(){return r=!0,null},i[a](""),!r}));if(!u||!l||"replace"===t&&(!Dr||!Ir||Fr)||"split"===t&&!Vr){var h=/./[a],p=i(a,""[t],(function(t,r,i,o,a){return r.exec===Tr?u&&!a?{done:!0,value:h.call(r,i,o)}:{done:!0,value:t.call(i,r,o)}:{done:!1}}),{REPLACE_KEEPS_$0:Ir,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Fr}),y=p[0],g=p[1];H(String.prototype,t,y),H(RegExp.prototype,a,2==r?function(t,r){return g.call(t,this,r)}:function(t){return g.call(t,this)})}o&&k(RegExp.prototype[a],"sham",!0)},jr=_r.charAt,advanceStringIndex=function(t,r,i){return r+(i?jr(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 Tr.call(t,r)},Br=Math.max,Gr=Math.min,zr=Math.floor,Ur=/\$([$&'`]|\d\d?|<[^>]*>)/g,qr=/\$([$&'`]|\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=Br(Gr(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=qr;return void 0!==u&&(u=toObject(u),y=Ur),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=zr(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 Wr={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},Hr=wellKnownSymbol("iterator"),Xr=wellKnownSymbol("toStringTag"),Yr=ie.values;for(var Qr in Wr){var Kr=r[Qr],Zr=Kr&&Kr.prototype;if(Zr){if(Zr[Hr]!==Yr)try{k(Zr,Hr,Yr)}catch(t){Zr[Hr]=Yr}if(Zr[Xr]||k(Zr,Xr,Qr),Wr[Qr])for(var Jr in ie)if(Zr[Jr]!==ie[Jr])try{k(Zr,Jr,ie[Jr])}catch(t){Zr[Jr]=ie[Jr]}}}var tn=wellKnownSymbol("iterator"),en=!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[tn]||"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})),rn=Object.assign,nn=Object.defineProperty,on=!rn||fails((function(){if(i&&1!==rn({b:1},rn(nn({},"a",{enumerable:!0,get:function(){nn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},o=Symbol(),a="abcdefghijklmnopqrst";return t[o]=7,a.split("").forEach((function(t){r[t]=t})),7!=rn({},t)[o]||Mt(rn({},r)).join("")!=a}))?function assign(t,r){for(var o=toObject(t),a=arguments.length,l=1,h=ot.f,y=u.f;a>l;)for(var g,v=p(arguments[l++]),d=h?Mt(v).concat(h(v)):Mt(v),x=d.length,b=0;x>b;)g=d[b++],i&&!y.call(v,g)||(o[g]=v[g]);return o}:rn,an=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},sn=/[^\0-\u007E]/,un=/[.\u3002\uFF0E\uFF61]/g,cn="Overflow: input needs wider integers to process",ln=Math.floor,fn=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,i){var o=0;for(t=i?ln(t/700):t>>1,t+=ln(t/r);t>455;o+=36)t=ln(t/35);return ln(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(fn(i));var p=o.length,y=p;for(p&&o.push("-");y<a;){var g=2147483647;for(r=0;r<t.length;r++)(i=t[r])>=u&&i<g&&(g=i);var v=y+1;if(g-u>ln((2147483647-l)/v))throw RangeError(cn);for(l+=(g-u)*v,u=g,r=0;r<t.length;r++){if((i=t[r])<u&&++l>2147483647)throw RangeError(cn);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(fn(digitToBasic(b+S%w))),d=ln(S/w)}o.push(fn(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))},hn=getBuiltIn("fetch"),pn=getBuiltIn("Headers"),yn=wellKnownSymbol("iterator"),gn=W.set,vn=W.getterFor("URLSearchParams"),dn=W.getterFor("URLSearchParamsIterator"),mn=/\+/g,xn=Array(4),percentSequence=function(t){return xn[t-1]||(xn[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(mn," "),i=4;try{return decodeURIComponent(r)}catch(t){for(;i;)r=r.replace(percentSequence(i--),percentDecode);return r}},bn=/[!'()~]|%20/g,Sn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return Sn[t]},serialize=function(t){return encodeURIComponent(t).replace(bn,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")},wn=createIteratorConstructor((function Iterator(t,r){gn(this,{type:"URLSearchParamsIterator",iterator:getIterator(vn(t).entries),kind:r})}),"Iterator",(function next(){var t=dn(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})),kn=function URLSearchParams(){anInstance(this,kn,"URLSearchParams");var t,r,i,o,a,u,l,h,p,y=arguments.length>0?arguments[0]:void 0,g=this,v=[];if(gn(g,{type:"URLSearchParams",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+"")},En=kn.prototype;redefineAll(En,{append:function append(t,r){validateArgumentsLength(arguments.length,2);var i=vn(this);i.entries.push({key:t+"",value:r+""}),i.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var r=vn(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=vn(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=vn(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=vn(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=vn(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=vn(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=vn(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 wn(this,"keys")},values:function values(){return new wn(this,"values")},entries:function entries(){return new wn(this,"entries")}},{enumerable:!0}),H(En,yn,En.entries),H(En,"toString",(function toString(){for(var t,r=vn(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(kn,"URLSearchParams"),_export({global:!0,forced:!en},{URLSearchParams:kn}),en||"function"!=typeof hn||"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,"URLSearchParams"===ce(i)&&((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=Dt(r,{body:createPropertyDescriptor(0,String(i)),headers:createPropertyDescriptor(0,o)}))),a.push(r)),hn.apply(this,a)}});var Pn,Rn={URLSearchParams:kn,getState:vn},Cn=_r.codeAt,An=r.URL,Tn=Rn.URLSearchParams,_n=Rn.getState,Mn=W.set,On=W.getterFor("URL"),Nn=Math.floor,Ln=Math.pow,Dn=/[A-Za-z]/,In=/[\d+-.A-Za-z]/,$n=/\d/,Fn=/^(0x|0X)/,Vn=/^[0-7]+$/,jn=/^\d+$/,Bn=/^[\dA-Fa-f]+$/,Gn=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,zn=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Un=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,qn=/[\u0009\u000A\u000D]/g,parseHost=function(t,r){var i,o,a;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return"Invalid host";if(!(i=parseIPv6(r.slice(1,-1))))return"Invalid host";t.host=i}else if(isSpecial(t)){if(r=function(t){var r,i,o=[],a=t.toLowerCase().replace(un,".").split(".");for(r=0;r<a.length;r++)i=a[r],o.push(sn.test(i)?"xn--"+encode(i):i);return o.join(".")}(r),Gn.test(r))return"Invalid host";if(null===(i=parseIPv4(r)))return"Invalid host";t.host=i}else{if(zn.test(r))return"Invalid host";for(i="",o=an(r),a=0;a<o.length;a++)i+=percentEncode(o[a],Wn);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=Fn.test(a)?16:8,a=a.slice(8==u?1:2)),""===a)l=0;else{if(!(10==u?jn:8==u?Vn:Bn).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>=Ln(256,5-r))return null}else if(l>255)return null;for(h=i.pop(),o=0;o<i.length;o++)h+=i[o]*Ln(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&&Bn.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(!$n.test(char()))return;for(;$n.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=Nn(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},Wn={},Hn=on({},Wn,{" ":1,'"':1,"<":1,">":1,"`":1}),Xn=on({},Hn,{"#":1,"?":1,"{":1,"}":1}),Yn=on({},Xn,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=Cn(t,0);return i>32&&i<127&&!has(r,t)?t:encodeURIComponent(t)},Qn={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(Qn,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&&Dn.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()},Kn={},Zn={},Jn={},ti={},ei={},ri={},ni={},ii={},oi={},ai={},si={},ui={},ci={},li={},fi={},hi={},pi={},yi={},gi={},vi={},di={},parseURL=function(t,r,i,o){var a,u,l,h,p,y=i||Kn,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(Un,"")),r=r.replace(qn,""),a=an(r);g<=a.length;){switch(u=a[g],y){case Kn:if(!u||!Dn.test(u)){if(i)return"Invalid scheme";y=Jn;continue}v+=u.toLowerCase(),y=Zn;break;case Zn:if(u&&(In.test(u)||"+"==u||"-"==u||"."==u))v+=u.toLowerCase();else{if(":"!=u){if(i)return"Invalid scheme";v="",y=Jn,g=0;continue}if(i&&(isSpecial(t)!=has(Qn,v)||"file"==v&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=v,i)return void(isSpecial(t)&&Qn[t.scheme]==t.port&&(t.port=null));v="","file"==t.scheme?y=li:isSpecial(t)&&o&&o.scheme==t.scheme?y=ti:isSpecial(t)?y=ii:"/"==a[g+1]?(y=ei,g++):(t.cannotBeABaseURL=!0,t.path.push(""),y=gi)}break;case Jn:if(!o||o.cannotBeABaseURL&&"#"!=u)return"Invalid scheme";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?li:ri;continue;case ti:if("/"!=u||"/"!=a[g+1]){y=ri;continue}y=oi,g++;break;case ei:if("/"==u){y=ai;break}y=yi;continue;case ri:if(t.scheme=o.scheme,u==Pn)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=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.query="",y=vi;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=yi;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 ni:if(!isSpecial(t)||"/"!=u&&"\\"!=u){if("/"!=u){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,y=yi;continue}y=ai}else y=oi;break;case ii:if(y=oi,"/"!=u||"/"!=v.charAt(g+1))continue;g++;break;case oi:if("/"!=u&&"\\"!=u){y=ai;continue}break;case ai:if("@"==u){d&&(v="%40"+v),d=!0,l=an(v);for(var S=0;S<l.length;S++){var w=l[S];if(":"!=w||b){var k=percentEncode(w,Yn);b?t.password+=k:t.username+=k}else b=!0}v=""}else if(u==Pn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)){if(d&&""==v)return"Invalid authority";g-=an(v).length+1,v="",y=si}else v+=u;break;case si:case ui:if(i&&"file"==t.scheme){y=hi;continue}if(":"!=u||x){if(u==Pn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)){if(isSpecial(t)&&""==v)return"Invalid host";if(i&&""==v&&(includesCredentials(t)||null!==t.port))return;if(h=parseHost(t,v))return h;if(v="",y=pi,i)return;continue}"["==u?x=!0:"]"==u&&(x=!1),v+=u}else{if(""==v)return"Invalid host";if(h=parseHost(t,v))return h;if(v="",y=ci,i==ui)return}break;case ci:if(!$n.test(u)){if(u==Pn||"/"==u||"?"==u||"#"==u||"\\"==u&&isSpecial(t)||i){if(""!=v){var E=parseInt(v,10);if(E>65535)return"Invalid port";t.port=isSpecial(t)&&E===Qn[t.scheme]?null:E,v=""}if(i)return;y=pi;continue}return"Invalid port"}v+=u;break;case li:if(t.scheme="file","/"==u||"\\"==u)y=fi;else{if(!o||"file"!=o.scheme){y=yi;continue}if(u==Pn)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=vi;else{if("#"!=u){startsWithWindowsDriveLetter(a.slice(g).join(""))||(t.host=o.host,t.path=o.path.slice(),shortenURLsPath(t)),y=yi;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",y=di}}break;case fi:if("/"==u||"\\"==u){y=hi;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=yi;continue;case hi:if(u==Pn||"/"==u||"\\"==u||"?"==u||"#"==u){if(!i&&isWindowsDriveLetter(v))y=yi;else if(""==v){if(t.host="",i)return;y=pi}else{if(h=parseHost(t,v))return h;if("localhost"==t.host&&(t.host=""),i)return;v="",y=pi}continue}v+=u;break;case pi:if(isSpecial(t)){if(y=yi,"/"!=u&&"\\"!=u)continue}else if(i||"?"!=u)if(i||"#"!=u){if(u!=Pn&&(y=yi,"/"!=u))continue}else t.fragment="",y=di;else t.query="",y=vi;break;case yi:if(u==Pn||"/"==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==Pn||"?"==u||"#"==u))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==u?(t.query="",y=vi):"#"==u&&(t.fragment="",y=di)}else v+=percentEncode(u,Xn);break;case gi:"?"==u?(t.query="",y=vi):"#"==u?(t.fragment="",y=di):u!=Pn&&(t.path[0]+=percentEncode(u,Wn));break;case vi:i||"#"!=u?u!=Pn&&("'"==u&&isSpecial(t)?t.query+="%27":t.query+="#"==u?"%23":percentEncode(u,Wn)):(t.fragment="",y=di);break;case di:u!=Pn&&(t.fragment+=percentEncode(u,Hn))}g++}},mi=function URL(t){var r,o,a=anInstance(this,mi,"URL"),u=arguments.length>1?arguments[1]:void 0,l=String(t),h=Mn(a,{type:"URL"});if(void 0!==u)if(u instanceof mi)r=On(u);else if(o=parseURL(r={},String(u)))throw TypeError(o);if(o=parseURL(h,l,null,r))throw TypeError(o);var p=h.searchParams=new Tn,y=_n(p);y.updateSearchParams(h.query),y.updateURL=function(){h.query=String(p)||null},i||(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))},xi=mi.prototype,serializeURL=function(){var t=On(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=On(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 On(this).scheme+":"},getUsername=function(){return On(this).username},getPassword=function(){return On(this).password},getHost=function(){var t=On(this),r=t.host,i=t.port;return null===r?"":null===i?serializeHost(r):serializeHost(r)+":"+i},getHostname=function(){var t=On(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=On(this).port;return null===t?"":String(t)},getPathname=function(){var t=On(this),r=t.path;return t.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var t=On(this).query;return t?"?"+t:""},getSearchParams=function(){return On(this).searchParams},getHash=function(){var t=On(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,r){return{get:t,set:r,configurable:!0,enumerable:!0}};if(i&&Ot(xi,{href:accessorDescriptor(serializeURL,(function(t){var r=On(this),i=String(t),o=parseURL(r,i);if(o)throw TypeError(o);_n(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var r=On(this);parseURL(r,String(t)+":",Kn)})),username:accessorDescriptor(getUsername,(function(t){var r=On(this),i=an(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var o=0;o<i.length;o++)r.username+=percentEncode(i[o],Yn)}})),password:accessorDescriptor(getPassword,(function(t){var r=On(this),i=an(String(t));if(!cannotHaveUsernamePasswordPort(r)){r.password="";for(var o=0;o<i.length;o++)r.password+=percentEncode(i[o],Yn)}})),host:accessorDescriptor(getHost,(function(t){var r=On(this);r.cannotBeABaseURL||parseURL(r,String(t),si)})),hostname:accessorDescriptor(getHostname,(function(t){var r=On(this);r.cannotBeABaseURL||parseURL(r,String(t),ui)})),port:accessorDescriptor(getPort,(function(t){var r=On(this);cannotHaveUsernamePasswordPort(r)||(""==(t=String(t))?r.port=null:parseURL(r,t,ci))})),pathname:accessorDescriptor(getPathname,(function(t){var r=On(this);r.cannotBeABaseURL||(r.path=[],parseURL(r,t+"",pi))})),search:accessorDescriptor(getSearch,(function(t){var r=On(this);""==(t=String(t))?r.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),r.query="",parseURL(r,t,vi)),_n(r.searchParams).updateSearchParams(r.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var r=On(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),r.fragment="",parseURL(r,t,di)):r.fragment=null}))}),H(xi,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),H(xi,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),An){var bi=An.createObjectURL,Si=An.revokeObjectURL;bi&&H(mi,"createObjectURL",(function createObjectURL(t){return bi.apply(An,arguments)})),Si&&H(mi,"revokeObjectURL",(function revokeObjectURL(t){return Si.apply(An,arguments)}))}setToStringTag(mi,"URL"),_export({global:!0,forced:!en,sham:!i},{URL:mi});var wi=it.f,ki={}.toString,Ei="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Pi={f:function getOwnPropertyNames(t){return Ei&&"[object Window]"==ki.call(t)?function(t){try{return wi(t)}catch(t){return Ei.slice()}}(t):wi(toIndexedObject(t))}},Ri={f:wellKnownSymbol},Ci=w.f,defineWellKnownSymbol=function(t){var r=X.Symbol||(X.Symbol={});has(r,t)||Ci(r,t,{value:Ri.f(t)})},Ai=[].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,y,g,v){for(var d,x,b=toObject(h),S=p(b),w=functionBindContext(y,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:Ai.call(R,d)}else if(a)return!1;return u?-1:o||a?a:R}},Ti={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)},_i=Ti.forEach,Mi=sharedKey("hidden"),Oi=wellKnownSymbol("toPrimitive"),Ni=W.set,Li=W.getterFor("Symbol"),Di=Object.prototype,Ii=r.Symbol,$i=getBuiltIn("JSON","stringify"),Fi=b.f,Vi=w.f,ji=Pi.f,Bi=u.f,Gi=O("symbols"),zi=O("op-symbols"),Ui=O("string-to-symbol-registry"),qi=O("symbol-to-string-registry"),Wi=O("wks"),Hi=r.QObject,Xi=!Hi||!Hi.prototype||!Hi.prototype.findChild,Yi=i&&fails((function(){return 7!=Dt(Vi({},"a",{get:function(){return Vi(this,"a",{value:7}).a}})).a}))?function(t,r,i){var o=Fi(Di,r);o&&delete Di[r],Vi(t,r,i),o&&t!==Di&&Vi(Di,r,o)}:Vi,wrap=function(t,r){var o=Gi[t]=Dt(Ii.prototype);return Ni(o,{type:"Symbol",tag:t,description:r}),i||(o.description=r),o},Qi=vt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Ii},Ki=function defineProperty(t,r,i){t===Di&&Ki(zi,r,i),anObject(t);var o=toPrimitive(r,!0);return anObject(i),has(Gi,o)?(i.enumerable?(has(t,Mi)&&t[Mi][o]&&(t[Mi][o]=!1),i=Dt(i,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Mi)||Vi(t,Mi,createPropertyDescriptor(1,{})),t[Mi][o]=!0),Yi(t,o,i)):Vi(t,o,i)},Zi=function defineProperties(t,r){anObject(t);var o=toIndexedObject(r),a=Mt(o).concat(ro(o));return _i(a,(function(r){i&&!Ji.call(o,r)||Ki(t,r,o[r])})),t},Ji=function propertyIsEnumerable(t){var r=toPrimitive(t,!0),i=Bi.call(this,r);return!(this===Di&&has(Gi,r)&&!has(zi,r))&&(!(i||!has(this,r)||!has(Gi,r)||has(this,Mi)&&this[Mi][r])||i)},to=function getOwnPropertyDescriptor(t,r){var i=toIndexedObject(t),o=toPrimitive(r,!0);if(i!==Di||!has(Gi,o)||has(zi,o)){var a=Fi(i,o);return!a||!has(Gi,o)||has(i,Mi)&&i[Mi][o]||(a.enumerable=!0),a}},eo=function getOwnPropertyNames(t){var r=ji(toIndexedObject(t)),i=[];return _i(r,(function(t){has(Gi,t)||has(I,t)||i.push(t)})),i},ro=function getOwnPropertySymbols(t){var r=t===Di,i=ji(r?zi:toIndexedObject(t)),o=[];return _i(i,(function(t){!has(Gi,t)||r&&!has(Di,t)||o.push(Gi[t])})),o};if(gt||(H((Ii=function Symbol(){if(this instanceof Ii)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===Di&&setter.call(zi,t),has(this,Mi)&&has(this[Mi],r)&&(this[Mi][r]=!1),Yi(this,r,createPropertyDescriptor(1,t))};return i&&Xi&&Yi(Di,r,{configurable:!0,set:setter}),wrap(r,t)}).prototype,"toString",(function toString(){return Li(this).tag})),H(Ii,"withoutSetter",(function(t){return wrap(uid(t),t)})),u.f=Ji,w.f=Ki,b.f=to,it.f=Pi.f=eo,ot.f=ro,Ri.f=function(t){return wrap(wellKnownSymbol(t),t)},i&&(Vi(Ii.prototype,"description",{configurable:!0,get:function description(){return Li(this).description}}),H(Di,"propertyIsEnumerable",Ji,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!gt,sham:!gt},{Symbol:Ii}),_i(Mt(Wi),(function(t){defineWellKnownSymbol(t)})),_export({target:"Symbol",stat:!0,forced:!gt},{for:function(t){var r=String(t);if(has(Ui,r))return Ui[r];var i=Ii(r);return Ui[r]=i,qi[i]=r,i},keyFor:function keyFor(t){if(!Qi(t))throw TypeError(t+" is not a symbol");if(has(qi,t))return qi[t]},useSetter:function(){Xi=!0},useSimple:function(){Xi=!1}}),_export({target:"Object",stat:!0,forced:!gt,sham:!i},{create:function create(t,r){return void 0===r?Dt(t):Zi(Dt(t),r)},defineProperty:Ki,defineProperties:Zi,getOwnPropertyDescriptor:to}),_export({target:"Object",stat:!0,forced:!gt},{getOwnPropertyNames:eo,getOwnPropertySymbols:ro}),_export({target:"Object",stat:!0,forced:fails((function(){ot.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return ot.f(toObject(t))}}),$i){var no=!gt||fails((function(){var t=Ii();return"[null]"!=$i([t])||"{}"!=$i({a:t})||"{}"!=$i(Object(t))}));_export({target:"JSON",stat:!0,forced:no},{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)&&!Qi(t))return yt(r)||(r=function(t,r){if("function"==typeof o&&(r=o.call(this,t,r)),!Qi(r))return r}),a[1]=r,$i.apply(null,a)}})}Ii.prototype[Oi]||k(Ii.prototype,Oi,Ii.prototype.valueOf),setToStringTag(Ii,"Symbol"),I[Mi]=!0;var io=w.f,oo=r.Symbol;if(i&&"function"==typeof oo&&(!("description"in oo.prototype)||void 0!==oo().description)){var ao={},so=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),r=this instanceof so?new oo(t):void 0===t?oo():oo(t);return""===t&&(ao[r]=!0),r};copyConstructorProperties(so,oo);var uo=so.prototype=oo.prototype;uo.constructor=so;var co=uo.toString,lo="Symbol(test)"==String(oo("test")),fo=/^Symbol\((.*)\)[^)]+$/;io(uo,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,r=co.call(t);if(has(ao,t))return"";var i=lo?r.slice(7,-1):r.replace(fo,"$1");return""===i?void 0:i}}),_export({global:!0,forced:!0},{Symbol:so})}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)}))},ho=Object.defineProperty,po={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,r){if(has(po,t))return po[t];r||(r={});var o=[][t],a=!!has(r,"ACCESSORS")&&r.ACCESSORS,u=has(r,0)?r[0]:thrower,l=has(r,1)?r[1]:void 0;return po[t]=!!o&&!fails((function(){if(a&&!i)return!0;var t={length:-1};a?ho(t,1,{enumerable:!0,get:thrower}):t[1]=1,o.call(t,u,l)}))},yo=Ti.forEach,go=arrayMethodIsStrict("forEach"),vo=arrayMethodUsesToLength("forEach"),mo=go&&vo?[].forEach:function forEach(t){return yo(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=mo},{forEach:mo});var xo=[].reverse,bo=[1,2];_export({target:"Array",proto:!0,forced:String(bo)===String(bo.reverse())},{reverse:function reverse(){return yt(this)&&(this.length=this.length),xo.call(this)}});var So=arrayMethodHasSpeciesSupport("slice"),wo=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),ko=wellKnownSymbol("species"),Eo=[].slice,Po=Math.max;_export({target:"Array",proto:!0,forced:!So||!wo},{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(yt(u)&&("function"!=typeof(i=u.constructor)||i!==Array&&!yt(i.prototype)?isObject(i)&&null===(i=i[ko])&&(i=void 0):i=void 0,i===Array||void 0===i))return Eo.call(u,h,p);for(o=new(void 0===i?Array:i)(Po(p-h,0)),a=0;h<p;h++,a++)h in u&&createProperty(o,a,u[h]);return o.length=a,o}});var Ro=Date.prototype,Co=Ro.toString,Ao=Ro.getTime;new Date(NaN)+""!="Invalid Date"&&H(Ro,"toString",(function toString(){var t=Ao.call(this);return t==t?Co.call(this):"Invalid Date"}));var To=w.f,_o=Function.prototype,Mo=_o.toString,Oo=/^\s*function ([^ (]*)/;i&&!("name"in _o)&&To(_o,"name",{configurable:!0,get:function(){try{return Mo.call(this).match(Oo)[1]}catch(t){return""}}}),setToStringTag(r.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!i},{create:Dt}),_export({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:w.f});var No=fails((function(){qt(1)}));_export({target:"Object",stat:!0,forced:No,sham:!Gt},{getPrototypeOf:function getPrototypeOf(t){return qt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:Zt});var Lo=RegExp.prototype,Do=Lo.toString,Io=fails((function(){return"/a/b"!=Do.call({source:"a",flags:"b"})})),$o="toString"!=Do.name;for(var Fo in(Io||$o)&&H(RegExp.prototype,"toString",(function toString(){var t=anObject(this),r=String(t.source),i=t.flags;return"/"+r+"/"+String(void 0===i&&t instanceof RegExp&&!("flags"in Lo)?regexpFlags.call(t):i)}),{unsafe:!0}),Wr){var Vo=r[Fo],jo=Vo&&Vo.prototype;if(jo&&jo.forEach!==mo)try{k(jo,"forEach",mo)}catch(t){jo.forEach=mo}}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 Bo=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)}})),Go="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 zo=defaultSetTimout,Uo=defaultClearTimeout;function runTimeout(t){if(zo===setTimeout)return setTimeout(t,0);if((zo===defaultSetTimout||!zo)&&setTimeout)return zo=setTimeout,setTimeout(t,0);try{return zo(t,0)}catch(r){try{return zo.call(null,t,0)}catch(r){return zo.call(this,t,0)}}}"function"==typeof Go.setTimeout&&(zo=setTimeout),"function"==typeof Go.clearTimeout&&(Uo=clearTimeout);var qo,Wo=[],Ho=!1,Xo=-1;function cleanUpNextTick(){Ho&&qo&&(Ho=!1,qo.length?Wo=qo.concat(Wo):Xo=-1,Wo.length&&drainQueue())}function drainQueue(){if(!Ho){var t=runTimeout(cleanUpNextTick);Ho=!0;for(var r=Wo.length;r;){for(qo=Wo,Wo=[];++Xo<r;)qo&&qo[Xo].run();Xo=-1,r=Wo.length}qo=null,Ho=!1,function runClearTimeout(t){if(Uo===clearTimeout)return clearTimeout(t);if((Uo===defaultClearTimeout||!Uo)&&clearTimeout)return Uo=clearTimeout,clearTimeout(t);try{return Uo(t)}catch(r){try{return Uo.call(null,t)}catch(r){return Uo.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 Yo=noop,Qo=noop,Ko=noop,Zo=noop,Jo=noop,ta=noop,ea=noop;var ra=Go.performance||{},na=ra.now||ra.mozNow||ra.msNow||ra.oNow||ra.webkitNow||function(){return(new Date).getTime()};var ia=new Date;var oa={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];Wo.push(new Item(t,r)),1!==Wo.length||Ho||runTimeout(drainQueue)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Yo,addListener:Qo,once:Ko,off:Zo,removeListener:Jo,removeAllListeners:ta,emit:ea,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*na.call(ra),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-ia)/1e3}},aa=Ti.every,sa=arrayMethodIsStrict("every"),ua=arrayMethodUsesToLength("every");_export({target:"Array",proto:!0,forced:!sa||!ua},{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 ca=Ti.filter,la=arrayMethodHasSpeciesSupport("filter"),fa=arrayMethodUsesToLength("filter");_export({target:"Array",proto:!0,forced:!la||!fa},{filter:function filter(t){return ca(this,t,arguments.length>1?arguments[1]:void 0)}});var ha=!checkCorrectnessOfIteration((function(t){Array.from(t)}));_export({target:"Array",stat:!0,forced:ha},{from:an});var pa=tt.includes,ya=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!ya},{includes:function includes(t){return pa(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var ga=tt.indexOf,va=[].indexOf,da=!!va&&1/[1].indexOf(1,-0)<0,ma=arrayMethodIsStrict("indexOf"),xa=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:da||!ma||!xa},{indexOf:function indexOf(t){return da?va.apply(this,arguments)||0:ga(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Array",stat:!0},{isArray:yt});var ba=[].join,Sa=p!=Object,wa=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:Sa||!wa},{join:function join(t){return ba.call(toIndexedObject(this),void 0===t?",":t)}});var ka=Ti.map,Ea=arrayMethodHasSpeciesSupport("map"),Pa=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!Ea||!Pa},{map:function map(t){return ka(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=p(u),h=toLength(u.length),y=t?h-1:0,g=t?-1:1;if(o<2)for(;;){if(y in l){a=l[y],y+=g;break}if(y+=g,t?y<0:h<=y)throw TypeError("Reduce of empty array with no initial value")}for(;t?y>=0:h>y;y+=g)y in l&&(a=i(a,l[y],y,u));return a}},Ra={left:createMethod$3(!1),right:createMethod$3(!0)}.left,Ca=arrayMethodIsStrict("reduce"),Aa=arrayMethodUsesToLength("reduce",{1:0});_export({target:"Array",proto:!0,forced:!Ca||!Aa},{reduce:function reduce(t){return Ra(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ta=Ti.some,_a=arrayMethodIsStrict("some"),Ma=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!_a||!Ma},{some:function some(t){return Ta(this,t,arguments.length>1?arguments[1]:void 0)}}),_export({target:"Date",stat:!0},{now:function now(){return(new Date).getTime()}});var Oa=[].slice,Na={},construct=function(t,r,i){if(!(r in Na)){for(var o=[],a=0;a<r;a++)o[a]="a["+a+"]";Na[r]=Function("C,a","return new C("+o.join(",")+")")}return Na[r](t,i)},La=Function.bind||function bind(t){var r=aFunction$1(this),i=Oa.call(arguments,1),o=function bound(){var a=i.concat(Oa.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:La});var Da=!fails((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ia=createCommonjsModule((function(t){var r=w.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 Da&&u.REQUIRED&&a(t)&&!has(t,i)&&setMetadata(t),t}};I[i]=!0})),inheritIfRequired=function(t,r,i){var o,a;return Zt&&"function"==typeof(o=r.constructor)&&o!==i&&isObject(a=o.prototype)&&a!==i.prototype&&Zt(t,a),t},$a=w.f,Fa=Ia.fastKey,Va=W.set,ja=W.getterFor,Ba=(function(t,i,o){var a=-1!==t.indexOf("Map"),u=-1!==t.indexOf("Weak"),l=a?"set":"add",h=r[t],p=h&&h.prototype,y=h,g={},fixMethod=function(t){var r=p[t];H(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(ht(t,"function"!=typeof h||!(u||p.forEach&&!fails((function(){(new h).entries().next()})))))y=o.getConstructor(i,t,a,l),Ia.REQUIRED=!0;else if(ht(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=i((function(r,i){anInstance(r,y,t);var o=inheritIfRequired(new h,r,y);return null!=i&&ve(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,o,a){var u=t((function(t,l){anInstance(t,u,r),Va(t,{type:r,index:Dt(null),first:void 0,last:void 0,size:0}),i||(t.size=0),null!=l&&ve(l,t[a],t,o)})),l=ja(r),define=function(t,r,o){var a,u,h=l(t),p=getEntry(t,r);return p?p.value=o:(h.last=p={index:u=Fa(r,!0),key:r,value:o,previous:a=h.last,next:void 0,removed:!1},h.first||(h.first=p),a&&(a.next=p),i?h.size++:t.size++,"F"!==u&&(h.index[u]=p)),t},getEntry=function(t,r){var i,o=l(t),a=Fa(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,o=t.first;o;)o.removed=!0,o.previous&&(o.previous=o.previous.next=void 0),delete r[o.index],o=o.next;t.first=t.last=void 0,i?t.size=0:this.size=0},delete:function(t){var r=this,o=l(r),a=getEntry(r,t);if(a){var u=a.next,h=a.previous;delete o.index[a.index],a.removed=!0,h&&(h.next=u),u&&(u.previous=h),o.first==a&&(o.first=u),o.last==a&&(o.last=h),i?o.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,o?{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)}}),i&&$a(u.prototype,"size",{get:function(){return l(this).size}}),u},setStrong:function(t,r,i){var o=r+" Iterator",a=ja(r),u=ja(o);defineIterator(t,r,(function(t,r){Va(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"),Ga="["+Ba+"]",za=RegExp("^"+Ga+Ga+"*"),Ua=RegExp(Ga+Ga+"*$"),createMethod$4=function(t){return function(r){var i=String(requireObjectCoercible(r));return 1&t&&(i=i.replace(za,"")),2&t&&(i=i.replace(Ua,"")),i}},qa={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},Wa=it.f,Ha=b.f,Xa=w.f,Ya=qa.trim,Qa=r.Number,Ka=Qa.prototype,Za="Number"==classofRaw(Dt(Ka)),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=Ya(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(ht("Number",!Qa(" 0o1")||!Qa("0b1")||Qa("+0x1"))){for(var Ja,ts=function Number(t){var r=arguments.length<1?0:t,i=this;return i instanceof ts&&(Za?fails((function(){Ka.valueOf.call(i)})):"Number"!=classofRaw(i))?inheritIfRequired(new Qa(toNumber(r)),i,ts):toNumber(r)},es=i?Wa(Qa):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),rs=0;es.length>rs;rs++)has(Qa,Ja=es[rs])&&!has(ts,Ja)&&Xa(ts,Ja,Ha(Qa,Ja));ts.prototype=Ka,Ka.constructor=ts,H(r,"Number",ts)}_export({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:Ot});var ns=Ia.onFreeze,is=Object.freeze,os=fails((function(){is(1)}));_export({target:"Object",stat:!0,forced:os,sham:!Da},{freeze:function freeze(t){return is&&isObject(t)?is(ns(t)):t}});var as=b.f,ss=fails((function(){as(1)}));_export({target:"Object",stat:!0,forced:!i||ss,sham:!i},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return as(toIndexedObject(t),r)}}),_export({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,o=toIndexedObject(t),a=b.f,u=at(o),l={},h=0;u.length>h;)void 0!==(i=a(o,r=u[h++]))&&createProperty(l,r,i);return l}});var us=fails((function(){Mt(1)}));_export({target:"Object",stat:!0,forced:us},{keys:function keys(t){return Mt(toObject(t))}});var cs=qa.trim,ls=r.parseFloat,fs=1/ls(Ba+"-0")!=-1/0?function parseFloat(t){var r=cs(String(t)),i=ls(r);return 0===i&&"-"==r.charAt(0)?-0:i}:ls;_export({global:!0,forced:parseFloat!=fs},{parseFloat:fs});var hs=qa.trim,ps=r.parseInt,ys=/^[+-]?0[Xx]/,gs=8!==ps(Ba+"08")||22!==ps(Ba+"0x16")?function parseInt(t,r){var i=hs(String(t));return ps(i,r>>>0||(ys.test(i)?16:10))}:ps;_export({global:!0,forced:parseInt!=gs},{parseInt:gs});var vs=getBuiltIn("Reflect","apply"),ds=Function.apply,ms=!fails((function(){vs((function(){}))}));_export({target:"Reflect",stat:!0,forced:ms},{apply:function apply(t,r,i){return aFunction$1(t),anObject(i),vs?vs(t,r,i):ds.call(t,r,i)}});var xs=getBuiltIn("Reflect","construct"),bs=fails((function(){function F(){}return!(xs((function(){}),[],F)instanceof F)})),Ss=!fails((function(){xs((function(){}))})),ws=bs||Ss;_export({target:"Reflect",stat:!0,forced:ws,sham:ws},{construct:function construct(t,r){aFunction$1(t),anObject(r);var i=arguments.length<3?t:aFunction$1(arguments[2]);if(Ss&&!bs)return xs(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(La.apply(t,o))}var a=i.prototype,u=Dt(isObject(a)?a:Object.prototype),l=Function.apply.call(t,u,r);return isObject(l)?l:u}});var ks=b.f;_export({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(t,r){var i=ks(anObject(t),r);return!(i&&!i.configurable)&&delete t[r]}}),_export({target:"Reflect",stat:!0,sham:!Gt},{getPrototypeOf:function getPrototypeOf(t){return qt(anObject(t))}});var Es=wellKnownSymbol("match"),isRegexp=function(t){var r;return isObject(t)&&(void 0!==(r=t[Es])?!!r:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},Ps=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Ps]=!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 Rs=[].push,Cs=Math.min,As=!fails((function(){return!RegExp(4294967295,"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?4294967295: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=Tr.call(v,o))&&!((l=v.lastIndex)>g&&(p.push(o.slice(g,u.index)),u.length>1&&u.index<o.length&&Rs.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":"")+(As?"y":"g"),v=new p(As?l:"^(?:"+l.source+")",g),d=void 0===a?4294967295: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=As?b:0;var w,k=regexpExecAbstract(v,As?h:h.slice(b));if(null===k||(w=Cs(toLength(v.lastIndex+(As?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}]}),!As);var Ts,_s=b.f,Ms="".startsWith,Os=Math.min,Ns=correctIsRegexpLogic("startsWith"),Ls=!(Ns||(Ts=_s(String.prototype,"startsWith"),!Ts||Ts.writable));_export({target:"String",proto:!0,forced:!Ls&&!Ns},{startsWith:function startsWith(t){var r=String(requireObjectCoercible(this));notARegexp(t);var i=toLength(Os(arguments.length>1?arguments[1]:void 0,r.length)),o=String(t);return Ms?Ms.call(r,o,i):r.slice(i,i+o.length)===o}});var Ds=qa.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!Ba[t]()||"
"!="
"[t]()||Ba[t].name!==t}))}("trim")},{trim:function trim(){return Ds(this)}});var Is=function _arrayWithHoles(t){if(Array.isArray(t))return t};var $s=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 Fs=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 Vs=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return Fs(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)?Fs(t,r):void 0}};var js=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 Bs=function _slicedToArray(t,r){return Is(t)||$s(t,r)||Vs(t,r)||js()},Gs=Bo;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 zs=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 Us=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 qs=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 Ws=function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),t},Hs=createCommonjsModule((function(r){(function(){var t,i,o,a,u,l;"undefined"!=typeof performance&&null!==performance&&performance.now?r.exports=function(){return performance.now()}:null!=oa&&oa.hrtime?(r.exports=function(){return(t()-u)/1e6},i=oa.hrtime,a=(t=function getNanoSeconds(){var t;return 1e9*(t=i())[0]+t[1]})(),l=1e9*oa.uptime(),u=a-l):Date.now?(r.exports=function(){return Date.now()-o},o=Date.now()):(r.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(t)})),Xs="undefined"==typeof window?t:window,Ys=["moz","webkit"],Qs="AnimationFrame",Ks=Xs["request"+Qs],Zs=Xs["cancel"+Qs]||Xs["cancelRequest"+Qs],Js=0;!Ks&&Js<Ys.length;Js++)Ks=Xs[Ys[Js]+"Request"+Qs],Zs=Xs[Ys[Js]+"Cancel"+Qs]||Xs[Ys[Js]+"CancelRequest"+Qs];if(!Ks||!Zs){var tu=0,eu=0,ru=[];Ks=function raf(t){if(0===ru.length){var r=Hs(),i=Math.max(0,16.666666666666668-(r-tu));tu=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(tu)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return ru.push({handle:++eu,callback:t,cancelled:!1}),eu},Zs=function caf(t){for(var r=0;r<ru.length;r++)ru[r].handle===t&&(ru[r].cancelled=!0)}}var nu=function raf_1(t){return Ks.call(Xs,t)};nu.cancel=function cancel(){Zs.apply(Xs,arguments)},nu.polyfill=function polyfill(t){t||(t=Xs),t.requestAnimationFrame=Ks,t.cancelAnimationFrame=Zs};var iu=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}},ou=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 au=function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var su=function _possibleConstructorReturn(t,r){return!r||"object"!==ou(r)&&"function"!=typeof r?au(t):r},uu=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})),cu=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 lu=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&&cu(t,r)};var fu=function _arrayWithoutHoles(t){if(Array.isArray(t))return Fs(t)};var hu=function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)};var pu=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 yu=function _toConsumableArray(t){return fu(t)||hu(t)||Vs(t)||pu()};_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=b.f(t,r))?has(i,"value")?i.value:void 0===i.get?void 0:i.get.call(a):isObject(o=qt(t))?get$1(o,r,a):void 0}});var gu=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=uu(t)););return t},vu=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=gu(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 du=[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],mu=[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 xu,b=x,S=1;S<p;S++)b=b.next=new xu,S===v&&(l=b);b.next=x;for(var w=null,k=null,E=0,P=0,R=du[u],C=mu[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 L=0,D=0,I=0,$=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,L+=Y,D+=Q,I+=K,$+=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+=L+=w.r=h[nt],U+=D+=w.g=h[nt+1],q+=I+=w.b=h[nt+2],W+=$+=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,L-=ot,D-=at,I-=st,$-=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 xu=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 bu=/^[A-Z-]+$/;function normalizeAttributeName(t){return bu.test(t)?t.toLowerCase():t}function parseExternalUrl(t){var r=t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return r[2]||r[3]||r[4]}var Su=/(\[[^\]]+\])/g,wu=/(#[^\s\+>~\.\[:]+)/g,ku=/(\.[^\s\+>~\.\[:]+)/g,Eu=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,Pu=/(:[\w-]+\([^\)]*\))/gi,Ru=/(:[^\s\+>~\.\[:]+)/g,Cu=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(t,r){var i=t.match(r);return i?[t.replace(r," "),i.length]:[t,0]}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 Au=function(){function Property(t,r,i){qs(this,Property),this.document=t,this.name=r,this.value=i,this.isNormalizedColor=!1}return Ws(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=Bs(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 iu(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}();Au.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 Tu=function(){function ViewPort(){qs(this,ViewPort),this.viewPorts=[]}return Ws(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}(),_u=function(){function Point(t,r){qs(this,Point),this.x=t,this.y=r}return Ws(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=Bs(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=Bs(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}(),Mu=function(){function Mouse(t){qs(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 Ws(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 _u(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}(),Ou="undefined"!=typeof window?window:null,Nu="undefined"!=typeof fetch?fetch.bind(void 0):null,Lu=function(){function Screen(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.fetch,o=void 0===i?Nu:i,a=r.window,u=void 0===a?Ou:a;qs(this,Screen),this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Tu,this.mouse=new Mu(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=u,this.fetch=o}return Ws(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=Bs(R,2),A=C[0]||"xMidYMid",T=C[1]||"meet",_=a/u,M=l/h,O=Math.min(_,M),N=Math.max(_,M),L=u,D=h;"meet"===T&&(L*=O,D*=O),"slice"===T&&(L*=N,D*=N);var I=new Au(r,"refX",d),$=new Au(r,"refY",x),V=I.hasValue()&&$.hasValue();if(V&&i.translate(-O*I.getPixels("x"),-O*$.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-L/2,0),/YMid$/.test(A)&&(U||q)&&i.translate(0,l/2-D/2),/^xMax/.test(A)&&(G||z)&&i.translate(a-L,0),/YMax$/.test(A)&&(U||q)&&i.translate(0,l-D)}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=nu(tick)};l||P.start(),this.intervalId=nu(_)}}},{key:"stop",value:function stop(){this.intervalId&&(nu.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}();Lu.defaultWindow=Ou,Lu.defaultFetch=Nu;var Du=Lu.defaultFetch,Iu="undefined"!=typeof DOMParser?DOMParser:null,$u=function(){function Parser(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.fetch,i=void 0===r?Du:r,o=t.DOMParser,a=void 0===o?Iu:o;qs(this,Parser),this.fetch=i,this.DOMParser=a}var t,r;return Ws(Parser,[{key:"parse",value:(r=zs(Gs.mark((function _callee(t){return Gs.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=zs(Gs.mark((function _callee2(t){var r,i;return Gs.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}(),Fu=function(){function Translate(t,r){qs(this,Translate),this.type="translate",this.point=null,this.point=_u.parse(r)}return Ws(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}(),Vu=function(){function Rotate(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];qs(this,Rotate),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var o=toNumbers(r);this.angle=new Au(t,"angle",o[0]),this.cx=(o[1]||0)+(i[0]||0),this.cy=(o[2]||0)+(i[1]||0)}return Ws(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}(),ju=function(){function Scale(t,r){qs(this,Scale),this.type="scale",this.scale=null;var i=_u.parseScale(r);0!==i.x&&0!==i.y||(i.x=1e-8,i.y=1e-8),this.scale=i}return Ws(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}(),Bu=function(){function Matrix(t,r){qs(this,Matrix),this.type="matrix",this.matrix=[],this.matrix=toNumbers(r)}return Ws(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 Gu=function(t){lu(Skew,Bu);var r=function _createSuper(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(Skew);function Skew(t,i){var o;return qs(this,Skew),(o=r.call(this,t,i)).type="skew",o.angle=null,o.angle=new Au(t,"angle",i),o}return Skew}();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 zu=function(t){lu(SkewX,Gu);var r=function _createSuper$1(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$1()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(SkewX);function SkewX(t,i){var o;return qs(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}();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 Uu=function(t){lu(SkewY,Gu);var r=function _createSuper$2(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$2()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(SkewY);function SkewY(t,i){var o;return qs(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}();var qu=function(){function Transform(t,r,i){var o=this;qs(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=Bs(r,2),o=i[0],a=i[1];return[o.trim(),a.trim().replace(")","")]}(t),i=Bs(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 Ws(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}();qu.transformTypes={translate:Fu,rotate:Vu,scale:ju,matrix:Bu,skewX:zu,skewY:Uu};var Wu=function(){function Element(t,r){var i=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(qs(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 Au(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=Bs(o,2),u=a[0],l=a[1];i.styles[u]=new Au(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 Ws(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 Au(this.document,t,"");return this.attributes[t]=o,o}return i||Au.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 Au.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 Au(this.document,t,"");return this.styles[t]=h,h}return o||Au.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=qu.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(yu(r),[[i,a]])}),[])}},{key:"restoreStyles",value:function restoreStyles(t,r){r.forEach((function(r){var i=Bs(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}}Wu.ignoreChildTypes=["title"];var Hu=function(t){lu(UnknownElement,Wu);var r=function _createSuper$3(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$3()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(UnknownElement);function UnknownElement(t,i,o){return qs(this,UnknownElement),r.call(this,t,i,o)}return UnknownElement}();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 Xu=function(){function Font(t,r,i,o,a,u){qs(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 Ws(Font,[{key:"toString",value:function toString(){return[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===oa?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=Bs(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}();Xu.styles="normal|italic|oblique|inherit",Xu.variants="normal|small-caps|inherit",Xu.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Yu=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;qs(this,BoundingBox),this.x1=t,this.y1=r,this.x2=i,this.y2=o,this.addPoint(t,r),this.addPoint(i,o)}return Ws(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 Qu=function(t){lu(RenderedElement,Wu);var r=function _createSuper$4(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$4()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(RenderedElement);function RenderedElement(){var t;return qs(this,RenderedElement),(t=r.apply(this,arguments)).modifiedEmSizeStack=!1,t}return Ws(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 Au(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 Au(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||1e-8}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"),L=new Xu(T.getString(),_.getString(),M.getString(),O.hasValue()?"".concat(O.getPixels(!0),"px"):"",N.getString(),Xu.parse(A.getString(),t.font));T.setValue(L.fontStyle),_.setValue(L.fontVariant),M.setValue(L.fontWeight),O.setValue(L.fontSize),N.setValue(L.fontFamily),t.font=L.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){vu(uu(RenderedElement.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),RenderedElement}();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 Ku=function(t){lu(TextElement,Qu);var r=function _createSuper$5(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$5()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TextElement);function TextElement(t,i,o){var a;return qs(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 Ws(TextElement,[{key:"setContext",value:function setContext(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];vu(uu(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=Xu.parse(t.ctx.font).fontSize;return r.getStyle("font-size").getNumber(i)}},{key:"getTElementBoundingBox",value:function getTElementBoundingBox(t){var r=this.getFontSize();return new Yu(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=Xu.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}();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 Zu=function(t){lu(TSpanElement,Ku);var r=function _createSuper$6(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$6()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TSpanElement);function TSpanElement(t,i,o){var a;return qs(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 Ws(TSpanElement,[{key:"getText",value:function getText(){return this.text}}]),TSpanElement}();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 Ju=function(t){lu(TextNode,Zu);var r=function _createSuper$7(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$7()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TextNode);function TextNode(){var t;return qs(this,TextNode),(t=r.apply(this,arguments)).type="textNode",t}return TextNode}();var tc=function(){function PathParser(t){qs(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 Ws(PathParser,[{key:"reset",value:function reset(){this.i=-1,this.command="",this.previousCommand="",this.start=new _u(0,0),this.control=new _u(0,0),this.current=new _u(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 _u(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 _u(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 ec=function(t){lu(PathElement,Qu);var r=function _createSuper$8(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$8()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(PathElement);function PathElement(t,i,o){var a;return qs(this,PathElement),(a=r.call(this,t,i,o)).type="path",a.pathParser=null,a.pathParser=new tc(a.getAttribute("d").getString()),a}return Ws(PathElement,[{key:"path",value:function path(t){var r=this.pathParser,i=new Yu;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=Bs(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=Bs(i[d],2),b=x[0],S=x[1];v.render(t,b,S)}if(l.isUrlDefinition()){var w=l.getDefinition(),k=Bs(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 _u((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 _u(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 _u(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 _u(d*a*g.y/u,d*-u*g.x/a),b=new _u((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 _u(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}();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 rc=function(t){lu(SVGElement,Qu);var r=function _createSuper$9(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$9()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(SVGElement);function SVGElement(){var t;return qs(this,SVGElement),(t=r.apply(this,arguments)).type="svg",t.root=!1,t}return Ws(SVGElement,[{key:"clearContext",value:function clearContext(t){vu(uu(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 Au(r,"fontSize",Xu.parse(t.font).fontSize);u.hasValue()&&(r.rootEmSize=u.getPixels("y"),r.emSize=r.rootEmSize)}vu(uu(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}();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 nc=function(t){lu(RectElement,ec);var r=function _createSuper$a(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$a()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(RectElement);function RectElement(){var t;return qs(this,RectElement),(t=r.apply(this,arguments)).type="rect",t}return Ws(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 Yu(r,i,r+o,i+a)}},{key:"getMarkers",value:function getMarkers(){return null}}]),RectElement}();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 ic=function(t){lu(CircleElement,ec);var r=function _createSuper$b(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$b()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(CircleElement);function CircleElement(){var t;return qs(this,CircleElement),(t=r.apply(this,arguments)).type="circle",t}return Ws(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 Yu(r-o,i-o,r+o,i+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),CircleElement}();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 oc=function(t){lu(EllipseElement,ec);var r=function _createSuper$c(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$c()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(EllipseElement);function EllipseElement(){var t;return qs(this,EllipseElement),(t=r.apply(this,arguments)).type="ellipse",t}return Ws(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 Yu(a-i,u-o,a+i,u+o)}},{key:"getMarkers",value:function getMarkers(){return null}}]),EllipseElement}();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 ac=function(t){lu(LineElement,ec);var r=function _createSuper$d(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$d()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(LineElement);function LineElement(){var t;return qs(this,LineElement),(t=r.apply(this,arguments)).type="line",t}return Ws(LineElement,[{key:"getPoints",value:function getPoints(){return[new _u(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new _u(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function path(t){var r=this.getPoints(),i=Bs(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 Yu(a,u,h,p)}},{key:"getMarkers",value:function getMarkers(){var t=this.getPoints(),r=Bs(t,2),i=r[0],o=r[1],a=i.angleTo(o);return[[i,a],[o,a]]}}]),LineElement}();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 sc=function(t){lu(PolylineElement,ec);var r=function _createSuper$e(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$e()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(PolylineElement);function PolylineElement(t,i,o){var a;return qs(this,PolylineElement),(a=r.call(this,t,i,o)).type="polyline",a.points=[],a.points=_u.parsePath(a.getAttribute("points").getString()),a}return Ws(PolylineElement,[{key:"path",value:function path(t){var r=this.points,i=Bs(r,1)[0],o=i.x,a=i.y,u=new Yu(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}();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 uc=function(t){lu(PolygonElement,sc);var r=function _createSuper$f(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$f()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(PolygonElement);function PolygonElement(){var t;return qs(this,PolygonElement),(t=r.apply(this,arguments)).type="polygon",t}return Ws(PolygonElement,[{key:"path",value:function path(t){var r=vu(uu(PolygonElement.prototype),"path",this).call(this,t),i=Bs(this.points,1)[0],o=i.x,a=i.y;return t&&(t.lineTo(o,a),t.closePath()),r}}]),PolygonElement}();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 cc=function(t){lu(PatternElement,Wu);var r=function _createSuper$g(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$g()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(PatternElement);function PatternElement(){var t;return qs(this,PatternElement),(t=r.apply(this,arguments)).type="pattern",t}return Ws(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 rc(this.document,null);u.attributes.viewBox=new Au(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.width=new Au(this.document,"width","".concat(o,"px")),u.attributes.height=new Au(this.document,"height","".concat(a,"px")),u.attributes.transform=new Au(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 Au(this.document,"x",g*l.width),u.attributes.y=new Au(this.document,"y",v*l.height),u.render(h),h.restore();return t.createPattern(l,"repeat")}}]),PatternElement}();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){lu(MarkerElement,Wu);var r=function _createSuper$h(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$h()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(MarkerElement);function MarkerElement(){var t;return qs(this,MarkerElement),(t=r.apply(this,arguments)).type="marker",t}return Ws(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 rc(this.document,null);h.type=this.type,h.attributes.viewBox=new Au(this.document,"viewBox",this.getAttribute("viewBox").getValue()),h.attributes.refX=new Au(this.document,"refX",this.getAttribute("refX").getValue()),h.attributes.refY=new Au(this.document,"refY",this.getAttribute("refY").getValue()),h.attributes.width=new Au(this.document,"width",this.getAttribute("markerWidth").getValue()),h.attributes.height=new Au(this.document,"height",this.getAttribute("markerHeight").getValue()),h.attributes.overflow=new Au(this.document,"overflow",this.getAttribute("overflow").getValue()),h.attributes.fill=new Au(this.document,"fill",this.getAttribute("fill").getColor("black")),h.attributes.stroke=new Au(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}();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 fc=function(t){lu(DefsElement,Wu);var r=function _createSuper$i(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$i()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(DefsElement);function DefsElement(){var t;return qs(this,DefsElement),(t=r.apply(this,arguments)).type="defs",t}return Ws(DefsElement,[{key:"render",value:function render(){}}]),DefsElement}();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 hc=function(t){lu(GElement,Qu);var r=function _createSuper$j(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$j()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(GElement);function GElement(){var t;return qs(this,GElement),(t=r.apply(this,arguments)).type="g",t}return Ws(GElement,[{key:"getBoundingBox",value:function getBoundingBox(t){var r=new Yu;return this.children.forEach((function(i){r.addBoundingBox(i.getBoundingBox(t))})),r}}]),GElement}();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 pc=function(t){lu(GradientElement,Wu);var r=function _createSuper$k(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$k()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(GradientElement);function GradientElement(t,i,o){var a;qs(this,GradientElement),(a=r.call(this,t,i,o)).attributesToInherit=["gradientUnits"],a.stops=[];var u=au(a),l=u.stops;return u.children.forEach((function(t){"stop"===t.type&&l.push(t)})),a}return Ws(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=Bs(g.viewPorts,1)[0],d=new nc(h,null);d.attributes.x=new Au(h,"x",-y/3),d.attributes.y=new Au(h,"y",-y/3),d.attributes.width=new Au(h,"width",y),d.attributes.height=new Au(h,"height",y);var x=new hc(h,null);x.attributes.transform=new Au(h,"transform",this.getAttribute("gradientTransform").getValue()),x.children=[d];var b=new rc(h,null);b.attributes.x=new Au(h,"x",0),b.attributes.y=new Au(h,"y",0),b.attributes.width=new Au(h,"width",v.width),b.attributes.height=new Au(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 Au(this.document,"color",r).addOpacity(t).getColor():r}}]),GradientElement}();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 yc=function(t){lu(LinearGradientElement,pc);var r=function _createSuper$l(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$l()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(LinearGradientElement);function LinearGradientElement(t,i,o){var a;return qs(this,LinearGradientElement),(a=r.call(this,t,i,o)).type="linearGradient",a.attributesToInherit.push("x1","y1","x2","y2"),a}return Ws(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}();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 gc=function(t){lu(RadialGradientElement,pc);var r=function _createSuper$m(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$m()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(RadialGradientElement);function RadialGradientElement(t,i,o){var a;return qs(this,RadialGradientElement),(a=r.call(this,t,i,o)).type="radialGradient",a.attributesToInherit.push("cx","cy","r","fx","fy","fr"),a}return Ws(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}();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 vc=function(t){lu(StopElement,Wu);var r=function _createSuper$n(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$n()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(StopElement);function StopElement(t,i,o){var a;qs(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}();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 dc=function(t){lu(AnimateElement,Wu);var r=function _createSuper$o(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$o()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(AnimateElement);function AnimateElement(t,i,o){var a;return qs(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(au(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 Ws(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 Au(t,"from",parseFloat(r.getValue()[a])),i.to=new Au(t,"to",parseFloat(r.getValue()[u])),i.progress=(o-a)/(u-a)}else i.from=this.from,i.to=this.to;return i}}]),AnimateElement}();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 mc=function(t){lu(AnimateColorElement,dc);var r=function _createSuper$p(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$p()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(AnimateColorElement);function AnimateColorElement(){var t;return qs(this,AnimateColorElement),(t=r.apply(this,arguments)).type="animateColor",t}return Ws(AnimateColorElement,[{key:"calcValue",value:function calcValue(){var t=this.getProgress(),r=t.progress,i=t.from,o=t.to,a=new iu(i.getColor()),u=new iu(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}();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 xc=function(t){lu(AnimateTransformElement,dc);var r=function _createSuper$q(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$q()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(AnimateTransformElement);function AnimateTransformElement(){var t;return qs(this,AnimateTransformElement),(t=r.apply(this,arguments)).type="animateTransform",t}return Ws(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}();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 bc=function(t){lu(FontElement,Wu);var r=function _createSuper$r(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$r()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FontElement);function FontElement(t,i,o){var a;qs(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(au(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()]=au(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 Ws(FontElement,[{key:"render",value:function render(){}}]),FontElement}();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 Sc=function(t){lu(FontFaceElement,Wu);var r=function _createSuper$s(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$s()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FontFaceElement);function FontFaceElement(t,i,o){var a;return qs(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}();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 wc=function(t){lu(MissingGlyphElement,ec);var r=function _createSuper$t(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$t()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(MissingGlyphElement);function MissingGlyphElement(){var t;return qs(this,MissingGlyphElement),(t=r.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return MissingGlyphElement}();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 kc=function(t){lu(GlyphElement,ec);var r=function _createSuper$u(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$u()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(GlyphElement);function GlyphElement(t,i,o){var a;return qs(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}();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 Ec=function(t){lu(TRefElement,Ku);var r=function _createSuper$v(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$v()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TRefElement);function TRefElement(){var t;return qs(this,TRefElement),(t=r.apply(this,arguments)).type="tref",t}return Ws(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}();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 Pc=function(t){lu(AElement,Ku);var r=function _createSuper$w(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$w()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(AElement);function AElement(t,i,o){var a;qs(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 Ws(AElement,[{key:"getText",value:function getText(){return this.text}},{key:"renderChildren",value:function renderChildren(t){if(this.hasText){vu(uu(AElement.prototype),"renderChildren",this).call(this,t);var r=this.document,i=this.x,o=this.y,a=r.screen.mouse,u=new Au(r,"fontSize",Xu.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Yu(i,o-u.getPixels("y"),i+this.measureText(t),o))}else if(this.children.length>0){var l=new hc(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}();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 Rc=function(t){lu(TextPathElement,Ku);var r=function _createSuper$x(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$x()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TextPathElement);function TextPathElement(t,i,o){var a;qs(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 Ws(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 _u((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 _u(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 _u(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 _u(g*i*p.y/o,g*-o*p.x/i),d=new _u((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+1e-8),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+1e-8)===h)g={x:u+p,y:l+y};else{var v=0,d=0,x=this.getLineLength(r,i,o,a);if(x<1e-8)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}();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 Cc=function(t){lu(ImageElement,Qu);var r,i,o=function _createSuper$y(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$y()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(ImageElement);function ImageElement(t,r,i){var a;qs(this,ImageElement),(a=o.call(this,t,r,i)).type="image",a.loaded=!1;var u=a.getHrefAttribute().getString();if(!u)return su(a);var l=/\.svg$/.test(u);return t.images.push(au(a)),l?a.loadSvg(u):a.loadImage(u),a.isSvg=l,a}return Ws(ImageElement,[{key:"loadImage",value:(i=zs(Gs.mark((function _callee(t){var r;return Gs.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=zs(Gs.mark((function _callee2(t){var r,i;return Gs.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 Yu(t,r,t+i,r+o)}}]),ImageElement}();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 Ac=function(t){lu(SymbolElement,Qu);var r=function _createSuper$z(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$z()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(SymbolElement);function SymbolElement(){var t;return qs(this,SymbolElement),(t=r.apply(this,arguments)).type="symbol",t}return Ws(SymbolElement,[{key:"render",value:function render(t){}}]),SymbolElement}(),Tc=function(){function SVGFontLoader(t){qs(this,SVGFontLoader),this.document=t,this.loaded=!1,t.fonts.push(this)}var t;return Ws(SVGFontLoader,[{key:"load",value:(t=zs(Gs.mark((function _callee(t,r){var i,o,a;return Gs.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 _c=function(t){lu(StyleElement,Wu);var r=function _createSuper$A(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$A()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(StyleElement);function StyleElement(t,i,o){var a;return qs(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 Au(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,Su),u=Bs(a,2);i=u[0],o=u[1],r[1]+=o;var l=findSelectorMatch(i,wu),h=Bs(l,2);i=h[0],o=h[1],r[0]+=o;var p=findSelectorMatch(i,ku),y=Bs(p,2);i=y[0],o=y[1],r[1]+=o;var g=findSelectorMatch(i,Eu),v=Bs(g,2);i=v[0],o=v[1],r[2]+=o;var d=findSelectorMatch(i,Pu),x=Bs(d,2);i=x[0],o=x[1],r[1]+=o;var b=findSelectorMatch(i,Ru),S=Bs(b,2);i=S[0],o=S[1],r[1]+=o;var w=findSelectorMatch(i=i.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),Cu),k=Bs(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 Tc(t).load(a,i)}}))}}}))}})),a}return StyleElement}();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}}_c.parseExternalUrl=parseExternalUrl;var Mc=function(t){lu(UseElement,Qu);var r=function _createSuper$B(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$B()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(UseElement);function UseElement(){var t;return qs(this,UseElement),(t=r.apply(this,arguments)).type="use",t}return Ws(UseElement,[{key:"setContext",value:function setContext(t){vu(uu(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 rc(r,null)).attributes.viewBox=new Au(r,"viewBox",i.getAttribute("viewBox").getString()),o.attributes.preserveAspectRatio=new Au(r,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),o.attributes.overflow=new Au(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 Au(r,"width",a.getString())),u.hasValue()&&(o.attributes.height=new Au(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 qu.fromElement(t,r)}},{key:"element",get:function get(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),UseElement}();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 Oc=function(t){lu(FeColorMatrixElement,Wu);var r=function _createSuper$C(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$C()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FeColorMatrixElement);function FeColorMatrixElement(t,i,o){var a;qs(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 Ws(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}();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 Nc=function(t){lu(MaskElement,Wu);var r=function _createSuper$D(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$D()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(MaskElement);function MaskElement(){var t;return qs(this,MaskElement),(t=r.apply(this,arguments)).type="mask",t}return Ws(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 Yu;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 Oc(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}();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}}Nc.ignoreStyles=["mask","transform","clip-path"];var Lc=function noop(){},Dc=function(t){lu(ClipPathElement,Wu);var r=function _createSuper$E(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$E()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(ClipPathElement);function ClipPathElement(){var t;return qs(this,ClipPathElement),(t=r.apply(this,arguments)).type="clipPath",t}return Ws(ClipPathElement,[{key:"apply",value:function apply(t){var r=this.document,i=Reflect.getPrototypeOf(t),o=t.beginPath,a=t.closePath;i&&(i.beginPath=Lc,i.closePath=Lc),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=qu.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}();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 Ic=function(t){lu(FilterElement,Wu);var r=function _createSuper$F(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$F()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FilterElement);function FilterElement(){var t;return qs(this,FilterElement),(t=r.apply(this,arguments)).type="filter",t}return Ws(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}();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}}Ic.ignoreStyles=["filter","transform","clip-path"];var $c={svg:rc,rect:nc,circle:ic,ellipse:oc,line:ac,polyline:sc,polygon:uc,path:ec,pattern:cc,marker:lc,defs:fc,linearGradient:yc,radialGradient:gc,stop:vc,animate:dc,animateColor:mc,animateTransform:xc,font:bc,"font-face":Sc,"missing-glyph":wc,glyph:kc,text:Ku,tspan:Zu,tref:Ec,a:Pc,textPath:Rc,image:Cc,g:hc,symbol:Ac,style:_c,use:Mc,mask:Nc,clipPath:Dc,filter:Ic,feDropShadow:function(t){lu(FeDropShadowElement,Wu);var r=function _createSuper$G(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$G()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FeDropShadowElement);function FeDropShadowElement(t,i,o){var a;return qs(this,FeDropShadowElement),(a=r.call(this,t,i,o)).type="feDropShadow",a.addStylesFromStyleDefinition(),a}return Ws(FeDropShadowElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeDropShadowElement}(),feMorphology:function(t){lu(FeMorphologyElement,Wu);var r=function _createSuper$H(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$H()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FeMorphologyElement);function FeMorphologyElement(){var t;return qs(this,FeMorphologyElement),(t=r.apply(this,arguments)).type="feMorphology",t}return Ws(FeMorphologyElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeMorphologyElement}(),feComposite:function(t){lu(FeCompositeElement,Wu);var r=function _createSuper$I(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$I()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FeCompositeElement);function FeCompositeElement(){var t;return qs(this,FeCompositeElement),(t=r.apply(this,arguments)).type="feComposite",t}return Ws(FeCompositeElement,[{key:"apply",value:function apply(t,r,i,o,a){}}]),FeCompositeElement}(),feColorMatrix:Oc,feGaussianBlur:function(t){lu(FeGaussianBlurElement,Wu);var r=function _createSuper$J(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$J()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(FeGaussianBlurElement);function FeGaussianBlurElement(t,i,o){var a;return qs(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 Ws(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}(),title:function(t){lu(TitleElement,Wu);var r=function _createSuper$K(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$K()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(TitleElement);function TitleElement(){var t;return qs(this,TitleElement),(t=r.apply(this,arguments)).type="title",t}return TitleElement}(),desc:function(t){lu(DescElement,Wu);var r=function _createSuper$L(t){return function(){var r,i=uu(t);if(_isNativeReflectConstruct$L()){var o=uu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return su(this,r)}}(DescElement);function DescElement(){var t;return qs(this,DescElement),(t=r.apply(this,arguments)).type="desc",t}return DescElement}()};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=zs(Gs.mark((function _callee(t){var r,i,o=arguments;return Gs.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 Fc=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;qs(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 Ws(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 Hu(this,t)}},{key:"createTextNode",value:function createTextNode(t){return new Ju(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){Us(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){Us(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}Fc.createCanvas=function createCanvas(t,r){var i=document.createElement("canvas");return i.width=t,i.height=r,i},Fc.createImage=function createImage(t){return _createImage.apply(this,arguments)},Fc.elementTypes=$c;var Vc=function(){function Canvg(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};qs(this,Canvg),this.parser=new $u(i),this.screen=new Lu(t,i),this.options=i;var o=new Fc(this,i),a=o.createDocumentElement(r);this.document=o,this.documentElement=a}var t,r;return Ws(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=zs(Gs.mark((function _callee(){var t,r=arguments;return Gs.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=zs(Gs.mark((function _callee2(t,r){var i,o,a,u=arguments;return Gs.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 $u(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 $u(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 Gc}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return zc}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}var jc=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(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 Gc}));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)}}(),Bc={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,jc(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,Vc(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)})))()}},Gc=Object.freeze({__proto__:null,default:{saved:"Saved! Return to Item View!",hiddenframe:"Moinsave frame to store hidden values"}}),zc=Object.freeze({__proto__:null,default:{saved:"已保存! 返回视图!",hiddenframe:"Moinsave frame to store hidden values"}});export default Bc;
|
||
//# sourceMappingURL=ext-server_moinsave.js.map
|