Files
svgedit/dist/editor/system/extensions/ext-server_opensave/ext-server_opensave.js
2021-03-08 23:05:05 +01:00

2 lines
267 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
System.register(["process"],(function(h){"use strict";var g;return{setters:[function(h){g=h.default}],execute:function(){function _typeof$2(h){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(h)}function asyncGeneratorStep$1(h,g,d,x,b,_,S){try{var C=h[_](S),w=C.value}catch(h){return void d(h)}C.done?g(w):Promise.resolve(w).then(x,b)}function _asyncToGenerator$1(h){return function(){var g=this,d=arguments;return new Promise((function(x,b){var _=h.apply(g,d);function _next(h){asyncGeneratorStep$1(_,x,b,_next,_throw,"next",h)}function _throw(h){asyncGeneratorStep$1(_,x,b,_next,_throw,"throw",h)}_next(void 0)}))}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(h){var g={exports:{}};return h(g,g.exports),g.exports}var check$1=function(h){return h&&h.Math==Math&&h},x=check$1("object"==typeof globalThis&&globalThis)||check$1("object"==typeof window&&window)||check$1("object"==typeof self&&self)||check$1("object"==typeof d&&d)||function(){return this}()||Function("return this")(),fails$1=function(h){try{return!!h()}catch(h){return!0}},b=!fails$1((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,C={f:S&&!_.call({1:2},1)?function propertyIsEnumerable(h){var g=S(this,h);return!!g&&g.enumerable}:_},createPropertyDescriptor$1=function(h,g){return{enumerable:!(1&h),configurable:!(2&h),writable:!(4&h),value:g}},w={}.toString,classofRaw$1=function(h){return w.call(h).slice(8,-1)},E="".split,P=fails$1((function(){return!Object("z").propertyIsEnumerable(0)}))?function(h){return"String"==classofRaw$1(h)?E.call(h,""):Object(h)}:Object,requireObjectCoercible$1=function(h){if(null==h)throw TypeError("Can't call method on "+h);return h},toIndexedObject$1=function(h){return P(requireObjectCoercible$1(h))},isObject$1=function(h){return"object"==typeof h?null!==h:"function"==typeof h},toPrimitive$1=function(h,g){if(!isObject$1(h))return h;var d,x;if(g&&"function"==typeof(d=h.toString)&&!isObject$1(x=d.call(h)))return x;if("function"==typeof(d=h.valueOf)&&!isObject$1(x=d.call(h)))return x;if(!g&&"function"==typeof(d=h.toString)&&!isObject$1(x=d.call(h)))return x;throw TypeError("Can't convert object to primitive value")},k={}.hasOwnProperty,has$3=function(h,g){return k.call(h,g)},A=x.document,R=isObject$1(A)&&isObject$1(A.createElement),documentCreateElement$1=function(h){return R?A.createElement(h):{}},M=!b&&!fails$1((function(){return 7!=Object.defineProperty(documentCreateElement$1("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,D={f:b?N:function getOwnPropertyDescriptor(h,g){if(h=toIndexedObject$1(h),g=toPrimitive$1(g,!0),M)try{return N(h,g)}catch(h){}if(has$3(h,g))return createPropertyDescriptor$1(!C.f.call(h,g),h[g])}},anObject$1=function(h){if(!isObject$1(h))throw TypeError(String(h)+" is not an object");return h},$=Object.defineProperty,V={f:b?$:function defineProperty(h,g,d){if(anObject$1(h),g=toPrimitive$1(g,!0),anObject$1(d),M)try{return $(h,g,d)}catch(h){}if("get"in d||"set"in d)throw TypeError("Accessors not supported");return"value"in d&&(h[g]=d.value),h}},L=b?function(h,g,d){return V.f(h,g,createPropertyDescriptor$1(1,d))}:function(h,g,d){return h[g]=d,h},setGlobal$1=function(h,g){try{L(x,h,g)}catch(d){x[h]=g}return g},j="__core-js_shared__",B=x[j]||setGlobal$1(j,{}),z=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(h){return z.call(h)});var G,U,X,Y=B.inspectSource,W=x.WeakMap,q="function"==typeof W&&/native code/.test(Y(W)),Q=createCommonjsModule((function(h){(h.exports=function(h,g){return B[h]||(B[h]=void 0!==g?g:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),K=0,Z=Math.random(),uid$1=function(h){return"Symbol("+String(void 0===h?"":h)+")_"+(++K+Z).toString(36)},J=Q("keys"),sharedKey$1=function(h){return J[h]||(J[h]=uid$1(h))},tt={},et=x.WeakMap;if(q){var rt=B.state||(B.state=new et),nt=rt.get,it=rt.has,at=rt.set;G=function(h,g){return g.facade=h,at.call(rt,h,g),g},U=function(h){return nt.call(rt,h)||{}},X=function(h){return it.call(rt,h)}}else{var ot=sharedKey$1("state");tt[ot]=!0,G=function(h,g){return g.facade=h,L(h,ot,g),g},U=function(h){return has$3(h,ot)?h[ot]:{}},X=function(h){return has$3(h,ot)}}var st,ut,ct={set:G,get:U,has:X,enforce:function(h){return X(h)?U(h):G(h,{})},getterFor:function(h){return function(g){var d;if(!isObject$1(g)||(d=U(g)).type!==h)throw TypeError("Incompatible receiver, "+h+" required");return d}}},lt=createCommonjsModule((function(h){var g=ct.get,d=ct.enforce,b=String(String).split("String");(h.exports=function(h,g,_,S){var C,w=!!S&&!!S.unsafe,E=!!S&&!!S.enumerable,P=!!S&&!!S.noTargetGet;"function"==typeof _&&("string"!=typeof g||has$3(_,"name")||L(_,"name",g),(C=d(_)).source||(C.source=b.join("string"==typeof g?g:""))),h!==x?(w?!P&&h[g]&&(E=!0):delete h[g],E?h[g]=_:L(h,g,_)):E?h[g]=_:setGlobal$1(g,_)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&g(this).source||Y(this)}))})),ft=x,aFunction$3=function(h){return"function"==typeof h?h:void 0},getBuiltIn$1=function(h,g){return arguments.length<2?aFunction$3(ft[h])||aFunction$3(x[h]):ft[h]&&ft[h][g]||x[h]&&x[h][g]},ht=Math.ceil,pt=Math.floor,toInteger$1=function(h){return isNaN(h=+h)?0:(h>0?pt:ht)(h)},yt=Math.min,toLength$1=function(h){return h>0?yt(toInteger$1(h),9007199254740991):0},vt=Math.max,gt=Math.min,toAbsoluteIndex$1=function(h,g){var d=toInteger$1(h);return d<0?vt(d+g,0):gt(d,g)},createMethod$9=function(h){return function(g,d,x){var b,_=toIndexedObject$1(g),S=toLength$1(_.length),C=toAbsoluteIndex$1(x,S);if(h&&d!=d){for(;S>C;)if((b=_[C++])!=b)return!0}else for(;S>C;C++)if((h||C in _)&&_[C]===d)return h||C||0;return!h&&-1}},dt={includes:createMethod$9(!0),indexOf:createMethod$9(!1)},mt=dt.indexOf,objectKeysInternal$1=function(h,g){var d,x=toIndexedObject$1(h),b=0,_=[];for(d in x)!has$3(tt,d)&&has$3(x,d)&&_.push(d);for(;g.length>b;)has$3(x,d=g[b++])&&(~mt(_,d)||_.push(d));return _},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=xt.concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function getOwnPropertyNames(h){return objectKeysInternal$1(h,bt)}},St={f:Object.getOwnPropertySymbols},Ct=getBuiltIn$1("Reflect","ownKeys")||function ownKeys(h){var g=_t.f(anObject$1(h)),d=St.f;return d?g.concat(d(h)):g},copyConstructorProperties=function(h,g){for(var d=Ct(g),x=V.f,b=D.f,_=0;_<d.length;_++){var S=d[_];has$3(h,S)||x(h,S,b(g,S))}},wt=/#|\.prototype\./,isForced$1=function(h,g){var d=Pt[Et(h)];return d==Tt||d!=Ot&&("function"==typeof g?fails$1(g):!!g)},Et=isForced$1.normalize=function(h){return String(h).replace(wt,".").toLowerCase()},Pt=isForced$1.data={},Ot=isForced$1.NATIVE="N",Tt=isForced$1.POLYFILL="P",kt=isForced$1,At=D.f,_export$1=function(h,g){var d,b,_,S,C,w=h.target,E=h.global,P=h.stat;if(d=E?x:P?x[w]||setGlobal$1(w,{}):(x[w]||{}).prototype)for(b in g){if(S=g[b],_=h.noTargetGet?(C=At(d,b))&&C.value:d[b],!kt(E?b:w+(P?".":"#")+b,h.forced)&&void 0!==_){if(typeof S==typeof _)continue;copyConstructorProperties(S,_)}(h.sham||_&&_.sham)&&L(S,"sham",!0),lt(d,b,S,h)}},Rt="process"==classofRaw$1(x.process),Mt=getBuiltIn$1("navigator","userAgent")||"",Nt=x.process,It=Nt&&Nt.versions,Dt=It&&It.v8;Dt?ut=(st=Dt.split("."))[0]+st[1]:Mt&&(!(st=Mt.match(/Edge\/(\d+)/))||st[1]>=74)&&(st=Mt.match(/Chrome\/(\d+)/))&&(ut=st[1]);var $t,Vt=ut&&+ut,Lt=!!Object.getOwnPropertySymbols&&!fails$1((function(){return!Symbol.sham&&(Rt?38===Vt:Vt>37&&Vt<41)})),jt=Lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ft=Array.isArray||function isArray(h){return"Array"==classofRaw$1(h)},toObject$1=function(h){return Object(requireObjectCoercible$1(h))},Bt=Object.keys||function keys(h){return objectKeysInternal$1(h,xt)},zt=b?Object.defineProperties:function defineProperties(h,g){anObject$1(h);for(var d,x=Bt(g),b=x.length,_=0;b>_;)V.f(h,d=x[_++],g[d]);return h},Gt=getBuiltIn$1("document","documentElement"),Ut=sharedKey$1("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(h){return"<script>"+h+"</"+"script>"},NullProtoObject=function(){try{$t=document.domain&&new ActiveXObject("htmlfile")}catch(h){}var h,g;NullProtoObject=$t?function(h){h.write(scriptTag$1("")),h.close();var g=h.parentWindow.Object;return h=null,g}($t):((g=documentCreateElement$1("iframe")).style.display="none",Gt.appendChild(g),g.src=String("javascript:"),(h=g.contentWindow.document).open(),h.write(scriptTag$1("document.F=Object")),h.close(),h.F);for(var d=xt.length;d--;)delete NullProtoObject.prototype[xt[d]];return NullProtoObject()};tt[Ut]=!0;var Ht=Object.create||function create(h,g){var d;return null!==h?(EmptyConstructor$1.prototype=anObject$1(h),d=new EmptyConstructor$1,EmptyConstructor$1.prototype=null,d[Ut]=h):d=NullProtoObject(),void 0===g?d:zt(d,g)},Xt=_t.f,Yt={}.toString,Wt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],qt={f:function getOwnPropertyNames(h){return Wt&&"[object Window]"==Yt.call(h)?function(h){try{return Xt(h)}catch(h){return Wt.slice()}}(h):Xt(toIndexedObject$1(h))}},Qt=Q("wks"),Kt=x.Symbol,Zt=jt?Kt:Kt&&Kt.withoutSetter||uid$1,wellKnownSymbol$1=function(h){return has$3(Qt,h)&&(Lt||"string"==typeof Qt[h])||(Lt&&has$3(Kt,h)?Qt[h]=Kt[h]:Qt[h]=Zt("Symbol."+h)),Qt[h]},Jt={f:wellKnownSymbol$1},te=V.f,defineWellKnownSymbol$1=function(h){var g=ft.Symbol||(ft.Symbol={});has$3(g,h)||te(g,h,{value:Jt.f(h)})},ee=V.f,re=wellKnownSymbol$1("toStringTag"),setToStringTag$1=function(h,g,d){h&&!has$3(h=d?h:h.prototype,re)&&ee(h,re,{configurable:!0,value:g})},aFunction$2=function(h){if("function"!=typeof h)throw TypeError(String(h)+" is not a function");return h},functionBindContext$1=function(h,g,d){if(aFunction$2(h),void 0===g)return h;switch(d){case 0:return function(){return h.call(g)};case 1:return function(d){return h.call(g,d)};case 2:return function(d,x){return h.call(g,d,x)};case 3:return function(d,x,b){return h.call(g,d,x,b)}}return function(){return h.apply(g,arguments)}},ne=wellKnownSymbol$1("species"),arraySpeciesCreate$1=function(h,g){var d;return Ft(h)&&("function"!=typeof(d=h.constructor)||d!==Array&&!Ft(d.prototype)?isObject$1(d)&&null===(d=d[ne])&&(d=void 0):d=void 0),new(void 0===d?Array:d)(0===g?0:g)},ie=[].push,createMethod$8=function(h){var g=1==h,d=2==h,x=3==h,b=4==h,_=6==h,S=7==h,C=5==h||_;return function(w,E,k,A){for(var R,M,N=toObject$1(w),D=P(N),$=functionBindContext$1(E,k,3),V=toLength$1(D.length),L=0,j=A||arraySpeciesCreate$1,B=g?j(w,V):d||S?j(w,0):void 0;V>L;L++)if((C||L in D)&&(M=$(R=D[L],L,N),h))if(g)B[L]=M;else if(M)switch(h){case 3:return!0;case 5:return R;case 6:return L;case 2:ie.call(B,R)}else switch(h){case 4:return!1;case 7:ie.call(B,R)}return _?-1:x||b?b:B}},ae={forEach:createMethod$8(0),map:createMethod$8(1),filter:createMethod$8(2),some:createMethod$8(3),every:createMethod$8(4),find:createMethod$8(5),findIndex:createMethod$8(6),filterOut:createMethod$8(7)},oe=ae.forEach,se=sharedKey$1("hidden"),ue="Symbol",ce=wellKnownSymbol$1("toPrimitive"),le=ct.set,fe=ct.getterFor(ue),he=Object.prototype,pe=x.Symbol,ye=getBuiltIn$1("JSON","stringify"),ve=D.f,ge=V.f,de=qt.f,me=C.f,xe=Q("symbols"),be=Q("op-symbols"),_e=Q("string-to-symbol-registry"),Se=Q("symbol-to-string-registry"),Ce=Q("wks"),we=x.QObject,Ee=!we||!we.prototype||!we.prototype.findChild,Pe=b&&fails$1((function(){return 7!=Ht(ge({},"a",{get:function(){return ge(this,"a",{value:7}).a}})).a}))?function(h,g,d){var x=ve(he,g);x&&delete he[g],ge(h,g,d),x&&h!==he&&ge(he,g,x)}:ge,wrap$1=function(h,g){var d=xe[h]=Ht(pe.prototype);return le(d,{type:ue,tag:h,description:g}),b||(d.description=g),d},Oe=jt?function(h){return"symbol"==typeof h}:function(h){return Object(h)instanceof pe},Te=function defineProperty(h,g,d){h===he&&Te(be,g,d),anObject$1(h);var x=toPrimitive$1(g,!0);return anObject$1(d),has$3(xe,x)?(d.enumerable?(has$3(h,se)&&h[se][x]&&(h[se][x]=!1),d=Ht(d,{enumerable:createPropertyDescriptor$1(0,!1)})):(has$3(h,se)||ge(h,se,createPropertyDescriptor$1(1,{})),h[se][x]=!0),Pe(h,x,d)):ge(h,x,d)},ke=function defineProperties(h,g){anObject$1(h);var d=toIndexedObject$1(g),x=Bt(d).concat(Ne(d));return oe(x,(function(g){b&&!Ae.call(d,g)||Te(h,g,d[g])})),h},Ae=function propertyIsEnumerable(h){var g=toPrimitive$1(h,!0),d=me.call(this,g);return!(this===he&&has$3(xe,g)&&!has$3(be,g))&&(!(d||!has$3(this,g)||!has$3(xe,g)||has$3(this,se)&&this[se][g])||d)},Re=function getOwnPropertyDescriptor(h,g){var d=toIndexedObject$1(h),x=toPrimitive$1(g,!0);if(d!==he||!has$3(xe,x)||has$3(be,x)){var b=ve(d,x);return!b||!has$3(xe,x)||has$3(d,se)&&d[se][x]||(b.enumerable=!0),b}},Me=function getOwnPropertyNames(h){var g=de(toIndexedObject$1(h)),d=[];return oe(g,(function(h){has$3(xe,h)||has$3(tt,h)||d.push(h)})),d},Ne=function getOwnPropertySymbols(h){var g=h===he,d=de(g?be:toIndexedObject$1(h)),x=[];return oe(d,(function(h){!has$3(xe,h)||g&&!has$3(he,h)||x.push(xe[h])})),x};if(Lt||(lt((pe=function Symbol(){if(this instanceof pe)throw TypeError("Symbol is not a constructor");var h=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,g=uid$1(h),setter=function(h){this===he&&setter.call(be,h),has$3(this,se)&&has$3(this[se],g)&&(this[se][g]=!1),Pe(this,g,createPropertyDescriptor$1(1,h))};return b&&Ee&&Pe(he,g,{configurable:!0,set:setter}),wrap$1(g,h)}).prototype,"toString",(function toString(){return fe(this).tag})),lt(pe,"withoutSetter",(function(h){return wrap$1(uid$1(h),h)})),C.f=Ae,V.f=Te,D.f=Re,_t.f=qt.f=Me,St.f=Ne,Jt.f=function(h){return wrap$1(wellKnownSymbol$1(h),h)},b&&(ge(pe.prototype,"description",{configurable:!0,get:function description(){return fe(this).description}}),lt(he,"propertyIsEnumerable",Ae,{unsafe:!0}))),_export$1({global:!0,wrap:!0,forced:!Lt,sham:!Lt},{Symbol:pe}),oe(Bt(Ce),(function(h){defineWellKnownSymbol$1(h)})),_export$1({target:ue,stat:!0,forced:!Lt},{for:function(h){var g=String(h);if(has$3(_e,g))return _e[g];var d=pe(g);return _e[g]=d,Se[d]=g,d},keyFor:function keyFor(h){if(!Oe(h))throw TypeError(h+" is not a symbol");if(has$3(Se,h))return Se[h]},useSetter:function(){Ee=!0},useSimple:function(){Ee=!1}}),_export$1({target:"Object",stat:!0,forced:!Lt,sham:!b},{create:function create(h,g){return void 0===g?Ht(h):ke(Ht(h),g)},defineProperty:Te,defineProperties:ke,getOwnPropertyDescriptor:Re}),_export$1({target:"Object",stat:!0,forced:!Lt},{getOwnPropertyNames:Me,getOwnPropertySymbols:Ne}),_export$1({target:"Object",stat:!0,forced:fails$1((function(){St.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(h){return St.f(toObject$1(h))}}),ye){var Ie=!Lt||fails$1((function(){var h=pe();return"[null]"!=ye([h])||"{}"!=ye({a:h})||"{}"!=ye(Object(h))}));_export$1({target:"JSON",stat:!0,forced:Ie},{stringify:function stringify(h,g,d){for(var x,b=[h],_=1;arguments.length>_;)b.push(arguments[_++]);if(x=g,(isObject$1(g)||void 0!==h)&&!Oe(h))return Ft(g)||(g=function(h,g){if("function"==typeof x&&(g=x.call(this,h,g)),!Oe(g))return g}),b[1]=g,ye.apply(null,b)}})}pe.prototype[ce]||L(pe.prototype,ce,pe.prototype.valueOf),setToStringTag$1(pe,ue),tt[se]=!0;var De=V.f,$e=x.Symbol;if(b&&"function"==typeof $e&&(!("description"in $e.prototype)||void 0!==$e().description)){var Ve={},Le=function Symbol(){var h=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),g=this instanceof Le?new $e(h):void 0===h?$e():$e(h);return""===h&&(Ve[g]=!0),g};copyConstructorProperties(Le,$e);var je=Le.prototype=$e.prototype;je.constructor=Le;var Fe=je.toString,Be="Symbol(test)"==String($e("test")),ze=/^Symbol\((.*)\)[^)]+$/;De(je,"description",{configurable:!0,get:function description(){var h=isObject$1(this)?this.valueOf():this,g=Fe.call(h);if(has$3(Ve,h))return"";var d=Be?g.slice(7,-1):g.replace(ze,"$1");return""===d?void 0:d}}),_export$1({global:!0,forced:!0},{Symbol:Le})}var Ge={};Ge[wellKnownSymbol$1("toStringTag")]="z";var Ue="[object z]"===String(Ge),He=wellKnownSymbol$1("toStringTag"),Xe="Arguments"==classofRaw$1(function(){return arguments}()),Ye=Ue?classofRaw$1:function(h){var g,d,x;return void 0===h?"Undefined":null===h?"Null":"string"==typeof(d=function(h,g){try{return h[g]}catch(h){}}(g=Object(h),He))?d:Xe?classofRaw$1(g):"Object"==(x=classofRaw$1(g))&&"function"==typeof g.callee?"Arguments":x},We=Ue?{}.toString:function toString(){return"[object "+Ye(this)+"]"};Ue||lt(Object.prototype,"toString",We,{unsafe:!0}),defineWellKnownSymbol$1("iterator");var qe,Qe,Ke,createMethod$7=function(h){return function(g,d){var x,b,_=String(requireObjectCoercible$1(g)),S=toInteger$1(d),C=_.length;return S<0||S>=C?h?"":void 0:(x=_.charCodeAt(S))<55296||x>56319||S+1===C||(b=_.charCodeAt(S+1))<56320||b>57343?h?_.charAt(S):x:h?_.slice(S,S+2):b-56320+(x-55296<<10)+65536}},Ze={codeAt:createMethod$7(!1),charAt:createMethod$7(!0)},Je=!fails$1((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),tr=sharedKey$1("IE_PROTO"),er=Object.prototype,rr=Je?Object.getPrototypeOf:function(h){return h=toObject$1(h),has$3(h,tr)?h[tr]:"function"==typeof h.constructor&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?er:null},nr=wellKnownSymbol$1("iterator"),ir=!1;[].keys&&("next"in(Ke=[].keys())?(Qe=rr(rr(Ke)))!==Object.prototype&&(qe=Qe):ir=!0),(null==qe||fails$1((function(){var h={};return qe[nr].call(h)!==h})))&&(qe={}),has$3(qe,nr)||L(qe,nr,(function(){return this}));var ar={IteratorPrototype:qe,BUGGY_SAFARI_ITERATORS:ir},or={},sr=ar.IteratorPrototype,returnThis$4=function(){return this},ur=Object.setPrototypeOf||("__proto__"in{}?function(){var h,g=!1,d={};try{(h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(d,[]),g=d instanceof Array}catch(h){}return function setPrototypeOf(d,x){return anObject$1(d),function(h){if(!isObject$1(h)&&null!==h)throw TypeError("Can't set "+String(h)+" as a prototype")}(x),g?h.call(d,x):d.__proto__=x,d}}():void 0),cr=ar.IteratorPrototype,lr=ar.BUGGY_SAFARI_ITERATORS,fr=wellKnownSymbol$1("iterator"),hr="keys",pr="values",yr="entries",returnThis$3=function(){return this},defineIterator$1=function(h,g,d,x,b,_,S){!function(h,g,d){var x=g+" Iterator";h.prototype=Ht(sr,{next:createPropertyDescriptor$1(1,d)}),setToStringTag$1(h,x,!1),or[x]=returnThis$4}(d,g,x);var C,w,E,getIterationMethod=function(h){if(h===b&&M)return M;if(!lr&&h in A)return A[h];switch(h){case hr:return function keys(){return new d(this,h)};case pr:return function values(){return new d(this,h)};case yr:return function entries(){return new d(this,h)}}return function(){return new d(this)}},P=g+" Iterator",k=!1,A=h.prototype,R=A[fr]||A["@@iterator"]||b&&A[b],M=!lr&&R||getIterationMethod(b),N="Array"==g&&A.entries||R;if(N&&(C=rr(N.call(new h)),cr!==Object.prototype&&C.next&&(rr(C)!==cr&&(ur?ur(C,cr):"function"!=typeof C[fr]&&L(C,fr,returnThis$3)),setToStringTag$1(C,P,!0))),b==pr&&R&&R.name!==pr&&(k=!0,M=function values(){return R.call(this)}),A[fr]!==M&&L(A,fr,M),or[g]=M,b)if(w={values:getIterationMethod(pr),keys:_?M:getIterationMethod(hr),entries:getIterationMethod(yr)},S)for(E in w)(lr||k||!(E in A))&&lt(A,E,w[E]);else _export$1({target:g,proto:!0,forced:lr||k},w);return w},vr=Ze.charAt,gr="String Iterator",dr=ct.set,mr=ct.getterFor(gr);defineIterator$1(String,"String",(function(h){dr(this,{type:gr,string:String(h),index:0})}),(function next(){var h,g=mr(this),d=g.string,x=g.index;return x>=d.length?{value:void 0,done:!0}:(h=vr(d,x),g.index+=h.length,{value:h,done:!1})}));var xr=wellKnownSymbol$1("unscopables"),br=Array.prototype;null==br[xr]&&V.f(br,xr,{configurable:!0,value:Ht(null)});var addToUnscopables=function(h){br[xr][h]=!0},_r="Array Iterator",Sr=ct.set,Cr=ct.getterFor(_r),wr=defineIterator$1(Array,"Array",(function(h,g){Sr(this,{type:_r,target:toIndexedObject$1(h),index:0,kind:g})}),(function(){var h=Cr(this),g=h.target,d=h.kind,x=h.index++;return!g||x>=g.length?(h.target=void 0,{value:void 0,done:!0}):"keys"==d?{value:x,done:!1}:"values"==d?{value:g[x],done:!1}:{value:[x,g[x]],done:!1}}),"values");or.Arguments=or.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var Er={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},Pr=wellKnownSymbol$1("iterator"),Or=wellKnownSymbol$1("toStringTag"),Tr=wr.values;for(var kr in Er){var Ar=x[kr],Rr=Ar&&Ar.prototype;if(Rr){if(Rr[Pr]!==Tr)try{L(Rr,Pr,Tr)}catch(h){Rr[Pr]=Tr}if(Rr[Or]||L(Rr,Or,kr),Er[kr])for(var Mr in wr)if(Rr[Mr]!==wr[Mr])try{L(Rr,Mr,wr[Mr])}catch(h){Rr[Mr]=wr[Mr]}}}defineWellKnownSymbol$1("asyncIterator"),defineWellKnownSymbol$1("toStringTag"),setToStringTag$1(Math,"Math",!0),setToStringTag$1(x.JSON,"JSON",!0);var Nr=fails$1((function(){rr(1)}));_export$1({target:"Object",stat:!0,forced:Nr,sham:!Je},{getPrototypeOf:function getPrototypeOf(h){return rr(toObject$1(h))}});var arrayMethodIsStrict$1=function(h,g){var d=[][h];return!!d&&fails$1((function(){d.call(null,g||function(){throw 1},1)}))},Ir=ae.forEach,Dr=arrayMethodIsStrict$1("forEach")?[].forEach:function forEach(h){return Ir(this,h,arguments.length>1?arguments[1]:void 0)};_export$1({target:"Array",proto:!0,forced:[].forEach!=Dr},{forEach:Dr});var $r=V.f,Vr=Function.prototype,Lr=Vr.toString,jr=/^\s*function ([^ (]*)/,Fr="name";b&&!(Fr in Vr)&&$r(Vr,Fr,{configurable:!0,get:function(){try{return Lr.call(this).match(jr)[1]}catch(h){return""}}}),_export$1({target:"Object",stat:!0},{setPrototypeOf:ur});var Br=x.Promise,redefineAll$1=function(h,g,d){for(var x in g)lt(h,x,g[x],d);return h},zr=wellKnownSymbol$1("species"),setSpecies$1=function(h){var g=getBuiltIn$1(h),d=V.f;b&&g&&!g[zr]&&d(g,zr,{configurable:!0,get:function(){return this}})},anInstance$1=function(h,g,d){if(!(h instanceof g))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return h},Gr=wellKnownSymbol$1("iterator"),Ur=Array.prototype,isArrayIteratorMethod$1=function(h){return void 0!==h&&(or.Array===h||Ur[Gr]===h)},Hr=wellKnownSymbol$1("iterator"),getIteratorMethod$2=function(h){if(null!=h)return h[Hr]||h["@@iterator"]||or[Ye(h)]},iteratorClose$1=function(h){var g=h.return;if(void 0!==g)return anObject$1(g.call(h)).value},Result$1=function(h,g){this.stopped=h,this.result=g},iterate$1=function(h,g,d){var x,b,_,S,C,w,E,P=d&&d.that,k=!(!d||!d.AS_ENTRIES),A=!(!d||!d.IS_ITERATOR),R=!(!d||!d.INTERRUPTED),M=functionBindContext$1(g,P,1+k+R),stop=function(h){return x&&iteratorClose$1(x),new Result$1(!0,h)},callFn=function(h){return k?(anObject$1(h),R?M(h[0],h[1],stop):M(h[0],h[1])):R?M(h,stop):M(h)};if(A)x=h;else{if("function"!=typeof(b=getIteratorMethod$2(h)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod$1(b)){for(_=0,S=toLength$1(h.length);S>_;_++)if((C=callFn(h[_]))&&C instanceof Result$1)return C;return new Result$1(!1)}x=b.call(h)}for(w=x.next;!(E=w.call(x)).done;){try{C=callFn(E.value)}catch(h){throw iteratorClose$1(x),h}if("object"==typeof C&&C&&C instanceof Result$1)return C}return new Result$1(!1)},Xr=wellKnownSymbol$1("iterator"),Yr=!1;try{var Wr=0,qr={next:function(){return{done:!!Wr++}},return:function(){Yr=!0}};qr[Xr]=function(){return this},Array.from(qr,(function(){throw 2}))}catch(h){}var Qr,Kr,Zr,checkCorrectnessOfIteration$1=function(h,g){if(!g&&!Yr)return!1;var d=!1;try{var x={};x[Xr]=function(){return{next:function(){return{done:d=!0}}}},h(x)}catch(h){}return d},Jr=wellKnownSymbol$1("species"),speciesConstructor$1=function(h,g){var d,x=anObject$1(h).constructor;return void 0===x||null==(d=anObject$1(x)[Jr])?g:aFunction$2(d)},tn=/(iphone|ipod|ipad).*applewebkit/i.test(Mt),en=x.location,rn=x.setImmediate,nn=x.clearImmediate,an=x.process,on=x.MessageChannel,sn=x.Dispatch,un=0,cn={},ln="onreadystatechange",run$1=function(h){if(cn.hasOwnProperty(h)){var g=cn[h];delete cn[h],g()}},runner$1=function(h){return function(){run$1(h)}},listener$1=function(h){run$1(h.data)},post$1=function(h){x.postMessage(h+"",en.protocol+"//"+en.host)};rn&&nn||(rn=function setImmediate(h){for(var g=[],d=1;arguments.length>d;)g.push(arguments[d++]);return cn[++un]=function(){("function"==typeof h?h:Function(h)).apply(void 0,g)},Qr(un),un},nn=function clearImmediate(h){delete cn[h]},Rt?Qr=function(h){an.nextTick(runner$1(h))}:sn&&sn.now?Qr=function(h){sn.now(runner$1(h))}:on&&!tn?(Zr=(Kr=new on).port2,Kr.port1.onmessage=listener$1,Qr=functionBindContext$1(Zr.postMessage,Zr,1)):x.addEventListener&&"function"==typeof postMessage&&!x.importScripts&&en&&"file:"!==en.protocol&&!fails$1(post$1)?(Qr=post$1,x.addEventListener("message",listener$1,!1)):Qr=ln in documentCreateElement$1("script")?function(h){Gt.appendChild(documentCreateElement$1("script")).onreadystatechange=function(){Gt.removeChild(this),run$1(h)}}:function(h){setTimeout(runner$1(h),0)});var fn,hn,pn,yn,vn,gn,dn,mn,xn={set:rn,clear:nn},bn=/web0s(?!.*chrome)/i.test(Mt),_n=D.f,Sn=xn.set,Cn=x.MutationObserver||x.WebKitMutationObserver,wn=x.document,En=x.process,Pn=x.Promise,On=_n(x,"queueMicrotask"),Tn=On&&On.value;Tn||(fn=function(){var h,g;for(Rt&&(h=En.domain)&&h.exit();hn;){g=hn.fn,hn=hn.next;try{g()}catch(h){throw hn?yn():pn=void 0,h}}pn=void 0,h&&h.enter()},tn||Rt||bn||!Cn||!wn?Pn&&Pn.resolve?(dn=Pn.resolve(void 0),mn=dn.then,yn=function(){mn.call(dn,fn)}):yn=Rt?function(){En.nextTick(fn)}:function(){Sn.call(x,fn)}:(vn=!0,gn=wn.createTextNode(""),new Cn(fn).observe(gn,{characterData:!0}),yn=function(){gn.data=vn=!vn}));var kn,An,Rn,Mn,Nn=Tn||function(h){var g={fn:h,next:void 0};pn&&(pn.next=g),hn||(hn=g,yn()),pn=g},PromiseCapability$1=function(h){var g,d;this.promise=new h((function(h,x){if(void 0!==g||void 0!==d)throw TypeError("Bad Promise constructor");g=h,d=x})),this.resolve=aFunction$2(g),this.reject=aFunction$2(d)},In={f:function(h){return new PromiseCapability$1(h)}},promiseResolve$1=function(h,g){if(anObject$1(h),isObject$1(g)&&g.constructor===h)return g;var d=In.f(h);return(0,d.resolve)(g),d.promise},perform$1=function(h){try{return{error:!1,value:h()}}catch(h){return{error:!0,value:h}}},Dn=xn.set,$n=wellKnownSymbol$1("species"),Vn="Promise",Ln=ct.get,jn=ct.set,Fn=ct.getterFor(Vn),Bn=Br,zn=x.TypeError,Gn=x.document,Un=x.process,Hn=getBuiltIn$1("fetch"),Xn=In.f,Yn=Xn,Wn=!!(Gn&&Gn.createEvent&&x.dispatchEvent),qn="function"==typeof PromiseRejectionEvent,Qn="unhandledrejection",Kn=kt(Vn,(function(){if(!(Y(Bn)!==String(Bn))){if(66===Vt)return!0;if(!Rt&&!qn)return!0}if(Vt>=51&&/native code/.test(Bn))return!1;var h=Bn.resolve(1),FakePromise=function(h){h((function(){}),(function(){}))};return(h.constructor={})[$n]=FakePromise,!(h.then((function(){}))instanceof FakePromise)})),Zn=Kn||!checkCorrectnessOfIteration$1((function(h){Bn.all(h).catch((function(){}))})),isThenable$1=function(h){var g;return!(!isObject$1(h)||"function"!=typeof(g=h.then))&&g},notify$2=function(h,g){if(!h.notified){h.notified=!0;var d=h.reactions;Nn((function(){for(var x=h.value,b=1==h.state,_=0;d.length>_;){var S,C,w,E=d[_++],P=b?E.ok:E.fail,k=E.resolve,A=E.reject,R=E.domain;try{P?(b||(2===h.rejection&&onHandleUnhandled$1(h),h.rejection=1),!0===P?S=x:(R&&R.enter(),S=P(x),R&&(R.exit(),w=!0)),S===E.promise?A(zn("Promise-chain cycle")):(C=isThenable$1(S))?C.call(S,k,A):k(S)):A(x)}catch(h){R&&!w&&R.exit(),A(h)}}h.reactions=[],h.notified=!1,g&&!h.rejection&&onUnhandled$1(h)}))}},dispatchEvent$1=function(h,g,d){var b,_;Wn?((b=Gn.createEvent("Event")).promise=g,b.reason=d,b.initEvent(h,!1,!0),x.dispatchEvent(b)):b={promise:g,reason:d},!qn&&(_=x["on"+h])?_(b):h===Qn&&function(h,g){var d=x.console;d&&d.error&&(1===arguments.length?d.error(h):d.error(h,g))}("Unhandled promise rejection",d)},onUnhandled$1=function(h){Dn.call(x,(function(){var g,d=h.facade,x=h.value;if(isUnhandled$1(h)&&(g=perform$1((function(){Rt?Un.emit("unhandledRejection",x,d):dispatchEvent$1(Qn,d,x)})),h.rejection=Rt||isUnhandled$1(h)?2:1,g.error))throw g.value}))},isUnhandled$1=function(h){return 1!==h.rejection&&!h.parent},onHandleUnhandled$1=function(h){Dn.call(x,(function(){var g=h.facade;Rt?Un.emit("rejectionHandled",g):dispatchEvent$1("rejectionhandled",g,h.value)}))},bind$4=function(h,g,d){return function(x){h(g,x,d)}},internalReject$1=function(h,g,d){h.done||(h.done=!0,d&&(h=d),h.value=g,h.state=2,notify$2(h,!0))},internalResolve$1=function(h,g,d){if(!h.done){h.done=!0,d&&(h=d);try{if(h.facade===g)throw zn("Promise can't be resolved itself");var x=isThenable$1(g);x?Nn((function(){var d={done:!1};try{x.call(g,bind$4(internalResolve$1,d,h),bind$4(internalReject$1,d,h))}catch(g){internalReject$1(d,g,h)}})):(h.value=g,h.state=1,notify$2(h,!1))}catch(g){internalReject$1({done:!1},g,h)}}};Kn&&(Bn=function Promise(h){anInstance$1(this,Bn,Vn),aFunction$2(h),kn.call(this);var g=Ln(this);try{h(bind$4(internalResolve$1,g),bind$4(internalReject$1,g))}catch(h){internalReject$1(g,h)}},(kn=function Promise(h){jn(this,{type:Vn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll$1(Bn.prototype,{then:function then(h,g){var d=Fn(this),x=Xn(speciesConstructor$1(this,Bn));return x.ok="function"!=typeof h||h,x.fail="function"==typeof g&&g,x.domain=Rt?Un.domain:void 0,d.parent=!0,d.reactions.push(x),0!=d.state&&notify$2(d,!1),x.promise},catch:function(h){return this.then(void 0,h)}}),An=function(){var h=new kn,g=Ln(h);this.promise=h,this.resolve=bind$4(internalResolve$1,g),this.reject=bind$4(internalReject$1,g)},In.f=Xn=function(h){return h===Bn||h===Rn?new An(h):Yn(h)},"function"==typeof Br&&(Mn=Br.prototype.then,lt(Br.prototype,"then",(function then(h,g){var d=this;return new Bn((function(h,g){Mn.call(d,h,g)})).then(h,g)}),{unsafe:!0}),"function"==typeof Hn&&_export$1({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(h){return promiseResolve$1(Bn,Hn.apply(x,arguments))}}))),_export$1({global:!0,wrap:!0,forced:Kn},{Promise:Bn}),setToStringTag$1(Bn,Vn,!1),setSpecies$1(Vn),Rn=getBuiltIn$1(Vn),_export$1({target:Vn,stat:!0,forced:Kn},{reject:function reject(h){var g=Xn(this);return g.reject.call(void 0,h),g.promise}}),_export$1({target:Vn,stat:!0,forced:Kn},{resolve:function resolve(h){return promiseResolve$1(this,h)}}),_export$1({target:Vn,stat:!0,forced:Zn},{all:function all(h){var g=this,d=Xn(g),x=d.resolve,b=d.reject,_=perform$1((function(){var d=aFunction$2(g.resolve),_=[],S=0,C=1;iterate$1(h,(function(h){var w=S++,E=!1;_.push(void 0),C++,d.call(g,h).then((function(h){E||(E=!0,_[w]=h,--C||x(_))}),b)})),--C||x(_)}));return _.error&&b(_.value),d.promise},race:function race(h){var g=this,d=Xn(g),x=d.reject,b=perform$1((function(){var b=aFunction$2(g.resolve);iterate$1(h,(function(h){b.call(g,h).then(d.resolve,x)}))}));return b.error&&x(b.value),d.promise}});var regexpFlags=function(){var h=anObject$1(this),g="";return h.global&&(g+="g"),h.ignoreCase&&(g+="i"),h.multiline&&(g+="m"),h.dotAll&&(g+="s"),h.unicode&&(g+="u"),h.sticky&&(g+="y"),g},Jn="toString",ti=RegExp.prototype,ei=ti.toString,ri=fails$1((function(){return"/a/b"!=ei.call({source:"a",flags:"b"})})),ni=ei.name!=Jn;for(var ii in(ri||ni)&&lt(RegExp.prototype,Jn,(function toString(){var h=anObject$1(this),g=String(h.source),d=h.flags;return"/"+g+"/"+String(void 0===d&&h instanceof RegExp&&!("flags"in ti)?regexpFlags.call(h):d)}),{unsafe:!0}),Er){var ai=x[ii],oi=ai&&ai.prototype;if(oi&&oi.forEach!==Dr)try{L(oi,"forEach",Dr)}catch(h){oi.forEach=Dr}}var si=[].reverse,ui=[1,2];_export$1({target:"Array",proto:!0,forced:String(ui)===String(ui.reverse())},{reverse:function reverse(){return Ft(this)&&(this.length=this.length),si.call(this)}});var createProperty$1=function(h,g,d){var x=toPrimitive$1(g);x in h?V.f(h,x,createPropertyDescriptor$1(0,d)):h[x]=d},ci=wellKnownSymbol$1("species"),arrayMethodHasSpeciesSupport$1=function(h){return Vt>=51||!fails$1((function(){var g=[];return(g.constructor={})[ci]=function(){return{foo:1}},1!==g[h](Boolean).foo}))},li=arrayMethodHasSpeciesSupport$1("slice"),fi=wellKnownSymbol$1("species"),hi=[].slice,pi=Math.max;_export$1({target:"Array",proto:!0,forced:!li},{slice:function slice(h,g){var d,x,b,_=toIndexedObject$1(this),S=toLength$1(_.length),C=toAbsoluteIndex$1(h,S),w=toAbsoluteIndex$1(void 0===g?S:g,S);if(Ft(_)&&("function"!=typeof(d=_.constructor)||d!==Array&&!Ft(d.prototype)?isObject$1(d)&&null===(d=d[fi])&&(d=void 0):d=void 0,d===Array||void 0===d))return hi.call(_,C,w);for(x=new(void 0===d?Array:d)(pi(w-C,0)),b=0;C<w;C++,b++)C in _&&createProperty$1(x,b,_[C]);return x.length=b,x}});var yi=createCommonjsModule((function(h){var g=function(h){var g,d=Object.prototype,x=d.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",S=b.asyncIterator||"@@asyncIterator",C=b.toStringTag||"@@toStringTag";function define(h,g,d){return Object.defineProperty(h,g,{value:d,enumerable:!0,configurable:!0,writable:!0}),h[g]}try{define({},"")}catch(h){define=function define(h,g,d){return h[g]=d}}function wrap(h,g,d,x){var b=g&&g.prototype instanceof Generator?g:Generator,_=Object.create(b.prototype),S=new Context(x||[]);return _._invoke=function makeInvokeMethod(h,g,d){var x=w;return function invoke(b,_){if(x===P)throw new Error("Generator is already running");if(x===k){if("throw"===b)throw _;return doneResult()}for(d.method=b,d.arg=_;;){var S=d.delegate;if(S){var C=maybeInvokeDelegate(S,d);if(C){if(C===A)continue;return C}}if("next"===d.method)d.sent=d._sent=d.arg;else if("throw"===d.method){if(x===w)throw x=k,d.arg;d.dispatchException(d.arg)}else"return"===d.method&&d.abrupt("return",d.arg);x=P;var R=tryCatch(h,g,d);if("normal"===R.type){if(x=d.done?k:E,R.arg===A)continue;return{value:R.arg,done:d.done}}"throw"===R.type&&(x=k,d.method="throw",d.arg=R.arg)}}}(h,d,S),_}function tryCatch(h,g,d){try{return{type:"normal",arg:h.call(g,d)}}catch(h){return{type:"throw",arg:h}}}h.wrap=wrap;var w="suspendedStart",E="suspendedYield",P="executing",k="completed",A={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var R={};R[_]=function(){return this};var M=Object.getPrototypeOf,N=M&&M(M(values([])));N&&N!==d&&x.call(N,_)&&(R=N);var D=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(R);function defineIteratorMethods(h){["next","throw","return"].forEach((function(g){define(h,g,(function(h){return this._invoke(g,h)}))}))}function AsyncIterator(h,g){var d;this._invoke=function enqueue(b,_){function callInvokeWithMethodAndArg(){return new g((function(d,S){!function invoke(d,b,_,S){var C=tryCatch(h[d],h,b);if("throw"!==C.type){var w=C.arg,E=w.value;return E&&"object"===_typeof$2(E)&&x.call(E,"__await")?g.resolve(E.__await).then((function(h){invoke("next",h,_,S)}),(function(h){invoke("throw",h,_,S)})):g.resolve(E).then((function(h){w.value=h,_(w)}),(function(h){return invoke("throw",h,_,S)}))}S(C.arg)}(b,_,d,S)}))}return d=d?d.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(h,d){var x=h.iterator[d.method];if(x===g){if(d.delegate=null,"throw"===d.method){if(h.iterator.return&&(d.method="return",d.arg=g,maybeInvokeDelegate(h,d),"throw"===d.method))return A;d.method="throw",d.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var b=tryCatch(x,h.iterator,d.arg);if("throw"===b.type)return d.method="throw",d.arg=b.arg,d.delegate=null,A;var _=b.arg;return _?_.done?(d[h.resultName]=_.value,d.next=h.nextLoc,"return"!==d.method&&(d.method="next",d.arg=g),d.delegate=null,A):_:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,A)}function pushTryEntry(h){var g={tryLoc:h[0]};1 in h&&(g.catchLoc=h[1]),2 in h&&(g.finallyLoc=h[2],g.afterLoc=h[3]),this.tryEntries.push(g)}function resetTryEntry(h){var g=h.completion||{};g.type="normal",delete g.arg,h.completion=g}function Context(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(pushTryEntry,this),this.reset(!0)}function values(h){if(h){var d=h[_];if(d)return d.call(h);if("function"==typeof h.next)return h;if(!isNaN(h.length)){var b=-1,S=function next(){for(;++b<h.length;)if(x.call(h,b))return next.value=h[b],next.done=!1,next;return next.value=g,next.done=!0,next};return S.next=S}}return{next:doneResult}}function doneResult(){return{value:g,done:!0}}return GeneratorFunction.prototype=D.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,C,"GeneratorFunction"),h.isGeneratorFunction=function(h){var g="function"==typeof h&&h.constructor;return!!g&&(g===GeneratorFunction||"GeneratorFunction"===(g.displayName||g.name))},h.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,GeneratorFunctionPrototype):(h.__proto__=GeneratorFunctionPrototype,define(h,C,"GeneratorFunction")),h.prototype=Object.create(D),h},h.awrap=function(h){return{__await:h}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[S]=function(){return this},h.AsyncIterator=AsyncIterator,h.async=function(g,d,x,b,_){void 0===_&&(_=Promise);var S=new AsyncIterator(wrap(g,d,x,b),_);return h.isGeneratorFunction(d)?S:S.next().then((function(h){return h.done?h.value:S.next()}))},defineIteratorMethods(D),define(D,C,"Generator"),D[_]=function(){return this},D.toString=function(){return"[object Generator]"},h.keys=function(h){var g=[];for(var d in h)g.push(d);return g.reverse(),function next(){for(;g.length;){var d=g.pop();if(d in h)return next.value=d,next.done=!1,next}return next.done=!0,next}},h.values=values,Context.prototype={constructor:Context,reset:function reset(h){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(resetTryEntry),!h)for(var d in this)"t"===d.charAt(0)&&x.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=g)},stop:function stop(){this.done=!0;var h=this.tryEntries[0].completion;if("throw"===h.type)throw h.arg;return this.rval},dispatchException:function dispatchException(h){if(this.done)throw h;var d=this;function handle(x,b){return S.type="throw",S.arg=h,d.next=x,b&&(d.method="next",d.arg=g),!!b}for(var b=this.tryEntries.length-1;b>=0;--b){var _=this.tryEntries[b],S=_.completion;if("root"===_.tryLoc)return handle("end");if(_.tryLoc<=this.prev){var C=x.call(_,"catchLoc"),w=x.call(_,"finallyLoc");if(C&&w){if(this.prev<_.catchLoc)return handle(_.catchLoc,!0);if(this.prev<_.finallyLoc)return handle(_.finallyLoc)}else if(C){if(this.prev<_.catchLoc)return handle(_.catchLoc,!0)}else{if(!w)throw new Error("try statement without catch or finally");if(this.prev<_.finallyLoc)return handle(_.finallyLoc)}}}},abrupt:function abrupt(h,g){for(var d=this.tryEntries.length-1;d>=0;--d){var b=this.tryEntries[d];if(b.tryLoc<=this.prev&&x.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var _=b;break}}_&&("break"===h||"continue"===h)&&_.tryLoc<=g&&g<=_.finallyLoc&&(_=null);var S=_?_.completion:{};return S.type=h,S.arg=g,_?(this.method="next",this.next=_.finallyLoc,A):this.complete(S)},complete:function complete(h,g){if("throw"===h.type)throw h.arg;return"break"===h.type||"continue"===h.type?this.next=h.arg:"return"===h.type?(this.rval=this.arg=h.arg,this.method="return",this.next="end"):"normal"===h.type&&g&&(this.next=g),A},finish:function finish(h){for(var g=this.tryEntries.length-1;g>=0;--g){var d=this.tryEntries[g];if(d.finallyLoc===h)return this.complete(d.completion,d.afterLoc),resetTryEntry(d),A}},catch:function _catch(h){for(var g=this.tryEntries.length-1;g>=0;--g){var d=this.tryEntries[g];if(d.tryLoc===h){var x=d.completion;if("throw"===x.type){var b=x.arg;resetTryEntry(d)}return b}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(h,d,x){return this.delegate={iterator:values(h),resultName:d,nextLoc:x},"next"===this.method&&(this.arg=g),A}},h}(h.exports);try{regeneratorRuntime=g}catch(h){Function("r","regeneratorRuntime = r")(g)}}));function RE(h,g){return RegExp(h,g)}var vi={UNSUPPORTED_Y:fails$1((function(){var h=RE("a","y");return h.lastIndex=2,null!=h.exec("abcd")})),BROKEN_CARET:fails$1((function(){var h=RE("^r","gy");return h.lastIndex=2,null!=h.exec("str")}))},gi=RegExp.prototype.exec,di=String.prototype.replace,mi=gi,xi=function(){var h=/a/,g=/b*/g;return gi.call(h,"a"),gi.call(g,"a"),0!==h.lastIndex||0!==g.lastIndex}(),bi=vi.UNSUPPORTED_Y||vi.BROKEN_CARET,_i=void 0!==/()??/.exec("")[1];(xi||_i||bi)&&(mi=function exec(h){var g,d,x,b,_=this,S=bi&&_.sticky,C=regexpFlags.call(_),w=_.source,E=0,P=h;return S&&(-1===(C=C.replace("y","")).indexOf("g")&&(C+="g"),P=String(h).slice(_.lastIndex),_.lastIndex>0&&(!_.multiline||_.multiline&&"\n"!==h[_.lastIndex-1])&&(w="(?: "+w+")",P=" "+P,E++),d=new RegExp("^(?:"+w+")",C)),_i&&(d=new RegExp("^"+w+"$(?!\\s)",C)),xi&&(g=_.lastIndex),x=gi.call(S?d:_,P),S?x?(x.input=x.input.slice(E),x[0]=x[0].slice(E),x.index=_.lastIndex,_.lastIndex+=x[0].length):_.lastIndex=0:xi&&x&&(_.lastIndex=_.global?x.index+x[0].length:g),_i&&x&&x.length>1&&di.call(x[0],d,(function(){for(b=1;b<arguments.length-2;b++)void 0===arguments[b]&&(x[b]=void 0)})),x});var Si=mi;_export$1({target:"RegExp",proto:!0,forced:/./.exec!==Si},{exec:Si});var Ci=wellKnownSymbol$1("species"),wi=!fails$1((function(){var h=/./;return h.exec=function(){var h=[];return h.groups={a:"7"},h},"7"!=="".replace(h,"$<a>")})),Ei="$0"==="a".replace(/./,"$0"),Pi=wellKnownSymbol$1("replace"),Oi=!!/./[Pi]&&""===/./[Pi]("a","$0"),Ti=!fails$1((function(){var h=/(?:)/,g=h.exec;h.exec=function(){return g.apply(this,arguments)};var d="ab".split(h);return 2!==d.length||"a"!==d[0]||"b"!==d[1]})),fixRegexpWellKnownSymbolLogic=function(h,g,d,x){var b=wellKnownSymbol$1(h),_=!fails$1((function(){var g={};return g[b]=function(){return 7},7!=""[h](g)})),S=_&&!fails$1((function(){var g=!1,d=/a/;return"split"===h&&((d={}).constructor={},d.constructor[Ci]=function(){return d},d.flags="",d[b]=/./[b]),d.exec=function(){return g=!0,null},d[b](""),!g}));if(!_||!S||"replace"===h&&(!wi||!Ei||Oi)||"split"===h&&!Ti){var C=/./[b],w=d(b,""[h],(function(h,g,d,x,b){return g.exec===Si?_&&!b?{done:!0,value:C.call(g,d,x)}:{done:!0,value:h.call(d,g,x)}:{done:!1}}),{REPLACE_KEEPS_$0:Ei,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Oi}),E=w[0],P=w[1];lt(String.prototype,h,E),lt(RegExp.prototype,b,2==g?function(h,g){return P.call(h,this,g)}:function(h){return P.call(h,this)})}x&&L(RegExp.prototype[b],"sham",!0)},ki=Ze.charAt,advanceStringIndex=function(h,g,d){return g+(d?ki(h,g).length:1)},Ai=Math.floor,Ri="".replace,Mi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ni=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(h,g,d,x,b,_){var S=d+h.length,C=x.length,w=Ni;return void 0!==b&&(b=toObject$1(b),w=Mi),Ri.call(_,w,(function(_,w){var E;switch(w.charAt(0)){case"$":return"$";case"&":return h;case"`":return g.slice(0,d);case"'":return g.slice(S);case"<":E=b[w.slice(1,-1)];break;default:var P=+w;if(0===P)return _;if(P>C){var k=Ai(P/10);return 0===k?_:k<=C?void 0===x[k-1]?w.charAt(1):x[k-1]+w.charAt(1):_}E=x[P-1]}return void 0===E?"":E}))},regexpExecAbstract=function(h,g){var d=h.exec;if("function"==typeof d){var x=d.call(h,g);if("object"!=typeof x)throw TypeError("RegExp exec method returned something other than an Object or null");return x}if("RegExp"!==classofRaw$1(h))throw TypeError("RegExp#exec called on incompatible receiver");return Si.call(h,g)},Ii=Math.max,Di=Math.min;fixRegexpWellKnownSymbolLogic("replace",2,(function(h,g,d,x){var b=x.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,_=x.REPLACE_KEEPS_$0,S=b?"$":"$0";return[function replace(d,x){var b=requireObjectCoercible$1(this),_=null==d?void 0:d[h];return void 0!==_?_.call(d,b,x):g.call(String(b),d,x)},function(h,x){if(!b&&_||"string"==typeof x&&-1===x.indexOf(S)){var C=d(g,h,this,x);if(C.done)return C.value}var w=anObject$1(h),E=String(this),P="function"==typeof x;P||(x=String(x));var k=w.global;if(k){var A=w.unicode;w.lastIndex=0}for(var R=[];;){var M=regexpExecAbstract(w,E);if(null===M)break;if(R.push(M),!k)break;""===String(M[0])&&(w.lastIndex=advanceStringIndex(E,toLength$1(w.lastIndex),A))}for(var N,D="",$=0,V=0;V<R.length;V++){M=R[V];for(var L=String(M[0]),j=Ii(Di(toInteger$1(M.index),E.length),0),B=[],z=1;z<M.length;z++)B.push(void 0===(N=M[z])?N:String(N));var G=M.groups;if(P){var U=[L].concat(B,j,E);void 0!==G&&U.push(G);var X=String(x.apply(void 0,U))}else X=getSubstitution(L,E,j,B,G,x);j>=$&&(D+=E.slice($,j)+X,$=j+L.length)}return D+E.slice($)}]}));var $i="\t\n\v\f\r    \u2028\u2029\ufeff",Vi="["+$i+"]",Li=RegExp("^"+Vi+Vi+"*"),ji=RegExp(Vi+Vi+"*$"),createMethod$6=function(h){return function(g){var d=String(requireObjectCoercible$1(g));return 1&h&&(d=d.replace(Li,"")),2&h&&(d=d.replace(ji,"")),d}},Fi={start:createMethod$6(1),end:createMethod$6(2),trim:createMethod$6(3)},Bi=Fi.trim;_export$1({target:"String",proto:!0,forced:function(h){return fails$1((function(){return!!$i[h]()||"…"!="…"[h]()||$i[h].name!==h}))}("trim")},{trim:function trim(){return Bi(this)}});var zi=wellKnownSymbol$1("isConcatSpreadable"),Gi=9007199254740991,Ui="Maximum allowed index exceeded",Hi=Vt>=51||!fails$1((function(){var h=[];return h[zi]=!1,h.concat()[0]!==h})),Xi=arrayMethodHasSpeciesSupport$1("concat"),isConcatSpreadable$1=function(h){if(!isObject$1(h))return!1;var g=h[zi];return void 0!==g?!!g:Ft(h)};_export$1({target:"Array",proto:!0,forced:!Hi||!Xi},{concat:function concat(h){var g,d,x,b,_,S=toObject$1(this),C=arraySpeciesCreate$1(S,0),w=0;for(g=-1,x=arguments.length;g<x;g++)if(isConcatSpreadable$1(_=-1===g?S:arguments[g])){if(w+(b=toLength$1(_.length))>Gi)throw TypeError(Ui);for(d=0;d<b;d++,w++)d in _&&createProperty$1(C,w,_[d])}else{if(w>=Gi)throw TypeError(Ui);createProperty$1(C,w++,_)}return C.length=w,C}});var Yi=[].join,Wi=P!=Object,qi=arrayMethodIsStrict$1("join",",");_export$1({target:"Array",proto:!0,forced:Wi||!qi},{join:function join(h){return Yi.call(toIndexedObject$1(this),void 0===h?",":h)}}),fixRegexpWellKnownSymbolLogic("match",1,(function(h,g,d){return[function match(g){var d=requireObjectCoercible$1(this),x=null==g?void 0:g[h];return void 0!==x?x.call(g,d):new RegExp(g)[h](String(d))},function(h){var x=d(g,h,this);if(x.done)return x.value;var b=anObject$1(h),_=String(this);if(!b.global)return regexpExecAbstract(b,_);var S=b.unicode;b.lastIndex=0;for(var C,w=[],E=0;null!==(C=regexpExecAbstract(b,_));){var P=String(C[0]);w[E]=P,""===P&&(b.lastIndex=advanceStringIndex(_,toLength$1(b.lastIndex),S)),E++}return 0===E?null:w}]}));var Qi=wellKnownSymbol$1("match"),isRegexp$1=function(h){var g;return isObject$1(h)&&(void 0!==(g=h[Qi])?!!g:"RegExp"==classofRaw$1(h))},Ki=[].push,Zi=Math.min,Ji=4294967295,ta=!fails$1((function(){return!RegExp(Ji,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(h,g,d){var x;return x="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(h,d){var x=String(requireObjectCoercible$1(this)),b=void 0===d?Ji:d>>>0;if(0===b)return[];if(void 0===h)return[x];if(!isRegexp$1(h))return g.call(x,h,b);for(var _,S,C,w=[],E=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(h.sticky?"y":""),P=0,k=new RegExp(h.source,E+"g");(_=Si.call(k,x))&&!((S=k.lastIndex)>P&&(w.push(x.slice(P,_.index)),_.length>1&&_.index<x.length&&Ki.apply(w,_.slice(1)),C=_[0].length,P=S,w.length>=b));)k.lastIndex===_.index&&k.lastIndex++;return P===x.length?!C&&k.test("")||w.push(""):w.push(x.slice(P)),w.length>b?w.slice(0,b):w}:"0".split(void 0,0).length?function(h,d){return void 0===h&&0===d?[]:g.call(this,h,d)}:g,[function split(g,d){var b=requireObjectCoercible$1(this),_=null==g?void 0:g[h];return void 0!==_?_.call(g,b,d):x.call(String(b),g,d)},function(h,b){var _=d(x,h,this,b,x!==g);if(_.done)return _.value;var S=anObject$1(h),C=String(this),w=speciesConstructor$1(S,RegExp),E=S.unicode,P=(S.ignoreCase?"i":"")+(S.multiline?"m":"")+(S.unicode?"u":"")+(ta?"y":"g"),k=new w(ta?S:"^(?:"+S.source+")",P),A=void 0===b?Ji:b>>>0;if(0===A)return[];if(0===C.length)return null===regexpExecAbstract(k,C)?[C]:[];for(var R=0,M=0,N=[];M<C.length;){k.lastIndex=ta?M:0;var D,$=regexpExecAbstract(k,ta?C:C.slice(M));if(null===$||(D=Zi(toLength$1(k.lastIndex+(ta?0:M)),C.length))===R)M=advanceStringIndex(C,M,E);else{if(N.push(C.slice(R,M)),N.length===A)return N;for(var V=1;V<=$.length-1;V++)if(N.push($[V]),N.length===A)return N;M=R=D}}return N.push(C.slice(R)),N}]}),!ta);var inheritIfRequired=function(h,g,d){var x,b;return ur&&"function"==typeof(x=g.constructor)&&x!==d&&isObject$1(b=x.prototype)&&b!==d.prototype&&ur(h,b),h},ea=_t.f,ra=D.f,na=V.f,ia=Fi.trim,aa="Number",oa=x.Number,sa=oa.prototype,ua=classofRaw$1(Ht(sa))==aa,toNumber=function(h){var g,d,x,b,_,S,C,w,E=toPrimitive$1(h,!1);if("string"==typeof E&&E.length>2)if(43===(g=(E=ia(E)).charCodeAt(0))||45===g){if(88===(d=E.charCodeAt(2))||120===d)return NaN}else if(48===g){switch(E.charCodeAt(1)){case 66:case 98:x=2,b=49;break;case 79:case 111:x=8,b=55;break;default:return+E}for(S=(_=E.slice(2)).length,C=0;C<S;C++)if((w=_.charCodeAt(C))<48||w>b)return NaN;return parseInt(_,x)}return+E};if(kt(aa,!oa(" 0o1")||!oa("0b1")||oa("+0x1"))){for(var ca,la=function Number(h){var g=arguments.length<1?0:h,d=this;return d instanceof la&&(ua?fails$1((function(){sa.valueOf.call(d)})):classofRaw$1(d)!=aa)?inheritIfRequired(new oa(toNumber(g)),d,la):toNumber(g)},fa=b?ea(oa):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),ha=0;fa.length>ha;ha++)has$3(oa,ca=fa[ha])&&!has$3(la,ca)&&na(la,ca,ra(oa,ca));la.prototype=sa,sa.constructor=la,lt(x,aa,la)}_export$1({target:"Array",proto:!0},{fill:function fill(h){for(var g=toObject$1(this),d=toLength$1(g.length),x=arguments.length,b=toAbsoluteIndex$1(x>1?arguments[1]:void 0,d),_=x>2?arguments[2]:void 0,S=void 0===_?d:toAbsoluteIndex$1(_,d);S>b;)g[b++]=h;return g}}),addToUnscopables("fill");var pa=!fails$1((function(){return Object.isExtensible(Object.preventExtensions({}))})),ya=createCommonjsModule((function(h){var g=V.f,d=uid$1("meta"),x=0,b=Object.isExtensible||function(){return!0},setMetadata=function(h){g(h,d,{value:{objectID:"O"+ ++x,weakData:{}}})},_=h.exports={REQUIRED:!1,fastKey:function(h,g){if(!isObject$1(h))return"symbol"==typeof h?h:("string"==typeof h?"S":"P")+h;if(!has$3(h,d)){if(!b(h))return"F";if(!g)return"E";setMetadata(h)}return h[d].objectID},getWeakData:function(h,g){if(!has$3(h,d)){if(!b(h))return!0;if(!g)return!1;setMetadata(h)}return h[d].weakData},onFreeze:function(h){return pa&&_.REQUIRED&&b(h)&&!has$3(h,d)&&setMetadata(h),h}};tt[d]=!0})),va=ya.onFreeze,ga=Object.freeze,da=fails$1((function(){ga(1)}));_export$1({target:"Object",stat:!0,forced:da,sham:!pa},{freeze:function freeze(h){return ga&&isObject$1(h)?ga(va(h)):h}});var ma,notARegexp$1=function(h){if(isRegexp$1(h))throw TypeError("The method doesn't accept regular expressions");return h},xa=wellKnownSymbol$1("match"),correctIsRegexpLogic$1=function(h){var g=/./;try{"/./"[h](g)}catch(d){try{return g[xa]=!1,"/./"[h](g)}catch(h){}}return!1},ba=D.f,_a="".startsWith,Sa=Math.min,Ca=correctIsRegexpLogic$1("startsWith"),wa=!(Ca||(ma=ba(String.prototype,"startsWith"),!ma||ma.writable));_export$1({target:"String",proto:!0,forced:!wa&&!Ca},{startsWith:function startsWith(h){var g=String(requireObjectCoercible$1(this));notARegexp$1(h);var d=toLength$1(Sa(arguments.length>1?arguments[1]:void 0,g.length)),x=String(h);return _a?_a.call(g,x,d):g.slice(d,d+x.length)===x}}),_export$1({global:!0},{globalThis:x});var Ea=function check(h){return h&&h.Math==Math&&h},Pa=Ea("object"==("undefined"==typeof globalThis?"undefined":_typeof$2(globalThis))&&globalThis)||Ea("object"==("undefined"==typeof window?"undefined":_typeof$2(window))&&window)||Ea("object"==("undefined"==typeof self?"undefined":_typeof$2(self))&&self)||Ea("object"==_typeof$2(d)&&d)||function(){return this}()||Function("return this")(),Oa=D.f,Ta=fails$1((function(){Oa(1)}));_export$1({target:"Object",stat:!0,forced:!b||Ta,sham:!b},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(h,g){return Oa(toIndexedObject$1(h),g)}});var ka,Aa,Ra=function fails(h){try{return!!h()}catch(h){return!0}},Ma=!Ra((function(){return 7!=Object.defineProperty({},1,{get:function get(){return 7}})[1]})),Na={}.propertyIsEnumerable,Ia=Object.getOwnPropertyDescriptor,Da={f:Ia&&!Na.call({1:2},1)?function propertyIsEnumerable(h){var g=Ia(this,h);return!!g&&g.enumerable}:Na},$a=function createPropertyDescriptor(h,g){return{enumerable:!(1&h),configurable:!(2&h),writable:!(4&h),value:g}},Va={}.toString,La=function classofRaw(h){return Va.call(h).slice(8,-1)},ja="".split,Fa=Ra((function(){return!Object("z").propertyIsEnumerable(0)}))?function(h){return"String"==La(h)?ja.call(h,""):Object(h)}:Object,Ba=function requireObjectCoercible(h){if(null==h)throw TypeError("Can't call method on "+h);return h},za=function toIndexedObject(h){return Fa(Ba(h))},Ga=function isObject(h){return"object"===_typeof$2(h)?null!==h:"function"==typeof h},Ua=function toPrimitive(h,g){if(!Ga(h))return h;var d,x;if(g&&"function"==typeof(d=h.toString)&&!Ga(x=d.call(h)))return x;if("function"==typeof(d=h.valueOf)&&!Ga(x=d.call(h)))return x;if(!g&&"function"==typeof(d=h.toString)&&!Ga(x=d.call(h)))return x;throw TypeError("Can't convert object to primitive value")},Ha={}.hasOwnProperty,Xa=function has(h,g){return Ha.call(h,g)},Ya=Pa.document,Wa=Ga(Ya)&&Ga(Ya.createElement),qa=function documentCreateElement(h){return Wa?Ya.createElement(h):{}},Qa=!Ma&&!Ra((function(){return 7!=Object.defineProperty(qa("div"),"a",{get:function get(){return 7}}).a})),Ka=Object.getOwnPropertyDescriptor,Za={f:Ma?Ka:function getOwnPropertyDescriptor(h,g){if(h=za(h),g=Ua(g,!0),Qa)try{return Ka(h,g)}catch(h){}if(Xa(h,g))return $a(!Da.f.call(h,g),h[g])}},Ja=/#|\.prototype\./,to=function isForced(h,g){var d=ro[eo(h)];return d==io||d!=no&&("function"==typeof g?Ra(g):!!g)},eo=to.normalize=function(h){return String(h).replace(Ja,".").toLowerCase()},ro=to.data={},no=to.NATIVE="N",io=to.POLYFILL="P",ao=to,oo={},so=function aFunction(h){if("function"!=typeof h)throw TypeError(String(h)+" is not a function");return h},uo=function functionBindContext(h,g,d){if(so(h),void 0===g)return h;switch(d){case 0:return function(){return h.call(g)};case 1:return function(d){return h.call(g,d)};case 2:return function(d,x){return h.call(g,d,x)};case 3:return function(d,x,b){return h.call(g,d,x,b)}}return function(){return h.apply(g,arguments)}},co=function anObject(h){if(!Ga(h))throw TypeError(String(h)+" is not an object");return h},lo=Object.defineProperty,fo={f:Ma?lo:function defineProperty(h,g,d){if(co(h),g=Ua(g,!0),co(d),Qa)try{return lo(h,g,d)}catch(h){}if("get"in d||"set"in d)throw TypeError("Accessors not supported");return"value"in d&&(h[g]=d.value),h}},ho=Ma?function(h,g,d){return fo.f(h,g,$a(1,d))}:function(h,g,d){return h[g]=d,h},po=Za.f,yo=function wrapConstructor(h){var g=function Wrapper(g,d,x){if(this instanceof h){switch(arguments.length){case 0:return new h;case 1:return new h(g);case 2:return new h(g,d)}return new h(g,d,x)}return h.apply(this,arguments)};return g.prototype=h.prototype,g},vo=function _export(h,g){var d,x,b,_,S,C,w,E,P=h.target,k=h.global,A=h.stat,R=h.proto,M=k?Pa:A?Pa[P]:(Pa[P]||{}).prototype,N=k?oo:oo[P]||(oo[P]={}),D=N.prototype;for(b in g)d=!ao(k?b:P+(A?".":"#")+b,h.forced)&&M&&Xa(M,b),S=N[b],d&&(C=h.noTargetGet?(E=po(M,b))&&E.value:M[b]),_=d&&C?C:g[b],d&&_typeof$2(S)===_typeof$2(_)||(w=h.bind&&d?uo(_,Pa):h.wrap&&d?yo(_):R&&"function"==typeof _?uo(Function.call,_):_,(h.sham||_&&_.sham||S&&S.sham)&&ho(w,"sham",!0),N[b]=w,R&&(Xa(oo,x=P+"Prototype")||ho(oo,x,{}),oo[x][b]=_,h.real&&D&&!D[b]&&ho(D,b,_)))},go=Math.ceil,mo=Math.floor,xo=function toInteger(h){return isNaN(h=+h)?0:(h>0?mo:go)(h)},bo=Math.min,_o=function toLength(h){return h>0?bo(xo(h),9007199254740991):0},So="__core-js_shared__",Co=Pa[So]||function setGlobal(h,g){try{ho(Pa,h,g)}catch(d){Pa[h]=g}return g}(So,{}),wo=createCommonjsModule((function(h){(h.exports=function(h,g){return Co[h]||(Co[h]=void 0!==g?g:{})})("versions",[]).push({version:"3.9.1",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Eo=0,Po=Math.random(),Oo=function uid(h){return"Symbol("+String(void 0===h?"":h)+")_"+(++Eo+Po).toString(36)},To="process"==La(Pa.process),ko=function aFunction(h){return"function"==typeof h?h:void 0},Ao=function getBuiltIn(h,g){return arguments.length<2?ko(oo[h])||ko(Pa[h]):oo[h]&&oo[h][g]||Pa[h]&&Pa[h][g]},Ro=Ao("navigator","userAgent")||"",Mo=Pa.process,No=Mo&&Mo.versions,Io=No&&No.v8;Io?Aa=(ka=Io.split("."))[0]+ka[1]:Ro&&(!(ka=Ro.match(/Edge\/(\d+)/))||ka[1]>=74)&&(ka=Ro.match(/Chrome\/(\d+)/))&&(Aa=ka[1]);var Do=Aa&&+Aa,$o=!!Object.getOwnPropertySymbols&&!Ra((function(){return!Symbol.sham&&(To?38===Do:Do>37&&Do<41)})),Vo=$o&&!Symbol.sham&&"symbol"==_typeof$2(Symbol.iterator),Lo=wo("wks"),jo=Pa.Symbol,Fo=Vo?jo:jo&&jo.withoutSetter||Oo,Bo=function wellKnownSymbol(h){return Xa(Lo,h)&&($o||"string"==typeof Lo[h])||($o&&Xa(jo,h)?Lo[h]=jo[h]:Lo[h]=Fo("Symbol."+h)),Lo[h]},zo=Bo("match"),Go=function notARegexp(h){if(function isRegexp(h){var g;return Ga(h)&&(void 0!==(g=h[zo])?!!g:"RegExp"==La(h))}(h))throw TypeError("The method doesn't accept regular expressions");return h},Uo=Bo("match"),Ho=function correctIsRegexpLogic(h){var g=/./;try{"/./"[h](g)}catch(d){try{return g[Uo]=!1,"/./"[h](g)}catch(h){}}return!1},Xo="".startsWith,Yo=Math.min,Wo=Ho("startsWith");vo({target:"String",proto:!0,forced:!Wo},{startsWith:function startsWith(h){var g=String(Ba(this));Go(h);var d=_o(Yo(arguments.length>1?arguments[1]:void 0,g.length)),x=String(h);return Xo?Xo.call(g,x,d):g.slice(d,d+x.length)===x}});var qo=function entryVirtual(h){return oo[h+"Prototype"]},Qo=qo("String").startsWith,Ko=String.prototype,Zo=function startsWith_1(h){var g=h.startsWith;return"string"==typeof h||h===Ko||h instanceof String&&g===Ko.startsWith?Qo:g},Jo=Fi.trim,ts=x.parseFloat,es=1/ts($i+"-0")!=-1/0?function parseFloat(h){var g=Jo(String(h)),d=ts(g);return 0===d&&"-"==g.charAt(0)?-0:d}:ts;_export$1({global:!0,forced:parseFloat!=es},{parseFloat:es});var rs=V.f,ns=_t.f,is=ct.set,as=wellKnownSymbol$1("match"),os=x.RegExp,ss=os.prototype,us=/a/g,cs=/a/g,ls=new os(us)!==us,fs=vi.UNSUPPORTED_Y;if(b&&kt("RegExp",!ls||fs||fails$1((function(){return cs[as]=!1,os(us)!=us||os(cs)==cs||"/a/i"!=os(us,"i")})))){for(var hs=function RegExp(h,g){var d,x=this instanceof hs,b=isRegexp$1(h),_=void 0===g;if(!x&&b&&h.constructor===hs&&_)return h;ls?b&&!_&&(h=h.source):h instanceof hs&&(_&&(g=regexpFlags.call(h)),h=h.source),fs&&(d=!!g&&g.indexOf("y")>-1)&&(g=g.replace(/y/g,""));var S=inheritIfRequired(ls?new os(h,g):os(h,g),x?this:ss,hs);return fs&&d&&is(S,{sticky:d}),S},proxy=function(h){h in hs||rs(hs,h,{configurable:!0,get:function(){return os[h]},set:function(g){os[h]=g}})},ps=ns(os),ys=0;ps.length>ys;)proxy(ps[ys++]);ss.constructor=hs,hs.prototype=ss,lt(x,"RegExp",hs)}setSpecies$1("RegExp");var vs="\t\n\v\f\r    \u2028\u2029\ufeff",gs="["+vs+"]",ds=RegExp("^"+gs+gs+"*"),ms=RegExp(gs+gs+"*$"),xs=function createMethod(h){return function(g){var d=String(Ba(g));return 1&h&&(d=d.replace(ds,"")),2&h&&(d=d.replace(ms,"")),d}},bs={start:xs(1),end:xs(2),trim:xs(3)},_s=bs.trim,Ss=Pa.parseFloat,Cs=1/Ss(vs+"-0")!=-1/0?function parseFloat(h){var g=_s(String(h)),d=Ss(g);return 0===d&&"-"==g.charAt(0)?-0:d}:Ss;vo({global:!0,forced:parseFloat!=Cs},{parseFloat:Cs});var ws=oo.parseFloat,Es=ae.map,Ps=arrayMethodHasSpeciesSupport$1("map");_export$1({target:"Array",proto:!0,forced:!Ps},{map:function map(h){return Es(this,h,arguments.length>1?arguments[1]:void 0)}});var Os=function toObject(h){return Object(Ba(h))},Ts=Array.isArray||function isArray(h){return"Array"==La(h)},ks=Bo("species"),As=function arraySpeciesCreate(h,g){var d;return Ts(h)&&("function"!=typeof(d=h.constructor)||d!==Array&&!Ts(d.prototype)?Ga(d)&&null===(d=d[ks])&&(d=void 0):d=void 0),new(void 0===d?Array:d)(0===g?0:g)},Rs=[].push,Ms=function createMethod(h){var g=1==h,d=2==h,x=3==h,b=4==h,_=6==h,S=7==h,C=5==h||_;return function(w,E,P,k){for(var A,R,M=Os(w),N=Fa(M),D=uo(E,P,3),$=_o(N.length),V=0,L=k||As,j=g?L(w,$):d||S?L(w,0):void 0;$>V;V++)if((C||V in N)&&(R=D(A=N[V],V,M),h))if(g)j[V]=R;else if(R)switch(h){case 3:return!0;case 5:return A;case 6:return V;case 2:Rs.call(j,A)}else switch(h){case 4:return!1;case 7:Rs.call(j,A)}return _?-1:x||b?b:j}},Ns={forEach:Ms(0),map:Ms(1),filter:Ms(2),some:Ms(3),every:Ms(4),find:Ms(5),findIndex:Ms(6),filterOut:Ms(7)},Is=Bo("species"),Ds=function arrayMethodHasSpeciesSupport(h){return Do>=51||!Ra((function(){var g=[];return(g.constructor={})[Is]=function(){return{foo:1}},1!==g[h](Boolean).foo}))},$s=Ns.map,Vs=Ds("map");vo({target:"Array",proto:!0,forced:!Vs},{map:function map(h){return $s(this,h,arguments.length>1?arguments[1]:void 0)}});var Ls=qo("Array").map,js=Array.prototype,Fs=function map_1(h){var g=h.map;return h===js||h instanceof Array&&g===js.map?Ls:g};vo({target:"Array",stat:!0},{isArray:Ts});var Bs=oo.Array.isArray,zs=Bs;var Gs=function createProperty(h,g,d){var x=Ua(g);x in h?fo.f(h,x,$a(0,d)):h[x]=d},Us=Bo("isConcatSpreadable"),Hs=9007199254740991,Xs="Maximum allowed index exceeded",Ys=Do>=51||!Ra((function(){var h=[];return h[Us]=!1,h.concat()[0]!==h})),Ws=Ds("concat"),qs=function isConcatSpreadable(h){if(!Ga(h))return!1;var g=h[Us];return void 0!==g?!!g:Ts(h)};vo({target:"Array",proto:!0,forced:!Ys||!Ws},{concat:function concat(h){var g,d,x,b,_,S=Os(this),C=As(S,0),w=0;for(g=-1,x=arguments.length;g<x;g++)if(qs(_=-1===g?S:arguments[g])){if(w+(b=_o(_.length))>Hs)throw TypeError(Xs);for(d=0;d<b;d++,w++)d in _&&Gs(C,w,_[d])}else{if(w>=Hs)throw TypeError(Xs);Gs(C,w++,_)}return C.length=w,C}});var Qs=fails$1((function(){Bt(1)}));_export$1({target:"Object",stat:!0,forced:Qs},{keys:function keys(h){return Bt(toObject$1(h))}});var Ks=dt.indexOf,Zs=[].indexOf,Js=!!Zs&&1/[1].indexOf(1,-0)<0,tu=arrayMethodIsStrict$1("indexOf");_export$1({target:"Array",proto:!0,forced:Js||!tu},{indexOf:function indexOf(h){return Js?Zs.apply(this,arguments)||0:Ks(this,h,arguments.length>1?arguments[1]:void 0)}});var eu,ru=Math.max,nu=Math.min,iu=function toAbsoluteIndex(h,g){var d=xo(h);return d<0?ru(d+g,0):nu(d,g)},au=function createMethod(h){return function(g,d,x){var b,_=za(g),S=_o(_.length),C=iu(x,S);if(h&&d!=d){for(;S>C;)if((b=_[C++])!=b)return!0}else for(;S>C;C++)if((h||C in _)&&_[C]===d)return h||C||0;return!h&&-1}},ou={includes:au(!0),indexOf:au(!1)},su={},uu=ou.indexOf,cu=function objectKeysInternal(h,g){var d,x=za(h),b=0,_=[];for(d in x)!Xa(su,d)&&Xa(x,d)&&_.push(d);for(;g.length>b;)Xa(x,d=g[b++])&&(~uu(_,d)||_.push(d));return _},lu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fu=Object.keys||function keys(h){return cu(h,lu)},hu=Ma?Object.defineProperties:function defineProperties(h,g){co(h);for(var d,x=fu(g),b=x.length,_=0;b>_;)fo.f(h,d=x[_++],g[d]);return h},pu=Ao("document","documentElement"),yu=wo("keys"),vu=function sharedKey(h){return yu[h]||(yu[h]=Oo(h))},gu=vu("IE_PROTO"),du=function EmptyConstructor(){},mu=function scriptTag(h){return"<script>"+h+"</"+"script>"},xu=function NullProtoObject(){try{eu=document.domain&&new ActiveXObject("htmlfile")}catch(h){}xu=eu?function NullProtoObjectViaActiveX(h){h.write(mu("")),h.close();var g=h.parentWindow.Object;return h=null,g}(eu):function NullProtoObjectViaIFrame(){var h,g=qa("iframe");return g.style.display="none",pu.appendChild(g),g.src=String("javascript:"),(h=g.contentWindow.document).open(),h.write(mu("document.F=Object")),h.close(),h.F}();for(var h=lu.length;h--;)delete xu.prototype[lu[h]];return xu()};su[gu]=!0;var bu=Object.create||function create(h,g){var d;return null!==h?(du.prototype=co(h),d=new du,du.prototype=null,d[gu]=h):d=xu(),void 0===g?d:hu(d,g)},_u=qt.f,Su=fails$1((function(){return!Object.getOwnPropertyNames(1)}));_export$1({target:"Object",stat:!0,forced:Su},{getOwnPropertyNames:_u});var Cu=lu.concat("length","prototype"),wu={f:Object.getOwnPropertyNames||function getOwnPropertyNames(h){return cu(h,Cu)}},Eu=wu.f,Pu={}.toString,Ou="object"==("undefined"==typeof window?"undefined":_typeof$2(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tu={f:function getOwnPropertyNames(h){return Ou&&"[object Window]"==Pu.call(h)?function getWindowNames(h){try{return Eu(h)}catch(h){return Ou.slice()}}(h):Eu(za(h))}},ku={f:Object.getOwnPropertySymbols},Au=function redefine(h,g,d,x){x&&x.enumerable?h[g]=d:ho(h,g,d)},Ru={f:Bo},Mu=fo.f,Nu=function defineWellKnownSymbol(h){var g=oo.Symbol||(oo.Symbol={});Xa(g,h)||Mu(g,h,{value:Ru.f(h)})},Iu={};Iu[Bo("toStringTag")]="z";var Du="[object z]"===String(Iu),$u=Bo("toStringTag"),Vu="Arguments"==La(function(){return arguments}()),Lu=Du?La:function(h){var g,d,x;return void 0===h?"Undefined":null===h?"Null":"string"==typeof(d=function tryGet(h,g){try{return h[g]}catch(h){}}(g=Object(h),$u))?d:Vu?La(g):"Object"==(x=La(g))&&"function"==typeof g.callee?"Arguments":x},ju=Du?{}.toString:function toString(){return"[object "+Lu(this)+"]"},Fu=fo.f,Bu=Bo("toStringTag"),zu=function setToStringTag(h,g,d,x){if(h){var b=d?h:h.prototype;Xa(b,Bu)||Fu(b,Bu,{configurable:!0,value:g}),x&&!Du&&ho(b,"toString",ju)}},Gu=ya.getWeakData,Uu=ct.set,Hu=ct.getterFor,Xu=ae.find,Yu=ae.findIndex,Wu=0,uncaughtFrozenStore=function(h){return h.frozen||(h.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(h,g){return Xu(h.entries,(function(h){return h[0]===g}))};UncaughtFrozenStore.prototype={get:function(h){var g=findUncaughtFrozen(this,h);if(g)return g[1]},has:function(h){return!!findUncaughtFrozen(this,h)},set:function(h,g){var d=findUncaughtFrozen(this,h);d?d[1]=g:this.entries.push([h,g])},delete:function(h){var g=Yu(this.entries,(function(g){return g[0]===h}));return~g&&this.entries.splice(g,1),!!~g}};var qu={getConstructor:function(h,g,d,x){var b=h((function(h,_){anInstance$1(h,b,g),Uu(h,{type:g,id:Wu++,frozen:void 0}),null!=_&&iterate$1(_,h[x],{that:h,AS_ENTRIES:d})})),_=Hu(g),define=function(h,g,d){var x=_(h),b=Gu(anObject$1(g),!0);return!0===b?uncaughtFrozenStore(x).set(g,d):b[x.id]=d,h};return redefineAll$1(b.prototype,{delete:function(h){var g=_(this);if(!isObject$1(h))return!1;var d=Gu(h);return!0===d?uncaughtFrozenStore(g).delete(h):d&&has$3(d,g.id)&&delete d[g.id]},has:function has(h){var g=_(this);if(!isObject$1(h))return!1;var d=Gu(h);return!0===d?uncaughtFrozenStore(g).has(h):d&&has$3(d,g.id)}}),redefineAll$1(b.prototype,d?{get:function get(h){var g=_(this);if(isObject$1(h)){var d=Gu(h);return!0===d?uncaughtFrozenStore(g).get(h):d?d[g.id]:void 0}},set:function set(h,g){return define(this,h,g)}}:{add:function add(h){return define(this,h,!0)}}),b}};createCommonjsModule((function(h){var g,d=ct.enforce,b=!x.ActiveXObject&&"ActiveXObject"in x,_=Object.isExtensible,wrapper=function(h){return function WeakMap(){return h(this,arguments.length?arguments[0]:void 0)}},S=h.exports=function(h,g,d){var b=-1!==h.indexOf("Map"),_=-1!==h.indexOf("Weak"),S=b?"set":"add",C=x[h],w=C&&C.prototype,E=C,P={},fixMethod=function(h){var g=w[h];lt(w,h,"add"==h?function add(h){return g.call(this,0===h?0:h),this}:"delete"==h?function(h){return!(_&&!isObject$1(h))&&g.call(this,0===h?0:h)}:"get"==h?function get(h){return _&&!isObject$1(h)?void 0:g.call(this,0===h?0:h)}:"has"==h?function has(h){return!(_&&!isObject$1(h))&&g.call(this,0===h?0:h)}:function set(h,d){return g.call(this,0===h?0:h,d),this})};if(kt(h,"function"!=typeof C||!(_||w.forEach&&!fails$1((function(){(new C).entries().next()})))))E=d.getConstructor(g,h,b,S),ya.REQUIRED=!0;else if(kt(h,!0)){var k=new E,A=k[S](_?{}:-0,1)!=k,R=fails$1((function(){k.has(1)})),M=checkCorrectnessOfIteration$1((function(h){new C(h)})),N=!_&&fails$1((function(){for(var h=new C,g=5;g--;)h[S](g,g);return!h.has(-0)}));M||((E=g((function(g,d){anInstance$1(g,E,h);var x=inheritIfRequired(new C,g,E);return null!=d&&iterate$1(d,x[S],{that:x,AS_ENTRIES:b}),x}))).prototype=w,w.constructor=E),(R||N)&&(fixMethod("delete"),fixMethod("has"),b&&fixMethod("get")),(N||A)&&fixMethod(S),_&&w.clear&&delete w.clear}return P[h]=E,_export$1({global:!0,forced:E!=C},P),setToStringTag$1(E,h),_||d.setStrong(E,h,b),E}("WeakMap",wrapper,qu);if(q&&b){g=qu.getConstructor(wrapper,"WeakMap",!0),ya.REQUIRED=!0;var C=S.prototype,w=C.delete,E=C.has,P=C.get,k=C.set;redefineAll$1(C,{delete:function(h){if(isObject$1(h)&&!_(h)){var x=d(this);return x.frozen||(x.frozen=new g),w.call(this,h)||x.frozen.delete(h)}return w.call(this,h)},has:function has(h){if(isObject$1(h)&&!_(h)){var x=d(this);return x.frozen||(x.frozen=new g),E.call(this,h)||x.frozen.has(h)}return E.call(this,h)},get:function get(h){if(isObject$1(h)&&!_(h)){var x=d(this);return x.frozen||(x.frozen=new g),E.call(this,h)?P.call(this,h):x.frozen.get(h)}return P.call(this,h)},set:function set(h,x){if(isObject$1(h)&&!_(h)){var b=d(this);b.frozen||(b.frozen=new g),E.call(this,h)?k.call(this,h,x):b.frozen.set(h,x)}else k.call(this,h,x);return this}})}}));var Qu=Function.toString;"function"!=typeof Co.inspectSource&&(Co.inspectSource=function(h){return Qu.call(h)});var Ku,Zu,Ju,tc=Co.inspectSource,ec=Pa.WeakMap,rc="function"==typeof ec&&/native code/.test(tc(ec)),nc=Pa.WeakMap;if(rc){var ic=Co.state||(Co.state=new nc),ac=ic.get,oc=ic.has,sc=ic.set;Ku=function set(h,g){return g.facade=h,sc.call(ic,h,g),g},Zu=function get(h){return ac.call(ic,h)||{}},Ju=function has(h){return oc.call(ic,h)}}else{var uc=vu("state");su[uc]=!0,Ku=function set(h,g){return g.facade=h,ho(h,uc,g),g},Zu=function get(h){return Xa(h,uc)?h[uc]:{}},Ju=function has(h){return Xa(h,uc)}}var cc={set:Ku,get:Zu,has:Ju,enforce:function enforce(h){return Ju(h)?Zu(h):Ku(h,{})},getterFor:function getterFor(h){return function(g){var d;if(!Ga(g)||(d=Zu(g)).type!==h)throw TypeError("Incompatible receiver, "+h+" required");return d}}},lc=Ns.forEach,fc=vu("hidden"),hc="Symbol",pc=Bo("toPrimitive"),yc=cc.set,vc=cc.getterFor(hc),gc=Object.prototype,dc=Pa.Symbol,mc=Ao("JSON","stringify"),xc=Za.f,bc=fo.f,_c=Tu.f,Sc=Da.f,Cc=wo("symbols"),wc=wo("op-symbols"),Ec=wo("string-to-symbol-registry"),Pc=wo("symbol-to-string-registry"),Oc=wo("wks"),Tc=Pa.QObject,kc=!Tc||!Tc.prototype||!Tc.prototype.findChild,Ac=Ma&&Ra((function(){return 7!=bu(bc({},"a",{get:function get(){return bc(this,"a",{value:7}).a}})).a}))?function(h,g,d){var x=xc(gc,g);x&&delete gc[g],bc(h,g,d),x&&h!==gc&&bc(gc,g,x)}:bc,Rc=function wrap(h,g){var d=Cc[h]=bu(dc.prototype);return yc(d,{type:hc,tag:h,description:g}),Ma||(d.description=g),d},Mc=Vo?function(h){return"symbol"==_typeof$2(h)}:function(h){return Object(h)instanceof dc},Nc=function defineProperty(h,g,d){h===gc&&Nc(wc,g,d),co(h);var x=Ua(g,!0);return co(d),Xa(Cc,x)?(d.enumerable?(Xa(h,fc)&&h[fc][x]&&(h[fc][x]=!1),d=bu(d,{enumerable:$a(0,!1)})):(Xa(h,fc)||bc(h,fc,$a(1,{})),h[fc][x]=!0),Ac(h,x,d)):bc(h,x,d)},Ic=function defineProperties(h,g){co(h);var d=za(g),x=fu(d).concat(Lc(d));return lc(x,(function(g){Ma&&!Dc.call(d,g)||Nc(h,g,d[g])})),h},Dc=function propertyIsEnumerable(h){var g=Ua(h,!0),d=Sc.call(this,g);return!(this===gc&&Xa(Cc,g)&&!Xa(wc,g))&&(!(d||!Xa(this,g)||!Xa(Cc,g)||Xa(this,fc)&&this[fc][g])||d)},$c=function getOwnPropertyDescriptor(h,g){var d=za(h),x=Ua(g,!0);if(d!==gc||!Xa(Cc,x)||Xa(wc,x)){var b=xc(d,x);return!b||!Xa(Cc,x)||Xa(d,fc)&&d[fc][x]||(b.enumerable=!0),b}},Vc=function getOwnPropertyNames(h){var g=_c(za(h)),d=[];return lc(g,(function(h){Xa(Cc,h)||Xa(su,h)||d.push(h)})),d},Lc=function getOwnPropertySymbols(h){var g=h===gc,d=_c(g?wc:za(h)),x=[];return lc(d,(function(h){!Xa(Cc,h)||g&&!Xa(gc,h)||x.push(Cc[h])})),x};if($o||(Au((dc=function _Symbol(){if(this instanceof dc)throw TypeError("Symbol is not a constructor");var h=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,g=Oo(h),d=function setter(h){this===gc&&setter.call(wc,h),Xa(this,fc)&&Xa(this[fc],g)&&(this[fc][g]=!1),Ac(this,g,$a(1,h))};return Ma&&kc&&Ac(gc,g,{configurable:!0,set:d}),Rc(g,h)}).prototype,"toString",(function toString(){return vc(this).tag})),Au(dc,"withoutSetter",(function(h){return Rc(Oo(h),h)})),Da.f=Dc,fo.f=Nc,Za.f=$c,wu.f=Tu.f=Vc,ku.f=Lc,Ru.f=function(h){return Rc(Bo(h),h)},Ma&&bc(dc.prototype,"description",{configurable:!0,get:function description(){return vc(this).description}})),vo({global:!0,wrap:!0,forced:!$o,sham:!$o},{Symbol:dc}),lc(fu(Oc),(function(h){Nu(h)})),vo({target:hc,stat:!0,forced:!$o},{for:function _for(h){var g=String(h);if(Xa(Ec,g))return Ec[g];var d=dc(g);return Ec[g]=d,Pc[d]=g,d},keyFor:function keyFor(h){if(!Mc(h))throw TypeError(h+" is not a symbol");if(Xa(Pc,h))return Pc[h]},useSetter:function useSetter(){kc=!0},useSimple:function useSimple(){kc=!1}}),vo({target:"Object",stat:!0,forced:!$o,sham:!Ma},{create:function create(h,g){return void 0===g?bu(h):Ic(bu(h),g)},defineProperty:Nc,defineProperties:Ic,getOwnPropertyDescriptor:$c}),vo({target:"Object",stat:!0,forced:!$o},{getOwnPropertyNames:Vc,getOwnPropertySymbols:Lc}),vo({target:"Object",stat:!0,forced:Ra((function(){ku.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(h){return ku.f(Os(h))}}),mc){var jc=!$o||Ra((function(){var h=dc();return"[null]"!=mc([h])||"{}"!=mc({a:h})||"{}"!=mc(Object(h))}));vo({target:"JSON",stat:!0,forced:jc},{stringify:function stringify(h,g,d){for(var x,b=[h],_=1;arguments.length>_;)b.push(arguments[_++]);if(x=g,(Ga(g)||void 0!==h)&&!Mc(h))return Ts(g)||(g=function replacer(h,g){if("function"==typeof x&&(g=x.call(this,h,g)),!Mc(g))return g}),b[1]=g,mc.apply(null,b)}})}dc.prototype[pc]||ho(dc.prototype,pc,dc.prototype.valueOf),zu(dc,hc),su[fc]=!0,Nu("asyncIterator"),Nu("hasInstance"),Nu("isConcatSpreadable"),Nu("iterator"),Nu("match"),Nu("matchAll"),Nu("replace"),Nu("search"),Nu("species"),Nu("split"),Nu("toPrimitive"),Nu("toStringTag"),Nu("unscopables"),zu(Pa.JSON,"JSON",!0);var Fc=oo.Symbol;Nu("asyncDispose"),Nu("dispose"),Nu("observable"),Nu("patternMatch"),Nu("replaceAll");var Bc,zc,Gc,Uc=Fc,Hc={},Xc=!Ra((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Yc=vu("IE_PROTO"),Wc=Object.prototype,qc=Xc?Object.getPrototypeOf:function(h){return h=Os(h),Xa(h,Yc)?h[Yc]:"function"==typeof h.constructor&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?Wc:null},Qc=Bo("iterator"),Kc=!1;[].keys&&("next"in(Gc=[].keys())?(zc=qc(qc(Gc)))!==Object.prototype&&(Bc=zc):Kc=!0);var Zc=null==Bc||Ra((function(){var h={};return Bc[Qc].call(h)!==h}));Zc&&(Bc={}),Zc&&!Xa(Bc,Qc)&&ho(Bc,Qc,(function returnThis(){return this}));var Jc={IteratorPrototype:Bc,BUGGY_SAFARI_ITERATORS:Kc},tl=Jc.IteratorPrototype,el=function returnThis(){return this},rl=Object.setPrototypeOf||("__proto__"in{}?function(){var h,g=!1,d={};try{(h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(d,[]),g=d instanceof Array}catch(h){}return function setPrototypeOf(d,x){return co(d),function aPossiblePrototype(h){if(!Ga(h)&&null!==h)throw TypeError("Can't set "+String(h)+" as a prototype")}(x),g?h.call(d,x):d.__proto__=x,d}}():void 0),nl=Jc.IteratorPrototype,il=Jc.BUGGY_SAFARI_ITERATORS,al=Bo("iterator"),ol="keys",sl="values",ul="entries",cl=function returnThis(){return this},ll=function defineIterator(h,g,d,x,b,_,S){!function createIteratorConstructor(h,g,d){var x=g+" Iterator";h.prototype=bu(tl,{next:$a(1,d)}),zu(h,x,!1,!0),Hc[x]=el}(d,g,x);var C,w,E,P=function getIterationMethod(h){if(h===b&&N)return N;if(!il&&h in R)return R[h];switch(h){case ol:return function keys(){return new d(this,h)};case sl:return function values(){return new d(this,h)};case ul:return function entries(){return new d(this,h)}}return function(){return new d(this)}},k=g+" Iterator",A=!1,R=h.prototype,M=R[al]||R["@@iterator"]||b&&R[b],N=!il&&M||P(b),D="Array"==g&&R.entries||M;if(D&&(C=qc(D.call(new h)),nl!==Object.prototype&&C.next&&(zu(C,k,!0,!0),Hc[k]=cl)),b==sl&&M&&M.name!==sl&&(A=!0,N=function values(){return M.call(this)}),S&&R[al]!==N&&ho(R,al,N),Hc[g]=N,b)if(w={values:P(sl),keys:_?N:P(ol),entries:P(ul)},S)for(E in w)(il||A||!(E in R))&&Au(R,E,w[E]);else vo({target:g,proto:!0,forced:il||A},w);return w},fl="Array Iterator",hl=cc.set,pl=cc.getterFor(fl);ll(Array,"Array",(function(h,g){hl(this,{type:fl,target:za(h),index:0,kind:g})}),(function(){var h=pl(this),g=h.target,d=h.kind,x=h.index++;return!g||x>=g.length?(h.target=void 0,{value:void 0,done:!0}):"keys"==d?{value:x,done:!1}:"values"==d?{value:g[x],done:!1}:{value:[x,g[x]],done:!1}}),"values"),Hc.Arguments=Hc.Array;var yl=Bo("toStringTag");for(var vl in{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}){var gl=Pa[vl],dl=gl&&gl.prototype;dl&&Lu(dl)!==yl&&ho(dl,yl,vl),Hc[vl]=Hc.Array}var ml=function createMethod(h){return function(g,d){var x,b,_=String(Ba(g)),S=xo(d),C=_.length;return S<0||S>=C?h?"":void 0:(x=_.charCodeAt(S))<55296||x>56319||S+1===C||(b=_.charCodeAt(S+1))<56320||b>57343?h?_.charAt(S):x:h?_.slice(S,S+2):b-56320+(x-55296<<10)+65536}},xl={codeAt:ml(!1),charAt:ml(!0)}.charAt,bl="String Iterator",_l=cc.set,Sl=cc.getterFor(bl);ll(String,"String",(function(h){_l(this,{type:bl,string:String(h),index:0})}),(function next(){var h,g=Sl(this),d=g.string,x=g.index;return x>=d.length?{value:void 0,done:!0}:(h=xl(d,x),g.index+=h.length,{value:h,done:!1})}));var Cl=Bo("iterator"),wl=function isIterable(h){var g=Object(h);return void 0!==g[Cl]||"@@iterator"in g||Hc.hasOwnProperty(Lu(g))},El=Bo("iterator"),Pl=function getIteratorMethod(h){if(null!=h)return h[El]||h["@@iterator"]||Hc[Lu(h)]},Ol=function getIterator(h){var g=Pl(h);if("function"!=typeof g)throw TypeError(String(h)+" is not iterable");return co(g.call(h))};var Tl=Ds("slice"),kl=Bo("species"),Al=[].slice,Rl=Math.max;vo({target:"Array",proto:!0,forced:!Tl},{slice:function slice(h,g){var d,x,b,_=za(this),S=_o(_.length),C=iu(h,S),w=iu(void 0===g?S:g,S);if(Ts(_)&&("function"!=typeof(d=_.constructor)||d!==Array&&!Ts(d.prototype)?Ga(d)&&null===(d=d[kl])&&(d=void 0):d=void 0,d===Array||void 0===d))return Al.call(_,C,w);for(x=new(void 0===d?Array:d)(Rl(w-C,0)),b=0;C<w;C++,b++)C in _&&Gs(x,b,_[C]);return x.length=b,x}});var Ml=qo("Array").slice,Nl=Array.prototype,Il=function slice_1(h){var g=h.slice;return h===Nl||h instanceof Array&&g===Nl.slice?Ml:g},Dl=Il,callWithSafeIterationClosing$1=function(h,g,d,x){try{return x?g(anObject$1(d)[0],d[1]):g(d)}catch(g){throw iteratorClose$1(h),g}},$l=!checkCorrectnessOfIteration$1((function(h){Array.from(h)}));_export$1({target:"Array",stat:!0,forced:$l},{from:function from(h){var g,d,x,b,_,S,C=toObject$1(h),w="function"==typeof this?this:Array,E=arguments.length,P=E>1?arguments[1]:void 0,k=void 0!==P,A=getIteratorMethod$2(C),R=0;if(k&&(P=functionBindContext$1(P,E>2?arguments[2]:void 0,2)),null==A||w==Array&&isArrayIteratorMethod$1(A))for(d=new w(g=toLength$1(C.length));g>R;R++)S=k?P(C[R],R):C[R],createProperty$1(d,R,S);else for(_=(b=A.call(C)).next,d=new w;!(x=_.call(b)).done;R++)S=k?callWithSafeIterationClosing$1(b,P,[x.value,R],!0):x.value,createProperty$1(d,R,S);return d.length=R,d}});var Vl=function iteratorClose(h){var g=h.return;if(void 0!==g)return co(g.call(h)).value},Ll=function callWithSafeIterationClosing(h,g,d,x){try{return x?g(co(d)[0],d[1]):g(d)}catch(g){throw Vl(h),g}},jl=Bo("iterator"),Fl=Array.prototype,Bl=function isArrayIteratorMethod(h){return void 0!==h&&(Hc.Array===h||Fl[jl]===h)},zl=Bo("iterator"),Gl=!1;try{var Ul=0,Hl={next:function next(){return{done:!!Ul++}},return:function _return(){Gl=!0}};Hl[zl]=function(){return this},Array.from(Hl,(function(){throw 2}))}catch(h){}var Xl=function checkCorrectnessOfIteration(h,g){if(!g&&!Gl)return!1;var d=!1;try{var x={};x[zl]=function(){return{next:function next(){return{done:d=!0}}}},h(x)}catch(h){}return d},Yl=!Xl((function(h){Array.from(h)}));vo({target:"Array",stat:!0,forced:Yl},{from:function from(h){var g,d,x,b,_,S,C=Os(h),w="function"==typeof this?this:Array,E=arguments.length,P=E>1?arguments[1]:void 0,k=void 0!==P,A=Pl(C),R=0;if(k&&(P=uo(P,E>2?arguments[2]:void 0,2)),null==A||w==Array&&Bl(A))for(d=new w(g=_o(C.length));g>R;R++)S=k?P(C[R],R):C[R],Gs(d,R,S);else for(_=(b=A.call(C)).next,d=new w;!(x=_.call(b)).done;R++)S=k?Ll(b,P,[x.value,R],!0):x.value,Gs(d,R,S);return d.length=R,d}});var Wl=oo.Array.from,ql=Wl;function _arrayLikeToArray$2(h,g){(null==g||g>h.length)&&(g=h.length);for(var d=0,x=new Array(g);d<g;d++)x[d]=h[d];return x}function _unsupportedIterableToArray$2(h,g){var d;if(h){if("string"==typeof h)return _arrayLikeToArray$2(h,g);var x=Dl(d=Object.prototype.toString.call(h)).call(d,8,-1);return"Object"===x&&h.constructor&&(x=h.constructor.name),"Map"===x||"Set"===x?ql(h):"Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?_arrayLikeToArray$2(h,g):void 0}}function _slicedToArray(h,g){return function _arrayWithHoles(h){if(zs(h))return h}(h)||function _iterableToArrayLimit(h,g){if(void 0!==Uc&&wl(Object(h))){var d=[],x=!0,b=!1,_=void 0;try{for(var S,C=Ol(h);!(x=(S=C.next()).done)&&(d.push(S.value),!g||d.length!==g);x=!0);}catch(h){b=!0,_=h}finally{try{x||null==C.return||C.return()}finally{if(b)throw _}}return d}}(h,g)||_unsupportedIterableToArray$2(h,g)||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.")}()}vo({target:"Object",stat:!0,forced:!Ma,sham:!Ma},{defineProperty:fo.f});var Ql=createCommonjsModule((function(h){var g=oo.Object,d=h.exports=function defineProperty(h,d,x){return g.defineProperty(h,d,x)};g.defineProperty.sham&&(d.sham=!0)})),Kl=Ql;vo({target:"Object",stat:!0,forced:!Ma,sham:!Ma},{defineProperties:hu});var Zl=createCommonjsModule((function(h){var g=oo.Object,d=h.exports=function defineProperties(h,d){return g.defineProperties(h,d)};g.defineProperties.sham&&(d.sham=!0)})),Jl=Ao("Reflect","ownKeys")||function ownKeys(h){var g=wu.f(co(h)),d=ku.f;return d?g.concat(d(h)):g};vo({target:"Object",stat:!0,sham:!Ma},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(h){for(var g,d,x=za(h),b=Za.f,_=Jl(x),S={},C=0;_.length>C;)void 0!==(d=b(x,g=_[C++]))&&Gs(S,g,d);return S}});var tf=oo.Object.getOwnPropertyDescriptors,ef=function arrayMethodIsStrict(h,g){var d=[][h];return!!d&&Ra((function(){d.call(null,g||function(){throw 1},1)}))},rf=Ns.forEach,nf=ef("forEach")?[].forEach:function forEach(h){return rf(this,h,arguments.length>1?arguments[1]:void 0)};vo({target:"Array",proto:!0,forced:[].forEach!=nf},{forEach:nf});var af=qo("Array").forEach,of=Array.prototype,sf={DOMTokenList:!0,NodeList:!0},uf=function forEach_1(h){var g=h.forEach;return h===of||h instanceof Array&&g===of.forEach||sf.hasOwnProperty(Lu(h))?af:g},cf=Za.f,lf=Ra((function(){cf(1)}));vo({target:"Object",stat:!0,forced:!Ma||lf,sham:!Ma},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(h,g){return cf(za(h),g)}});var ff=createCommonjsModule((function(h){var g=oo.Object,d=h.exports=function getOwnPropertyDescriptor(h,d){return g.getOwnPropertyDescriptor(h,d)};g.getOwnPropertyDescriptor.sham&&(d.sham=!0)})),hf=ff,pf=ae.filter,yf=arrayMethodHasSpeciesSupport$1("filter");_export$1({target:"Array",proto:!0,forced:!yf},{filter:function filter(h){return pf(this,h,arguments.length>1?arguments[1]:void 0)}});var vf=Ns.filter,gf=Ds("filter");vo({target:"Array",proto:!0,forced:!gf},{filter:function filter(h){return vf(this,h,arguments.length>1?arguments[1]:void 0)}});var df=qo("Array").filter,mf=Array.prototype,xf=function filter_1(h){var g=h.filter;return h===mf||h instanceof Array&&g===mf.filter?df:g},bf=oo.Object.getOwnPropertySymbols,_f=Ra((function(){fu(1)}));vo({target:"Object",stat:!0,forced:_f},{keys:function keys(h){return fu(Os(h))}});var Sf=oo.Object.keys,Cf=yi,wf=function Result(h,g){this.stopped=h,this.result=g},Ef=function iterate(h,g,d){var x,b,_,S,C,w,E,P=d&&d.that,k=!(!d||!d.AS_ENTRIES),A=!(!d||!d.IS_ITERATOR),R=!(!d||!d.INTERRUPTED),M=uo(g,P,1+k+R),N=function stop(h){return x&&Vl(x),new wf(!0,h)},D=function callFn(h){return k?(co(h),R?M(h[0],h[1],N):M(h[0],h[1])):R?M(h,N):M(h)};if(A)x=h;else{if("function"!=typeof(b=Pl(h)))throw TypeError("Target is not iterable");if(Bl(b)){for(_=0,S=_o(h.length);S>_;_++)if((C=D(h[_]))&&C instanceof wf)return C;return new wf(!1)}x=b.call(h)}for(w=x.next;!(E=w.call(x)).done;){try{C=D(E.value)}catch(h){throw Vl(x),h}if("object"==_typeof$2(C)&&C&&C instanceof wf)return C}return new wf(!1)},Pf=function AggregateError(h,g){var d=this;if(!(d instanceof Pf))return new Pf(h,g);rl&&(d=rl(new Error(void 0),qc(d))),void 0!==g&&ho(d,"message",String(g));var x=[];return Ef(h,x.push,{that:x}),ho(d,"errors",x),d};Pf.prototype=bu(Error.prototype,{constructor:$a(5,Pf),message:$a(5,""),name:$a(5,"AggregateError")}),vo({global:!0},{AggregateError:Pf});var Of=!!Br&&fails$1((function(){Br.prototype.finally.call({then:function(){}},(function(){}))}));_export$1({target:"Promise",proto:!0,real:!0,forced:Of},{finally:function(h){var g=speciesConstructor$1(this,getBuiltIn$1("Promise")),d="function"==typeof h;return this.then(d?function(d){return promiseResolve$1(g,h()).then((function(){return d}))}:h,d?function(d){return promiseResolve$1(g,h()).then((function(){throw d}))}:h)}}),"function"!=typeof Br||Br.prototype.finally||lt(Br.prototype,"finally",getBuiltIn$1("Promise").prototype.finally);var Tf=Pa.Promise,kf=function redefineAll(h,g,d){for(var x in g)d&&d.unsafe&&h[x]?h[x]=g[x]:Au(h,x,g[x],d);return h},Af=Bo("species"),Rf=function setSpecies(h){var g=Ao(h),d=fo.f;Ma&&g&&!g[Af]&&d(g,Af,{configurable:!0,get:function get(){return this}})},Mf=function anInstance(h,g,d){if(!(h instanceof g))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return h},Nf=Bo("species"),If=function speciesConstructor(h,g){var d,x=co(h).constructor;return void 0===x||null==(d=co(x)[Nf])?g:so(d)},Df=!x.setImmediate||!x.clearImmediate;_export$1({global:!0,bind:!0,enumerable:!0,forced:Df},{setImmediate:xn.set,clearImmediate:xn.clear});var $f,Vf,Lf,jf=/(iphone|ipod|ipad).*applewebkit/i.test(Ro),Ff=Pa.location,Bf=Pa.setImmediate,zf=Pa.clearImmediate,Gf=Pa.process,Uf=Pa.MessageChannel,Hf=Pa.Dispatch,Xf=0,Yf={},Wf="onreadystatechange",qf=function run(h){if(Yf.hasOwnProperty(h)){var g=Yf[h];delete Yf[h],g()}},Qf=function runner(h){return function(){qf(h)}},Kf=function listener(h){qf(h.data)},Zf=function post(h){Pa.postMessage(h+"",Ff.protocol+"//"+Ff.host)};Bf&&zf||(Bf=function setImmediate(h){for(var g=[],d=1;arguments.length>d;)g.push(arguments[d++]);return Yf[++Xf]=function(){("function"==typeof h?h:Function(h)).apply(void 0,g)},$f(Xf),Xf},zf=function clearImmediate(h){delete Yf[h]},To?$f=function defer(h){Gf.nextTick(Qf(h))}:Hf&&Hf.now?$f=function defer(h){Hf.now(Qf(h))}:Uf&&!jf?(Lf=(Vf=new Uf).port2,Vf.port1.onmessage=Kf,$f=uo(Lf.postMessage,Lf,1)):Pa.addEventListener&&"function"==typeof postMessage&&!Pa.importScripts&&Ff&&"file:"!==Ff.protocol&&!Ra(Zf)?($f=Zf,Pa.addEventListener("message",Kf,!1)):$f=Wf in qa("script")?function defer(h){pu.appendChild(qa("script")).onreadystatechange=function(){pu.removeChild(this),qf(h)}}:function defer(h){setTimeout(Qf(h),0)});var Jf,th,eh,rh,nh,ih,ah,oh,sh={set:Bf,clear:zf},uh=/web0s(?!.*chrome)/i.test(Ro),ch=Za.f,lh=sh.set,fh=Pa.MutationObserver||Pa.WebKitMutationObserver,hh=Pa.document,ph=Pa.process,yh=Pa.Promise,vh=ch(Pa,"queueMicrotask"),gh=vh&&vh.value;gh||(Jf=function flush(){var h,g;for(To&&(h=ph.domain)&&h.exit();th;){g=th.fn,th=th.next;try{g()}catch(h){throw th?rh():eh=void 0,h}}eh=void 0,h&&h.enter()},jf||To||uh||!fh||!hh?yh&&yh.resolve?(ah=yh.resolve(void 0),oh=ah.then,rh=function notify(){oh.call(ah,Jf)}):rh=To?function notify(){ph.nextTick(Jf)}:function notify(){lh.call(Pa,Jf)}:(nh=!0,ih=hh.createTextNode(""),new fh(Jf).observe(ih,{characterData:!0}),rh=function notify(){ih.data=nh=!nh}));var dh=gh||function(h){var g={fn:h,next:void 0};eh&&(eh.next=g),th||(th=g,rh()),eh=g},mh=function PromiseCapability(h){var g,d;this.promise=new h((function(h,x){if(void 0!==g||void 0!==d)throw TypeError("Bad Promise constructor");g=h,d=x})),this.resolve=so(g),this.reject=so(d)},xh={f:function f(h){return new mh(h)}},bh=function promiseResolve(h,g){if(co(h),Ga(g)&&g.constructor===h)return g;var d=xh.f(h);return(0,d.resolve)(g),d.promise},_h=function perform(h){try{return{error:!1,value:h()}}catch(h){return{error:!0,value:h}}},Sh=sh.set,Ch=Bo("species"),wh="Promise",Eh=cc.get,Ph=cc.set,Oh=cc.getterFor(wh),Th=Tf,kh=Pa.TypeError,Ah=Pa.document,Rh=Pa.process;Ao("fetch");var Mh,Nh,Ih,Dh=xh.f,$h=Dh,Vh=!!(Ah&&Ah.createEvent&&Pa.dispatchEvent),Lh="function"==typeof PromiseRejectionEvent,jh="unhandledrejection",Fh=ao(wh,(function(){if(!(tc(Th)!==String(Th))){if(66===Do)return!0;if(!To&&!Lh)return!0}if(!Th.prototype.finally)return!0;if(Do>=51&&/native code/.test(Th))return!1;var h=Th.resolve(1),g=function FakePromise(h){h((function(){}),(function(){}))};return(h.constructor={})[Ch]=g,!(h.then((function(){}))instanceof g)})),Bh=Fh||!Xl((function(h){Th.all(h).catch((function(){}))})),zh=function isThenable(h){var g;return!(!Ga(h)||"function"!=typeof(g=h.then))&&g},Gh=function notify(h,g){if(!h.notified){h.notified=!0;var d=h.reactions;dh((function(){for(var x=h.value,b=1==h.state,_=0;d.length>_;){var S,C,w,E=d[_++],P=b?E.ok:E.fail,k=E.resolve,A=E.reject,R=E.domain;try{P?(b||(2===h.rejection&&Yh(h),h.rejection=1),!0===P?S=x:(R&&R.enter(),S=P(x),R&&(R.exit(),w=!0)),S===E.promise?A(kh("Promise-chain cycle")):(C=zh(S))?C.call(S,k,A):k(S)):A(x)}catch(h){R&&!w&&R.exit(),A(h)}}h.reactions=[],h.notified=!1,g&&!h.rejection&&Hh(h)}))}},Uh=function dispatchEvent(h,g,d){var x,b;Vh?((x=Ah.createEvent("Event")).promise=g,x.reason=d,x.initEvent(h,!1,!0),Pa.dispatchEvent(x)):x={promise:g,reason:d},!Lh&&(b=Pa["on"+h])?b(x):h===jh&&function hostReportErrors(h,g){var d=Pa.console;d&&d.error&&(1===arguments.length?d.error(h):d.error(h,g))}("Unhandled promise rejection",d)},Hh=function onUnhandled(h){Sh.call(Pa,(function(){var g,d=h.facade,x=h.value;if(Xh(h)&&(g=_h((function(){To?Rh.emit("unhandledRejection",x,d):Uh(jh,d,x)})),h.rejection=To||Xh(h)?2:1,g.error))throw g.value}))},Xh=function isUnhandled(h){return 1!==h.rejection&&!h.parent},Yh=function onHandleUnhandled(h){Sh.call(Pa,(function(){var g=h.facade;To?Rh.emit("rejectionHandled",g):Uh("rejectionhandled",g,h.value)}))},Wh=function bind(h,g,d){return function(x){h(g,x,d)}},qh=function internalReject(h,g,d){h.done||(h.done=!0,d&&(h=d),h.value=g,h.state=2,Gh(h,!0))},Qh=function internalResolve(h,g,d){if(!h.done){h.done=!0,d&&(h=d);try{if(h.facade===g)throw kh("Promise can't be resolved itself");var x=zh(g);x?dh((function(){var d={done:!1};try{x.call(g,Wh(internalResolve,d,h),Wh(qh,d,h))}catch(g){qh(d,g,h)}})):(h.value=g,h.state=1,Gh(h,!1))}catch(g){qh({done:!1},g,h)}}};Fh&&(Th=function Promise(h){Mf(this,Th,wh),so(h),Mh.call(this);var g=Eh(this);try{h(Wh(Qh,g),Wh(qh,g))}catch(h){qh(g,h)}},(Mh=function Promise(h){Ph(this,{type:wh,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=kf(Th.prototype,{then:function then(h,g){var d=Oh(this),x=Dh(If(this,Th));return x.ok="function"!=typeof h||h,x.fail="function"==typeof g&&g,x.domain=To?Rh.domain:void 0,d.parent=!0,d.reactions.push(x),0!=d.state&&Gh(d,!1),x.promise},catch:function _catch(h){return this.then(void 0,h)}}),Nh=function OwnPromiseCapability(){var h=new Mh,g=Eh(h);this.promise=h,this.resolve=Wh(Qh,g),this.reject=Wh(qh,g)},xh.f=Dh=function newPromiseCapability(h){return h===Th||h===Ih?new Nh(h):$h(h)}),vo({global:!0,wrap:!0,forced:Fh},{Promise:Th}),zu(Th,wh,!1,!0),Rf(wh),Ih=Ao(wh),vo({target:wh,stat:!0,forced:Fh},{reject:function reject(h){var g=Dh(this);return g.reject.call(void 0,h),g.promise}}),vo({target:wh,stat:!0,forced:!0},{resolve:function resolve(h){return bh(this===Ih?Th:this,h)}}),vo({target:wh,stat:!0,forced:Bh},{all:function all(h){var g=this,d=Dh(g),x=d.resolve,b=d.reject,_=_h((function(){var d=so(g.resolve),_=[],S=0,C=1;Ef(h,(function(h){var w=S++,E=!1;_.push(void 0),C++,d.call(g,h).then((function(h){E||(E=!0,_[w]=h,--C||x(_))}),b)})),--C||x(_)}));return _.error&&b(_.value),d.promise},race:function race(h){var g=this,d=Dh(g),x=d.reject,b=_h((function(){var b=so(g.resolve);Ef(h,(function(h){b.call(g,h).then(d.resolve,x)}))}));return b.error&&x(b.value),d.promise}}),vo({target:"Promise",stat:!0},{allSettled:function allSettled(h){var g=this,d=xh.f(g),x=d.resolve,b=d.reject,_=_h((function(){var d=so(g.resolve),b=[],_=0,S=1;Ef(h,(function(h){var C=_++,w=!1;b.push(void 0),S++,d.call(g,h).then((function(h){w||(w=!0,b[C]={status:"fulfilled",value:h},--S||x(b))}),(function(h){w||(w=!0,b[C]={status:"rejected",reason:h},--S||x(b))}))})),--S||x(b)}));return _.error&&b(_.value),d.promise}});var Kh="No one promise resolved";vo({target:"Promise",stat:!0},{any:function any(h){var g=this,d=xh.f(g),x=d.resolve,b=d.reject,_=_h((function(){var d=so(g.resolve),_=[],S=0,C=1,w=!1;Ef(h,(function(h){var E=S++,P=!1;_.push(void 0),C++,d.call(g,h).then((function(h){P||w||(w=!0,x(h))}),(function(h){P||w||(P=!0,_[E]=h,--C||b(new(Ao("AggregateError"))(_,Kh)))}))})),--C||b(new(Ao("AggregateError"))(_,Kh))}));return _.error&&b(_.value),d.promise}});var Zh=!!Tf&&Ra((function(){Tf.prototype.finally.call({then:function then(){}},(function(){}))}));vo({target:"Promise",proto:!0,real:!0,forced:Zh},{finally:function _finally(h){var g=If(this,Ao("Promise")),d="function"==typeof h;return this.then(d?function(d){return bh(g,h()).then((function(){return d}))}:h,d?function(d){return bh(g,h()).then((function(){throw d}))}:h)}});var Jh=oo.Promise;vo({target:"Promise",stat:!0},{try:function _try(h){var g=xh.f(this),d=_h(h);return(d.error?g.reject:g.resolve)(d.value),g.promise}});var tp=Jh;function asyncGeneratorStep(h,g,d,x,b,_,S){try{var C=h[_](S),w=C.value}catch(h){return void d(h)}C.done?g(w):tp.resolve(w).then(x,b)}function _asyncToGenerator(h){return function(){var g=this,d=arguments;return new tp((function(x,b){var _=h.apply(g,d);function _next(h){asyncGeneratorStep(_,x,b,_next,_throw,"next",h)}function _throw(h){asyncGeneratorStep(_,x,b,_next,_throw,"throw",h)}_next(void 0)}))}}var ep=Ql;function _defineProperty(h,g,d){return g in h?ep(h,g,{value:d,enumerable:!0,configurable:!0,writable:!0}):h[g]=d,h}function _classCallCheck$1(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")}function _defineProperties(h,g){for(var d=0;d<g.length;d++){var x=g[d];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),ep(h,x.key,x)}}function _createClass(h,g,d){return g&&_defineProperties(h.prototype,g),d&&_defineProperties(h,d),h}var rp=qo("Array").concat,np=Array.prototype,ip=function concat_1(h){var g=h.concat;return h===np||h instanceof Array&&g===np.concat?rp:g},createMethod$1=function(h){return function(g,d,x,b){aFunction$2(d);var _=toObject$1(g),S=P(_),C=toLength$1(_.length),w=h?C-1:0,E=h?-1:1;if(x<2)for(;;){if(w in S){b=S[w],w+=E;break}if(w+=E,h?w<0:C<=w)throw TypeError("Reduce of empty array with no initial value")}for(;h?w>=0:C>w;w+=E)w in S&&(b=d(b,S[w],w,_));return b}},ap={left:createMethod$1(!1),right:createMethod$1(!0)}.left,op=arrayMethodIsStrict$1("reduce");_export$1({target:"Array",proto:!0,forced:!op||!Rt&&Vt>79&&Vt<83},{reduce:function reduce(h){return ap(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}});var sp=function createMethod(h){return function(g,d,x,b){so(d);var _=Os(g),S=Fa(_),C=_o(_.length),w=h?C-1:0,E=h?-1:1;if(x<2)for(;;){if(w in S){b=S[w],w+=E;break}if(w+=E,h?w<0:C<=w)throw TypeError("Reduce of empty array with no initial value")}for(;h?w>=0:C>w;w+=E)w in S&&(b=d(b,S[w],w,_));return b}},up={left:sp(!1),right:sp(!0)}.left,cp=ef("reduce");vo({target:"Array",proto:!0,forced:!cp||!To&&Do>79&&Do<83},{reduce:function reduce(h){return up(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}});var lp=qo("Array").reduce,fp=Array.prototype,hp=function reduce_1(h){var g=h.reduce;return h===fp||h instanceof Array&&g===fp.reduce?lp:g};vo({target:"Date",stat:!0},{now:function now(){return(new Date).getTime()}});var pp=oo.Date.now,yp=ae.every,vp=arrayMethodIsStrict$1("every");_export$1({target:"Array",proto:!0,forced:!vp},{every:function every(h){return yp(this,h,arguments.length>1?arguments[1]:void 0)}});var gp=Ns.every,dp=ef("every");vo({target:"Array",proto:!0,forced:!dp},{every:function every(h){return gp(this,h,arguments.length>1?arguments[1]:void 0)}});var mp=qo("Array").every,xp=Array.prototype,bp=function every_1(h){var g=h.every;return h===xp||h instanceof Array&&g===xp.every?mp:g},_p=Jh,Sp=[].slice,Cp={},wp=function construct(h,g,d){if(!(g in Cp)){for(var x=[],b=0;b<g;b++)x[b]="a["+b+"]";Cp[g]=Function("C,a","return new C("+x.join(",")+")")}return Cp[g](h,d)},Ep=Function.bind||function bind(h){var g=so(this),d=Sp.call(arguments,1),x=function bound(){var b=d.concat(Sp.call(arguments));return this instanceof x?wp(g,b.length,b):g.apply(h,b)};return Ga(g.prototype)&&(x.prototype=g.prototype),x};vo({target:"Function",proto:!0},{bind:Ep});for(var Pp=qo("Function").bind,Op=Function.prototype,Tp=function bind_1(h){var g=h.bind;return h===Op||h instanceof Function&&g===Op.bind?Pp:g},kp=createCommonjsModule((function(h){(function(){var d,x,b,_,S,C;"undefined"!=typeof performance&&null!==performance&&performance.now?h.exports=function(){return performance.now()}:null!=g&&g.hrtime?(h.exports=function(){return(d()-S)/1e6},x=g.hrtime,_=(d=function getNanoSeconds(){var h;return 1e9*(h=x())[0]+h[1]})(),C=1e9*g.uptime(),S=_-C):Date.now?(h.exports=function(){return Date.now()-b},b=Date.now()):(h.exports=function(){return(new Date).getTime()-b},b=(new Date).getTime())}).call(d)})),Ap="undefined"==typeof window?d:window,Rp=["moz","webkit"],Mp="AnimationFrame",Np=Ap["request"+Mp],Ip=Ap["cancel"+Mp]||Ap["cancelRequest"+Mp],Dp=0;!Np&&Dp<Rp.length;Dp++)Np=Ap[Rp[Dp]+"Request"+Mp],Ip=Ap[Rp[Dp]+"Cancel"+Mp]||Ap[Rp[Dp]+"CancelRequest"+Mp];if(!Np||!Ip){var $p=0,Vp=0,Lp=[];Np=function raf(h){if(0===Lp.length){var g=kp(),d=Math.max(0,16.666666666666668-(g-$p));$p=d+g,setTimeout((function(){var h=Lp.slice(0);Lp.length=0;for(var g=0;g<h.length;g++)if(!h[g].cancelled)try{h[g].callback($p)}catch(h){setTimeout((function(){throw h}),0)}}),Math.round(d))}return Lp.push({handle:++Vp,callback:h,cancelled:!1}),Vp},Ip=function caf(h){for(var g=0;g<Lp.length;g++)Lp[g].handle===h&&(Lp[g].cancelled=!0)}}var jp=function raf_1(h){return Np.call(Ap,h)};jp.cancel=function cancel(){Ip.apply(Ap,arguments)},jp.polyfill=function polyfill(h){h||(h=Ap),h.requestAnimationFrame=Np,h.cancelAnimationFrame=Ip};var Fp=bs.trim;vo({target:"String",proto:!0,forced:function stringTrimForced(h){return Ra((function(){return!!vs[h]()||"…"!="…"[h]()||vs[h].name!==h}))}("trim")},{trim:function trim(){return Fp(this)}});var Bp=qo("String").trim,zp=String.prototype,Gp=function trim_1(h){var g=h.trim;return"string"==typeof h||h===zp||h instanceof String&&g===zp.trim?Bp:g},Up=Fi.trim,Hp=x.parseInt,Xp=/^[+-]?0[Xx]/,Yp=8!==Hp($i+"08")||22!==Hp($i+"0x16")?function parseInt(h,g){var d=Up(String(h));return Hp(d,g>>>0||(Xp.test(d)?16:10))}:Hp;_export$1({global:!0,forced:parseInt!=Yp},{parseInt:Yp});var Wp=function rgbcolor(h){this.ok=!1,this.alpha=1,"#"==h.charAt(0)&&(h=h.substr(1,6)),h=(h=h.replace(/ /g,"")).toLowerCase();var g={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"};h=g[h]||h;for(var d=[{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(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3]),parseFloat(h[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function process(h){return[parseInt(h[1]),parseInt(h[2]),parseInt(h[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function process(h){return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function process(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],x=0;x<d.length;x++){var b=d[x].re,_=d[x].process,S=b.exec(h);if(S){var C=_(S);this.r=C[0],this.g=C[1],this.b=C[2],C.length>3&&(this.alpha=C[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var h=this.r.toString(16),g=this.g.toString(16),d=this.b.toString(16);return 1==h.length&&(h="0"+h),1==g.length&&(g="0"+g),1==d.length&&(d="0"+d),"#"+h+g+d},this.getHelpXML=function(){for(var h=new Array,x=0;x<d.length;x++)for(var b=d[x].example,_=0;_<b.length;_++)h[h.length]=b[_];for(var S in g)h[h.length]=S;var C=document.createElement("ul");C.setAttribute("id","rgbcolor-examples");for(x=0;x<h.length;x++)try{var w=document.createElement("li"),E=new RGBColor(h[x]),P=document.createElement("div");P.style.cssText="margin: 3px; border: 1px solid black; background:"+E.toHex()+"; color:"+E.toHex(),P.appendChild(document.createTextNode("test"));var k=document.createTextNode(" "+h[x]+" -> "+E.toRGB()+" -> "+E.toHex());w.appendChild(P),w.appendChild(k),C.appendChild(w)}catch(h){}return C}},qp=Ao("Reflect","construct"),Qp=Ra((function(){function F(){}return!(qp((function(){}),[],F)instanceof F)})),Kp=!Ra((function(){qp((function(){}))})),Zp=Qp||Kp;vo({target:"Reflect",stat:!0,forced:Zp,sham:Zp},{construct:function construct(h,g){so(h),co(g);var d=arguments.length<3?h:so(arguments[2]);if(Kp&&!Qp)return qp(h,g,d);if(h==d){switch(g.length){case 0:return new h;case 1:return new h(g[0]);case 2:return new h(g[0],g[1]);case 3:return new h(g[0],g[1],g[2]);case 4:return new h(g[0],g[1],g[2],g[3])}var x=[null];return x.push.apply(x,g),new(Ep.apply(h,x))}var b=d.prototype,_=bu(Ga(b)?b:Object.prototype),S=Function.apply.call(h,_,g);return Ga(S)?S:_}});var Jp=oo.Reflect.construct;vo({target:"Object",stat:!0,sham:!Ma},{create:bu});var ty=oo.Object,ey=function create(h,g){return ty.create(h,g)};vo({target:"Object",stat:!0},{setPrototypeOf:rl});var ry=oo.Object.setPrototypeOf;function _setPrototypeOf(h,g){return(_setPrototypeOf=ry||function _setPrototypeOf(h,g){return h.__proto__=g,h})(h,g)}function _inherits(h,g){if("function"!=typeof g&&null!==g)throw new TypeError("Super expression must either be null or a function");h.prototype=ey(g&&g.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),g&&_setPrototypeOf(h,g)}var ny=Ru.f("iterator");function _typeof$1(h){return(_typeof$1="function"==typeof Uc&&"symbol"==typeof ny?function _typeof(h){return typeof h}:function _typeof(h){return h&&"function"==typeof Uc&&h.constructor===Uc&&h!==Uc.prototype?"symbol":typeof h})(h)}function _assertThisInitialized(h){if(void 0===h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function _possibleConstructorReturn(h,g){return!g||"object"!==_typeof$1(g)&&"function"!=typeof g?_assertThisInitialized(h):g}var iy=Ra((function(){qc(1)}));vo({target:"Object",stat:!0,forced:iy,sham:!Xc},{getPrototypeOf:function getPrototypeOf(h){return qc(Os(h))}});var ay=oo.Object.getPrototypeOf;function _getPrototypeOf(h){return(_getPrototypeOf=ry?ay:function _getPrototypeOf(h){return h.__proto__||ay(h)})(h)}function _toConsumableArray(h){return function _arrayWithoutHoles(h){if(zs(h))return _arrayLikeToArray$2(h)}(h)||function _iterableToArray(h){if(void 0!==Uc&&wl(Object(h)))return ql(h)}(h)||_unsupportedIterableToArray$2(h)||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 oy=ae.some,sy=arrayMethodIsStrict$1("some");_export$1({target:"Array",proto:!0,forced:!sy},{some:function some(h){return oy(this,h,arguments.length>1?arguments[1]:void 0)}});var uy=Ns.some,cy=ef("some");vo({target:"Array",proto:!0,forced:!cy},{some:function some(h){return uy(this,h,arguments.length>1?arguments[1]:void 0)}});var ly=qo("Array").some,fy=Array.prototype,hy=function some_1(h){var g=h.some;return h===fy||h instanceof Array&&g===fy.some?ly:g},py=dt.includes;_export$1({target:"Array",proto:!0},{includes:function includes(h){return py(this,h,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes"),_export$1({target:"String",proto:!0,forced:!correctIsRegexpLogic$1("includes")},{includes:function includes(h){return!!~String(requireObjectCoercible$1(this)).indexOf(notARegexp$1(h),arguments.length>1?arguments[1]:void 0)}});var yy=ou.includes;vo({target:"Array",proto:!0},{includes:function includes(h){return yy(this,h,arguments.length>1?arguments[1]:void 0)}});var vy=qo("Array").includes;vo({target:"String",proto:!0,forced:!Ho("includes")},{includes:function includes(h){return!!~String(Ba(this)).indexOf(Go(h),arguments.length>1?arguments[1]:void 0)}});var gy=qo("String").includes,dy=Array.prototype,my=String.prototype,xy=function includes(h){var g=h.includes;return h===dy||h instanceof Array&&g===dy.includes?vy:"string"==typeof h||h===my||h instanceof String&&g===my.includes?gy:g},by=Wl,_y=[].reverse,Sy=[1,2];vo({target:"Array",proto:!0,forced:String(Sy)===String(Sy.reverse())},{reverse:function reverse(){return Ts(this)&&(this.length=this.length),_y.call(this)}});var Cy=qo("Array").reverse,wy=Array.prototype,Ey=function reverse_1(h){var g=h.reverse;return h===wy||h instanceof Array&&g===wy.reverse?Cy:g},Py=ou.indexOf,Oy=[].indexOf,Ty=!!Oy&&1/[1].indexOf(1,-0)<0,ky=ef("indexOf");vo({target:"Array",proto:!0,forced:Ty||!ky},{indexOf:function indexOf(h){return Ty?Oy.apply(this,arguments)||0:Py(this,h,arguments.length>1?arguments[1]:void 0)}});var Ay=qo("Array").indexOf,Ry=Array.prototype,My=function indexOf_1(h){var g=h.indexOf;return h===Ry||h instanceof Array&&g===Ry.indexOf?Ay:g};vo({target:"Reflect",stat:!0},{get:function get$3(h,g){var d,x,b=arguments.length<3?h:arguments[2];return co(h)===b?h[g]:(d=Za.f(h,g))?Xa(d,"value")?d.value:void 0===d.get?void 0:d.get.call(b):Ga(x=qc(h))?get$3(x,g,b):void 0}});var Ny=oo.Reflect.get,Iy=ff;function _get(h,g,d){return(_get="undefined"!=typeof Reflect&&Ny?Ny:function _get(h,g,d){var x=function _superPropBase(h,g){for(;!Object.prototype.hasOwnProperty.call(h,g)&&null!==(h=_getPrototypeOf(h)););return h}(h,g);if(x){var b=Iy(x,g);return b.get?b.get.call(d):b.value}})(h,g,d||h)}vo({target:"Array",proto:!0},{fill:function fill(h){for(var g=Os(this),d=_o(g.length),x=arguments.length,b=iu(x>1?arguments[1]:void 0,d),_=x>2?arguments[2]:void 0,S=void 0===_?d:iu(_,d);S>b;)g[b++]=h;return g}});var Dy=qo("Array").fill,$y=Array.prototype,Vy=function fill_1(h){var g=h.fill;return h===$y||h instanceof Array&&g===$y.fill?Dy:g},Ly=function t(h,g){return(Ly=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var d in g)g.hasOwnProperty(d)&&(h[d]=g[d])})(h,g)};function r(h,g){function i(){this.constructor=h}Ly(h,g),h.prototype=null===g?Object.create(g):(i.prototype=g.prototype,new i)}function i(h,g){var d=h[0],x=h[1];return[d*Math.cos(g)-x*Math.sin(g),d*Math.sin(g)+x*Math.cos(g)]}function a(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];for(var d=0;d<h.length;d++)if("number"!=typeof h[d])throw new Error("assertNumbers arguments["+d+"] is not a number. "+_typeof$2(h[d])+" == typeof "+h[d]);return!0}var jy=Math.PI;function o(h,g,d){h.lArcFlag=0===h.lArcFlag?0:1,h.sweepFlag=0===h.sweepFlag?0:1;var x=h.rX,b=h.rY,_=h.x,S=h.y;x=Math.abs(h.rX),b=Math.abs(h.rY);var C=i([(g-_)/2,(d-S)/2],-h.xRot/180*jy),w=C[0],E=C[1],P=Math.pow(w,2)/Math.pow(x,2)+Math.pow(E,2)/Math.pow(b,2);1<P&&(x*=Math.sqrt(P),b*=Math.sqrt(P)),h.rX=x,h.rY=b;var k=Math.pow(x,2)*Math.pow(E,2)+Math.pow(b,2)*Math.pow(w,2),A=(h.lArcFlag!==h.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(x,2)*Math.pow(b,2)-k)/k)),R=x*E/b*A,M=-b*w/x*A,N=i([R,M],h.xRot/180*jy);h.cX=N[0]+(g+_)/2,h.cY=N[1]+(d+S)/2,h.phi1=Math.atan2((E-M)/b,(w-R)/x),h.phi2=Math.atan2((-E-M)/b,(-w-R)/x),0===h.sweepFlag&&h.phi2>h.phi1&&(h.phi2-=2*jy),1===h.sweepFlag&&h.phi2<h.phi1&&(h.phi2+=2*jy),h.phi1*=180/jy,h.phi2*=180/jy}function s(h,g,d){a(h,g,d);var x=h*h+g*g-d*d;if(0>x)return[];if(0===x)return[[h*d/(h*h+g*g),g*d/(h*h+g*g)]];var b=Math.sqrt(x);return[[(h*d+g*b)/(h*h+g*g),(g*d-h*b)/(h*h+g*g)],[(h*d-g*b)/(h*h+g*g),(g*d+h*b)/(h*h+g*g)]]}var Fy,By=Math.PI/180;function c$1(h,g,d){return(1-d)*h+d*g}function y(h,g,d,x){return h+Math.cos(x/180*jy)*g+Math.sin(x/180*jy)*d}function p(h,g,d,x){var b=g-h,_=d-g,S=3*b+3*(x-d)-6*_,C=6*(_-b),w=3*b;return Math.abs(S)<1e-6?[-w/C]:function(h,g,d){void 0===d&&(d=1e-6);var x=h*h/4-g;if(x<-d)return[];if(x<=d)return[-h/2];var b=Math.sqrt(x);return[-h/2-b,-h/2+b]}(C/S,w/S,1e-6)}function m$1(h,g,d,x,b){var _=1-b;return h*(_*_*_)+g*(3*_*_*b)+d*(3*_*b*b)+x*(b*b*b)}!function(h){function r(){return u((function(h,g,d){return h.relative&&(void 0!==h.x1&&(h.x1+=g),void 0!==h.y1&&(h.y1+=d),void 0!==h.x2&&(h.x2+=g),void 0!==h.y2&&(h.y2+=d),void 0!==h.x&&(h.x+=g),void 0!==h.y&&(h.y+=d),h.relative=!1),h}))}function e(){var h=NaN,g=NaN,d=NaN,x=NaN;return u((function(b,_,S){return b.type&Yy.SMOOTH_CURVE_TO&&(b.type=Yy.CURVE_TO,h=isNaN(h)?_:h,g=isNaN(g)?S:g,b.x1=b.relative?_-h:2*_-h,b.y1=b.relative?S-g:2*S-g),b.type&Yy.CURVE_TO?(h=b.relative?_+b.x2:b.x2,g=b.relative?S+b.y2:b.y2):(h=NaN,g=NaN),b.type&Yy.SMOOTH_QUAD_TO&&(b.type=Yy.QUAD_TO,d=isNaN(d)?_:d,x=isNaN(x)?S:x,b.x1=b.relative?_-d:2*_-d,b.y1=b.relative?S-x:2*S-x),b.type&Yy.QUAD_TO?(d=b.relative?_+b.x1:b.x1,x=b.relative?S+b.y1:b.y1):(d=NaN,x=NaN),b}))}function n(){var h=NaN,g=NaN;return u((function(d,x,b){if(d.type&Yy.SMOOTH_QUAD_TO&&(d.type=Yy.QUAD_TO,h=isNaN(h)?x:h,g=isNaN(g)?b:g,d.x1=d.relative?x-h:2*x-h,d.y1=d.relative?b-g:2*b-g),d.type&Yy.QUAD_TO){h=d.relative?x+d.x1:d.x1,g=d.relative?b+d.y1:d.y1;var _=d.x1,S=d.y1;d.type=Yy.CURVE_TO,d.x1=((d.relative?0:x)+2*_)/3,d.y1=((d.relative?0:b)+2*S)/3,d.x2=(d.x+2*_)/3,d.y2=(d.y+2*S)/3}else h=NaN,g=NaN;return d}))}function u(h){var g=0,d=0,x=NaN,b=NaN;return function(_){if(isNaN(x)&&!(_.type&Yy.MOVE_TO))throw new Error("path must start with moveto");var S=h(_,g,d,x,b);return _.type&Yy.CLOSE_PATH&&(g=x,d=b),void 0!==_.x&&(g=_.relative?g+_.x:_.x),void 0!==_.y&&(d=_.relative?d+_.y:_.y),_.type&Yy.MOVE_TO&&(x=g,b=d),S}}function O(h,g,d,x,b,_){return a(h,g,d,x,b,_),u((function(S,C,w,E){var P=S.x1,k=S.x2,A=S.relative&&!isNaN(E),R=void 0!==S.x?S.x:A?0:C,M=void 0!==S.y?S.y:A?0:w;function T(h){return h*h}S.type&Yy.HORIZ_LINE_TO&&0!==g&&(S.type=Yy.LINE_TO,S.y=S.relative?0:w),S.type&Yy.VERT_LINE_TO&&0!==d&&(S.type=Yy.LINE_TO,S.x=S.relative?0:C),void 0!==S.x&&(S.x=S.x*h+M*d+(A?0:b)),void 0!==S.y&&(S.y=R*g+S.y*x+(A?0:_)),void 0!==S.x1&&(S.x1=S.x1*h+S.y1*d+(A?0:b)),void 0!==S.y1&&(S.y1=P*g+S.y1*x+(A?0:_)),void 0!==S.x2&&(S.x2=S.x2*h+S.y2*d+(A?0:b)),void 0!==S.y2&&(S.y2=k*g+S.y2*x+(A?0:_));var N=h*x-g*d;if(void 0!==S.xRot&&(1!==h||0!==g||0!==d||1!==x))if(0===N)delete S.rX,delete S.rY,delete S.xRot,delete S.lArcFlag,delete S.sweepFlag,S.type=Yy.LINE_TO;else{var D=S.xRot*Math.PI/180,$=Math.sin(D),V=Math.cos(D),L=1/T(S.rX),j=1/T(S.rY),B=T(V)*L+T($)*j,z=2*$*V*(L-j),G=T($)*L+T(V)*j,U=B*x*x-z*g*x+G*g*g,X=z*(h*x+g*d)-2*(B*d*x+G*h*g),Y=B*d*d-z*h*d+G*h*h,W=(Math.atan2(X,U-Y)+Math.PI)%Math.PI/2,q=Math.sin(W),Q=Math.cos(W);S.rX=Math.abs(N)/Math.sqrt(U*T(Q)+X*q*Q+Y*T(q)),S.rY=Math.abs(N)/Math.sqrt(U*T(q)-X*q*Q+Y*T(Q)),S.xRot=180*W/Math.PI}return void 0!==S.sweepFlag&&0>N&&(S.sweepFlag=+!S.sweepFlag),S}))}h.ROUND=function(h){function r(g){return Math.round(g*h)/h}return void 0===h&&(h=1e13),a(h),function(h){return void 0!==h.x1&&(h.x1=r(h.x1)),void 0!==h.y1&&(h.y1=r(h.y1)),void 0!==h.x2&&(h.x2=r(h.x2)),void 0!==h.y2&&(h.y2=r(h.y2)),void 0!==h.x&&(h.x=r(h.x)),void 0!==h.y&&(h.y=r(h.y)),void 0!==h.rX&&(h.rX=r(h.rX)),void 0!==h.rY&&(h.rY=r(h.rY)),h}},h.TO_ABS=r,h.TO_REL=function(){return u((function(h,g,d){return h.relative||(void 0!==h.x1&&(h.x1-=g),void 0!==h.y1&&(h.y1-=d),void 0!==h.x2&&(h.x2-=g),void 0!==h.y2&&(h.y2-=d),void 0!==h.x&&(h.x-=g),void 0!==h.y&&(h.y-=d),h.relative=!0),h}))},h.NORMALIZE_HVZ=function(h,g,d){return void 0===h&&(h=!0),void 0===g&&(g=!0),void 0===d&&(d=!0),u((function(x,b,_,S,C){if(isNaN(S)&&!(x.type&Yy.MOVE_TO))throw new Error("path must start with moveto");return g&&x.type&Yy.HORIZ_LINE_TO&&(x.type=Yy.LINE_TO,x.y=x.relative?0:_),d&&x.type&Yy.VERT_LINE_TO&&(x.type=Yy.LINE_TO,x.x=x.relative?0:b),h&&x.type&Yy.CLOSE_PATH&&(x.type=Yy.LINE_TO,x.x=x.relative?S-b:S,x.y=x.relative?C-_:C),x.type&Yy.ARC&&(0===x.rX||0===x.rY)&&(x.type=Yy.LINE_TO,delete x.rX,delete x.rY,delete x.xRot,delete x.lArcFlag,delete x.sweepFlag),x}))},h.NORMALIZE_ST=e,h.QT_TO_C=n,h.INFO=u,h.SANITIZE=function(h){void 0===h&&(h=0),a(h);var g=NaN,d=NaN,x=NaN,b=NaN;return u((function(_,S,C,w,E){var P=Math.abs,k=!1,A=0,R=0;if(_.type&Yy.SMOOTH_CURVE_TO&&(A=isNaN(g)?0:S-g,R=isNaN(d)?0:C-d),_.type&(Yy.CURVE_TO|Yy.SMOOTH_CURVE_TO)?(g=_.relative?S+_.x2:_.x2,d=_.relative?C+_.y2:_.y2):(g=NaN,d=NaN),_.type&Yy.SMOOTH_QUAD_TO?(x=isNaN(x)?S:2*S-x,b=isNaN(b)?C:2*C-b):_.type&Yy.QUAD_TO?(x=_.relative?S+_.x1:_.x1,b=_.relative?C+_.y1:_.y2):(x=NaN,b=NaN),_.type&Yy.LINE_COMMANDS||_.type&Yy.ARC&&(0===_.rX||0===_.rY||!_.lArcFlag)||_.type&Yy.CURVE_TO||_.type&Yy.SMOOTH_CURVE_TO||_.type&Yy.QUAD_TO||_.type&Yy.SMOOTH_QUAD_TO){var M=void 0===_.x?0:_.relative?_.x:_.x-S,N=void 0===_.y?0:_.relative?_.y:_.y-C;A=isNaN(x)?void 0===_.x1?A:_.relative?_.x:_.x1-S:x-S,R=isNaN(b)?void 0===_.y1?R:_.relative?_.y:_.y1-C:b-C;var D=void 0===_.x2?0:_.relative?_.x:_.x2-S,$=void 0===_.y2?0:_.relative?_.y:_.y2-C;P(M)<=h&&P(N)<=h&&P(A)<=h&&P(R)<=h&&P(D)<=h&&P($)<=h&&(k=!0)}return _.type&Yy.CLOSE_PATH&&P(S-w)<=h&&P(C-E)<=h&&(k=!0),k?[]:_}))},h.MATRIX=O,h.ROTATE=function(h,g,d){void 0===g&&(g=0),void 0===d&&(d=0),a(h,g,d);var x=Math.sin(h),b=Math.cos(h);return O(b,x,-x,b,g-g*b+d*x,d-g*x-d*b)},h.TRANSLATE=function(h,g){return void 0===g&&(g=0),a(h,g),O(1,0,0,1,h,g)},h.SCALE=function(h,g){return void 0===g&&(g=h),a(h,g),O(h,0,0,g,0,0)},h.SKEW_X=function(h){return a(h),O(1,0,Math.atan(h),1,0,0)},h.SKEW_Y=function(h){return a(h),O(1,Math.atan(h),0,1,0,0)},h.X_AXIS_SYMMETRY=function(h){return void 0===h&&(h=0),a(h),O(-1,0,0,1,h,0)},h.Y_AXIS_SYMMETRY=function(h){return void 0===h&&(h=0),a(h),O(1,0,0,-1,0,h)},h.A_TO_C=function(){return u((function(h,g,d){return Yy.ARC===h.type?function(h,g,d){var x,b,_,S;h.cX||o(h,g,d);for(var C=Math.min(h.phi1,h.phi2),w=Math.max(h.phi1,h.phi2)-C,E=Math.ceil(w/90),P=new Array(E),k=g,A=d,R=0;R<E;R++){var M=c$1(h.phi1,h.phi2,R/E),N=c$1(h.phi1,h.phi2,(R+1)/E),D=N-M,$=4/3*Math.tan(D*By/4),V=[Math.cos(M*By)-$*Math.sin(M*By),Math.sin(M*By)+$*Math.cos(M*By)],L=V[0],j=V[1],B=[Math.cos(N*By),Math.sin(N*By)],z=B[0],G=B[1],U=[z+$*Math.sin(N*By),G-$*Math.cos(N*By)],X=U[0],Y=U[1];P[R]={relative:h.relative,type:Yy.CURVE_TO};var W=function H(g,d){var x=i([g*h.rX,d*h.rY],h.xRot),b=x[0],_=x[1];return[h.cX+b,h.cY+_]};x=W(L,j),P[R].x1=x[0],P[R].y1=x[1],b=W(X,Y),P[R].x2=b[0],P[R].y2=b[1],_=W(z,G),P[R].x=_[0],P[R].y=_[1],h.relative&&(P[R].x1-=k,P[R].y1-=A,P[R].x2-=k,P[R].y2-=A,P[R].x-=k,P[R].y-=A),k=(S=[P[R].x,P[R].y])[0],A=S[1]}return P}(h,h.relative?0:g,h.relative?0:d):h}))},h.ANNOTATE_ARCS=function(){return u((function(h,g,d){return h.relative&&(g=0,d=0),Yy.ARC===h.type&&o(h,g,d),h}))},h.CLONE=function T(){return function(h){var g={};for(var d in h)g[d]=h[d];return g}},h.CALCULATE_BOUNDS=function(){var h=r(),g=n(),d=e(),x=u((function(b,_,S){var C=d(g(h(function t(h){var g={};for(var d in h)g[d]=h[d];return g}(b))));function O(h){h>x.maxX&&(x.maxX=h),h<x.minX&&(x.minX=h)}function T(h){h>x.maxY&&(x.maxY=h),h<x.minY&&(x.minY=h)}if(C.type&Yy.DRAWING_COMMANDS&&(O(_),T(S)),C.type&Yy.HORIZ_LINE_TO&&O(C.x),C.type&Yy.VERT_LINE_TO&&T(C.y),C.type&Yy.LINE_TO&&(O(C.x),T(C.y)),C.type&Yy.CURVE_TO){O(C.x),T(C.y);for(var w=0,E=p(_,C.x1,C.x2,C.x);w<E.length;w++)0<(X=E[w])&&1>X&&O(m$1(_,C.x1,C.x2,C.x,X));for(var P=0,k=p(S,C.y1,C.y2,C.y);P<k.length;P++)0<(X=k[P])&&1>X&&T(m$1(S,C.y1,C.y2,C.y,X))}if(C.type&Yy.ARC){O(C.x),T(C.y),o(C,_,S);for(var A=C.xRot/180*Math.PI,R=Math.cos(A)*C.rX,M=Math.sin(A)*C.rX,N=-Math.sin(A)*C.rY,D=Math.cos(A)*C.rY,$=C.phi1<C.phi2?[C.phi1,C.phi2]:-180>C.phi2?[C.phi2+360,C.phi1+360]:[C.phi2,C.phi1],V=$[0],L=$[1],j=function I(h){var g=h[0],d=h[1],x=180*Math.atan2(d,g)/Math.PI;return x<V?x+360:x},B=0,z=s(N,-R,0).map(j);B<z.length;B++)(X=z[B])>V&&X<L&&O(y(C.cX,R,N,X));for(var G=0,U=s(D,-M,0).map(j);G<U.length;G++){var X;(X=U[G])>V&&X<L&&T(y(C.cY,M,D,X))}}return b}));return x.minX=1/0,x.maxX=-1/0,x.minY=1/0,x.maxY=-1/0,x}}(Fy||(Fy={}));var zy,Gy=function(){function t(){}return t.prototype.round=function(h){return this.transform(Fy.ROUND(h))},t.prototype.toAbs=function(){return this.transform(Fy.TO_ABS())},t.prototype.toRel=function(){return this.transform(Fy.TO_REL())},t.prototype.normalizeHVZ=function(h,g,d){return this.transform(Fy.NORMALIZE_HVZ(h,g,d))},t.prototype.normalizeST=function(){return this.transform(Fy.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(Fy.QT_TO_C())},t.prototype.aToC=function(){return this.transform(Fy.A_TO_C())},t.prototype.sanitize=function(h){return this.transform(Fy.SANITIZE(h))},t.prototype.translate=function(h,g){return this.transform(Fy.TRANSLATE(h,g))},t.prototype.scale=function(h,g){return this.transform(Fy.SCALE(h,g))},t.prototype.rotate=function(h,g,d){return this.transform(Fy.ROTATE(h,g,d))},t.prototype.matrix=function(h,g,d,x,b,_){return this.transform(Fy.MATRIX(h,g,d,x,b,_))},t.prototype.skewX=function(h){return this.transform(Fy.SKEW_X(h))},t.prototype.skewY=function(h){return this.transform(Fy.SKEW_Y(h))},t.prototype.xSymmetry=function(h){return this.transform(Fy.X_AXIS_SYMMETRY(h))},t.prototype.ySymmetry=function(h){return this.transform(Fy.Y_AXIS_SYMMETRY(h))},t.prototype.annotateArcs=function(){return this.transform(Fy.ANNOTATE_ARCS())},t}(),Uy=function v(h){return" "===h||"\t"===h||"\r"===h||"\n"===h},Hy=function l(h){return"0".charCodeAt(0)<=h.charCodeAt(0)&&h.charCodeAt(0)<="9".charCodeAt(0)},Xy=function(h){function e(){var g=h.call(this)||this;return g.curNumber="",g.curCommandType=-1,g.curCommandRelative=!1,g.canParseCommandOrComma=!0,g.curNumberHasExp=!1,g.curNumberHasExpDigits=!1,g.curNumberHasDecimal=!1,g.curArgs=[],g}return r(e,h),e.prototype.finish=function(h){if(void 0===h&&(h=[]),this.parse(" ",h),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return h},e.prototype.parse=function(h,g){var d=this;void 0===g&&(g=[]);for(var x=function i(h){g.push(h),d.curArgs.length=0,d.canParseCommandOrComma=!0},b=0;b<h.length;b++){var _=h[b],S=!(this.curCommandType!==Yy.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),C=Hy(_)&&("0"===this.curNumber&&"0"===_||S);if(!Hy(_)||C)if("e"!==_&&"E"!==_)if("-"!==_&&"+"!==_||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==_||this.curNumberHasExp||this.curNumberHasDecimal||S){if(this.curNumber&&-1!==this.curCommandType){var w=Number(this.curNumber);if(isNaN(w))throw new SyntaxError("Invalid number ending at "+b);if(this.curCommandType===Yy.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>w)throw new SyntaxError('Expected positive number, got "'+w+'" at index "'+b+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+b+'"');this.curArgs.push(w),this.curArgs.length===Wy[this.curCommandType]&&(Yy.HORIZ_LINE_TO===this.curCommandType?x({type:Yy.HORIZ_LINE_TO,relative:this.curCommandRelative,x:w}):Yy.VERT_LINE_TO===this.curCommandType?x({type:Yy.VERT_LINE_TO,relative:this.curCommandRelative,y:w}):this.curCommandType===Yy.MOVE_TO||this.curCommandType===Yy.LINE_TO||this.curCommandType===Yy.SMOOTH_QUAD_TO?(x({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Yy.MOVE_TO===this.curCommandType&&(this.curCommandType=Yy.LINE_TO)):this.curCommandType===Yy.CURVE_TO?x({type:Yy.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Yy.SMOOTH_CURVE_TO?x({type:Yy.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Yy.QUAD_TO?x({type:Yy.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Yy.ARC&&x({type:Yy.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!Uy(_))if(","===_&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==_&&"-"!==_&&"."!==_)if(C)this.curNumber=_,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+b+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+_+'" at index '+b+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==_&&"Z"!==_)if("h"===_||"H"===_)this.curCommandType=Yy.HORIZ_LINE_TO,this.curCommandRelative="h"===_;else if("v"===_||"V"===_)this.curCommandType=Yy.VERT_LINE_TO,this.curCommandRelative="v"===_;else if("m"===_||"M"===_)this.curCommandType=Yy.MOVE_TO,this.curCommandRelative="m"===_;else if("l"===_||"L"===_)this.curCommandType=Yy.LINE_TO,this.curCommandRelative="l"===_;else if("c"===_||"C"===_)this.curCommandType=Yy.CURVE_TO,this.curCommandRelative="c"===_;else if("s"===_||"S"===_)this.curCommandType=Yy.SMOOTH_CURVE_TO,this.curCommandRelative="s"===_;else if("q"===_||"Q"===_)this.curCommandType=Yy.QUAD_TO,this.curCommandRelative="q"===_;else if("t"===_||"T"===_)this.curCommandType=Yy.SMOOTH_QUAD_TO,this.curCommandRelative="t"===_;else{if("a"!==_&&"A"!==_)throw new SyntaxError('Unexpected character "'+_+'" at index '+b+".");this.curCommandType=Yy.ARC,this.curCommandRelative="a"===_}else g.push({type:Yy.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=_,this.curNumberHasDecimal="."===_}else this.curNumber+=_,this.curNumberHasDecimal=!0;else this.curNumber+=_;else this.curNumber+=_,this.curNumberHasExp=!0;else this.curNumber+=_,this.curNumberHasExpDigits=this.curNumberHasExp}return g},e.prototype.transform=function(h){return Object.create(this,{parse:{value:function value(g,d){void 0===d&&(d=[]);for(var x=0,b=Object.getPrototypeOf(this).parse.call(this,g);x<b.length;x++){var _=b[x],S=h(_);Array.isArray(S)?d.push.apply(d,S):d.push(S)}return d}}})},e}(Gy),Yy=function(h){function i(g){var d=h.call(this)||this;return d.commands="string"==typeof g?i.parse(g):g,d}return r(i,h),i.prototype.encode=function(){return i.encode(this.commands)},i.prototype.getBounds=function(){var h=Fy.CALCULATE_BOUNDS();return this.transform(h),h},i.prototype.transform=function(h){for(var g=[],d=0,x=this.commands;d<x.length;d++){var b=h(x[d]);Array.isArray(b)?g.push.apply(g,b):g.push(b)}return this.commands=g,this},i.encode=function(h){return function e(h){var g="";Array.isArray(h)||(h=[h]);for(var d=0;d<h.length;d++){var x=h[d];if(x.type===Yy.CLOSE_PATH)g+="z";else if(x.type===Yy.HORIZ_LINE_TO)g+=(x.relative?"h":"H")+x.x;else if(x.type===Yy.VERT_LINE_TO)g+=(x.relative?"v":"V")+x.y;else if(x.type===Yy.MOVE_TO)g+=(x.relative?"m":"M")+x.x+" "+x.y;else if(x.type===Yy.LINE_TO)g+=(x.relative?"l":"L")+x.x+" "+x.y;else if(x.type===Yy.CURVE_TO)g+=(x.relative?"c":"C")+x.x1+" "+x.y1+" "+x.x2+" "+x.y2+" "+x.x+" "+x.y;else if(x.type===Yy.SMOOTH_CURVE_TO)g+=(x.relative?"s":"S")+x.x2+" "+x.y2+" "+x.x+" "+x.y;else if(x.type===Yy.QUAD_TO)g+=(x.relative?"q":"Q")+x.x1+" "+x.y1+" "+x.x+" "+x.y;else if(x.type===Yy.SMOOTH_QUAD_TO)g+=(x.relative?"t":"T")+x.x+" "+x.y;else{if(x.type!==Yy.ARC)throw new Error('Unexpected command type "'+x.type+'" at index '+d+".");g+=(x.relative?"a":"A")+x.rX+" "+x.rY+" "+x.xRot+" "+ +x.lArcFlag+" "+ +x.sweepFlag+" "+x.x+" "+x.y}}return g}(h)},i.parse=function(h){var g=new Xy,d=[];return g.parse(h,d),g.finish(d),d},i.CLOSE_PATH=1,i.MOVE_TO=2,i.HORIZ_LINE_TO=4,i.VERT_LINE_TO=8,i.LINE_TO=16,i.CURVE_TO=32,i.SMOOTH_CURVE_TO=64,i.QUAD_TO=128,i.SMOOTH_QUAD_TO=256,i.ARC=512,i.LINE_COMMANDS=i.LINE_TO|i.HORIZ_LINE_TO|i.VERT_LINE_TO,i.DRAWING_COMMANDS=i.HORIZ_LINE_TO|i.VERT_LINE_TO|i.LINE_TO|i.CURVE_TO|i.SMOOTH_CURVE_TO|i.QUAD_TO|i.SMOOTH_QUAD_TO|i.ARC,i}(Gy),Wy=((zy={})[Yy.MOVE_TO]=2,zy[Yy.LINE_TO]=2,zy[Yy.HORIZ_LINE_TO]=1,zy[Yy.VERT_LINE_TO]=1,zy[Yy.CLOSE_PATH]=0,zy[Yy.QUAD_TO]=4,zy[Yy.SMOOTH_QUAD_TO]=2,zy[Yy.CURVE_TO]=6,zy[Yy.SMOOTH_CURVE_TO]=4,zy[Yy.ARC]=7,zy),qy=Za.f;vo({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(h,g){var d=qy(co(h),g);return!(d&&!d.configurable)&&delete h[g]}});var Qy=oo.Reflect.deleteProperty,Ky=qo("Array").values,Zy=Array.prototype,Jy={DOMTokenList:!0,NodeList:!0},tv=function values_1(h){var g=h.values;return h===Zy||h instanceof Array&&g===Zy.values||Jy.hasOwnProperty(Lu(h))?Ky:g},ev=bs.trim,rv=Pa.parseInt,nv=/^[+-]?0[Xx]/,iv=8!==rv(vs+"08")||22!==rv(vs+"0x16")?function parseInt(h,g){var d=ev(String(h));return rv(d,g>>>0||(nv.test(d)?16:10))}:rv;vo({global:!0,forced:parseInt!=iv},{parseInt:iv});var av=oo.parseInt,ov=Bs,sv=Pl,uv=Fc,cv=Il,lv=Object.isExtensible,fv=fails$1((function(){lv(1)}));_export$1({target:"Object",stat:!0,forced:fv},{isExtensible:function isExtensible(h){return!!isObject$1(h)&&(!lv||lv(h))}});var hv=ya.onFreeze,pv=Object.preventExtensions,yv=fails$1((function(){pv(1)}));_export$1({target:"Object",stat:!0,forced:yv,sham:!pa},{preventExtensions:function preventExtensions(h){return pv&&isObject$1(h)?pv(hv(h)):h}});var vv=!Ra((function(){return Object.isExtensible(Object.preventExtensions({}))})),gv=createCommonjsModule((function(h){var g=fo.f,d=Oo("meta"),x=0,b=Object.isExtensible||function(){return!0},_=function setMetadata(h){g(h,d,{value:{objectID:"O"+ ++x,weakData:{}}})},S=h.exports={REQUIRED:!1,fastKey:function fastKey(h,g){if(!Ga(h))return"symbol"==_typeof$2(h)?h:("string"==typeof h?"S":"P")+h;if(!Xa(h,d)){if(!b(h))return"F";if(!g)return"E";_(h)}return h[d].objectID},getWeakData:function getWeakData(h,g){if(!Xa(h,d)){if(!b(h))return!0;if(!g)return!1;_(h)}return h[d].weakData},onFreeze:function onFreeze(h){return vv&&S.REQUIRED&&b(h)&&!Xa(h,d)&&_(h),h}};su[d]=!0})),dv=fo.f,mv=Ns.forEach,xv=cc.set,bv=cc.getterFor,_v=fo.f,Sv=gv.fastKey,Cv=cc.set,wv=cc.getterFor;!function collection(h,g,d){var x,b=-1!==h.indexOf("Map"),_=-1!==h.indexOf("Weak"),S=b?"set":"add",C=Pa[h],w=C&&C.prototype,E={};if(Ma&&"function"==typeof C&&(_||w.forEach&&!Ra((function(){(new C).entries().next()})))){x=g((function(g,d){xv(Mf(g,x,h),{type:h,collection:new C}),null!=d&&Ef(d,g[S],{that:g,AS_ENTRIES:b})}));var P=bv(h);mv(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(h){var g="add"==h||"set"==h;!(h in w)||_&&"clear"==h||ho(x.prototype,h,(function(d,x){var b=P(this).collection;if(!g&&_&&!Ga(d))return"get"==h&&void 0;var S=b[h](0===d?0:d,x);return g?this:S}))})),_||dv(x.prototype,"size",{configurable:!0,get:function get(){return P(this).collection.size}})}else x=d.getConstructor(g,h,b,S),gv.REQUIRED=!0;zu(x,h,!1,!0),E[h]=x,vo({global:!0,forced:!0},E),_||d.setStrong(x,h,b)}("Map",(function(h){return function Map(){return h(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function getConstructor(h,g,d,x){var b=h((function(h,_){Mf(h,b,g),Cv(h,{type:g,index:bu(null),first:void 0,last:void 0,size:0}),Ma||(h.size=0),null!=_&&Ef(_,h[x],{that:h,AS_ENTRIES:d})})),_=wv(g),S=function define(h,g,d){var x,b,S=_(h),w=C(h,g);return w?w.value=d:(S.last=w={index:b=Sv(g,!0),key:g,value:d,previous:x=S.last,next:void 0,removed:!1},S.first||(S.first=w),x&&(x.next=w),Ma?S.size++:h.size++,"F"!==b&&(S.index[b]=w)),h},C=function getEntry(h,g){var d,x=_(h),b=Sv(g);if("F"!==b)return x.index[b];for(d=x.first;d;d=d.next)if(d.key==g)return d};return kf(b.prototype,{clear:function clear(){for(var h=_(this),g=h.index,d=h.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete g[d.index],d=d.next;h.first=h.last=void 0,Ma?h.size=0:this.size=0},delete:function _delete(h){var g=this,d=_(g),x=C(g,h);if(x){var b=x.next,S=x.previous;delete d.index[x.index],x.removed=!0,S&&(S.next=b),b&&(b.previous=S),d.first==x&&(d.first=b),d.last==x&&(d.last=S),Ma?d.size--:g.size--}return!!x},forEach:function forEach(h){for(var g,d=_(this),x=uo(h,arguments.length>1?arguments[1]:void 0,3);g=g?g.next:d.first;)for(x(g.value,g.key,this);g&&g.removed;)g=g.previous},has:function has(h){return!!C(this,h)}}),kf(b.prototype,d?{get:function get(h){var g=C(this,h);return g&&g.value},set:function set(h,g){return S(this,0===h?0:h,g)}}:{add:function add(h){return S(this,h=0===h?0:h,h)}}),Ma&&_v(b.prototype,"size",{get:function get(){return _(this).size}}),b},setStrong:function setStrong(h,g,d){var x=g+" Iterator",b=wv(g),_=wv(x);ll(h,g,(function(h,g){Cv(this,{type:x,target:h,state:b(h),kind:g,last:void 0})}),(function(){for(var h=_(this),g=h.kind,d=h.last;d&&d.removed;)d=d.previous;return h.target&&(h.last=d=d?d.next:h.state.first)?"keys"==g?{value:d.key,done:!1}:"values"==g?{value:d.value,done:!1}:{value:[d.key,d.value],done:!1}:(h.target=void 0,{value:void 0,done:!0})}),d?"entries":"values",!d,!0),Rf(g)}});var Ev=oo.Map,Pv=Ao("Reflect","apply"),Ov=Function.apply,Tv=!Ra((function(){Pv((function(){}))}));vo({target:"Reflect",stat:!0,forced:Tv},{apply:function apply(h,g,d){return so(h),co(d),Pv?Pv(h,g,d):Ov.call(h,g,d)}});var kv=oo.Reflect.apply;vo({target:"Reflect",stat:!0,sham:!Xc},{getPrototypeOf:function getPrototypeOf(h){return qc(co(h))}});var Av=oo.Reflect.getPrototypeOf;function _typeof(h){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(h){return typeof h}:function _typeof(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(h)}var Rv=[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],Mv=[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(h,g,d,x,b,_){if(!(isNaN(_)||_<1)){_|=0;var S=function getImageDataFromCanvas(h,g,d,x,b){if("string"==typeof h&&(h=document.getElementById(h)),!h||"object"!==_typeof(h)||!("getContext"in h))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var _=h.getContext("2d");try{return _.getImageData(g,d,x,b)}catch(h){throw new Error("unable to access image data: "+h)}}(h,g,d,x,b);S=function processImageDataRGBA(h,g,d,x,b,_){for(var S,C=h.data,w=2*_+1,E=x-1,P=b-1,k=_+1,A=k*(k+1)/2,R=new Nv,M=R,N=1;N<w;N++)M=M.next=new Nv,N===k&&(S=M);M.next=R;for(var D=null,$=null,V=0,L=0,j=Rv[_],B=Mv[_],z=0;z<b;z++){M=R;for(var G=C[L],U=C[L+1],X=C[L+2],Y=C[L+3],W=0;W<k;W++)M.r=G,M.g=U,M.b=X,M.a=Y,M=M.next;for(var q=0,Q=0,K=0,Z=0,J=k*G,tt=k*U,et=k*X,rt=k*Y,nt=A*G,it=A*U,at=A*X,ot=A*Y,st=1;st<k;st++){var ut=L+((E<st?E:st)<<2),ct=C[ut],lt=C[ut+1],ft=C[ut+2],ht=C[ut+3],pt=k-st;nt+=(M.r=ct)*pt,it+=(M.g=lt)*pt,at+=(M.b=ft)*pt,ot+=(M.a=ht)*pt,q+=ct,Q+=lt,K+=ft,Z+=ht,M=M.next}D=R,$=S;for(var yt=0;yt<x;yt++){var vt=ot*j>>B;if(C[L+3]=vt,0!==vt){var gt=255/vt;C[L]=(nt*j>>B)*gt,C[L+1]=(it*j>>B)*gt,C[L+2]=(at*j>>B)*gt}else C[L]=C[L+1]=C[L+2]=0;nt-=J,it-=tt,at-=et,ot-=rt,J-=D.r,tt-=D.g,et-=D.b,rt-=D.a;var dt=yt+_+1;dt=V+(dt<E?dt:E)<<2,nt+=q+=D.r=C[dt],it+=Q+=D.g=C[dt+1],at+=K+=D.b=C[dt+2],ot+=Z+=D.a=C[dt+3],D=D.next;var mt=$,xt=mt.r,bt=mt.g,_t=mt.b,St=mt.a;J+=xt,tt+=bt,et+=_t,rt+=St,q-=xt,Q-=bt,K-=_t,Z-=St,$=$.next,L+=4}V+=x}for(var Ct=0;Ct<x;Ct++){var wt=C[L=Ct<<2],Et=C[L+1],Pt=C[L+2],Ot=C[L+3],Tt=k*wt,kt=k*Et,At=k*Pt,Rt=k*Ot,Mt=A*wt,Nt=A*Et,It=A*Pt,Dt=A*Ot;M=R;for(var $t=0;$t<k;$t++)M.r=wt,M.g=Et,M.b=Pt,M.a=Ot,M=M.next;for(var Vt=x,Lt=0,jt=0,Ft=0,Bt=0,zt=1;zt<=_;zt++){L=Vt+Ct<<2;var Gt=k-zt;Mt+=(M.r=wt=C[L])*Gt,Nt+=(M.g=Et=C[L+1])*Gt,It+=(M.b=Pt=C[L+2])*Gt,Dt+=(M.a=Ot=C[L+3])*Gt,Bt+=wt,Lt+=Et,jt+=Pt,Ft+=Ot,M=M.next,zt<P&&(Vt+=x)}L=Ct,D=R,$=S;for(var Ut=0;Ut<b;Ut++){var Ht=L<<2;C[Ht+3]=Ot=Dt*j>>B,Ot>0?(Ot=255/Ot,C[Ht]=(Mt*j>>B)*Ot,C[Ht+1]=(Nt*j>>B)*Ot,C[Ht+2]=(It*j>>B)*Ot):C[Ht]=C[Ht+1]=C[Ht+2]=0,Mt-=Tt,Nt-=kt,It-=At,Dt-=Rt,Tt-=D.r,kt-=D.g,At-=D.b,Rt-=D.a,Ht=Ct+((Ht=Ut+k)<P?Ht:P)*x<<2,Mt+=Bt+=D.r=C[Ht],Nt+=Lt+=D.g=C[Ht+1],It+=jt+=D.b=C[Ht+2],Dt+=Ft+=D.a=C[Ht+3],D=D.next,Tt+=wt=$.r,kt+=Et=$.g,At+=Pt=$.b,Rt+=Ot=$.a,Bt-=wt,Lt-=Et,jt-=Pt,Ft-=Ot,$=$.next,L+=x}}return h}(S,0,0,x,b,_),h.getContext("2d").putImageData(S,g,d)}}var Nv=function BlurStack(){!function _classCallCheck(h,g){if(!(h instanceof g))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(h){return h.replace(/(?!\u3000)\s+/gm," ")}function toNumbers(h){var g=(h||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return Fs(g).call(g,ws)}var Iv=/^[A-Z-]+$/;function normalizeAttributeName(h){return Iv.test(h)?h.toLowerCase():h}function parseExternalUrl(h){var g=h.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return g[2]||g[3]||g[4]}var Dv=/(\[[^\]]+\])/g,$v=/(#[^\s\+>~\.\[:]+)/g,Vv=/(\.[^\s\+>~\.\[:]+)/g,Lv=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,jv=/(:[\w-]+\([^\)]*\))/gi,Fv=/(:[^\s\+>~\.\[:]+)/g,Bv=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(h,g){var d=h.match(g);return d?[h.replace(g," "),d.length]:[h,0]}var zv=1e-8;function vectorMagnitude(h){return Math.sqrt(Math.pow(h[0],2)+Math.pow(h[1],2))}function vectorsRatio(h,g){return(h[0]*g[0]+h[1]*g[1])/(vectorMagnitude(h)*vectorMagnitude(g))}function vectorsAngle(h,g){return(h[0]*g[1]<h[1]*g[0]?-1:1)*Math.acos(vectorsRatio(h,g))}function CB1(h){return h*h*h}function CB2(h){return 3*h*h*(1-h)}function CB3(h){return 3*h*(1-h)*(1-h)}function CB4(h){return(1-h)*(1-h)*(1-h)}function QB1(h){return h*h}function QB2(h){return 2*h*(1-h)}function QB3(h){return(1-h)*(1-h)}var Gv=function(){function Property(h,g,d){_classCallCheck$1(this,Property),this.document=h,this.name=g,this.value=d,this.isNormalizedColor=!1}return _createClass(Property,[{key:"split",value:function split(){var h,g,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",x=this.document,b=this.name;return Fs(h=Gp(g=compressSpaces(this.getString())).call(g).split(d)).call(h,(function(h){return new Property(x,b,h)}))}},{key:"hasValue",value:function hasValue(h){var g=this.value;return null!==g&&""!==g&&(h||0!==g)&&void 0!==g}},{key:"isString",value:function isString(h){var g=this.value,d="string"==typeof g;return d&&h?h.test(g):d}},{key:"isUrlDefinition",value:function isUrlDefinition(){return this.isString(/^url\(/)}},{key:"isPixels",value:function isPixels(){if(!this.hasValue())return!1;var h=this.getString();switch(!0){case/px$/.test(h):case/^[0-9]+$/.test(h):return!0;default:return!1}}},{key:"setValue",value:function setValue(h){return this.value=h,this}},{key:"getValue",value:function getValue(h){return void 0===h||this.hasValue()?this.value:h}},{key:"getNumber",value:function getNumber(h){if(!this.hasValue())return void 0===h?0:ws(h);var g=this.value,d=ws(g);return this.isString(/%$/)&&(d/=100),d}},{key:"getString",value:function getString(h){return void 0===h||this.hasValue()?void 0===this.value?"":String(this.value):String(h)}},{key:"getColor",value:function getColor(h){var g=this.getString(h);return this.isNormalizedColor||(this.isNormalizedColor=!0,g=function normalizeColor(h){if(!Zo(h).call(h,"rgb"))return h;var g=3;return h.replace(/\d+(\.\d+)?/g,(function(h,d){return g--&&d?String(Math.round(ws(h))):h}))}(g),this.value=g),g}},{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(h){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var d="boolean"==typeof h?[void 0,h]:[h],x=_slicedToArray(d,2),b=x[0],_=x[1],S=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(S.computeSize("x"),S.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(S.computeSize("x"),S.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*S.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*S.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(/%$/)&&_:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*S.computeSize(b);default:var C=this.getNumber();return g&&C<1?C*S.computeSize(b):C}}},{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 h=this.getString(),g=h.match(/#([^\)'"]+)/);return g&&(g=g[1]),g||(g=h),this.document.definitions[g]}},{key:"getFillStyleDefinition",value:function getFillStyleDefinition(h,g){var d=this.getDefinition();if(!d)return null;if("function"==typeof d.createGradient)return d.createGradient(this.document.ctx,h,g);if("function"==typeof d.createPattern){if(d.getHrefAttribute().hasValue()){var x=d.getAttribute("patternTransform");d=d.getHrefAttribute().getDefinition(),x.hasValue()&&d.getAttribute("patternTransform",!0).setValue(x.value)}return d.createPattern(this.document.ctx,h,g)}return null}},{key:"getTextBaseline",value:function getTextBaseline(){return this.hasValue()?Property.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function addOpacity(h){for(var g=this.getColor(),d=g.length,x=0,b=0;b<d&&(","===g[b]&&x++,3!==x);b++);if(h.hasValue()&&this.isString()&&3!==x){var _=new Wp(g);_.ok&&(_.alpha=h.getNumber(),g=_.toRGBA())}return new Property(this.document,this.name,g)}}],[{key:"empty",value:function empty(h){return new Property(h,"EMPTY","")}}]),Property}();Gv.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 Uv=function(){function ViewPort(){_classCallCheck$1(this,ViewPort),this.viewPorts=[]}return _createClass(ViewPort,[{key:"clear",value:function clear(){this.viewPorts=[]}},{key:"setCurrent",value:function setCurrent(h,g){this.viewPorts.push({width:h,height:g})}},{key:"removeCurrent",value:function removeCurrent(){this.viewPorts.pop()}},{key:"getCurrent",value:function getCurrent(){var h=this.viewPorts;return h[h.length-1]}},{key:"computeSize",value:function computeSize(h){return"number"==typeof h?h:"x"===h?this.width:"y"===h?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}(),Hv=function(){function Point(h,g){_classCallCheck$1(this,Point),this.x=h,this.y=g}return _createClass(Point,[{key:"angleTo",value:function angleTo(h){return Math.atan2(h.y-this.y,h.x-this.x)}},{key:"applyTransform",value:function applyTransform(h){var g=this.x,d=this.y,x=g*h[0]+d*h[2]+h[4],b=g*h[1]+d*h[3]+h[5];this.x=x,this.y=b}}],[{key:"parse",value:function parse(h){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=toNumbers(h),x=_slicedToArray(d,2),b=x[0],_=void 0===b?g:b,S=x[1],C=void 0===S?g:S;return new Point(_,C)}},{key:"parseScale",value:function parseScale(h){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,d=toNumbers(h),x=_slicedToArray(d,2),b=x[0],_=void 0===b?g:b,S=x[1],C=void 0===S?_:S;return new Point(_,C)}},{key:"parsePath",value:function parsePath(h){for(var g=toNumbers(h),d=g.length,x=[],b=0;b<d;b+=2)x.push(new Point(g[b],g[b+1]));return x}}]),Point}(),Xv=function(){function Mouse(h){var g,d;_classCallCheck$1(this,Mouse),this.screen=h,this.working=!1,this.events=[],this.eventElements=[],this.onClick=Tp(g=this.onClick).call(g,this),this.onMouseMove=Tp(d=this.onMouseMove).call(d,this)}return _createClass(Mouse,[{key:"isWorking",value:function isWorking(){return this.working}},{key:"start",value:function start(){if(!this.working){var h=this.screen,g=this.onClick,d=this.onMouseMove,x=h.ctx.canvas;x.onclick=g,x.onmousemove=d,this.working=!0}}},{key:"stop",value:function stop(){if(this.working){var h=this.screen.ctx.canvas;this.working=!1,h.onclick=null,h.onmousemove=null}}},{key:"hasEvents",value:function hasEvents(){return this.working&&this.events.length>0}},{key:"runEvents",value:function runEvents(){if(this.working){var h=this.screen,g=this.events,d=this.eventElements,x=h.ctx.canvas.style;x&&(x.cursor=""),uf(g).call(g,(function(h,g){for(var x=h.run,b=d[g];b;)x(b),b=b.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function checkPath(h,g){if(this.working&&g){var d=this.events,x=this.eventElements;uf(d).call(d,(function(d,b){var _=d.x,S=d.y;!x[b]&&g.isPointInPath&&g.isPointInPath(_,S)&&(x[b]=h)}))}}},{key:"checkBoundingBox",value:function checkBoundingBox(h,g){if(this.working&&g){var d=this.events,x=this.eventElements;uf(d).call(d,(function(d,b){var _=d.x,S=d.y;!x[b]&&g.isPointInBox(_,S)&&(x[b]=h)}))}}},{key:"mapXY",value:function mapXY(h,g){for(var d=this.screen,x=d.window,b=d.ctx,_=new Hv(h,g),S=b.canvas;S;)_.x-=S.offsetLeft,_.y-=S.offsetTop,S=S.offsetParent;return x.scrollX&&(_.x+=x.scrollX),x.scrollY&&(_.y+=x.scrollY),_}},{key:"onClick",value:function onClick(h){var g=this.mapXY((h||event).clientX,(h||event).clientY),d=g.x,x=g.y;this.events.push({type:"onclick",x:d,y:x,run:function run(h){h.onClick&&h.onClick()}})}},{key:"onMouseMove",value:function onMouseMove(h){var g=this.mapXY((h||event).clientX,(h||event).clientY),d=g.x,x=g.y;this.events.push({type:"onmousemove",x:d,y:x,run:function run(h){h.onMouseMove&&h.onMouseMove()}})}}]),Mouse}(),Yv="undefined"!=typeof window?window:null,Wv="undefined"!=typeof fetch?Tp(fetch).call(fetch,void 0):null,qv=function(){function Screen(h){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=g.fetch,x=void 0===d?Wv:d,b=g.window,_=void 0===b?Yv:b;_classCallCheck$1(this,Screen),this.ctx=h,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Uv,this.mouse=new Xv(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=_,this.fetch=x}return _createClass(Screen,[{key:"wait",value:function wait(h){this.waits.push(h)}},{key:"ready",value:function ready(){return this.readyPromise?this.readyPromise:_p.resolve()}},{key:"isReady",value:function isReady(){var h;if(this.isReadyLock)return!0;var g=bp(h=this.waits).call(h,(function(h){return h()}));return g&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=g,g}},{key:"setDefaults",value:function setDefaults(h){h.strokeStyle="rgba(0,0,0,0)",h.lineCap="butt",h.lineJoin="miter",h.miterLimit=4}},{key:"setViewBox",value:function setViewBox(h){var g=h.document,d=h.ctx,x=h.aspectRatio,b=h.width,_=h.desiredWidth,S=h.height,C=h.desiredHeight,w=h.minX,E=void 0===w?0:w,P=h.minY,k=void 0===P?0:P,A=h.refX,R=h.refY,M=h.clip,N=void 0!==M&&M,D=h.clipX,$=void 0===D?0:D,V=h.clipY,L=void 0===V?0:V,j=_slicedToArray(compressSpaces(x).replace(/^defer\s/,"").split(" "),2),B=j[0]||"xMidYMid",z=j[1]||"meet",G=b/_,U=S/C,X=Math.min(G,U),Y=Math.max(G,U),W=_,q=C;"meet"===z&&(W*=X,q*=X),"slice"===z&&(W*=Y,q*=Y);var Q=new Gv(g,"refX",A),K=new Gv(g,"refY",R),Z=Q.hasValue()&&K.hasValue();if(Z&&d.translate(-X*Q.getPixels("x"),-X*K.getPixels("y")),N){var J=X*$,tt=X*L;d.beginPath(),d.moveTo(J,tt),d.lineTo(b,tt),d.lineTo(b,S),d.lineTo(J,S),d.closePath(),d.clip()}if(!Z){var et="meet"===z&&X===U,rt="slice"===z&&Y===U,nt="meet"===z&&X===G,it="slice"===z&&Y===G;/^xMid/.test(B)&&(et||rt)&&d.translate(b/2-W/2,0),/YMid$/.test(B)&&(nt||it)&&d.translate(0,S/2-q/2),/^xMax/.test(B)&&(et||rt)&&d.translate(b-W,0),/YMax$/.test(B)&&(nt||it)&&d.translate(0,S-q)}switch(!0){case"none"===B:d.scale(G,U);break;case"meet"===z:d.scale(X,X);break;case"slice"===z:d.scale(Y,Y)}d.translate(-E,-k)}},{key:"start",value:function start(h){var g=this,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=d.enableRedraw,b=void 0!==x&&x,_=d.ignoreMouse,S=void 0!==_&&_,C=d.ignoreAnimation,w=void 0!==C&&C,E=d.ignoreDimensions,P=void 0!==E&&E,k=d.ignoreClear,A=void 0!==k&&k,R=d.forceRedraw,M=d.scaleWidth,N=d.scaleHeight,D=d.offsetX,$=d.offsetY,V=this.FRAMERATE,L=this.mouse,j=1e3/V;if(this.frameDuration=j,this.readyPromise=new _p((function(h){g.resolveReady=h})),this.isReady()&&this.render(h,P,A,M,N,D,$),b){var B=pp(),z=B,G=0,U=function tick(){B=pp(),(G=B-z)>=j&&(z=B-G%j,g.shouldUpdate(w,R)&&(g.render(h,P,A,M,N,D,$),L.runEvents())),g.intervalId=jp(tick)};S||L.start(),this.intervalId=jp(U)}}},{key:"stop",value:function stop(){this.intervalId&&(jp.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function shouldUpdate(h,g){if(!h){var d,x=this.frameDuration,shouldUpdate=hp(d=this.animations).call(d,(function(h,g){return g.update(x)||h}),!1);if(shouldUpdate)return!0}return!("function"!=typeof g||!g())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function render(h,g,d,x,b,_,S){var C=this.CLIENT_WIDTH,w=this.CLIENT_HEIGHT,E=this.viewPort,P=this.ctx,k=this.isFirstRender,A=P.canvas;E.clear(),A.width&&A.height?E.setCurrent(A.width,A.height):E.setCurrent(C,w);var R=h.getStyle("width"),M=h.getStyle("height");!g&&(k||"number"!=typeof x&&"number"!=typeof b)&&(R.hasValue()&&(A.width=R.getPixels("x"),A.style&&(A.style.width="".concat(A.width,"px"))),M.hasValue()&&(A.height=M.getPixels("y"),A.style&&(A.style.height="".concat(A.height,"px"))));var N=A.clientWidth||A.width,D=A.clientHeight||A.height;if(g&&R.hasValue()&&M.hasValue()&&(N=R.getPixels("x"),D=M.getPixels("y")),E.setCurrent(N,D),"number"==typeof _&&h.getAttribute("x",!0).setValue(_),"number"==typeof S&&h.getAttribute("y",!0).setValue(S),"number"==typeof x||"number"==typeof b){var $,V,L=toNumbers(h.getAttribute("viewBox").getString()),j=0,B=0;if("number"==typeof x){var z=h.getStyle("width");z.hasValue()?j=z.getPixels("x")/x:isNaN(L[2])||(j=L[2]/x)}if("number"==typeof b){var G=h.getStyle("height");G.hasValue()?B=G.getPixels("y")/b:isNaN(L[3])||(B=L[3]/b)}j||(j=B),B||(B=j),h.getAttribute("width",!0).setValue(x),h.getAttribute("height",!0).setValue(b);var U=h.getStyle("transform",!0,!0);U.setValue(ip($=ip(V="".concat(U.getString()," scale(")).call(V,1/j,", ")).call($,1/B,")"))}d||P.clearRect(0,0,N,D),h.render(P),k&&(this.isFirstRender=!1)}}]),Screen}();qv.defaultWindow=Yv,qv.defaultFetch=Wv;var Qv=qv.defaultFetch,Kv="undefined"!=typeof DOMParser?DOMParser:null,Zv=function(){function Parser(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=h.fetch,d=void 0===g?Qv:g,x=h.DOMParser,b=void 0===x?Kv:x;_classCallCheck$1(this,Parser),this.fetch=d,this.DOMParser=b}var h,g;return _createClass(Parser,[{key:"parse",value:(g=_asyncToGenerator(Cf.mark((function _callee(h){return Cf.wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:if(!/^</.test(h)){g.next=2;break}return g.abrupt("return",this.parseFromString(h));case 2:return g.abrupt("return",this.load(h));case 3:case"end":return g.stop()}}),_callee,this)}))),function parse(h){return g.apply(this,arguments)})},{key:"parseFromString",value:function parseFromString(h){var g=new this.DOMParser;try{return this.checkDocument(g.parseFromString(h,"image/svg+xml"))}catch(d){return this.checkDocument(g.parseFromString(h,"text/xml"))}}},{key:"checkDocument",value:function checkDocument(h){var g=h.getElementsByTagName("parsererror")[0];if(g)throw new Error(g.textContent);return h}},{key:"load",value:(h=_asyncToGenerator(Cf.mark((function _callee2(h){var g,d;return Cf.wrap((function _callee2$(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this.fetch(h);case 2:return g=x.sent,x.next=5,g.text();case 5:return d=x.sent,x.abrupt("return",this.parseFromString(d));case 7:case"end":return x.stop()}}),_callee2,this)}))),function load(g){return h.apply(this,arguments)})}]),Parser}(),Jv=function(){function Translate(h,g){_classCallCheck$1(this,Translate),this.type="translate",this.point=null,this.point=Hv.parse(g)}return _createClass(Translate,[{key:"apply",value:function apply(h){var g=this.point,d=g.x,x=g.y;h.translate(d||0,x||0)}},{key:"unapply",value:function unapply(h){var g=this.point,d=g.x,x=g.y;h.translate(-1*d||0,-1*x||0)}},{key:"applyToPoint",value:function applyToPoint(h){var g=this.point,d=g.x,x=g.y;h.applyTransform([1,0,0,1,d||0,x||0])}}]),Translate}(),tg=function(){function Rotate(h,g,d){_classCallCheck$1(this,Rotate),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var x=toNumbers(g);this.angle=new Gv(h,"angle",x[0]),this.originX=d[0],this.originY=d[1],this.cx=x[1]||0,this.cy=x[2]||0}return _createClass(Rotate,[{key:"apply",value:function apply(h){var g=this.cx,d=this.cy,x=this.originX,b=this.originY,_=this.angle,S=g+x.getPixels("x"),C=d+b.getPixels("y");h.translate(S,C),h.rotate(_.getRadians()),h.translate(-S,-C)}},{key:"unapply",value:function unapply(h){var g=this.cx,d=this.cy,x=this.angle;h.translate(g,d),h.rotate(-1*x.getRadians()),h.translate(-g,-d)}},{key:"applyToPoint",value:function applyToPoint(h){var g=this.cx,d=this.cy,x=this.angle.getRadians();h.applyTransform([1,0,0,1,g||0,d||0]),h.applyTransform([Math.cos(x),Math.sin(x),-Math.sin(x),Math.cos(x),0,0]),h.applyTransform([1,0,0,1,-g||0,-d||0])}}]),Rotate}(),eg=function(){function Scale(h,g){_classCallCheck$1(this,Scale),this.type="scale",this.scale=null;var d=Hv.parseScale(g);0!==d.x&&0!==d.y||(d.x=zv,d.y=zv),this.scale=d}return _createClass(Scale,[{key:"apply",value:function apply(h){var g=this.scale,d=g.x,x=g.y;h.scale(d,x||d)}},{key:"unapply",value:function unapply(h){var g=this.scale,d=g.x,x=g.y;h.scale(1/d,1/x||d)}},{key:"applyToPoint",value:function applyToPoint(h){var g=this.scale,d=g.x,x=g.y;h.applyTransform([d||0,0,0,x||0,0,0])}}]),Scale}(),rg=function(){function Matrix(h,g){_classCallCheck$1(this,Matrix),this.type="matrix",this.matrix=[],this.matrix=toNumbers(g)}return _createClass(Matrix,[{key:"apply",value:function apply(h){var g=this.matrix;h.transform(g[0],g[1],g[2],g[3],g[4],g[5])}},{key:"unapply",value:function unapply(h){var g=this.matrix,d=g[0],x=g[2],b=g[4],_=g[1],S=g[3],C=g[5],w=1/(d*(1*S-0*C)-x*(1*_-0*C)+b*(0*_-0*S));h.transform(w*(1*S-0*C),w*(0*C-1*_),w*(0*b-1*x),w*(1*d-0*b),w*(x*C-b*S),w*(b*_-d*C))}},{key:"applyToPoint",value:function applyToPoint(h){h.applyTransform(this.matrix)}}]),Matrix}();function _createSuper(h){var g=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ng=function(h){_inherits(Skew,h);var g=_createSuper(Skew);function Skew(h,d){var x;return _classCallCheck$1(this,Skew),(x=g.call(this,h,d)).type="skew",x.angle=null,x.angle=new Gv(h,"angle",d),x}return Skew}(rg);function _createSuper$1(h){var g=function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ig=function(h){_inherits(SkewX,h);var g=_createSuper$1(SkewX);function SkewX(h,d){var x;return _classCallCheck$1(this,SkewX),(x=g.call(this,h,d)).type="skewX",x.matrix=[1,0,Math.tan(x.angle.getRadians()),1,0,0],x}return SkewX}(ng);function _createSuper$2(h){var g=function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ag=function(h){_inherits(SkewY,h);var g=_createSuper$2(SkewY);function SkewY(h,d){var x;return _classCallCheck$1(this,SkewY),(x=g.call(this,h,d)).type="skewY",x.matrix=[1,Math.tan(x.angle.getRadians()),0,1,0,0],x}return SkewY}(ng);var og=function(){function Transform(h,g,d){var x=this;_classCallCheck$1(this,Transform),this.document=h,this.transforms=[];var b=function parseTransforms(h){var g;return Gp(g=compressSpaces(h)).call(g).replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(g);uf(b).call(b,(function(h){if("none"!==h){var g=function parseTransform(h){var g=_slicedToArray(h.split("("),2),d=g[0],x=g[1];return[Gp(d).call(d),Gp(x).call(x).replace(")","")]}(h),b=_slicedToArray(g,2),_=b[0],S=b[1],C=Transform.transformTypes[_];void 0!==C&&x.transforms.push(new C(x.document,S,d))}}))}return _createClass(Transform,[{key:"apply",value:function apply(h){for(var g=this.transforms,d=g.length,x=0;x<d;x++)g[x].apply(h)}},{key:"unapply",value:function unapply(h){for(var g=this.transforms,d=g.length-1;d>=0;d--)g[d].unapply(h)}},{key:"applyToPoint",value:function applyToPoint(h){for(var g=this.transforms,d=g.length,x=0;x<d;x++)g[x].applyToPoint(h)}}],[{key:"fromElement",value:function fromElement(h,g){var d=g.getStyle("transform",!1,!0),x=_slicedToArray(g.getStyle("transform-origin",!1,!0).split(),2),b=x[0],_=x[1],S=[b,void 0===_?b:_];return d.hasValue()?new Transform(h,d.getString(),S):null}}]),Transform}();og.transformTypes={translate:Jv,rotate:tg,scale:eg,matrix:rg,skewX:ig,skewY:ag};var sg=function(){function Element(h,g){var d,x,b=this,_=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(_classCallCheck$1(this,Element),this.document=h,this.node=g,this.captureTextNodes=_,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],g&&1===g.nodeType){if(uf(d=by(g.attributes)).call(d,(function(g){var d=normalizeAttributeName(g.nodeName);b.attributes[d]=new Gv(h,d,g.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var S,C=Fs(S=this.getAttribute("style").getString().split(";")).call(S,(function(h){return Gp(h).call(h)}));uf(C).call(C,(function(g){var d;if(g){var x=_slicedToArray(Fs(d=g.split(":")).call(d,(function(h){return Gp(h).call(h)})),2),_=x[0],S=x[1];b.styles[_]=new Gv(h,_,S)}}))}var w=h.definitions,E=this.getAttribute("id");E.hasValue()&&(w[E.getValue()]||(w[E.getValue()]=this)),uf(x=by(g.childNodes)).call(x,(function(g){if(1===g.nodeType)b.addChild(g);else if(_&&(3===g.nodeType||4===g.nodeType)){var d=h.createTextNode(g);d.getText().length>0&&b.addChild(d)}}))}}return _createClass(Element,[{key:"getAttribute",value:function getAttribute(h){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],d=this.attributes[h];if(!d&&g){var x=new Gv(this.document,h,"");return this.attributes[h]=x,x}return d||Gv.empty(this.document)}},{key:"getHrefAttribute",value:function getHrefAttribute(){for(var h in this.attributes)if("href"===h||/:href$/.test(h))return this.attributes[h];return Gv.empty(this.document)}},{key:"getStyle",value:function getStyle(h){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],d=arguments.length>2&&void 0!==arguments[2]&&arguments[2],x=this.styles[h];if(x)return x;var b=this.getAttribute(h);if(b&&b.hasValue())return this.styles[h]=b,b;if(!d){var _=this.parent;if(_){var S=_.getStyle(h);if(S&&S.hasValue())return S}}if(g){var C=new Gv(this.document,h,"");return this.styles[h]=C,C}return x||Gv.empty(this.document)}},{key:"render",value:function render(h){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(h.save(),this.getStyle("mask").hasValue()){var g=this.getStyle("mask").getDefinition();g&&(this.applyEffects(h),g.apply(h,this))}else if("none"!==this.getStyle("filter").getValue("none")){var d=this.getStyle("filter").getDefinition();d&&(this.applyEffects(h),d.apply(h,this))}else this.setContext(h),this.renderChildren(h),this.clearContext(h);h.restore()}}},{key:"setContext",value:function setContext(h){}},{key:"applyEffects",value:function applyEffects(h){var g=og.fromElement(this.document,this);g&&g.apply(h);var d=this.getStyle("clip-path",!1,!0);if(d.hasValue()){var x=d.getDefinition();x&&x.apply(h)}}},{key:"clearContext",value:function clearContext(h){}},{key:"renderChildren",value:function renderChildren(h){var g;uf(g=this.children).call(g,(function(g){g.render(h)}))}},{key:"addChild",value:function addChild(h){var g,d=h instanceof Element?h:this.document.createElement(h);d.parent=this,xy(g=Element.ignoreChildTypes).call(g,d.type)||this.children.push(d)}},{key:"matchesSelector",value:function matchesSelector(h){var g,d=this.node;if("function"==typeof d.matches)return d.matches(h);var x=d.getAttribute("class");return!(!x||""===x)&&hy(g=x.split(" ")).call(g,(function(g){if(".".concat(g)===h)return!0}))}},{key:"addStylesFromStyleDefinition",value:function addStylesFromStyleDefinition(){var h=this.document,g=h.styles,d=h.stylesSpecificity;for(var x in g)if("@"!==x[0]&&this.matchesSelector(x)){var b=g[x],_=d[x];if(b)for(var S in b){var C=this.stylesSpecificity[S];void 0===C&&(C="000"),_>=C&&(this.styles[S]=b[S],this.stylesSpecificity[S]=_)}}}},{key:"removeStyles",value:function removeStyles(h,g){return hp(g).call(g,(function(g,d){var x,b=h.getStyle(d);if(!b.hasValue())return g;var _=b.getString();return b.setValue(""),ip(x=[]).call(x,_toConsumableArray(g),[[d,_]])}),[])}},{key:"restoreStyles",value:function restoreStyles(h,g){uf(g).call(g,(function(g){var d=_slicedToArray(g,2),x=d[0],b=d[1];h.getStyle(x,!0).setValue(b)}))}}]),Element}();function _createSuper$3(h){var g=function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}sg.ignoreChildTypes=["title"];var ug=function(h){_inherits(UnknownElement,h);var g=_createSuper$3(UnknownElement);function UnknownElement(h,d,x){return _classCallCheck$1(this,UnknownElement),g.call(this,h,d,x)}return UnknownElement}(sg);function wrapFontFamily(h){var g=Gp(h).call(h);return/^('|")/.test(g)?g:'"'.concat(g,'"')}function prepareFontStyle(h){if(!h)return"";var g=Gp(h).call(h).toLowerCase();switch(g){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return g;default:return/^oblique\s+(-|)\d+deg$/.test(g)?g:""}}function prepareFontWeight(h){if(!h)return"";var g=Gp(h).call(h).toLowerCase();switch(g){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return g;default:return/^[\d.]+$/.test(g)?g:""}}var cg=function(){function Font(h,g,d,x,b,_){_classCallCheck$1(this,Font);var S=_?"string"==typeof _?Font.parse(_):_:{};this.fontFamily=b||S.fontFamily,this.fontSize=x||S.fontSize,this.fontStyle=h||S.fontStyle,this.fontWeight=d||S.fontWeight,this.fontVariant=g||S.fontVariant}return _createClass(Font,[{key:"toString",value:function toString(){var h,d,x;return Gp(h=[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(d=this.fontFamily,void 0===g?d:Fs(x=Gp(d).call(d).split(",")).call(x,wrapFontFamily).join(","))].join(" ")).call(h)}}],[{key:"parse",value:function parse(){var h,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",d=arguments.length>1?arguments[1]:void 0,x="",b="",_="",S="",C="",w=Gp(h=compressSpaces(g)).call(h).split(" "),E={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return uf(w).call(w,(function(h){var g,d,w;switch(!0){case!E.fontStyle&&xy(g=Font.styles).call(g,h):"inherit"!==h&&(x=h),E.fontStyle=!0;break;case!E.fontVariant&&xy(d=Font.variants).call(d,h):"inherit"!==h&&(b=h),E.fontStyle=!0,E.fontVariant=!0;break;case!E.fontWeight&&xy(w=Font.weights).call(w,h):"inherit"!==h&&(_=h),E.fontStyle=!0,E.fontVariant=!0,E.fontWeight=!0;break;case!E.fontSize:if("inherit"!==h){var P=_slicedToArray(h.split("/"),1);S=P[0]}E.fontStyle=!0,E.fontVariant=!0,E.fontWeight=!0,E.fontSize=!0;break;default:"inherit"!==h&&(C+=h)}})),new Font(x,b,_,S,C,d)}}]),Font}();cg.styles="normal|italic|oblique|inherit",cg.variants="normal|small-caps|inherit",cg.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var lg=function(){function BoundingBox(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;_classCallCheck$1(this,BoundingBox),this.x1=h,this.y1=g,this.x2=d,this.y2=x,this.addPoint(h,g),this.addPoint(d,x)}return _createClass(BoundingBox,[{key:"addPoint",value:function addPoint(h,g){void 0!==h&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=h,this.x2=h),h<this.x1&&(this.x1=h),h>this.x2&&(this.x2=h)),void 0!==g&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=g,this.y2=g),g<this.y1&&(this.y1=g),g>this.y2&&(this.y2=g))}},{key:"addX",value:function addX(h){this.addPoint(h,null)}},{key:"addY",value:function addY(h){this.addPoint(null,h)}},{key:"addBoundingBox",value:function addBoundingBox(h){if(h){var g=h.x1,d=h.y1,x=h.x2,b=h.y2;this.addPoint(g,d),this.addPoint(x,b)}}},{key:"sumCubic",value:function sumCubic(h,g,d,x,b){return Math.pow(1-h,3)*g+3*Math.pow(1-h,2)*h*d+3*(1-h)*Math.pow(h,2)*x+Math.pow(h,3)*b}},{key:"bezierCurveAdd",value:function bezierCurveAdd(h,g,d,x,b){var _=6*g-12*d+6*x,S=-3*g+9*d-9*x+3*b,C=3*d-3*g;if(0!==S){var w=Math.pow(_,2)-4*C*S;if(!(w<0)){var E=(-_+Math.sqrt(w))/(2*S);0<E&&E<1&&(h?this.addX(this.sumCubic(E,g,d,x,b)):this.addY(this.sumCubic(E,g,d,x,b)));var P=(-_-Math.sqrt(w))/(2*S);0<P&&P<1&&(h?this.addX(this.sumCubic(P,g,d,x,b)):this.addY(this.sumCubic(P,g,d,x,b)))}}else{if(0===_)return;var k=-C/_;0<k&&k<1&&(h?this.addX(this.sumCubic(k,g,d,x,b)):this.addY(this.sumCubic(k,g,d,x,b)))}}},{key:"addBezierCurve",value:function addBezierCurve(h,g,d,x,b,_,S,C){this.addPoint(h,g),this.addPoint(S,C),this.bezierCurveAdd(!0,h,d,b,S),this.bezierCurveAdd(!1,g,x,_,C)}},{key:"addQuadraticCurve",value:function addQuadraticCurve(h,g,d,x,b,_){var S=h+2/3*(d-h),C=g+2/3*(x-g),w=S+1/3*(b-h),E=C+1/3*(_-g);this.addBezierCurve(h,g,S,w,C,E,b,_)}},{key:"isPointInBox",value:function isPointInBox(h,g){var d=this.x1,x=this.y1,b=this.x2,_=this.y2;return d<=h&&h<=b&&x<=g&&g<=_}},{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 _createSuper$4(h){var g=function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var fg=function(h){_inherits(RenderedElement,h);var g=_createSuper$4(RenderedElement);function RenderedElement(){var h;return _classCallCheck$1(this,RenderedElement),(h=g.apply(this,arguments)).modifiedEmSizeStack=!1,h}return _createClass(RenderedElement,[{key:"calculateOpacity",value:function calculateOpacity(){for(var h=1,g=this;g;){var d=g.getStyle("opacity",!1,!0);d.hasValue(!0)&&(h*=d.getNumber()),g=g.parent}return h}},{key:"setContext",value:function setContext(h){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!g){var d=this.getStyle("fill"),x=this.getStyle("fill-opacity"),b=this.getStyle("stroke"),_=this.getStyle("stroke-opacity");if(d.isUrlDefinition()){var S=d.getFillStyleDefinition(this,x);S&&(h.fillStyle=S)}else if(d.hasValue()){"currentColor"===d.getString()&&d.setValue(this.getStyle("color").getColor());var C=d.getColor();"inherit"!==C&&(h.fillStyle="none"===C?"rgba(0,0,0,0)":C)}if(x.hasValue()){var w=new Gv(this.document,"fill",h.fillStyle).addOpacity(x).getColor();h.fillStyle=w}if(b.isUrlDefinition()){var E=b.getFillStyleDefinition(this,_);E&&(h.strokeStyle=E)}else if(b.hasValue()){"currentColor"===b.getString()&&b.setValue(this.getStyle("color").getColor());var P=b.getString();"inherit"!==P&&(h.strokeStyle="none"===P?"rgba(0,0,0,0)":P)}if(_.hasValue()){var k=new Gv(this.document,"stroke",h.strokeStyle).addOpacity(_).getString();h.strokeStyle=k}var A=this.getStyle("stroke-width");if(A.hasValue()){var R=A.getPixels();h.lineWidth=R||zv}var M=this.getStyle("stroke-linecap"),N=this.getStyle("stroke-linejoin"),D=this.getStyle("stroke-miterlimit"),$=this.getStyle("paint-order"),V=this.getStyle("stroke-dasharray"),L=this.getStyle("stroke-dashoffset");if(M.hasValue()&&(h.lineCap=M.getString()),N.hasValue()&&(h.lineJoin=N.getString()),D.hasValue()&&(h.miterLimit=D.getNumber()),$.hasValue()&&(h.paintOrder=$.getValue()),V.hasValue()&&"none"!==V.getString()){var j=toNumbers(V.getString());void 0!==h.setLineDash?h.setLineDash(j):void 0!==h.webkitLineDash?h.webkitLineDash=j:void 0===h.mozDash||1===j.length&&0===j[0]||(h.mozDash=j);var B=L.getPixels();void 0!==h.lineDashOffset?h.lineDashOffset=B:void 0!==h.webkitLineDashOffset?h.webkitLineDashOffset=B:void 0!==h.mozDashOffset&&(h.mozDashOffset=B)}}if(this.modifiedEmSizeStack=!1,void 0!==h.font){var z=this.getStyle("font"),G=this.getStyle("font-style"),U=this.getStyle("font-variant"),X=this.getStyle("font-weight"),Y=this.getStyle("font-size"),W=this.getStyle("font-family"),q=new cg(G.getString(),U.getString(),X.getString(),Y.hasValue()?"".concat(Y.getPixels(!0),"px"):"",W.getString(),cg.parse(z.getString(),h.font));G.setValue(q.fontStyle),U.setValue(q.fontVariant),X.setValue(q.fontWeight),Y.setValue(q.fontSize),W.setValue(q.fontFamily),h.font=q.toString(),Y.isPixels()&&(this.document.emSize=Y.getPixels(),this.modifiedEmSizeStack=!0)}g||(this.applyEffects(h),h.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function clearContext(h){_get(_getPrototypeOf(RenderedElement.prototype),"clearContext",this).call(this,h),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),RenderedElement}(sg);function _createSuper$5(h){var g=function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var hg=function(h){_inherits(TextElement,h);var g=_createSuper$5(TextElement);function TextElement(h,d,x){var b;return _classCallCheck$1(this,TextElement),(b=g.call(this,h,d,(this instanceof TextElement?this.constructor:void 0)===TextElement||x)).type="text",b.x=0,b.y=0,b.measureCache=-1,b}return _createClass(TextElement,[{key:"setContext",value:function setContext(h){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_get(_getPrototypeOf(TextElement.prototype),"setContext",this).call(this,h,g);var d=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();d&&(h.textBaseline=d)}},{key:"initializeCoordinates",value:function initializeCoordinates(h){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var g=this.getAttribute("dx"),d=this.getAttribute("dy");g.hasValue()&&(this.x+=g.getPixels("x")),d.hasValue()&&(this.y+=d.getPixels("y")),this.x+=this.getAnchorDelta(h,this,0)}},{key:"getBoundingBox",value:function getBoundingBox(h){var g,d=this;if("text"!==this.type)return this.getTElementBoundingBox(h);this.initializeCoordinates(h);var x=null;return uf(g=this.children).call(g,(function(g,b){var _=d.getChildBoundingBox(h,d,d,b);x?x.addBoundingBox(_):x=_})),x}},{key:"getFontSize",value:function getFontSize(){var h=this.document,g=this.parent,d=cg.parse(h.ctx.font).fontSize;return g.getStyle("font-size").getNumber(d)}},{key:"getTElementBoundingBox",value:function getTElementBoundingBox(h){var g=this.getFontSize();return new lg(this.x,this.y-g,this.x+this.measureText(h),this.y)}},{key:"getGlyph",value:function getGlyph(h,g,d){var x=g[d],b=null;if(h.isArabic){var _=g.length,S=g[d-1],C=g[d+1],w="isolated";(0===d||" "===S)&&d<_-2&&" "!==C&&(w="terminal"),d>0&&" "!==S&&d<_-2&&" "!==C&&(w="medial"),d>0&&" "!==S&&(d===_-1||" "===C)&&(w="initial"),void 0!==h.glyphs[x]&&((b=h.glyphs[x][w])||"glyph"!==h.glyphs[x].type||(b=h.glyphs[x]))}else b=h.glyphs[x];return b||(b=h.missingGlyph),b}},{key:"getText",value:function getText(){return""}},{key:"getTextFromNode",value:function getTextFromNode(h){var g=h||this.node,d=by(g.parentNode.childNodes),x=My(d).call(d,g),b=d.length-1,_=compressSpaces(g.value||g.text||g.textContent||"");return 0===x&&(_=function trimLeft(h){return h.replace(/^[\n \t]+/,"")}(_)),x===b&&(_=function trimRight(h){return h.replace(/[\n \t]+$/,"")}(_)),_}},{key:"renderChildren",value:function renderChildren(h){var g,d=this;if("text"===this.type){this.initializeCoordinates(h),uf(g=this.children).call(g,(function(g,x){d.renderChild(h,d,d,x)}));var x=this.document.screen.mouse;x.isWorking()&&x.checkBoundingBox(this,this.getBoundingBox(h))}else this.renderTElementChildren(h)}},{key:"renderTElementChildren",value:function renderTElementChildren(h){var g=this.document,d=this.parent,x=this.getText(),b=d.getStyle("font-family").getDefinition();if(b)for(var _,S=b.fontFace.unitsPerEm,C=cg.parse(g.ctx.font),w=d.getStyle("font-size").getNumber(C.fontSize),E=d.getStyle("font-style").getString(C.fontStyle),P=w/S,k=b.isRTL?Ey(_=x.split("")).call(_).join(""):x,A=toNumbers(d.getAttribute("dx").getString()),R=k.length,M=0;M<R;M++){var N=this.getGlyph(b,k,M);h.translate(this.x,this.y),h.scale(P,-P);var D=h.lineWidth;h.lineWidth=h.lineWidth*S/w,"italic"===E&&h.transform(1,0,.4,1,0,0),N.render(h),"italic"===E&&h.transform(1,0,-.4,1,0,0),h.lineWidth=D,h.scale(1/P,-1/P),h.translate(-this.x,-this.y),this.x+=w*(N.horizAdvX||b.horizAdvX)/S,void 0===A[M]||isNaN(A[M])||(this.x+=A[M])}else{var $=this.x,V=this.y;"stroke"===h.paintOrder?(h.strokeStyle&&h.strokeText(x,$,V),h.fillStyle&&h.fillText(x,$,V)):(h.fillStyle&&h.fillText(x,$,V),h.strokeStyle&&h.strokeText(x,$,V))}}},{key:"getAnchorDelta",value:function getAnchorDelta(h,g,d){var x=this.getStyle("text-anchor").getString("start");if("start"!==x){for(var b=g.children,_=b.length,S=null,C=0,w=d;w<_&&(S=b[w],!(w>d&&S.getAttribute("x").hasValue()||S.getAttribute("text-anchor").hasValue()));w++)C+=S.measureTextRecursive(h);return-1*("end"===x?C:C/2)}return 0}},{key:"adjustChildCoordinates",value:function adjustChildCoordinates(h,g,d,x){var b=d.children[x];if("function"!=typeof b.measureText)return b;h.save(),b.setContext(h,!0);var _=b.getAttribute("x"),S=b.getAttribute("y"),C=b.getAttribute("dx"),w=b.getAttribute("dy"),E=b.getAttribute("text-anchor").getString("start");if(0===x&&"textNode"!==b.type&&(_.hasValue()||_.setValue(g.getAttribute("x").getValue("0")),S.hasValue()||S.setValue(g.getAttribute("y").getValue("0")),C.hasValue()||C.setValue(g.getAttribute("dx").getValue("0")),w.hasValue()||w.setValue(g.getAttribute("dy").getValue("0"))),_.hasValue()){if(b.x=_.getPixels("x")+g.getAnchorDelta(h,d,x),"start"!==E){var P=b.measureTextRecursive(h);b.x+=-1*("end"===E?P:P/2)}C.hasValue()&&(b.x+=C.getPixels("x"))}else{if("start"!==E){var k=b.measureTextRecursive(h);g.x+=-1*("end"===E?k:k/2)}C.hasValue()&&(g.x+=C.getPixels("x")),b.x=g.x}return g.x=b.x+b.measureText(h),S.hasValue()?(b.y=S.getPixels("y"),w.hasValue()&&(b.y+=w.getPixels("y"))):(w.hasValue()&&(g.y+=w.getPixels("y")),b.y=g.y),g.y=b.y,b.clearContext(h),h.restore(),b}},{key:"getChildBoundingBox",value:function getChildBoundingBox(h,g,d,x){var b,_=this.adjustChildCoordinates(h,g,d,x);if("function"!=typeof _.getBoundingBox)return null;var S=_.getBoundingBox(h);return S?(uf(b=_.children).call(b,(function(d,x){var b=g.getChildBoundingBox(h,g,_,x);S.addBoundingBox(b)})),S):null}},{key:"renderChild",value:function renderChild(h,g,d,x){var b,_=this.adjustChildCoordinates(h,g,d,x);_.render(h),uf(b=_.children).call(b,(function(d,x){g.renderChild(h,g,_,x)}))}},{key:"measureTextRecursive",value:function measureTextRecursive(h){var g;return hp(g=this.children).call(g,(function(g,d){return g+d.measureTextRecursive(h)}),this.measureText(h))}},{key:"measureText",value:function measureText(h){var g=this.measureCache;if(~g)return g;var d=this.getText(),x=this.measureTargetText(h,d);return this.measureCache=x,x}},{key:"measureTargetText",value:function measureTargetText(h,g){if(!g.length)return 0;var d=this.parent,x=d.getStyle("font-family").getDefinition();if(x){for(var b,_=this.getFontSize(),S=x.isRTL?Ey(b=g.split("")).call(b).join(""):g,C=toNumbers(d.getAttribute("dx").getString()),w=S.length,E=0,P=0;P<w;P++){E+=(this.getGlyph(x,S,P).horizAdvX||x.horizAdvX)*_/x.fontFace.unitsPerEm,void 0===C[P]||isNaN(C[P])||(E+=C[P])}return E}if(!h.measureText)return 10*g.length;h.save(),this.setContext(h,!0);var k=h.measureText(g).width;return this.clearContext(h),h.restore(),k}}]),TextElement}(fg);function _createSuper$6(h){var g=function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var pg=function(h){_inherits(TSpanElement,h);var g=_createSuper$6(TSpanElement);function TSpanElement(h,d,x){var b;return _classCallCheck$1(this,TSpanElement),(b=g.call(this,h,d,(this instanceof TSpanElement?this.constructor:void 0)===TSpanElement||x)).type="tspan",b.text=b.children.length>0?"":b.getTextFromNode(),b}return _createClass(TSpanElement,[{key:"getText",value:function getText(){return this.text}}]),TSpanElement}(hg);function _createSuper$7(h){var g=function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var yg=function(h){_inherits(TextNode,h);var g=_createSuper$7(TextNode);function TextNode(){var h;return _classCallCheck$1(this,TextNode),(h=g.apply(this,arguments)).type="textNode",h}return TextNode}(pg);function _createSuper$8(h){var g=function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var vg=function(h){_inherits(PathParser,h);var g=_createSuper$8(PathParser);function PathParser(h){var d;return _classCallCheck$1(this,PathParser),(d=g.call(this,h.replace(/[+-.]\s+/g,"-").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""))).control=null,d.start=null,d.current=null,d.command=null,d.commands=d.commands,d.i=-1,d.previousCommand=null,d.points=[],d.angles=[],d}return _createClass(PathParser,[{key:"reset",value:function reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Hv(0,0),this.control=new Hv(0,0),this.current=new Hv(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function isEnd(){return this.i>=this.commands.length-1}},{key:"next",value:function next(){var h=this.commands[++this.i];return this.previousCommand=this.command,this.command=h,h}},{key:"getPoint",value:function getPoint(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",d=new Hv(this.command[h],this.command[g]);return this.makeAbsolute(d)}},{key:"getAsControlPoint",value:function getAsControlPoint(h,g){var d=this.getPoint(h,g);return this.control=d,d}},{key:"getAsCurrentPoint",value:function getAsCurrentPoint(h,g){var d=this.getPoint(h,g);return this.current=d,d}},{key:"getReflectedControlPoint",value:function getReflectedControlPoint(){var h=this.previousCommand.type;if(h!==Yy.CURVE_TO&&h!==Yy.SMOOTH_CURVE_TO&&h!==Yy.QUAD_TO&&h!==Yy.SMOOTH_QUAD_TO)return this.current;var g=this.current,d=g.x,x=g.y,b=this.control,_=b.x,S=b.y;return new Hv(2*d-_,2*x-S)}},{key:"makeAbsolute",value:function makeAbsolute(h){if(this.command.relative){var g=this.current,d=g.x,x=g.y;h.x+=d,h.y+=x}return h}},{key:"addMarker",value:function addMarker(h,g,d){var x=this.points,b=this.angles;d&&b.length>0&&!b[b.length-1]&&(b[b.length-1]=x[x.length-1].angleTo(d)),this.addMarkerAngle(h,g?g.angleTo(h):null)}},{key:"addMarkerAngle",value:function addMarkerAngle(h,g){this.points.push(h),this.angles.push(g)}},{key:"getMarkerPoints",value:function getMarkerPoints(){return this.points}},{key:"getMarkerAngles",value:function getMarkerAngles(){for(var h=this.angles,g=h.length,d=0;d<g;d++)if(!h[d])for(var x=d+1;x<g;x++)if(h[x]){h[d]=h[x];break}return h}}]),PathParser}(Yy);function _createSuper$9(h){var g=function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var gg=function(h){_inherits(PathElement,h);var g=_createSuper$9(PathElement);function PathElement(h,d,x){var b;return _classCallCheck$1(this,PathElement),(b=g.call(this,h,d,x)).type="path",b.pathParser=null,b.pathParser=new vg(b.getAttribute("d").getString()),b}return _createClass(PathElement,[{key:"path",value:function path(h){var g=this.pathParser,d=new lg;for(g.reset(),h&&h.beginPath();!g.isEnd();)switch(g.next().type){case vg.MOVE_TO:this.pathM(h,d);break;case vg.LINE_TO:this.pathL(h,d);break;case vg.HORIZ_LINE_TO:this.pathH(h,d);break;case vg.VERT_LINE_TO:this.pathV(h,d);break;case vg.CURVE_TO:this.pathC(h,d);break;case vg.SMOOTH_CURVE_TO:this.pathS(h,d);break;case vg.QUAD_TO:this.pathQ(h,d);break;case vg.SMOOTH_QUAD_TO:this.pathT(h,d);break;case vg.ARC:this.pathA(h,d);break;case vg.CLOSE_PATH:this.pathZ(h,d)}return d}},{key:"getBoundingBox",value:function getBoundingBox(h){return this.path()}},{key:"getMarkers",value:function getMarkers(){var h=this.pathParser,g=h.getMarkerPoints(),d=h.getMarkerAngles();return Fs(g).call(g,(function(h,g){return[h,d[g]]}))}},{key:"renderChildren",value:function renderChildren(h){this.path(h),this.document.screen.mouse.checkPath(this,h);var g=this.getStyle("fill-rule");""!==h.fillStyle&&("inherit"!==g.getString("inherit")?Vy(h).call(h,g.getString()):Vy(h).call(h)),""!==h.strokeStyle&&h.stroke();var d=this.getMarkers();if(d){var x=d.length-1,b=this.getStyle("marker-start"),_=this.getStyle("marker-mid"),S=this.getStyle("marker-end");if(b.isUrlDefinition()){var C=b.getDefinition(),w=_slicedToArray(d[0],2),E=w[0],P=w[1];C.render(h,E,P)}if(_.isUrlDefinition())for(var k=_.getDefinition(),A=1;A<x;A++){var R=_slicedToArray(d[A],2),M=R[0],N=R[1];k.render(h,M,N)}if(S.isUrlDefinition()){var D=S.getDefinition(),$=_slicedToArray(d[x],2),V=$[0],L=$[1];D.render(h,V,L)}}}},{key:"pathM",value:function pathM(h,g){var d=this.pathParser,x=PathElement.pathM(d).point,b=x.x,_=x.y;d.addMarker(x),g.addPoint(b,_),h&&h.moveTo(b,_)}},{key:"pathL",value:function pathL(h,g){var d=this.pathParser,x=PathElement.pathL(d),b=x.current,_=x.point,S=_.x,C=_.y;d.addMarker(_,b),g.addPoint(S,C),h&&h.lineTo(S,C)}},{key:"pathH",value:function pathH(h,g){var d=this.pathParser,x=PathElement.pathH(d),b=x.current,_=x.point,S=_.x,C=_.y;d.addMarker(_,b),g.addPoint(S,C),h&&h.lineTo(S,C)}},{key:"pathV",value:function pathV(h,g){var d=this.pathParser,x=PathElement.pathV(d),b=x.current,_=x.point,S=_.x,C=_.y;d.addMarker(_,b),g.addPoint(S,C),h&&h.lineTo(S,C)}},{key:"pathC",value:function pathC(h,g){var d=this.pathParser,x=PathElement.pathC(d),b=x.current,_=x.point,S=x.controlPoint,C=x.currentPoint;d.addMarker(C,S,_),g.addBezierCurve(b.x,b.y,_.x,_.y,S.x,S.y,C.x,C.y),h&&h.bezierCurveTo(_.x,_.y,S.x,S.y,C.x,C.y)}},{key:"pathS",value:function pathS(h,g){var d=this.pathParser,x=PathElement.pathS(d),b=x.current,_=x.point,S=x.controlPoint,C=x.currentPoint;d.addMarker(C,S,_),g.addBezierCurve(b.x,b.y,_.x,_.y,S.x,S.y,C.x,C.y),h&&h.bezierCurveTo(_.x,_.y,S.x,S.y,C.x,C.y)}},{key:"pathQ",value:function pathQ(h,g){var d=this.pathParser,x=PathElement.pathQ(d),b=x.current,_=x.controlPoint,S=x.currentPoint;d.addMarker(S,_,_),g.addQuadraticCurve(b.x,b.y,_.x,_.y,S.x,S.y),h&&h.quadraticCurveTo(_.x,_.y,S.x,S.y)}},{key:"pathT",value:function pathT(h,g){var d=this.pathParser,x=PathElement.pathT(d),b=x.current,_=x.controlPoint,S=x.currentPoint;d.addMarker(S,_,_),g.addQuadraticCurve(b.x,b.y,_.x,_.y,S.x,S.y),h&&h.quadraticCurveTo(_.x,_.y,S.x,S.y)}},{key:"pathA",value:function pathA(h,g){var d=this.pathParser,x=PathElement.pathA(d),b=x.currentPoint,_=x.rX,S=x.rY,C=x.sweepFlag,w=x.xAxisRotation,E=x.centp,P=x.a1,k=x.ad,A=1-C?1:-1,R=P+A*(k/2),M=new Hv(E.x+_*Math.cos(R),E.y+S*Math.sin(R));if(d.addMarkerAngle(M,R-A*Math.PI/2),d.addMarkerAngle(b,R-A*Math.PI),g.addPoint(b.x,b.y),h&&!isNaN(P)&&!isNaN(k)){var N=_>S?_:S,D=_>S?1:_/S,$=_>S?S/_:1;h.translate(E.x,E.y),h.rotate(w),h.scale(D,$),h.arc(0,0,N,P,P+k,Boolean(1-C)),h.scale(1/D,1/$),h.rotate(-w),h.translate(-E.x,-E.y)}}},{key:"pathZ",value:function pathZ(h,g){PathElement.pathZ(this.pathParser),h&&g.x1!==g.x2&&g.y1!==g.y2&&h.closePath()}}],[{key:"pathM",value:function pathM(h){var g=h.getAsCurrentPoint();return h.start=h.current,{point:g}}},{key:"pathL",value:function pathL(h){return{current:h.current,point:h.getAsCurrentPoint()}}},{key:"pathH",value:function pathH(h){var g=h.current,d=h.command,x=new Hv((d.relative?g.x:0)+d.x,g.y);return h.current=x,{current:g,point:x}}},{key:"pathV",value:function pathV(h){var g=h.current,d=h.command,x=new Hv(g.x,(d.relative?g.y:0)+d.y);return h.current=x,{current:g,point:x}}},{key:"pathC",value:function pathC(h){return{current:h.current,point:h.getPoint("x1","y1"),controlPoint:h.getAsControlPoint("x2","y2"),currentPoint:h.getAsCurrentPoint()}}},{key:"pathS",value:function pathS(h){return{current:h.current,point:h.getReflectedControlPoint(),controlPoint:h.getAsControlPoint("x2","y2"),currentPoint:h.getAsCurrentPoint()}}},{key:"pathQ",value:function pathQ(h){return{current:h.current,controlPoint:h.getAsControlPoint("x1","y1"),currentPoint:h.getAsCurrentPoint()}}},{key:"pathT",value:function pathT(h){var g=h.current,d=h.getReflectedControlPoint();return h.control=d,{current:g,controlPoint:d,currentPoint:h.getAsCurrentPoint()}}},{key:"pathA",value:function pathA(h){var g=h.current,d=h.command,x=d.rX,b=d.rY,_=d.xRot,S=d.lArcFlag,C=d.sweepFlag,w=_*(Math.PI/180),E=h.getAsCurrentPoint(),P=new Hv(Math.cos(w)*(g.x-E.x)/2+Math.sin(w)*(g.y-E.y)/2,-Math.sin(w)*(g.x-E.x)/2+Math.cos(w)*(g.y-E.y)/2),k=Math.pow(P.x,2)/Math.pow(x,2)+Math.pow(P.y,2)/Math.pow(b,2);k>1&&(x*=Math.sqrt(k),b*=Math.sqrt(k));var A=(S===C?-1:1)*Math.sqrt((Math.pow(x,2)*Math.pow(b,2)-Math.pow(x,2)*Math.pow(P.y,2)-Math.pow(b,2)*Math.pow(P.x,2))/(Math.pow(x,2)*Math.pow(P.y,2)+Math.pow(b,2)*Math.pow(P.x,2)));isNaN(A)&&(A=0);var R=new Hv(A*x*P.y/b,A*-b*P.x/x),M=new Hv((g.x+E.x)/2+Math.cos(w)*R.x-Math.sin(w)*R.y,(g.y+E.y)/2+Math.sin(w)*R.x+Math.cos(w)*R.y),N=vectorsAngle([1,0],[(P.x-R.x)/x,(P.y-R.y)/b]),D=[(P.x-R.x)/x,(P.y-R.y)/b],$=[(-P.x-R.x)/x,(-P.y-R.y)/b],V=vectorsAngle(D,$);return vectorsRatio(D,$)<=-1&&(V=Math.PI),vectorsRatio(D,$)>=1&&(V=0),{currentPoint:E,rX:x,rY:b,sweepFlag:C,xAxisRotation:w,centp:M,a1:N,ad:V}}},{key:"pathZ",value:function pathZ(h){h.current=h.start}}]),PathElement}(fg);function _createSuper$a(h){var g=function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var dg=function(h){_inherits(SVGElement,h);var g=_createSuper$a(SVGElement);function SVGElement(){var h;return _classCallCheck$1(this,SVGElement),(h=g.apply(this,arguments)).type="svg",h.root=!1,h}return _createClass(SVGElement,[{key:"setContext",value:function setContext(h){var g=this.document,d=g.screen,x=g.window,b=h.canvas;if(d.setDefaults(h),b.style&&void 0!==h.font&&x&&void 0!==x.getComputedStyle){h.font=x.getComputedStyle(b).getPropertyValue("font");var _=new Gv(g,"fontSize",cg.parse(h.font).fontSize);_.hasValue()&&(g.rootEmSize=_.getPixels("y"),g.emSize=g.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var S=d.viewPort,C=S.width,w=S.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 E=this.getAttribute("refX"),P=this.getAttribute("refY"),k=this.getAttribute("viewBox"),A=k.hasValue()?toNumbers(k.getString()):null,R=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),M=0,N=0,D=0,$=0;A&&(M=A[0],N=A[1]),this.root||(C=this.getStyle("width").getPixels("x"),w=this.getStyle("height").getPixels("y"),"marker"===this.type&&(D=M,$=N,M=0,N=0)),d.viewPort.setCurrent(C,w),this.node&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),_get(_getPrototypeOf(SVGElement.prototype),"setContext",this).call(this,h),h.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),A&&(C=A[2],w=A[3]),g.setViewBox({ctx:h,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:d.viewPort.width,desiredWidth:C,height:d.viewPort.height,desiredHeight:w,minX:M,minY:N,refX:E.getValue(),refY:P.getValue(),clip:R,clipX:D,clipY:$}),A&&(d.viewPort.removeCurrent(),d.viewPort.setCurrent(C,w))}},{key:"clearContext",value:function clearContext(h){_get(_getPrototypeOf(SVGElement.prototype),"clearContext",this).call(this,h),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function resize(h){var g,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,x=arguments.length>2&&void 0!==arguments[2]&&arguments[2],b=this.getAttribute("width",!0),_=this.getAttribute("height",!0),S=this.getAttribute("viewBox"),C=this.getAttribute("style"),w=b.getNumber(0),E=_.getNumber(0);if(x)if("string"==typeof x)this.getAttribute("preserveAspectRatio",!0).setValue(x);else{var P=this.getAttribute("preserveAspectRatio");P.hasValue()&&P.setValue(P.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}(b.setValue(h),_.setValue(d),S.hasValue())||S.setValue(ip(g="0 0 ".concat(w||h," ")).call(g,E||d));if(C.hasValue()){var k=this.getStyle("width"),A=this.getStyle("height");k.hasValue()&&k.setValue("".concat(h,"px")),A.hasValue()&&A.setValue("".concat(d,"px"))}}}]),SVGElement}(fg);function _createSuper$b(h){var g=function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var mg=function(h){_inherits(RectElement,h);var g=_createSuper$b(RectElement);function RectElement(){var h;return _classCallCheck$1(this,RectElement),(h=g.apply(this,arguments)).type="rect",h}return _createClass(RectElement,[{key:"path",value:function path(h){var g=this.getAttribute("x").getPixels("x"),d=this.getAttribute("y").getPixels("y"),x=this.getStyle("width",!1,!0).getPixels("x"),b=this.getStyle("height",!1,!0).getPixels("y"),_=this.getAttribute("rx"),S=this.getAttribute("ry"),C=_.getPixels("x"),w=S.getPixels("y");if(_.hasValue()&&!S.hasValue()&&(w=C),S.hasValue()&&!_.hasValue()&&(C=w),C=Math.min(C,x/2),w=Math.min(w,b/2),h){var E=(Math.sqrt(2)-1)/3*4;h.beginPath(),b>0&&x>0&&(h.moveTo(g+C,d),h.lineTo(g+x-C,d),h.bezierCurveTo(g+x-C+E*C,d,g+x,d+w-E*w,g+x,d+w),h.lineTo(g+x,d+b-w),h.bezierCurveTo(g+x,d+b-w+E*w,g+x-C+E*C,d+b,g+x-C,d+b),h.lineTo(g+C,d+b),h.bezierCurveTo(g+C-E*C,d+b,g,d+b-w+E*w,g,d+b-w),h.lineTo(g,d+w),h.bezierCurveTo(g,d+w-E*w,g+C-E*C,d,g+C,d),h.closePath())}return new lg(g,d,g+x,d+b)}},{key:"getMarkers",value:function getMarkers(){return null}}]),RectElement}(gg);function _createSuper$c(h){var g=function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var xg=function(h){_inherits(CircleElement,h);var g=_createSuper$c(CircleElement);function CircleElement(){var h;return _classCallCheck$1(this,CircleElement),(h=g.apply(this,arguments)).type="circle",h}return _createClass(CircleElement,[{key:"path",value:function path(h){var g=this.getAttribute("cx").getPixels("x"),d=this.getAttribute("cy").getPixels("y"),x=this.getAttribute("r").getPixels();return h&&x>0&&(h.beginPath(),h.arc(g,d,x,0,2*Math.PI,!1),h.closePath()),new lg(g-x,d-x,g+x,d+x)}},{key:"getMarkers",value:function getMarkers(){return null}}]),CircleElement}(gg);function _createSuper$d(h){var g=function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var bg=function(h){_inherits(EllipseElement,h);var g=_createSuper$d(EllipseElement);function EllipseElement(){var h;return _classCallCheck$1(this,EllipseElement),(h=g.apply(this,arguments)).type="ellipse",h}return _createClass(EllipseElement,[{key:"path",value:function path(h){var g=(Math.sqrt(2)-1)/3*4,d=this.getAttribute("rx").getPixels("x"),x=this.getAttribute("ry").getPixels("y"),b=this.getAttribute("cx").getPixels("x"),_=this.getAttribute("cy").getPixels("y");return h&&d>0&&x>0&&(h.beginPath(),h.moveTo(b+d,_),h.bezierCurveTo(b+d,_+g*x,b+g*d,_+x,b,_+x),h.bezierCurveTo(b-g*d,_+x,b-d,_+g*x,b-d,_),h.bezierCurveTo(b-d,_-g*x,b-g*d,_-x,b,_-x),h.bezierCurveTo(b+g*d,_-x,b+d,_-g*x,b+d,_),h.closePath()),new lg(b-d,_-x,b+d,_+x)}},{key:"getMarkers",value:function getMarkers(){return null}}]),EllipseElement}(gg);function _createSuper$e(h){var g=function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var _g=function(h){_inherits(LineElement,h);var g=_createSuper$e(LineElement);function LineElement(){var h;return _classCallCheck$1(this,LineElement),(h=g.apply(this,arguments)).type="line",h}return _createClass(LineElement,[{key:"getPoints",value:function getPoints(){return[new Hv(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Hv(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function path(h){var g=_slicedToArray(this.getPoints(),2),d=g[0],x=d.x,b=d.y,_=g[1],S=_.x,C=_.y;return h&&(h.beginPath(),h.moveTo(x,b),h.lineTo(S,C)),new lg(x,b,S,C)}},{key:"getMarkers",value:function getMarkers(){var h=_slicedToArray(this.getPoints(),2),g=h[0],d=h[1],x=g.angleTo(d);return[[g,x],[d,x]]}}]),LineElement}(gg);function _createSuper$f(h){var g=function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Sg=function(h){_inherits(PolylineElement,h);var g=_createSuper$f(PolylineElement);function PolylineElement(h,d,x){var b;return _classCallCheck$1(this,PolylineElement),(b=g.call(this,h,d,x)).type="polyline",b.points=[],b.points=Hv.parsePath(b.getAttribute("points").getString()),b}return _createClass(PolylineElement,[{key:"path",value:function path(h){var g=this.points,d=_slicedToArray(g,1)[0],x=d.x,b=d.y,_=new lg(x,b);return h&&(h.beginPath(),h.moveTo(x,b)),uf(g).call(g,(function(g){var d=g.x,x=g.y;_.addPoint(d,x),h&&h.lineTo(d,x)})),_}},{key:"getMarkers",value:function getMarkers(){var h=this.points,g=h.length-1,d=[];return uf(h).call(h,(function(x,b){b!==g&&d.push([x,x.angleTo(h[b+1])])})),d.length>0&&d.push([h[h.length-1],d[d.length-1][1]]),d}}]),PolylineElement}(gg);function _createSuper$g(h){var g=function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Cg=function(h){_inherits(PolygonElement,h);var g=_createSuper$g(PolygonElement);function PolygonElement(){var h;return _classCallCheck$1(this,PolygonElement),(h=g.apply(this,arguments)).type="polygon",h}return _createClass(PolygonElement,[{key:"path",value:function path(h){var g=_get(_getPrototypeOf(PolygonElement.prototype),"path",this).call(this,h),d=_slicedToArray(this.points,1)[0],x=d.x,b=d.y;return h&&(h.lineTo(x,b),h.closePath()),g}}]),PolygonElement}(Sg);function _createSuper$h(h){var g=function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var wg=function(h){_inherits(PatternElement,h);var g=_createSuper$h(PatternElement);function PatternElement(){var h;return _classCallCheck$1(this,PatternElement),(h=g.apply(this,arguments)).type="pattern",h}return _createClass(PatternElement,[{key:"createPattern",value:function createPattern(h,g,d){var x=this.getStyle("width").getPixels("x",!0),b=this.getStyle("height").getPixels("y",!0),_=new dg(this.document,null);_.attributes.viewBox=new Gv(this.document,"viewBox",this.getAttribute("viewBox").getValue()),_.attributes.width=new Gv(this.document,"width","".concat(x,"px")),_.attributes.height=new Gv(this.document,"height","".concat(b,"px")),_.attributes.transform=new Gv(this.document,"transform",this.getAttribute("patternTransform").getValue()),_.children=this.children;var S=this.document.createCanvas(x,b),C=S.getContext("2d"),w=this.getAttribute("x"),E=this.getAttribute("y");w.hasValue()&&E.hasValue()&&C.translate(w.getPixels("x",!0),E.getPixels("y",!0)),d.hasValue()?this.styles["fill-opacity"]=d:Qy(this.styles,"fill-opacity");for(var P=-1;P<=1;P++)for(var k=-1;k<=1;k++)C.save(),_.attributes.x=new Gv(this.document,"x",P*S.width),_.attributes.y=new Gv(this.document,"y",k*S.height),_.render(C),C.restore();return h.createPattern(S,"repeat")}}]),PatternElement}(sg);function _createSuper$i(h){var g=function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Eg=function(h){_inherits(MarkerElement,h);var g=_createSuper$i(MarkerElement);function MarkerElement(){var h;return _classCallCheck$1(this,MarkerElement),(h=g.apply(this,arguments)).type="marker",h}return _createClass(MarkerElement,[{key:"render",value:function render(h,g,d){if(g){var x=g.x,b=g.y,_=this.getAttribute("orient").getValue("auto"),S=this.getAttribute("markerUnits").getValue("strokeWidth");h.translate(x,b),"auto"===_&&h.rotate(d),"strokeWidth"===S&&h.scale(h.lineWidth,h.lineWidth),h.save();var C=new dg(this.document,null);C.type=this.type,C.attributes.viewBox=new Gv(this.document,"viewBox",this.getAttribute("viewBox").getValue()),C.attributes.refX=new Gv(this.document,"refX",this.getAttribute("refX").getValue()),C.attributes.refY=new Gv(this.document,"refY",this.getAttribute("refY").getValue()),C.attributes.width=new Gv(this.document,"width",this.getAttribute("markerWidth").getValue()),C.attributes.height=new Gv(this.document,"height",this.getAttribute("markerHeight").getValue()),C.attributes.overflow=new Gv(this.document,"overflow",this.getAttribute("overflow").getValue()),C.attributes.fill=new Gv(this.document,"fill",this.getAttribute("fill").getColor("black")),C.attributes.stroke=new Gv(this.document,"stroke",this.getAttribute("stroke").getValue("none")),C.children=this.children,C.render(h),h.restore(),"strokeWidth"===S&&h.scale(1/h.lineWidth,1/h.lineWidth),"auto"===_&&h.rotate(-d),h.translate(-x,-b)}}}]),MarkerElement}(sg);function _createSuper$j(h){var g=function _isNativeReflectConstruct$j(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Pg=function(h){_inherits(DefsElement,h);var g=_createSuper$j(DefsElement);function DefsElement(){var h;return _classCallCheck$1(this,DefsElement),(h=g.apply(this,arguments)).type="defs",h}return _createClass(DefsElement,[{key:"render",value:function render(){}}]),DefsElement}(sg);function _createSuper$k(h){var g=function _isNativeReflectConstruct$k(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Og=function(h){_inherits(GElement,h);var g=_createSuper$k(GElement);function GElement(){var h;return _classCallCheck$1(this,GElement),(h=g.apply(this,arguments)).type="g",h}return _createClass(GElement,[{key:"getBoundingBox",value:function getBoundingBox(h){var g,d=new lg;return uf(g=this.children).call(g,(function(g){d.addBoundingBox(g.getBoundingBox(h))})),d}}]),GElement}(fg);function _createSuper$l(h){var g=function _isNativeReflectConstruct$l(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Tg=function(h){_inherits(GradientElement,h);var g=_createSuper$l(GradientElement);function GradientElement(h,d,x){var b;_classCallCheck$1(this,GradientElement),(b=g.call(this,h,d,x)).attributesToInherit=["gradientUnits"],b.stops=[];var _=_assertThisInitialized(b),S=_.stops,C=_.children;return uf(C).call(C,(function(h){"stop"===h.type&&S.push(h)})),b}return _createClass(GradientElement,[{key:"getGradientUnits",value:function getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function createGradient(h,g,d){var x=this,b=this;this.getHrefAttribute().hasValue()&&(b=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(b));var _=b.stops,S=this.getGradient(h,g);if(!S)return this.addParentOpacity(d,_[_.length-1].color);if(uf(_).call(_,(function(h){S.addColorStop(h.offset,x.addParentOpacity(d,h.color))})),this.getAttribute("gradientTransform").hasValue()){var C=this.document,w=C.screen,E=w.MAX_VIRTUAL_PIXELS,P=_slicedToArray(w.viewPort.viewPorts,1)[0],k=new mg(C,null);k.attributes.x=new Gv(C,"x",-E/3),k.attributes.y=new Gv(C,"y",-E/3),k.attributes.width=new Gv(C,"width",E),k.attributes.height=new Gv(C,"height",E);var A=new Og(C,null);A.attributes.transform=new Gv(C,"transform",this.getAttribute("gradientTransform").getValue()),A.children=[k];var R=new dg(C,null);R.attributes.x=new Gv(C,"x",0),R.attributes.y=new Gv(C,"y",0),R.attributes.width=new Gv(C,"width",P.width),R.attributes.height=new Gv(C,"height",P.height),R.children=[A];var M=C.createCanvas(P.width,P.height),N=M.getContext("2d");return N.fillStyle=S,R.render(N),N.createPattern(M,"no-repeat")}return S}},{key:"inheritStopContainer",value:function inheritStopContainer(h){var g,d=this;uf(g=this.attributesToInherit).call(g,(function(g){!d.getAttribute(g).hasValue()&&h.getAttribute(g).hasValue()&&d.getAttribute(g,!0).setValue(h.getAttribute(g).getValue())}))}},{key:"addParentOpacity",value:function addParentOpacity(h,g){return h.hasValue()?new Gv(this.document,"color",g).addOpacity(h).getColor():g}}]),GradientElement}(sg);function _createSuper$m(h){var g=function _isNativeReflectConstruct$m(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var kg=function(h){_inherits(LinearGradientElement,h);var g=_createSuper$m(LinearGradientElement);function LinearGradientElement(h,d,x){var b;return _classCallCheck$1(this,LinearGradientElement),(b=g.call(this,h,d,x)).type="linearGradient",b.attributesToInherit.push("x1","y1","x2","y2"),b}return _createClass(LinearGradientElement,[{key:"getGradient",value:function getGradient(h,g){var d="objectBoundingBox"===this.getGradientUnits(),x=d?g.getBoundingBox(h):null;if(d&&!x)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 b=d?x.x+x.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),_=d?x.y+x.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),S=d?x.x+x.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),C=d?x.y+x.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return b===S&&_===C?null:h.createLinearGradient(b,_,S,C)}}]),LinearGradientElement}(Tg);function _createSuper$n(h){var g=function _isNativeReflectConstruct$n(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Ag=function(h){_inherits(RadialGradientElement,h);var g=_createSuper$n(RadialGradientElement);function RadialGradientElement(h,d,x){var b;return _classCallCheck$1(this,RadialGradientElement),(b=g.call(this,h,d,x)).type="radialGradient",b.attributesToInherit.push("cx","cy","r","fx","fy","fr"),b}return _createClass(RadialGradientElement,[{key:"getGradient",value:function getGradient(h,g){var d="objectBoundingBox"===this.getGradientUnits(),x=g.getBoundingBox(h);if(d&&!x)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 b=d?x.x+x.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),_=d?x.y+x.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),S=b,C=_;this.getAttribute("fx").hasValue()&&(S=d?x.x+x.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(C=d?x.y+x.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var w=d?(x.width+x.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),E=this.getAttribute("fr").getPixels();return h.createRadialGradient(S,C,E,b,_,w)}}]),RadialGradientElement}(Tg);function _createSuper$o(h){var g=function _isNativeReflectConstruct$o(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Rg=function(h){_inherits(StopElement,h);var g=_createSuper$o(StopElement);function StopElement(h,d,x){var b;_classCallCheck$1(this,StopElement),(b=g.call(this,h,d,x)).type="stop";var _=Math.max(0,Math.min(1,b.getAttribute("offset").getNumber())),S=b.getStyle("stop-opacity"),C=b.getStyle("stop-color",!0);return""===C.getString()&&C.setValue("#000"),S.hasValue()&&(C=C.addOpacity(S)),b.offset=_,b.color=C.getColor(),b}return StopElement}(sg);function _createSuper$p(h){var g=function _isNativeReflectConstruct$p(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Mg=function(h){_inherits(AnimateElement,h);var g=_createSuper$p(AnimateElement);function AnimateElement(h,d,x){var b;return _classCallCheck$1(this,AnimateElement),(b=g.call(this,h,d,x)).type="animate",b.duration=0,b.initialValue=null,b.initialUnits="",b.removed=!1,b.frozen=!1,h.screen.animations.push(_assertThisInitialized(b)),b.begin=b.getAttribute("begin").getMilliseconds(),b.maxDuration=b.begin+b.getAttribute("dur").getMilliseconds(),b.from=b.getAttribute("from"),b.to=b.getAttribute("to"),b.values=b.getAttribute("values"),tv(b).hasValue()&&tv(b).setValue(tv(b).getString().split(";")),b}return _createClass(AnimateElement,[{key:"getProperty",value:function getProperty(){var h=this.getAttribute("attributeType").getString(),g=this.getAttribute("attributeName").getString();return"CSS"===h?this.parent.getStyle(g,!0):this.parent.getAttribute(g,!0)}},{key:"calcValue",value:function calcValue(){var h,g=this.initialUnits,d=this.getProgress(),x=d.progress,b=d.from,_=d.to,S=b.getNumber()+(_.getNumber()-b.getNumber())*x;return"%"===g&&(S*=100),ip(h="".concat(S)).call(h,g)}},{key:"update",value:function update(h){var g=this.parent,d=this.getProperty();if(this.initialValue||(this.initialValue=d.getString(),this.initialUnits=d.getUnits()),this.duration>this.maxDuration){var x=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==x||this.frozen){if("remove"===x&&!this.removed)return this.removed=!0,d.setValue(g.animationFrozen?g.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,g.animationFrozen=!0,g.animationFrozenValue=d.getString();return!1}this.duration+=h;var b=!1;if(this.begin<this.duration){var _=this.calcValue(),S=this.getAttribute("type");if(S.hasValue()){var C,w=S.getString();_=ip(C="".concat(w,"(")).call(C,_,")")}d.setValue(_),b=!0}return b}},{key:"getProgress",value:function getProgress(){var h=this.document,g=tv(this),d={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(g.hasValue()){var x=d.progress*(g.getValue().length-1),b=Math.floor(x),_=Math.ceil(x);d.from=new Gv(h,"from",ws(g.getValue()[b])),d.to=new Gv(h,"to",ws(g.getValue()[_])),d.progress=(x-b)/(_-b)}else d.from=this.from,d.to=this.to;return d}}]),AnimateElement}(sg);function _createSuper$q(h){var g=function _isNativeReflectConstruct$q(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Ng=function(h){_inherits(AnimateColorElement,h);var g=_createSuper$q(AnimateColorElement);function AnimateColorElement(){var h;return _classCallCheck$1(this,AnimateColorElement),(h=g.apply(this,arguments)).type="animateColor",h}return _createClass(AnimateColorElement,[{key:"calcValue",value:function calcValue(){var h=this.getProgress(),g=h.progress,d=h.from,x=h.to,b=new Wp(d.getColor()),_=new Wp(x.getColor());if(b.ok&&_.ok){var S,C,w=b.r+(_.r-b.r)*g,E=b.g+(_.g-b.g)*g,P=b.b+(_.b-b.b)*g;return ip(S=ip(C="rgb(".concat(av(w,10),", ")).call(C,av(E,10),", ")).call(S,av(P,10),")")}return this.getAttribute("from").getColor()}}]),AnimateColorElement}(Mg);function _createSuper$r(h){var g=function _isNativeReflectConstruct$r(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Ig=function(h){_inherits(AnimateTransformElement,h);var g=_createSuper$r(AnimateTransformElement);function AnimateTransformElement(){var h;return _classCallCheck$1(this,AnimateTransformElement),(h=g.apply(this,arguments)).type="animateTransform",h}return _createClass(AnimateTransformElement,[{key:"calcValue",value:function calcValue(){var h=this.getProgress(),g=h.progress,d=h.from,x=h.to,b=toNumbers(d.getString()),_=toNumbers(x.getString());return Fs(b).call(b,(function(h,d){return h+(_[d]-h)*g})).join(" ")}}]),AnimateTransformElement}(Mg);function _createForOfIteratorHelper(h,g){var d;if(void 0===uv||null==sv(h)){if(ov(h)||(d=function _unsupportedIterableToArray(h,g){var d;if(!h)return;if("string"==typeof h)return _arrayLikeToArray(h,g);var x=cv(d=Object.prototype.toString.call(h)).call(d,8,-1);"Object"===x&&h.constructor&&(x=h.constructor.name);if("Map"===x||"Set"===x)return by(h);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return _arrayLikeToArray(h,g)}(h))||g&&h&&"number"==typeof h.length){d&&(h=d);var x=0,b=function F(){};return{s:b,n:function n(){return x>=h.length?{done:!0}:{done:!1,value:h[x++]}},e:function e(h){throw h},f:b}}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 _,S=!0,C=!1;return{s:function s(){d=Ol(h)},n:function n(){var h=d.next();return S=h.done,h},e:function e(h){C=!0,_=h},f:function f(){try{S||null==d.return||d.return()}finally{if(C)throw _}}}}function _arrayLikeToArray(h,g){(null==g||g>h.length)&&(g=h.length);for(var d=0,x=new Array(g);d<g;d++)x[d]=h[d];return x}function _createSuper$s(h){var g=function _isNativeReflectConstruct$s(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Dg=function(h){_inherits(FontElement,h);var g=_createSuper$s(FontElement);function FontElement(h,d,x){var b;_classCallCheck$1(this,FontElement),(b=g.call(this,h,d,x)).type="font",b.glyphs={},b.horizAdvX=b.getAttribute("horiz-adv-x").getNumber();var _,S=h.definitions,C=_createForOfIteratorHelper(_assertThisInitialized(b).children);try{for(C.s();!(_=C.n()).done;){var w=_.value;switch(w.type){case"font-face":b.fontFace=w;var E=w.getStyle("font-family");E.hasValue()&&(S[E.getString()]=_assertThisInitialized(b));break;case"missing-glyph":b.missingGlyph=w;break;case"glyph":var P=w;P.arabicForm?(b.isRTL=!0,b.isArabic=!0,void 0===b.glyphs[P.unicode]&&(b.glyphs[P.unicode]={}),b.glyphs[P.unicode][P.arabicForm]=P):b.glyphs[P.unicode]=P}}}catch(h){C.e(h)}finally{C.f()}return b}return _createClass(FontElement,[{key:"render",value:function render(){}}]),FontElement}(sg);function _createSuper$t(h){var g=function _isNativeReflectConstruct$t(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var $g=function(h){_inherits(FontFaceElement,h);var g=_createSuper$t(FontFaceElement);function FontFaceElement(h,d,x){var b;return _classCallCheck$1(this,FontFaceElement),(b=g.call(this,h,d,x)).type="font-face",b.ascent=b.getAttribute("ascent").getNumber(),b.descent=b.getAttribute("descent").getNumber(),b.unitsPerEm=b.getAttribute("units-per-em").getNumber(),b}return FontFaceElement}(sg);function _createSuper$u(h){var g=function _isNativeReflectConstruct$u(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Vg=function(h){_inherits(MissingGlyphElement,h);var g=_createSuper$u(MissingGlyphElement);function MissingGlyphElement(){var h;return _classCallCheck$1(this,MissingGlyphElement),(h=g.apply(this,arguments)).type="missing-glyph",h.horizAdvX=0,h}return MissingGlyphElement}(gg);function _createSuper$v(h){var g=function _isNativeReflectConstruct$v(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Lg=function(h){_inherits(GlyphElement,h);var g=_createSuper$v(GlyphElement);function GlyphElement(h,d,x){var b;return _classCallCheck$1(this,GlyphElement),(b=g.call(this,h,d,x)).type="glyph",b.horizAdvX=b.getAttribute("horiz-adv-x").getNumber(),b.unicode=b.getAttribute("unicode").getString(),b.arabicForm=b.getAttribute("arabic-form").getString(),b}return GlyphElement}(gg);function _createSuper$w(h){var g=function _isNativeReflectConstruct$w(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var jg=function(h){_inherits(TRefElement,h);var g=_createSuper$w(TRefElement);function TRefElement(){var h;return _classCallCheck$1(this,TRefElement),(h=g.apply(this,arguments)).type="tref",h}return _createClass(TRefElement,[{key:"getText",value:function getText(){var h=this.getHrefAttribute().getDefinition();if(h){var g=h.children[0];if(g)return g.getText()}return""}}]),TRefElement}(hg);function _createSuper$x(h){var g=function _isNativeReflectConstruct$x(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Fg=function(h){_inherits(AElement,h);var g=_createSuper$x(AElement);function AElement(h,d,x){var b,_;_classCallCheck$1(this,AElement),(_=g.call(this,h,d,x)).type="a";var S=d.childNodes,C=S[0],w=S.length>0&&bp(b=by(S)).call(b,(function(h){return 3===h.nodeType}));return _.hasText=w,_.text=w?_.getTextFromNode(C):"",_}return _createClass(AElement,[{key:"getText",value:function getText(){return this.text}},{key:"renderChildren",value:function renderChildren(h){if(this.hasText){_get(_getPrototypeOf(AElement.prototype),"renderChildren",this).call(this,h);var g=this.document,d=this.x,x=this.y,b=g.screen.mouse,_=new Gv(g,"fontSize",cg.parse(g.ctx.font).fontSize);b.isWorking()&&b.checkBoundingBox(this,new lg(d,x-_.getPixels("y"),d+this.measureText(h),x))}else if(this.children.length>0){var S=new Og(this.document,null);S.children=this.children,S.parent=this,S.render(h)}}},{key:"onClick",value:function onClick(){var h=this.document.window;h&&h.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}]),AElement}(hg);function _createForOfIteratorHelper$1(h,g){var d;if(void 0===uv||null==sv(h)){if(ov(h)||(d=function _unsupportedIterableToArray$1(h,g){var d;if(!h)return;if("string"==typeof h)return _arrayLikeToArray$1(h,g);var x=cv(d=Object.prototype.toString.call(h)).call(d,8,-1);"Object"===x&&h.constructor&&(x=h.constructor.name);if("Map"===x||"Set"===x)return by(h);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return _arrayLikeToArray$1(h,g)}(h))||g&&h&&"number"==typeof h.length){d&&(h=d);var x=0,b=function F(){};return{s:b,n:function n(){return x>=h.length?{done:!0}:{done:!1,value:h[x++]}},e:function e(h){throw h},f:b}}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 _,S=!0,C=!1;return{s:function s(){d=Ol(h)},n:function n(){var h=d.next();return S=h.done,h},e:function e(h){C=!0,_=h},f:function f(){try{S||null==d.return||d.return()}finally{if(C)throw _}}}}function _arrayLikeToArray$1(h,g){(null==g||g>h.length)&&(g=h.length);for(var d=0,x=new Array(g);d<g;d++)x[d]=h[d];return x}function ownKeys(h,g){var d=Sf(h);if(bf){var x=bf(h);g&&(x=xf(x).call(x,(function(g){return hf(h,g).enumerable}))),d.push.apply(d,x)}return d}function _objectSpread(h){for(var g=1;g<arguments.length;g++){var d,x=null!=arguments[g]?arguments[g]:{};if(g%2)uf(d=ownKeys(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(tf)Zl(h,tf(x));else{var b;uf(b=ownKeys(Object(x))).call(b,(function(g){Kl(h,g,hf(x,g))}))}}return h}function _createSuper$y(h){var g=function _isNativeReflectConstruct$y(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Bg=function(h){_inherits(TextPathElement,h);var g=_createSuper$y(TextPathElement);function TextPathElement(h,d,x){var b;_classCallCheck$1(this,TextPathElement),(b=g.call(this,h,d,x)).type="textPath",b.textWidth=0,b.textHeight=0,b.pathLength=-1,b.glyphInfo=null,b.letterSpacingCache=[],b.measuresCache=new Ev([["",0]]);var _=b.getHrefAttribute().getDefinition();return b.text=b.getTextFromNode(),b.dataArray=b.parsePathData(_),b}return _createClass(TextPathElement,[{key:"getText",value:function getText(){return this.text}},{key:"path",value:function path(h){var g=this.dataArray;h&&h.beginPath(),uf(g).call(g,(function(g){var d=g.type,x=g.points;switch(d){case vg.LINE_TO:h&&h.lineTo(x[0],x[1]);break;case vg.MOVE_TO:h&&h.moveTo(x[0],x[1]);break;case vg.CURVE_TO:h&&h.bezierCurveTo(x[0],x[1],x[2],x[3],x[4],x[5]);break;case vg.QUAD_TO:h&&h.quadraticCurveTo(x[0],x[1],x[2],x[3]);break;case vg.ARC:var b=_slicedToArray(x,8),_=b[0],S=b[1],C=b[2],w=b[3],E=b[4],P=b[5],k=b[6],A=b[7],R=C>w?C:w,M=C>w?1:C/w,N=C>w?w/C:1;h&&(h.translate(_,S),h.rotate(k),h.scale(M,N),h.arc(0,0,R,E,E+P,Boolean(1-A)),h.scale(1/M,1/N),h.rotate(-k),h.translate(-_,-S));break;case vg.CLOSE_PATH:h&&h.closePath()}}))}},{key:"renderChildren",value:function renderChildren(h){this.setTextData(h),h.save();var g=this.parent.getStyle("text-decoration").getString(),d=this.getFontSize(),x=this.glyphInfo,b=h.fillStyle;"underline"===g&&h.beginPath(),uf(x).call(x,(function(x,b){var _=x.p0,S=x.p1,C=x.rotation,w=x.text;h.save(),h.translate(_.x,_.y),h.rotate(C),h.fillStyle&&h.fillText(w,0,0),h.strokeStyle&&h.strokeText(w,0,0),h.restore(),"underline"===g&&(0===b&&h.moveTo(_.x,_.y+d/8),h.lineTo(S.x,S.y+d/5))})),"underline"===g&&(h.lineWidth=d/20,h.strokeStyle=b,h.stroke(),h.closePath()),h.restore()}},{key:"getLetterSpacingAt",value:function getLetterSpacingAt(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[h]||0}},{key:"findSegmentToFitChar",value:function findSegmentToFitChar(h,g,d,x,b,_,S,C,w){var E=_,P=this.measureText(h,C);" "===C&&"justify"===g&&d<x&&(P+=(x-d)/b),w>-1&&(E+=this.getLetterSpacingAt(w));var k=this.textHeight/20,A=this.getEquidistantPointOnPath(E,k,0),R=this.getEquidistantPointOnPath(E+P,k,0),M={p0:A,p1:R},N=A&&R?Math.atan2(R.y-A.y,R.x-A.x):0;if(S){var D=Math.cos(Math.PI/2+N)*S,$=Math.cos(-N)*S;M.p0=_objectSpread(_objectSpread({},A),{},{x:A.x+D,y:A.y+$}),M.p1=_objectSpread(_objectSpread({},R),{},{x:R.x+D,y:R.y+$})}return{offset:E+=P,segment:M,rotation:N}}},{key:"measureText",value:function measureText(h,g){var d=this.measuresCache,x=g||this.getText();if(d.has(x))return d.get(x);var b=this.measureTargetText(h,x);return d.set(x,b),b}},{key:"setTextData",value:function setTextData(h){var g,d=this;if(!this.glyphInfo){var x=this.getText(),b=x.split(""),_=x.split(" ").length-1,S=Fs(g=this.parent.getAttribute("dx").split()).call(g,(function(h){return h.getPixels("x")})),C=this.parent.getAttribute("dy").getPixels("y"),w=this.parent.getStyle("text-anchor").getString("start"),E=this.getStyle("letter-spacing"),P=this.parent.getStyle("letter-spacing"),k=0;E.hasValue()&&"inherit"!==E.getValue()?E.hasValue()&&"initial"!==E.getValue()&&"unset"!==E.getValue()&&(k=E.getPixels()):k=P.getPixels();var A=[],R=x.length;this.letterSpacingCache=A;for(var M=0;M<R;M++)A.push(void 0!==S[M]?S[M]:k);var N=hp(A).call(A,(function(h,g,d){return 0===d?0:h+g||0}),0),D=this.measureText(h),$=Math.max(D+N,0);this.textWidth=D,this.textHeight=this.getFontSize(),this.glyphInfo=[];var V=this.getPathLength(),L=this.getStyle("startOffset").getNumber(0)*V,j=0;"middle"!==w&&"center"!==w||(j=-$/2),"end"!==w&&"right"!==w||(j=-$),j+=L,uf(b).call(b,(function(g,x){var S=d.findSegmentToFitChar(h,w,$,V,_,j,C,g,x),E=S.offset,P=S.segment,k=S.rotation;j=E,P.p0&&P.p1&&d.glyphInfo.push({text:b[x],p0:P.p0,p1:P.p1,rotation:k})}))}}},{key:"parsePathData",value:function parsePathData(h){if(this.pathLength=-1,!h)return[];var g=[],d=h.pathParser;for(d.reset();!d.isEnd();){var x=d.current,b=x?x.x:0,_=x?x.y:0,S=d.next(),C=S.type,w=[];switch(S.type){case vg.MOVE_TO:this.pathM(d,w);break;case vg.LINE_TO:C=this.pathL(d,w);break;case vg.HORIZ_LINE_TO:C=this.pathH(d,w);break;case vg.VERT_LINE_TO:C=this.pathV(d,w);break;case vg.CURVE_TO:this.pathC(d,w);break;case vg.SMOOTH_CURVE_TO:C=this.pathS(d,w);break;case vg.QUAD_TO:this.pathQ(d,w);break;case vg.SMOOTH_QUAD_TO:C=this.pathT(d,w);break;case vg.ARC:w=this.pathA(d);break;case vg.CLOSE_PATH:gg.pathZ(d)}S.type!==vg.CLOSE_PATH?g.push({type:C,points:w,start:{x:b,y:_},pathLength:this.calcLength(b,_,C,w)}):g.push({type:vg.CLOSE_PATH,points:[],pathLength:0})}return g}},{key:"pathM",value:function pathM(h,g){var d=gg.pathM(h).point,x=d.x,b=d.y;g.push(x,b)}},{key:"pathL",value:function pathL(h,g){var d=gg.pathL(h).point,x=d.x,b=d.y;return g.push(x,b),vg.LINE_TO}},{key:"pathH",value:function pathH(h,g){var d=gg.pathH(h).point,x=d.x,b=d.y;return g.push(x,b),vg.LINE_TO}},{key:"pathV",value:function pathV(h,g){var d=gg.pathV(h).point,x=d.x,b=d.y;return g.push(x,b),vg.LINE_TO}},{key:"pathC",value:function pathC(h,g){var d=gg.pathC(h),x=d.point,b=d.controlPoint,_=d.currentPoint;g.push(x.x,x.y,b.x,b.y,_.x,_.y)}},{key:"pathS",value:function pathS(h,g){var d=gg.pathS(h),x=d.point,b=d.controlPoint,_=d.currentPoint;return g.push(x.x,x.y,b.x,b.y,_.x,_.y),vg.CURVE_TO}},{key:"pathQ",value:function pathQ(h,g){var d=gg.pathQ(h),x=d.controlPoint,b=d.currentPoint;g.push(x.x,x.y,b.x,b.y)}},{key:"pathT",value:function pathT(h,g){var d=gg.pathT(h),x=d.controlPoint,b=d.currentPoint;return g.push(x.x,x.y,b.x,b.y),vg.QUAD_TO}},{key:"pathA",value:function pathA(h){var g=gg.pathA(h),d=g.rX,x=g.rY,b=g.sweepFlag,_=g.xAxisRotation,S=g.centp,C=g.a1,w=g.ad;return 0===b&&w>0&&(w-=2*Math.PI),1===b&&w<0&&(w+=2*Math.PI),[S.x,S.y,d,x,C,w,_,b]}},{key:"calcLength",value:function calcLength(h,g,d,x){var b=0,_=null,S=null,C=0;switch(d){case vg.LINE_TO:return this.getLineLength(h,g,x[0],x[1]);case vg.CURVE_TO:for(b=0,_=this.getPointOnCubicBezier(0,h,g,x[0],x[1],x[2],x[3],x[4],x[5]),C=.01;C<=1;C+=.01)S=this.getPointOnCubicBezier(C,h,g,x[0],x[1],x[2],x[3],x[4],x[5]),b+=this.getLineLength(_.x,_.y,S.x,S.y),_=S;return b;case vg.QUAD_TO:for(b=0,_=this.getPointOnQuadraticBezier(0,h,g,x[0],x[1],x[2],x[3]),C=.01;C<=1;C+=.01)S=this.getPointOnQuadraticBezier(C,h,g,x[0],x[1],x[2],x[3]),b+=this.getLineLength(_.x,_.y,S.x,S.y),_=S;return b;case vg.ARC:b=0;var w=x[4],E=x[5],P=x[4]+E,k=Math.PI/180;if(Math.abs(w-P)<k&&(k=Math.abs(w-P)),_=this.getPointOnEllipticalArc(x[0],x[1],x[2],x[3],w,0),E<0)for(C=w-k;C>P;C-=k)S=this.getPointOnEllipticalArc(x[0],x[1],x[2],x[3],C,0),b+=this.getLineLength(_.x,_.y,S.x,S.y),_=S;else for(C=w+k;C<P;C+=k)S=this.getPointOnEllipticalArc(x[0],x[1],x[2],x[3],C,0),b+=this.getLineLength(_.x,_.y,S.x,S.y),_=S;return S=this.getPointOnEllipticalArc(x[0],x[1],x[2],x[3],P,0),b+=this.getLineLength(_.x,_.y,S.x,S.y)}return 0}},{key:"getPointOnLine",value:function getPointOnLine(h,g,d,x,b){var _=arguments.length>5&&void 0!==arguments[5]?arguments[5]:g,S=arguments.length>6&&void 0!==arguments[6]?arguments[6]:d,C=(b-d)/(x-g+zv),w=Math.sqrt(h*h/(1+C*C));x<g&&(w*=-1);var E=C*w,P=null;if(x===g)P={x:_,y:S+E};else if((S-d)/(_-g+zv)===C)P={x:_+w,y:S+E};else{var k=0,A=0,R=this.getLineLength(g,d,x,b);if(R<zv)return null;var M=(_-g)*(x-g)+(S-d)*(b-d);k=g+(M/=R*R)*(x-g),A=d+M*(b-d);var N=this.getLineLength(_,S,k,A),D=Math.sqrt(h*h-N*N);w=Math.sqrt(D*D/(1+C*C)),x<g&&(w*=-1),P={x:k+w,y:A+(E=C*w)}}return P}},{key:"getPointOnPath",value:function getPointOnPath(h){var g=this.getPathLength(),d=0,x=null;if(h<-5e-5||h-5e-5>g)return null;var b,_=_createForOfIteratorHelper$1(this.dataArray);try{for(_.s();!(b=_.n()).done;){var S=b.value;if(!S||!(S.pathLength<5e-5||d+S.pathLength+5e-5<h)){var C=h-d,w=0;switch(S.type){case vg.LINE_TO:x=this.getPointOnLine(C,S.start.x,S.start.y,S.points[0],S.points[1],S.start.x,S.start.y);break;case vg.ARC:var E=S.points[4],P=S.points[5],k=S.points[4]+P;if(w=E+C/S.pathLength*P,P<0&&w<k||P>=0&&w>k)break;x=this.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],w,S.points[6]);break;case vg.CURVE_TO:(w=C/S.pathLength)>1&&(w=1),x=this.getPointOnCubicBezier(w,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case vg.QUAD_TO:(w=C/S.pathLength)>1&&(w=1),x=this.getPointOnQuadraticBezier(w,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3])}if(x)return x;break}d+=S.pathLength}}catch(h){_.e(h)}finally{_.f()}return null}},{key:"getLineLength",value:function getLineLength(h,g,d,x){return Math.sqrt((d-h)*(d-h)+(x-g)*(x-g))}},{key:"getPathLength",value:function getPathLength(){var h;-1===this.pathLength&&(this.pathLength=hp(h=this.dataArray).call(h,(function(h,g){return g.pathLength>0?h+g.pathLength:h}),0));return this.pathLength}},{key:"getPointOnCubicBezier",value:function getPointOnCubicBezier(h,g,d,x,b,_,S,C,w){return{x:C*CB1(h)+_*CB2(h)+x*CB3(h)+g*CB4(h),y:w*CB1(h)+S*CB2(h)+b*CB3(h)+d*CB4(h)}}},{key:"getPointOnQuadraticBezier",value:function getPointOnQuadraticBezier(h,g,d,x,b,_,S){return{x:_*QB1(h)+x*QB2(h)+g*QB3(h),y:S*QB1(h)+b*QB2(h)+d*QB3(h)}}},{key:"getPointOnEllipticalArc",value:function getPointOnEllipticalArc(h,g,d,x,b,_){var S=Math.cos(_),C=Math.sin(_),w=d*Math.cos(b),E=x*Math.sin(b);return{x:h+(w*S-E*C),y:g+(w*C+E*S)}}},{key:"buildEquidistantCache",value:function buildEquidistantCache(h,g){var d=this.getPathLength(),x=g||.25,b=h||d/100;if(!this.equidistantCache||this.equidistantCache.step!==b||this.equidistantCache.precision!==x){this.equidistantCache={step:b,precision:x,points:[]};for(var _=0,S=0;S<=d;S+=x){var C=this.getPointOnPath(S),w=this.getPointOnPath(S+x);C&&w&&((_+=this.getLineLength(C.x,C.y,w.x,w.y))>=b&&(this.equidistantCache.points.push({x:C.x,y:C.y,distance:S}),_-=b))}}}},{key:"getEquidistantPointOnPath",value:function getEquidistantPointOnPath(h,g,d){if(this.buildEquidistantCache(g,d),h<0||h-this.getPathLength()>5e-5)return null;var x=Math.round(h/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[x]||null}}]),TextPathElement}(hg);function _createSuper$z(h){var g=function _isNativeReflectConstruct$z(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var zg=function(h){_inherits(ImageElement,h);var g,d,x=_createSuper$z(ImageElement);function ImageElement(h,g,d){var b;_classCallCheck$1(this,ImageElement),(b=x.call(this,h,g,d)).type="image",b.loaded=!1;var _=b.getHrefAttribute().getString();if(!_)return _possibleConstructorReturn(b);var S=/\.svg$/.test(_);return h.images.push(_assertThisInitialized(b)),S?b.loadSvg(_):b.loadImage(_),b.isSvg=S,b}return _createClass(ImageElement,[{key:"loadImage",value:(d=_asyncToGenerator(Cf.mark((function _callee(h){var g;return Cf.wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,this.document.createImage(h);case 3:g=d.sent,this.image=g,d.next=10;break;case 7:d.prev=7,d.t0=d.catch(0),console.error('Error while loading image "'.concat(h,'":'),d.t0);case 10:this.loaded=!0;case 11:case"end":return d.stop()}}),_callee,this,[[0,7]])}))),function loadImage(h){return d.apply(this,arguments)})},{key:"loadSvg",value:(g=_asyncToGenerator(Cf.mark((function _callee2(h){var g,d;return Cf.wrap((function _callee2$(x){for(;;)switch(x.prev=x.next){case 0:return x.prev=0,x.next=3,this.document.fetch(h);case 3:return g=x.sent,x.next=6,g.text();case 6:d=x.sent,this.image=d,x.next=13;break;case 10:x.prev=10,x.t0=x.catch(0),console.error('Error while loading image "'.concat(h,'":'),x.t0);case 13:this.loaded=!0;case 14:case"end":return x.stop()}}),_callee2,this,[[0,10]])}))),function loadSvg(h){return g.apply(this,arguments)})},{key:"renderChildren",value:function renderChildren(h){var g=this.document,d=this.image,x=this.loaded,b=this.getAttribute("x").getPixels("x"),_=this.getAttribute("y").getPixels("y"),S=this.getStyle("width").getPixels("x"),C=this.getStyle("height").getPixels("y");if(x&&d&&S&&C){if(h.save(),this.isSvg)g.canvg.forkString(h,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:_,scaleWidth:S,scaleHeight:C}).render();else{var w=this.image;h.translate(b,_),g.setViewBox({ctx:h,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:S,desiredWidth:w.width,height:C,desiredHeight:w.height}),this.loaded&&(void 0===w.complete||w.complete)&&h.drawImage(w,0,0)}h.restore()}}},{key:"getBoundingBox",value:function getBoundingBox(){var h=this.getAttribute("x").getPixels("x"),g=this.getAttribute("y").getPixels("y"),d=this.getStyle("width").getPixels("x"),x=this.getStyle("height").getPixels("y");return new lg(h,g,h+d,g+x)}}]),ImageElement}(fg);function _createSuper$A(h){var g=function _isNativeReflectConstruct$A(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Gg=function(h){_inherits(SymbolElement,h);var g=_createSuper$A(SymbolElement);function SymbolElement(){var h;return _classCallCheck$1(this,SymbolElement),(h=g.apply(this,arguments)).type="symbol",h}return _createClass(SymbolElement,[{key:"render",value:function render(h){}}]),SymbolElement}(fg),Ug=function(){function SVGFontLoader(h){_classCallCheck$1(this,SVGFontLoader),this.document=h,this.loaded=!1,h.fonts.push(this)}var h;return _createClass(SVGFontLoader,[{key:"load",value:(h=_asyncToGenerator(Cf.mark((function _callee(h,g){var d,x,b,_;return Cf.wrap((function _callee$(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,x=this.document,S.next=4,x.canvg.parser.load(g);case 4:b=S.sent,_=b.getElementsByTagName("font"),uf(d=by(_)).call(d,(function(g){var d=x.createElement(g);x.definitions[h]=d})),S.next=12;break;case 9:S.prev=9,S.t0=S.catch(0),console.error('Error while loading font "'.concat(g,'":'),S.t0);case 12:this.loaded=!0;case 13:case"end":return S.stop()}}),_callee,this,[[0,9]])}))),function load(g,d){return h.apply(this,arguments)})}]),SVGFontLoader}();function _createSuper$B(h){var g=function _isNativeReflectConstruct$B(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Hg=function(h){_inherits(StyleElement,h);var g=_createSuper$B(StyleElement);function StyleElement(h,d,x){var b,_;_classCallCheck$1(this,StyleElement),(_=g.call(this,h,d,x)).type="style";var S=compressSpaces(Fs(b=by(d.childNodes)).call(b,(function(h){return h.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}");return uf(S).call(S,(function(g){var d=Gp(g).call(g);if(d){var x=d.split("{"),b=x[0].split(","),_=x[1].split(";");uf(b).call(b,(function(g){var d=Gp(g).call(g);if(d){var x=h.styles[d]||{};if(uf(_).call(_,(function(g){var d,b,_=My(g).call(g,":"),S=Gp(d=g.substr(0,_)).call(d),C=Gp(b=g.substr(_+1,g.length-_)).call(b);S&&C&&(x[S]=new Gv(h,S,C))})),h.styles[d]=x,h.stylesSpecificity[d]=function getSelectorSpecificity(h){var g=[0,0,0],d=h.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),x=0,b=_slicedToArray(findSelectorMatch(d,Dv),2);d=b[0],x=b[1],g[1]+=x;var _=_slicedToArray(findSelectorMatch(d,$v),2);d=_[0],x=_[1],g[0]+=x;var S=_slicedToArray(findSelectorMatch(d,Vv),2);d=S[0],x=S[1],g[1]+=x;var C=_slicedToArray(findSelectorMatch(d,Lv),2);d=C[0],x=C[1],g[2]+=x;var w=_slicedToArray(findSelectorMatch(d,jv),2);d=w[0],x=w[1],g[1]+=x;var E=_slicedToArray(findSelectorMatch(d,Fv),2);d=E[0],x=E[1],g[1]+=x;var P=_slicedToArray(findSelectorMatch(d=d.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),Bv),2);return d=P[0],x=P[1],g[2]+=x,g.join("")}(d),"@font-face"===d){var b=x["font-family"].getString().replace(/"|'/g,""),S=x.src.getString().split(",");uf(S).call(S,(function(g){if(My(g).call(g,'format("svg")')>0){var d=parseExternalUrl(g);d&&new Ug(h).load(b,d)}}))}}}))}})),_}return StyleElement}(sg);function _createSuper$C(h){var g=function _isNativeReflectConstruct$C(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}Hg.parseExternalUrl=parseExternalUrl;var Xg=function(h){_inherits(UseElement,h);var g=_createSuper$C(UseElement);function UseElement(){var h;return _classCallCheck$1(this,UseElement),(h=g.apply(this,arguments)).type="use",h}return _createClass(UseElement,[{key:"setContext",value:function setContext(h){_get(_getPrototypeOf(UseElement.prototype),"setContext",this).call(this,h);var g=this.getAttribute("x"),d=this.getAttribute("y");g.hasValue()&&h.translate(g.getPixels("x"),0),d.hasValue()&&h.translate(0,d.getPixels("y"))}},{key:"path",value:function path(h){var g=this.element;g&&g.path(h)}},{key:"renderChildren",value:function renderChildren(h){var g=this.document,d=this.element;if(d){var x=d;if("symbol"===d.type&&((x=new dg(g,null)).attributes.viewBox=new Gv(g,"viewBox",d.getAttribute("viewBox").getString()),x.attributes.preserveAspectRatio=new Gv(g,"preserveAspectRatio",d.getAttribute("preserveAspectRatio").getString()),x.attributes.overflow=new Gv(g,"overflow",d.getAttribute("overflow").getString()),x.children=d.children,d.styles.opacity=new Gv(g,"opacity",this.calculateOpacity())),"svg"===x.type){var b=this.getStyle("width",!1,!0),_=this.getStyle("height",!1,!0);b.hasValue()&&(x.attributes.width=new Gv(g,"width",b.getString())),_.hasValue()&&(x.attributes.height=new Gv(g,"height",_.getString()))}var S=x.parent;x.parent=this,x.render(h),x.parent=S}}},{key:"getBoundingBox",value:function getBoundingBox(h){var g=this.element;return g?g.getBoundingBox(h):null}},{key:"elementTransform",value:function elementTransform(){var h=this.document,g=this.element;return og.fromElement(h,g)}},{key:"element",get:function get(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),UseElement}(fg);function _createSuper$D(h){var g=function _isNativeReflectConstruct$D(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function imGet(h,g,d,x,b,_){return h[d*x*4+4*g+_]}function imSet(h,g,d,x,b,_,S){h[d*x*4+4*g+_]=S}function m(h,g,d){return h[g]*d}function c(h,g,d,x){return g+Math.cos(h)*d+Math.sin(h)*x}var Yg=function(h){_inherits(FeColorMatrixElement,h);var g=_createSuper$D(FeColorMatrixElement);function FeColorMatrixElement(h,d,x){var b;_classCallCheck$1(this,FeColorMatrixElement),(b=g.call(this,h,d,x)).type="feColorMatrix";var _=toNumbers(b.getAttribute("values").getString());switch(b.getAttribute("type").getString("matrix")){case"saturate":var S=_[0];_=[.213+.787*S,.715-.715*S,.072-.072*S,0,0,.213-.213*S,.715+.285*S,.072-.072*S,0,0,.213-.213*S,.715-.715*S,.072+.928*S,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var C=_[0]*Math.PI/180;_=[c(C,.213,.787,-.213),c(C,.715,-.715,-.715),c(C,.072,-.072,.928),0,0,c(C,.213,-.213,.143),c(C,.715,.285,.14),c(C,.072,-.072,-.283),0,0,c(C,.213,-.213,-.787),c(C,.715,-.715,.715),c(C,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":_=[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 b.matrix=_,b.includeOpacity=b.getAttribute("includeOpacity").hasValue(),b}return _createClass(FeColorMatrixElement,[{key:"apply",value:function apply(h,g,d,x,b){for(var _=this.includeOpacity,S=this.matrix,C=h.getImageData(0,0,x,b),w=0;w<b;w++)for(var E=0;E<x;E++){var P=imGet(C.data,E,w,x,0,0),k=imGet(C.data,E,w,x,0,1),A=imGet(C.data,E,w,x,0,2),R=imGet(C.data,E,w,x,0,3),M=m(S,0,P)+m(S,1,k)+m(S,2,A)+m(S,3,R)+m(S,4,1),N=m(S,5,P)+m(S,6,k)+m(S,7,A)+m(S,8,R)+m(S,9,1),D=m(S,10,P)+m(S,11,k)+m(S,12,A)+m(S,13,R)+m(S,14,1),$=m(S,15,P)+m(S,16,k)+m(S,17,A)+m(S,18,R)+m(S,19,1);_&&(M=N=D=0,$*=R/255),imSet(C.data,E,w,x,0,0,M),imSet(C.data,E,w,x,0,1,N),imSet(C.data,E,w,x,0,2,D),imSet(C.data,E,w,x,0,3,$)}h.clearRect(0,0,x,b),h.putImageData(C,0,0)}}]),FeColorMatrixElement}(sg);function _createSuper$E(h){var g=function _isNativeReflectConstruct$E(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Wg=function(h){_inherits(MaskElement,h);var g=_createSuper$E(MaskElement);function MaskElement(){var h;return _classCallCheck$1(this,MaskElement),(h=g.apply(this,arguments)).type="mask",h}return _createClass(MaskElement,[{key:"apply",value:function apply(h,g){var d=this.document,x=this.getAttribute("x").getPixels("x"),b=this.getAttribute("y").getPixels("y"),_=this.getStyle("width").getPixels("x"),S=this.getStyle("height").getPixels("y");if(!_&&!S){var C,w=new lg;uf(C=this.children).call(C,(function(g){w.addBoundingBox(g.getBoundingBox(h))})),x=Math.floor(w.x1),b=Math.floor(w.y1),_=Math.floor(w.width),S=Math.floor(w.height)}var E=this.removeStyles(g,MaskElement.ignoreStyles),P=d.createCanvas(x+_,b+S),k=P.getContext("2d");d.screen.setDefaults(k),this.renderChildren(k),new Yg(d,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(k,0,0,x+_,b+S);var A=d.createCanvas(x+_,b+S),R=A.getContext("2d");d.screen.setDefaults(R),g.render(R),R.globalCompositeOperation="destination-in",R.fillStyle=k.createPattern(P,"no-repeat"),R.fillRect(0,0,x+_,b+S),h.fillStyle=R.createPattern(A,"no-repeat"),h.fillRect(0,0,x+_,b+S),this.restoreStyles(g,E)}},{key:"render",value:function render(h){}}]),MaskElement}(sg);function _createSuper$F(h){var g=function _isNativeReflectConstruct$F(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}Wg.ignoreStyles=["mask","transform","clip-path"];var qg=function noop(){},Qg=function(h){_inherits(ClipPathElement,h);var g=_createSuper$F(ClipPathElement);function ClipPathElement(){var h;return _classCallCheck$1(this,ClipPathElement),(h=g.apply(this,arguments)).type="clipPath",h}return _createClass(ClipPathElement,[{key:"apply",value:function apply$1(h){var g,d=this.document,x=Av(h),b=h.beginPath,_=h.closePath;x&&(x.beginPath=qg,x.closePath=qg),kv(b,h,[]),uf(g=this.children).call(g,(function(g){if(void 0!==g.path){var b=void 0!==g.elementTransform?g.elementTransform():null;b||(b=og.fromElement(d,g)),b&&b.apply(h),g.path(h),x&&(x.closePath=_),b&&b.unapply(h)}})),kv(_,h,[]),h.clip(),x&&(x.beginPath=b,x.closePath=_)}},{key:"render",value:function render(h){}}]),ClipPathElement}(sg);function _createSuper$G(h){var g=function _isNativeReflectConstruct$G(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Kg=function(h){_inherits(FilterElement,h);var g=_createSuper$G(FilterElement);function FilterElement(){var h;return _classCallCheck$1(this,FilterElement),(h=g.apply(this,arguments)).type="filter",h}return _createClass(FilterElement,[{key:"apply",value:function apply(h,g){var d=this.document,x=this.children,b=g.getBoundingBox(h);if(b){var _=0,S=0;uf(x).call(x,(function(h){var g=h.extraFilterDistance||0;_=Math.max(_,g),S=Math.max(S,g)}));var C=Math.floor(b.width),w=Math.floor(b.height),E=C+2*_,P=w+2*S;if(!(E<1||P<1)){var k=Math.floor(b.x),A=Math.floor(b.y),R=this.removeStyles(g,FilterElement.ignoreStyles),M=d.createCanvas(E,P),N=M.getContext("2d");d.screen.setDefaults(N),N.translate(-k+_,-A+S),g.render(N),uf(x).call(x,(function(h){"function"==typeof h.apply&&h.apply(N,0,0,E,P)})),h.drawImage(M,0,0,E,P,k-_,A-S,E,P),this.restoreStyles(g,R)}}}},{key:"render",value:function render(h){}}]),FilterElement}(sg);function _createSuper$H(h){var g=function _isNativeReflectConstruct$H(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _createSuper$I(h){var g=function _isNativeReflectConstruct$I(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _createSuper$J(h){var g=function _isNativeReflectConstruct$J(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _createSuper$K(h){var g=function _isNativeReflectConstruct$K(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _createSuper$L(h){var g=function _isNativeReflectConstruct$L(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _createSuper$M(h){var g=function _isNativeReflectConstruct$M(){if("undefined"==typeof Reflect||!Jp)return!1;if(Jp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Jp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=Jp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}Kg.ignoreStyles=["filter","transform","clip-path"];var Zg={svg:dg,rect:mg,circle:xg,ellipse:bg,line:_g,polyline:Sg,polygon:Cg,path:gg,pattern:wg,marker:Eg,defs:Pg,linearGradient:kg,radialGradient:Ag,stop:Rg,animate:Mg,animateColor:Ng,animateTransform:Ig,font:Dg,"font-face":$g,"missing-glyph":Vg,glyph:Lg,text:hg,tspan:pg,tref:jg,a:Fg,textPath:Bg,image:zg,g:Og,symbol:Gg,style:Hg,use:Xg,mask:Wg,clipPath:Qg,filter:Kg,feDropShadow:function(h){_inherits(FeDropShadowElement,h);var g=_createSuper$H(FeDropShadowElement);function FeDropShadowElement(h,d,x){var b;return _classCallCheck$1(this,FeDropShadowElement),(b=g.call(this,h,d,x)).type="feDropShadow",b.addStylesFromStyleDefinition(),b}return _createClass(FeDropShadowElement,[{key:"apply",value:function apply(h,g,d,x,b){}}]),FeDropShadowElement}(sg),feMorphology:function(h){_inherits(FeMorphologyElement,h);var g=_createSuper$I(FeMorphologyElement);function FeMorphologyElement(){var h;return _classCallCheck$1(this,FeMorphologyElement),(h=g.apply(this,arguments)).type="feMorphology",h}return _createClass(FeMorphologyElement,[{key:"apply",value:function apply(h,g,d,x,b){}}]),FeMorphologyElement}(sg),feComposite:function(h){_inherits(FeCompositeElement,h);var g=_createSuper$J(FeCompositeElement);function FeCompositeElement(){var h;return _classCallCheck$1(this,FeCompositeElement),(h=g.apply(this,arguments)).type="feComposite",h}return _createClass(FeCompositeElement,[{key:"apply",value:function apply(h,g,d,x,b){}}]),FeCompositeElement}(sg),feColorMatrix:Yg,feGaussianBlur:function(h){_inherits(FeGaussianBlurElement,h);var g=_createSuper$K(FeGaussianBlurElement);function FeGaussianBlurElement(h,d,x){var b;return _classCallCheck$1(this,FeGaussianBlurElement),(b=g.call(this,h,d,x)).type="feGaussianBlur",b.blurRadius=Math.floor(b.getAttribute("stdDeviation").getNumber()),b.extraFilterDistance=b.blurRadius,b}return _createClass(FeGaussianBlurElement,[{key:"apply",value:function apply(h,g,d,x,b){var _=this.document,S=this.blurRadius,C=_.window?_.window.document.body:null,w=h.canvas;w.id=_.getUniqueId(),C&&(w.style.display="none",C.appendChild(w)),processCanvasRGBA(w,g,d,x,b,S),C&&C.removeChild(w)}}]),FeGaussianBlurElement}(sg),title:function(h){_inherits(TitleElement,h);var g=_createSuper$L(TitleElement);function TitleElement(){var h;return _classCallCheck$1(this,TitleElement),(h=g.apply(this,arguments)).type="title",h}return TitleElement}(sg),desc:function(h){_inherits(DescElement,h);var g=_createSuper$M(DescElement);function DescElement(){var h;return _classCallCheck$1(this,DescElement),(h=g.apply(this,arguments)).type="desc",h}return DescElement}(sg)};function ownKeys$1(h,g){var d=Sf(h);if(bf){var x=bf(h);g&&(x=xf(x).call(x,(function(g){return hf(h,g).enumerable}))),d.push.apply(d,x)}return d}function _createImage(){return(_createImage=_asyncToGenerator(Cf.mark((function _callee(h){var g,d,x=arguments;return Cf.wrap((function _callee$(b){for(;;)switch(b.prev=b.next){case 0:return g=x.length>1&&void 0!==x[1]&&x[1],d=document.createElement("img"),g&&(d.crossOrigin="Anonymous"),b.abrupt("return",new _p((function(g,x){d.onload=function(){g(d)},d.onerror=function(){x()},d.src=h})));case 4:case"end":return b.stop()}}),_callee)})))).apply(this,arguments)}var Jg=function(){function Document(h){var g,d,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},b=x.rootEmSize,_=void 0===b?12:b,S=x.emSize,C=void 0===S?12:S,w=x.createCanvas,E=void 0===w?Document.createCanvas:w,P=x.createImage,k=void 0===P?Document.createImage:P,A=x.anonymousCrossOrigin;_classCallCheck$1(this,Document),this.canvg=h,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=h.screen,this.rootEmSize=_,this.emSize=C,this.createCanvas=E,this.createImage=this.bindCreateImage(k,A),this.screen.wait(Tp(g=this.isImagesLoaded).call(g,this)),this.screen.wait(Tp(d=this.isFontsLoaded).call(d,this))}return _createClass(Document,[{key:"bindCreateImage",value:function bindCreateImage(h,g){return"boolean"==typeof g?function(d,x){return h(d,"boolean"==typeof x?x:g)}:h}},{key:"popEmSize",value:function popEmSize(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function getUniqueId(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function isImagesLoaded(){var h;return bp(h=this.images).call(h,(function(h){return h.loaded}))}},{key:"isFontsLoaded",value:function isFontsLoaded(){var h;return bp(h=this.fonts).call(h,(function(h){return h.loaded}))}},{key:"createDocumentElement",value:function createDocumentElement(h){var g=this.createElement(h.documentElement);return g.root=!0,g.addStylesFromStyleDefinition(),this.documentElement=g,g}},{key:"createElement",value:function createElement(h){var g=h.nodeName.replace(/^[^:]+:/,""),d=Document.elementTypes[g];return void 0!==d?new d(this,h):new ug(this,h)}},{key:"createTextNode",value:function createTextNode(h){return new yg(this,h)}},{key:"setViewBox",value:function setViewBox(h){this.screen.setViewBox(function _objectSpread$1(h){for(var g=1;g<arguments.length;g++){var d,x=null!=arguments[g]?arguments[g]:{};if(g%2)uf(d=ownKeys$1(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(tf)Zl(h,tf(x));else{var b;uf(b=ownKeys$1(Object(x))).call(b,(function(g){Kl(h,g,hf(x,g))}))}}return h}({document:this},h))}},{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 h=this.emSizeStack;return h[h.length-1]},set:function set(h){this.emSizeStack.push(h)}}]),Document}();function ownKeys$2(h,g){var d=Sf(h);if(bf){var x=bf(h);g&&(x=xf(x).call(x,(function(g){return hf(h,g).enumerable}))),d.push.apply(d,x)}return d}function _objectSpread$2(h){for(var g=1;g<arguments.length;g++){var d,x=null!=arguments[g]?arguments[g]:{};if(g%2)uf(d=ownKeys$2(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(tf)Zl(h,tf(x));else{var b;uf(b=ownKeys$2(Object(x))).call(b,(function(g){Kl(h,g,hf(x,g))}))}}return h}Jg.createCanvas=function createCanvas(h,g){var d=document.createElement("canvas");return d.width=h,d.height=g,d},Jg.createImage=function createImage(h){return _createImage.apply(this,arguments)},Jg.elementTypes=Zg;var td=function(){function Canvg(h,g){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck$1(this,Canvg),this.parser=new Zv(d),this.screen=new qv(h,d),this.options=d;var x=new Jg(this,d),b=x.createDocumentElement(g);this.document=x,this.documentElement=b}var h,g;return _createClass(Canvg,[{key:"fork",value:function fork(h,g){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.from(h,g,_objectSpread$2(_objectSpread$2({},this.options),d))}},{key:"forkString",value:function forkString(h,g){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.fromString(h,g,_objectSpread$2(_objectSpread$2({},this.options),d))}},{key:"ready",value:function ready(){return this.screen.ready()}},{key:"isReady",value:function isReady(){return this.screen.isReady()}},{key:"render",value:(g=_asyncToGenerator(Cf.mark((function _callee(){var h,g=arguments;return Cf.wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:return h=g.length>0&&void 0!==g[0]?g[0]:{},this.start(_objectSpread$2({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},h)),d.next=4,this.ready();case 4:this.stop();case 5:case"end":return d.stop()}}),_callee,this)}))),function render(){return g.apply(this,arguments)})},{key:"start",value:function start(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=this.documentElement,d=this.screen,x=this.options;d.start(g,_objectSpread$2(_objectSpread$2({enableRedraw:!0},x),h))}},{key:"stop",value:function stop(){this.screen.stop()}},{key:"resize",value:function resize(h){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(h,g,d)}}],[{key:"from",value:(h=_asyncToGenerator(Cf.mark((function _callee2(h,g){var d,x,b,_=arguments;return Cf.wrap((function _callee2$(S){for(;;)switch(S.prev=S.next){case 0:return d=_.length>2&&void 0!==_[2]?_[2]:{},x=new Zv(d),S.next=4,x.parse(g);case 4:return b=S.sent,S.abrupt("return",new Canvg(h,b,d));case 6:case"end":return S.stop()}}),_callee2)}))),function from(g,d){return h.apply(this,arguments)})},{key:"fromString",value:function fromString(h,g){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},x=new Zv(d),b=x.parseFromString(g);return new Canvg(h,b,d)}}]),Canvg}();function __variableDynamicImportRuntime0__(h){switch(h){case"./locale/en.js":return Promise.resolve().then((function(){return rd}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return nd}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+h))}}var ed=function(){var h=_asyncToGenerator$1(regeneratorRuntime.mark((function _callee(h){var g;return regeneratorRuntime.wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(h),".js"));case 3:g=d.sent,d.next=12;break;case 6:return d.prev=6,d.t0=d.catch(0),console.error("Missing translation (".concat(h,") - using 'en'")),d.next=11,Promise.resolve().then((function(){return rd}));case 11:g=d.sent;case 12:return d.abrupt("return",g.default);case 13:case"end":return d.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(g){return h.apply(this,arguments)}}(),rd=(h("default",{name:"server_opensave",init:function init(h){var g=this;return _asyncToGenerator$1(regeneratorRuntime.mark((function _callee6(){var d,x,b,_,S,C,w,E,P,k,A,R,M,N,D,$,V,L,j;return regeneratorRuntime.wrap((function _callee6$(B){for(;;)switch(B.prev=B.next){case 0:return j=function _rebuildInput(h){h.empty();var g=d('<input type="file" name="svg_file">').appendTo(h);function submit(){return _submit.apply(this,arguments)}function _submit(){return(_submit=_asyncToGenerator$1(regeneratorRuntime.mark((function _callee5(){return regeneratorRuntime.wrap((function _callee5$(g){for(;;)switch(g.prev=g.next){case 0:return h.submit(),j(h),g.next=4,d.process_cancel(S.uploading);case 4:D=!0,d("#dialog_box").hide();case 6:case"end":return g.stop()}}),_callee5)})))).apply(this,arguments)}h[0]===$[0]?g.change(_asyncToGenerator$1(regeneratorRuntime.mark((function _callee3(){return regeneratorRuntime.wrap((function _callee3$(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,_.openPrep();case 2:if(g.sent){g.next=6;break}return j(h),g.abrupt("return");case 6:return g.next=8,submit();case 8:case"end":return g.stop()}}),_callee3)})))):g.change(_asyncToGenerator$1(regeneratorRuntime.mark((function _callee4(){return regeneratorRuntime.wrap((function _callee4$(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,submit();case 2:case"end":return h.stop()}}),_callee4)}))))},M=function _clientDownloadSuppor(h,g,x){return!w&&!E&&(!(""!==d("<a>")[0].download)&&(d("<a>hidden</a>").attr({download:(h||"image")+g,href:x}).css("display","none").appendTo("body")[0].click(),!0))},R=function _xhtmlEscape(h){return h.replace(/&(?!amp;)/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")},A=function _getFileNameFromTitle(){return k.getDocumentTitle().trim().replace(/[/\\:*?"<>|]/g,"_")},d=h.$,x=h.decode64,b=h.encode64,_=g,B.next=8,ed(_.configObj.pref("lang"));case 8:if(S=B.sent,C=_.curConfig,w=C.avoidClientSide,E=C.avoidClientSideDownload,P=C.avoidClientSideOpen,k=_.canvas,"./filesave.php",N="./filesave.php",D=!1,d('<iframe name="output_frame" title="'.concat(S.hiddenframe,'"\n style="width: 0; height: 0;" src="data:text/html;base64,PGh0bWw+"/>')).appendTo("body"),_.setCustomHandlers({save:function save(h,g){var x='<?xml version="1.0" encoding="UTF-8"?>\n'+g,_=A();M(_,".svg","data:image/svg+xml;charset=UTF-8;base64,"+b(x))||d("<form>").attr({method:"post",action:"./filesave.php",target:"output_frame"}).append('\n <input type="hidden" name="output_svg" value="'.concat(R(x),'">\n <input type="hidden" name="filename" value="').concat(R(_),'">\n ')).appendTo("body").submit().remove()},exportPDF:function exportPDF(h,g){var x=A(),b=g.output;M(x,".pdf",b)||d("<form>").attr({method:"post",action:N,target:"output_frame"}).append('\n <input type="hidden" name="output_img" value="'.concat(b,'">\n <input type="hidden" name="mime" value="application/pdf">\n <input type="hidden" name="filename" value="').concat(R(x),'">\n ')).appendTo("body").submit().remove()},exportImage:function exportImage(h,g){return _asyncToGenerator$1(regeneratorRuntime.mark((function _callee2(){var h,x,b,_,S,C,w,E,P;return regeneratorRuntime.wrap((function _callee2$(D){for(;;)switch(D.prev=D.next){case 0:return h=g.issues,x=g.mimeType,b=g.quality,d("#export_canvas").length||d("<canvas>",{id:"export_canvas"}).hide().appendTo("body"),(_=d("#export_canvas")[0]).width=k.contentW,_.height=k.contentH,D.next=7,td(_,g.svg);case 7:if(S=b?_.toDataURL(x,b):_.toDataURL(x),w="",h.length&&(C="\n • ",w+="\n\n\n • "+h.join(C)),w.length&&alert(w),E=A(),P="."+g.type.toLowerCase(),!M(E,P,S)){D.next=15;break}return D.abrupt("return");case 15:d("<form>").attr({method:"post",action:N,target:"output_frame"}).append('\n <input type="hidden" name="output_img" value="'.concat(S,'">\n <input type="hidden" name="mime" value="').concat(x,'">\n <input type="hidden" name="filename" value="').concat(R(E),'">\n ')).appendTo("body").submit().remove();case 16:case"end":return D.stop()}}),_callee2)})))()}}),!window.FileReader||P){B.next=16;break}return B.abrupt("return");case 16:"./fileopen.php?type=load_svg","./fileopen.php?type=import_svg","./fileopen.php?type=import_img",_.processFile=function(h,g){var b;if(D)D=!1;else switch(d("#dialog_box").hide(),"import_img"!==g&&(b=x(h)),g){case"load_svg":k.clear(),k.setSvgString(b),_.updateCanvas();break;case"import_svg":k.importSvgString(b),_.updateCanvas();break;case"import_img":k.setGoodImage(h)}},($=d("<form>")).attr({enctype:"multipart/form-data",method:"post",action:"./fileopen.php?type=load_svg",target:"output_frame"}),V=$.clone().attr("action","./fileopen.php?type=import_svg"),L=$.clone().attr("action","./fileopen.php?type=import_img"),j($),j(V),j(L),d("#tool_open").show().prepend($),d("#tool_import").show().prepend(V),d("#tool_image").prepend(L);case 30:case"end":return B.stop()}}),_callee6)})))()}}),Object.freeze({__proto__:null,default:{uploading:"Uploading...",hiddenframe:"Opensave frame to store hidden values"}})),nd=Object.freeze({__proto__:null,default:{uploading:"正在上传...",hiddenframe:"Opensave frame to store hidden values"}})}}}));