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

3 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.
import h from"process";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 g="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},d=check$1("object"==typeof globalThis&&globalThis)||check$1("object"==typeof window&&window)||check$1("object"==typeof self&&self)||check$1("object"==typeof g&&g)||function(){return this}()||Function("return this")(),fails$1=function(h){try{return!!h()}catch(h){return!0}},x=!fails$1((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),b={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,S={f:_&&!b.call({1:2},1)?function propertyIsEnumerable(h){var g=_(this,h);return!!g&&g.enumerable}:b},createPropertyDescriptor$1=function(h,g){return{enumerable:!(1&h),configurable:!(2&h),writable:!(4&h),value:g}},C={}.toString,classofRaw$1=function(h){return C.call(h).slice(8,-1)},w="".split,E=fails$1((function(){return!Object("z").propertyIsEnumerable(0)}))?function(h){return"String"==classofRaw$1(h)?w.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 E(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")},P={}.hasOwnProperty,has$3=function(h,g){return P.call(h,g)},k=d.document,A=isObject$1(k)&&isObject$1(k.createElement),documentCreateElement$1=function(h){return A?k.createElement(h):{}},R=!x&&!fails$1((function(){return 7!=Object.defineProperty(documentCreateElement$1("div"),"a",{get:function(){return 7}}).a})),M=Object.getOwnPropertyDescriptor,N={f:x?M:function getOwnPropertyDescriptor(h,g){if(h=toIndexedObject$1(h),g=toPrimitive$1(g,!0),R)try{return M(h,g)}catch(h){}if(has$3(h,g))return createPropertyDescriptor$1(!S.f.call(h,g),h[g])}},anObject$1=function(h){if(!isObject$1(h))throw TypeError(String(h)+" is not an object");return h},D=Object.defineProperty,$={f:x?D:function defineProperty(h,g,d){if(anObject$1(h),g=toPrimitive$1(g,!0),anObject$1(d),R)try{return D(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}},V=x?function(h,g,d){return $.f(h,g,createPropertyDescriptor$1(1,d))}:function(h,g,d){return h[g]=d,h},setGlobal$1=function(h,g){try{V(d,h,g)}catch(x){d[h]=g}return g},L=d["__core-js_shared__"]||setGlobal$1("__core-js_shared__",{}),j=Function.toString;"function"!=typeof L.inspectSource&&(L.inspectSource=function(h){return j.call(h)});var B,z,G,U=L.inspectSource,X=d.WeakMap,Y="function"==typeof X&&/native code/.test(U(X)),W=createCommonjsModule((function(h){(h.exports=function(h,g){return L[h]||(L[h]=void 0!==g?g:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),q=0,Q=Math.random(),uid$1=function(h){return"Symbol("+String(void 0===h?"":h)+")_"+(++q+Q).toString(36)},K=W("keys"),sharedKey$1=function(h){return K[h]||(K[h]=uid$1(h))},Z={},J=d.WeakMap;if(Y){var tt=L.state||(L.state=new J),et=tt.get,rt=tt.has,nt=tt.set;B=function(h,g){return g.facade=h,nt.call(tt,h,g),g},z=function(h){return et.call(tt,h)||{}},G=function(h){return rt.call(tt,h)}}else{var it=sharedKey$1("state");Z[it]=!0,B=function(h,g){return g.facade=h,V(h,it,g),g},z=function(h){return has$3(h,it)?h[it]:{}},G=function(h){return has$3(h,it)}}var at,ot,st={set:B,get:z,has:G,enforce:function(h){return G(h)?z(h):B(h,{})},getterFor:function(h){return function(g){var d;if(!isObject$1(g)||(d=z(g)).type!==h)throw TypeError("Incompatible receiver, "+h+" required");return d}}},ut=createCommonjsModule((function(h){var g=st.get,x=st.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")||V(_,"name",g),(C=x(_)).source||(C.source=b.join("string"==typeof g?g:""))),h!==d?(w?!P&&h[g]&&(E=!0):delete h[g],E?h[g]=_:V(h,g,_)):E?h[g]=_:setGlobal$1(g,_)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&g(this).source||U(this)}))})),ct=d,aFunction$3=function(h){return"function"==typeof h?h:void 0},getBuiltIn$1=function(h,g){return arguments.length<2?aFunction$3(ct[h])||aFunction$3(d[h]):ct[h]&&ct[h][g]||d[h]&&d[h][g]},lt=Math.ceil,ft=Math.floor,toInteger$1=function(h){return isNaN(h=+h)?0:(h>0?ft:lt)(h)},ht=Math.min,toLength$1=function(h){return h>0?ht(toInteger$1(h),9007199254740991):0},pt=Math.max,yt=Math.min,toAbsoluteIndex$1=function(h,g){var d=toInteger$1(h);return d<0?pt(d+g,0):yt(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}},vt={includes:createMethod$9(!0),indexOf:createMethod$9(!1)},gt=vt.indexOf,objectKeysInternal$1=function(h,g){var d,x=toIndexedObject$1(h),b=0,_=[];for(d in x)!has$3(Z,d)&&has$3(x,d)&&_.push(d);for(;g.length>b;)has$3(x,d=g[b++])&&(~gt(_,d)||_.push(d));return _},dt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=dt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function getOwnPropertyNames(h){return objectKeysInternal$1(h,mt)}},bt={f:Object.getOwnPropertySymbols},_t=getBuiltIn$1("Reflect","ownKeys")||function ownKeys(h){var g=xt.f(anObject$1(h)),d=bt.f;return d?g.concat(d(h)):g},copyConstructorProperties=function(h,g){for(var d=_t(g),x=$.f,b=N.f,_=0;_<d.length;_++){var S=d[_];has$3(h,S)||x(h,S,b(g,S))}},St=/#|\.prototype\./,isForced$1=function(h,g){var d=wt[Ct(h)];return d==Pt||d!=Et&&("function"==typeof g?fails$1(g):!!g)},Ct=isForced$1.normalize=function(h){return String(h).replace(St,".").toLowerCase()},wt=isForced$1.data={},Et=isForced$1.NATIVE="N",Pt=isForced$1.POLYFILL="P",Ot=isForced$1,Tt=N.f,_export$1=function(h,g){var x,b,_,S,C,w=h.target,E=h.global,P=h.stat;if(x=E?d:P?d[w]||setGlobal$1(w,{}):(d[w]||{}).prototype)for(b in g){if(S=g[b],_=h.noTargetGet?(C=Tt(x,b))&&C.value:x[b],!Ot(E?b:w+(P?".":"#")+b,h.forced)&&void 0!==_){if(typeof S==typeof _)continue;copyConstructorProperties(S,_)}(h.sham||_&&_.sham)&&V(S,"sham",!0),ut(x,b,S,h)}},kt="process"==classofRaw$1(d.process),At=getBuiltIn$1("navigator","userAgent")||"",Rt=d.process,Mt=Rt&&Rt.versions,Nt=Mt&&Mt.v8;Nt?ot=(at=Nt.split("."))[0]+at[1]:At&&(!(at=At.match(/Edge\/(\d+)/))||at[1]>=74)&&(at=At.match(/Chrome\/(\d+)/))&&(ot=at[1]);var It,Dt=ot&&+ot,$t=!!Object.getOwnPropertySymbols&&!fails$1((function(){return!Symbol.sham&&(kt?38===Dt:Dt>37&&Dt<41)})),Vt=$t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Lt=Array.isArray||function isArray(h){return"Array"==classofRaw$1(h)},toObject$1=function(h){return Object(requireObjectCoercible$1(h))},jt=Object.keys||function keys(h){return objectKeysInternal$1(h,dt)},Ft=x?Object.defineProperties:function defineProperties(h,g){anObject$1(h);for(var d,x=jt(g),b=x.length,_=0;b>_;)$.f(h,d=x[_++],g[d]);return h},Bt=getBuiltIn$1("document","documentElement"),zt=sharedKey$1("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(h){return"<script>"+h+"<\/script>"},NullProtoObject=function(){try{It=document.domain&&new ActiveXObject("htmlfile")}catch(h){}var h,g;NullProtoObject=It?function(h){h.write(scriptTag$1("")),h.close();var g=h.parentWindow.Object;return h=null,g}(It):((g=documentCreateElement$1("iframe")).style.display="none",Bt.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=dt.length;d--;)delete NullProtoObject.prototype[dt[d]];return NullProtoObject()};Z[zt]=!0;var Gt=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[zt]=h):d=NullProtoObject(),void 0===g?d:Ft(d,g)},Ut=xt.f,Ht={}.toString,Xt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Yt={f:function getOwnPropertyNames(h){return Xt&&"[object Window]"==Ht.call(h)?function(h){try{return Ut(h)}catch(h){return Xt.slice()}}(h):Ut(toIndexedObject$1(h))}},Wt=W("wks"),qt=d.Symbol,Qt=Vt?qt:qt&&qt.withoutSetter||uid$1,wellKnownSymbol$1=function(h){return has$3(Wt,h)&&($t||"string"==typeof Wt[h])||($t&&has$3(qt,h)?Wt[h]=qt[h]:Wt[h]=Qt("Symbol."+h)),Wt[h]},Kt={f:wellKnownSymbol$1},Zt=$.f,defineWellKnownSymbol$1=function(h){var g=ct.Symbol||(ct.Symbol={});has$3(g,h)||Zt(g,h,{value:Kt.f(h)})},Jt=$.f,te=wellKnownSymbol$1("toStringTag"),setToStringTag$1=function(h,g,d){h&&!has$3(h=d?h:h.prototype,te)&&Jt(h,te,{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)}},ee=wellKnownSymbol$1("species"),arraySpeciesCreate$1=function(h,g){var d;return Lt(h)&&("function"!=typeof(d=h.constructor)||d!==Array&&!Lt(d.prototype)?isObject$1(d)&&null===(d=d[ee])&&(d=void 0):d=void 0),new(void 0===d?Array:d)(0===g?0:g)},re=[].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,P,k,A){for(var R,M,N=toObject$1(w),D=E(N),$=functionBindContext$1(P,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:re.call(B,R)}else switch(h){case 4:return!1;case 7:re.call(B,R)}return _?-1:x||b?b:B}},ne={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)},ie=ne.forEach,ae=sharedKey$1("hidden"),oe=wellKnownSymbol$1("toPrimitive"),se=st.set,ue=st.getterFor("Symbol"),ce=Object.prototype,le=d.Symbol,fe=getBuiltIn$1("JSON","stringify"),he=N.f,pe=$.f,ye=Yt.f,ve=S.f,ge=W("symbols"),de=W("op-symbols"),me=W("string-to-symbol-registry"),xe=W("symbol-to-string-registry"),be=W("wks"),_e=d.QObject,Se=!_e||!_e.prototype||!_e.prototype.findChild,Ce=x&&fails$1((function(){return 7!=Gt(pe({},"a",{get:function(){return pe(this,"a",{value:7}).a}})).a}))?function(h,g,d){var x=he(ce,g);x&&delete ce[g],pe(h,g,d),x&&h!==ce&&pe(ce,g,x)}:pe,wrap$1=function(h,g){var d=ge[h]=Gt(le.prototype);return se(d,{type:"Symbol",tag:h,description:g}),x||(d.description=g),d},we=Vt?function(h){return"symbol"==typeof h}:function(h){return Object(h)instanceof le},Ee=function defineProperty(h,g,d){h===ce&&Ee(de,g,d),anObject$1(h);var x=toPrimitive$1(g,!0);return anObject$1(d),has$3(ge,x)?(d.enumerable?(has$3(h,ae)&&h[ae][x]&&(h[ae][x]=!1),d=Gt(d,{enumerable:createPropertyDescriptor$1(0,!1)})):(has$3(h,ae)||pe(h,ae,createPropertyDescriptor$1(1,{})),h[ae][x]=!0),Ce(h,x,d)):pe(h,x,d)},Pe=function defineProperties(h,g){anObject$1(h);var d=toIndexedObject$1(g),b=jt(d).concat(Ae(d));return ie(b,(function(g){x&&!Oe.call(d,g)||Ee(h,g,d[g])})),h},Oe=function propertyIsEnumerable(h){var g=toPrimitive$1(h,!0),d=ve.call(this,g);return!(this===ce&&has$3(ge,g)&&!has$3(de,g))&&(!(d||!has$3(this,g)||!has$3(ge,g)||has$3(this,ae)&&this[ae][g])||d)},Te=function getOwnPropertyDescriptor(h,g){var d=toIndexedObject$1(h),x=toPrimitive$1(g,!0);if(d!==ce||!has$3(ge,x)||has$3(de,x)){var b=he(d,x);return!b||!has$3(ge,x)||has$3(d,ae)&&d[ae][x]||(b.enumerable=!0),b}},ke=function getOwnPropertyNames(h){var g=ye(toIndexedObject$1(h)),d=[];return ie(g,(function(h){has$3(ge,h)||has$3(Z,h)||d.push(h)})),d},Ae=function getOwnPropertySymbols(h){var g=h===ce,d=ye(g?de:toIndexedObject$1(h)),x=[];return ie(d,(function(h){!has$3(ge,h)||g&&!has$3(ce,h)||x.push(ge[h])})),x};if($t||(ut((le=function Symbol(){if(this instanceof le)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===ce&&setter.call(de,h),has$3(this,ae)&&has$3(this[ae],g)&&(this[ae][g]=!1),Ce(this,g,createPropertyDescriptor$1(1,h))};return x&&Se&&Ce(ce,g,{configurable:!0,set:setter}),wrap$1(g,h)}).prototype,"toString",(function toString(){return ue(this).tag})),ut(le,"withoutSetter",(function(h){return wrap$1(uid$1(h),h)})),S.f=Oe,$.f=Ee,N.f=Te,xt.f=Yt.f=ke,bt.f=Ae,Kt.f=function(h){return wrap$1(wellKnownSymbol$1(h),h)},x&&(pe(le.prototype,"description",{configurable:!0,get:function description(){return ue(this).description}}),ut(ce,"propertyIsEnumerable",Oe,{unsafe:!0}))),_export$1({global:!0,wrap:!0,forced:!$t,sham:!$t},{Symbol:le}),ie(jt(be),(function(h){defineWellKnownSymbol$1(h)})),_export$1({target:"Symbol",stat:!0,forced:!$t},{for:function(h){var g=String(h);if(has$3(me,g))return me[g];var d=le(g);return me[g]=d,xe[d]=g,d},keyFor:function keyFor(h){if(!we(h))throw TypeError(h+" is not a symbol");if(has$3(xe,h))return xe[h]},useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),_export$1({target:"Object",stat:!0,forced:!$t,sham:!x},{create:function create(h,g){return void 0===g?Gt(h):Pe(Gt(h),g)},defineProperty:Ee,defineProperties:Pe,getOwnPropertyDescriptor:Te}),_export$1({target:"Object",stat:!0,forced:!$t},{getOwnPropertyNames:ke,getOwnPropertySymbols:Ae}),_export$1({target:"Object",stat:!0,forced:fails$1((function(){bt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(h){return bt.f(toObject$1(h))}}),fe){var Re=!$t||fails$1((function(){var h=le();return"[null]"!=fe([h])||"{}"!=fe({a:h})||"{}"!=fe(Object(h))}));_export$1({target:"JSON",stat:!0,forced:Re},{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)&&!we(h))return Lt(g)||(g=function(h,g){if("function"==typeof x&&(g=x.call(this,h,g)),!we(g))return g}),b[1]=g,fe.apply(null,b)}})}le.prototype[oe]||V(le.prototype,oe,le.prototype.valueOf),setToStringTag$1(le,"Symbol"),Z[ae]=!0;var Me=$.f,Ne=d.Symbol;if(x&&"function"==typeof Ne&&(!("description"in Ne.prototype)||void 0!==Ne().description)){var Ie={},De=function Symbol(){var h=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),g=this instanceof De?new Ne(h):void 0===h?Ne():Ne(h);return""===h&&(Ie[g]=!0),g};copyConstructorProperties(De,Ne);var $e=De.prototype=Ne.prototype;$e.constructor=De;var Ve=$e.toString,Le="Symbol(test)"==String(Ne("test")),je=/^Symbol\((.*)\)[^)]+$/;Me($e,"description",{configurable:!0,get:function description(){var h=isObject$1(this)?this.valueOf():this,g=Ve.call(h);if(has$3(Ie,h))return"";var d=Le?g.slice(7,-1):g.replace(je,"$1");return""===d?void 0:d}}),_export$1({global:!0,forced:!0},{Symbol:De})}var Fe={};Fe[wellKnownSymbol$1("toStringTag")]="z";var Be="[object z]"===String(Fe),ze=wellKnownSymbol$1("toStringTag"),Ge="Arguments"==classofRaw$1(function(){return arguments}()),Ue=Be?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),ze))?d:Ge?classofRaw$1(g):"Object"==(x=classofRaw$1(g))&&"function"==typeof g.callee?"Arguments":x},He=Be?{}.toString:function toString(){return"[object "+Ue(this)+"]"};Be||ut(Object.prototype,"toString",He,{unsafe:!0}),defineWellKnownSymbol$1("iterator");var Xe,Ye,We,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}},qe={codeAt:createMethod$7(!1),charAt:createMethod$7(!0)},Qe=!fails$1((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ke=sharedKey$1("IE_PROTO"),Ze=Object.prototype,Je=Qe?Object.getPrototypeOf:function(h){return h=toObject$1(h),has$3(h,Ke)?h[Ke]:"function"==typeof h.constructor&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?Ze:null},tr=wellKnownSymbol$1("iterator"),er=!1;[].keys&&("next"in(We=[].keys())?(Ye=Je(Je(We)))!==Object.prototype&&(Xe=Ye):er=!0),(null==Xe||fails$1((function(){var h={};return Xe[tr].call(h)!==h})))&&(Xe={}),has$3(Xe,tr)||V(Xe,tr,(function(){return this}));var rr={IteratorPrototype:Xe,BUGGY_SAFARI_ITERATORS:er},nr={},ir=rr.IteratorPrototype,returnThis$4=function(){return this},ar=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),or=rr.IteratorPrototype,sr=rr.BUGGY_SAFARI_ITERATORS,ur=wellKnownSymbol$1("iterator"),returnThis$3=function(){return this},defineIterator$1=function(h,g,d,x,b,_,S){!function(h,g,d){var x=g+" Iterator";h.prototype=Gt(ir,{next:createPropertyDescriptor$1(1,d)}),setToStringTag$1(h,x,!1),nr[x]=returnThis$4}(d,g,x);var C,w,E,getIterationMethod=function(h){if(h===b&&M)return M;if(!sr&&h in A)return A[h];switch(h){case"keys":return function keys(){return new d(this,h)};case"values":return function values(){return new d(this,h)};case"entries":return function entries(){return new d(this,h)}}return function(){return new d(this)}},P=g+" Iterator",k=!1,A=h.prototype,R=A[ur]||A["@@iterator"]||b&&A[b],M=!sr&&R||getIterationMethod(b),N="Array"==g&&A.entries||R;if(N&&(C=Je(N.call(new h)),or!==Object.prototype&&C.next&&(Je(C)!==or&&(ar?ar(C,or):"function"!=typeof C[ur]&&V(C,ur,returnThis$3)),setToStringTag$1(C,P,!0))),"values"==b&&R&&"values"!==R.name&&(k=!0,M=function values(){return R.call(this)}),A[ur]!==M&&V(A,ur,M),nr[g]=M,b)if(w={values:getIterationMethod("values"),keys:_?M:getIterationMethod("keys"),entries:getIterationMethod("entries")},S)for(E in w)(sr||k||!(E in A))&&ut(A,E,w[E]);else _export$1({target:g,proto:!0,forced:sr||k},w);return w},cr=qe.charAt,lr=st.set,fr=st.getterFor("String Iterator");defineIterator$1(String,"String",(function(h){lr(this,{type:"String Iterator",string:String(h),index:0})}),(function next(){var h,g=fr(this),d=g.string,x=g.index;return x>=d.length?{value:void 0,done:!0}:(h=cr(d,x),g.index+=h.length,{value:h,done:!1})}));var hr=wellKnownSymbol$1("unscopables"),pr=Array.prototype;null==pr[hr]&&$.f(pr,hr,{configurable:!0,value:Gt(null)});var addToUnscopables=function(h){pr[hr][h]=!0},yr=st.set,vr=st.getterFor("Array Iterator"),gr=defineIterator$1(Array,"Array",(function(h,g){yr(this,{type:"Array Iterator",target:toIndexedObject$1(h),index:0,kind:g})}),(function(){var h=vr(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");nr.Arguments=nr.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var dr={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},mr=wellKnownSymbol$1("iterator"),xr=wellKnownSymbol$1("toStringTag"),br=gr.values;for(var _r in dr){var Sr=d[_r],Cr=Sr&&Sr.prototype;if(Cr){if(Cr[mr]!==br)try{V(Cr,mr,br)}catch(h){Cr[mr]=br}if(Cr[xr]||V(Cr,xr,_r),dr[_r])for(var wr in gr)if(Cr[wr]!==gr[wr])try{V(Cr,wr,gr[wr])}catch(h){Cr[wr]=gr[wr]}}}defineWellKnownSymbol$1("asyncIterator"),defineWellKnownSymbol$1("toStringTag"),setToStringTag$1(Math,"Math",!0),setToStringTag$1(d.JSON,"JSON",!0);var Er=fails$1((function(){Je(1)}));_export$1({target:"Object",stat:!0,forced:Er,sham:!Qe},{getPrototypeOf:function getPrototypeOf(h){return Je(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)}))},Pr=ne.forEach,Or=arrayMethodIsStrict$1("forEach")?[].forEach:function forEach(h){return Pr(this,h,arguments.length>1?arguments[1]:void 0)};_export$1({target:"Array",proto:!0,forced:[].forEach!=Or},{forEach:Or});var Tr=$.f,kr=Function.prototype,Ar=kr.toString,Rr=/^\s*function ([^ (]*)/;x&&!("name"in kr)&&Tr(kr,"name",{configurable:!0,get:function(){try{return Ar.call(this).match(Rr)[1]}catch(h){return""}}}),_export$1({target:"Object",stat:!0},{setPrototypeOf:ar});var Mr=d.Promise,redefineAll$1=function(h,g,d){for(var x in g)ut(h,x,g[x],d);return h},Nr=wellKnownSymbol$1("species"),setSpecies$1=function(h){var g=getBuiltIn$1(h),d=$.f;x&&g&&!g[Nr]&&d(g,Nr,{configurable:!0,get:function(){return this}})},anInstance$1=function(h,g,d){if(!(h instanceof g))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return h},Ir=wellKnownSymbol$1("iterator"),Dr=Array.prototype,isArrayIteratorMethod$1=function(h){return void 0!==h&&(nr.Array===h||Dr[Ir]===h)},$r=wellKnownSymbol$1("iterator"),getIteratorMethod$2=function(h){if(null!=h)return h[$r]||h["@@iterator"]||nr[Ue(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)},Vr=wellKnownSymbol$1("iterator"),Lr=!1;try{var jr=0,Fr={next:function(){return{done:!!jr++}},return:function(){Lr=!0}};Fr[Vr]=function(){return this},Array.from(Fr,(function(){throw 2}))}catch(h){}var Br,zr,Gr,checkCorrectnessOfIteration$1=function(h,g){if(!g&&!Lr)return!1;var d=!1;try{var x={};x[Vr]=function(){return{next:function(){return{done:d=!0}}}},h(x)}catch(h){}return d},Ur=wellKnownSymbol$1("species"),speciesConstructor$1=function(h,g){var d,x=anObject$1(h).constructor;return void 0===x||null==(d=anObject$1(x)[Ur])?g:aFunction$2(d)},Hr=/(iphone|ipod|ipad).*applewebkit/i.test(At),Xr=d.location,Yr=d.setImmediate,Wr=d.clearImmediate,qr=d.process,Qr=d.MessageChannel,Kr=d.Dispatch,Zr=0,Jr={},run$1=function(h){if(Jr.hasOwnProperty(h)){var g=Jr[h];delete Jr[h],g()}},runner$1=function(h){return function(){run$1(h)}},listener$1=function(h){run$1(h.data)},post$1=function(h){d.postMessage(h+"",Xr.protocol+"//"+Xr.host)};Yr&&Wr||(Yr=function setImmediate(h){for(var g=[],d=1;arguments.length>d;)g.push(arguments[d++]);return Jr[++Zr]=function(){("function"==typeof h?h:Function(h)).apply(void 0,g)},Br(Zr),Zr},Wr=function clearImmediate(h){delete Jr[h]},kt?Br=function(h){qr.nextTick(runner$1(h))}:Kr&&Kr.now?Br=function(h){Kr.now(runner$1(h))}:Qr&&!Hr?(Gr=(zr=new Qr).port2,zr.port1.onmessage=listener$1,Br=functionBindContext$1(Gr.postMessage,Gr,1)):d.addEventListener&&"function"==typeof postMessage&&!d.importScripts&&Xr&&"file:"!==Xr.protocol&&!fails$1(post$1)?(Br=post$1,d.addEventListener("message",listener$1,!1)):Br="onreadystatechange"in documentCreateElement$1("script")?function(h){Bt.appendChild(documentCreateElement$1("script")).onreadystatechange=function(){Bt.removeChild(this),run$1(h)}}:function(h){setTimeout(runner$1(h),0)});var tn,en,rn,nn,an,on,sn,un,cn={set:Yr,clear:Wr},ln=/web0s(?!.*chrome)/i.test(At),fn=N.f,hn=cn.set,pn=d.MutationObserver||d.WebKitMutationObserver,yn=d.document,vn=d.process,gn=d.Promise,dn=fn(d,"queueMicrotask"),mn=dn&&dn.value;mn||(tn=function(){var h,g;for(kt&&(h=vn.domain)&&h.exit();en;){g=en.fn,en=en.next;try{g()}catch(h){throw en?nn():rn=void 0,h}}rn=void 0,h&&h.enter()},Hr||kt||ln||!pn||!yn?gn&&gn.resolve?(sn=gn.resolve(void 0),un=sn.then,nn=function(){un.call(sn,tn)}):nn=kt?function(){vn.nextTick(tn)}:function(){hn.call(d,tn)}:(an=!0,on=yn.createTextNode(""),new pn(tn).observe(on,{characterData:!0}),nn=function(){on.data=an=!an}));var xn,bn,_n,Sn,Cn=mn||function(h){var g={fn:h,next:void 0};rn&&(rn.next=g),en||(en=g,nn()),rn=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)},wn={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=wn.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}}},En=cn.set,Pn=wellKnownSymbol$1("species"),On=st.get,Tn=st.set,kn=st.getterFor("Promise"),An=Mr,Rn=d.TypeError,Mn=d.document,Nn=d.process,In=getBuiltIn$1("fetch"),Dn=wn.f,$n=Dn,Vn=!!(Mn&&Mn.createEvent&&d.dispatchEvent),Ln="function"==typeof PromiseRejectionEvent,jn=Ot("Promise",(function(){if(!(U(An)!==String(An))){if(66===Dt)return!0;if(!kt&&!Ln)return!0}if(Dt>=51&&/native code/.test(An))return!1;var h=An.resolve(1),FakePromise=function(h){h((function(){}),(function(){}))};return(h.constructor={})[Pn]=FakePromise,!(h.then((function(){}))instanceof FakePromise)})),Fn=jn||!checkCorrectnessOfIteration$1((function(h){An.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;Cn((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(Rn("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,x){var b,_;Vn?((b=Mn.createEvent("Event")).promise=g,b.reason=x,b.initEvent(h,!1,!0),d.dispatchEvent(b)):b={promise:g,reason:x},!Ln&&(_=d["on"+h])?_(b):"unhandledrejection"===h&&function(h,g){var x=d.console;x&&x.error&&(1===arguments.length?x.error(h):x.error(h,g))}("Unhandled promise rejection",x)},onUnhandled$1=function(h){En.call(d,(function(){var g,d=h.facade,x=h.value;if(isUnhandled$1(h)&&(g=perform$1((function(){kt?Nn.emit("unhandledRejection",x,d):dispatchEvent$1("unhandledrejection",d,x)})),h.rejection=kt||isUnhandled$1(h)?2:1,g.error))throw g.value}))},isUnhandled$1=function(h){return 1!==h.rejection&&!h.parent},onHandleUnhandled$1=function(h){En.call(d,(function(){var g=h.facade;kt?Nn.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 Rn("Promise can't be resolved itself");var x=isThenable$1(g);x?Cn((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)}}};jn&&(An=function Promise(h){anInstance$1(this,An,"Promise"),aFunction$2(h),xn.call(this);var g=On(this);try{h(bind$4(internalResolve$1,g),bind$4(internalReject$1,g))}catch(h){internalReject$1(g,h)}},(xn=function Promise(h){Tn(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll$1(An.prototype,{then:function then(h,g){var d=kn(this),x=Dn(speciesConstructor$1(this,An));return x.ok="function"!=typeof h||h,x.fail="function"==typeof g&&g,x.domain=kt?Nn.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)}}),bn=function(){var h=new xn,g=On(h);this.promise=h,this.resolve=bind$4(internalResolve$1,g),this.reject=bind$4(internalReject$1,g)},wn.f=Dn=function(h){return h===An||h===_n?new bn(h):$n(h)},"function"==typeof Mr&&(Sn=Mr.prototype.then,ut(Mr.prototype,"then",(function then(h,g){var d=this;return new An((function(h,g){Sn.call(d,h,g)})).then(h,g)}),{unsafe:!0}),"function"==typeof In&&_export$1({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(h){return promiseResolve$1(An,In.apply(d,arguments))}}))),_export$1({global:!0,wrap:!0,forced:jn},{Promise:An}),setToStringTag$1(An,"Promise",!1),setSpecies$1("Promise"),_n=getBuiltIn$1("Promise"),_export$1({target:"Promise",stat:!0,forced:jn},{reject:function reject(h){var g=Dn(this);return g.reject.call(void 0,h),g.promise}}),_export$1({target:"Promise",stat:!0,forced:jn},{resolve:function resolve(h){return promiseResolve$1(this,h)}}),_export$1({target:"Promise",stat:!0,forced:Fn},{all:function all(h){var g=this,d=Dn(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=Dn(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},Bn=RegExp.prototype,zn=Bn.toString,Gn=fails$1((function(){return"/a/b"!=zn.call({source:"a",flags:"b"})})),Un="toString"!=zn.name;for(var Hn in(Gn||Un)&&ut(RegExp.prototype,"toString",(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 Bn)?regexpFlags.call(h):d)}),{unsafe:!0}),dr){var Xn=d[Hn],Yn=Xn&&Xn.prototype;if(Yn&&Yn.forEach!==Or)try{V(Yn,"forEach",Or)}catch(h){Yn.forEach=Or}}var Wn=[].reverse,qn=[1,2];_export$1({target:"Array",proto:!0,forced:String(qn)===String(qn.reverse())},{reverse:function reverse(){return Lt(this)&&(this.length=this.length),Wn.call(this)}});var createProperty$1=function(h,g,d){var x=toPrimitive$1(g);x in h?$.f(h,x,createPropertyDescriptor$1(0,d)):h[x]=d},Qn=wellKnownSymbol$1("species"),arrayMethodHasSpeciesSupport$1=function(h){return Dt>=51||!fails$1((function(){var g=[];return(g.constructor={})[Qn]=function(){return{foo:1}},1!==g[h](Boolean).foo}))},Kn=arrayMethodHasSpeciesSupport$1("slice"),Zn=wellKnownSymbol$1("species"),Jn=[].slice,ti=Math.max;_export$1({target:"Array",proto:!0,forced:!Kn},{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(Lt(_)&&("function"!=typeof(d=_.constructor)||d!==Array&&!Lt(d.prototype)?isObject$1(d)&&null===(d=d[Zn])&&(d=void 0):d=void 0,d===Array||void 0===d))return Jn.call(_,C,w);for(x=new(void 0===d?Array:d)(ti(w-C,0)),b=0;C<w;C++,b++)C in _&&createProperty$1(x,b,_[C]);return x.length=b,x}});var ei=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 ri={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")}))},ni=RegExp.prototype.exec,ii=String.prototype.replace,ai=ni,oi=function(){var h=/a/,g=/b*/g;return ni.call(h,"a"),ni.call(g,"a"),0!==h.lastIndex||0!==g.lastIndex}(),si=ri.UNSUPPORTED_Y||ri.BROKEN_CARET,ui=void 0!==/()??/.exec("")[1];(oi||ui||si)&&(ai=function exec(h){var g,d,x,b,_=this,S=si&&_.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)),ui&&(d=new RegExp("^"+w+"$(?!\\s)",C)),oi&&(g=_.lastIndex),x=ni.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:oi&&x&&(_.lastIndex=_.global?x.index+x[0].length:g),ui&&x&&x.length>1&&ii.call(x[0],d,(function(){for(b=1;b<arguments.length-2;b++)void 0===arguments[b]&&(x[b]=void 0)})),x});var ci=ai;_export$1({target:"RegExp",proto:!0,forced:/./.exec!==ci},{exec:ci});var li=wellKnownSymbol$1("species"),fi=!fails$1((function(){var h=/./;return h.exec=function(){var h=[];return h.groups={a:"7"},h},"7"!=="".replace(h,"$<a>")})),hi="$0"==="a".replace(/./,"$0"),pi=wellKnownSymbol$1("replace"),yi=!!/./[pi]&&""===/./[pi]("a","$0"),vi=!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[li]=function(){return d},d.flags="",d[b]=/./[b]),d.exec=function(){return g=!0,null},d[b](""),!g}));if(!_||!S||"replace"===h&&(!fi||!hi||yi)||"split"===h&&!vi){var C=/./[b],w=d(b,""[h],(function(h,g,d,x,b){return g.exec===ci?_&&!b?{done:!0,value:C.call(g,d,x)}:{done:!0,value:h.call(d,g,x)}:{done:!1}}),{REPLACE_KEEPS_$0:hi,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:yi}),E=w[0],P=w[1];ut(String.prototype,h,E),ut(RegExp.prototype,b,2==g?function(h,g){return P.call(h,this,g)}:function(h){return P.call(h,this)})}x&&V(RegExp.prototype[b],"sham",!0)},gi=qe.charAt,advanceStringIndex=function(h,g,d){return g+(d?gi(h,g).length:1)},di=Math.floor,mi="".replace,xi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bi=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(h,g,d,x,b,_){var S=d+h.length,C=x.length,w=bi;return void 0!==b&&(b=toObject$1(b),w=xi),mi.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=di(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 ci.call(h,g)},_i=Math.max,Si=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=_i(Si(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 Ci="\t\n\v\f\r    \u2028\u2029\ufeff",wi="["+Ci+"]",Ei=RegExp("^"+wi+wi+"*"),Pi=RegExp(wi+wi+"*$"),createMethod$6=function(h){return function(g){var d=String(requireObjectCoercible$1(g));return 1&h&&(d=d.replace(Ei,"")),2&h&&(d=d.replace(Pi,"")),d}},Oi={start:createMethod$6(1),end:createMethod$6(2),trim:createMethod$6(3)},Ti=Oi.trim;_export$1({target:"String",proto:!0,forced:function(h){return fails$1((function(){return!!Ci[h]()||"…"!="…"[h]()||Ci[h].name!==h}))}("trim")},{trim:function trim(){return Ti(this)}});var ki=wellKnownSymbol$1("isConcatSpreadable"),Ai=Dt>=51||!fails$1((function(){var h=[];return h[ki]=!1,h.concat()[0]!==h})),Ri=arrayMethodHasSpeciesSupport$1("concat"),isConcatSpreadable$1=function(h){if(!isObject$1(h))return!1;var g=h[ki];return void 0!==g?!!g:Lt(h)};_export$1({target:"Array",proto:!0,forced:!Ai||!Ri},{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))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(d=0;d<b;d++,w++)d in _&&createProperty$1(C,w,_[d])}else{if(w>=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty$1(C,w++,_)}return C.length=w,C}});var Mi=[].join,Ni=E!=Object,Ii=arrayMethodIsStrict$1("join",",");_export$1({target:"Array",proto:!0,forced:Ni||!Ii},{join:function join(h){return Mi.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 Di=wellKnownSymbol$1("match"),isRegexp$1=function(h){var g;return isObject$1(h)&&(void 0!==(g=h[Di])?!!g:"RegExp"==classofRaw$1(h))},$i=[].push,Vi=Math.min,Li=!fails$1((function(){return!RegExp(4294967295,"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?4294967295: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");(_=ci.call(k,x))&&!((S=k.lastIndex)>P&&(w.push(x.slice(P,_.index)),_.length>1&&_.index<x.length&&$i.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":"")+(Li?"y":"g"),k=new w(Li?S:"^(?:"+S.source+")",P),A=void 0===b?4294967295: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=Li?M:0;var D,$=regexpExecAbstract(k,Li?C:C.slice(M));if(null===$||(D=Vi(toLength$1(k.lastIndex+(Li?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}]}),!Li);var inheritIfRequired=function(h,g,d){var x,b;return ar&&"function"==typeof(x=g.constructor)&&x!==d&&isObject$1(b=x.prototype)&&b!==d.prototype&&ar(h,b),h},ji=xt.f,Fi=N.f,Bi=$.f,zi=Oi.trim,Gi=d.Number,Ui=Gi.prototype,Hi="Number"==classofRaw$1(Gt(Ui)),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=zi(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(Ot("Number",!Gi(" 0o1")||!Gi("0b1")||Gi("+0x1"))){for(var Xi,Yi=function Number(h){var g=arguments.length<1?0:h,d=this;return d instanceof Yi&&(Hi?fails$1((function(){Ui.valueOf.call(d)})):"Number"!=classofRaw$1(d))?inheritIfRequired(new Gi(toNumber(g)),d,Yi):toNumber(g)},Wi=x?ji(Gi):"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(","),qi=0;Wi.length>qi;qi++)has$3(Gi,Xi=Wi[qi])&&!has$3(Yi,Xi)&&Bi(Yi,Xi,Fi(Gi,Xi));Yi.prototype=Ui,Ui.constructor=Yi,ut(d,"Number",Yi)}_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 Qi=!fails$1((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ki=createCommonjsModule((function(h){var g=$.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 Qi&&_.REQUIRED&&b(h)&&!has$3(h,d)&&setMetadata(h),h}};Z[d]=!0})),Zi=Ki.onFreeze,Ji=Object.freeze,ta=fails$1((function(){Ji(1)}));_export$1({target:"Object",stat:!0,forced:ta,sham:!Qi},{freeze:function freeze(h){return Ji&&isObject$1(h)?Ji(Zi(h)):h}});var ea,notARegexp$1=function(h){if(isRegexp$1(h))throw TypeError("The method doesn't accept regular expressions");return h},ra=wellKnownSymbol$1("match"),correctIsRegexpLogic$1=function(h){var g=/./;try{"/./"[h](g)}catch(d){try{return g[ra]=!1,"/./"[h](g)}catch(h){}}return!1},na=N.f,ia="".startsWith,aa=Math.min,oa=correctIsRegexpLogic$1("startsWith"),sa=!(oa||(ea=na(String.prototype,"startsWith"),!ea||ea.writable));_export$1({target:"String",proto:!0,forced:!sa&&!oa},{startsWith:function startsWith(h){var g=String(requireObjectCoercible$1(this));notARegexp$1(h);var d=toLength$1(aa(arguments.length>1?arguments[1]:void 0,g.length)),x=String(h);return ia?ia.call(g,x,d):g.slice(d,d+x.length)===x}}),_export$1({global:!0},{globalThis:d});var ua=function check(h){return h&&h.Math==Math&&h},ca=ua("object"==("undefined"==typeof globalThis?"undefined":_typeof$2(globalThis))&&globalThis)||ua("object"==("undefined"==typeof window?"undefined":_typeof$2(window))&&window)||ua("object"==("undefined"==typeof self?"undefined":_typeof$2(self))&&self)||ua("object"==_typeof$2(g)&&g)||function(){return this}()||Function("return this")(),la=N.f,fa=fails$1((function(){la(1)}));_export$1({target:"Object",stat:!0,forced:!x||fa,sham:!x},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(h,g){return la(toIndexedObject$1(h),g)}});var ha,pa,ya=function fails(h){try{return!!h()}catch(h){return!0}},va=!ya((function(){return 7!=Object.defineProperty({},1,{get:function get(){return 7}})[1]})),ga={}.propertyIsEnumerable,da=Object.getOwnPropertyDescriptor,ma={f:da&&!ga.call({1:2},1)?function propertyIsEnumerable(h){var g=da(this,h);return!!g&&g.enumerable}:ga},xa=function createPropertyDescriptor(h,g){return{enumerable:!(1&h),configurable:!(2&h),writable:!(4&h),value:g}},ba={}.toString,_a=function classofRaw(h){return ba.call(h).slice(8,-1)},Sa="".split,Ca=ya((function(){return!Object("z").propertyIsEnumerable(0)}))?function(h){return"String"==_a(h)?Sa.call(h,""):Object(h)}:Object,wa=function requireObjectCoercible(h){if(null==h)throw TypeError("Can't call method on "+h);return h},Ea=function toIndexedObject(h){return Ca(wa(h))},Pa=function isObject(h){return"object"===_typeof$2(h)?null!==h:"function"==typeof h},Oa=function toPrimitive(h,g){if(!Pa(h))return h;var d,x;if(g&&"function"==typeof(d=h.toString)&&!Pa(x=d.call(h)))return x;if("function"==typeof(d=h.valueOf)&&!Pa(x=d.call(h)))return x;if(!g&&"function"==typeof(d=h.toString)&&!Pa(x=d.call(h)))return x;throw TypeError("Can't convert object to primitive value")},Ta={}.hasOwnProperty,ka=function has(h,g){return Ta.call(h,g)},Aa=ca.document,Ra=Pa(Aa)&&Pa(Aa.createElement),Ma=function documentCreateElement(h){return Ra?Aa.createElement(h):{}},Na=!va&&!ya((function(){return 7!=Object.defineProperty(Ma("div"),"a",{get:function get(){return 7}}).a})),Ia=Object.getOwnPropertyDescriptor,Da={f:va?Ia:function getOwnPropertyDescriptor(h,g){if(h=Ea(h),g=Oa(g,!0),Na)try{return Ia(h,g)}catch(h){}if(ka(h,g))return xa(!ma.f.call(h,g),h[g])}},$a=/#|\.prototype\./,Va=function isForced(h,g){var d=ja[La(h)];return d==Ba||d!=Fa&&("function"==typeof g?ya(g):!!g)},La=Va.normalize=function(h){return String(h).replace($a,".").toLowerCase()},ja=Va.data={},Fa=Va.NATIVE="N",Ba=Va.POLYFILL="P",za=Va,Ga={},Ua=function aFunction(h){if("function"!=typeof h)throw TypeError(String(h)+" is not a function");return h},Ha=function functionBindContext(h,g,d){if(Ua(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)}},Xa=function anObject(h){if(!Pa(h))throw TypeError(String(h)+" is not an object");return h},Ya=Object.defineProperty,Wa={f:va?Ya:function defineProperty(h,g,d){if(Xa(h),g=Oa(g,!0),Xa(d),Na)try{return Ya(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}},qa=va?function(h,g,d){return Wa.f(h,g,xa(1,d))}:function(h,g,d){return h[g]=d,h},Qa=Da.f,Ka=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},Za=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?ca:A?ca[P]:(ca[P]||{}).prototype,N=k?Ga:Ga[P]||(Ga[P]={}),D=N.prototype;for(b in g)d=!za(k?b:P+(A?".":"#")+b,h.forced)&&M&&ka(M,b),S=N[b],d&&(C=h.noTargetGet?(E=Qa(M,b))&&E.value:M[b]),_=d&&C?C:g[b],d&&_typeof$2(S)===_typeof$2(_)||(w=h.bind&&d?Ha(_,ca):h.wrap&&d?Ka(_):R&&"function"==typeof _?Ha(Function.call,_):_,(h.sham||_&&_.sham||S&&S.sham)&&qa(w,"sham",!0),N[b]=w,R&&(ka(Ga,x=P+"Prototype")||qa(Ga,x,{}),Ga[x][b]=_,h.real&&D&&!D[b]&&qa(D,b,_)))},Ja=Math.ceil,to=Math.floor,eo=function toInteger(h){return isNaN(h=+h)?0:(h>0?to:Ja)(h)},ro=Math.min,no=function toLength(h){return h>0?ro(eo(h),9007199254740991):0},io=ca["__core-js_shared__"]||function setGlobal(h,g){try{qa(ca,h,g)}catch(d){ca[h]=g}return g}("__core-js_shared__",{}),ao=createCommonjsModule((function(h){(h.exports=function(h,g){return io[h]||(io[h]=void 0!==g?g:{})})("versions",[]).push({version:"3.9.1",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),oo=0,so=Math.random(),uo=function uid(h){return"Symbol("+String(void 0===h?"":h)+")_"+(++oo+so).toString(36)},co="process"==_a(ca.process),lo=function aFunction(h){return"function"==typeof h?h:void 0},fo=function getBuiltIn(h,g){return arguments.length<2?lo(Ga[h])||lo(ca[h]):Ga[h]&&Ga[h][g]||ca[h]&&ca[h][g]},ho=fo("navigator","userAgent")||"",po=ca.process,yo=po&&po.versions,vo=yo&&yo.v8;vo?pa=(ha=vo.split("."))[0]+ha[1]:ho&&(!(ha=ho.match(/Edge\/(\d+)/))||ha[1]>=74)&&(ha=ho.match(/Chrome\/(\d+)/))&&(pa=ha[1]);var go=pa&&+pa,mo=!!Object.getOwnPropertySymbols&&!ya((function(){return!Symbol.sham&&(co?38===go:go>37&&go<41)})),xo=mo&&!Symbol.sham&&"symbol"==_typeof$2(Symbol.iterator),bo=ao("wks"),_o=ca.Symbol,So=xo?_o:_o&&_o.withoutSetter||uo,Co=function wellKnownSymbol(h){return ka(bo,h)&&(mo||"string"==typeof bo[h])||(mo&&ka(_o,h)?bo[h]=_o[h]:bo[h]=So("Symbol."+h)),bo[h]},wo=Co("match"),Eo=function notARegexp(h){if(function isRegexp(h){var g;return Pa(h)&&(void 0!==(g=h[wo])?!!g:"RegExp"==_a(h))}(h))throw TypeError("The method doesn't accept regular expressions");return h},Po=Co("match"),Oo=function correctIsRegexpLogic(h){var g=/./;try{"/./"[h](g)}catch(d){try{return g[Po]=!1,"/./"[h](g)}catch(h){}}return!1},To="".startsWith,ko=Math.min,Ao=Oo("startsWith");Za({target:"String",proto:!0,forced:!Ao},{startsWith:function startsWith(h){var g=String(wa(this));Eo(h);var d=no(ko(arguments.length>1?arguments[1]:void 0,g.length)),x=String(h);return To?To.call(g,x,d):g.slice(d,d+x.length)===x}});var Ro=function entryVirtual(h){return Ga[h+"Prototype"]},Mo=Ro("String").startsWith,No=String.prototype,Io=function startsWith_1(h){var g=h.startsWith;return"string"==typeof h||h===No||h instanceof String&&g===No.startsWith?Mo:g},Do=Oi.trim,$o=d.parseFloat,Vo=1/$o(Ci+"-0")!=-1/0?function parseFloat(h){var g=Do(String(h)),d=$o(g);return 0===d&&"-"==g.charAt(0)?-0:d}:$o;_export$1({global:!0,forced:parseFloat!=Vo},{parseFloat:Vo});var Lo=$.f,jo=xt.f,Fo=st.set,Bo=wellKnownSymbol$1("match"),zo=d.RegExp,Go=zo.prototype,Uo=/a/g,Ho=/a/g,Xo=new zo(Uo)!==Uo,Yo=ri.UNSUPPORTED_Y;if(x&&Ot("RegExp",!Xo||Yo||fails$1((function(){return Ho[Bo]=!1,zo(Uo)!=Uo||zo(Ho)==Ho||"/a/i"!=zo(Uo,"i")})))){for(var Wo=function RegExp(h,g){var d,x=this instanceof Wo,b=isRegexp$1(h),_=void 0===g;if(!x&&b&&h.constructor===Wo&&_)return h;Xo?b&&!_&&(h=h.source):h instanceof Wo&&(_&&(g=regexpFlags.call(h)),h=h.source),Yo&&(d=!!g&&g.indexOf("y")>-1)&&(g=g.replace(/y/g,""));var S=inheritIfRequired(Xo?new zo(h,g):zo(h,g),x?this:Go,Wo);return Yo&&d&&Fo(S,{sticky:d}),S},proxy=function(h){h in Wo||Lo(Wo,h,{configurable:!0,get:function(){return zo[h]},set:function(g){zo[h]=g}})},qo=jo(zo),Qo=0;qo.length>Qo;)proxy(qo[Qo++]);Go.constructor=Wo,Wo.prototype=Go,ut(d,"RegExp",Wo)}setSpecies$1("RegExp");var Ko="\t\n\v\f\r    \u2028\u2029\ufeff",Zo="["+Ko+"]",Jo=RegExp("^"+Zo+Zo+"*"),ts=RegExp(Zo+Zo+"*$"),es=function createMethod(h){return function(g){var d=String(wa(g));return 1&h&&(d=d.replace(Jo,"")),2&h&&(d=d.replace(ts,"")),d}},rs={start:es(1),end:es(2),trim:es(3)},ns=rs.trim,is=ca.parseFloat,as=1/is(Ko+"-0")!=-1/0?function parseFloat(h){var g=ns(String(h)),d=is(g);return 0===d&&"-"==g.charAt(0)?-0:d}:is;Za({global:!0,forced:parseFloat!=as},{parseFloat:as});var os=Ga.parseFloat,ss=ne.map,us=arrayMethodHasSpeciesSupport$1("map");_export$1({target:"Array",proto:!0,forced:!us},{map:function map(h){return ss(this,h,arguments.length>1?arguments[1]:void 0)}});var cs=function toObject(h){return Object(wa(h))},ls=Array.isArray||function isArray(h){return"Array"==_a(h)},fs=Co("species"),hs=function arraySpeciesCreate(h,g){var d;return ls(h)&&("function"!=typeof(d=h.constructor)||d!==Array&&!ls(d.prototype)?Pa(d)&&null===(d=d[fs])&&(d=void 0):d=void 0),new(void 0===d?Array:d)(0===g?0:g)},ps=[].push,ys=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=cs(w),N=Ca(M),D=Ha(E,P,3),$=no(N.length),V=0,L=k||hs,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:ps.call(j,A)}else switch(h){case 4:return!1;case 7:ps.call(j,A)}return _?-1:x||b?b:j}},vs={forEach:ys(0),map:ys(1),filter:ys(2),some:ys(3),every:ys(4),find:ys(5),findIndex:ys(6),filterOut:ys(7)},gs=Co("species"),ds=function arrayMethodHasSpeciesSupport(h){return go>=51||!ya((function(){var g=[];return(g.constructor={})[gs]=function(){return{foo:1}},1!==g[h](Boolean).foo}))},ms=vs.map,xs=ds("map");Za({target:"Array",proto:!0,forced:!xs},{map:function map(h){return ms(this,h,arguments.length>1?arguments[1]:void 0)}});var bs=Ro("Array").map,_s=Array.prototype,Ss=function map_1(h){var g=h.map;return h===_s||h instanceof Array&&g===_s.map?bs:g};Za({target:"Array",stat:!0},{isArray:ls});var Cs=Ga.Array.isArray,ws=Cs;var Es=function createProperty(h,g,d){var x=Oa(g);x in h?Wa.f(h,x,xa(0,d)):h[x]=d},Ps=Co("isConcatSpreadable"),Os=go>=51||!ya((function(){var h=[];return h[Ps]=!1,h.concat()[0]!==h})),Ts=ds("concat"),ks=function isConcatSpreadable(h){if(!Pa(h))return!1;var g=h[Ps];return void 0!==g?!!g:ls(h)};Za({target:"Array",proto:!0,forced:!Os||!Ts},{concat:function concat(h){var g,d,x,b,_,S=cs(this),C=hs(S,0),w=0;for(g=-1,x=arguments.length;g<x;g++)if(ks(_=-1===g?S:arguments[g])){if(w+(b=no(_.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(d=0;d<b;d++,w++)d in _&&Es(C,w,_[d])}else{if(w>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Es(C,w++,_)}return C.length=w,C}});var As=fails$1((function(){jt(1)}));_export$1({target:"Object",stat:!0,forced:As},{keys:function keys(h){return jt(toObject$1(h))}});var Rs=vt.indexOf,Ms=[].indexOf,Ns=!!Ms&&1/[1].indexOf(1,-0)<0,Is=arrayMethodIsStrict$1("indexOf");_export$1({target:"Array",proto:!0,forced:Ns||!Is},{indexOf:function indexOf(h){return Ns?Ms.apply(this,arguments)||0:Rs(this,h,arguments.length>1?arguments[1]:void 0)}});var Ds,$s=Math.max,Vs=Math.min,Ls=function toAbsoluteIndex(h,g){var d=eo(h);return d<0?$s(d+g,0):Vs(d,g)},js=function createMethod(h){return function(g,d,x){var b,_=Ea(g),S=no(_.length),C=Ls(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}},Fs={includes:js(!0),indexOf:js(!1)},Bs={},zs=Fs.indexOf,Gs=function objectKeysInternal(h,g){var d,x=Ea(h),b=0,_=[];for(d in x)!ka(Bs,d)&&ka(x,d)&&_.push(d);for(;g.length>b;)ka(x,d=g[b++])&&(~zs(_,d)||_.push(d));return _},Us=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Hs=Object.keys||function keys(h){return Gs(h,Us)},Xs=va?Object.defineProperties:function defineProperties(h,g){Xa(h);for(var d,x=Hs(g),b=x.length,_=0;b>_;)Wa.f(h,d=x[_++],g[d]);return h},Ys=fo("document","documentElement"),Ws=ao("keys"),qs=function sharedKey(h){return Ws[h]||(Ws[h]=uo(h))},Qs=qs("IE_PROTO"),Ks=function EmptyConstructor(){},Zs=function scriptTag(h){return"<script>"+h+"<\/script>"},Js=function NullProtoObject(){try{Ds=document.domain&&new ActiveXObject("htmlfile")}catch(h){}Js=Ds?function NullProtoObjectViaActiveX(h){h.write(Zs("")),h.close();var g=h.parentWindow.Object;return h=null,g}(Ds):function NullProtoObjectViaIFrame(){var h,g=Ma("iframe");return g.style.display="none",Ys.appendChild(g),g.src=String("javascript:"),(h=g.contentWindow.document).open(),h.write(Zs("document.F=Object")),h.close(),h.F}();for(var h=Us.length;h--;)delete Js.prototype[Us[h]];return Js()};Bs[Qs]=!0;var tu=Object.create||function create(h,g){var d;return null!==h?(Ks.prototype=Xa(h),d=new Ks,Ks.prototype=null,d[Qs]=h):d=Js(),void 0===g?d:Xs(d,g)},eu=Yt.f,ru=fails$1((function(){return!Object.getOwnPropertyNames(1)}));_export$1({target:"Object",stat:!0,forced:ru},{getOwnPropertyNames:eu});var nu=Us.concat("length","prototype"),iu={f:Object.getOwnPropertyNames||function getOwnPropertyNames(h){return Gs(h,nu)}},au=iu.f,ou={}.toString,su="object"==("undefined"==typeof window?"undefined":_typeof$2(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],uu={f:function getOwnPropertyNames(h){return su&&"[object Window]"==ou.call(h)?function getWindowNames(h){try{return au(h)}catch(h){return su.slice()}}(h):au(Ea(h))}},cu={f:Object.getOwnPropertySymbols},lu=function redefine(h,g,d,x){x&&x.enumerable?h[g]=d:qa(h,g,d)},fu={f:Co},hu=Wa.f,pu=function defineWellKnownSymbol(h){var g=Ga.Symbol||(Ga.Symbol={});ka(g,h)||hu(g,h,{value:fu.f(h)})},yu={};yu[Co("toStringTag")]="z";var vu="[object z]"===String(yu),gu=Co("toStringTag"),du="Arguments"==_a(function(){return arguments}()),mu=vu?_a: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),gu))?d:du?_a(g):"Object"==(x=_a(g))&&"function"==typeof g.callee?"Arguments":x},xu=vu?{}.toString:function toString(){return"[object "+mu(this)+"]"},bu=Wa.f,_u=Co("toStringTag"),Su=function setToStringTag(h,g,d,x){if(h){var b=d?h:h.prototype;ka(b,_u)||bu(b,_u,{configurable:!0,value:g}),x&&!vu&&qa(b,"toString",xu)}},Cu=Ki.getWeakData,wu=st.set,Eu=st.getterFor,Pu=ne.find,Ou=ne.findIndex,Tu=0,uncaughtFrozenStore=function(h){return h.frozen||(h.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(h,g){return Pu(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=Ou(this.entries,(function(g){return g[0]===h}));return~g&&this.entries.splice(g,1),!!~g}};var ku={getConstructor:function(h,g,d,x){var b=h((function(h,_){anInstance$1(h,b,g),wu(h,{type:g,id:Tu++,frozen:void 0}),null!=_&&iterate$1(_,h[x],{that:h,AS_ENTRIES:d})})),_=Eu(g),define=function(h,g,d){var x=_(h),b=Cu(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=Cu(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=Cu(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=Cu(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,x=st.enforce,b=!d.ActiveXObject&&"ActiveXObject"in d,_=Object.isExtensible,wrapper=function(h){return function WeakMap(){return h(this,arguments.length?arguments[0]:void 0)}},S=h.exports=function(h,g,x){var b=-1!==h.indexOf("Map"),_=-1!==h.indexOf("Weak"),S=b?"set":"add",C=d[h],w=C&&C.prototype,E=C,P={},fixMethod=function(h){var g=w[h];ut(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(Ot(h,"function"!=typeof C||!(_||w.forEach&&!fails$1((function(){(new C).entries().next()})))))E=x.getConstructor(g,h,b,S),Ki.REQUIRED=!0;else if(Ot(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),_||x.setStrong(E,h,b),E}("WeakMap",wrapper,ku);if(Y&&b){g=ku.getConstructor(wrapper,"WeakMap",!0),Ki.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 d=x(this);return d.frozen||(d.frozen=new g),w.call(this,h)||d.frozen.delete(h)}return w.call(this,h)},has:function has(h){if(isObject$1(h)&&!_(h)){var d=x(this);return d.frozen||(d.frozen=new g),E.call(this,h)||d.frozen.has(h)}return E.call(this,h)},get:function get(h){if(isObject$1(h)&&!_(h)){var d=x(this);return d.frozen||(d.frozen=new g),E.call(this,h)?P.call(this,h):d.frozen.get(h)}return P.call(this,h)},set:function set(h,d){if(isObject$1(h)&&!_(h)){var b=x(this);b.frozen||(b.frozen=new g),E.call(this,h)?k.call(this,h,d):b.frozen.set(h,d)}else k.call(this,h,d);return this}})}}));var Au=Function.toString;"function"!=typeof io.inspectSource&&(io.inspectSource=function(h){return Au.call(h)});var Ru,Mu,Nu,Iu=io.inspectSource,Du=ca.WeakMap,$u="function"==typeof Du&&/native code/.test(Iu(Du)),Vu=ca.WeakMap;if($u){var Lu=io.state||(io.state=new Vu),ju=Lu.get,Fu=Lu.has,Bu=Lu.set;Ru=function set(h,g){return g.facade=h,Bu.call(Lu,h,g),g},Mu=function get(h){return ju.call(Lu,h)||{}},Nu=function has(h){return Fu.call(Lu,h)}}else{var zu=qs("state");Bs[zu]=!0,Ru=function set(h,g){return g.facade=h,qa(h,zu,g),g},Mu=function get(h){return ka(h,zu)?h[zu]:{}},Nu=function has(h){return ka(h,zu)}}var Gu={set:Ru,get:Mu,has:Nu,enforce:function enforce(h){return Nu(h)?Mu(h):Ru(h,{})},getterFor:function getterFor(h){return function(g){var d;if(!Pa(g)||(d=Mu(g)).type!==h)throw TypeError("Incompatible receiver, "+h+" required");return d}}},Uu=vs.forEach,Hu=qs("hidden"),Xu=Co("toPrimitive"),Yu=Gu.set,Wu=Gu.getterFor("Symbol"),qu=Object.prototype,Qu=ca.Symbol,Ku=fo("JSON","stringify"),Zu=Da.f,Ju=Wa.f,tc=uu.f,ec=ma.f,rc=ao("symbols"),nc=ao("op-symbols"),ic=ao("string-to-symbol-registry"),ac=ao("symbol-to-string-registry"),oc=ao("wks"),sc=ca.QObject,uc=!sc||!sc.prototype||!sc.prototype.findChild,cc=va&&ya((function(){return 7!=tu(Ju({},"a",{get:function get(){return Ju(this,"a",{value:7}).a}})).a}))?function(h,g,d){var x=Zu(qu,g);x&&delete qu[g],Ju(h,g,d),x&&h!==qu&&Ju(qu,g,x)}:Ju,lc=function wrap(h,g){var d=rc[h]=tu(Qu.prototype);return Yu(d,{type:"Symbol",tag:h,description:g}),va||(d.description=g),d},fc=xo?function(h){return"symbol"==_typeof$2(h)}:function(h){return Object(h)instanceof Qu},hc=function defineProperty(h,g,d){h===qu&&hc(nc,g,d),Xa(h);var x=Oa(g,!0);return Xa(d),ka(rc,x)?(d.enumerable?(ka(h,Hu)&&h[Hu][x]&&(h[Hu][x]=!1),d=tu(d,{enumerable:xa(0,!1)})):(ka(h,Hu)||Ju(h,Hu,xa(1,{})),h[Hu][x]=!0),cc(h,x,d)):Ju(h,x,d)},pc=function defineProperties(h,g){Xa(h);var d=Ea(g),x=Hs(d).concat(dc(d));return Uu(x,(function(g){va&&!yc.call(d,g)||hc(h,g,d[g])})),h},yc=function propertyIsEnumerable(h){var g=Oa(h,!0),d=ec.call(this,g);return!(this===qu&&ka(rc,g)&&!ka(nc,g))&&(!(d||!ka(this,g)||!ka(rc,g)||ka(this,Hu)&&this[Hu][g])||d)},vc=function getOwnPropertyDescriptor(h,g){var d=Ea(h),x=Oa(g,!0);if(d!==qu||!ka(rc,x)||ka(nc,x)){var b=Zu(d,x);return!b||!ka(rc,x)||ka(d,Hu)&&d[Hu][x]||(b.enumerable=!0),b}},gc=function getOwnPropertyNames(h){var g=tc(Ea(h)),d=[];return Uu(g,(function(h){ka(rc,h)||ka(Bs,h)||d.push(h)})),d},dc=function getOwnPropertySymbols(h){var g=h===qu,d=tc(g?nc:Ea(h)),x=[];return Uu(d,(function(h){!ka(rc,h)||g&&!ka(qu,h)||x.push(rc[h])})),x};if(mo||(lu((Qu=function _Symbol(){if(this instanceof Qu)throw TypeError("Symbol is not a constructor");var h=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,g=uo(h),d=function setter(h){this===qu&&setter.call(nc,h),ka(this,Hu)&&ka(this[Hu],g)&&(this[Hu][g]=!1),cc(this,g,xa(1,h))};return va&&uc&&cc(qu,g,{configurable:!0,set:d}),lc(g,h)}).prototype,"toString",(function toString(){return Wu(this).tag})),lu(Qu,"withoutSetter",(function(h){return lc(uo(h),h)})),ma.f=yc,Wa.f=hc,Da.f=vc,iu.f=uu.f=gc,cu.f=dc,fu.f=function(h){return lc(Co(h),h)},va&&Ju(Qu.prototype,"description",{configurable:!0,get:function description(){return Wu(this).description}})),Za({global:!0,wrap:!0,forced:!mo,sham:!mo},{Symbol:Qu}),Uu(Hs(oc),(function(h){pu(h)})),Za({target:"Symbol",stat:!0,forced:!mo},{for:function _for(h){var g=String(h);if(ka(ic,g))return ic[g];var d=Qu(g);return ic[g]=d,ac[d]=g,d},keyFor:function keyFor(h){if(!fc(h))throw TypeError(h+" is not a symbol");if(ka(ac,h))return ac[h]},useSetter:function useSetter(){uc=!0},useSimple:function useSimple(){uc=!1}}),Za({target:"Object",stat:!0,forced:!mo,sham:!va},{create:function create(h,g){return void 0===g?tu(h):pc(tu(h),g)},defineProperty:hc,defineProperties:pc,getOwnPropertyDescriptor:vc}),Za({target:"Object",stat:!0,forced:!mo},{getOwnPropertyNames:gc,getOwnPropertySymbols:dc}),Za({target:"Object",stat:!0,forced:ya((function(){cu.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(h){return cu.f(cs(h))}}),Ku){var mc=!mo||ya((function(){var h=Qu();return"[null]"!=Ku([h])||"{}"!=Ku({a:h})||"{}"!=Ku(Object(h))}));Za({target:"JSON",stat:!0,forced:mc},{stringify:function stringify(h,g,d){for(var x,b=[h],_=1;arguments.length>_;)b.push(arguments[_++]);if(x=g,(Pa(g)||void 0!==h)&&!fc(h))return ls(g)||(g=function replacer(h,g){if("function"==typeof x&&(g=x.call(this,h,g)),!fc(g))return g}),b[1]=g,Ku.apply(null,b)}})}Qu.prototype[Xu]||qa(Qu.prototype,Xu,Qu.prototype.valueOf),Su(Qu,"Symbol"),Bs[Hu]=!0,pu("asyncIterator"),pu("hasInstance"),pu("isConcatSpreadable"),pu("iterator"),pu("match"),pu("matchAll"),pu("replace"),pu("search"),pu("species"),pu("split"),pu("toPrimitive"),pu("toStringTag"),pu("unscopables"),Su(ca.JSON,"JSON",!0);var xc=Ga.Symbol;pu("asyncDispose"),pu("dispose"),pu("observable"),pu("patternMatch"),pu("replaceAll");var bc,_c,Sc,Cc=xc,wc={},Ec=!ya((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Pc=qs("IE_PROTO"),Oc=Object.prototype,Tc=Ec?Object.getPrototypeOf:function(h){return h=cs(h),ka(h,Pc)?h[Pc]:"function"==typeof h.constructor&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?Oc:null},kc=Co("iterator"),Ac=!1;[].keys&&("next"in(Sc=[].keys())?(_c=Tc(Tc(Sc)))!==Object.prototype&&(bc=_c):Ac=!0);var Rc=null==bc||ya((function(){var h={};return bc[kc].call(h)!==h}));Rc&&(bc={}),Rc&&!ka(bc,kc)&&qa(bc,kc,(function returnThis(){return this}));var Mc={IteratorPrototype:bc,BUGGY_SAFARI_ITERATORS:Ac},Nc=Mc.IteratorPrototype,Ic=function returnThis(){return this},Dc=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 Xa(d),function aPossiblePrototype(h){if(!Pa(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),$c=Mc.IteratorPrototype,Vc=Mc.BUGGY_SAFARI_ITERATORS,Lc=Co("iterator"),jc=function returnThis(){return this},Fc=function defineIterator(h,g,d,x,b,_,S){!function createIteratorConstructor(h,g,d){var x=g+" Iterator";h.prototype=tu(Nc,{next:xa(1,d)}),Su(h,x,!1,!0),wc[x]=Ic}(d,g,x);var C,w,E,P=function getIterationMethod(h){if(h===b&&N)return N;if(!Vc&&h in R)return R[h];switch(h){case"keys":return function keys(){return new d(this,h)};case"values":return function values(){return new d(this,h)};case"entries":return function entries(){return new d(this,h)}}return function(){return new d(this)}},k=g+" Iterator",A=!1,R=h.prototype,M=R[Lc]||R["@@iterator"]||b&&R[b],N=!Vc&&M||P(b),D="Array"==g&&R.entries||M;if(D&&(C=Tc(D.call(new h)),$c!==Object.prototype&&C.next&&(Su(C,k,!0,!0),wc[k]=jc)),"values"==b&&M&&"values"!==M.name&&(A=!0,N=function values(){return M.call(this)}),S&&R[Lc]!==N&&qa(R,Lc,N),wc[g]=N,b)if(w={values:P("values"),keys:_?N:P("keys"),entries:P("entries")},S)for(E in w)(Vc||A||!(E in R))&&lu(R,E,w[E]);else Za({target:g,proto:!0,forced:Vc||A},w);return w},Bc=Gu.set,zc=Gu.getterFor("Array Iterator");Fc(Array,"Array",(function(h,g){Bc(this,{type:"Array Iterator",target:Ea(h),index:0,kind:g})}),(function(){var h=zc(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"),wc.Arguments=wc.Array;var Gc=Co("toStringTag");for(var Uc 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 Hc=ca[Uc],Xc=Hc&&Hc.prototype;Xc&&mu(Xc)!==Gc&&qa(Xc,Gc,Uc),wc[Uc]=wc.Array}var Yc=function createMethod(h){return function(g,d){var x,b,_=String(wa(g)),S=eo(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}},Wc={codeAt:Yc(!1),charAt:Yc(!0)}.charAt,qc=Gu.set,Qc=Gu.getterFor("String Iterator");Fc(String,"String",(function(h){qc(this,{type:"String Iterator",string:String(h),index:0})}),(function next(){var h,g=Qc(this),d=g.string,x=g.index;return x>=d.length?{value:void 0,done:!0}:(h=Wc(d,x),g.index+=h.length,{value:h,done:!1})}));var Kc=Co("iterator"),Zc=function isIterable(h){var g=Object(h);return void 0!==g[Kc]||"@@iterator"in g||wc.hasOwnProperty(mu(g))},Jc=Co("iterator"),tl=function getIteratorMethod(h){if(null!=h)return h[Jc]||h["@@iterator"]||wc[mu(h)]},el=function getIterator(h){var g=tl(h);if("function"!=typeof g)throw TypeError(String(h)+" is not iterable");return Xa(g.call(h))};var rl=ds("slice"),nl=Co("species"),il=[].slice,al=Math.max;Za({target:"Array",proto:!0,forced:!rl},{slice:function slice(h,g){var d,x,b,_=Ea(this),S=no(_.length),C=Ls(h,S),w=Ls(void 0===g?S:g,S);if(ls(_)&&("function"!=typeof(d=_.constructor)||d!==Array&&!ls(d.prototype)?Pa(d)&&null===(d=d[nl])&&(d=void 0):d=void 0,d===Array||void 0===d))return il.call(_,C,w);for(x=new(void 0===d?Array:d)(al(w-C,0)),b=0;C<w;C++,b++)C in _&&Es(x,b,_[C]);return x.length=b,x}});var ol=Ro("Array").slice,sl=Array.prototype,ul=function slice_1(h){var g=h.slice;return h===sl||h instanceof Array&&g===sl.slice?ol:g},cl=ul,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}},ll=!checkCorrectnessOfIteration$1((function(h){Array.from(h)}));_export$1({target:"Array",stat:!0,forced:ll},{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 fl=function iteratorClose(h){var g=h.return;if(void 0!==g)return Xa(g.call(h)).value},hl=function callWithSafeIterationClosing(h,g,d,x){try{return x?g(Xa(d)[0],d[1]):g(d)}catch(g){throw fl(h),g}},pl=Co("iterator"),yl=Array.prototype,vl=function isArrayIteratorMethod(h){return void 0!==h&&(wc.Array===h||yl[pl]===h)},gl=Co("iterator"),dl=!1;try{var ml=0,xl={next:function next(){return{done:!!ml++}},return:function _return(){dl=!0}};xl[gl]=function(){return this},Array.from(xl,(function(){throw 2}))}catch(h){}var bl=function checkCorrectnessOfIteration(h,g){if(!g&&!dl)return!1;var d=!1;try{var x={};x[gl]=function(){return{next:function next(){return{done:d=!0}}}},h(x)}catch(h){}return d},_l=!bl((function(h){Array.from(h)}));Za({target:"Array",stat:!0,forced:_l},{from:function from(h){var g,d,x,b,_,S,C=cs(h),w="function"==typeof this?this:Array,E=arguments.length,P=E>1?arguments[1]:void 0,k=void 0!==P,A=tl(C),R=0;if(k&&(P=Ha(P,E>2?arguments[2]:void 0,2)),null==A||w==Array&&vl(A))for(d=new w(g=no(C.length));g>R;R++)S=k?P(C[R],R):C[R],Es(d,R,S);else for(_=(b=A.call(C)).next,d=new w;!(x=_.call(b)).done;R++)S=k?hl(b,P,[x.value,R],!0):x.value,Es(d,R,S);return d.length=R,d}});var Sl=Ga.Array.from,Cl=Sl;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=cl(d=Object.prototype.toString.call(h)).call(d,8,-1);return"Object"===x&&h.constructor&&(x=h.constructor.name),"Map"===x||"Set"===x?Cl(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(ws(h))return h}(h)||function _iterableToArrayLimit(h,g){if(void 0!==Cc&&Zc(Object(h))){var d=[],x=!0,b=!1,_=void 0;try{for(var S,C=el(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.")}()}Za({target:"Object",stat:!0,forced:!va,sham:!va},{defineProperty:Wa.f});var wl=createCommonjsModule((function(h){var g=Ga.Object,d=h.exports=function defineProperty(h,d,x){return g.defineProperty(h,d,x)};g.defineProperty.sham&&(d.sham=!0)})),El=wl;Za({target:"Object",stat:!0,forced:!va,sham:!va},{defineProperties:Xs});var Pl=createCommonjsModule((function(h){var g=Ga.Object,d=h.exports=function defineProperties(h,d){return g.defineProperties(h,d)};g.defineProperties.sham&&(d.sham=!0)})),Ol=fo("Reflect","ownKeys")||function ownKeys(h){var g=iu.f(Xa(h)),d=cu.f;return d?g.concat(d(h)):g};Za({target:"Object",stat:!0,sham:!va},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(h){for(var g,d,x=Ea(h),b=Da.f,_=Ol(x),S={},C=0;_.length>C;)void 0!==(d=b(x,g=_[C++]))&&Es(S,g,d);return S}});var Tl=Ga.Object.getOwnPropertyDescriptors,kl=function arrayMethodIsStrict(h,g){var d=[][h];return!!d&&ya((function(){d.call(null,g||function(){throw 1},1)}))},Al=vs.forEach,Rl=kl("forEach")?[].forEach:function forEach(h){return Al(this,h,arguments.length>1?arguments[1]:void 0)};Za({target:"Array",proto:!0,forced:[].forEach!=Rl},{forEach:Rl});var Ml=Ro("Array").forEach,Nl=Array.prototype,Il={DOMTokenList:!0,NodeList:!0},Dl=function forEach_1(h){var g=h.forEach;return h===Nl||h instanceof Array&&g===Nl.forEach||Il.hasOwnProperty(mu(h))?Ml:g},$l=Da.f,Vl=ya((function(){$l(1)}));Za({target:"Object",stat:!0,forced:!va||Vl,sham:!va},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(h,g){return $l(Ea(h),g)}});var Ll=createCommonjsModule((function(h){var g=Ga.Object,d=h.exports=function getOwnPropertyDescriptor(h,d){return g.getOwnPropertyDescriptor(h,d)};g.getOwnPropertyDescriptor.sham&&(d.sham=!0)})),jl=Ll,Fl=ne.filter,Bl=arrayMethodHasSpeciesSupport$1("filter");_export$1({target:"Array",proto:!0,forced:!Bl},{filter:function filter(h){return Fl(this,h,arguments.length>1?arguments[1]:void 0)}});var zl=vs.filter,Gl=ds("filter");Za({target:"Array",proto:!0,forced:!Gl},{filter:function filter(h){return zl(this,h,arguments.length>1?arguments[1]:void 0)}});var Ul=Ro("Array").filter,Hl=Array.prototype,Xl=function filter_1(h){var g=h.filter;return h===Hl||h instanceof Array&&g===Hl.filter?Ul:g},Yl=Ga.Object.getOwnPropertySymbols,Wl=ya((function(){Hs(1)}));Za({target:"Object",stat:!0,forced:Wl},{keys:function keys(h){return Hs(cs(h))}});var ql=Ga.Object.keys,Ql=ei,Kl=function Result(h,g){this.stopped=h,this.result=g},Zl=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=Ha(g,P,1+k+R),N=function stop(h){return x&&fl(x),new Kl(!0,h)},D=function callFn(h){return k?(Xa(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=tl(h)))throw TypeError("Target is not iterable");if(vl(b)){for(_=0,S=no(h.length);S>_;_++)if((C=D(h[_]))&&C instanceof Kl)return C;return new Kl(!1)}x=b.call(h)}for(w=x.next;!(E=w.call(x)).done;){try{C=D(E.value)}catch(h){throw fl(x),h}if("object"==_typeof$2(C)&&C&&C instanceof Kl)return C}return new Kl(!1)},Jl=function AggregateError(h,g){var d=this;if(!(d instanceof Jl))return new Jl(h,g);Dc&&(d=Dc(new Error(void 0),Tc(d))),void 0!==g&&qa(d,"message",String(g));var x=[];return Zl(h,x.push,{that:x}),qa(d,"errors",x),d};Jl.prototype=tu(Error.prototype,{constructor:xa(5,Jl),message:xa(5,""),name:xa(5,"AggregateError")}),Za({global:!0},{AggregateError:Jl});var tf=!!Mr&&fails$1((function(){Mr.prototype.finally.call({then:function(){}},(function(){}))}));_export$1({target:"Promise",proto:!0,real:!0,forced:tf},{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 Mr||Mr.prototype.finally||ut(Mr.prototype,"finally",getBuiltIn$1("Promise").prototype.finally);var ef=ca.Promise,rf=function redefineAll(h,g,d){for(var x in g)d&&d.unsafe&&h[x]?h[x]=g[x]:lu(h,x,g[x],d);return h},nf=Co("species"),af=function setSpecies(h){var g=fo(h),d=Wa.f;va&&g&&!g[nf]&&d(g,nf,{configurable:!0,get:function get(){return this}})},of=function anInstance(h,g,d){if(!(h instanceof g))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return h},sf=Co("species"),uf=function speciesConstructor(h,g){var d,x=Xa(h).constructor;return void 0===x||null==(d=Xa(x)[sf])?g:Ua(d)},cf=!d.setImmediate||!d.clearImmediate;_export$1({global:!0,bind:!0,enumerable:!0,forced:cf},{setImmediate:cn.set,clearImmediate:cn.clear});var lf,ff,hf,pf=/(iphone|ipod|ipad).*applewebkit/i.test(ho),yf=ca.location,vf=ca.setImmediate,gf=ca.clearImmediate,df=ca.process,mf=ca.MessageChannel,xf=ca.Dispatch,bf=0,_f={},Sf=function run(h){if(_f.hasOwnProperty(h)){var g=_f[h];delete _f[h],g()}},Cf=function runner(h){return function(){Sf(h)}},wf=function listener(h){Sf(h.data)},Ef=function post(h){ca.postMessage(h+"",yf.protocol+"//"+yf.host)};vf&&gf||(vf=function setImmediate(h){for(var g=[],d=1;arguments.length>d;)g.push(arguments[d++]);return _f[++bf]=function(){("function"==typeof h?h:Function(h)).apply(void 0,g)},lf(bf),bf},gf=function clearImmediate(h){delete _f[h]},co?lf=function defer(h){df.nextTick(Cf(h))}:xf&&xf.now?lf=function defer(h){xf.now(Cf(h))}:mf&&!pf?(hf=(ff=new mf).port2,ff.port1.onmessage=wf,lf=Ha(hf.postMessage,hf,1)):ca.addEventListener&&"function"==typeof postMessage&&!ca.importScripts&&yf&&"file:"!==yf.protocol&&!ya(Ef)?(lf=Ef,ca.addEventListener("message",wf,!1)):lf="onreadystatechange"in Ma("script")?function defer(h){Ys.appendChild(Ma("script")).onreadystatechange=function(){Ys.removeChild(this),Sf(h)}}:function defer(h){setTimeout(Cf(h),0)});var Pf,Of,Tf,kf,Af,Rf,Mf,Nf,If={set:vf,clear:gf},Df=/web0s(?!.*chrome)/i.test(ho),$f=Da.f,Vf=If.set,Lf=ca.MutationObserver||ca.WebKitMutationObserver,jf=ca.document,Ff=ca.process,Bf=ca.Promise,zf=$f(ca,"queueMicrotask"),Gf=zf&&zf.value;Gf||(Pf=function flush(){var h,g;for(co&&(h=Ff.domain)&&h.exit();Of;){g=Of.fn,Of=Of.next;try{g()}catch(h){throw Of?kf():Tf=void 0,h}}Tf=void 0,h&&h.enter()},pf||co||Df||!Lf||!jf?Bf&&Bf.resolve?(Mf=Bf.resolve(void 0),Nf=Mf.then,kf=function notify(){Nf.call(Mf,Pf)}):kf=co?function notify(){Ff.nextTick(Pf)}:function notify(){Vf.call(ca,Pf)}:(Af=!0,Rf=jf.createTextNode(""),new Lf(Pf).observe(Rf,{characterData:!0}),kf=function notify(){Rf.data=Af=!Af}));var Uf=Gf||function(h){var g={fn:h,next:void 0};Tf&&(Tf.next=g),Of||(Of=g,kf()),Tf=g},Hf=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=Ua(g),this.reject=Ua(d)},Xf={f:function f(h){return new Hf(h)}},Yf=function promiseResolve(h,g){if(Xa(h),Pa(g)&&g.constructor===h)return g;var d=Xf.f(h);return(0,d.resolve)(g),d.promise},Wf=function perform(h){try{return{error:!1,value:h()}}catch(h){return{error:!0,value:h}}},qf=If.set,Qf=Co("species"),Kf="Promise",Zf=Gu.get,Jf=Gu.set,th=Gu.getterFor(Kf),eh=ef,rh=ca.TypeError,nh=ca.document,ih=ca.process;fo("fetch");var ah,oh,sh,uh=Xf.f,ch=uh,lh=!!(nh&&nh.createEvent&&ca.dispatchEvent),fh="function"==typeof PromiseRejectionEvent,hh=za(Kf,(function(){if(!(Iu(eh)!==String(eh))){if(66===go)return!0;if(!co&&!fh)return!0}if(!eh.prototype.finally)return!0;if(go>=51&&/native code/.test(eh))return!1;var h=eh.resolve(1),g=function FakePromise(h){h((function(){}),(function(){}))};return(h.constructor={})[Qf]=g,!(h.then((function(){}))instanceof g)})),ph=hh||!bl((function(h){eh.all(h).catch((function(){}))})),yh=function isThenable(h){var g;return!(!Pa(h)||"function"!=typeof(g=h.then))&&g},vh=function notify(h,g){if(!h.notified){h.notified=!0;var d=h.reactions;Uf((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&&xh(h),h.rejection=1),!0===P?S=x:(R&&R.enter(),S=P(x),R&&(R.exit(),w=!0)),S===E.promise?A(rh("Promise-chain cycle")):(C=yh(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&&dh(h)}))}},gh=function dispatchEvent(h,g,d){var x,b;lh?((x=nh.createEvent("Event")).promise=g,x.reason=d,x.initEvent(h,!1,!0),ca.dispatchEvent(x)):x={promise:g,reason:d},!fh&&(b=ca["on"+h])?b(x):"unhandledrejection"===h&&function hostReportErrors(h,g){var d=ca.console;d&&d.error&&(1===arguments.length?d.error(h):d.error(h,g))}("Unhandled promise rejection",d)},dh=function onUnhandled(h){qf.call(ca,(function(){var g,d=h.facade,x=h.value;if(mh(h)&&(g=Wf((function(){co?ih.emit("unhandledRejection",x,d):gh("unhandledrejection",d,x)})),h.rejection=co||mh(h)?2:1,g.error))throw g.value}))},mh=function isUnhandled(h){return 1!==h.rejection&&!h.parent},xh=function onHandleUnhandled(h){qf.call(ca,(function(){var g=h.facade;co?ih.emit("rejectionHandled",g):gh("rejectionhandled",g,h.value)}))},bh=function bind(h,g,d){return function(x){h(g,x,d)}},_h=function internalReject(h,g,d){h.done||(h.done=!0,d&&(h=d),h.value=g,h.state=2,vh(h,!0))},Sh=function internalResolve(h,g,d){if(!h.done){h.done=!0,d&&(h=d);try{if(h.facade===g)throw rh("Promise can't be resolved itself");var x=yh(g);x?Uf((function(){var d={done:!1};try{x.call(g,bh(internalResolve,d,h),bh(_h,d,h))}catch(g){_h(d,g,h)}})):(h.value=g,h.state=1,vh(h,!1))}catch(g){_h({done:!1},g,h)}}};hh&&(eh=function Promise(h){of(this,eh,Kf),Ua(h),ah.call(this);var g=Zf(this);try{h(bh(Sh,g),bh(_h,g))}catch(h){_h(g,h)}},(ah=function Promise(h){Jf(this,{type:Kf,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=rf(eh.prototype,{then:function then(h,g){var d=th(this),x=uh(uf(this,eh));return x.ok="function"!=typeof h||h,x.fail="function"==typeof g&&g,x.domain=co?ih.domain:void 0,d.parent=!0,d.reactions.push(x),0!=d.state&&vh(d,!1),x.promise},catch:function _catch(h){return this.then(void 0,h)}}),oh=function OwnPromiseCapability(){var h=new ah,g=Zf(h);this.promise=h,this.resolve=bh(Sh,g),this.reject=bh(_h,g)},Xf.f=uh=function newPromiseCapability(h){return h===eh||h===sh?new oh(h):ch(h)}),Za({global:!0,wrap:!0,forced:hh},{Promise:eh}),Su(eh,Kf,!1,!0),af(Kf),sh=fo(Kf),Za({target:Kf,stat:!0,forced:hh},{reject:function reject(h){var g=uh(this);return g.reject.call(void 0,h),g.promise}}),Za({target:Kf,stat:!0,forced:!0},{resolve:function resolve(h){return Yf(this===sh?eh:this,h)}}),Za({target:Kf,stat:!0,forced:ph},{all:function all(h){var g=this,d=uh(g),x=d.resolve,b=d.reject,_=Wf((function(){var d=Ua(g.resolve),_=[],S=0,C=1;Zl(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=uh(g),x=d.reject,b=Wf((function(){var b=Ua(g.resolve);Zl(h,(function(h){b.call(g,h).then(d.resolve,x)}))}));return b.error&&x(b.value),d.promise}}),Za({target:"Promise",stat:!0},{allSettled:function allSettled(h){var g=this,d=Xf.f(g),x=d.resolve,b=d.reject,_=Wf((function(){var d=Ua(g.resolve),b=[],_=0,S=1;Zl(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}});Za({target:"Promise",stat:!0},{any:function any(h){var g=this,d=Xf.f(g),x=d.resolve,b=d.reject,_=Wf((function(){var d=Ua(g.resolve),_=[],S=0,C=1,w=!1;Zl(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(fo("AggregateError"))(_,"No one promise resolved")))}))})),--C||b(new(fo("AggregateError"))(_,"No one promise resolved"))}));return _.error&&b(_.value),d.promise}});var Ch=!!ef&&ya((function(){ef.prototype.finally.call({then:function then(){}},(function(){}))}));Za({target:"Promise",proto:!0,real:!0,forced:Ch},{finally:function _finally(h){var g=uf(this,fo("Promise")),d="function"==typeof h;return this.then(d?function(d){return Yf(g,h()).then((function(){return d}))}:h,d?function(d){return Yf(g,h()).then((function(){throw d}))}:h)}});var wh=Ga.Promise;Za({target:"Promise",stat:!0},{try:function _try(h){var g=Xf.f(this),d=Wf(h);return(d.error?g.reject:g.resolve)(d.value),g.promise}});var Eh=wh;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):Eh.resolve(w).then(x,b)}function _asyncToGenerator(h){return function(){var g=this,d=arguments;return new Eh((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 Ph=wl;function _defineProperty(h,g,d){return g in h?Ph(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),Ph(h,x.key,x)}}function _createClass(h,g,d){return g&&_defineProperties(h.prototype,g),d&&_defineProperties(h,d),h}var Oh=Ro("Array").concat,Th=Array.prototype,kh=function concat_1(h){var g=h.concat;return h===Th||h instanceof Array&&g===Th.concat?Oh:g},createMethod$1=function(h){return function(g,d,x,b){aFunction$2(d);var _=toObject$1(g),S=E(_),C=toLength$1(_.length),w=h?C-1:0,P=h?-1:1;if(x<2)for(;;){if(w in S){b=S[w],w+=P;break}if(w+=P,h?w<0:C<=w)throw TypeError("Reduce of empty array with no initial value")}for(;h?w>=0:C>w;w+=P)w in S&&(b=d(b,S[w],w,_));return b}},Ah={left:createMethod$1(!1),right:createMethod$1(!0)}.left,Rh=arrayMethodIsStrict$1("reduce");_export$1({target:"Array",proto:!0,forced:!Rh||!kt&&Dt>79&&Dt<83},{reduce:function reduce(h){return Ah(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Mh=function createMethod(h){return function(g,d,x,b){Ua(d);var _=cs(g),S=Ca(_),C=no(_.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}},Nh={left:Mh(!1),right:Mh(!0)}.left,Ih=kl("reduce");Za({target:"Array",proto:!0,forced:!Ih||!co&&go>79&&go<83},{reduce:function reduce(h){return Nh(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Dh=Ro("Array").reduce,$h=Array.prototype,Vh=function reduce_1(h){var g=h.reduce;return h===$h||h instanceof Array&&g===$h.reduce?Dh:g};Za({target:"Date",stat:!0},{now:function now(){return(new Date).getTime()}});var Lh=Ga.Date.now,jh=ne.every,Fh=arrayMethodIsStrict$1("every");_export$1({target:"Array",proto:!0,forced:!Fh},{every:function every(h){return jh(this,h,arguments.length>1?arguments[1]:void 0)}});var Bh=vs.every,zh=kl("every");Za({target:"Array",proto:!0,forced:!zh},{every:function every(h){return Bh(this,h,arguments.length>1?arguments[1]:void 0)}});var Gh=Ro("Array").every,Uh=Array.prototype,Hh=function every_1(h){var g=h.every;return h===Uh||h instanceof Array&&g===Uh.every?Gh:g},Xh=wh,Yh=[].slice,Wh={},qh=function construct(h,g,d){if(!(g in Wh)){for(var x=[],b=0;b<g;b++)x[b]="a["+b+"]";Wh[g]=Function("C,a","return new C("+x.join(",")+")")}return Wh[g](h,d)},Qh=Function.bind||function bind(h){var g=Ua(this),d=Yh.call(arguments,1),x=function bound(){var b=d.concat(Yh.call(arguments));return this instanceof x?qh(g,b.length,b):g.apply(h,b)};return Pa(g.prototype)&&(x.prototype=g.prototype),x};Za({target:"Function",proto:!0},{bind:Qh});for(var Kh=Ro("Function").bind,Zh=Function.prototype,Jh=function bind_1(h){var g=h.bind;return h===Zh||h instanceof Function&&g===Zh.bind?Kh:g},tp=createCommonjsModule((function(d){(function(){var g,x,b,_,S,C;"undefined"!=typeof performance&&null!==performance&&performance.now?d.exports=function(){return performance.now()}:null!=h&&h.hrtime?(d.exports=function(){return(g()-S)/1e6},x=h.hrtime,_=(g=function getNanoSeconds(){var h;return 1e9*(h=x())[0]+h[1]})(),C=1e9*h.uptime(),S=_-C):Date.now?(d.exports=function(){return Date.now()-b},b=Date.now()):(d.exports=function(){return(new Date).getTime()-b},b=(new Date).getTime())}).call(g)})),ep="undefined"==typeof window?g:window,rp=["moz","webkit"],np="AnimationFrame",ip=ep["request"+np],ap=ep["cancel"+np]||ep["cancelRequest"+np],op=0;!ip&&op<rp.length;op++)ip=ep[rp[op]+"Request"+np],ap=ep[rp[op]+"Cancel"+np]||ep[rp[op]+"CancelRequest"+np];if(!ip||!ap){var sp=0,up=0,cp=[];ip=function raf(h){if(0===cp.length){var g=tp(),d=Math.max(0,16.666666666666668-(g-sp));sp=d+g,setTimeout((function(){var h=cp.slice(0);cp.length=0;for(var g=0;g<h.length;g++)if(!h[g].cancelled)try{h[g].callback(sp)}catch(h){setTimeout((function(){throw h}),0)}}),Math.round(d))}return cp.push({handle:++up,callback:h,cancelled:!1}),up},ap=function caf(h){for(var g=0;g<cp.length;g++)cp[g].handle===h&&(cp[g].cancelled=!0)}}var lp=function raf_1(h){return ip.call(ep,h)};lp.cancel=function cancel(){ap.apply(ep,arguments)},lp.polyfill=function polyfill(h){h||(h=ep),h.requestAnimationFrame=ip,h.cancelAnimationFrame=ap};var fp=rs.trim;Za({target:"String",proto:!0,forced:function stringTrimForced(h){return ya((function(){return!!Ko[h]()||"…"!="…"[h]()||Ko[h].name!==h}))}("trim")},{trim:function trim(){return fp(this)}});var hp=Ro("String").trim,pp=String.prototype,yp=function trim_1(h){var g=h.trim;return"string"==typeof h||h===pp||h instanceof String&&g===pp.trim?hp:g},vp=Oi.trim,gp=d.parseInt,dp=/^[+-]?0[Xx]/,mp=8!==gp(Ci+"08")||22!==gp(Ci+"0x16")?function parseInt(h,g){var d=vp(String(h));return gp(d,g>>>0||(dp.test(d)?16:10))}:gp;_export$1({global:!0,forced:parseInt!=mp},{parseInt:mp});var xp=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}},bp=fo("Reflect","construct"),_p=ya((function(){function F(){}return!(bp((function(){}),[],F)instanceof F)})),Sp=!ya((function(){bp((function(){}))})),Cp=_p||Sp;Za({target:"Reflect",stat:!0,forced:Cp,sham:Cp},{construct:function construct(h,g){Ua(h),Xa(g);var d=arguments.length<3?h:Ua(arguments[2]);if(Sp&&!_p)return bp(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(Qh.apply(h,x))}var b=d.prototype,_=tu(Pa(b)?b:Object.prototype),S=Function.apply.call(h,_,g);return Pa(S)?S:_}});var wp=Ga.Reflect.construct;Za({target:"Object",stat:!0,sham:!va},{create:tu});var Ep=Ga.Object,Pp=function create(h,g){return Ep.create(h,g)};Za({target:"Object",stat:!0},{setPrototypeOf:Dc});var Op=Ga.Object.setPrototypeOf;function _setPrototypeOf(h,g){return(_setPrototypeOf=Op||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=Pp(g&&g.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),g&&_setPrototypeOf(h,g)}var Tp=fu.f("iterator");function _typeof$1(h){return(_typeof$1="function"==typeof Cc&&"symbol"==typeof Tp?function _typeof(h){return typeof h}:function _typeof(h){return h&&"function"==typeof Cc&&h.constructor===Cc&&h!==Cc.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 kp=ya((function(){Tc(1)}));Za({target:"Object",stat:!0,forced:kp,sham:!Ec},{getPrototypeOf:function getPrototypeOf(h){return Tc(cs(h))}});var Ap=Ga.Object.getPrototypeOf;function _getPrototypeOf(h){return(_getPrototypeOf=Op?Ap:function _getPrototypeOf(h){return h.__proto__||Ap(h)})(h)}function _toConsumableArray(h){return function _arrayWithoutHoles(h){if(ws(h))return _arrayLikeToArray$2(h)}(h)||function _iterableToArray(h){if(void 0!==Cc&&Zc(Object(h)))return Cl(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 Rp=ne.some,Mp=arrayMethodIsStrict$1("some");_export$1({target:"Array",proto:!0,forced:!Mp},{some:function some(h){return Rp(this,h,arguments.length>1?arguments[1]:void 0)}});var Np=vs.some,Ip=kl("some");Za({target:"Array",proto:!0,forced:!Ip},{some:function some(h){return Np(this,h,arguments.length>1?arguments[1]:void 0)}});var Dp=Ro("Array").some,$p=Array.prototype,Vp=function some_1(h){var g=h.some;return h===$p||h instanceof Array&&g===$p.some?Dp:g},Lp=vt.includes;_export$1({target:"Array",proto:!0},{includes:function includes(h){return Lp(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 jp=Fs.includes;Za({target:"Array",proto:!0},{includes:function includes(h){return jp(this,h,arguments.length>1?arguments[1]:void 0)}});var Fp=Ro("Array").includes;Za({target:"String",proto:!0,forced:!Oo("includes")},{includes:function includes(h){return!!~String(wa(this)).indexOf(Eo(h),arguments.length>1?arguments[1]:void 0)}});var Bp=Ro("String").includes,zp=Array.prototype,Gp=String.prototype,Up=function includes(h){var g=h.includes;return h===zp||h instanceof Array&&g===zp.includes?Fp:"string"==typeof h||h===Gp||h instanceof String&&g===Gp.includes?Bp:g},Hp=Sl,Xp=[].reverse,Yp=[1,2];Za({target:"Array",proto:!0,forced:String(Yp)===String(Yp.reverse())},{reverse:function reverse(){return ls(this)&&(this.length=this.length),Xp.call(this)}});var Wp=Ro("Array").reverse,qp=Array.prototype,Qp=function reverse_1(h){var g=h.reverse;return h===qp||h instanceof Array&&g===qp.reverse?Wp:g},Kp=Fs.indexOf,Zp=[].indexOf,Jp=!!Zp&&1/[1].indexOf(1,-0)<0,ty=kl("indexOf");Za({target:"Array",proto:!0,forced:Jp||!ty},{indexOf:function indexOf(h){return Jp?Zp.apply(this,arguments)||0:Kp(this,h,arguments.length>1?arguments[1]:void 0)}});var ey=Ro("Array").indexOf,ry=Array.prototype,ny=function indexOf_1(h){var g=h.indexOf;return h===ry||h instanceof Array&&g===ry.indexOf?ey:g};Za({target:"Reflect",stat:!0},{get:function get$3(h,g){var d,x,b=arguments.length<3?h:arguments[2];return Xa(h)===b?h[g]:(d=Da.f(h,g))?ka(d,"value")?d.value:void 0===d.get?void 0:d.get.call(b):Pa(x=Tc(h))?get$3(x,g,b):void 0}});var iy=Ga.Reflect.get,ay=Ll;function _get(h,g,d){return(_get="undefined"!=typeof Reflect&&iy?iy: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=ay(x,g);return b.get?b.get.call(d):b.value}})(h,g,d||h)}Za({target:"Array",proto:!0},{fill:function fill(h){for(var g=cs(this),d=no(g.length),x=arguments.length,b=Ls(x>1?arguments[1]:void 0,d),_=x>2?arguments[2]:void 0,S=void 0===_?d:Ls(_,d);S>b;)g[b++]=h;return g}});var oy=Ro("Array").fill,sy=Array.prototype,uy=function fill_1(h){var g=h.fill;return h===sy||h instanceof Array&&g===sy.fill?oy:g},cy=function t(h,g){return(cy=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}cy(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 ly=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*ly),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*ly);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*ly),1===h.sweepFlag&&h.phi2<h.phi1&&(h.phi2+=2*ly),h.phi1*=180/ly,h.phi2*=180/ly}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,hy=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*ly)*g+Math.sin(x/180*ly)*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&my.SMOOTH_CURVE_TO&&(b.type=my.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&my.CURVE_TO?(h=b.relative?_+b.x2:b.x2,g=b.relative?S+b.y2:b.y2):(h=NaN,g=NaN),b.type&my.SMOOTH_QUAD_TO&&(b.type=my.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&my.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&my.SMOOTH_QUAD_TO&&(d.type=my.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&my.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=my.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&my.MOVE_TO))throw new Error("path must start with moveto");var S=h(_,g,d,x,b);return _.type&my.CLOSE_PATH&&(g=x,d=b),void 0!==_.x&&(g=_.relative?g+_.x:_.x),void 0!==_.y&&(d=_.relative?d+_.y:_.y),_.type&my.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&my.HORIZ_LINE_TO&&0!==g&&(S.type=my.LINE_TO,S.y=S.relative?0:w),S.type&my.VERT_LINE_TO&&0!==d&&(S.type=my.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=my.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&my.MOVE_TO))throw new Error("path must start with moveto");return g&&x.type&my.HORIZ_LINE_TO&&(x.type=my.LINE_TO,x.y=x.relative?0:_),d&&x.type&my.VERT_LINE_TO&&(x.type=my.LINE_TO,x.x=x.relative?0:b),h&&x.type&my.CLOSE_PATH&&(x.type=my.LINE_TO,x.x=x.relative?S-b:S,x.y=x.relative?C-_:C),x.type&my.ARC&&(0===x.rX||0===x.rY)&&(x.type=my.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&my.SMOOTH_CURVE_TO&&(A=isNaN(g)?0:S-g,R=isNaN(d)?0:C-d),_.type&(my.CURVE_TO|my.SMOOTH_CURVE_TO)?(g=_.relative?S+_.x2:_.x2,d=_.relative?C+_.y2:_.y2):(g=NaN,d=NaN),_.type&my.SMOOTH_QUAD_TO?(x=isNaN(x)?S:2*S-x,b=isNaN(b)?C:2*C-b):_.type&my.QUAD_TO?(x=_.relative?S+_.x1:_.x1,b=_.relative?C+_.y1:_.y2):(x=NaN,b=NaN),_.type&my.LINE_COMMANDS||_.type&my.ARC&&(0===_.rX||0===_.rY||!_.lArcFlag)||_.type&my.CURVE_TO||_.type&my.SMOOTH_CURVE_TO||_.type&my.QUAD_TO||_.type&my.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&my.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 my.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*hy/4),V=[Math.cos(M*hy)-$*Math.sin(M*hy),Math.sin(M*hy)+$*Math.cos(M*hy)],L=V[0],j=V[1],B=[Math.cos(N*hy),Math.sin(N*hy)],z=B[0],G=B[1],U=[z+$*Math.sin(N*hy),G-$*Math.cos(N*hy)],X=U[0],Y=U[1];P[R]={relative:h.relative,type:my.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),my.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&my.DRAWING_COMMANDS&&(O(_),T(S)),C.type&my.HORIZ_LINE_TO&&O(C.x),C.type&my.VERT_LINE_TO&&T(C.y),C.type&my.LINE_TO&&(O(C.x),T(C.y)),C.type&my.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&my.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 py,yy=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}(),vy=function v(h){return" "===h||"\t"===h||"\r"===h||"\n"===h},gy=function l(h){return"0".charCodeAt(0)<=h.charCodeAt(0)&&h.charCodeAt(0)<="9".charCodeAt(0)},dy=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!==my.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),C=gy(_)&&("0"===this.curNumber&&"0"===_||S);if(!gy(_)||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===my.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===xy[this.curCommandType]&&(my.HORIZ_LINE_TO===this.curCommandType?x({type:my.HORIZ_LINE_TO,relative:this.curCommandRelative,x:w}):my.VERT_LINE_TO===this.curCommandType?x({type:my.VERT_LINE_TO,relative:this.curCommandRelative,y:w}):this.curCommandType===my.MOVE_TO||this.curCommandType===my.LINE_TO||this.curCommandType===my.SMOOTH_QUAD_TO?(x({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),my.MOVE_TO===this.curCommandType&&(this.curCommandType=my.LINE_TO)):this.curCommandType===my.CURVE_TO?x({type:my.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===my.SMOOTH_CURVE_TO?x({type:my.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===my.QUAD_TO?x({type:my.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===my.ARC&&x({type:my.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(!vy(_))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=my.HORIZ_LINE_TO,this.curCommandRelative="h"===_;else if("v"===_||"V"===_)this.curCommandType=my.VERT_LINE_TO,this.curCommandRelative="v"===_;else if("m"===_||"M"===_)this.curCommandType=my.MOVE_TO,this.curCommandRelative="m"===_;else if("l"===_||"L"===_)this.curCommandType=my.LINE_TO,this.curCommandRelative="l"===_;else if("c"===_||"C"===_)this.curCommandType=my.CURVE_TO,this.curCommandRelative="c"===_;else if("s"===_||"S"===_)this.curCommandType=my.SMOOTH_CURVE_TO,this.curCommandRelative="s"===_;else if("q"===_||"Q"===_)this.curCommandType=my.QUAD_TO,this.curCommandRelative="q"===_;else if("t"===_||"T"===_)this.curCommandType=my.SMOOTH_QUAD_TO,this.curCommandRelative="t"===_;else{if("a"!==_&&"A"!==_)throw new SyntaxError('Unexpected character "'+_+'" at index '+b+".");this.curCommandType=my.ARC,this.curCommandRelative="a"===_}else g.push({type:my.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}(yy),my=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===my.CLOSE_PATH)g+="z";else if(x.type===my.HORIZ_LINE_TO)g+=(x.relative?"h":"H")+x.x;else if(x.type===my.VERT_LINE_TO)g+=(x.relative?"v":"V")+x.y;else if(x.type===my.MOVE_TO)g+=(x.relative?"m":"M")+x.x+" "+x.y;else if(x.type===my.LINE_TO)g+=(x.relative?"l":"L")+x.x+" "+x.y;else if(x.type===my.CURVE_TO)g+=(x.relative?"c":"C")+x.x1+" "+x.y1+" "+x.x2+" "+x.y2+" "+x.x+" "+x.y;else if(x.type===my.SMOOTH_CURVE_TO)g+=(x.relative?"s":"S")+x.x2+" "+x.y2+" "+x.x+" "+x.y;else if(x.type===my.QUAD_TO)g+=(x.relative?"q":"Q")+x.x1+" "+x.y1+" "+x.x+" "+x.y;else if(x.type===my.SMOOTH_QUAD_TO)g+=(x.relative?"t":"T")+x.x+" "+x.y;else{if(x.type!==my.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 dy,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}(yy),xy=((py={})[my.MOVE_TO]=2,py[my.LINE_TO]=2,py[my.HORIZ_LINE_TO]=1,py[my.VERT_LINE_TO]=1,py[my.CLOSE_PATH]=0,py[my.QUAD_TO]=4,py[my.SMOOTH_QUAD_TO]=2,py[my.CURVE_TO]=6,py[my.SMOOTH_CURVE_TO]=4,py[my.ARC]=7,py),by=Da.f;Za({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(h,g){var d=by(Xa(h),g);return!(d&&!d.configurable)&&delete h[g]}});var _y=Ga.Reflect.deleteProperty,Sy=Ro("Array").values,Cy=Array.prototype,wy={DOMTokenList:!0,NodeList:!0},Ey=function values_1(h){var g=h.values;return h===Cy||h instanceof Array&&g===Cy.values||wy.hasOwnProperty(mu(h))?Sy:g},Py=rs.trim,Oy=ca.parseInt,Ty=/^[+-]?0[Xx]/,ky=8!==Oy(Ko+"08")||22!==Oy(Ko+"0x16")?function parseInt(h,g){var d=Py(String(h));return Oy(d,g>>>0||(Ty.test(d)?16:10))}:Oy;Za({global:!0,forced:parseInt!=ky},{parseInt:ky});var Ay=Ga.parseInt,Ry=Cs,My=tl,Ny=xc,Iy=ul,Dy=Object.isExtensible,$y=fails$1((function(){Dy(1)}));_export$1({target:"Object",stat:!0,forced:$y},{isExtensible:function isExtensible(h){return!!isObject$1(h)&&(!Dy||Dy(h))}});var Vy=Ki.onFreeze,Ly=Object.preventExtensions,jy=fails$1((function(){Ly(1)}));_export$1({target:"Object",stat:!0,forced:jy,sham:!Qi},{preventExtensions:function preventExtensions(h){return Ly&&isObject$1(h)?Ly(Vy(h)):h}});var Fy=!ya((function(){return Object.isExtensible(Object.preventExtensions({}))})),By=createCommonjsModule((function(h){var g=Wa.f,d=uo("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(!Pa(h))return"symbol"==_typeof$2(h)?h:("string"==typeof h?"S":"P")+h;if(!ka(h,d)){if(!b(h))return"F";if(!g)return"E";_(h)}return h[d].objectID},getWeakData:function getWeakData(h,g){if(!ka(h,d)){if(!b(h))return!0;if(!g)return!1;_(h)}return h[d].weakData},onFreeze:function onFreeze(h){return Fy&&S.REQUIRED&&b(h)&&!ka(h,d)&&_(h),h}};Bs[d]=!0})),zy=Wa.f,Gy=vs.forEach,Uy=Gu.set,Hy=Gu.getterFor,Xy=Wa.f,Yy=By.fastKey,Wy=Gu.set,qy=Gu.getterFor;!function collection(h,g,d){var x,b=-1!==h.indexOf("Map"),_=-1!==h.indexOf("Weak"),S=b?"set":"add",C=ca[h],w=C&&C.prototype,E={};if(va&&"function"==typeof C&&(_||w.forEach&&!ya((function(){(new C).entries().next()})))){x=g((function(g,d){Uy(of(g,x,h),{type:h,collection:new C}),null!=d&&Zl(d,g[S],{that:g,AS_ENTRIES:b})}));var P=Hy(h);Gy(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(h){var g="add"==h||"set"==h;!(h in w)||_&&"clear"==h||qa(x.prototype,h,(function(d,x){var b=P(this).collection;if(!g&&_&&!Pa(d))return"get"==h&&void 0;var S=b[h](0===d?0:d,x);return g?this:S}))})),_||zy(x.prototype,"size",{configurable:!0,get:function get(){return P(this).collection.size}})}else x=d.getConstructor(g,h,b,S),By.REQUIRED=!0;Su(x,h,!1,!0),E[h]=x,Za({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,_){of(h,b,g),Wy(h,{type:g,index:tu(null),first:void 0,last:void 0,size:0}),va||(h.size=0),null!=_&&Zl(_,h[x],{that:h,AS_ENTRIES:d})})),_=qy(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=Yy(g,!0),key:g,value:d,previous:x=S.last,next:void 0,removed:!1},S.first||(S.first=w),x&&(x.next=w),va?S.size++:h.size++,"F"!==b&&(S.index[b]=w)),h},C=function getEntry(h,g){var d,x=_(h),b=Yy(g);if("F"!==b)return x.index[b];for(d=x.first;d;d=d.next)if(d.key==g)return d};return rf(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,va?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),va?d.size--:g.size--}return!!x},forEach:function forEach(h){for(var g,d=_(this),x=Ha(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)}}),rf(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)}}),va&&Xy(b.prototype,"size",{get:function get(){return _(this).size}}),b},setStrong:function setStrong(h,g,d){var x=g+" Iterator",b=qy(g),_=qy(x);Fc(h,g,(function(h,g){Wy(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),af(g)}});var Qy=Ga.Map,Ky=fo("Reflect","apply"),Zy=Function.apply,Jy=!ya((function(){Ky((function(){}))}));Za({target:"Reflect",stat:!0,forced:Jy},{apply:function apply(h,g,d){return Ua(h),Xa(d),Ky?Ky(h,g,d):Zy.call(h,g,d)}});var tv=Ga.Reflect.apply;Za({target:"Reflect",stat:!0,sham:!Ec},{getPrototypeOf:function getPrototypeOf(h){return Tc(Xa(h))}});var ev=Ga.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],nv=[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 iv,M=R,N=1;N<w;N++)M=M.next=new iv,N===k&&(S=M);M.next=R;for(var D=null,$=null,V=0,L=0,j=rv[_],B=nv[_],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 iv=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 Ss(g).call(g,os)}var av=/^[A-Z-]+$/;function normalizeAttributeName(h){return av.test(h)?h.toLowerCase():h}function parseExternalUrl(h){var g=h.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||[];return g[2]||g[3]||g[4]}var ov=/(\[[^\]]+\])/g,sv=/(#[^\s\+>~\.\[:]+)/g,uv=/(\.[^\s\+>~\.\[:]+)/g,cv=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,lv=/(:[\w-]+\([^\)]*\))/gi,fv=/(:[^\s\+>~\.\[:]+)/g,hv=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(h,g){var d=h.match(g);return d?[h.replace(g," "),d.length]:[h,0]}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 pv=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 Ss(h=yp(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:os(h);var g=this.value,d=os(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(!Io(h).call(h,"rgb"))return h;var g=3;return h.replace(/\d+(\.\d+)?/g,(function(h,d){return g--&&d?String(Math.round(os(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 xp(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}();pv.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 yv=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}(),vv=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}(),gv=function(){function Mouse(h){var g,d;_classCallCheck$1(this,Mouse),this.screen=h,this.working=!1,this.events=[],this.eventElements=[],this.onClick=Jh(g=this.onClick).call(g,this),this.onMouseMove=Jh(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=""),Dl(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;Dl(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;Dl(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 vv(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}(),dv="undefined"!=typeof window?window:null,mv="undefined"!=typeof fetch?Jh(fetch).call(fetch,void 0):null,xv=function(){function Screen(h){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=g.fetch,x=void 0===d?mv:d,b=g.window,_=void 0===b?dv: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 yv,this.mouse=new gv(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:Xh.resolve()}},{key:"isReady",value:function isReady(){var h;if(this.isReadyLock)return!0;var g=Hh(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 pv(g,"refX",A),K=new pv(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 Xh((function(h){g.resolveReady=h})),this.isReady()&&this.render(h,P,A,M,N,D,$),b){var B=Lh(),z=B,G=0,U=function tick(){B=Lh(),(G=B-z)>=j&&(z=B-G%j,g.shouldUpdate(w,R)&&(g.render(h,P,A,M,N,D,$),L.runEvents())),g.intervalId=lp(tick)};S||L.start(),this.intervalId=lp(U)}}},{key:"stop",value:function stop(){this.intervalId&&(lp.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function shouldUpdate(h,g){if(!h){var d,x=this.frameDuration,shouldUpdate=Vh(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(kh($=kh(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}();xv.defaultWindow=dv,xv.defaultFetch=mv;var bv=xv.defaultFetch,_v="undefined"!=typeof DOMParser?DOMParser:null,Sv=function(){function Parser(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=h.fetch,d=void 0===g?bv:g,x=h.DOMParser,b=void 0===x?_v:x;_classCallCheck$1(this,Parser),this.fetch=d,this.DOMParser=b}var h,g;return _createClass(Parser,[{key:"parse",value:(g=_asyncToGenerator(Ql.mark((function _callee(h){return Ql.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(Ql.mark((function _callee2(h){var g,d;return Ql.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}(),Cv=function(){function Translate(h,g){_classCallCheck$1(this,Translate),this.type="translate",this.point=null,this.point=vv.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}(),wv=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 pv(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}(),Ev=function(){function Scale(h,g){_classCallCheck$1(this,Scale),this.type="scale",this.scale=null;var d=vv.parseScale(g);0!==d.x&&0!==d.y||(d.x=1e-8,d.y=1e-8),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}(),Pv=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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Ov=function(h){_inherits(Skew,Pv);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 pv(h,"angle",d),x}return Skew}();function _createSuper$1(h){var g=function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Tv=function(h){_inherits(SkewX,Ov);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}();function _createSuper$2(h){var g=function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var kv=function(h){_inherits(SkewY,Ov);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}();var Av=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 yp(g=compressSpaces(h)).call(g).replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(g);Dl(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[yp(d).call(d),yp(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}();Av.transformTypes={translate:Cv,rotate:wv,scale:Ev,matrix:Pv,skewX:Tv,skewY:kv};var Rv=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(Dl(d=Hp(g.attributes)).call(d,(function(g){var d=normalizeAttributeName(g.nodeName);b.attributes[d]=new pv(h,d,g.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var S,C=Ss(S=this.getAttribute("style").getString().split(";")).call(S,(function(h){return yp(h).call(h)}));Dl(C).call(C,(function(g){var d;if(g){var x=_slicedToArray(Ss(d=g.split(":")).call(d,(function(h){return yp(h).call(h)})),2),_=x[0],S=x[1];b.styles[_]=new pv(h,_,S)}}))}var w=h.definitions,E=this.getAttribute("id");E.hasValue()&&(w[E.getValue()]||(w[E.getValue()]=this)),Dl(x=Hp(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 pv(this.document,h,"");return this.attributes[h]=x,x}return d||pv.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 pv.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 pv(this.document,h,"");return this.styles[h]=C,C}return x||pv.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=Av.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;Dl(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,Up(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)&&Vp(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 Vh(g).call(g,(function(g,d){var x,b=h.getStyle(d);if(!b.hasValue())return g;var _=b.getString();return b.setValue(""),kh(x=[]).call(x,_toConsumableArray(g),[[d,_]])}),[])}},{key:"restoreStyles",value:function restoreStyles(h,g){Dl(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}Rv.ignoreChildTypes=["title"];var Mv=function(h){_inherits(UnknownElement,Rv);var g=_createSuper$3(UnknownElement);function UnknownElement(h,d,x){return _classCallCheck$1(this,UnknownElement),g.call(this,h,d,x)}return UnknownElement}();function wrapFontFamily(h){var g=yp(h).call(h);return/^('|")/.test(g)?g:'"'.concat(g,'"')}function prepareFontStyle(h){if(!h)return"";var g=yp(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=yp(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 Nv=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 g,d,x;return yp(g=[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(d=this.fontFamily,void 0===h?d:Ss(x=yp(d).call(d).split(",")).call(x,wrapFontFamily).join(","))].join(" ")).call(g)}}],[{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=yp(h=compressSpaces(g)).call(h).split(" "),E={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return Dl(w).call(w,(function(h){var g,d,w;switch(!0){case!E.fontStyle&&Up(g=Font.styles).call(g,h):"inherit"!==h&&(x=h),E.fontStyle=!0;break;case!E.fontVariant&&Up(d=Font.variants).call(d,h):"inherit"!==h&&(b=h),E.fontStyle=!0,E.fontVariant=!0;break;case!E.fontWeight&&Up(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}();Nv.styles="normal|italic|oblique|inherit",Nv.variants="normal|small-caps|inherit",Nv.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Iv=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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Dv=function(h){_inherits(RenderedElement,Rv);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 pv(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 pv(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||1e-8}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 Nv(G.getString(),U.getString(),X.getString(),Y.hasValue()?"".concat(Y.getPixels(!0),"px"):"",W.getString(),Nv.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}();function _createSuper$5(h){var g=function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var $v=function(h){_inherits(TextElement,Dv);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 Dl(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=Nv.parse(h.ctx.font).fontSize;return g.getStyle("font-size").getNumber(d)}},{key:"getTElementBoundingBox",value:function getTElementBoundingBox(h){var g=this.getFontSize();return new Iv(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=Hp(g.parentNode.childNodes),x=ny(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),Dl(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=Nv.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?Qp(_=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?(Dl(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),Dl(b=_.children).call(b,(function(d,x){g.renderChild(h,g,_,x)}))}},{key:"measureTextRecursive",value:function measureTextRecursive(h){var g;return Vh(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?Qp(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}();function _createSuper$6(h){var g=function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Vv=function(h){_inherits(TSpanElement,$v);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}();function _createSuper$7(h){var g=function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Lv=function(h){_inherits(TextNode,Vv);var g=_createSuper$7(TextNode);function TextNode(){var h;return _classCallCheck$1(this,TextNode),(h=g.apply(this,arguments)).type="textNode",h}return TextNode}();function _createSuper$8(h){var g=function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var jv=function(h){_inherits(PathParser,my);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 vv(0,0),this.control=new vv(0,0),this.current=new vv(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 vv(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!==my.CURVE_TO&&h!==my.SMOOTH_CURVE_TO&&h!==my.QUAD_TO&&h!==my.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 vv(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}();function _createSuper$9(h){var g=function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Fv=function(h){_inherits(PathElement,Dv);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 jv(b.getAttribute("d").getString()),b}return _createClass(PathElement,[{key:"path",value:function path(h){var g=this.pathParser,d=new Iv;for(g.reset(),h&&h.beginPath();!g.isEnd();)switch(g.next().type){case jv.MOVE_TO:this.pathM(h,d);break;case jv.LINE_TO:this.pathL(h,d);break;case jv.HORIZ_LINE_TO:this.pathH(h,d);break;case jv.VERT_LINE_TO:this.pathV(h,d);break;case jv.CURVE_TO:this.pathC(h,d);break;case jv.SMOOTH_CURVE_TO:this.pathS(h,d);break;case jv.QUAD_TO:this.pathQ(h,d);break;case jv.SMOOTH_QUAD_TO:this.pathT(h,d);break;case jv.ARC:this.pathA(h,d);break;case jv.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 Ss(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")?uy(h).call(h,g.getString()):uy(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 vv(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 vv((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 vv(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 vv(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 vv(A*x*P.y/b,A*-b*P.x/x),M=new vv((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}();function _createSuper$a(h){var g=function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Bv=function(h){_inherits(SVGElement,Dv);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 pv(g,"fontSize",Nv.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(kh(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}();function _createSuper$b(h){var g=function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var zv=function(h){_inherits(RectElement,Fv);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 Iv(g,d,g+x,d+b)}},{key:"getMarkers",value:function getMarkers(){return null}}]),RectElement}();function _createSuper$c(h){var g=function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Gv=function(h){_inherits(CircleElement,Fv);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 Iv(g-x,d-x,g+x,d+x)}},{key:"getMarkers",value:function getMarkers(){return null}}]),CircleElement}();function _createSuper$d(h){var g=function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Uv=function(h){_inherits(EllipseElement,Fv);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 Iv(b-d,_-x,b+d,_+x)}},{key:"getMarkers",value:function getMarkers(){return null}}]),EllipseElement}();function _createSuper$e(h){var g=function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Hv=function(h){_inherits(LineElement,Fv);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 vv(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new vv(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 Iv(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}();function _createSuper$f(h){var g=function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Xv=function(h){_inherits(PolylineElement,Fv);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=vv.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 Iv(x,b);return h&&(h.beginPath(),h.moveTo(x,b)),Dl(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 Dl(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}();function _createSuper$g(h){var g=function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Yv=function(h){_inherits(PolygonElement,Xv);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}();function _createSuper$h(h){var g=function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Wv=function(h){_inherits(PatternElement,Rv);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 Bv(this.document,null);_.attributes.viewBox=new pv(this.document,"viewBox",this.getAttribute("viewBox").getValue()),_.attributes.width=new pv(this.document,"width","".concat(x,"px")),_.attributes.height=new pv(this.document,"height","".concat(b,"px")),_.attributes.transform=new pv(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:_y(this.styles,"fill-opacity");for(var P=-1;P<=1;P++)for(var k=-1;k<=1;k++)C.save(),_.attributes.x=new pv(this.document,"x",P*S.width),_.attributes.y=new pv(this.document,"y",k*S.height),_.render(C),C.restore();return h.createPattern(S,"repeat")}}]),PatternElement}();function _createSuper$i(h){var g=function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var qv=function(h){_inherits(MarkerElement,Rv);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 Bv(this.document,null);C.type=this.type,C.attributes.viewBox=new pv(this.document,"viewBox",this.getAttribute("viewBox").getValue()),C.attributes.refX=new pv(this.document,"refX",this.getAttribute("refX").getValue()),C.attributes.refY=new pv(this.document,"refY",this.getAttribute("refY").getValue()),C.attributes.width=new pv(this.document,"width",this.getAttribute("markerWidth").getValue()),C.attributes.height=new pv(this.document,"height",this.getAttribute("markerHeight").getValue()),C.attributes.overflow=new pv(this.document,"overflow",this.getAttribute("overflow").getValue()),C.attributes.fill=new pv(this.document,"fill",this.getAttribute("fill").getColor("black")),C.attributes.stroke=new pv(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}();function _createSuper$j(h){var g=function _isNativeReflectConstruct$j(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Qv=function(h){_inherits(DefsElement,Rv);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}();function _createSuper$k(h){var g=function _isNativeReflectConstruct$k(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Kv=function(h){_inherits(GElement,Dv);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 Iv;return Dl(g=this.children).call(g,(function(g){d.addBoundingBox(g.getBoundingBox(h))})),d}}]),GElement}();function _createSuper$l(h){var g=function _isNativeReflectConstruct$l(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Zv=function(h){_inherits(GradientElement,Rv);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 Dl(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(Dl(_).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 zv(C,null);k.attributes.x=new pv(C,"x",-E/3),k.attributes.y=new pv(C,"y",-E/3),k.attributes.width=new pv(C,"width",E),k.attributes.height=new pv(C,"height",E);var A=new Kv(C,null);A.attributes.transform=new pv(C,"transform",this.getAttribute("gradientTransform").getValue()),A.children=[k];var R=new Bv(C,null);R.attributes.x=new pv(C,"x",0),R.attributes.y=new pv(C,"y",0),R.attributes.width=new pv(C,"width",P.width),R.attributes.height=new pv(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;Dl(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 pv(this.document,"color",g).addOpacity(h).getColor():g}}]),GradientElement}();function _createSuper$m(h){var g=function _isNativeReflectConstruct$m(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var Jv=function(h){_inherits(LinearGradientElement,Zv);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}();function _createSuper$n(h){var g=function _isNativeReflectConstruct$n(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var tg=function(h){_inherits(RadialGradientElement,Zv);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}();function _createSuper$o(h){var g=function _isNativeReflectConstruct$o(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var eg=function(h){_inherits(StopElement,Rv);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}();function _createSuper$p(h){var g=function _isNativeReflectConstruct$p(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var rg=function(h){_inherits(AnimateElement,Rv);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"),Ey(b).hasValue()&&Ey(b).setValue(Ey(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),kh(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();_=kh(C="".concat(w,"(")).call(C,_,")")}d.setValue(_),b=!0}return b}},{key:"getProgress",value:function getProgress(){var h=this.document,g=Ey(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 pv(h,"from",os(g.getValue()[b])),d.to=new pv(h,"to",os(g.getValue()[_])),d.progress=(x-b)/(_-b)}else d.from=this.from,d.to=this.to;return d}}]),AnimateElement}();function _createSuper$q(h){var g=function _isNativeReflectConstruct$q(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ng=function(h){_inherits(AnimateColorElement,rg);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 xp(d.getColor()),_=new xp(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 kh(S=kh(C="rgb(".concat(Ay(w,10),", ")).call(C,Ay(E,10),", ")).call(S,Ay(P,10),")")}return this.getAttribute("from").getColor()}}]),AnimateColorElement}();function _createSuper$r(h){var g=function _isNativeReflectConstruct$r(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ig=function(h){_inherits(AnimateTransformElement,rg);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 Ss(b).call(b,(function(h,d){return h+(_[d]-h)*g})).join(" ")}}]),AnimateTransformElement}();function _createForOfIteratorHelper(h,g){var d;if(void 0===Ny||null==My(h)){if(Ry(h)||(d=function _unsupportedIterableToArray(h,g){var d;if(!h)return;if("string"==typeof h)return _arrayLikeToArray(h,g);var x=Iy(d=Object.prototype.toString.call(h)).call(d,8,-1);"Object"===x&&h.constructor&&(x=h.constructor.name);if("Map"===x||"Set"===x)return Hp(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=el(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ag=function(h){_inherits(FontElement,Rv);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}();function _createSuper$t(h){var g=function _isNativeReflectConstruct$t(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var og=function(h){_inherits(FontFaceElement,Rv);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}();function _createSuper$u(h){var g=function _isNativeReflectConstruct$u(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var sg=function(h){_inherits(MissingGlyphElement,Fv);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}();function _createSuper$v(h){var g=function _isNativeReflectConstruct$v(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var ug=function(h){_inherits(GlyphElement,Fv);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}();function _createSuper$w(h){var g=function _isNativeReflectConstruct$w(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var cg=function(h){_inherits(TRefElement,$v);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}();function _createSuper$x(h){var g=function _isNativeReflectConstruct$x(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var lg=function(h){_inherits(AElement,$v);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&&Hh(b=Hp(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 pv(g,"fontSize",Nv.parse(g.ctx.font).fontSize);b.isWorking()&&b.checkBoundingBox(this,new Iv(d,x-_.getPixels("y"),d+this.measureText(h),x))}else if(this.children.length>0){var S=new Kv(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}();function _createForOfIteratorHelper$1(h,g){var d;if(void 0===Ny||null==My(h)){if(Ry(h)||(d=function _unsupportedIterableToArray$1(h,g){var d;if(!h)return;if("string"==typeof h)return _arrayLikeToArray$1(h,g);var x=Iy(d=Object.prototype.toString.call(h)).call(d,8,-1);"Object"===x&&h.constructor&&(x=h.constructor.name);if("Map"===x||"Set"===x)return Hp(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=el(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=ql(h);if(Yl){var x=Yl(h);g&&(x=Xl(x).call(x,(function(g){return jl(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)Dl(d=ownKeys(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(Tl)Pl(h,Tl(x));else{var b;Dl(b=ownKeys(Object(x))).call(b,(function(g){El(h,g,jl(x,g))}))}}return h}function _createSuper$y(h){var g=function _isNativeReflectConstruct$y(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var fg=function(h){_inherits(TextPathElement,$v);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 Qy([["",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(),Dl(g).call(g,(function(g){var d=g.type,x=g.points;switch(d){case jv.LINE_TO:h&&h.lineTo(x[0],x[1]);break;case jv.MOVE_TO:h&&h.moveTo(x[0],x[1]);break;case jv.CURVE_TO:h&&h.bezierCurveTo(x[0],x[1],x[2],x[3],x[4],x[5]);break;case jv.QUAD_TO:h&&h.quadraticCurveTo(x[0],x[1],x[2],x[3]);break;case jv.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 jv.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(),Dl(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=Ss(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=Vh(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,Dl(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 jv.MOVE_TO:this.pathM(d,w);break;case jv.LINE_TO:C=this.pathL(d,w);break;case jv.HORIZ_LINE_TO:C=this.pathH(d,w);break;case jv.VERT_LINE_TO:C=this.pathV(d,w);break;case jv.CURVE_TO:this.pathC(d,w);break;case jv.SMOOTH_CURVE_TO:C=this.pathS(d,w);break;case jv.QUAD_TO:this.pathQ(d,w);break;case jv.SMOOTH_QUAD_TO:C=this.pathT(d,w);break;case jv.ARC:w=this.pathA(d);break;case jv.CLOSE_PATH:Fv.pathZ(d)}S.type!==jv.CLOSE_PATH?g.push({type:C,points:w,start:{x:b,y:_},pathLength:this.calcLength(b,_,C,w)}):g.push({type:jv.CLOSE_PATH,points:[],pathLength:0})}return g}},{key:"pathM",value:function pathM(h,g){var d=Fv.pathM(h).point,x=d.x,b=d.y;g.push(x,b)}},{key:"pathL",value:function pathL(h,g){var d=Fv.pathL(h).point,x=d.x,b=d.y;return g.push(x,b),jv.LINE_TO}},{key:"pathH",value:function pathH(h,g){var d=Fv.pathH(h).point,x=d.x,b=d.y;return g.push(x,b),jv.LINE_TO}},{key:"pathV",value:function pathV(h,g){var d=Fv.pathV(h).point,x=d.x,b=d.y;return g.push(x,b),jv.LINE_TO}},{key:"pathC",value:function pathC(h,g){var d=Fv.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=Fv.pathS(h),x=d.point,b=d.controlPoint,_=d.currentPoint;return g.push(x.x,x.y,b.x,b.y,_.x,_.y),jv.CURVE_TO}},{key:"pathQ",value:function pathQ(h,g){var d=Fv.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=Fv.pathT(h),x=d.controlPoint,b=d.currentPoint;return g.push(x.x,x.y,b.x,b.y),jv.QUAD_TO}},{key:"pathA",value:function pathA(h){var g=Fv.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 jv.LINE_TO:return this.getLineLength(h,g,x[0],x[1]);case jv.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 jv.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 jv.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+1e-8),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+1e-8)===C)P={x:_+w,y:S+E};else{var k=0,A=0,R=this.getLineLength(g,d,x,b);if(R<1e-8)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 jv.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 jv.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 jv.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 jv.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=Vh(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}();function _createSuper$z(h){var g=function _isNativeReflectConstruct$z(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var hg=function(h){_inherits(ImageElement,Dv);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(Ql.mark((function _callee(h){var g;return Ql.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(Ql.mark((function _callee2(h){var g,d;return Ql.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 Iv(h,g,h+d,g+x)}}]),ImageElement}();function _createSuper$A(h){var g=function _isNativeReflectConstruct$A(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var pg=function(h){_inherits(SymbolElement,Dv);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}(),yg=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(Ql.mark((function _callee(h,g){var d,x,b,_;return Ql.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"),Dl(d=Hp(_)).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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var vg=function(h){_inherits(StyleElement,Rv);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(Ss(b=Hp(d.childNodes)).call(b,(function(h){return h.data})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}");return Dl(S).call(S,(function(g){var d=yp(g).call(g);if(d){var x=d.split("{"),b=x[0].split(","),_=x[1].split(";");Dl(b).call(b,(function(g){var d=yp(g).call(g);if(d){var x=h.styles[d]||{};if(Dl(_).call(_,(function(g){var d,b,_=ny(g).call(g,":"),S=yp(d=g.substr(0,_)).call(d),C=yp(b=g.substr(_+1,g.length-_)).call(b);S&&C&&(x[S]=new pv(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,ov),2);d=b[0],x=b[1],g[1]+=x;var _=_slicedToArray(findSelectorMatch(d,sv),2);d=_[0],x=_[1],g[0]+=x;var S=_slicedToArray(findSelectorMatch(d,uv),2);d=S[0],x=S[1],g[1]+=x;var C=_slicedToArray(findSelectorMatch(d,cv),2);d=C[0],x=C[1],g[2]+=x;var w=_slicedToArray(findSelectorMatch(d,lv),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," "),hv),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(",");Dl(S).call(S,(function(g){if(ny(g).call(g,'format("svg")')>0){var d=parseExternalUrl(g);d&&new yg(h).load(b,d)}}))}}}))}})),_}return StyleElement}();function _createSuper$C(h){var g=function _isNativeReflectConstruct$C(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}vg.parseExternalUrl=parseExternalUrl;var gg=function(h){_inherits(UseElement,Dv);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 Bv(g,null)).attributes.viewBox=new pv(g,"viewBox",d.getAttribute("viewBox").getString()),x.attributes.preserveAspectRatio=new pv(g,"preserveAspectRatio",d.getAttribute("preserveAspectRatio").getString()),x.attributes.overflow=new pv(g,"overflow",d.getAttribute("overflow").getString()),x.children=d.children,d.styles.opacity=new pv(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 pv(g,"width",b.getString())),_.hasValue()&&(x.attributes.height=new pv(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 Av.fromElement(h,g)}},{key:"element",get:function get(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),UseElement}();function _createSuper$D(h){var g=function _isNativeReflectConstruct$D(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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 dg=function(h){_inherits(FeColorMatrixElement,Rv);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}();function _createSuper$E(h){var g=function _isNativeReflectConstruct$E(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var mg=function(h){_inherits(MaskElement,Rv);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 Iv;Dl(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 dg(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}();function _createSuper$F(h){var g=function _isNativeReflectConstruct$F(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}mg.ignoreStyles=["mask","transform","clip-path"];var xg=function noop(){},bg=function(h){_inherits(ClipPathElement,Rv);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=ev(h),b=h.beginPath,_=h.closePath;x&&(x.beginPath=xg,x.closePath=xg),tv(b,h,[]),Dl(g=this.children).call(g,(function(g){if(void 0!==g.path){var b=void 0!==g.elementTransform?g.elementTransform():null;b||(b=Av.fromElement(d,g)),b&&b.apply(h),g.path(h),x&&(x.closePath=_),b&&b.unapply(h)}})),tv(_,h,[]),h.clip(),x&&(x.beginPath=b,x.closePath=_)}},{key:"render",value:function render(h){}}]),ClipPathElement}();function _createSuper$G(h){var g=function _isNativeReflectConstruct$G(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}var _g=function(h){_inherits(FilterElement,Rv);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;Dl(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),Dl(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}();function _createSuper$H(h){var g=function _isNativeReflectConstruct$H(){if("undefined"==typeof Reflect||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(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||!wp)return!1;if(wp.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(wp(Date,[],(function(){}))),!0}catch(h){return!1}}();return function _createSuperInternal(){var d,x=_getPrototypeOf(h);if(g){var b=_getPrototypeOf(this).constructor;d=wp(x,arguments,b)}else d=x.apply(this,arguments);return _possibleConstructorReturn(this,d)}}_g.ignoreStyles=["filter","transform","clip-path"];var Sg={svg:Bv,rect:zv,circle:Gv,ellipse:Uv,line:Hv,polyline:Xv,polygon:Yv,path:Fv,pattern:Wv,marker:qv,defs:Qv,linearGradient:Jv,radialGradient:tg,stop:eg,animate:rg,animateColor:ng,animateTransform:ig,font:ag,"font-face":og,"missing-glyph":sg,glyph:ug,text:$v,tspan:Vv,tref:cg,a:lg,textPath:fg,image:hg,g:Kv,symbol:pg,style:vg,use:gg,mask:mg,clipPath:bg,filter:_g,feDropShadow:function(h){_inherits(FeDropShadowElement,Rv);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}(),feMorphology:function(h){_inherits(FeMorphologyElement,Rv);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}(),feComposite:function(h){_inherits(FeCompositeElement,Rv);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}(),feColorMatrix:dg,feGaussianBlur:function(h){_inherits(FeGaussianBlurElement,Rv);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}(),title:function(h){_inherits(TitleElement,Rv);var g=_createSuper$L(TitleElement);function TitleElement(){var h;return _classCallCheck$1(this,TitleElement),(h=g.apply(this,arguments)).type="title",h}return TitleElement}(),desc:function(h){_inherits(DescElement,Rv);var g=_createSuper$M(DescElement);function DescElement(){var h;return _classCallCheck$1(this,DescElement),(h=g.apply(this,arguments)).type="desc",h}return DescElement}()};function ownKeys$1(h,g){var d=ql(h);if(Yl){var x=Yl(h);g&&(x=Xl(x).call(x,(function(g){return jl(h,g).enumerable}))),d.push.apply(d,x)}return d}function _createImage(){return(_createImage=_asyncToGenerator(Ql.mark((function _callee(h){var g,d,x=arguments;return Ql.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 Xh((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 Cg=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(Jh(g=this.isImagesLoaded).call(g,this)),this.screen.wait(Jh(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 Hh(h=this.images).call(h,(function(h){return h.loaded}))}},{key:"isFontsLoaded",value:function isFontsLoaded(){var h;return Hh(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 Mv(this,h)}},{key:"createTextNode",value:function createTextNode(h){return new Lv(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)Dl(d=ownKeys$1(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(Tl)Pl(h,Tl(x));else{var b;Dl(b=ownKeys$1(Object(x))).call(b,(function(g){El(h,g,jl(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=ql(h);if(Yl){var x=Yl(h);g&&(x=Xl(x).call(x,(function(g){return jl(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)Dl(d=ownKeys$2(Object(x),!0)).call(d,(function(g){_defineProperty(h,g,x[g])}));else if(Tl)Pl(h,Tl(x));else{var b;Dl(b=ownKeys$2(Object(x))).call(b,(function(g){El(h,g,jl(x,g))}))}}return h}Cg.createCanvas=function createCanvas(h,g){var d=document.createElement("canvas");return d.width=h,d.height=g,d},Cg.createImage=function createImage(h){return _createImage.apply(this,arguments)},Cg.elementTypes=Sg;var wg=function(){function Canvg(h,g){var d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck$1(this,Canvg),this.parser=new Sv(d),this.screen=new xv(h,d),this.options=d;var x=new Cg(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(Ql.mark((function _callee(){var h,g=arguments;return Ql.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(Ql.mark((function _callee2(h,g){var d,x,b,_=arguments;return Ql.wrap((function _callee2$(S){for(;;)switch(S.prev=S.next){case 0:return d=_.length>2&&void 0!==_[2]?_[2]:{},x=new Sv(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 Sv(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 Og}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return Tg}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+h))}}var Eg=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 Og}));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)}}(),Pg={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,Eg(_.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,wg(_,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)})))()}},Og=Object.freeze({__proto__:null,default:{uploading:"Uploading...",hiddenframe:"Opensave frame to store hidden values"}}),Tg=Object.freeze({__proto__:null,default:{uploading:"正在上传...",hiddenframe:"Opensave frame to store hidden values"}});export default Pg;
//# sourceMappingURL=ext-server_opensave.js.map