jmapcloud-ng 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (self.webpackChunkjmapcloud_ng=self.webpackChunkjmapcloud_ng||[]).push([[856],{27856:function(e){e.exports=function(){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,t,n){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(o,n.prototype),o},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,a=Object.freeze,i=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,s=c.construct;u||(u=function apply(e,t,n){return e.apply(t,n)}),a||(a=function freeze(e){return e}),i||(i=function seal(e){return e}),s||(s=function construct(e,t){return _construct(e,_toConsumableArray(t))});var p=unapply(Array.prototype.forEach),d=unapply(Array.prototype.pop),m=unapply(Array.prototype.push),f=unapply(String.prototype.toLowerCase),y=unapply(String.prototype.toString),h=unapply(String.prototype.match),g=unapply(String.prototype.replace),T=unapply(String.prototype.indexOf),b=unapply(String.prototype.trim),_=unapply(RegExp.prototype.test),S=unconstruct(TypeError);function unapply(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function unconstruct(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return s(e,n)}}function addToSet(e,r,o){var a;o=null!==(a=o)&&void 0!==a?a:f,t&&t(e,null);for(var i=r.length;i--;){var l=r[i];if("string"==typeof l){var c=o(l);c!==l&&(n(r)||(r[i]=c),l=c)}e[l]=!0}return e}function clone(t){var n,r=l(null);for(n in t)!0===u(e,t,[n])&&(r[n]=t[n]);return r}function lookupGetter(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return unapply(n.get);if("function"==typeof n.value)return unapply(n.value)}e=r(e)}function fallbackValue(e){return console.warn("fallback value for",e),null}return fallbackValue}var A=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),v=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),w=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C=a(["#text"]),O=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),x=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),L=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),R=i(/<%[\w\W]*|[\w\W]*%>/gm),I=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),H=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=i(/^(?:\w+script|data):/i),P=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=i(/^html$/i),G=function getGlobal(){return"undefined"==typeof window?null:window},B=function _createTrustedTypesPolicy(e,t){if("object"!==_typeof(e)||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function createHTML(e){return e},createScriptURL:function createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function createDOMPurify(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G(),t=function DOMPurify(e){return createDOMPurify(e)};if(t.version="2.4.7",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,o=e.DocumentFragment,i=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,s=e.NamedNodeMap,W=void 0===s?e.NamedNodeMap||e.MozNamedAttrMap:s,q=e.HTMLFormElement,V=e.DOMParser,Y=e.trustedTypes,$=c.prototype,K=lookupGetter($,"cloneNode"),X=lookupGetter($,"nextSibling"),Z=lookupGetter($,"childNodes"),J=lookupGetter($,"parentNode");if("function"==typeof i){var Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}var ee=B(Y,n),te=ee?ee.createHTML(""):"",ne=r,re=ne.implementation,oe=ne.createNodeIterator,ae=ne.createDocumentFragment,ie=ne.getElementsByTagName,le=n.importNode,ce={};try{ce=clone(r).documentMode?r.documentMode:{}}catch(e){}var ue={};t.isSupported="function"==typeof J&&re&&void 0!==re.createHTMLDocument&&9!==ce;var se,pe,de=M,me=R,fe=I,ye=F,he=H,ge=z,Te=P,be=U,_e=null,Se=addToSet({},[].concat(_toConsumableArray(A),_toConsumableArray(v),_toConsumableArray(N),_toConsumableArray(k),_toConsumableArray(C))),Ae=null,ve=addToSet({},[].concat(_toConsumableArray(O),_toConsumableArray(x),_toConsumableArray(L),_toConsumableArray(D))),Ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,ke=null,we=!0,Ce=!0,Oe=!1,xe=!0,Le=!1,De=!1,Me=!1,Re=!1,Ie=!1,Fe=!1,He=!1,Ue=!0,ze=!1,Pe="user-content-",je=!0,Ge=!1,Be={},We=null,qe=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,Ye=addToSet({},["audio","video","img","source","image","track"]),$e=null,Ke=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",Qe=Je,et=!1,tt=null,nt=addToSet({},[Xe,Ze,Je],y),rt=["application/xhtml+xml","text/html"],ot="text/html",at=null,it=r.createElement("form"),lt=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},ct=function _parseConfig(e){at&&at===e||(e&&"object"===_typeof(e)||(e={}),e=clone(e),se=se=-1===rt.indexOf(e.PARSER_MEDIA_TYPE)?ot:e.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===se?y:f,_e="ALLOWED_TAGS"in e?addToSet({},e.ALLOWED_TAGS,pe):Se,Ae="ALLOWED_ATTR"in e?addToSet({},e.ALLOWED_ATTR,pe):ve,tt="ALLOWED_NAMESPACES"in e?addToSet({},e.ALLOWED_NAMESPACES,y):nt,$e="ADD_URI_SAFE_ATTR"in e?addToSet(clone(Ke),e.ADD_URI_SAFE_ATTR,pe):Ke,Ve="ADD_DATA_URI_TAGS"in e?addToSet(clone(Ye),e.ADD_DATA_URI_TAGS,pe):Ye,We="FORBID_CONTENTS"in e?addToSet({},e.FORBID_CONTENTS,pe):qe,Ee="FORBID_TAGS"in e?addToSet({},e.FORBID_TAGS,pe):{},ke="FORBID_ATTR"in e?addToSet({},e.FORBID_ATTR,pe):{},Be="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Le=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,He=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,ze=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Qe=e.NAMESPACE||Je,Ne=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Ce=!1),Fe&&(Ie=!0),Be&&(_e=addToSet({},_toConsumableArray(C)),Ae=[],!0===Be.html&&(addToSet(_e,A),addToSet(Ae,O)),!0===Be.svg&&(addToSet(_e,v),addToSet(Ae,x),addToSet(Ae,D)),!0===Be.svgFilters&&(addToSet(_e,N),addToSet(Ae,x),addToSet(Ae,D)),!0===Be.mathMl&&(addToSet(_e,k),addToSet(Ae,L),addToSet(Ae,D))),e.ADD_TAGS&&(_e===Se&&(_e=clone(_e)),addToSet(_e,e.ADD_TAGS,pe)),e.ADD_ATTR&&(Ae===ve&&(Ae=clone(Ae)),addToSet(Ae,e.ADD_ATTR,pe)),e.ADD_URI_SAFE_ATTR&&addToSet($e,e.ADD_URI_SAFE_ATTR,pe),e.FORBID_CONTENTS&&(We===qe&&(We=clone(We)),addToSet(We,e.FORBID_CONTENTS,pe)),je&&(_e["#text"]=!0),De&&addToSet(_e,["html","head","body"]),_e.table&&(addToSet(_e,["tbody"]),delete Ee.tbody),a&&a(e),at=e)},ut=addToSet({},["mi","mo","mn","ms","mtext"]),st=addToSet({},["foreignobject","desc","title","annotation-xml"]),pt=addToSet({},["title","style","font","a","script"]),dt=addToSet({},v);addToSet(dt,N),addToSet(dt,E);var mt=addToSet({},k);addToSet(mt,w);var ft=function _checkValidNamespace(e){var t=J(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});var n=f(e.tagName),r=f(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(dt[n]):e.namespaceURI===Xe?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&st[r]:Boolean(mt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!st[r])&&!(t.namespaceURI===Xe&&!ut[r])&&!mt[n]&&(pt[n]||!dt[n]):!("application/xhtml+xml"!==se||!tt[e.namespaceURI]))},yt=function _forceRemove(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=te}catch(t){e.remove()}}},ht=function _removeAttribute(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Ae[e])if(Ie||Fe)try{yt(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},gt=function _initDocument(e){var t,n;if(Re)e="<remove></remove>"+e;else{var o=h(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===se&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=ee?ee.createHTML(e):e;if(Qe===Je)try{t=(new V).parseFromString(a,se)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?te:a}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Qe===Je?ie.call(t,De?"html":"body")[0]:De?t.documentElement:i},Tt=function _createIterator(e){return oe.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},bt=function _isClobbered(e){return e instanceof q&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function _isNode(e){return"object"===_typeof(l)?e instanceof l:e&&"object"===_typeof(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},St=function _executeHook(e,n,r){ue[e]&&p(ue[e],(function(e){e.call(t,n,r,at)}))},At=function _sanitizeElements(e){var n;if(St("beforeSanitizeElements",e,null),bt(e))return yt(e),!0;if(_(/[\u0080-\uFFFF]/,e.nodeName))return yt(e),!0;var r=pe(e.nodeName);if(St("uponSanitizeElement",e,{tagName:r,allowedTags:_e}),e.hasChildNodes()&&!_t(e.firstElementChild)&&(!_t(e.content)||!_t(e.content.firstElementChild))&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return yt(e),!0;if("select"===r&&_(/<template/i,e.innerHTML))return yt(e),!0;if(!_e[r]||Ee[r]){if(!Ee[r]&&Nt(r)){if(Ne.tagNameCheck instanceof RegExp&&_(Ne.tagNameCheck,r))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(r))return!1}if(je&&!We[r]){var o=J(e)||e.parentNode,a=Z(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i)o.insertBefore(K(a[i],!0),X(e))}return yt(e),!0}return e instanceof c&&!ft(e)?(yt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(n=e.textContent,n=g(n,de," "),n=g(n,me," "),n=g(n,fe," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),St("afterSanitizeElements",e,null),!1):(yt(e),!0)},vt=function _isValidAttribute(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in it))return!1;if(Ce&&!ke[t]&&_(ye,t));else if(we&&_(he,t));else if(!Ae[t]||ke[t]){if(!(Nt(e)&&(Ne.tagNameCheck instanceof RegExp&&_(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&_(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&_(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if($e[t]);else if(_(be,g(n,Te,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ve[e])if(Oe&&!_(ge,g(n,Te,"")));else if(n)return!1;return!0},Nt=function _basicCustomElementTest(e){return e.indexOf("-")>0},Et=function _sanitizeAttributes(e){var n,r,o,a;St("beforeSanitizeAttributes",e,null);var i=e.attributes;if(i){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};for(a=i.length;a--;){var c=n=i[a],u=c.name,s=c.namespaceURI;if(r="value"===u?n.value:b(n.value),o=pe(u),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,St("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(ht(u,e),l.keepAttr))if(xe||!_(/\/>/i,r)){Le&&(r=g(r,de," "),r=g(r,me," "),r=g(r,fe," "));var p=pe(e.nodeName);if(vt(p,o,r)){if(!ze||"id"!==o&&"name"!==o||(ht(u,e),r=Pe+r),ee&&"object"===_typeof(Y)&&"function"==typeof Y.getAttributeType)if(s);else switch(Y.getAttributeType(p,o)){case"TrustedHTML":r=ee.createHTML(r);break;case"TrustedScriptURL":r=ee.createScriptURL(r)}try{s?e.setAttributeNS(s,u,r):e.setAttribute(u,r),d(t.removed)}catch(e){}}}else ht(u,e)}St("afterSanitizeAttributes",e,null)}},kt=function _sanitizeShadowDOM(e){var t,n=Tt(e);for(St("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)St("uponSanitizeShadowNode",t,null),At(t)||(t.content instanceof o&&_sanitizeShadowDOM(t.content),Et(t));St("afterSanitizeShadowDOM",e,null)};return t.sanitize=function(r){var a,i,c,u,s,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((et=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!_t(r)){if("function"!=typeof r.toString)throw S("toString is not a function");if("string"!=typeof(r=r.toString()))throw S("dirty is not a string, aborting")}if(!t.isSupported){if("object"===_typeof(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(_t(r))return e.toStaticHTML(r.outerHTML)}return r}if(Me||ct(p),t.removed=[],"string"==typeof r&&(Ge=!1),Ge){if(r.nodeName){var d=pe(r.nodeName);if(!_e[d]||Ee[d])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof l)1===(i=(a=gt("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?a=i:a.appendChild(i);else{if(!Ie&&!Le&&!De&&-1===r.indexOf("<"))return ee&&He?ee.createHTML(r):r;if(!(a=gt(r)))return Ie?null:He?te:""}a&&Re&&yt(a.firstChild);for(var m=Tt(Ge?r:a);c=m.nextNode();)3===c.nodeType&&c===u||At(c)||(c.content instanceof o&&kt(c.content),Et(c),u=c);if(u=null,Ge)return r;if(Ie){if(Fe)for(s=ae.call(a.ownerDocument);a.firstChild;)s.appendChild(a.firstChild);else s=a;return(Ae.shadowroot||Ae.shadowrootmod)&&(s=le.call(n,s,!0)),s}var f=De?a.outerHTML:a.innerHTML;return De&&_e["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&_(j,a.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+f),Le&&(f=g(f,de," "),f=g(f,me," "),f=g(f,fe," ")),ee&&He?ee.createHTML(f):f},t.setConfig=function(e){ct(e),Me=!0},t.clearConfig=function(){at=null,Me=!1},t.isValidAttribute=function(e,t,n){at||ct({});var r=pe(e),o=pe(t);return vt(r,o,n)},t.addHook=function(e,t){"function"==typeof t&&(ue[e]=ue[e]||[],m(ue[e],t))},t.removeHook=function(e){if(ue[e])return d(ue[e])},t.removeHooks=function(e){ue[e]&&(ue[e]=[])},t.removeAllHooks=function(){ue={}},t}return createDOMPurify()}()}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkjmapcloud_ng=self.webpackChunkjmapcloud_ng||[]).push([[894],{75:function(h){(function(){var f,g,d,x,b,E;"undefined"!=typeof performance&&null!==performance&&performance.now?h.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(h.exports=function(){return(f()-b)/1e6},g=process.hrtime,x=(f=function(){var h;return 1e9*(h=g())[0]+h[1]})(),E=1e9*process.uptime(),b=x-E):Date.now?(h.exports=function(){return Date.now()-d},d=Date.now()):(h.exports=function(){return(new Date).getTime()-d},d=(new Date).getTime())}).call(this)},54087:function(h,f,g){for(var d=g(75),x="undefined"==typeof window?g.g:window,b=["moz","webkit"],E="AnimationFrame",P=x["request"+E],S=x["cancel"+E]||x["cancelRequest"+E],w=0;!P&&w<b.length;w++)P=x[b[w]+"Request"+E],S=x[b[w]+"Cancel"+E]||x[b[w]+"CancelRequest"+E];if(!P||!S){var C=0,A=0,M=[];P=function(h){if(0===M.length){var f=d(),g=Math.max(0,16.666666666666668-(f-C));C=g+f,setTimeout((function(){var h=M.slice(0);M.length=0;for(var f=0;f<h.length;f++)if(!h[f].cancelled)try{h[f].callback(C)}catch(h){setTimeout((function(){throw h}),0)}}),Math.round(g))}return M.push({handle:++A,callback:h,cancelled:!1}),A},S=function(h){for(var f=0;f<M.length;f++)M[f].handle===h&&(M[f].cancelled=!0)}}h.exports=function(h){return P.call(x,h)},h.exports.cancel=function(){S.apply(x,arguments)},h.exports.polyfill=function(h){h||(h=x),h.requestAnimationFrame=P,h.cancelAnimationFrame=S}},26131:function(h){h.exports=function(h){this.ok=!1,this.alpha=1,"#"==h.charAt(0)&&(h=h.substr(1,6)),h=(h=h.replace(/ /g,"")).toLowerCase();var f={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=f[h]||h;for(var g=[{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(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(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(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(h){return[parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16),parseInt(h[3]+h[3],16)]}}],d=0;d<g.length;d++){var x=g[d].re,b=g[d].process,E=x.exec(h);if(E){var P=b(E);this.r=P[0],this.g=P[1],this.b=P[2],P.length>3&&(this.alpha=P[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),f=this.g.toString(16),g=this.b.toString(16);return 1==h.length&&(h="0"+h),1==f.length&&(f="0"+f),1==g.length&&(g="0"+g),"#"+h+f+g},this.getHelpXML=function(){for(var h=new Array,d=0;d<g.length;d++)for(var x=g[d].example,b=0;b<x.length;b++)h[h.length]=x[b];for(var E in f)h[h.length]=E;var P=document.createElement("ul");P.setAttribute("id","rgbcolor-examples");for(d=0;d<h.length;d++)try{var S=document.createElement("li"),w=new RGBColor(h[d]),C=document.createElement("div");C.style.cssText="margin: 3px; border: 1px solid black; background:"+w.toHex()+"; color:"+w.toHex(),C.appendChild(document.createTextNode("test"));var A=document.createTextNode(" "+h[d]+" -> "+w.toRGB()+" -> "+w.toHex());S.appendChild(C),S.appendChild(A),P.appendChild(S)}catch(h){}return P}}},52655:function(h,f,g){"use strict";var d=g(19429),x=g(23691),b=TypeError;h.exports=function(h){if(d(h))return h;throw new b(x(h)+" is not a constructor")}},23550:function(h,f,g){"use strict";var d=g(69985),x=String,b=TypeError;h.exports=function(h){if("object"==typeof h||d(h))return h;throw new b("Can't set "+x(h)+" as a prototype")}},87370:function(h,f,g){"use strict";var d=g(44201),x=g(25391),b=g(72560).f,E=d("unscopables"),P=Array.prototype;void 0===P[E]&&b(P,E,{configurable:!0,value:x(null)}),h.exports=function(h){P[E][h]=!0}},71514:function(h,f,g){"use strict";var d=g(10730).charAt;h.exports=function(h,f,g){return f+(g?d(h,f).length:1)}},767:function(h,f,g){"use strict";var d=g(23622),x=TypeError;h.exports=function(h,f){if(d(f,h))return h;throw new x("Incorrect invocation")}},16834:function(h,f,g){"use strict";var d=g(3689);h.exports=function(h,f){var g=[][h];return!!g&&d((function(){g.call(null,f||function(){return 1},1)}))}},88820:function(h,f,g){"use strict";var d=g(10509),x=g(90690),b=g(94413),E=g(6310),P=TypeError,createMethod=function(h){return function(f,g,S,w){d(g);var C=x(f),A=b(C),M=E(C),_=h?M-1:0,N=h?-1:1;if(S<2)for(;;){if(_ in A){w=A[_],_+=N;break}if(_+=N,h?_<0:M<=_)throw new P("Reduce of empty array with no initial value")}for(;h?_>=0:M>_;_+=N)_ in A&&(w=g(w,A[_],_,C));return w}};h.exports={left:createMethod(!1),right:createMethod(!0)}},9015:function(h,f,g){"use strict";var d=g(27578),x=g(6310),b=g(76522),E=Array,P=Math.max;h.exports=function(h,f,g){for(var S=x(h),w=d(f,S),C=d(void 0===g?S:g,S),A=E(P(C-w,0)),M=0;w<C;w++,M++)b(A,M,h[w]);return A.length=M,A}},96004:function(h,f,g){"use strict";var d=g(68844);h.exports=d([].slice)},86431:function(h,f,g){"use strict";var d=g(44201)("iterator"),x=!1;try{var b=0,E={next:function(){return{done:!!b++}},return:function(){x=!0}};E[d]=function(){return this},Array.from(E,(function(){throw 2}))}catch(h){}h.exports=function(h,f){try{if(!f&&!x)return!1}catch(h){return!1}var g=!1;try{var b={};b[d]=function(){return{next:function(){return{done:g=!0}}}},h(b)}catch(h){}return g}},27413:function(h,f,g){"use strict";var d=g(44201)("match");h.exports=function(h){var f=/./;try{"/./"[h](f)}catch(g){try{return f[d]=!1,"/./"[h](f)}catch(h){}}return!1}},81748:function(h,f,g){"use strict";var d=g(3689);h.exports=!d((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},27807:function(h){"use strict";h.exports=function(h,f){return{value:h,done:f}}},76522:function(h,f,g){"use strict";var d=g(18360),x=g(72560),b=g(75684);h.exports=function(h,f,g){var E=d(f);E in h?x.f(h,E,b(0,g)):h[E]=g}},66338:function(h){"use strict";h.exports={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}},33265:function(h,f,g){"use strict";var d=g(36420)("span").classList,x=d&&d.constructor&&d.constructor.prototype;h.exports=x===Object.prototype?void 0:x},72532:function(h,f,g){"use strict";var d=g(88563),x=g(50806);h.exports=!d&&!x&&"object"==typeof window&&"object"==typeof document},88563:function(h){"use strict";h.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},63221:function(h,f,g){"use strict";var d=g(30071);h.exports=/ipad|iphone|ipod/i.test(d)&&"undefined"!=typeof Pebble},4764:function(h,f,g){"use strict";var d=g(30071);h.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(d)},50806:function(h,f,g){"use strict";var d=g(19037),x=g(6648);h.exports="process"===x(d.process)},27486:function(h,f,g){"use strict";var d=g(30071);h.exports=/web0s(?!.*chrome)/i.test(d)},65773:function(h,f,g){"use strict";g(64043);var d=g(46576),x=g(11880),b=g(56308),E=g(3689),P=g(44201),S=g(75773),w=P("species"),C=RegExp.prototype;h.exports=function(h,f,g,A){var M=P(h),_=!E((function(){var f={};return f[M]=function(){return 7},7!==""[h](f)})),N=_&&!E((function(){var f=!1,g=/a/;return"split"===h&&((g={}).constructor={},g.constructor[w]=function(){return g},g.flags="",g[M]=/./[M]),g.exec=function(){return f=!0,null},g[M](""),!f}));if(!_||!N||g){var R=d(/./[M]),V=f(M,""[h],(function(h,f,g,x,E){var P=d(h),S=f.exec;return S===b||S===C.exec?_&&!E?{done:!0,value:R(f,g,x)}:{done:!0,value:P(g,f,x)}:{done:!1}}));x(String.prototype,h,V[0]),x(C,M,V[1])}A&&S(C[M],"sham",!0)}},61735:function(h,f,g){"use strict";var d=g(97215),x=Function.prototype,b=x.apply,E=x.call;h.exports="object"==typeof Reflect&&Reflect.apply||(d?E.bind(b):function(){return E.apply(b,arguments)})},54071:function(h,f,g){"use strict";var d=g(46576),x=g(10509),b=g(97215),E=d(d.bind);h.exports=function(h,f){return x(h),void 0===f?h:b?E(h,f):function(){return h.apply(f,arguments)}}},52743:function(h,f,g){"use strict";var d=g(68844),x=g(10509);h.exports=function(h,f,g){try{return d(x(Object.getOwnPropertyDescriptor(h,f)[g]))}catch(h){}}},46576:function(h,f,g){"use strict";var d=g(6648),x=g(68844);h.exports=function(h){if("Function"===d(h))return x(h)}},91664:function(h,f,g){"use strict";var d=g(50926),x=g(54849),b=g(981),E=g(9478),P=g(44201)("iterator");h.exports=function(h){if(!b(h))return x(h,P)||x(h,"@@iterator")||E[d(h)]}},5185:function(h,f,g){"use strict";var d=g(22615),x=g(10509),b=g(85027),E=g(23691),P=g(91664),S=TypeError;h.exports=function(h,f){var g=arguments.length<2?P(h):f;if(x(g))return b(d(g,h));throw new S(E(h)+" is not iterable")}},27017:function(h,f,g){"use strict";var d=g(68844),x=g(90690),b=Math.floor,E=d("".charAt),P=d("".replace),S=d("".slice),w=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,C=/\$([$&'`]|\d{1,2})/g;h.exports=function(h,f,g,d,A,M){var _=g+h.length,N=d.length,R=C;return void 0!==A&&(A=x(A),R=w),P(M,R,(function(x,P){var w;switch(E(P,0)){case"$":return"$";case"&":return h;case"`":return S(f,0,g);case"'":return S(f,_);case"<":w=A[S(P,1,-1)];break;default:var C=+P;if(0===C)return x;if(C>N){var M=b(C/10);return 0===M?x:M<=N?void 0===d[M-1]?E(P,1):d[M-1]+E(P,1):x}w=d[C-1]}return void 0===w?"":w}))}},20920:function(h){"use strict";h.exports=function(h,f){try{1===arguments.length?console.error(h):console.error(h,f)}catch(h){}}},2688:function(h,f,g){"use strict";var d=g(76058);h.exports=d("document","documentElement")},93292:function(h,f,g){"use strict";var d=g(44201),x=g(9478),b=d("iterator"),E=Array.prototype;h.exports=function(h){return void 0!==h&&(x.Array===h||E[b]===h)}},19429:function(h,f,g){"use strict";var d=g(68844),x=g(3689),b=g(69985),E=g(50926),P=g(76058),S=g(6738),noop=function(){},w=[],C=P("Reflect","construct"),A=/^\s*(?:class|function)\b/,M=d(A.exec),_=!A.test(noop),N=function isConstructor(h){if(!b(h))return!1;try{return C(noop,w,h),!0}catch(h){return!1}},R=function isConstructor(h){if(!b(h))return!1;switch(E(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _||!!M(A,S(h))}catch(h){return!0}};R.sham=!0,h.exports=!C||x((function(){var h;return N(N.call)||!N(Object)||!N((function(){h=!0}))||h}))?R:N},91245:function(h,f,g){"use strict";var d=g(48999),x=g(6648),b=g(44201)("match");h.exports=function(h){var f;return d(h)&&(void 0!==(f=h[b])?!!f:"RegExp"===x(h))}},18734:function(h,f,g){"use strict";var d=g(54071),x=g(22615),b=g(85027),E=g(23691),P=g(93292),S=g(6310),w=g(23622),C=g(5185),A=g(91664),M=g(72125),_=TypeError,Result=function(h,f){this.stopped=h,this.result=f},N=Result.prototype;h.exports=function(h,f,g){var R,V,k,L,D,B,U,z=g&&g.that,j=!(!g||!g.AS_ENTRIES),G=!(!g||!g.IS_RECORD),X=!(!g||!g.IS_ITERATOR),Y=!(!g||!g.INTERRUPTED),Q=d(f,z),stop=function(h){return R&&M(R,"normal",h),new Result(!0,h)},callFn=function(h){return j?(b(h),Y?Q(h[0],h[1],stop):Q(h[0],h[1])):Y?Q(h,stop):Q(h)};if(G)R=h.iterator;else if(X)R=h;else{if(!(V=A(h)))throw new _(E(h)+" is not iterable");if(P(V)){for(k=0,L=S(h);L>k;k++)if((D=callFn(h[k]))&&w(N,D))return D;return new Result(!1)}R=C(h,V)}for(B=G?h.next:R.next;!(U=x(B,R)).done;){try{D=callFn(U.value)}catch(h){M(R,"throw",h)}if("object"==typeof D&&D&&w(N,D))return D}return new Result(!1)}},72125:function(h,f,g){"use strict";var d=g(22615),x=g(85027),b=g(54849);h.exports=function(h,f,g){var E,P;x(h);try{if(!(E=b(h,"return"))){if("throw"===f)throw g;return g}E=d(E,h)}catch(h){P=!0,E=h}if("throw"===f)throw g;if(P)throw E;return x(E),g}},30974:function(h,f,g){"use strict";var d=g(12013).IteratorPrototype,x=g(25391),b=g(75684),E=g(55997),P=g(9478),returnThis=function(){return this};h.exports=function(h,f,g,S){var w=f+" Iterator";return h.prototype=x(d,{next:b(+!S,g)}),E(h,w,!1,!0),P[w]=returnThis,h}},91934:function(h,f,g){"use strict";var d=g(79989),x=g(22615),b=g(53931),E=g(41236),P=g(69985),S=g(30974),w=g(61868),C=g(49385),A=g(55997),M=g(75773),_=g(11880),N=g(44201),R=g(9478),V=g(12013),k=E.PROPER,L=E.CONFIGURABLE,D=V.IteratorPrototype,B=V.BUGGY_SAFARI_ITERATORS,U=N("iterator"),z="keys",j="values",G="entries",returnThis=function(){return this};h.exports=function(h,f,g,E,N,V,X){S(g,f,E);var Y,Q,W,getIterationMethod=function(h){if(h===N&&J)return J;if(!B&&h&&h in Z)return Z[h];switch(h){case z:return function keys(){return new g(this,h)};case j:return function values(){return new g(this,h)};case G:return function entries(){return new g(this,h)}}return function(){return new g(this)}},$=f+" Iterator",q=!1,Z=h.prototype,K=Z[U]||Z["@@iterator"]||N&&Z[N],J=!B&&K||getIterationMethod(N),tt="Array"===f&&Z.entries||K;if(tt&&(Y=w(tt.call(new h)))!==Object.prototype&&Y.next&&(b||w(Y)===D||(C?C(Y,D):P(Y[U])||_(Y,U,returnThis)),A(Y,$,!0,!0),b&&(R[$]=returnThis)),k&&N===j&&K&&K.name!==j&&(!b&&L?M(Z,"name",j):(q=!0,J=function values(){return x(K,this)})),N)if(Q={values:getIterationMethod(j),keys:V?J:getIterationMethod(z),entries:getIterationMethod(G)},X)for(W in Q)(B||q||!(W in Z))&&_(Z,W,Q[W]);else d({target:f,proto:!0,forced:B||q},Q);return b&&!X||Z[U]===J||_(Z,U,J,{name:N}),R[f]=J,Q}},12013:function(h,f,g){"use strict";var d,x,b,E=g(3689),P=g(69985),S=g(48999),w=g(25391),C=g(61868),A=g(11880),M=g(44201),_=g(53931),N=M("iterator"),R=!1;[].keys&&("next"in(b=[].keys())?(x=C(C(b)))!==Object.prototype&&(d=x):R=!0),!S(d)||E((function(){var h={};return d[N].call(h)!==h}))?d={}:_&&(d=w(d)),P(d[N])||A(d,N,(function(){return this})),h.exports={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:R}},9478:function(h){"use strict";h.exports={}},80231:function(h,f,g){"use strict";var d,x,b,E,P,S=g(19037),w=g(54071),C=g(82474).f,A=g(99886).set,M=g(34410),_=g(4764),N=g(63221),R=g(27486),V=g(50806),k=S.MutationObserver||S.WebKitMutationObserver,L=S.document,D=S.process,B=S.Promise,U=C(S,"queueMicrotask"),z=U&&U.value;if(!z){var j=new M,flush=function(){var h,f;for(V&&(h=D.domain)&&h.exit();f=j.get();)try{f()}catch(h){throw j.head&&d(),h}h&&h.enter()};_||V||R||!k||!L?!N&&B&&B.resolve?((E=B.resolve(void 0)).constructor=B,P=w(E.then,E),d=function(){P(flush)}):V?d=function(){D.nextTick(flush)}:(A=w(A,S),d=function(){A(flush)}):(x=!0,b=L.createTextNode(""),new k(flush).observe(b,{characterData:!0}),d=function(){b.data=x=!x}),z=function(h){j.head||d(),j.add(h)}}h.exports=z},48742:function(h,f,g){"use strict";var d=g(10509),x=TypeError,PromiseCapability=function(h){var f,g;this.promise=new h((function(h,d){if(void 0!==f||void 0!==g)throw new x("Bad Promise constructor");f=h,g=d})),this.resolve=d(f),this.reject=d(g)};h.exports.f=function(h){return new PromiseCapability(h)}},42124:function(h,f,g){"use strict";var d=g(91245),x=TypeError;h.exports=function(h){if(d(h))throw new x("The method doesn't accept regular expressions");return h}},25391:function(h,f,g){"use strict";var d,x=g(85027),b=g(98920),E=g(72739),P=g(57248),S=g(2688),w=g(36420),C=g(2713),A="prototype",M="script",_=C("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(h){return"<"+M+">"+h+"</"+M+">"},NullProtoObjectViaActiveX=function(h){h.write(scriptTag("")),h.close();var f=h.parentWindow.Object;return h=null,f},NullProtoObject=function(){try{d=new ActiveXObject("htmlfile")}catch(h){}var h,f,g;NullProtoObject="undefined"!=typeof document?document.domain&&d?NullProtoObjectViaActiveX(d):(f=w("iframe"),g="java"+M+":",f.style.display="none",S.appendChild(f),f.src=String(g),(h=f.contentWindow.document).open(),h.write(scriptTag("document.F=Object")),h.close(),h.F):NullProtoObjectViaActiveX(d);for(var x=E.length;x--;)delete NullProtoObject[A][E[x]];return NullProtoObject()};P[_]=!0,h.exports=Object.create||function create(h,f){var g;return null!==h?(EmptyConstructor[A]=x(h),g=new EmptyConstructor,EmptyConstructor[A]=null,g[_]=h):g=NullProtoObject(),void 0===f?g:b.f(g,f)}},98920:function(h,f,g){"use strict";var d=g(67697),x=g(15648),b=g(72560),E=g(85027),P=g(65290),S=g(20300);f.f=d&&!x?Object.defineProperties:function defineProperties(h,f){E(h);for(var g,d=P(f),x=S(f),w=x.length,C=0;w>C;)b.f(h,g=x[C++],d[g]);return h}},61868:function(h,f,g){"use strict";var d=g(36812),x=g(69985),b=g(90690),E=g(2713),P=g(81748),S=E("IE_PROTO"),w=Object,C=w.prototype;h.exports=P?w.getPrototypeOf:function(h){var f=b(h);if(d(f,S))return f[S];var g=f.constructor;return x(g)&&f instanceof g?g.prototype:f instanceof w?C:null}},20300:function(h,f,g){"use strict";var d=g(54948),x=g(72739);h.exports=Object.keys||function keys(h){return d(h,x)}},49385:function(h,f,g){"use strict";var d=g(52743),x=g(85027),b=g(23550);h.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var h,f=!1,g={};try{(h=d(Object.prototype,"__proto__","set"))(g,[]),f=g instanceof Array}catch(h){}return function setPrototypeOf(g,d){return x(g),b(d),f?h(g,d):g.__proto__=d,g}}():void 0)},9302:function(h){"use strict";h.exports=function(h){try{return{error:!1,value:h()}}catch(h){return{error:!0,value:h}}}},87073:function(h,f,g){"use strict";var d=g(19037),x=g(17919),b=g(69985),E=g(35266),P=g(6738),S=g(44201),w=g(72532),C=g(88563),A=g(53931),M=g(3615),_=x&&x.prototype,N=S("species"),R=!1,V=b(d.PromiseRejectionEvent),k=E("Promise",(function(){var h=P(x),f=h!==String(x);if(!f&&66===M)return!0;if(A&&(!_.catch||!_.finally))return!0;if(!M||M<51||!/native code/.test(h)){var g=new x((function(h){h(1)})),FakePromise=function(h){h((function(){}),(function(){}))};if((g.constructor={})[N]=FakePromise,!(R=g.then((function(){}))instanceof FakePromise))return!0}return!f&&(w||C)&&!V}));h.exports={CONSTRUCTOR:k,REJECTION_EVENT:V,SUBCLASSING:R}},17919:function(h,f,g){"use strict";var d=g(19037);h.exports=d.Promise},72945:function(h,f,g){"use strict";var d=g(85027),x=g(48999),b=g(48742);h.exports=function(h,f){if(d(h),x(f)&&f.constructor===h)return f;var g=b.f(h);return(0,g.resolve)(f),g.promise}},562:function(h,f,g){"use strict";var d=g(17919),x=g(86431),b=g(87073).CONSTRUCTOR;h.exports=b||!x((function(h){d.all(h).then(void 0,(function(){}))}))},34410:function(h){"use strict";var Queue=function(){this.head=null,this.tail=null};Queue.prototype={add:function(h){var f={item:h,next:null},g=this.tail;g?g.next=f:this.head=f,this.tail=f},get:function(){var h=this.head;if(h)return null===(this.head=h.next)&&(this.tail=null),h.item}},h.exports=Queue},66100:function(h,f,g){"use strict";var d=g(22615),x=g(85027),b=g(69985),E=g(6648),P=g(56308),S=TypeError;h.exports=function(h,f){var g=h.exec;if(b(g)){var w=d(g,h,f);return null!==w&&x(w),w}if("RegExp"===E(h))return d(P,h,f);throw new S("RegExp#exec called on incompatible receiver")}},56308:function(h,f,g){"use strict";var d,x,b=g(22615),E=g(68844),P=g(34327),S=g(69633),w=g(87901),C=g(83430),A=g(25391),M=g(618).get,_=g(62100),N=g(26738),R=C("native-string-replace",String.prototype.replace),V=RegExp.prototype.exec,k=V,L=E("".charAt),D=E("".indexOf),B=E("".replace),U=E("".slice),z=(x=/b*/g,b(V,d=/a/,"a"),b(V,x,"a"),0!==d.lastIndex||0!==x.lastIndex),j=w.BROKEN_CARET,G=void 0!==/()??/.exec("")[1];(z||G||j||_||N)&&(k=function exec(h){var f,g,d,x,E,w,C,_=this,N=M(_),X=P(h),Y=N.raw;if(Y)return Y.lastIndex=_.lastIndex,f=b(k,Y,X),_.lastIndex=Y.lastIndex,f;var Q=N.groups,W=j&&_.sticky,$=b(S,_),q=_.source,Z=0,K=X;if(W&&($=B($,"y",""),-1===D($,"g")&&($+="g"),K=U(X,_.lastIndex),_.lastIndex>0&&(!_.multiline||_.multiline&&"\n"!==L(X,_.lastIndex-1))&&(q="(?: "+q+")",K=" "+K,Z++),g=new RegExp("^(?:"+q+")",$)),G&&(g=new RegExp("^"+q+"$(?!\\s)",$)),z&&(d=_.lastIndex),x=b(V,W?g:_,K),W?x?(x.input=U(x.input,Z),x[0]=U(x[0],Z),x.index=_.lastIndex,_.lastIndex+=x[0].length):_.lastIndex=0:z&&x&&(_.lastIndex=_.global?x.index+x[0].length:d),G&&x&&x.length>1&&b(R,x[0],g,(function(){for(E=1;E<arguments.length-2;E++)void 0===arguments[E]&&(x[E]=void 0)})),x&&Q)for(x.groups=w=A(null),E=0;E<Q.length;E++)w[(C=Q[E])[0]]=x[C[1]];return x}),h.exports=k},69633:function(h,f,g){"use strict";var d=g(85027);h.exports=function(){var h=d(this),f="";return h.hasIndices&&(f+="d"),h.global&&(f+="g"),h.ignoreCase&&(f+="i"),h.multiline&&(f+="m"),h.dotAll&&(f+="s"),h.unicode&&(f+="u"),h.unicodeSets&&(f+="v"),h.sticky&&(f+="y"),f}},63477:function(h,f,g){"use strict";var d=g(22615),x=g(36812),b=g(23622),E=g(69633),P=RegExp.prototype;h.exports=function(h){var f=h.flags;return void 0!==f||"flags"in P||x(h,"flags")||!b(P,h)?f:d(E,h)}},87901:function(h,f,g){"use strict";var d=g(3689),x=g(19037).RegExp,b=d((function(){var h=x("a","y");return h.lastIndex=2,null!==h.exec("abcd")})),E=b||d((function(){return!x("a","y").sticky})),P=b||d((function(){var h=x("^r","gy");return h.lastIndex=2,null!==h.exec("str")}));h.exports={BROKEN_CARET:P,MISSED_STICKY:E,UNSUPPORTED_Y:b}},62100:function(h,f,g){"use strict";var d=g(3689),x=g(19037).RegExp;h.exports=d((function(){var h=x(".","s");return!(h.dotAll&&h.test("\n")&&"s"===h.flags)}))},26738:function(h,f,g){"use strict";var d=g(3689),x=g(19037).RegExp;h.exports=d((function(){var h=x("(?<a>b)","g");return"b"!==h.exec("b").groups.a||"bc"!=="b".replace(h,"$<a>c")}))},14241:function(h,f,g){"use strict";var d=g(76058),x=g(62148),b=g(44201),E=g(67697),P=b("species");h.exports=function(h){var f=d(h);E&&f&&!f[P]&&x(f,P,{configurable:!0,get:function(){return this}})}},55997:function(h,f,g){"use strict";var d=g(72560).f,x=g(36812),b=g(44201)("toStringTag");h.exports=function(h,f,g){h&&!g&&(h=h.prototype),h&&!x(h,b)&&d(h,b,{configurable:!0,value:f})}},76373:function(h,f,g){"use strict";var d=g(85027),x=g(52655),b=g(981),E=g(44201)("species");h.exports=function(h,f){var g,P=d(h).constructor;return void 0===P||b(g=d(P)[E])?f:x(g)}},10730:function(h,f,g){"use strict";var d=g(68844),x=g(68700),b=g(34327),E=g(74684),P=d("".charAt),S=d("".charCodeAt),w=d("".slice),createMethod=function(h){return function(f,g){var d,C,A=b(E(f)),M=x(g),_=A.length;return M<0||M>=_?h?"":void 0:(d=S(A,M))<55296||d>56319||M+1===_||(C=S(A,M+1))<56320||C>57343?h?P(A,M):d:h?w(A,M,M+2):C-56320+(d-55296<<10)+65536}};h.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},75984:function(h,f,g){"use strict";var d=g(41236).PROPER,x=g(3689),b=g(86350);h.exports=function(h){return x((function(){return!!b[h]()||"​…᠎"!=="​…᠎"[h]()||d&&b[h].name!==h}))}},61435:function(h,f,g){"use strict";var d=g(68844),x=g(74684),b=g(34327),E=g(86350),P=d("".replace),S=RegExp("^["+E+"]+"),w=RegExp("(^|[^"+E+"])["+E+"]+$"),createMethod=function(h){return function(f){var g=b(x(f));return 1&h&&(g=P(g,S,"")),2&h&&(g=P(g,w,"$1")),g}};h.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},99886:function(h,f,g){"use strict";var d,x,b,E,P=g(19037),S=g(61735),w=g(54071),C=g(69985),A=g(36812),M=g(3689),_=g(2688),N=g(96004),R=g(36420),V=g(21500),k=g(4764),L=g(50806),D=P.setImmediate,B=P.clearImmediate,U=P.process,z=P.Dispatch,j=P.Function,G=P.MessageChannel,X=P.String,Y=0,Q={},W="onreadystatechange";M((function(){d=P.location}));var run=function(h){if(A(Q,h)){var f=Q[h];delete Q[h],f()}},runner=function(h){return function(){run(h)}},eventListener=function(h){run(h.data)},globalPostMessageDefer=function(h){P.postMessage(X(h),d.protocol+"//"+d.host)};D&&B||(D=function setImmediate(h){V(arguments.length,1);var f=C(h)?h:j(h),g=N(arguments,1);return Q[++Y]=function(){S(f,void 0,g)},x(Y),Y},B=function clearImmediate(h){delete Q[h]},L?x=function(h){U.nextTick(runner(h))}:z&&z.now?x=function(h){z.now(runner(h))}:G&&!k?(E=(b=new G).port2,b.port1.onmessage=eventListener,x=w(E.postMessage,E)):P.addEventListener&&C(P.postMessage)&&!P.importScripts&&d&&"file:"!==d.protocol&&!M(globalPostMessageDefer)?(x=globalPostMessageDefer,P.addEventListener("message",eventListener,!1)):x=W in R("script")?function(h){_.appendChild(R("script"))[W]=function(){_.removeChild(this),run(h)}}:function(h){setTimeout(runner(h),0)}),h.exports={set:D,clear:B}},86350:function(h){"use strict";h.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},97195:function(h,f,g){"use strict";var d=g(79989),x=g(46576),b=g(84328).indexOf,E=g(16834),P=x([].indexOf),S=!!P&&1/P([1],1,-0)<0;d({target:"Array",proto:!0,forced:S||!E("indexOf")},{indexOf:function indexOf(h){var f=arguments.length>1?arguments[1]:void 0;return S?P(this,h,f)||0:b(this,h,f)}})},752:function(h,f,g){"use strict";var d=g(65290),x=g(87370),b=g(9478),E=g(618),P=g(72560).f,S=g(91934),w=g(27807),C=g(53931),A=g(67697),M="Array Iterator",_=E.set,N=E.getterFor(M);h.exports=S(Array,"Array",(function(h,f){_(this,{type:M,target:d(h),index:0,kind:f})}),(function(){var h=N(this),f=h.target,g=h.index++;if(!f||g>=f.length)return h.target=void 0,w(void 0,!0);switch(h.kind){case"keys":return w(g,!1);case"values":return w(f[g],!1)}return w([g,f[g]],!1)}),"values");var R=b.Arguments=b.Array;if(x("keys"),x("values"),x("entries"),!C&&A&&"values"!==R.name)try{P(R,"name",{value:"values"})}catch(h){}},11390:function(h,f,g){"use strict";var d=g(79989),x=g(88820).left,b=g(16834),E=g(3615);d({target:"Array",proto:!0,forced:!g(50806)&&E>79&&E<83||!b("reduce")},{reduce:function reduce(h){var f=arguments.length;return x(this,h,f,f>1?arguments[1]:void 0)}})},93374:function(h,f,g){"use strict";var d=g(79989),x=g(68844),b=g(92297),E=x([].reverse),P=[1,2];d({target:"Array",proto:!0,forced:String(P)===String(P.reverse())},{reverse:function reverse(){return b(this)&&(this.length=this.length),E(this)}})},81692:function(h,f,g){"use strict";var d=g(79989),x=g(22615),b=g(10509),E=g(48742),P=g(9302),S=g(18734);d({target:"Promise",stat:!0,forced:g(562)},{all:function all(h){var f=this,g=E.f(f),d=g.resolve,w=g.reject,C=P((function(){var g=b(f.resolve),E=[],P=0,C=1;S(h,(function(h){var b=P++,S=!1;C++,x(g,f,h).then((function(h){S||(S=!0,E[b]=h,--C||d(E))}),w)})),--C||d(E)}));return C.error&&w(C.value),g.promise}})},75089:function(h,f,g){"use strict";var d=g(79989),x=g(53931),b=g(87073).CONSTRUCTOR,E=g(17919),P=g(76058),S=g(69985),w=g(11880),C=E&&E.prototype;if(d({target:"Promise",proto:!0,forced:b,real:!0},{catch:function(h){return this.then(void 0,h)}}),!x&&S(E)){var A=P("Promise").prototype.catch;C.catch!==A&&w(C,"catch",A,{unsafe:!0})}},56697:function(h,f,g){"use strict";var d,x,b,E=g(79989),P=g(53931),S=g(50806),w=g(19037),C=g(22615),A=g(11880),M=g(49385),_=g(55997),N=g(14241),R=g(10509),V=g(69985),k=g(48999),L=g(767),D=g(76373),B=g(99886).set,U=g(80231),z=g(20920),j=g(9302),G=g(34410),X=g(618),Y=g(17919),Q=g(87073),W=g(48742),$="Promise",q=Q.CONSTRUCTOR,Z=Q.REJECTION_EVENT,K=Q.SUBCLASSING,J=X.getterFor($),tt=X.set,et=Y&&Y.prototype,rt=Y,it=et,nt=w.TypeError,at=w.document,st=w.process,ot=W.f,ut=ot,ht=!!(at&&at.createEvent&&w.dispatchEvent),lt="unhandledrejection",isThenable=function(h){var f;return!(!k(h)||!V(f=h.then))&&f},callReaction=function(h,f){var g,d,x,b=f.value,E=1===f.state,P=E?h.ok:h.fail,S=h.resolve,w=h.reject,A=h.domain;try{P?(E||(2===f.rejection&&onHandleUnhandled(f),f.rejection=1),!0===P?g=b:(A&&A.enter(),g=P(b),A&&(A.exit(),x=!0)),g===h.promise?w(new nt("Promise-chain cycle")):(d=isThenable(g))?C(d,g,S,w):S(g)):w(b)}catch(h){A&&!x&&A.exit(),w(h)}},notify=function(h,f){h.notified||(h.notified=!0,U((function(){for(var g,d=h.reactions;g=d.get();)callReaction(g,h);h.notified=!1,f&&!h.rejection&&onUnhandled(h)})))},dispatchEvent=function(h,f,g){var d,x;ht?((d=at.createEvent("Event")).promise=f,d.reason=g,d.initEvent(h,!1,!0),w.dispatchEvent(d)):d={promise:f,reason:g},!Z&&(x=w["on"+h])?x(d):h===lt&&z("Unhandled promise rejection",g)},onUnhandled=function(h){C(B,w,(function(){var f,g=h.facade,d=h.value;if(isUnhandled(h)&&(f=j((function(){S?st.emit("unhandledRejection",d,g):dispatchEvent(lt,g,d)})),h.rejection=S||isUnhandled(h)?2:1,f.error))throw f.value}))},isUnhandled=function(h){return 1!==h.rejection&&!h.parent},onHandleUnhandled=function(h){C(B,w,(function(){var f=h.facade;S?st.emit("rejectionHandled",f):dispatchEvent("rejectionhandled",f,h.value)}))},bind=function(h,f,g){return function(d){h(f,d,g)}},internalReject=function(h,f,g){h.done||(h.done=!0,g&&(h=g),h.value=f,h.state=2,notify(h,!0))},internalResolve=function(h,f,g){if(!h.done){h.done=!0,g&&(h=g);try{if(h.facade===f)throw new nt("Promise can't be resolved itself");var d=isThenable(f);d?U((function(){var g={done:!1};try{C(d,f,bind(internalResolve,g,h),bind(internalReject,g,h))}catch(f){internalReject(g,f,h)}})):(h.value=f,h.state=1,notify(h,!1))}catch(f){internalReject({done:!1},f,h)}}};if(q&&(it=(rt=function Promise(h){L(this,it),R(h),C(d,this);var f=J(this);try{h(bind(internalResolve,f),bind(internalReject,f))}catch(h){internalReject(f,h)}}).prototype,(d=function Promise(h){tt(this,{type:$,done:!1,notified:!1,parent:!1,reactions:new G,rejection:!1,state:0,value:void 0})}).prototype=A(it,"then",(function then(h,f){var g=J(this),d=ot(D(this,rt));return g.parent=!0,d.ok=!V(h)||h,d.fail=V(f)&&f,d.domain=S?st.domain:void 0,0===g.state?g.reactions.add(d):U((function(){callReaction(d,g)})),d.promise})),x=function(){var h=new d,f=J(h);this.promise=h,this.resolve=bind(internalResolve,f),this.reject=bind(internalReject,f)},W.f=ot=function(h){return h===rt||undefined===h?new x(h):ut(h)},!P&&V(Y)&&et!==Object.prototype)){b=et.then,K||A(et,"then",(function then(h,f){var g=this;return new rt((function(h,f){C(b,g,h,f)})).then(h,f)}),{unsafe:!0});try{delete et.constructor}catch(h){}M&&M(et,it)}E({global:!0,constructor:!0,wrap:!0,forced:q},{Promise:rt}),_(rt,$,!1,!0),N($)},73964:function(h,f,g){"use strict";g(56697),g(81692),g(75089),g(58829),g(42092),g(57905)},58829:function(h,f,g){"use strict";var d=g(79989),x=g(22615),b=g(10509),E=g(48742),P=g(9302),S=g(18734);d({target:"Promise",stat:!0,forced:g(562)},{race:function race(h){var f=this,g=E.f(f),d=g.reject,w=P((function(){var E=b(f.resolve);S(h,(function(h){x(E,f,h).then(g.resolve,d)}))}));return w.error&&d(w.value),g.promise}})},42092:function(h,f,g){"use strict";var d=g(79989),x=g(22615),b=g(48742);d({target:"Promise",stat:!0,forced:g(87073).CONSTRUCTOR},{reject:function reject(h){var f=b.f(this);return x(f.reject,void 0,h),f.promise}})},57905:function(h,f,g){"use strict";var d=g(79989),x=g(76058),b=g(53931),E=g(17919),P=g(87073).CONSTRUCTOR,S=g(72945),w=x("Promise"),C=b&&!P;d({target:"Promise",stat:!0,forced:b||P},{resolve:function resolve(h){return S(C&&this===w?E:this,h)}})},64043:function(h,f,g){"use strict";var d=g(79989),x=g(56308);d({target:"RegExp",proto:!0,forced:/./.exec!==x},{exec:x})},12826:function(h,f,g){"use strict";var d=g(41236).PROPER,x=g(11880),b=g(85027),E=g(34327),P=g(3689),S=g(63477),w="toString",C=RegExp.prototype[w],A=P((function(){return"/a/b"!==C.call({source:"a",flags:"b"})})),M=d&&C.name!==w;(A||M)&&x(RegExp.prototype,w,(function toString(){var h=b(this);return"/"+E(h.source)+"/"+E(S(h))}),{unsafe:!0})},2918:function(h,f,g){"use strict";var d,x=g(79989),b=g(46576),E=g(82474).f,P=g(43126),S=g(34327),w=g(42124),C=g(74684),A=g(27413),M=g(53931),_=b("".endsWith),N=b("".slice),R=Math.min,V=A("endsWith");x({target:"String",proto:!0,forced:!!(M||V||(d=E(String.prototype,"endsWith"),!d||d.writable))&&!V},{endsWith:function endsWith(h){var f=S(C(this));w(h);var g=arguments.length>1?arguments[1]:void 0,d=f.length,x=void 0===g?d:R(P(g),d),b=S(h);return _?_(f,b,x):N(f,x-b.length,x)===b}})},43843:function(h,f,g){"use strict";var d=g(79989),x=g(68844),b=g(42124),E=g(74684),P=g(34327),S=g(27413),w=x("".indexOf);d({target:"String",proto:!0,forced:!S("includes")},{includes:function includes(h){return!!~w(P(E(this)),P(b(h)),arguments.length>1?arguments[1]:void 0)}})},22462:function(h,f,g){"use strict";var d=g(22615),x=g(65773),b=g(85027),E=g(981),P=g(43126),S=g(34327),w=g(74684),C=g(54849),A=g(71514),M=g(66100);x("match",(function(h,f,g){return[function match(f){var g=w(this),x=E(f)?void 0:C(f,h);return x?d(x,f,g):new RegExp(f)[h](S(g))},function(h){var d=b(this),x=S(h),E=g(f,d,x);if(E.done)return E.value;if(!d.global)return M(d,x);var w=d.unicode;d.lastIndex=0;for(var C,_=[],N=0;null!==(C=M(d,x));){var R=S(C[0]);_[N]=R,""===R&&(d.lastIndex=A(x,P(d.lastIndex),w)),N++}return 0===N?null:_}]}))},57267:function(h,f,g){"use strict";var d=g(61735),x=g(22615),b=g(68844),E=g(65773),P=g(3689),S=g(85027),w=g(69985),C=g(981),A=g(68700),M=g(43126),_=g(34327),N=g(74684),R=g(71514),V=g(54849),k=g(27017),L=g(66100),D=g(44201)("replace"),B=Math.max,U=Math.min,z=b([].concat),j=b([].push),G=b("".indexOf),X=b("".slice),Y="$0"==="a".replace(/./,"$0"),Q=!!/./[D]&&""===/./[D]("a","$0");E("replace",(function(h,f,g){var b=Q?"$":"$0";return[function replace(h,g){var d=N(this),b=C(h)?void 0:V(h,D);return b?x(b,h,d,g):x(f,_(d),h,g)},function(h,x){var E=S(this),P=_(h);if("string"==typeof x&&-1===G(x,b)&&-1===G(x,"$<")){var C=g(f,E,P,x);if(C.done)return C.value}var N=w(x);N||(x=_(x));var V,D=E.global;D&&(V=E.unicode,E.lastIndex=0);for(var Y,Q=[];null!==(Y=L(E,P))&&(j(Q,Y),D);){""===_(Y[0])&&(E.lastIndex=R(P,M(E.lastIndex),V))}for(var W,$="",q=0,Z=0;Z<Q.length;Z++){for(var K,J=_((Y=Q[Z])[0]),tt=B(U(A(Y.index),P.length),0),et=[],rt=1;rt<Y.length;rt++)j(et,void 0===(W=Y[rt])?W:String(W));var it=Y.groups;if(N){var nt=z([J],et,tt,P);void 0!==it&&j(nt,it),K=_(d(x,void 0,nt))}else K=k(J,P,tt,et,it,x);tt>=q&&($+=X(P,q,tt)+K,q=tt+J.length)}return $+X(P,q)}]}),!!P((function(){var h=/./;return h.exec=function(){var h=[];return h.groups={a:"7"},h},"7"!=="".replace(h,"$<a>")}))||!Y||Q)},9873:function(h,f,g){"use strict";var d=g(61735),x=g(22615),b=g(68844),E=g(65773),P=g(85027),S=g(981),w=g(91245),C=g(74684),A=g(76373),M=g(71514),_=g(43126),N=g(34327),R=g(54849),V=g(9015),k=g(66100),L=g(56308),D=g(87901),B=g(3689),U=D.UNSUPPORTED_Y,z=4294967295,j=Math.min,G=[].push,X=b(/./.exec),Y=b(G),Q=b("".slice),W=!B((function(){var h=/(?:)/,f=h.exec;h.exec=function(){return f.apply(this,arguments)};var g="ab".split(h);return 2!==g.length||"a"!==g[0]||"b"!==g[1]}));E("split",(function(h,f,g){var b;return b="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,g){var b=N(C(this)),E=void 0===g?z:g>>>0;if(0===E)return[];if(void 0===h)return[b];if(!w(h))return x(f,b,h,E);for(var P,S,A,M=[],_=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(h.sticky?"y":""),R=0,k=new RegExp(h.source,_+"g");(P=x(L,k,b))&&!((S=k.lastIndex)>R&&(Y(M,Q(b,R,P.index)),P.length>1&&P.index<b.length&&d(G,M,V(P,1)),A=P[0].length,R=S,M.length>=E));)k.lastIndex===P.index&&k.lastIndex++;return R===b.length?!A&&X(k,"")||Y(M,""):Y(M,Q(b,R)),M.length>E?V(M,0,E):M}:"0".split(void 0,0).length?function(h,g){return void 0===h&&0===g?[]:x(f,this,h,g)}:f,[function split(f,g){var d=C(this),E=S(f)?void 0:R(f,h);return E?x(E,f,d,g):x(b,N(d),f,g)},function(h,d){var x=P(this),E=N(h),S=g(b,x,E,d,b!==f);if(S.done)return S.value;var w=A(x,RegExp),C=x.unicode,R=(x.ignoreCase?"i":"")+(x.multiline?"m":"")+(x.unicode?"u":"")+(U?"g":"y"),V=new w(U?"^(?:"+x.source+")":x,R),L=void 0===d?z:d>>>0;if(0===L)return[];if(0===E.length)return null===k(V,E)?[E]:[];for(var D=0,B=0,G=[];B<E.length;){V.lastIndex=U?0:B;var X,W=k(V,U?Q(E,B):E);if(null===W||(X=j(_(V.lastIndex+(U?B:0)),E.length))===D)B=M(E,B,C);else{if(Y(G,Q(E,D,B)),G.length===L)return G;for(var $=1;$<=W.length-1;$++)if(Y(G,W[$]),G.length===L)return G;B=D=X}}return Y(G,Q(E,D)),G}]}),!W,U)},268:function(h,f,g){"use strict";var d,x=g(79989),b=g(46576),E=g(82474).f,P=g(43126),S=g(34327),w=g(42124),C=g(74684),A=g(27413),M=g(53931),_=b("".startsWith),N=b("".slice),R=Math.min,V=A("startsWith");x({target:"String",proto:!0,forced:!!(M||V||(d=E(String.prototype,"startsWith"),!d||d.writable))&&!V},{startsWith:function startsWith(h){var f=S(C(this));w(h);var g=P(R(arguments.length>1?arguments[1]:void 0,f.length)),d=S(h);return _?_(f,d,g):N(f,g,g+d.length)===d}})},28436:function(h,f,g){"use strict";var d=g(79989),x=g(61435).trim;d({target:"String",proto:!0,forced:g(75984)("trim")},{trim:function trim(){return x(this)}})},76265:function(h,f,g){"use strict";var d=g(19037),x=g(66338),b=g(33265),E=g(752),P=g(75773),S=g(44201),w=S("iterator"),C=S("toStringTag"),A=E.values,handlePrototype=function(h,f){if(h){if(h[w]!==A)try{P(h,w,A)}catch(f){h[w]=A}if(h[C]||P(h,C,f),x[f])for(var g in E)if(h[g]!==E[g])try{P(h,g,E[g])}catch(f){h[g]=E[g]}}};for(var M in x)handlePrototype(d[M]&&d[M].prototype,M);handlePrototype(b,"DOMTokenList")},83894:function(h,f,g){"use strict";g.r(f),g.d(f,{AElement:function(){return AElement},AnimateColorElement:function(){return AnimateColorElement},AnimateElement:function(){return AnimateElement},AnimateTransformElement:function(){return AnimateTransformElement},BoundingBox:function(){return BoundingBox},CB1:function(){return CB1},CB2:function(){return CB2},CB3:function(){return CB3},CB4:function(){return CB4},Canvg:function(){return Canvg},CircleElement:function(){return CircleElement},ClipPathElement:function(){return ClipPathElement},DefsElement:function(){return DefsElement},DescElement:function(){return DescElement},Document:function(){return Document},Element:function(){return Element},EllipseElement:function(){return EllipseElement},FeColorMatrixElement:function(){return FeColorMatrixElement},FeCompositeElement:function(){return FeCompositeElement},FeDropShadowElement:function(){return FeDropShadowElement},FeGaussianBlurElement:function(){return FeGaussianBlurElement},FeMorphologyElement:function(){return FeMorphologyElement},FilterElement:function(){return FilterElement},Font:function(){return Font},FontElement:function(){return FontElement},FontFaceElement:function(){return FontFaceElement},GElement:function(){return GElement},GlyphElement:function(){return GlyphElement},GradientElement:function(){return GradientElement},ImageElement:function(){return ImageElement},LineElement:function(){return LineElement},LinearGradientElement:function(){return LinearGradientElement},MarkerElement:function(){return MarkerElement},MaskElement:function(){return MaskElement},Matrix:function(){return Matrix},MissingGlyphElement:function(){return MissingGlyphElement},Mouse:function(){return Mouse},PSEUDO_ZERO:function(){return Q},Parser:function(){return Parser},PathElement:function(){return PathElement},PathParser:function(){return PathParser},PatternElement:function(){return PatternElement},Point:function(){return Point},PolygonElement:function(){return PolygonElement},PolylineElement:function(){return PolylineElement},Property:function(){return Property},QB1:function(){return QB1},QB2:function(){return QB2},QB3:function(){return QB3},RadialGradientElement:function(){return RadialGradientElement},RectElement:function(){return RectElement},RenderedElement:function(){return RenderedElement},Rotate:function(){return Rotate},SVGElement:function(){return SVGElement},SVGFontLoader:function(){return SVGFontLoader},Scale:function(){return Scale},Screen:function(){return Screen},Skew:function(){return Skew},SkewX:function(){return SkewX},SkewY:function(){return SkewY},StopElement:function(){return StopElement},StyleElement:function(){return StyleElement},SymbolElement:function(){return SymbolElement},TRefElement:function(){return TRefElement},TSpanElement:function(){return TSpanElement},TextElement:function(){return TextElement},TextPathElement:function(){return TextPathElement},TitleElement:function(){return TitleElement},Transform:function(){return Transform},Translate:function(){return Translate},UnknownElement:function(){return UnknownElement},UseElement:function(){return UseElement},ViewPort:function(){return ViewPort},compressSpaces:function(){return compressSpaces},default:function(){return Canvg},getSelectorSpecificity:function(){return getSelectorSpecificity},normalizeAttributeName:function(){return normalizeAttributeName},normalizeColor:function(){return normalizeColor},parseExternalUrl:function(){return parseExternalUrl},presets:function(){return L},toNumbers:function(){return toNumbers},trimLeft:function(){return trimLeft},trimRight:function(){return trimRight},vectorMagnitude:function(){return vectorMagnitude},vectorsAngle:function(){return vectorsAngle},vectorsRatio:function(){return vectorsRatio}});g(73964);function asyncGeneratorStep(h,f,g,d,x,b,E){try{var P=h[b](E),S=P.value}catch(h){return void g(h)}P.done?f(S):Promise.resolve(S).then(d,x)}function _asyncToGenerator(h){return function(){var f=this,g=arguments;return new Promise((function(d,x){var b=h.apply(f,g);function _next(h){asyncGeneratorStep(b,d,x,_next,_throw,"next",h)}function _throw(h){asyncGeneratorStep(b,d,x,_next,_throw,"throw",h)}_next(void 0)}))}}g(22462),g(57267),g(268),g(752),g(76265);var d=g(4942),x=(g(11390),g(2918),g(9873),g(54087)),b=(g(28436),g(26131)),E=(g(97195),g(43843),g(93374),function(h,f){return(E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(h[g]=f[g])})(h,f)});function r(h,f){if("function"!=typeof f&&null!==f)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function i(){this.constructor=h}E(h,f),h.prototype=null===f?Object.create(f):(i.prototype=f.prototype,new i)}function i(h,f){var g=h[0],d=h[1];return[g*Math.cos(f)-d*Math.sin(f),g*Math.sin(f)+d*Math.cos(f)]}function a(){for(var h=[],f=0;f<arguments.length;f++)h[f]=arguments[f];for(var g=0;g<h.length;g++)if("number"!=typeof h[g])throw new Error("assertNumbers arguments["+g+"] is not a number. "+typeof h[g]+" == typeof "+h[g]);return!0}var P=Math.PI;function o(h,f,g){h.lArcFlag=0===h.lArcFlag?0:1,h.sweepFlag=0===h.sweepFlag?0:1;var d=h.rX,x=h.rY,b=h.x,E=h.y;d=Math.abs(h.rX),x=Math.abs(h.rY);var S=i([(f-b)/2,(g-E)/2],-h.xRot/180*P),w=S[0],C=S[1],A=Math.pow(w,2)/Math.pow(d,2)+Math.pow(C,2)/Math.pow(x,2);1<A&&(d*=Math.sqrt(A),x*=Math.sqrt(A)),h.rX=d,h.rY=x;var M=Math.pow(d,2)*Math.pow(C,2)+Math.pow(x,2)*Math.pow(w,2),_=(h.lArcFlag!==h.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(d,2)*Math.pow(x,2)-M)/M)),N=d*C/x*_,R=-x*w/d*_,V=i([N,R],h.xRot/180*P);h.cX=V[0]+(f+b)/2,h.cY=V[1]+(g+E)/2,h.phi1=Math.atan2((C-R)/x,(w-N)/d),h.phi2=Math.atan2((-C-R)/x,(-w-N)/d),0===h.sweepFlag&&h.phi2>h.phi1&&(h.phi2-=2*P),1===h.sweepFlag&&h.phi2<h.phi1&&(h.phi2+=2*P),h.phi1*=180/P,h.phi2*=180/P}function s(h,f,g){a(h,f,g);var d=h*h+f*f-g*g;if(0>d)return[];if(0===d)return[[h*g/(h*h+f*f),f*g/(h*h+f*f)]];var x=Math.sqrt(d);return[[(h*g+f*x)/(h*h+f*f),(f*g-h*x)/(h*h+f*f)],[(h*g-f*x)/(h*h+f*f),(f*g+h*x)/(h*h+f*f)]]}var S,w=Math.PI/180;function c(h,f,g){return(1-g)*h+g*f}function y(h,f,g,d){return h+Math.cos(d/180*P)*f+Math.sin(d/180*P)*g}function p(h,f,g,d){var x=1e-6,b=f-h,E=g-f,P=3*b+3*(d-g)-6*E,S=6*(E-b),w=3*b;return Math.abs(P)<x?[-w/S]:function(h,f,g){void 0===g&&(g=1e-6);var d=h*h/4-f;if(d<-g)return[];if(d<=g)return[-h/2];var x=Math.sqrt(d);return[-h/2-x,-h/2+x]}(S/P,w/P,x)}function m(h,f,g,d,x){var b=1-x;return h*(b*b*b)+f*(3*b*b*x)+g*(3*b*x*x)+d*(x*x*x)}!function(h){function r(){return u((function(h,f,g){return h.relative&&(void 0!==h.x1&&(h.x1+=f),void 0!==h.y1&&(h.y1+=g),void 0!==h.x2&&(h.x2+=f),void 0!==h.y2&&(h.y2+=g),void 0!==h.x&&(h.x+=f),void 0!==h.y&&(h.y+=g),h.relative=!1),h}))}function e(){var h=NaN,f=NaN,g=NaN,d=NaN;return u((function(x,b,E){return x.type&_.SMOOTH_CURVE_TO&&(x.type=_.CURVE_TO,h=isNaN(h)?b:h,f=isNaN(f)?E:f,x.x1=x.relative?b-h:2*b-h,x.y1=x.relative?E-f:2*E-f),x.type&_.CURVE_TO?(h=x.relative?b+x.x2:x.x2,f=x.relative?E+x.y2:x.y2):(h=NaN,f=NaN),x.type&_.SMOOTH_QUAD_TO&&(x.type=_.QUAD_TO,g=isNaN(g)?b:g,d=isNaN(d)?E:d,x.x1=x.relative?b-g:2*b-g,x.y1=x.relative?E-d:2*E-d),x.type&_.QUAD_TO?(g=x.relative?b+x.x1:x.x1,d=x.relative?E+x.y1:x.y1):(g=NaN,d=NaN),x}))}function n(){var h=NaN,f=NaN;return u((function(g,d,x){if(g.type&_.SMOOTH_QUAD_TO&&(g.type=_.QUAD_TO,h=isNaN(h)?d:h,f=isNaN(f)?x:f,g.x1=g.relative?d-h:2*d-h,g.y1=g.relative?x-f:2*x-f),g.type&_.QUAD_TO){h=g.relative?d+g.x1:g.x1,f=g.relative?x+g.y1:g.y1;var b=g.x1,E=g.y1;g.type=_.CURVE_TO,g.x1=((g.relative?0:d)+2*b)/3,g.y1=((g.relative?0:x)+2*E)/3,g.x2=(g.x+2*b)/3,g.y2=(g.y+2*E)/3}else h=NaN,f=NaN;return g}))}function u(h){var f=0,g=0,d=NaN,x=NaN;return function(b){if(isNaN(d)&&!(b.type&_.MOVE_TO))throw new Error("path must start with moveto");var E=h(b,f,g,d,x);return b.type&_.CLOSE_PATH&&(f=d,g=x),void 0!==b.x&&(f=b.relative?f+b.x:b.x),void 0!==b.y&&(g=b.relative?g+b.y:b.y),b.type&_.MOVE_TO&&(d=f,x=g),E}}function O(h,f,g,d,x,b){return a(h,f,g,d,x,b),u((function(E,P,S,w){var C=E.x1,A=E.x2,M=E.relative&&!isNaN(w),N=void 0!==E.x?E.x:M?0:P,R=void 0!==E.y?E.y:M?0:S;function l(h){return h*h}E.type&_.HORIZ_LINE_TO&&0!==f&&(E.type=_.LINE_TO,E.y=E.relative?0:S),E.type&_.VERT_LINE_TO&&0!==g&&(E.type=_.LINE_TO,E.x=E.relative?0:P),void 0!==E.x&&(E.x=E.x*h+R*g+(M?0:x)),void 0!==E.y&&(E.y=N*f+E.y*d+(M?0:b)),void 0!==E.x1&&(E.x1=E.x1*h+E.y1*g+(M?0:x)),void 0!==E.y1&&(E.y1=C*f+E.y1*d+(M?0:b)),void 0!==E.x2&&(E.x2=E.x2*h+E.y2*g+(M?0:x)),void 0!==E.y2&&(E.y2=A*f+E.y2*d+(M?0:b));var V=h*d-f*g;if(void 0!==E.xRot&&(1!==h||0!==f||0!==g||1!==d))if(0===V)delete E.rX,delete E.rY,delete E.xRot,delete E.lArcFlag,delete E.sweepFlag,E.type=_.LINE_TO;else{var k=E.xRot*Math.PI/180,L=Math.sin(k),D=Math.cos(k),B=1/l(E.rX),U=1/l(E.rY),z=l(D)*B+l(L)*U,j=2*L*D*(B-U),G=l(L)*B+l(D)*U,X=z*d*d-j*f*d+G*f*f,Y=j*(h*d+f*g)-2*(z*g*d+G*h*f),Q=z*g*g-j*h*g+G*h*h,W=(Math.atan2(Y,X-Q)+Math.PI)%Math.PI/2,$=Math.sin(W),q=Math.cos(W);E.rX=Math.abs(V)/Math.sqrt(X*l(q)+Y*$*q+Q*l($)),E.rY=Math.abs(V)/Math.sqrt(X*l($)-Y*$*q+Q*l(q)),E.xRot=180*W/Math.PI}return void 0!==E.sweepFlag&&0>V&&(E.sweepFlag=+!E.sweepFlag),E}))}h.ROUND=function(h){function r(f){return Math.round(f*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,f,g){return h.relative||(void 0!==h.x1&&(h.x1-=f),void 0!==h.y1&&(h.y1-=g),void 0!==h.x2&&(h.x2-=f),void 0!==h.y2&&(h.y2-=g),void 0!==h.x&&(h.x-=f),void 0!==h.y&&(h.y-=g),h.relative=!0),h}))},h.NORMALIZE_HVZ=function(h,f,g){return void 0===h&&(h=!0),void 0===f&&(f=!0),void 0===g&&(g=!0),u((function(d,x,b,E,P){if(isNaN(E)&&!(d.type&_.MOVE_TO))throw new Error("path must start with moveto");return f&&d.type&_.HORIZ_LINE_TO&&(d.type=_.LINE_TO,d.y=d.relative?0:b),g&&d.type&_.VERT_LINE_TO&&(d.type=_.LINE_TO,d.x=d.relative?0:x),h&&d.type&_.CLOSE_PATH&&(d.type=_.LINE_TO,d.x=d.relative?E-x:E,d.y=d.relative?P-b:P),d.type&_.ARC&&(0===d.rX||0===d.rY)&&(d.type=_.LINE_TO,delete d.rX,delete d.rY,delete d.xRot,delete d.lArcFlag,delete d.sweepFlag),d}))},h.NORMALIZE_ST=e,h.QT_TO_C=n,h.INFO=u,h.SANITIZE=function(h){void 0===h&&(h=0),a(h);var f=NaN,g=NaN,d=NaN,x=NaN;return u((function(b,E,P,S,w){var C=Math.abs,A=!1,M=0,N=0;if(b.type&_.SMOOTH_CURVE_TO&&(M=isNaN(f)?0:E-f,N=isNaN(g)?0:P-g),b.type&(_.CURVE_TO|_.SMOOTH_CURVE_TO)?(f=b.relative?E+b.x2:b.x2,g=b.relative?P+b.y2:b.y2):(f=NaN,g=NaN),b.type&_.SMOOTH_QUAD_TO?(d=isNaN(d)?E:2*E-d,x=isNaN(x)?P:2*P-x):b.type&_.QUAD_TO?(d=b.relative?E+b.x1:b.x1,x=b.relative?P+b.y1:b.y2):(d=NaN,x=NaN),b.type&_.LINE_COMMANDS||b.type&_.ARC&&(0===b.rX||0===b.rY||!b.lArcFlag)||b.type&_.CURVE_TO||b.type&_.SMOOTH_CURVE_TO||b.type&_.QUAD_TO||b.type&_.SMOOTH_QUAD_TO){var R=void 0===b.x?0:b.relative?b.x:b.x-E,V=void 0===b.y?0:b.relative?b.y:b.y-P;M=isNaN(d)?void 0===b.x1?M:b.relative?b.x:b.x1-E:d-E,N=isNaN(x)?void 0===b.y1?N:b.relative?b.y:b.y1-P:x-P;var k=void 0===b.x2?0:b.relative?b.x:b.x2-E,L=void 0===b.y2?0:b.relative?b.y:b.y2-P;C(R)<=h&&C(V)<=h&&C(M)<=h&&C(N)<=h&&C(k)<=h&&C(L)<=h&&(A=!0)}return b.type&_.CLOSE_PATH&&C(E-S)<=h&&C(P-w)<=h&&(A=!0),A?[]:b}))},h.MATRIX=O,h.ROTATE=function(h,f,g){void 0===f&&(f=0),void 0===g&&(g=0),a(h,f,g);var d=Math.sin(h),x=Math.cos(h);return O(x,d,-d,x,f-f*x+g*d,g-f*d-g*x)},h.TRANSLATE=function(h,f){return void 0===f&&(f=0),a(h,f),O(1,0,0,1,h,f)},h.SCALE=function(h,f){return void 0===f&&(f=h),a(h,f),O(h,0,0,f,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,f,g){return _.ARC===h.type?function(h,f,g){var d,x,b,E;h.cX||o(h,f,g);for(var P=Math.min(h.phi1,h.phi2),S=Math.max(h.phi1,h.phi2)-P,C=Math.ceil(S/90),A=new Array(C),M=f,N=g,R=0;R<C;R++){var V=c(h.phi1,h.phi2,R/C),k=c(h.phi1,h.phi2,(R+1)/C),L=k-V,D=4/3*Math.tan(L*w/4),B=[Math.cos(V*w)-D*Math.sin(V*w),Math.sin(V*w)+D*Math.cos(V*w)],U=B[0],z=B[1],j=[Math.cos(k*w),Math.sin(k*w)],G=j[0],X=j[1],Y=[G+D*Math.sin(k*w),X-D*Math.cos(k*w)],Q=Y[0],W=Y[1];A[R]={relative:h.relative,type:_.CURVE_TO};var H=function(f,g){var d=i([f*h.rX,g*h.rY],h.xRot),x=d[0],b=d[1];return[h.cX+x,h.cY+b]};d=H(U,z),A[R].x1=d[0],A[R].y1=d[1],x=H(Q,W),A[R].x2=x[0],A[R].y2=x[1],b=H(G,X),A[R].x=b[0],A[R].y=b[1],h.relative&&(A[R].x1-=M,A[R].y1-=N,A[R].x2-=M,A[R].y2-=N,A[R].x-=M,A[R].y-=N),M=(E=[A[R].x,A[R].y])[0],N=E[1]}return A}(h,h.relative?0:f,h.relative?0:g):h}))},h.ANNOTATE_ARCS=function(){return u((function(h,f,g){return h.relative&&(f=0,g=0),_.ARC===h.type&&o(h,f,g),h}))},h.CLONE=function l(){return function(h){var f={};for(var g in h)f[g]=h[g];return f}},h.CALCULATE_BOUNDS=function(){var h=r(),f=n(),g=e(),d=u((function(x,b,E){var P=g(f(h(function(h){var f={};for(var g in h)f[g]=h[g];return f}(x))));function O(h){h>d.maxX&&(d.maxX=h),h<d.minX&&(d.minX=h)}function l(h){h>d.maxY&&(d.maxY=h),h<d.minY&&(d.minY=h)}if(P.type&_.DRAWING_COMMANDS&&(O(b),l(E)),P.type&_.HORIZ_LINE_TO&&O(P.x),P.type&_.VERT_LINE_TO&&l(P.y),P.type&_.LINE_TO&&(O(P.x),l(P.y)),P.type&_.CURVE_TO){O(P.x),l(P.y);for(var S=0,w=p(b,P.x1,P.x2,P.x);S<w.length;S++)0<(X=w[S])&&1>X&&O(m(b,P.x1,P.x2,P.x,X));for(var C=0,A=p(E,P.y1,P.y2,P.y);C<A.length;C++)0<(X=A[C])&&1>X&&l(m(E,P.y1,P.y2,P.y,X))}if(P.type&_.ARC){O(P.x),l(P.y),o(P,b,E);for(var M=P.xRot/180*Math.PI,N=Math.cos(M)*P.rX,R=Math.sin(M)*P.rX,V=-Math.sin(M)*P.rY,k=Math.cos(M)*P.rY,L=P.phi1<P.phi2?[P.phi1,P.phi2]:-180>P.phi2?[P.phi2+360,P.phi1+360]:[P.phi2,P.phi1],D=L[0],B=L[1],I=function(h){var f=h[0],g=h[1],d=180*Math.atan2(g,f)/Math.PI;return d<D?d+360:d},U=0,z=s(V,-N,0).map(I);U<z.length;U++)(X=z[U])>D&&X<B&&O(y(P.cX,N,V,X));for(var j=0,G=s(k,-R,0).map(I);j<G.length;j++){var X;(X=G[j])>D&&X<B&&l(y(P.cY,R,k,X))}}return x}));return d.minX=1/0,d.maxX=-1/0,d.minY=1/0,d.maxY=-1/0,d}}(S||(S={}));var C,A=function(){function t(){}return t.prototype.round=function(h){return this.transform(S.ROUND(h))},t.prototype.toAbs=function(){return this.transform(S.TO_ABS())},t.prototype.toRel=function(){return this.transform(S.TO_REL())},t.prototype.normalizeHVZ=function(h,f,g){return this.transform(S.NORMALIZE_HVZ(h,f,g))},t.prototype.normalizeST=function(){return this.transform(S.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(S.QT_TO_C())},t.prototype.aToC=function(){return this.transform(S.A_TO_C())},t.prototype.sanitize=function(h){return this.transform(S.SANITIZE(h))},t.prototype.translate=function(h,f){return this.transform(S.TRANSLATE(h,f))},t.prototype.scale=function(h,f){return this.transform(S.SCALE(h,f))},t.prototype.rotate=function(h,f,g){return this.transform(S.ROTATE(h,f,g))},t.prototype.matrix=function(h,f,g,d,x,b){return this.transform(S.MATRIX(h,f,g,d,x,b))},t.prototype.skewX=function(h){return this.transform(S.SKEW_X(h))},t.prototype.skewY=function(h){return this.transform(S.SKEW_Y(h))},t.prototype.xSymmetry=function(h){return this.transform(S.X_AXIS_SYMMETRY(h))},t.prototype.ySymmetry=function(h){return this.transform(S.Y_AXIS_SYMMETRY(h))},t.prototype.annotateArcs=function(){return this.transform(S.ANNOTATE_ARCS())},t}(),T=function(h){return" "===h||"\t"===h||"\r"===h||"\n"===h},v=function(h){return"0".charCodeAt(0)<=h.charCodeAt(0)&&h.charCodeAt(0)<="9".charCodeAt(0)},M=function(h){function e(){var f=h.call(this)||this;return f.curNumber="",f.curCommandType=-1,f.curCommandRelative=!1,f.canParseCommandOrComma=!0,f.curNumberHasExp=!1,f.curNumberHasExpDigits=!1,f.curNumberHasDecimal=!1,f.curArgs=[],f}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,f){var g=this;void 0===f&&(f=[]);for(var i=function(h){f.push(h),g.curArgs.length=0,g.canParseCommandOrComma=!0},d=0;d<h.length;d++){var x=h[d],b=!(this.curCommandType!==_.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),E=v(x)&&("0"===this.curNumber&&"0"===x||b);if(!v(x)||E)if("e"!==x&&"E"!==x)if("-"!==x&&"+"!==x||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==x||this.curNumberHasExp||this.curNumberHasDecimal||b){if(this.curNumber&&-1!==this.curCommandType){var P=Number(this.curNumber);if(isNaN(P))throw new SyntaxError("Invalid number ending at "+d);if(this.curCommandType===_.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>P)throw new SyntaxError('Expected positive number, got "'+P+'" at index "'+d+'"')}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 "'+d+'"');this.curArgs.push(P),this.curArgs.length===N[this.curCommandType]&&(_.HORIZ_LINE_TO===this.curCommandType?i({type:_.HORIZ_LINE_TO,relative:this.curCommandRelative,x:P}):_.VERT_LINE_TO===this.curCommandType?i({type:_.VERT_LINE_TO,relative:this.curCommandRelative,y:P}):this.curCommandType===_.MOVE_TO||this.curCommandType===_.LINE_TO||this.curCommandType===_.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),_.MOVE_TO===this.curCommandType&&(this.curCommandType=_.LINE_TO)):this.curCommandType===_.CURVE_TO?i({type:_.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===_.SMOOTH_CURVE_TO?i({type:_.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.QUAD_TO?i({type:_.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.ARC&&i({type:_.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(!T(x))if(","===x&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==x&&"-"!==x&&"."!==x)if(E)this.curNumber=x,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+d+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+x+'" at index '+d+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==x&&"Z"!==x)if("h"===x||"H"===x)this.curCommandType=_.HORIZ_LINE_TO,this.curCommandRelative="h"===x;else if("v"===x||"V"===x)this.curCommandType=_.VERT_LINE_TO,this.curCommandRelative="v"===x;else if("m"===x||"M"===x)this.curCommandType=_.MOVE_TO,this.curCommandRelative="m"===x;else if("l"===x||"L"===x)this.curCommandType=_.LINE_TO,this.curCommandRelative="l"===x;else if("c"===x||"C"===x)this.curCommandType=_.CURVE_TO,this.curCommandRelative="c"===x;else if("s"===x||"S"===x)this.curCommandType=_.SMOOTH_CURVE_TO,this.curCommandRelative="s"===x;else if("q"===x||"Q"===x)this.curCommandType=_.QUAD_TO,this.curCommandRelative="q"===x;else if("t"===x||"T"===x)this.curCommandType=_.SMOOTH_QUAD_TO,this.curCommandRelative="t"===x;else{if("a"!==x&&"A"!==x)throw new SyntaxError('Unexpected character "'+x+'" at index '+d+".");this.curCommandType=_.ARC,this.curCommandRelative="a"===x}else f.push({type:_.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=x,this.curNumberHasDecimal="."===x}else this.curNumber+=x,this.curNumberHasDecimal=!0;else this.curNumber+=x;else this.curNumber+=x,this.curNumberHasExp=!0;else this.curNumber+=x,this.curNumberHasExpDigits=this.curNumberHasExp}return f},e.prototype.transform=function(h){return Object.create(this,{parse:{value:function(f,g){void 0===g&&(g=[]);for(var d=0,x=Object.getPrototypeOf(this).parse.call(this,f);d<x.length;d++){var b=x[d],E=h(b);Array.isArray(E)?g.push.apply(g,E):g.push(E)}return g}}})},e}(A),_=function(h){function i(f){var g=h.call(this)||this;return g.commands="string"==typeof f?i.parse(f):f,g}return r(i,h),i.prototype.encode=function(){return i.encode(this.commands)},i.prototype.getBounds=function(){var h=S.CALCULATE_BOUNDS();return this.transform(h),h},i.prototype.transform=function(h){for(var f=[],g=0,d=this.commands;g<d.length;g++){var x=h(d[g]);Array.isArray(x)?f.push.apply(f,x):f.push(x)}return this.commands=f,this},i.encode=function(h){return function e(h){var f="";Array.isArray(h)||(h=[h]);for(var g=0;g<h.length;g++){var d=h[g];if(d.type===_.CLOSE_PATH)f+="z";else if(d.type===_.HORIZ_LINE_TO)f+=(d.relative?"h":"H")+d.x;else if(d.type===_.VERT_LINE_TO)f+=(d.relative?"v":"V")+d.y;else if(d.type===_.MOVE_TO)f+=(d.relative?"m":"M")+d.x+" "+d.y;else if(d.type===_.LINE_TO)f+=(d.relative?"l":"L")+d.x+" "+d.y;else if(d.type===_.CURVE_TO)f+=(d.relative?"c":"C")+d.x1+" "+d.y1+" "+d.x2+" "+d.y2+" "+d.x+" "+d.y;else if(d.type===_.SMOOTH_CURVE_TO)f+=(d.relative?"s":"S")+d.x2+" "+d.y2+" "+d.x+" "+d.y;else if(d.type===_.QUAD_TO)f+=(d.relative?"q":"Q")+d.x1+" "+d.y1+" "+d.x+" "+d.y;else if(d.type===_.SMOOTH_QUAD_TO)f+=(d.relative?"t":"T")+d.x+" "+d.y;else{if(d.type!==_.ARC)throw new Error('Unexpected command type "'+d.type+'" at index '+g+".");f+=(d.relative?"a":"A")+d.rX+" "+d.rY+" "+d.xRot+" "+ +d.lArcFlag+" "+ +d.sweepFlag+" "+d.x+" "+d.y}}return f}(h)},i.parse=function(h){var f=new M,g=[];return f.parse(h,g),f.finish(g),g},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}(A),N=((C={})[_.MOVE_TO]=2,C[_.LINE_TO]=2,C[_.HORIZ_LINE_TO]=1,C[_.VERT_LINE_TO]=1,C[_.CLOSE_PATH]=0,C[_.QUAD_TO]=4,C[_.SMOOTH_QUAD_TO]=2,C[_.CURVE_TO]=6,C[_.SMOOTH_CURVE_TO]=4,C[_.ARC]=7,C);g(12826);function _typeof(h){return _typeof="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},_typeof(h)}var R=[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],V=[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 getImageDataFromCanvas(h,f,g,d,x){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 b=h.getContext("2d");try{return b.getImageData(f,g,d,x)}catch(h){throw new Error("unable to access image data: "+h)}}function processCanvasRGBA(h,f,g,d,x,b){if(!(isNaN(b)||b<1)){b|=0;var E=getImageDataFromCanvas(h,f,g,d,x);E=function processImageDataRGBA(h,f,g,d,x,b){for(var E,P=h.data,S=2*b+1,w=d-1,C=x-1,A=b+1,M=A*(A+1)/2,_=new k,N=_,L=1;L<S;L++)N=N.next=new k,L===A&&(E=N);N.next=_;for(var D=null,B=null,U=0,z=0,j=R[b],G=V[b],X=0;X<x;X++){N=_;for(var Y=P[z],Q=P[z+1],W=P[z+2],$=P[z+3],q=0;q<A;q++)N.r=Y,N.g=Q,N.b=W,N.a=$,N=N.next;for(var Z=0,K=0,J=0,tt=0,et=A*Y,rt=A*Q,it=A*W,nt=A*$,at=M*Y,st=M*Q,ot=M*W,ut=M*$,ht=1;ht<A;ht++){var lt=z+((w<ht?w:ht)<<2),ct=P[lt],ft=P[lt+1],gt=P[lt+2],pt=P[lt+3],dt=A-ht;at+=(N.r=ct)*dt,st+=(N.g=ft)*dt,ot+=(N.b=gt)*dt,ut+=(N.a=pt)*dt,Z+=ct,K+=ft,J+=gt,tt+=pt,N=N.next}D=_,B=E;for(var mt=0;mt<d;mt++){var yt=ut*j>>G;if(P[z+3]=yt,0!==yt){var vt=255/yt;P[z]=(at*j>>G)*vt,P[z+1]=(st*j>>G)*vt,P[z+2]=(ot*j>>G)*vt}else P[z]=P[z+1]=P[z+2]=0;at-=et,st-=rt,ot-=it,ut-=nt,et-=D.r,rt-=D.g,it-=D.b,nt-=D.a;var xt=mt+b+1;xt=U+(xt<w?xt:w)<<2,at+=Z+=D.r=P[xt],st+=K+=D.g=P[xt+1],ot+=J+=D.b=P[xt+2],ut+=tt+=D.a=P[xt+3],D=D.next;var bt=B,Et=bt.r,Pt=bt.g,St=bt.b,wt=bt.a;et+=Et,rt+=Pt,it+=St,nt+=wt,Z-=Et,K-=Pt,J-=St,tt-=wt,B=B.next,z+=4}U+=d}for(var Tt=0;Tt<d;Tt++){var Ct=P[z=Tt<<2],At=P[z+1],Ot=P[z+2],Mt=P[z+3],_t=A*Ct,Nt=A*At,Rt=A*Ot,Vt=A*Mt,kt=M*Ct,It=M*At,Lt=M*Ot,Dt=M*Mt;N=_;for(var Bt=0;Bt<A;Bt++)N.r=Ct,N.g=At,N.b=Ot,N.a=Mt,N=N.next;for(var Ft=d,Ut=0,zt=0,jt=0,Ht=0,Gt=1;Gt<=b;Gt++){z=Ft+Tt<<2;var Xt=A-Gt;kt+=(N.r=Ct=P[z])*Xt,It+=(N.g=At=P[z+1])*Xt,Lt+=(N.b=Ot=P[z+2])*Xt,Dt+=(N.a=Mt=P[z+3])*Xt,Ht+=Ct,Ut+=At,zt+=Ot,jt+=Mt,N=N.next,Gt<C&&(Ft+=d)}z=Tt,D=_,B=E;for(var Yt=0;Yt<x;Yt++){var Qt=z<<2;P[Qt+3]=Mt=Dt*j>>G,Mt>0?(Mt=255/Mt,P[Qt]=(kt*j>>G)*Mt,P[Qt+1]=(It*j>>G)*Mt,P[Qt+2]=(Lt*j>>G)*Mt):P[Qt]=P[Qt+1]=P[Qt+2]=0,kt-=_t,It-=Nt,Lt-=Rt,Dt-=Vt,_t-=D.r,Nt-=D.g,Rt-=D.b,Vt-=D.a,Qt=Tt+((Qt=Yt+A)<C?Qt:C)*d<<2,kt+=Ht+=D.r=P[Qt],It+=Ut+=D.g=P[Qt+1],Lt+=zt+=D.b=P[Qt+2],Dt+=jt+=D.a=P[Qt+3],D=D.next,_t+=Ct=B.r,Nt+=At=B.g,Rt+=Ot=B.b,Vt+=Mt=B.a,Ht-=Ct,Ut-=At,zt-=Ot,jt-=Mt,B=B.next,z+=d}}return h}(E,0,0,d,x,b),h.getContext("2d").putImageData(E,f,g)}}var k=function BlurStack(){!function _classCallCheck(h,f){if(!(h instanceof f))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};var L=Object.freeze({__proto__:null,offscreen:function offscreen(){var{DOMParser:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:h,createCanvas:(h,f)=>new OffscreenCanvas(h,f),createImage:h=>_asyncToGenerator((function*(){var f=yield fetch(h),g=yield f.blob();return yield createImageBitmap(g)}))()};return"undefined"==typeof DOMParser&&void 0!==h||Reflect.deleteProperty(f,"DOMParser"),f},node:function node(h){var{DOMParser:f,canvas:g,fetch:d}=h;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:f,fetch:d,createCanvas:g.createCanvas,createImage:g.loadImage}}});function compressSpaces(h){return h.replace(/(?!\u3000)\s+/gm," ")}function trimLeft(h){return h.replace(/^[\n \t]+/,"")}function trimRight(h){return h.replace(/[\n \t]+$/,"")}function toNumbers(h){return((h||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var D=/^[A-Z-]+$/;function normalizeAttributeName(h){return D.test(h)?h.toLowerCase():h}function parseExternalUrl(h){var f=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(h)||[];return f[2]||f[3]||f[4]}function normalizeColor(h){if(!h.startsWith("rgb"))return h;var f=3;return h.replace(/\d+(\.\d+)?/g,((h,g)=>f--&&g?String(Math.round(parseFloat(h))):h))}var B=/(\[[^\]]+\])/g,U=/(#[^\s+>~.[:]+)/g,z=/(\.[^\s+>~.[:]+)/g,j=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,G=/(:[\w-]+\([^)]*\))/gi,X=/(:[^\s+>~.[:]+)/g,Y=/([^\s+>~.[:]+)/g;function findSelectorMatch(h,f){var g=f.exec(h);return g?[h.replace(f," "),g.length]:[h,0]}function getSelectorSpecificity(h){var f=[0,0,0],g=h.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),d=0;return[g,d]=findSelectorMatch(g,B),f[1]+=d,[g,d]=findSelectorMatch(g,U),f[0]+=d,[g,d]=findSelectorMatch(g,z),f[1]+=d,[g,d]=findSelectorMatch(g,j),f[2]+=d,[g,d]=findSelectorMatch(g,G),f[1]+=d,[g,d]=findSelectorMatch(g,X),f[1]+=d,g=g.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[g,d]=findSelectorMatch(g,Y),f[2]+=d,f.join("")}var Q=1e-8;function vectorMagnitude(h){return Math.sqrt(Math.pow(h[0],2)+Math.pow(h[1],2))}function vectorsRatio(h,f){return(h[0]*f[0]+h[1]*f[1])/(vectorMagnitude(h)*vectorMagnitude(f))}function vectorsAngle(h,f){return(h[0]*f[1]<h[1]*f[0]?-1:1)*Math.acos(vectorsRatio(h,f))}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)}class Property{constructor(h,f,g){this.document=h,this.name=f,this.value=g,this.isNormalizedColor=!1}static empty(h){return new Property(h,"EMPTY","")}split(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",{document:f,name:g}=this;return compressSpaces(this.getString()).trim().split(h).map((h=>new Property(f,g,h)))}hasValue(h){var{value:f}=this;return null!==f&&""!==f&&(h||0!==f)&&void 0!==f}isString(h){var{value:f}=this,g="string"==typeof f;return g&&h?h.test(f):g}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var h=this.getString();switch(!0){case h.endsWith("px"):case/^[0-9]+$/.test(h):return!0;default:return!1}}setValue(h){return this.value=h,this}getValue(h){return void 0===h||this.hasValue()?this.value:h}getNumber(h){if(!this.hasValue())return void 0===h?0:parseFloat(h);var{value:f}=this,g=parseFloat(f);return this.isString(/%$/)&&(g/=100),g}getString(h){return void 0===h||this.hasValue()?void 0===this.value?"":String(this.value):String(h)}getColor(h){var f=this.getString(h);return this.isNormalizedColor||(this.isNormalizedColor=!0,f=normalizeColor(f),this.value=f),f}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[g,d]="boolean"==typeof h?[void 0,h]:[h],{viewPort:x}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(x.computeSize("x"),x.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(x.computeSize("x"),x.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*x.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*x.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(/%$/)&&d:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*x.computeSize(g);default:var b=this.getNumber();return f&&b<1?b*x.computeSize(g):b}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}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)}}getDefinition(){var h=this.getString(),f=/#([^)'"]+)/.exec(h);return f&&(f=f[1]),f||(f=h),this.document.definitions[f]}getFillStyleDefinition(h,f){var g=this.getDefinition();if(!g)return null;if("function"==typeof g.createGradient)return g.createGradient(this.document.ctx,h,f);if("function"==typeof g.createPattern){if(g.getHrefAttribute().hasValue()){var d=g.getAttribute("patternTransform");g=g.getHrefAttribute().getDefinition(),d.hasValue()&&g.getAttribute("patternTransform",!0).setValue(d.value)}return g.createPattern(this.document.ctx,h,f)}return null}getTextBaseline(){return this.hasValue()?Property.textBaselineMapping[this.getString()]:null}addOpacity(h){for(var f=this.getColor(),g=f.length,d=0,x=0;x<g&&(","===f[x]&&d++,3!==d);x++);if(h.hasValue()&&this.isString()&&3!==d){var E=new b(f);E.ok&&(E.alpha=h.getNumber(),f=E.toRGBA())}return new Property(this.document,this.name,f)}}Property.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"};class ViewPort{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(h,f){this.viewPorts.push({width:h,height:f})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:h}=this;return h[h.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}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)}}class Point{constructor(h,f){this.x=h,this.y=f}static parse(h){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[g=f,d=f]=toNumbers(h);return new Point(g,d)}static parseScale(h){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,[g=f,d=g]=toNumbers(h);return new Point(g,d)}static parsePath(h){for(var f=toNumbers(h),g=f.length,d=[],x=0;x<g;x+=2)d.push(new Point(f[x],f[x+1]));return d}angleTo(h){return Math.atan2(h.y-this.y,h.x-this.x)}applyTransform(h){var{x:f,y:g}=this,d=f*h[0]+g*h[2]+h[4],x=f*h[1]+g*h[3]+h[5];this.x=d,this.y=x}}class Mouse{constructor(h){this.screen=h,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:h,onClick:f,onMouseMove:g}=this,d=h.ctx.canvas;d.onclick=f,d.onmousemove=g,this.working=!0}}stop(){if(this.working){var h=this.screen.ctx.canvas;this.working=!1,h.onclick=null,h.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:h,events:f,eventElements:g}=this,{style:d}=h.ctx.canvas;d&&(d.cursor=""),f.forEach(((h,f)=>{for(var{run:d}=h,x=g[f];x;)d(x),x=x.parent})),this.events=[],this.eventElements=[]}}checkPath(h,f){if(this.working&&f){var{events:g,eventElements:d}=this;g.forEach(((g,x)=>{var{x:b,y:E}=g;!d[x]&&f.isPointInPath&&f.isPointInPath(b,E)&&(d[x]=h)}))}}checkBoundingBox(h,f){if(this.working&&f){var{events:g,eventElements:d}=this;g.forEach(((g,x)=>{var{x:b,y:E}=g;!d[x]&&f.isPointInBox(b,E)&&(d[x]=h)}))}}mapXY(h,f){for(var{window:g,ctx:d}=this.screen,x=new Point(h,f),b=d.canvas;b;)x.x-=b.offsetLeft,x.y-=b.offsetTop,b=b.offsetParent;return g.scrollX&&(x.x+=g.scrollX),g.scrollY&&(x.y+=g.scrollY),x}onClick(h){var{x:f,y:g}=this.mapXY(h.clientX,h.clientY);this.events.push({type:"onclick",x:f,y:g,run(h){h.onClick&&h.onClick()}})}onMouseMove(h){var{x:f,y:g}=this.mapXY(h.clientX,h.clientY);this.events.push({type:"onmousemove",x:f,y:g,run(h){h.onMouseMove&&h.onMouseMove()}})}}var W="undefined"!=typeof window?window:null,$="undefined"!=typeof fetch?fetch.bind(void 0):null;class Screen{constructor(h){var{fetch:f=$,window:g=W}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ctx=h,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new ViewPort,this.mouse=new Mouse(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=g,this.fetch=f}wait(h){this.waits.push(h)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var h=this.waits.every((h=>h()));return h&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=h,h}setDefaults(h){h.strokeStyle="rgba(0,0,0,0)",h.lineCap="butt",h.lineJoin="miter",h.miterLimit=4}setViewBox(h){var{document:f,ctx:g,aspectRatio:d,width:x,desiredWidth:b,height:E,desiredHeight:P,minX:S=0,minY:w=0,refX:C,refY:A,clip:M=!1,clipX:_=0,clipY:N=0}=h,R=compressSpaces(d).replace(/^defer\s/,""),[V,k]=R.split(" "),L=V||"xMidYMid",D=k||"meet",B=x/b,U=E/P,z=Math.min(B,U),j=Math.max(B,U),G=b,X=P;"meet"===D&&(G*=z,X*=z),"slice"===D&&(G*=j,X*=j);var Y=new Property(f,"refX",C),Q=new Property(f,"refY",A),W=Y.hasValue()&&Q.hasValue();if(W&&g.translate(-z*Y.getPixels("x"),-z*Q.getPixels("y")),M){var $=z*_,q=z*N;g.beginPath(),g.moveTo($,q),g.lineTo(x,q),g.lineTo(x,E),g.lineTo($,E),g.closePath(),g.clip()}if(!W){var Z="meet"===D&&z===U,K="slice"===D&&j===U,J="meet"===D&&z===B,tt="slice"===D&&j===B;L.startsWith("xMid")&&(Z||K)&&g.translate(x/2-G/2,0),L.endsWith("YMid")&&(J||tt)&&g.translate(0,E/2-X/2),L.startsWith("xMax")&&(Z||K)&&g.translate(x-G,0),L.endsWith("YMax")&&(J||tt)&&g.translate(0,E-X)}switch(!0){case"none"===L:g.scale(B,U);break;case"meet"===D:g.scale(z,z);break;case"slice"===D:g.scale(j,j)}g.translate(-S,-w)}start(h){var{enableRedraw:f=!1,ignoreMouse:g=!1,ignoreAnimation:d=!1,ignoreDimensions:b=!1,ignoreClear:E=!1,forceRedraw:P,scaleWidth:S,scaleHeight:w,offsetX:C,offsetY:A}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{FRAMERATE:M,mouse:_}=this,N=1e3/M;if(this.frameDuration=N,this.readyPromise=new Promise((h=>{this.resolveReady=h})),this.isReady()&&this.render(h,b,E,S,w,C,A),f){var R=Date.now(),V=R,k=0,tick=()=>{R=Date.now(),(k=R-V)>=N&&(V=R-k%N,this.shouldUpdate(d,P)&&(this.render(h,b,E,S,w,C,A),_.runEvents())),this.intervalId=x(tick)};g||_.start(),this.intervalId=x(tick)}}stop(){this.intervalId&&(x.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(h,f){if(!h){var{frameDuration:g}=this;if(this.animations.reduce(((h,f)=>f.update(g)||h),!1))return!0}return!("function"!=typeof f||!f())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}render(h,f,g,d,x,b,E){var{CLIENT_WIDTH:P,CLIENT_HEIGHT:S,viewPort:w,ctx:C,isFirstRender:A}=this,M=C.canvas;w.clear(),M.width&&M.height?w.setCurrent(M.width,M.height):w.setCurrent(P,S);var _=h.getStyle("width"),N=h.getStyle("height");!f&&(A||"number"!=typeof d&&"number"!=typeof x)&&(_.hasValue()&&(M.width=_.getPixels("x"),M.style&&(M.style.width="".concat(M.width,"px"))),N.hasValue()&&(M.height=N.getPixels("y"),M.style&&(M.style.height="".concat(M.height,"px"))));var R=M.clientWidth||M.width,V=M.clientHeight||M.height;if(f&&_.hasValue()&&N.hasValue()&&(R=_.getPixels("x"),V=N.getPixels("y")),w.setCurrent(R,V),"number"==typeof b&&h.getAttribute("x",!0).setValue(b),"number"==typeof E&&h.getAttribute("y",!0).setValue(E),"number"==typeof d||"number"==typeof x){var k=toNumbers(h.getAttribute("viewBox").getString()),L=0,D=0;if("number"==typeof d){var B=h.getStyle("width");B.hasValue()?L=B.getPixels("x")/d:isNaN(k[2])||(L=k[2]/d)}if("number"==typeof x){var U=h.getStyle("height");U.hasValue()?D=U.getPixels("y")/x:isNaN(k[3])||(D=k[3]/x)}L||(L=D),D||(D=L),h.getAttribute("width",!0).setValue(d),h.getAttribute("height",!0).setValue(x);var z=h.getStyle("transform",!0,!0);z.setValue("".concat(z.getString()," scale(").concat(1/L,", ").concat(1/D,")"))}g||C.clearRect(0,0,R,V),h.render(C),A&&(this.isFirstRender=!1)}}Screen.defaultWindow=W,Screen.defaultFetch=$;var{defaultFetch:q}=Screen,Z="undefined"!=typeof DOMParser?DOMParser:null;class Parser{constructor(){var{fetch:h=q,DOMParser:f=Z}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fetch=h,this.DOMParser=f}parse(h){var f=this;return _asyncToGenerator((function*(){return h.startsWith("<")?f.parseFromString(h):f.load(h)}))()}parseFromString(h){var f=new this.DOMParser;try{return this.checkDocument(f.parseFromString(h,"image/svg+xml"))}catch(g){return this.checkDocument(f.parseFromString(h,"text/xml"))}}checkDocument(h){var f=h.getElementsByTagName("parsererror")[0];if(f)throw new Error(f.textContent);return h}load(h){var f=this;return _asyncToGenerator((function*(){var g=yield f.fetch(h),d=yield g.text();return f.parseFromString(d)}))()}}class Translate{constructor(h,f){this.type="translate",this.point=null,this.point=Point.parse(f)}apply(h){var{x:f,y:g}=this.point;h.translate(f||0,g||0)}unapply(h){var{x:f,y:g}=this.point;h.translate(-1*f||0,-1*g||0)}applyToPoint(h){var{x:f,y:g}=this.point;h.applyTransform([1,0,0,1,f||0,g||0])}}class Rotate{constructor(h,f,g){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var d=toNumbers(f);this.angle=new Property(h,"angle",d[0]),this.originX=g[0],this.originY=g[1],this.cx=d[1]||0,this.cy=d[2]||0}apply(h){var{cx:f,cy:g,originX:d,originY:x,angle:b}=this,E=f+d.getPixels("x"),P=g+x.getPixels("y");h.translate(E,P),h.rotate(b.getRadians()),h.translate(-E,-P)}unapply(h){var{cx:f,cy:g,originX:d,originY:x,angle:b}=this,E=f+d.getPixels("x"),P=g+x.getPixels("y");h.translate(E,P),h.rotate(-1*b.getRadians()),h.translate(-E,-P)}applyToPoint(h){var{cx:f,cy:g,angle:d}=this,x=d.getRadians();h.applyTransform([1,0,0,1,f||0,g||0]),h.applyTransform([Math.cos(x),Math.sin(x),-Math.sin(x),Math.cos(x),0,0]),h.applyTransform([1,0,0,1,-f||0,-g||0])}}class Scale{constructor(h,f,g){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var d=Point.parseScale(f);0!==d.x&&0!==d.y||(d.x=Q,d.y=Q),this.scale=d,this.originX=g[0],this.originY=g[1]}apply(h){var{scale:{x:f,y:g},originX:d,originY:x}=this,b=d.getPixels("x"),E=x.getPixels("y");h.translate(b,E),h.scale(f,g||f),h.translate(-b,-E)}unapply(h){var{scale:{x:f,y:g},originX:d,originY:x}=this,b=d.getPixels("x"),E=x.getPixels("y");h.translate(b,E),h.scale(1/f,1/g||f),h.translate(-b,-E)}applyToPoint(h){var{x:f,y:g}=this.scale;h.applyTransform([f||0,0,0,g||0,0,0])}}class Matrix{constructor(h,f,g){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=toNumbers(f),this.originX=g[0],this.originY=g[1]}apply(h){var{originX:f,originY:g,matrix:d}=this,x=f.getPixels("x"),b=g.getPixels("y");h.translate(x,b),h.transform(d[0],d[1],d[2],d[3],d[4],d[5]),h.translate(-x,-b)}unapply(h){var{originX:f,originY:g,matrix:d}=this,x=d[0],b=d[2],E=d[4],P=d[1],S=d[3],w=d[5],C=1/(x*(1*S-0*w)-b*(1*P-0*w)+E*(0*P-0*S)),A=f.getPixels("x"),M=g.getPixels("y");h.translate(A,M),h.transform(C*(1*S-0*w),C*(0*w-1*P),C*(0*E-1*b),C*(1*x-0*E),C*(b*w-E*S),C*(E*P-x*w)),h.translate(-A,-M)}applyToPoint(h){h.applyTransform(this.matrix)}}class Skew extends Matrix{constructor(h,f,g){super(h,f,g),this.type="skew",this.angle=null,this.angle=new Property(h,"angle",f)}}class SkewX extends Skew{constructor(h,f,g){super(h,f,g),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class SkewY extends Skew{constructor(h,f,g){super(h,f,g),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class Transform{constructor(h,f,g){this.document=h,this.transforms=[];var d=function parseTransforms(h){return compressSpaces(h).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(f);d.forEach((h=>{if("none"!==h){var[f,d]=function parseTransform(h){var[f,g]=h.split("(");return[f.trim(),g.trim().replace(")","")]}(h),x=Transform.transformTypes[f];void 0!==x&&this.transforms.push(new x(this.document,d,g))}}))}static fromElement(h,f){var g=f.getStyle("transform",!1,!0),[d,x=d]=f.getStyle("transform-origin",!1,!0).split(),b=[d,x];return g.hasValue()?new Transform(h,g.getString(),b):null}apply(h){for(var{transforms:f}=this,g=f.length,d=0;d<g;d++)f[d].apply(h)}unapply(h){for(var{transforms:f}=this,g=f.length-1;g>=0;g--)f[g].unapply(h)}applyToPoint(h){for(var{transforms:f}=this,g=f.length,d=0;d<g;d++)f[d].applyToPoint(h)}}Transform.transformTypes={translate:Translate,rotate:Rotate,scale:Scale,matrix:Matrix,skewX:SkewX,skewY:SkewY};class Element{constructor(h,f){var g=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=h,this.node=f,this.captureTextNodes=g,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],f&&1===f.nodeType){if(Array.from(f.attributes).forEach((f=>{var g=normalizeAttributeName(f.nodeName);this.attributes[g]=new Property(h,g,f.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var d=this.getAttribute("style").getString().split(";").map((h=>h.trim()));d.forEach((f=>{if(f){var[g,d]=f.split(":").map((h=>h.trim()));this.styles[g]=new Property(h,g,d)}}))}var{definitions:x}=h,b=this.getAttribute("id");b.hasValue()&&(x[b.getString()]||(x[b.getString()]=this)),Array.from(f.childNodes).forEach((f=>{if(1===f.nodeType)this.addChild(f);else if(g&&(3===f.nodeType||4===f.nodeType)){var d=h.createTextNode(f);d.getText().length>0&&this.addChild(d)}}))}}getAttribute(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1],g=this.attributes[h];if(!g&&f){var d=new Property(this.document,h,"");return this.attributes[h]=d,d}return g||Property.empty(this.document)}getHrefAttribute(){for(var h in this.attributes)if("href"===h||h.endsWith(":href"))return this.attributes[h];return Property.empty(this.document)}getStyle(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1],g=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=this.styles[h];if(d)return d;var x=this.getAttribute(h);if(null!=x&&x.hasValue())return this.styles[h]=x,x;if(!g){var{parent:b}=this;if(b){var E=b.getStyle(h);if(null!=E&&E.hasValue())return E}}if(f){var P=new Property(this.document,h,"");return this.styles[h]=P,P}return d||Property.empty(this.document)}render(h){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(h.save(),this.getStyle("mask").hasValue()){var f=this.getStyle("mask").getDefinition();f&&(this.applyEffects(h),f.apply(h,this))}else if("none"!==this.getStyle("filter").getValue("none")){var g=this.getStyle("filter").getDefinition();g&&(this.applyEffects(h),g.apply(h,this))}else this.setContext(h),this.renderChildren(h),this.clearContext(h);h.restore()}}setContext(h){}applyEffects(h){var f=Transform.fromElement(this.document,this);f&&f.apply(h);var g=this.getStyle("clip-path",!1,!0);if(g.hasValue()){var d=g.getDefinition();d&&d.apply(h)}}clearContext(h){}renderChildren(h){this.children.forEach((f=>{f.render(h)}))}addChild(h){var f=h instanceof Element?h:this.document.createElement(h);f.parent=this,Element.ignoreChildTypes.includes(f.type)||this.children.push(f)}matchesSelector(h){var f,{node:g}=this;if("function"==typeof g.matches)return g.matches(h);var d=null===(f=g.getAttribute)||void 0===f?void 0:f.call(g,"class");return!(!d||""===d)&&d.split(" ").some((f=>".".concat(f)===h))}addStylesFromStyleDefinition(){var{styles:h,stylesSpecificity:f}=this.document;for(var g in h)if(!g.startsWith("@")&&this.matchesSelector(g)){var d=h[g],x=f[g];if(d)for(var b in d){var E=this.stylesSpecificity[b];void 0===E&&(E="000"),x>=E&&(this.styles[b]=d[b],this.stylesSpecificity[b]=x)}}}removeStyles(h,f){return f.reduce(((f,g)=>{var d=h.getStyle(g);if(!d.hasValue())return f;var x=d.getString();return d.setValue(""),[...f,[g,x]]}),[])}restoreStyles(h,f){f.forEach((f=>{var[g,d]=f;h.getStyle(g,!0).setValue(d)}))}isFirstChild(){var h;return 0===(null===(h=this.parent)||void 0===h?void 0:h.children.indexOf(this))}}Element.ignoreChildTypes=["title"];class UnknownElement extends Element{constructor(h,f,g){super(h,f,g)}}function wrapFontFamily(h){var f=h.trim();return/^('|")/.test(f)?f:'"'.concat(f,'"')}function prepareFontStyle(h){if(!h)return"";var f=h.trim().toLowerCase();switch(f){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return f;default:return/^oblique\s+(-|)\d+deg$/.test(f)?f:""}}function prepareFontWeight(h){if(!h)return"";var f=h.trim().toLowerCase();switch(f){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return f;default:return/^[\d.]+$/.test(f)?f:""}}class Font{constructor(h,f,g,d,x,b){var E=b?"string"==typeof b?Font.parse(b):b:{};this.fontFamily=x||E.fontFamily,this.fontSize=d||E.fontSize,this.fontStyle=h||E.fontStyle,this.fontWeight=g||E.fontWeight,this.fontVariant=f||E.fontVariant}static parse(){var h=arguments.length>1?arguments[1]:void 0,f="",g="",d="",x="",b="",E=compressSpaces(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),P={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return E.forEach((h=>{switch(!0){case!P.fontStyle&&Font.styles.includes(h):"inherit"!==h&&(f=h),P.fontStyle=!0;break;case!P.fontVariant&&Font.variants.includes(h):"inherit"!==h&&(g=h),P.fontStyle=!0,P.fontVariant=!0;break;case!P.fontWeight&&Font.weights.includes(h):"inherit"!==h&&(d=h),P.fontStyle=!0,P.fontVariant=!0,P.fontWeight=!0;break;case!P.fontSize:"inherit"!==h&&([x]=h.split("/")),P.fontStyle=!0,P.fontVariant=!0,P.fontWeight=!0,P.fontSize=!0;break;default:"inherit"!==h&&(b+=h)}})),new Font(f,g,d,x,b,h)}toString(){return[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,(h=this.fontFamily,"undefined"==typeof process?h:h.trim().split(",").map(wrapFontFamily).join(","))].join(" ").trim();var h}}Font.styles="normal|italic|oblique|inherit",Font.variants="normal|small-caps|inherit",Font.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class BoundingBox{constructor(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;this.x1=h,this.y1=f,this.x2=g,this.y2=d,this.addPoint(h,f),this.addPoint(g,d)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(h,f){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!==f&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=f,this.y2=f),f<this.y1&&(this.y1=f),f>this.y2&&(this.y2=f))}addX(h){this.addPoint(h,null)}addY(h){this.addPoint(null,h)}addBoundingBox(h){if(h){var{x1:f,y1:g,x2:d,y2:x}=h;this.addPoint(f,g),this.addPoint(d,x)}}sumCubic(h,f,g,d,x){return Math.pow(1-h,3)*f+3*Math.pow(1-h,2)*h*g+3*(1-h)*Math.pow(h,2)*d+Math.pow(h,3)*x}bezierCurveAdd(h,f,g,d,x){var b=6*f-12*g+6*d,E=-3*f+9*g-9*d+3*x,P=3*g-3*f;if(0!==E){var S=Math.pow(b,2)-4*P*E;if(!(S<0)){var w=(-b+Math.sqrt(S))/(2*E);0<w&&w<1&&(h?this.addX(this.sumCubic(w,f,g,d,x)):this.addY(this.sumCubic(w,f,g,d,x)));var C=(-b-Math.sqrt(S))/(2*E);0<C&&C<1&&(h?this.addX(this.sumCubic(C,f,g,d,x)):this.addY(this.sumCubic(C,f,g,d,x)))}}else{if(0===b)return;var A=-P/b;0<A&&A<1&&(h?this.addX(this.sumCubic(A,f,g,d,x)):this.addY(this.sumCubic(A,f,g,d,x)))}}addBezierCurve(h,f,g,d,x,b,E,P){this.addPoint(h,f),this.addPoint(E,P),this.bezierCurveAdd(!0,h,g,x,E),this.bezierCurveAdd(!1,f,d,b,P)}addQuadraticCurve(h,f,g,d,x,b){var E=h+2/3*(g-h),P=f+2/3*(d-f),S=E+1/3*(x-h),w=P+1/3*(b-f);this.addBezierCurve(h,f,E,S,P,w,x,b)}isPointInBox(h,f){var{x1:g,y1:d,x2:x,y2:b}=this;return g<=h&&h<=x&&d<=f&&f<=b}}class PathParser extends _{constructor(h){super(h.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Point(0,0),this.control=new Point(0,0),this.current=new Point(0,0),this.points=[],this.angles=[]}isEnd(){var{i:h,commands:f}=this;return h>=f.length-1}next(){var h=this.commands[++this.i];return this.previousCommand=this.command,this.command=h,h}getPoint(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",g=new Point(this.command[h],this.command[f]);return this.makeAbsolute(g)}getAsControlPoint(h,f){var g=this.getPoint(h,f);return this.control=g,g}getAsCurrentPoint(h,f){var g=this.getPoint(h,f);return this.current=g,g}getReflectedControlPoint(){var h=this.previousCommand.type;if(h!==_.CURVE_TO&&h!==_.SMOOTH_CURVE_TO&&h!==_.QUAD_TO&&h!==_.SMOOTH_QUAD_TO)return this.current;var{current:{x:f,y:g},control:{x:d,y:x}}=this;return new Point(2*f-d,2*g-x)}makeAbsolute(h){if(this.command.relative){var{x:f,y:g}=this.current;h.x+=f,h.y+=g}return h}addMarker(h,f,g){var{points:d,angles:x}=this;g&&x.length>0&&!x[x.length-1]&&(x[x.length-1]=d[d.length-1].angleTo(g)),this.addMarkerAngle(h,f?f.angleTo(h):null)}addMarkerAngle(h,f){this.points.push(h),this.angles.push(f)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:h}=this,f=h.length,g=0;g<f;g++)if(!h[g])for(var d=g+1;d<f;d++)if(h[d]){h[g]=h[d];break}return h}}class RenderedElement extends Element{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var h=1,f=this;f;){var g=f.getStyle("opacity",!1,!0);g.hasValue(!0)&&(h*=g.getNumber()),f=f.parent}return h}setContext(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!f){var g=this.getStyle("fill"),d=this.getStyle("fill-opacity"),x=this.getStyle("stroke"),b=this.getStyle("stroke-opacity");if(g.isUrlDefinition()){var E=g.getFillStyleDefinition(this,d);E&&(h.fillStyle=E)}else if(g.hasValue()){"currentColor"===g.getString()&&g.setValue(this.getStyle("color").getColor());var P=g.getColor();"inherit"!==P&&(h.fillStyle="none"===P?"rgba(0,0,0,0)":P)}if(d.hasValue()){var S=new Property(this.document,"fill",h.fillStyle).addOpacity(d).getColor();h.fillStyle=S}if(x.isUrlDefinition()){var w=x.getFillStyleDefinition(this,b);w&&(h.strokeStyle=w)}else if(x.hasValue()){"currentColor"===x.getString()&&x.setValue(this.getStyle("color").getColor());var C=x.getString();"inherit"!==C&&(h.strokeStyle="none"===C?"rgba(0,0,0,0)":C)}if(b.hasValue()){var A=new Property(this.document,"stroke",h.strokeStyle).addOpacity(b).getString();h.strokeStyle=A}var M=this.getStyle("stroke-width");if(M.hasValue()){var _=M.getPixels();h.lineWidth=_||Q}var N=this.getStyle("stroke-linecap"),R=this.getStyle("stroke-linejoin"),V=this.getStyle("stroke-miterlimit"),k=this.getStyle("stroke-dasharray"),L=this.getStyle("stroke-dashoffset");if(N.hasValue()&&(h.lineCap=N.getString()),R.hasValue()&&(h.lineJoin=R.getString()),V.hasValue()&&(h.miterLimit=V.getNumber()),k.hasValue()&&"none"!==k.getString()){var D=toNumbers(k.getString());void 0!==h.setLineDash?h.setLineDash(D):void 0!==h.webkitLineDash?h.webkitLineDash=D:void 0===h.mozDash||1===D.length&&0===D[0]||(h.mozDash=D);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 U=this.getStyle("font"),z=this.getStyle("font-style"),j=this.getStyle("font-variant"),G=this.getStyle("font-weight"),X=this.getStyle("font-size"),Y=this.getStyle("font-family"),W=new Font(z.getString(),j.getString(),G.getString(),X.hasValue()?"".concat(X.getPixels(!0),"px"):"",Y.getString(),Font.parse(U.getString(),h.font));z.setValue(W.fontStyle),j.setValue(W.fontVariant),G.setValue(W.fontWeight),X.setValue(W.fontSize),Y.setValue(W.fontFamily),h.font=W.toString(),X.isPixels()&&(this.document.emSize=X.getPixels(),this.modifiedEmSizeStack=!0)}f||(this.applyEffects(h),h.globalAlpha=this.calculateOpacity())}clearContext(h){super.clearContext(h),this.modifiedEmSizeStack&&this.document.popEmSize()}}class PathElement extends RenderedElement{constructor(h,f,g){super(h,f,g),this.type="path",this.pathParser=null,this.pathParser=new PathParser(this.getAttribute("d").getString())}path(h){var{pathParser:f}=this,g=new BoundingBox;for(f.reset(),h&&h.beginPath();!f.isEnd();)switch(f.next().type){case PathParser.MOVE_TO:this.pathM(h,g);break;case PathParser.LINE_TO:this.pathL(h,g);break;case PathParser.HORIZ_LINE_TO:this.pathH(h,g);break;case PathParser.VERT_LINE_TO:this.pathV(h,g);break;case PathParser.CURVE_TO:this.pathC(h,g);break;case PathParser.SMOOTH_CURVE_TO:this.pathS(h,g);break;case PathParser.QUAD_TO:this.pathQ(h,g);break;case PathParser.SMOOTH_QUAD_TO:this.pathT(h,g);break;case PathParser.ARC:this.pathA(h,g);break;case PathParser.CLOSE_PATH:this.pathZ(h,g)}return g}getBoundingBox(h){return this.path()}getMarkers(){var{pathParser:h}=this,f=h.getMarkerPoints(),g=h.getMarkerAngles(),d=f.map(((h,f)=>[h,g[f]]));return d}renderChildren(h){this.path(h),this.document.screen.mouse.checkPath(this,h);var f=this.getStyle("fill-rule");""!==h.fillStyle&&("inherit"!==f.getString("inherit")?h.fill(f.getString()):h.fill()),""!==h.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(h.save(),h.setTransform(1,0,0,1,0,0),h.stroke(),h.restore()):h.stroke());var g=this.getMarkers();if(g){var d=g.length-1,x=this.getStyle("marker-start"),b=this.getStyle("marker-mid"),E=this.getStyle("marker-end");if(x.isUrlDefinition()){var P=x.getDefinition(),[S,w]=g[0];P.render(h,S,w)}if(b.isUrlDefinition())for(var C=b.getDefinition(),A=1;A<d;A++){var[M,_]=g[A];C.render(h,M,_)}if(E.isUrlDefinition()){var N=E.getDefinition(),[R,V]=g[d];N.render(h,R,V)}}}static pathM(h){var f=h.getAsCurrentPoint();return h.start=h.current,{point:f}}pathM(h,f){var{pathParser:g}=this,{point:d}=PathElement.pathM(g),{x,y:b}=d;g.addMarker(d),f.addPoint(x,b),h&&h.moveTo(x,b)}static pathL(h){var{current:f}=h;return{current:f,point:h.getAsCurrentPoint()}}pathL(h,f){var{pathParser:g}=this,{current:d,point:x}=PathElement.pathL(g),{x:b,y:E}=x;g.addMarker(x,d),f.addPoint(b,E),h&&h.lineTo(b,E)}static pathH(h){var{current:f,command:g}=h,d=new Point((g.relative?f.x:0)+g.x,f.y);return h.current=d,{current:f,point:d}}pathH(h,f){var{pathParser:g}=this,{current:d,point:x}=PathElement.pathH(g),{x:b,y:E}=x;g.addMarker(x,d),f.addPoint(b,E),h&&h.lineTo(b,E)}static pathV(h){var{current:f,command:g}=h,d=new Point(f.x,(g.relative?f.y:0)+g.y);return h.current=d,{current:f,point:d}}pathV(h,f){var{pathParser:g}=this,{current:d,point:x}=PathElement.pathV(g),{x:b,y:E}=x;g.addMarker(x,d),f.addPoint(b,E),h&&h.lineTo(b,E)}static pathC(h){var{current:f}=h;return{current:f,point:h.getPoint("x1","y1"),controlPoint:h.getAsControlPoint("x2","y2"),currentPoint:h.getAsCurrentPoint()}}pathC(h,f){var{pathParser:g}=this,{current:d,point:x,controlPoint:b,currentPoint:E}=PathElement.pathC(g);g.addMarker(E,b,x),f.addBezierCurve(d.x,d.y,x.x,x.y,b.x,b.y,E.x,E.y),h&&h.bezierCurveTo(x.x,x.y,b.x,b.y,E.x,E.y)}static pathS(h){var{current:f}=h;return{current:f,point:h.getReflectedControlPoint(),controlPoint:h.getAsControlPoint("x2","y2"),currentPoint:h.getAsCurrentPoint()}}pathS(h,f){var{pathParser:g}=this,{current:d,point:x,controlPoint:b,currentPoint:E}=PathElement.pathS(g);g.addMarker(E,b,x),f.addBezierCurve(d.x,d.y,x.x,x.y,b.x,b.y,E.x,E.y),h&&h.bezierCurveTo(x.x,x.y,b.x,b.y,E.x,E.y)}static pathQ(h){var{current:f}=h;return{current:f,controlPoint:h.getAsControlPoint("x1","y1"),currentPoint:h.getAsCurrentPoint()}}pathQ(h,f){var{pathParser:g}=this,{current:d,controlPoint:x,currentPoint:b}=PathElement.pathQ(g);g.addMarker(b,x,x),f.addQuadraticCurve(d.x,d.y,x.x,x.y,b.x,b.y),h&&h.quadraticCurveTo(x.x,x.y,b.x,b.y)}static pathT(h){var{current:f}=h,g=h.getReflectedControlPoint();return h.control=g,{current:f,controlPoint:g,currentPoint:h.getAsCurrentPoint()}}pathT(h,f){var{pathParser:g}=this,{current:d,controlPoint:x,currentPoint:b}=PathElement.pathT(g);g.addMarker(b,x,x),f.addQuadraticCurve(d.x,d.y,x.x,x.y,b.x,b.y),h&&h.quadraticCurveTo(x.x,x.y,b.x,b.y)}static pathA(h){var{current:f,command:g}=h,{rX:d,rY:x,xRot:b,lArcFlag:E,sweepFlag:P}=g,S=b*(Math.PI/180),w=h.getAsCurrentPoint(),C=new Point(Math.cos(S)*(f.x-w.x)/2+Math.sin(S)*(f.y-w.y)/2,-Math.sin(S)*(f.x-w.x)/2+Math.cos(S)*(f.y-w.y)/2),A=Math.pow(C.x,2)/Math.pow(d,2)+Math.pow(C.y,2)/Math.pow(x,2);A>1&&(d*=Math.sqrt(A),x*=Math.sqrt(A));var M=(E===P?-1:1)*Math.sqrt((Math.pow(d,2)*Math.pow(x,2)-Math.pow(d,2)*Math.pow(C.y,2)-Math.pow(x,2)*Math.pow(C.x,2))/(Math.pow(d,2)*Math.pow(C.y,2)+Math.pow(x,2)*Math.pow(C.x,2)));isNaN(M)&&(M=0);var _=new Point(M*d*C.y/x,M*-x*C.x/d),N=new Point((f.x+w.x)/2+Math.cos(S)*_.x-Math.sin(S)*_.y,(f.y+w.y)/2+Math.sin(S)*_.x+Math.cos(S)*_.y),R=vectorsAngle([1,0],[(C.x-_.x)/d,(C.y-_.y)/x]),V=[(C.x-_.x)/d,(C.y-_.y)/x],k=[(-C.x-_.x)/d,(-C.y-_.y)/x],L=vectorsAngle(V,k);return vectorsRatio(V,k)<=-1&&(L=Math.PI),vectorsRatio(V,k)>=1&&(L=0),{currentPoint:w,rX:d,rY:x,sweepFlag:P,xAxisRotation:S,centp:N,a1:R,ad:L}}pathA(h,f){var{pathParser:g}=this,{currentPoint:d,rX:x,rY:b,sweepFlag:E,xAxisRotation:P,centp:S,a1:w,ad:C}=PathElement.pathA(g),A=1-E?1:-1,M=w+A*(C/2),_=new Point(S.x+x*Math.cos(M),S.y+b*Math.sin(M));if(g.addMarkerAngle(_,M-A*Math.PI/2),g.addMarkerAngle(d,M-A*Math.PI),f.addPoint(d.x,d.y),h&&!isNaN(w)&&!isNaN(C)){var N=x>b?x:b,R=x>b?1:x/b,V=x>b?b/x:1;h.translate(S.x,S.y),h.rotate(P),h.scale(R,V),h.arc(0,0,N,w,w+C,Boolean(1-E)),h.scale(1/R,1/V),h.rotate(-P),h.translate(-S.x,-S.y)}}static pathZ(h){h.current=h.start}pathZ(h,f){PathElement.pathZ(this.pathParser),h&&f.x1!==f.x2&&f.y1!==f.y2&&h.closePath()}}class GlyphElement extends PathElement{constructor(h,f,g){super(h,f,g),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class TextElement extends RenderedElement{constructor(h,f,g){super(h,f,new.target===TextElement||g),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.setContext(h,f);var g=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();g&&(h.textBaseline=g)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(h){if("text"!==this.type)return this.getTElementBoundingBox(h);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(h);var f=null;return this.children.forEach(((g,d)=>{var x=this.getChildBoundingBox(h,this,this,d);f?f.addBoundingBox(x):f=x})),f}getFontSize(){var{document:h,parent:f}=this,g=Font.parse(h.ctx.font).fontSize;return f.getStyle("font-size").getNumber(g)}getTElementBoundingBox(h){var f=this.getFontSize();return new BoundingBox(this.x,this.y-f,this.x+this.measureText(h),this.y)}getGlyph(h,f,g){var d=f[g],x=null;if(h.isArabic){var b=f.length,E=f[g-1],P=f[g+1],S="isolated";if((0===g||" "===E)&&g<b-1&&" "!==P&&(S="terminal"),g>0&&" "!==E&&g<b-1&&" "!==P&&(S="medial"),g>0&&" "!==E&&(g===b-1||" "===P)&&(S="initial"),void 0!==h.glyphs[d]){var w=h.glyphs[d];x=w instanceof GlyphElement?w:w[S]}}else x=h.glyphs[d];return x||(x=h.missingGlyph),x}getText(){return""}getTextFromNode(h){var f=h||this.node,g=Array.from(f.parentNode.childNodes),d=g.indexOf(f),x=g.length-1,b=compressSpaces(f.textContent||"");return 0===d&&(b=trimLeft(b)),d===x&&(b=trimRight(b)),b}renderChildren(h){if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(h),this.children.forEach(((f,g)=>{this.renderChild(h,this,this,g)}));var{mouse:f}=this.document.screen;f.isWorking()&&f.checkBoundingBox(this,this.getBoundingBox(h))}else this.renderTElementChildren(h)}renderTElementChildren(h){var{document:f,parent:g}=this,d=this.getText(),x=g.getStyle("font-family").getDefinition();if(x)for(var{unitsPerEm:b}=x.fontFace,E=Font.parse(f.ctx.font),P=g.getStyle("font-size").getNumber(E.fontSize),S=g.getStyle("font-style").getString(E.fontStyle),w=P/b,C=x.isRTL?d.split("").reverse().join(""):d,A=toNumbers(g.getAttribute("dx").getString()),M=C.length,_=0;_<M;_++){var N=this.getGlyph(x,C,_);h.translate(this.x,this.y),h.scale(w,-w);var R=h.lineWidth;h.lineWidth=h.lineWidth*b/P,"italic"===S&&h.transform(1,0,.4,1,0,0),N.render(h),"italic"===S&&h.transform(1,0,-.4,1,0,0),h.lineWidth=R,h.scale(1/w,-1/w),h.translate(-this.x,-this.y),this.x+=P*(N.horizAdvX||x.horizAdvX)/b,void 0===A[_]||isNaN(A[_])||(this.x+=A[_])}else{var{x:V,y:k}=this;h.fillStyle&&h.fillText(d,V,k),h.strokeStyle&&h.strokeText(d,V,k)}}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var h=this.leafTexts[this.textChunkStart],f=h.getStyle("text-anchor").getString("start"),g=0;g="start"===f?h.x-this.minX:"end"===f?h.x-this.maxX:h.x-(this.minX+this.maxX)/2;for(var d=this.textChunkStart;d<this.leafTexts.length;d++)this.leafTexts[d].x+=g;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(h){this.children.forEach(((f,g)=>{this.adjustChildCoordinatesRecursiveCore(h,this,this,g)})),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(h,f,g,d){var x=g.children[d];x.children.length>0?x.children.forEach(((g,d)=>{f.adjustChildCoordinatesRecursiveCore(h,f,x,d)})):this.adjustChildCoordinates(h,f,g,d)}adjustChildCoordinates(h,f,g,d){var x=g.children[d];if("function"!=typeof x.measureText)return x;h.save(),x.setContext(h,!0);var b=x.getAttribute("x"),E=x.getAttribute("y"),P=x.getAttribute("dx"),S=x.getAttribute("dy"),w=x.getStyle("font-family").getDefinition(),C=Boolean(w)&&w.isRTL;0===d&&(b.hasValue()||b.setValue(x.getInheritedAttribute("x")),E.hasValue()||E.setValue(x.getInheritedAttribute("y")),P.hasValue()||P.setValue(x.getInheritedAttribute("dx")),S.hasValue()||S.setValue(x.getInheritedAttribute("dy")));var A=x.measureText(h);return C&&(f.x-=A),b.hasValue()?(f.applyAnchoring(),x.x=b.getPixels("x"),P.hasValue()&&(x.x+=P.getPixels("x"))):(P.hasValue()&&(f.x+=P.getPixels("x")),x.x=f.x),f.x=x.x,C||(f.x+=A),E.hasValue()?(x.y=E.getPixels("y"),S.hasValue()&&(x.y+=S.getPixels("y"))):(S.hasValue()&&(f.y+=S.getPixels("y")),x.y=f.y),f.y=x.y,f.leafTexts.push(x),f.minX=Math.min(f.minX,x.x,x.x+A),f.maxX=Math.max(f.maxX,x.x,x.x+A),x.clearContext(h),h.restore(),x}getChildBoundingBox(h,f,g,d){var x=g.children[d];if("function"!=typeof x.getBoundingBox)return null;var b=x.getBoundingBox(h);return b?(x.children.forEach(((g,d)=>{var E=f.getChildBoundingBox(h,f,x,d);b.addBoundingBox(E)})),b):null}renderChild(h,f,g,d){var x=g.children[d];x.render(h),x.children.forEach(((g,d)=>{f.renderChild(h,f,x,d)}))}measureText(h){var{measureCache:f}=this;if(~f)return f;var g=this.getText(),d=this.measureTargetText(h,g);return this.measureCache=d,d}measureTargetText(h,f){if(!f.length)return 0;var{parent:g}=this,d=g.getStyle("font-family").getDefinition();if(d){for(var x=this.getFontSize(),b=d.isRTL?f.split("").reverse().join(""):f,E=toNumbers(g.getAttribute("dx").getString()),P=b.length,S=0,w=0;w<P;w++){S+=(this.getGlyph(d,b,w).horizAdvX||d.horizAdvX)*x/d.fontFace.unitsPerEm,void 0===E[w]||isNaN(E[w])||(S+=E[w])}return S}if(!h.measureText)return 10*f.length;h.save(),this.setContext(h,!0);var{width:C}=h.measureText(f);return this.clearContext(h),h.restore(),C}getInheritedAttribute(h){for(var f=this;f instanceof TextElement&&f.isFirstChild();){var g=f.parent.getAttribute(h);if(g.hasValue(!0))return g.getValue("0");f=f.parent}return null}}class TSpanElement extends TextElement{constructor(h,f,g){super(h,f,new.target===TSpanElement||g),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class TextNode extends TSpanElement{constructor(){super(...arguments),this.type="textNode"}}class SVGElement extends RenderedElement{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(h){var f,{document:g}=this,{screen:d,window:x}=g,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 E=new Property(g,"fontSize",Font.parse(h.font).fontSize);E.hasValue()&&(g.rootEmSize=E.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{width:P,height:S}=d.viewPort;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 w=this.getAttribute("refX"),C=this.getAttribute("refY"),A=this.getAttribute("viewBox"),M=A.hasValue()?toNumbers(A.getString()):null,_=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),N=0,R=0,V=0,k=0;M&&(N=M[0],R=M[1]),this.root||(P=this.getStyle("width").getPixels("x"),S=this.getStyle("height").getPixels("y"),"marker"===this.type&&(V=N,k=R,N=0,R=0)),d.viewPort.setCurrent(P,S),!this.node||this.parent&&"foreignObject"!==(null===(f=this.node.parentNode)||void 0===f?void 0:f.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(h),h.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),M&&(P=M[2],S=M[3]),g.setViewBox({ctx:h,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:d.viewPort.width,desiredWidth:P,height:d.viewPort.height,desiredHeight:S,minX:N,minY:R,refX:w.getValue(),refY:C.getValue(),clip:_,clipX:V,clipY:k}),M&&(d.viewPort.removeCurrent(),d.viewPort.setCurrent(P,S))}clearContext(h){super.clearContext(h),this.document.screen.viewPort.removeCurrent()}resize(h){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,g=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=this.getAttribute("width",!0),x=this.getAttribute("height",!0),b=this.getAttribute("viewBox"),E=this.getAttribute("style"),P=d.getNumber(0),S=x.getNumber(0);if(g)if("string"==typeof g)this.getAttribute("preserveAspectRatio",!0).setValue(g);else{var w=this.getAttribute("preserveAspectRatio");w.hasValue()&&w.setValue(w.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(d.setValue(h),x.setValue(f),b.hasValue()||b.setValue("0 0 ".concat(P||h," ").concat(S||f)),E.hasValue()){var C=this.getStyle("width"),A=this.getStyle("height");C.hasValue()&&C.setValue("".concat(h,"px")),A.hasValue()&&A.setValue("".concat(f,"px"))}}}class RectElement extends PathElement{constructor(){super(...arguments),this.type="rect"}path(h){var f=this.getAttribute("x").getPixels("x"),g=this.getAttribute("y").getPixels("y"),d=this.getStyle("width",!1,!0).getPixels("x"),x=this.getStyle("height",!1,!0).getPixels("y"),b=this.getAttribute("rx"),E=this.getAttribute("ry"),P=b.getPixels("x"),S=E.getPixels("y");if(b.hasValue()&&!E.hasValue()&&(S=P),E.hasValue()&&!b.hasValue()&&(P=S),P=Math.min(P,d/2),S=Math.min(S,x/2),h){var w=(Math.sqrt(2)-1)/3*4;h.beginPath(),x>0&&d>0&&(h.moveTo(f+P,g),h.lineTo(f+d-P,g),h.bezierCurveTo(f+d-P+w*P,g,f+d,g+S-w*S,f+d,g+S),h.lineTo(f+d,g+x-S),h.bezierCurveTo(f+d,g+x-S+w*S,f+d-P+w*P,g+x,f+d-P,g+x),h.lineTo(f+P,g+x),h.bezierCurveTo(f+P-w*P,g+x,f,g+x-S+w*S,f,g+x-S),h.lineTo(f,g+S),h.bezierCurveTo(f,g+S-w*S,f+P-w*P,g,f+P,g),h.closePath())}return new BoundingBox(f,g,f+d,g+x)}getMarkers(){return null}}class CircleElement extends PathElement{constructor(){super(...arguments),this.type="circle"}path(h){var f=this.getAttribute("cx").getPixels("x"),g=this.getAttribute("cy").getPixels("y"),d=this.getAttribute("r").getPixels();return h&&d>0&&(h.beginPath(),h.arc(f,g,d,0,2*Math.PI,!1),h.closePath()),new BoundingBox(f-d,g-d,f+d,g+d)}getMarkers(){return null}}class EllipseElement extends PathElement{constructor(){super(...arguments),this.type="ellipse"}path(h){var f=(Math.sqrt(2)-1)/3*4,g=this.getAttribute("rx").getPixels("x"),d=this.getAttribute("ry").getPixels("y"),x=this.getAttribute("cx").getPixels("x"),b=this.getAttribute("cy").getPixels("y");return h&&g>0&&d>0&&(h.beginPath(),h.moveTo(x+g,b),h.bezierCurveTo(x+g,b+f*d,x+f*g,b+d,x,b+d),h.bezierCurveTo(x-f*g,b+d,x-g,b+f*d,x-g,b),h.bezierCurveTo(x-g,b-f*d,x-f*g,b-d,x,b-d),h.bezierCurveTo(x+f*g,b-d,x+g,b-f*d,x+g,b),h.closePath()),new BoundingBox(x-g,b-d,x+g,b+d)}getMarkers(){return null}}class LineElement extends PathElement{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Point(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Point(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(h){var[{x:f,y:g},{x:d,y:x}]=this.getPoints();return h&&(h.beginPath(),h.moveTo(f,g),h.lineTo(d,x)),new BoundingBox(f,g,d,x)}getMarkers(){var[h,f]=this.getPoints(),g=h.angleTo(f);return[[h,g],[f,g]]}}class PolylineElement extends PathElement{constructor(h,f,g){super(h,f,g),this.type="polyline",this.points=[],this.points=Point.parsePath(this.getAttribute("points").getString())}path(h){var{points:f}=this,[{x:g,y:d}]=f,x=new BoundingBox(g,d);return h&&(h.beginPath(),h.moveTo(g,d)),f.forEach((f=>{var{x:g,y:d}=f;x.addPoint(g,d),h&&h.lineTo(g,d)})),x}getMarkers(){var{points:h}=this,f=h.length-1,g=[];return h.forEach(((d,x)=>{x!==f&&g.push([d,d.angleTo(h[x+1])])})),g.length>0&&g.push([h[h.length-1],g[g.length-1][1]]),g}}class PolygonElement extends PolylineElement{constructor(){super(...arguments),this.type="polygon"}path(h){var f=super.path(h),[{x:g,y:d}]=this.points;return h&&(h.lineTo(g,d),h.closePath()),f}}class PatternElement extends Element{constructor(){super(...arguments),this.type="pattern"}createPattern(h,f,g){var d=this.getStyle("width").getPixels("x",!0),x=this.getStyle("height").getPixels("y",!0),b=new SVGElement(this.document,null);b.attributes.viewBox=new Property(this.document,"viewBox",this.getAttribute("viewBox").getValue()),b.attributes.width=new Property(this.document,"width","".concat(d,"px")),b.attributes.height=new Property(this.document,"height","".concat(x,"px")),b.attributes.transform=new Property(this.document,"transform",this.getAttribute("patternTransform").getValue()),b.children=this.children;var E=this.document.createCanvas(d,x),P=E.getContext("2d"),S=this.getAttribute("x"),w=this.getAttribute("y");S.hasValue()&&w.hasValue()&&P.translate(S.getPixels("x",!0),w.getPixels("y",!0)),g.hasValue()?this.styles["fill-opacity"]=g:Reflect.deleteProperty(this.styles,"fill-opacity");for(var C=-1;C<=1;C++)for(var A=-1;A<=1;A++)P.save(),b.attributes.x=new Property(this.document,"x",C*E.width),b.attributes.y=new Property(this.document,"y",A*E.height),b.render(P),P.restore();return h.createPattern(E,"repeat")}}class MarkerElement extends Element{constructor(){super(...arguments),this.type="marker"}render(h,f,g){if(f){var{x:d,y:x}=f,b=this.getAttribute("orient").getString("auto"),E=this.getAttribute("markerUnits").getString("strokeWidth");h.translate(d,x),"auto"===b&&h.rotate(g),"strokeWidth"===E&&h.scale(h.lineWidth,h.lineWidth),h.save();var P=new SVGElement(this.document,null);P.type=this.type,P.attributes.viewBox=new Property(this.document,"viewBox",this.getAttribute("viewBox").getValue()),P.attributes.refX=new Property(this.document,"refX",this.getAttribute("refX").getValue()),P.attributes.refY=new Property(this.document,"refY",this.getAttribute("refY").getValue()),P.attributes.width=new Property(this.document,"width",this.getAttribute("markerWidth").getValue()),P.attributes.height=new Property(this.document,"height",this.getAttribute("markerHeight").getValue()),P.attributes.overflow=new Property(this.document,"overflow",this.getAttribute("overflow").getValue()),P.attributes.fill=new Property(this.document,"fill",this.getAttribute("fill").getColor("black")),P.attributes.stroke=new Property(this.document,"stroke",this.getAttribute("stroke").getValue("none")),P.children=this.children,P.render(h),h.restore(),"strokeWidth"===E&&h.scale(1/h.lineWidth,1/h.lineWidth),"auto"===b&&h.rotate(-g),h.translate(-d,-x)}}}class DefsElement extends Element{constructor(){super(...arguments),this.type="defs"}render(){}}class GElement extends RenderedElement{constructor(){super(...arguments),this.type="g"}getBoundingBox(h){var f=new BoundingBox;return this.children.forEach((g=>{f.addBoundingBox(g.getBoundingBox(h))})),f}}class GradientElement extends Element{constructor(h,f,g){super(h,f,g),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:d,children:x}=this;x.forEach((h=>{"stop"===h.type&&d.push(h)}))}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(h,f,g){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var{stops:x}=d,b=this.getGradient(h,f);if(!b)return this.addParentOpacity(g,x[x.length-1].color);if(x.forEach((h=>{b.addColorStop(h.offset,this.addParentOpacity(g,h.color))})),this.getAttribute("gradientTransform").hasValue()){var{document:E}=this,{MAX_VIRTUAL_PIXELS:P,viewPort:S}=E.screen,[w]=S.viewPorts,C=new RectElement(E,null);C.attributes.x=new Property(E,"x",-P/3),C.attributes.y=new Property(E,"y",-P/3),C.attributes.width=new Property(E,"width",P),C.attributes.height=new Property(E,"height",P);var A=new GElement(E,null);A.attributes.transform=new Property(E,"transform",this.getAttribute("gradientTransform").getValue()),A.children=[C];var M=new SVGElement(E,null);M.attributes.x=new Property(E,"x",0),M.attributes.y=new Property(E,"y",0),M.attributes.width=new Property(E,"width",w.width),M.attributes.height=new Property(E,"height",w.height),M.children=[A];var _=E.createCanvas(w.width,w.height),N=_.getContext("2d");return N.fillStyle=b,M.render(N),N.createPattern(_,"no-repeat")}return b}inheritStopContainer(h){this.attributesToInherit.forEach((f=>{!this.getAttribute(f).hasValue()&&h.getAttribute(f).hasValue()&&this.getAttribute(f,!0).setValue(h.getAttribute(f).getValue())}))}addParentOpacity(h,f){return h.hasValue()?new Property(this.document,"color",f).addOpacity(h).getColor():f}}class LinearGradientElement extends GradientElement{constructor(h,f,g){super(h,f,g),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(h,f){var g="objectBoundingBox"===this.getGradientUnits(),d=g?f.getBoundingBox(h):null;if(g&&!d)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 x=g?d.x+d.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),b=g?d.y+d.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),E=g?d.x+d.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),P=g?d.y+d.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return x===E&&b===P?null:h.createLinearGradient(x,b,E,P)}}class RadialGradientElement extends GradientElement{constructor(h,f,g){super(h,f,g),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(h,f){var g="objectBoundingBox"===this.getGradientUnits(),d=f.getBoundingBox(h);if(g&&!d)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 x=g?d.x+d.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),b=g?d.y+d.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),E=x,P=b;this.getAttribute("fx").hasValue()&&(E=g?d.x+d.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(P=g?d.y+d.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var S=g?(d.width+d.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),w=this.getAttribute("fr").getPixels();return h.createRadialGradient(E,P,w,x,b,S)}}class StopElement extends Element{constructor(h,f,g){super(h,f,g),this.type="stop";var d=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),x=this.getStyle("stop-opacity"),b=this.getStyle("stop-color",!0);""===b.getString()&&b.setValue("#000"),x.hasValue()&&(b=b.addOpacity(x)),this.offset=d,this.color=b.getColor()}}class AnimateElement extends Element{constructor(h,f,g){super(h,f,g),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,h.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new Property(h,"values",null);var d=this.getAttribute("values");d.hasValue()&&this.values.setValue(d.getString().split(";"))}getProperty(){var h=this.getAttribute("attributeType").getString(),f=this.getAttribute("attributeName").getString();return"CSS"===h?this.parent.getStyle(f,!0):this.parent.getAttribute(f,!0)}calcValue(){var{initialUnits:h}=this,{progress:f,from:g,to:d}=this.getProgress(),x=g.getNumber()+(d.getNumber()-g.getNumber())*f;return"%"===h&&(x*=100),"".concat(x).concat(h)}update(h){var{parent:f}=this,g=this.getProperty();if(this.initialValue||(this.initialValue=g.getString(),this.initialUnits=g.getUnits()),this.duration>this.maxDuration){var d=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==d||this.frozen){if("remove"===d&&!this.removed)return this.removed=!0,g.setValue(f.animationFrozen?f.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,f.animationFrozen=!0,f.animationFrozenValue=g.getString();return!1}this.duration+=h;var x=!1;if(this.begin<this.duration){var b=this.calcValue(),E=this.getAttribute("type");if(E.hasValue()){var P=E.getString();b="".concat(P,"(").concat(b,")")}g.setValue(b),x=!0}return x}getProgress(){var{document:h,values:f}=this,g={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(f.hasValue()){var d=g.progress*(f.getValue().length-1),x=Math.floor(d),b=Math.ceil(d);g.from=new Property(h,"from",parseFloat(f.getValue()[x])),g.to=new Property(h,"to",parseFloat(f.getValue()[b])),g.progress=(d-x)/(b-x)}else g.from=this.from,g.to=this.to;return g}}class AnimateColorElement extends AnimateElement{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:h,from:f,to:g}=this.getProgress(),d=new b(f.getColor()),x=new b(g.getColor());if(d.ok&&x.ok){var E=d.r+(x.r-d.r)*h,P=d.g+(x.g-d.g)*h,S=d.b+(x.b-d.b)*h;return"rgb(".concat(Math.floor(E),", ").concat(Math.floor(P),", ").concat(Math.floor(S),")")}return this.getAttribute("from").getColor()}}class AnimateTransformElement extends AnimateElement{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:h,from:f,to:g}=this.getProgress(),d=toNumbers(f.getString()),x=toNumbers(g.getString()),b=d.map(((f,g)=>f+(x[g]-f)*h)).join(" ");return b}}class FontElement extends Element{constructor(h,f,g){super(h,f,g),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:d}=h,{children:x}=this;for(var b of x)switch(b.type){case"font-face":this.fontFace=b;var E=b.getStyle("font-family");E.hasValue()&&(d[E.getString()]=this);break;case"missing-glyph":this.missingGlyph=b;break;case"glyph":var P=b;P.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[P.unicode]&&(this.glyphs[P.unicode]={}),this.glyphs[P.unicode][P.arabicForm]=P):this.glyphs[P.unicode]=P}}render(){}}class FontFaceElement extends Element{constructor(h,f,g){super(h,f,g),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class MissingGlyphElement extends PathElement{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class TRefElement extends TextElement{constructor(){super(...arguments),this.type="tref"}getText(){var h=this.getHrefAttribute().getDefinition();if(h){var f=h.children[0];if(f)return f.getText()}return""}}class AElement extends TextElement{constructor(h,f,g){super(h,f,g),this.type="a";var{childNodes:d}=f,x=d[0],b=d.length>0&&Array.from(d).every((h=>3===h.nodeType));this.hasText=b,this.text=b?this.getTextFromNode(x):""}getText(){return this.text}renderChildren(h){if(this.hasText){super.renderChildren(h);var{document:f,x:g,y:d}=this,{mouse:x}=f.screen,b=new Property(f,"fontSize",Font.parse(f.ctx.font).fontSize);x.isWorking()&&x.checkBoundingBox(this,new BoundingBox(g,d-b.getPixels("y"),g+this.measureText(h),d))}else if(this.children.length>0){var E=new GElement(this.document,null);E.children=this.children,E.parent=this,E.render(h)}}onClick(){var{window:h}=this.document;h&&h.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}}function ownKeys$2(h,f){var g=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);f&&(d=d.filter((function(f){return Object.getOwnPropertyDescriptor(h,f).enumerable}))),g.push.apply(g,d)}return g}function _objectSpread$2(h){for(var f=1;f<arguments.length;f++){var g=null!=arguments[f]?arguments[f]:{};f%2?ownKeys$2(Object(g),!0).forEach((function(f){(0,d.Z)(h,f,g[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(g)):ownKeys$2(Object(g)).forEach((function(f){Object.defineProperty(h,f,Object.getOwnPropertyDescriptor(g,f))}))}return h}class TextPathElement extends TextElement{constructor(h,f,g){super(h,f,g),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var d=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(d)}getText(){return this.text}path(h){var{dataArray:f}=this;h&&h.beginPath(),f.forEach((f=>{var{type:g,points:d}=f;switch(g){case PathParser.LINE_TO:h&&h.lineTo(d[0],d[1]);break;case PathParser.MOVE_TO:h&&h.moveTo(d[0],d[1]);break;case PathParser.CURVE_TO:h&&h.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]);break;case PathParser.QUAD_TO:h&&h.quadraticCurveTo(d[0],d[1],d[2],d[3]);break;case PathParser.ARC:var[x,b,E,P,S,w,C,A]=d,M=E>P?E:P,_=E>P?1:E/P,N=E>P?P/E:1;h&&(h.translate(x,b),h.rotate(C),h.scale(_,N),h.arc(0,0,M,S,S+w,Boolean(1-A)),h.scale(1/_,1/N),h.rotate(-C),h.translate(-x,-b));break;case PathParser.CLOSE_PATH:h&&h.closePath()}}))}renderChildren(h){this.setTextData(h),h.save();var f=this.parent.getStyle("text-decoration").getString(),g=this.getFontSize(),{glyphInfo:d}=this,x=h.fillStyle;"underline"===f&&h.beginPath(),d.forEach(((d,x)=>{var{p0:b,p1:E,rotation:P,text:S}=d;h.save(),h.translate(b.x,b.y),h.rotate(P),h.fillStyle&&h.fillText(S,0,0),h.strokeStyle&&h.strokeText(S,0,0),h.restore(),"underline"===f&&(0===x&&h.moveTo(b.x,b.y+g/8),h.lineTo(E.x,E.y+g/5))})),"underline"===f&&(h.lineWidth=g/20,h.strokeStyle=x,h.stroke(),h.closePath()),h.restore()}getLetterSpacingAt(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[h]||0}findSegmentToFitChar(h,f,g,d,x,b,E,P,S){var w=b,C=this.measureText(h,P);" "===P&&"justify"===f&&g<d&&(C+=(d-g)/x),S>-1&&(w+=this.getLetterSpacingAt(S));var A=this.textHeight/20,M=this.getEquidistantPointOnPath(w,A,0),_=this.getEquidistantPointOnPath(w+C,A,0),N={p0:M,p1:_},R=M&&_?Math.atan2(_.y-M.y,_.x-M.x):0;if(E){var V=Math.cos(Math.PI/2+R)*E,k=Math.cos(-R)*E;N.p0=_objectSpread$2(_objectSpread$2({},M),{},{x:M.x+V,y:M.y+k}),N.p1=_objectSpread$2(_objectSpread$2({},_),{},{x:_.x+V,y:_.y+k})}return{offset:w+=C,segment:N,rotation:R}}measureText(h,f){var{measuresCache:g}=this,d=f||this.getText();if(g.has(d))return g.get(d);var x=this.measureTargetText(h,d);return g.set(d,x),x}setTextData(h){if(!this.glyphInfo){var f=this.getText(),g=f.split(""),d=f.split(" ").length-1,x=this.parent.getAttribute("dx").split().map((h=>h.getPixels("x"))),b=this.parent.getAttribute("dy").getPixels("y"),E=this.parent.getStyle("text-anchor").getString("start"),P=this.getStyle("letter-spacing"),S=this.parent.getStyle("letter-spacing"),w=0;P.hasValue()&&"inherit"!==P.getValue()?P.hasValue()&&"initial"!==P.getValue()&&"unset"!==P.getValue()&&(w=P.getPixels()):w=S.getPixels();var C=[],A=f.length;this.letterSpacingCache=C;for(var M=0;M<A;M++)C.push(void 0!==x[M]?x[M]:w);var _=C.reduce(((h,f,g)=>0===g?0:h+f||0),0),N=this.measureText(h),R=Math.max(N+_,0);this.textWidth=N,this.textHeight=this.getFontSize(),this.glyphInfo=[];var V=this.getPathLength(),k=this.getStyle("startOffset").getNumber(0)*V,L=0;"middle"!==E&&"center"!==E||(L=-R/2),"end"!==E&&"right"!==E||(L=-R),L+=k,g.forEach(((f,x)=>{var{offset:P,segment:S,rotation:w}=this.findSegmentToFitChar(h,E,R,V,d,L,b,f,x);L=P,S.p0&&S.p1&&this.glyphInfo.push({text:g[x],p0:S.p0,p1:S.p1,rotation:w})}))}}parsePathData(h){if(this.pathLength=-1,!h)return[];var f=[],{pathParser:g}=h;for(g.reset();!g.isEnd();){var{current:d}=g,x=d?d.x:0,b=d?d.y:0,E=g.next(),P=E.type,S=[];switch(E.type){case PathParser.MOVE_TO:this.pathM(g,S);break;case PathParser.LINE_TO:P=this.pathL(g,S);break;case PathParser.HORIZ_LINE_TO:P=this.pathH(g,S);break;case PathParser.VERT_LINE_TO:P=this.pathV(g,S);break;case PathParser.CURVE_TO:this.pathC(g,S);break;case PathParser.SMOOTH_CURVE_TO:P=this.pathS(g,S);break;case PathParser.QUAD_TO:this.pathQ(g,S);break;case PathParser.SMOOTH_QUAD_TO:P=this.pathT(g,S);break;case PathParser.ARC:S=this.pathA(g);break;case PathParser.CLOSE_PATH:PathElement.pathZ(g)}E.type!==PathParser.CLOSE_PATH?f.push({type:P,points:S,start:{x,y:b},pathLength:this.calcLength(x,b,P,S)}):f.push({type:PathParser.CLOSE_PATH,points:[],pathLength:0})}return f}pathM(h,f){var{x:g,y:d}=PathElement.pathM(h).point;f.push(g,d)}pathL(h,f){var{x:g,y:d}=PathElement.pathL(h).point;return f.push(g,d),PathParser.LINE_TO}pathH(h,f){var{x:g,y:d}=PathElement.pathH(h).point;return f.push(g,d),PathParser.LINE_TO}pathV(h,f){var{x:g,y:d}=PathElement.pathV(h).point;return f.push(g,d),PathParser.LINE_TO}pathC(h,f){var{point:g,controlPoint:d,currentPoint:x}=PathElement.pathC(h);f.push(g.x,g.y,d.x,d.y,x.x,x.y)}pathS(h,f){var{point:g,controlPoint:d,currentPoint:x}=PathElement.pathS(h);return f.push(g.x,g.y,d.x,d.y,x.x,x.y),PathParser.CURVE_TO}pathQ(h,f){var{controlPoint:g,currentPoint:d}=PathElement.pathQ(h);f.push(g.x,g.y,d.x,d.y)}pathT(h,f){var{controlPoint:g,currentPoint:d}=PathElement.pathT(h);return f.push(g.x,g.y,d.x,d.y),PathParser.QUAD_TO}pathA(h){var{rX:f,rY:g,sweepFlag:d,xAxisRotation:x,centp:b,a1:E,ad:P}=PathElement.pathA(h);return 0===d&&P>0&&(P-=2*Math.PI),1===d&&P<0&&(P+=2*Math.PI),[b.x,b.y,f,g,E,P,x,d]}calcLength(h,f,g,d){var x=0,b=null,E=null,P=0;switch(g){case PathParser.LINE_TO:return this.getLineLength(h,f,d[0],d[1]);case PathParser.CURVE_TO:for(x=0,b=this.getPointOnCubicBezier(0,h,f,d[0],d[1],d[2],d[3],d[4],d[5]),P=.01;P<=1;P+=.01)E=this.getPointOnCubicBezier(P,h,f,d[0],d[1],d[2],d[3],d[4],d[5]),x+=this.getLineLength(b.x,b.y,E.x,E.y),b=E;return x;case PathParser.QUAD_TO:for(x=0,b=this.getPointOnQuadraticBezier(0,h,f,d[0],d[1],d[2],d[3]),P=.01;P<=1;P+=.01)E=this.getPointOnQuadraticBezier(P,h,f,d[0],d[1],d[2],d[3]),x+=this.getLineLength(b.x,b.y,E.x,E.y),b=E;return x;case PathParser.ARC:x=0;var S=d[4],w=d[5],C=d[4]+w,A=Math.PI/180;if(Math.abs(S-C)<A&&(A=Math.abs(S-C)),b=this.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],S,0),w<0)for(P=S-A;P>C;P-=A)E=this.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],P,0),x+=this.getLineLength(b.x,b.y,E.x,E.y),b=E;else for(P=S+A;P<C;P+=A)E=this.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],P,0),x+=this.getLineLength(b.x,b.y,E.x,E.y),b=E;return E=this.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],C,0),x+=this.getLineLength(b.x,b.y,E.x,E.y)}return 0}getPointOnLine(h,f,g,d,x){var b=arguments.length>5&&void 0!==arguments[5]?arguments[5]:f,E=arguments.length>6&&void 0!==arguments[6]?arguments[6]:g,P=(x-g)/(d-f+Q),S=Math.sqrt(h*h/(1+P*P));d<f&&(S*=-1);var w=P*S,C=null;if(d===f)C={x:b,y:E+w};else if((E-g)/(b-f+Q)===P)C={x:b+S,y:E+w};else{var A,M,_=this.getLineLength(f,g,d,x);if(_<Q)return null;var N=(b-f)*(d-f)+(E-g)*(x-g);A=f+(N/=_*_)*(d-f),M=g+N*(x-g);var R=this.getLineLength(b,E,A,M),V=Math.sqrt(h*h-R*R);S=Math.sqrt(V*V/(1+P*P)),d<f&&(S*=-1),C={x:A+S,y:M+(w=P*S)}}return C}getPointOnPath(h){var f=this.getPathLength(),g=0,d=null;if(h<-5e-5||h-5e-5>f)return null;var{dataArray:x}=this;for(var b of x){if(!b||!(b.pathLength<5e-5||g+b.pathLength+5e-5<h)){var E=h-g,P=0;switch(b.type){case PathParser.LINE_TO:d=this.getPointOnLine(E,b.start.x,b.start.y,b.points[0],b.points[1],b.start.x,b.start.y);break;case PathParser.ARC:var S=b.points[4],w=b.points[5],C=b.points[4]+w;if(P=S+E/b.pathLength*w,w<0&&P<C||w>=0&&P>C)break;d=this.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],P,b.points[6]);break;case PathParser.CURVE_TO:(P=E/b.pathLength)>1&&(P=1),d=this.getPointOnCubicBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);break;case PathParser.QUAD_TO:(P=E/b.pathLength)>1&&(P=1),d=this.getPointOnQuadraticBezier(P,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3])}if(d)return d;break}g+=b.pathLength}return null}getLineLength(h,f,g,d){return Math.sqrt((g-h)*(g-h)+(d-f)*(d-f))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(((h,f)=>f.pathLength>0?h+f.pathLength:h),0)),this.pathLength}getPointOnCubicBezier(h,f,g,d,x,b,E,P,S){return{x:P*CB1(h)+b*CB2(h)+d*CB3(h)+f*CB4(h),y:S*CB1(h)+E*CB2(h)+x*CB3(h)+g*CB4(h)}}getPointOnQuadraticBezier(h,f,g,d,x,b,E){return{x:b*QB1(h)+d*QB2(h)+f*QB3(h),y:E*QB1(h)+x*QB2(h)+g*QB3(h)}}getPointOnEllipticalArc(h,f,g,d,x,b){var E=Math.cos(b),P=Math.sin(b),S=g*Math.cos(x),w=d*Math.sin(x);return{x:h+(S*E-w*P),y:f+(S*P+w*E)}}buildEquidistantCache(h,f){var g=this.getPathLength(),d=f||.25,x=h||g/100;if(!this.equidistantCache||this.equidistantCache.step!==x||this.equidistantCache.precision!==d){this.equidistantCache={step:x,precision:d,points:[]};for(var b=0,E=0;E<=g;E+=d){var P=this.getPointOnPath(E),S=this.getPointOnPath(E+d);P&&S&&((b+=this.getLineLength(P.x,P.y,S.x,S.y))>=x&&(this.equidistantCache.points.push({x:P.x,y:P.y,distance:E}),b-=x))}}}getEquidistantPointOnPath(h,f,g){if(this.buildEquidistantCache(f,g),h<0||h-this.getPathLength()>5e-5)return null;var d=Math.round(h/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[d]||null}}var K=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class ImageElement extends RenderedElement{constructor(h,f,g){super(h,f,g),this.type="image",this.loaded=!1;var d=this.getHrefAttribute().getString();if(d){var x=d.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(d);h.images.push(this),x?this.loadSvg(d):this.loadImage(d),this.isSvg=x}}loadImage(h){var f=this;return _asyncToGenerator((function*(){try{var g=yield f.document.createImage(h);f.image=g}catch(f){console.error('Error while loading image "'.concat(h,'":'),f)}f.loaded=!0}))()}loadSvg(h){var f=this;return _asyncToGenerator((function*(){var g=K.exec(h);if(g){var d=g[5];"base64"===g[4]?f.image=atob(d):f.image=decodeURIComponent(d)}else try{var x=yield f.document.fetch(h),b=yield x.text();f.image=b}catch(f){console.error('Error while loading image "'.concat(h,'":'),f)}f.loaded=!0}))()}renderChildren(h){var{document:f,image:g,loaded:d}=this,x=this.getAttribute("x").getPixels("x"),b=this.getAttribute("y").getPixels("y"),E=this.getStyle("width").getPixels("x"),P=this.getStyle("height").getPixels("y");if(d&&g&&E&&P){if(h.save(),h.translate(x,b),this.isSvg){var S=f.canvg.forkString(h,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:E,scaleHeight:P});S.document.documentElement.parent=this,S.render()}else{var w=this.image;f.setViewBox({ctx:h,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:E,desiredWidth:w.width,height:P,desiredHeight:w.height}),this.loaded&&(void 0===w.complete||w.complete)&&h.drawImage(w,0,0)}h.restore()}}getBoundingBox(){var h=this.getAttribute("x").getPixels("x"),f=this.getAttribute("y").getPixels("y"),g=this.getStyle("width").getPixels("x"),d=this.getStyle("height").getPixels("y");return new BoundingBox(h,f,h+g,f+d)}}class SymbolElement extends RenderedElement{constructor(){super(...arguments),this.type="symbol"}render(h){}}class SVGFontLoader{constructor(h){this.document=h,this.loaded=!1,h.fonts.push(this)}load(h,f){var g=this;return _asyncToGenerator((function*(){try{var{document:d}=g,x=(yield d.canvg.parser.load(f)).getElementsByTagName("font");Array.from(x).forEach((f=>{var g=d.createElement(f);d.definitions[h]=g}))}catch(h){console.error('Error while loading font "'.concat(f,'":'),h)}g.loaded=!0}))()}}class StyleElement extends Element{constructor(h,f,g){super(h,f,g),this.type="style";var d=compressSpaces(Array.from(f.childNodes).map((h=>h.textContent)).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,""));d.split("}").forEach((f=>{var g=f.trim();if(g){var d=g.split("{"),x=d[0].split(","),b=d[1].split(";");x.forEach((f=>{var g=f.trim();if(g){var d=h.styles[g]||{};if(b.forEach((f=>{var g=f.indexOf(":"),x=f.substr(0,g).trim(),b=f.substr(g+1,f.length-g).trim();x&&b&&(d[x]=new Property(h,x,b))})),h.styles[g]=d,h.stylesSpecificity[g]=getSelectorSpecificity(g),"@font-face"===g){var x=d["font-family"].getString().replace(/"|'/g,"");d.src.getString().split(",").forEach((f=>{if(f.indexOf('format("svg")')>0){var g=parseExternalUrl(f);g&&new SVGFontLoader(h).load(x,g)}}))}}}))}}))}}StyleElement.parseExternalUrl=parseExternalUrl;class UseElement extends RenderedElement{constructor(){super(...arguments),this.type="use"}setContext(h){super.setContext(h);var f=this.getAttribute("x"),g=this.getAttribute("y");f.hasValue()&&h.translate(f.getPixels("x"),0),g.hasValue()&&h.translate(0,g.getPixels("y"))}path(h){var{element:f}=this;f&&f.path(h)}renderChildren(h){var{document:f,element:g}=this;if(g){var d=g;if("symbol"===g.type&&((d=new SVGElement(f,null)).attributes.viewBox=new Property(f,"viewBox",g.getAttribute("viewBox").getString()),d.attributes.preserveAspectRatio=new Property(f,"preserveAspectRatio",g.getAttribute("preserveAspectRatio").getString()),d.attributes.overflow=new Property(f,"overflow",g.getAttribute("overflow").getString()),d.children=g.children,g.styles.opacity=new Property(f,"opacity",this.calculateOpacity())),"svg"===d.type){var x=this.getStyle("width",!1,!0),b=this.getStyle("height",!1,!0);x.hasValue()&&(d.attributes.width=new Property(f,"width",x.getString())),b.hasValue()&&(d.attributes.height=new Property(f,"height",b.getString()))}var E=d.parent;d.parent=this,d.render(h),d.parent=E}}getBoundingBox(h){var{element:f}=this;return f?f.getBoundingBox(h):null}elementTransform(){var{document:h,element:f}=this;return Transform.fromElement(h,f)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function imGet(h,f,g,d,x,b){return h[g*d*4+4*f+b]}function imSet(h,f,g,d,x,b,E){h[g*d*4+4*f+b]=E}function index_es_m(h,f,g){return h[f]*g}function index_es_c(h,f,g,d){return f+Math.cos(h)*g+Math.sin(h)*d}class FeColorMatrixElement extends Element{constructor(h,f,g){super(h,f,g),this.type="feColorMatrix";var d=toNumbers(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":var x=d[0];d=[.213+.787*x,.715-.715*x,.072-.072*x,0,0,.213-.213*x,.715+.285*x,.072-.072*x,0,0,.213-.213*x,.715-.715*x,.072+.928*x,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var b=d[0]*Math.PI/180;d=[index_es_c(b,.213,.787,-.213),index_es_c(b,.715,-.715,-.715),index_es_c(b,.072,-.072,.928),0,0,index_es_c(b,.213,-.213,.143),index_es_c(b,.715,.285,.14),index_es_c(b,.072,-.072,-.283),0,0,index_es_c(b,.213,-.213,-.787),index_es_c(b,.715,-.715,.715),index_es_c(b,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":d=[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]}this.matrix=d,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(h,f,g,d,x){for(var{includeOpacity:b,matrix:E}=this,P=h.getImageData(0,0,d,x),S=0;S<x;S++)for(var w=0;w<d;w++){var C=imGet(P.data,w,S,d,0,0),A=imGet(P.data,w,S,d,0,1),M=imGet(P.data,w,S,d,0,2),_=imGet(P.data,w,S,d,0,3),N=index_es_m(E,0,C)+index_es_m(E,1,A)+index_es_m(E,2,M)+index_es_m(E,3,_)+index_es_m(E,4,1),R=index_es_m(E,5,C)+index_es_m(E,6,A)+index_es_m(E,7,M)+index_es_m(E,8,_)+index_es_m(E,9,1),V=index_es_m(E,10,C)+index_es_m(E,11,A)+index_es_m(E,12,M)+index_es_m(E,13,_)+index_es_m(E,14,1),k=index_es_m(E,15,C)+index_es_m(E,16,A)+index_es_m(E,17,M)+index_es_m(E,18,_)+index_es_m(E,19,1);b&&(N=0,R=0,V=0,k*=_/255),imSet(P.data,w,S,d,0,0,N),imSet(P.data,w,S,d,0,1,R),imSet(P.data,w,S,d,0,2,V),imSet(P.data,w,S,d,0,3,k)}h.clearRect(0,0,d,x),h.putImageData(P,0,0)}}class MaskElement extends Element{constructor(){super(...arguments),this.type="mask"}apply(h,f){var{document:g}=this,d=this.getAttribute("x").getPixels("x"),x=this.getAttribute("y").getPixels("y"),b=this.getStyle("width").getPixels("x"),E=this.getStyle("height").getPixels("y");if(!b&&!E){var P=new BoundingBox;this.children.forEach((f=>{P.addBoundingBox(f.getBoundingBox(h))})),d=Math.floor(P.x1),x=Math.floor(P.y1),b=Math.floor(P.width),E=Math.floor(P.height)}var S=this.removeStyles(f,MaskElement.ignoreStyles),w=g.createCanvas(d+b,x+E),C=w.getContext("2d");g.screen.setDefaults(C),this.renderChildren(C),new FeColorMatrixElement(g,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(C,0,0,d+b,x+E);var A=g.createCanvas(d+b,x+E),M=A.getContext("2d");g.screen.setDefaults(M),f.render(M),M.globalCompositeOperation="destination-in",M.fillStyle=C.createPattern(w,"no-repeat"),M.fillRect(0,0,d+b,x+E),h.fillStyle=M.createPattern(A,"no-repeat"),h.fillRect(0,0,d+b,x+E),this.restoreStyles(f,S)}render(h){}}MaskElement.ignoreStyles=["mask","transform","clip-path"];var noop=()=>{};class ClipPathElement extends Element{constructor(){super(...arguments),this.type="clipPath"}apply(h){var{document:f}=this,g=Reflect.getPrototypeOf(h),{beginPath:d,closePath:x}=h;g&&(g.beginPath=noop,g.closePath=noop),Reflect.apply(d,h,[]),this.children.forEach((d=>{if(void 0!==d.path){var b=void 0!==d.elementTransform?d.elementTransform():null;b||(b=Transform.fromElement(f,d)),b&&b.apply(h),d.path(h),g&&(g.closePath=x),b&&b.unapply(h)}})),Reflect.apply(x,h,[]),h.clip(),g&&(g.beginPath=d,g.closePath=x)}render(h){}}class FilterElement extends Element{constructor(){super(...arguments),this.type="filter"}apply(h,f){var{document:g,children:d}=this,x=f.getBoundingBox(h);if(x){var b=0,E=0;d.forEach((h=>{var f=h.extraFilterDistance||0;b=Math.max(b,f),E=Math.max(E,f)}));var P=Math.floor(x.width),S=Math.floor(x.height),w=P+2*b,C=S+2*E;if(!(w<1||C<1)){var A=Math.floor(x.x),M=Math.floor(x.y),_=this.removeStyles(f,FilterElement.ignoreStyles),N=g.createCanvas(w,C),R=N.getContext("2d");g.screen.setDefaults(R),R.translate(-A+b,-M+E),f.render(R),d.forEach((h=>{"function"==typeof h.apply&&h.apply(R,0,0,w,C)})),h.drawImage(N,0,0,w,C,A-b,M-E,w,C),this.restoreStyles(f,_)}}}render(h){}}FilterElement.ignoreStyles=["filter","transform","clip-path"];class FeDropShadowElement extends Element{constructor(h,f,g){super(h,f,g),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(h,f,g,d,x){}}class FeMorphologyElement extends Element{constructor(){super(...arguments),this.type="feMorphology"}apply(h,f,g,d,x){}}class FeCompositeElement extends Element{constructor(){super(...arguments),this.type="feComposite"}apply(h,f,g,d,x){}}class FeGaussianBlurElement extends Element{constructor(h,f,g){super(h,f,g),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(h,f,g,d,x){var{document:b,blurRadius:E}=this,P=b.window?b.window.document.body:null,S=h.canvas;S.id=b.getUniqueId(),P&&(S.style.display="none",P.appendChild(S)),processCanvasRGBA(S,f,g,d,x,E),P&&P.removeChild(S)}}class TitleElement extends Element{constructor(){super(...arguments),this.type="title"}}class DescElement extends Element{constructor(){super(...arguments),this.type="desc"}}var J={svg:SVGElement,rect:RectElement,circle:CircleElement,ellipse:EllipseElement,line:LineElement,polyline:PolylineElement,polygon:PolygonElement,path:PathElement,pattern:PatternElement,marker:MarkerElement,defs:DefsElement,linearGradient:LinearGradientElement,radialGradient:RadialGradientElement,stop:StopElement,animate:AnimateElement,animateColor:AnimateColorElement,animateTransform:AnimateTransformElement,font:FontElement,"font-face":FontFaceElement,"missing-glyph":MissingGlyphElement,glyph:GlyphElement,text:TextElement,tspan:TSpanElement,tref:TRefElement,a:AElement,textPath:TextPathElement,image:ImageElement,g:GElement,symbol:SymbolElement,style:StyleElement,use:UseElement,mask:MaskElement,clipPath:ClipPathElement,filter:FilterElement,feDropShadow:FeDropShadowElement,feMorphology:FeMorphologyElement,feComposite:FeCompositeElement,feColorMatrix:FeColorMatrixElement,feGaussianBlur:FeGaussianBlurElement,title:TitleElement,desc:DescElement};function ownKeys$1(h,f){var g=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);f&&(d=d.filter((function(f){return Object.getOwnPropertyDescriptor(h,f).enumerable}))),g.push.apply(g,d)}return g}function _createImage(){return _createImage=_asyncToGenerator((function*(h){var f=arguments.length>1&&void 0!==arguments[1]&&arguments[1],g=document.createElement("img");return f&&(g.crossOrigin="Anonymous"),new Promise(((f,d)=>{g.onload=()=>{f(g)},g.onerror=(h,f,g,x,b)=>{d(b)},g.src=h}))})),_createImage.apply(this,arguments)}class Document{constructor(h){var{rootEmSize:f=12,emSize:g=12,createCanvas:d=Document.createCanvas,createImage:x=Document.createImage,anonymousCrossOrigin:b}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.canvg=h,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=h.screen,this.rootEmSize=f,this.emSize=g,this.createCanvas=d,this.createImage=this.bindCreateImage(x,b),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(h,f){return"boolean"==typeof f?(g,d)=>h(g,"boolean"==typeof d?d:f):h}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:h}=this;return h[h.length-1]}set emSize(h){var{emSizeStack:f}=this;f.push(h)}popEmSize(){var{emSizeStack:h}=this;h.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every((h=>h.loaded))}isFontsLoaded(){return this.fonts.every((h=>h.loaded))}createDocumentElement(h){var f=this.createElement(h.documentElement);return f.root=!0,f.addStylesFromStyleDefinition(),this.documentElement=f,f}createElement(h){var f=h.nodeName.replace(/^[^:]+:/,""),g=Document.elementTypes[f];return void 0!==g?new g(this,h):new UnknownElement(this,h)}createTextNode(h){return new TextNode(this,h)}setViewBox(h){this.screen.setViewBox(function _objectSpread$1(h){for(var f=1;f<arguments.length;f++){var g=null!=arguments[f]?arguments[f]:{};f%2?ownKeys$1(Object(g),!0).forEach((function(f){(0,d.Z)(h,f,g[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(g)):ownKeys$1(Object(g)).forEach((function(f){Object.defineProperty(h,f,Object.getOwnPropertyDescriptor(g,f))}))}return h}({document:this},h))}}function ownKeys(h,f){var g=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);f&&(d=d.filter((function(f){return Object.getOwnPropertyDescriptor(h,f).enumerable}))),g.push.apply(g,d)}return g}function _objectSpread(h){for(var f=1;f<arguments.length;f++){var g=null!=arguments[f]?arguments[f]:{};f%2?ownKeys(Object(g),!0).forEach((function(f){(0,d.Z)(h,f,g[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(g)):ownKeys(Object(g)).forEach((function(f){Object.defineProperty(h,f,Object.getOwnPropertyDescriptor(g,f))}))}return h}Document.createCanvas=function createCanvas(h,f){var g=document.createElement("canvas");return g.width=h,g.height=f,g},Document.createImage=function createImage(h){return _createImage.apply(this,arguments)},Document.elementTypes=J;class Canvg{constructor(h,f){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.parser=new Parser(g),this.screen=new Screen(h,g),this.options=g;var d=new Document(this,g),x=d.createDocumentElement(f);this.document=d,this.documentElement=x}static from(h,f){var g=arguments;return _asyncToGenerator((function*(){var d=g.length>2&&void 0!==g[2]?g[2]:{},x=new Parser(d),b=yield x.parse(f);return new Canvg(h,b,d)}))()}static fromString(h,f){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=new Parser(g).parseFromString(f);return new Canvg(h,d,g)}fork(h,f){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.from(h,f,_objectSpread(_objectSpread({},this.options),g))}forkString(h,f){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Canvg.fromString(h,f,_objectSpread(_objectSpread({},this.options),g))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var h=arguments,f=this;return _asyncToGenerator((function*(){var g=h.length>0&&void 0!==h[0]?h[0]:{};f.start(_objectSpread({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},g)),yield f.ready(),f.stop()}))()}start(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{documentElement:f,screen:g,options:d}=this;g.start(f,_objectSpread(_objectSpread({enableRedraw:!0},d),h))}stop(){this.screen.stop()}resize(h){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,g=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(h,f,g)}}}}]);