UNPKG

@gv-sh/specgen-user

Version:

[![Version](https://img.shields.io/badge/version-0.14.1-blue.svg)](https://github.com/gv-sh/specgen-user)

1 lines 138 kB
(self.webpackChunk_gv_sh_specgen_user=self.webpackChunk_gv_sh_specgen_user||[]).push([[239],{251:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},255:t=>{"use strict";t.exports=!1},421:(t,e,r)=>{"use strict";var i=r(4796),n=r(1889),s=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(n(t),e)}},514:(t,e,r)=>{"use strict";var i=r(9745),n=r(8057),s=r(9310),a=TypeError;t.exports=function(t,e){var r,o;if("string"===e&&n(r=t.toString)&&!s(o=i(r,t)))return o;if(n(r=t.valueOf)&&!s(o=i(r,t)))return o;if("string"!==e&&n(r=t.toString)&&!s(o=i(r,t)))return o;throw new a("Can't convert object to primitive value")}},715:(t,e,r)=>{"use strict";var i=r(4959),n=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return n(t)}},889:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},979:(t,e,r)=>{"use strict";var i=r(6412).navigator,n=i&&i.userAgent;t.exports=n?String(n):""},996:t=>{"use strict";t.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}},1064:t=>{"use strict";t.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},1084:(t,e,r)=>{"use strict";var i=r(3219);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1113:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?r:e)(i)}},1146:(t,e,r)=>{"use strict";var i=r(2870),n=r(3529);t.exports=function(t,e){var r=t[e];return n(r)?void 0:i(r)}},1335:(t,e,r)=>{"use strict";var i=r(6040),n=r(7149),s=r(4136);t.exports=i?function(t,e,r){return n.f(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},1369:(t,e,r)=>{"use strict";var i=r(2923).charAt;t.exports=function(t,e,r){return e+(r?i(t,e).length:1)}},1377:(t,e,r)=>{"use strict";var i=r(251),n=r(6412).RegExp,s=i((function(){var t=n("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=s||i((function(){return!n("a","y").sticky})),o=s||i((function(){var t=n("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},1422:(t,e,r)=>{"use strict";var i=r(5125).IteratorPrototype,n=r(4876),s=r(4136),a=r(7275),o=r(8217),h=function(){return this};t.exports=function(t,e,r,u){var l=e+" Iterator";return t.prototype=n(i,{next:s(+!u,r)}),a(t,l,!1,!0),o[l]=h,t}},1463:(t,e,r)=>{"use strict";var i=r(4796),n=r(251),s=r(8057),a=r(421),o=r(6040),h=r(1706).CONFIGURABLE,u=r(2774),l=r(5897),c=l.enforce,g=l.get,p=String,f=Object.defineProperty,d=i("".slice),y=i("".replace),v=i([].join),m=o&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),x=String(String).split("String"),b=t.exports=function(t,e,r){"Symbol("===d(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||h&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),m&&r&&a(r,"arity")&&t.length!==r.arity&&f(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(n){}var i=c(t);return a(i,"source")||(i.source=v(x,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return s(this)&&g(this).source||u(this)}),"toString")},1700:(t,e,r)=>{for(var i=r(4721),n="undefined"===typeof window?r.g:window,s=["moz","webkit"],a="AnimationFrame",o=n["request"+a],h=n["cancel"+a]||n["cancelRequest"+a],u=0;!o&&u<s.length;u++)o=n[s[u]+"Request"+a],h=n[s[u]+"Cancel"+a]||n[s[u]+"CancelRequest"+a];if(!o||!h){var l=0,c=0,g=[],p=1e3/60;o=function(t){if(0===g.length){var e=i(),r=Math.max(0,p-(e-l));l=r+e,setTimeout((function(){var t=g.slice(0);g.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(r){setTimeout((function(){throw r}),0)}}),Math.round(r))}return g.push({handle:++c,callback:t,cancelled:!1}),c},h=function(t){for(var e=0;e<g.length;e++)g[e].handle===t&&(g[e].cancelled=!0)}}t.exports=function(t){return o.call(n,t)},t.exports.cancel=function(){h.apply(n,arguments)},t.exports.polyfill=function(t){t||(t=n),t.requestAnimationFrame=o,t.cancelAnimationFrame=h}},1706:(t,e,r)=>{"use strict";var i=r(6040),n=r(421),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,o=n(s,"name"),h=o&&"something"===function(){}.name,u=o&&(!i||i&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:h,CONFIGURABLE:u}},1763:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},1781:(t,e,r)=>{"use strict";var i=r(4796);t.exports=i({}.isPrototypeOf)},1830:(t,e,r)=>{"use strict";var i=r(7841),n=String,s=TypeError;t.exports=function(t){if(i(t))return t;throw new s("Can't set "+n(t)+" as a prototype")}},1889:(t,e,r)=>{"use strict";var i=r(8506),n=Object;t.exports=function(t){return n(i(t))}},2011:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2097:(t,e,r)=>{"use strict";var i=r(6643),n=r(8057),s=r(1781),a=r(1084),o=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return n(e)&&s(e.prototype,o(t))}},2231:(t,e,r)=>{"use strict";var i=r(251),n=r(6412).RegExp;t.exports=i((function(){var t=n(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},2239:(t,e,r)=>{"use strict";function i(t,e,r,i,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void r(t)}o.done?e(h):Promise.resolve(h).then(i,n)}function n(t){return function(){var e=this,r=arguments;return new Promise((function(n,s){var a=t.apply(e,r);function o(t){i(a,n,s,o,h,"next",t)}function h(t){i(a,n,s,o,h,"throw",t)}o(void 0)}))}}r.r(e),r.d(e,{AElement:()=>ue,AnimateColorElement:()=>ie,AnimateElement:()=>re,AnimateTransformElement:()=>ne,BoundingBox:()=>Rt,CB1:()=>rt,CB2:()=>it,CB3:()=>nt,CB4:()=>st,Canvg:()=>Fe,CircleElement:()=>Ut,ClipPathElement:()=>Ce,DefsElement:()=>$t,DescElement:()=>Re,Document:()=>De,Element:()=>Pt,EllipseElement:()=>Xt,FeColorMatrixElement:()=>Te,FeCompositeElement:()=>Ne,FeDropShadowElement:()=>Ee,FeGaussianBlurElement:()=>_e,FeMorphologyElement:()=>Me,FilterElement:()=>Pe,Font:()=>Vt,FontElement:()=>se,FontFaceElement:()=>ae,GElement:()=>Zt,GlyphElement:()=>Dt,GradientElement:()=>Kt,ImageElement:()=>fe,LineElement:()=>Yt,LinearGradientElement:()=>Jt,MarkerElement:()=>Qt,MaskElement:()=>Ae,Matrix:()=>wt,MissingGlyphElement:()=>oe,Mouse:()=>gt,PSEUDO_ZERO:()=>K,Parser:()=>mt,PathElement:()=>Lt,PathParser:()=>kt,PatternElement:()=>Wt,Point:()=>ct,PolygonElement:()=>Gt,PolylineElement:()=>qt,Property:()=>ut,QB1:()=>at,QB2:()=>ot,QB3:()=>ht,RadialGradientElement:()=>te,RectElement:()=>Ht,RenderedElement:()=>It,Rotate:()=>bt,SVGElement:()=>jt,SVGFontLoader:()=>ye,Scale:()=>St,Screen:()=>dt,Skew:()=>Tt,SkewX:()=>At,SkewY:()=>Ot,StopElement:()=>ee,StyleElement:()=>ve,SymbolElement:()=>de,TRefElement:()=>he,TSpanElement:()=>zt,TextElement:()=>Bt,TextPathElement:()=>ge,TitleElement:()=>Ve,Transform:()=>Ct,Translate:()=>xt,UnknownElement:()=>Et,UseElement:()=>me,ViewPort:()=>lt,compressSpaces:()=>I,default:()=>Fe,getSelectorSpecificity:()=>Z,normalizeAttributeName:()=>F,normalizeColor:()=>H,parseExternalUrl:()=>j,presets:()=>k,toNumbers:()=>B,trimLeft:()=>L,trimRight:()=>D,vectorMagnitude:()=>J,vectorsAngle:()=>et,vectorsRatio:()=>tt});r(5084),r(5885);var s=r(4980),a=r(1700),o=(r(5510),r(3113)),h=(r(7262),function(t,e){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)});function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function l(t,e){var r=t[0],i=t[1];return[r*Math.cos(e)-i*Math.sin(e),r*Math.sin(e)+i*Math.cos(e)]}function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var g=Math.PI;function p(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var i=t.rX,n=t.rY,s=t.x,a=t.y;i=Math.abs(t.rX),n=Math.abs(t.rY);var o=l([(e-s)/2,(r-a)/2],-t.xRot/180*g),h=o[0],u=o[1],c=Math.pow(h,2)/Math.pow(i,2)+Math.pow(u,2)/Math.pow(n,2);1<c&&(i*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=i,t.rY=n;var p=Math.pow(i,2)*Math.pow(u,2)+Math.pow(n,2)*Math.pow(h,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(n,2)-p)/p)),d=i*u/n*f,y=-n*h/i*f,v=l([d,y],t.xRot/180*g);t.cX=v[0]+(e+s)/2,t.cY=v[1]+(r+a)/2,t.phi1=Math.atan2((u-y)/n,(h-d)/i),t.phi2=Math.atan2((-u-y)/n,(-h-d)/i),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*g),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*g),t.phi1*=180/g,t.phi2*=180/g}function f(t,e,r){c(t,e,r);var i=t*t+e*e-r*r;if(0>i)return[];if(0===i)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(i);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var d,y=Math.PI/180;function v(t,e,r){return(1-r)*t+r*e}function m(t,e,r,i){return t+Math.cos(i/180*g)*e+Math.sin(i/180*g)*r}function x(t,e,r,i){var n=1e-6,s=e-t,a=r-e,o=3*s+3*(i-r)-6*a,h=6*(a-s),u=3*s;return Math.abs(o)<n?[-u/h]:function(t,e,r){void 0===r&&(r=1e-6);var i=t*t/4-e;if(i<-r)return[];if(i<=r)return[-t/2];var n=Math.sqrt(i);return[-t/2-n,-t/2+n]}(h/o,u/o,n)}function b(t,e,r,i,n){var s=1-n;return t*(s*s*s)+e*(3*s*s*n)+r*(3*s*n*n)+i*(n*n*n)}!function(t){function e(){return n((function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,e=NaN,r=NaN,i=NaN;return n((function(n,s,a){return n.type&C.SMOOTH_CURVE_TO&&(n.type=C.CURVE_TO,t=isNaN(t)?s:t,e=isNaN(e)?a:e,n.x1=n.relative?s-t:2*s-t,n.y1=n.relative?a-e:2*a-e),n.type&C.CURVE_TO?(t=n.relative?s+n.x2:n.x2,e=n.relative?a+n.y2:n.y2):(t=NaN,e=NaN),n.type&C.SMOOTH_QUAD_TO&&(n.type=C.QUAD_TO,r=isNaN(r)?s:r,i=isNaN(i)?a:i,n.x1=n.relative?s-r:2*s-r,n.y1=n.relative?a-i:2*a-i),n.type&C.QUAD_TO?(r=n.relative?s+n.x1:n.x1,i=n.relative?a+n.y1:n.y1):(r=NaN,i=NaN),n}))}function i(){var t=NaN,e=NaN;return n((function(r,i,n){if(r.type&C.SMOOTH_QUAD_TO&&(r.type=C.QUAD_TO,t=isNaN(t)?i:t,e=isNaN(e)?n:e,r.x1=r.relative?i-t:2*i-t,r.y1=r.relative?n-e:2*n-e),r.type&C.QUAD_TO){t=r.relative?i+r.x1:r.x1,e=r.relative?n+r.y1:r.y1;var s=r.x1,a=r.y1;r.type=C.CURVE_TO,r.x1=((r.relative?0:i)+2*s)/3,r.y1=((r.relative?0:n)+2*a)/3,r.x2=(r.x+2*s)/3,r.y2=(r.y+2*a)/3}else t=NaN,e=NaN;return r}))}function n(t){var e=0,r=0,i=NaN,n=NaN;return function(s){if(isNaN(i)&&!(s.type&C.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,e,r,i,n);return s.type&C.CLOSE_PATH&&(e=i,r=n),void 0!==s.x&&(e=s.relative?e+s.x:s.x),void 0!==s.y&&(r=s.relative?r+s.y:s.y),s.type&C.MOVE_TO&&(i=e,n=r),a}}function s(t,e,r,i,s,a){return c(t,e,r,i,s,a),n((function(n,o,h,u){var l=n.x1,c=n.x2,g=n.relative&&!isNaN(u),p=void 0!==n.x?n.x:g?0:o,f=void 0!==n.y?n.y:g?0:h;function d(t){return t*t}n.type&C.HORIZ_LINE_TO&&0!==e&&(n.type=C.LINE_TO,n.y=n.relative?0:h),n.type&C.VERT_LINE_TO&&0!==r&&(n.type=C.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+f*r+(g?0:s)),void 0!==n.y&&(n.y=p*e+n.y*i+(g?0:a)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*r+(g?0:s)),void 0!==n.y1&&(n.y1=l*e+n.y1*i+(g?0:a)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*r+(g?0:s)),void 0!==n.y2&&(n.y2=c*e+n.y2*i+(g?0:a));var y=t*i-e*r;if(void 0!==n.xRot&&(1!==t||0!==e||0!==r||1!==i))if(0===y)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=C.LINE_TO;else{var v=n.xRot*Math.PI/180,m=Math.sin(v),x=Math.cos(v),b=1/d(n.rX),S=1/d(n.rY),w=d(x)*b+d(m)*S,T=2*m*x*(b-S),A=d(m)*b+d(x)*S,O=w*i*i-T*e*i+A*e*e,P=T*(t*i+e*r)-2*(w*r*i+A*t*e),E=w*r*r-T*t*r+A*t*t,M=(Math.atan2(P,O-E)+Math.PI)%Math.PI/2,N=Math.sin(M),_=Math.cos(M);n.rX=Math.abs(y)/Math.sqrt(O*d(_)+P*N*_+E*d(N)),n.rY=Math.abs(y)/Math.sqrt(O*d(N)-P*N*_+E*d(_)),n.xRot=180*M/Math.PI}return void 0!==n.sweepFlag&&0>y&&(n.sweepFlag=+!n.sweepFlag),n}))}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),c(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return n((function(t,e,r){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),n((function(i,n,s,a,o){if(isNaN(a)&&!(i.type&C.MOVE_TO))throw new Error("path must start with moveto");return e&&i.type&C.HORIZ_LINE_TO&&(i.type=C.LINE_TO,i.y=i.relative?0:s),r&&i.type&C.VERT_LINE_TO&&(i.type=C.LINE_TO,i.x=i.relative?0:n),t&&i.type&C.CLOSE_PATH&&(i.type=C.LINE_TO,i.x=i.relative?a-n:a,i.y=i.relative?o-s:o),i.type&C.ARC&&(0===i.rX||0===i.rY)&&(i.type=C.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i}))},t.NORMALIZE_ST=r,t.QT_TO_C=i,t.INFO=n,t.SANITIZE=function(t){void 0===t&&(t=0),c(t);var e=NaN,r=NaN,i=NaN,s=NaN;return n((function(n,a,o,h,u){var l=Math.abs,c=!1,g=0,p=0;if(n.type&C.SMOOTH_CURVE_TO&&(g=isNaN(e)?0:a-e,p=isNaN(r)?0:o-r),n.type&(C.CURVE_TO|C.SMOOTH_CURVE_TO)?(e=n.relative?a+n.x2:n.x2,r=n.relative?o+n.y2:n.y2):(e=NaN,r=NaN),n.type&C.SMOOTH_QUAD_TO?(i=isNaN(i)?a:2*a-i,s=isNaN(s)?o:2*o-s):n.type&C.QUAD_TO?(i=n.relative?a+n.x1:n.x1,s=n.relative?o+n.y1:n.y2):(i=NaN,s=NaN),n.type&C.LINE_COMMANDS||n.type&C.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&C.CURVE_TO||n.type&C.SMOOTH_CURVE_TO||n.type&C.QUAD_TO||n.type&C.SMOOTH_QUAD_TO){var f=void 0===n.x?0:n.relative?n.x:n.x-a,d=void 0===n.y?0:n.relative?n.y:n.y-o;g=isNaN(i)?void 0===n.x1?g:n.relative?n.x:n.x1-a:i-a,p=isNaN(s)?void 0===n.y1?p:n.relative?n.y:n.y1-o:s-o;var y=void 0===n.x2?0:n.relative?n.x:n.x2-a,v=void 0===n.y2?0:n.relative?n.y:n.y2-o;l(f)<=t&&l(d)<=t&&l(g)<=t&&l(p)<=t&&l(y)<=t&&l(v)<=t&&(c=!0)}return n.type&C.CLOSE_PATH&&l(a-h)<=t&&l(o-u)<=t&&(c=!0),c?[]:n}))},t.MATRIX=s,t.ROTATE=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),c(t,e,r);var i=Math.sin(t),n=Math.cos(t);return s(n,i,-i,n,e-e*n+r*i,r-e*i-r*n)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),c(t,e),s(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),c(t,e),s(t,0,0,e,0,0)},t.SKEW_X=function(t){return c(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return c(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),c(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),c(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return n((function(t,e,r){return C.ARC===t.type?function(t,e,r){var i,n,s,a;t.cX||p(t,e,r);for(var o=Math.min(t.phi1,t.phi2),h=Math.max(t.phi1,t.phi2)-o,u=Math.ceil(h/90),c=new Array(u),g=e,f=r,d=0;d<u;d++){var m=v(t.phi1,t.phi2,d/u),x=v(t.phi1,t.phi2,(d+1)/u),b=x-m,S=4/3*Math.tan(b*y/4),w=[Math.cos(m*y)-S*Math.sin(m*y),Math.sin(m*y)+S*Math.cos(m*y)],T=w[0],A=w[1],O=[Math.cos(x*y),Math.sin(x*y)],P=O[0],E=O[1],M=[P+S*Math.sin(x*y),E-S*Math.cos(x*y)],N=M[0],_=M[1];c[d]={relative:t.relative,type:C.CURVE_TO};var V=function(e,r){var i=l([e*t.rX,r*t.rY],t.xRot),n=i[0],s=i[1];return[t.cX+n,t.cY+s]};i=V(T,A),c[d].x1=i[0],c[d].y1=i[1],n=V(N,_),c[d].x2=n[0],c[d].y2=n[1],s=V(P,E),c[d].x=s[0],c[d].y=s[1],t.relative&&(c[d].x1-=g,c[d].y1-=f,c[d].x2-=g,c[d].y2-=f,c[d].x-=g,c[d].y-=f),g=(a=[c[d].x,c[d].y])[0],f=a[1]}return c}(t,t.relative?0:e,t.relative?0:r):t}))},t.ANNOTATE_ARCS=function(){return n((function(t,e,r){return t.relative&&(e=0,r=0),C.ARC===t.type&&p(t,e,r),t}))},t.CLONE=function(){return function(t){var e={};for(var r in t)e[r]=t[r];return e}},t.CALCULATE_BOUNDS=function(){var t=e(),s=i(),a=r(),o=n((function(e,r,i){var n=a(s(t(function(t){var e={};for(var r in t)e[r]=t[r];return e}(e))));function h(t){t>o.maxX&&(o.maxX=t),t<o.minX&&(o.minX=t)}function u(t){t>o.maxY&&(o.maxY=t),t<o.minY&&(o.minY=t)}if(n.type&C.DRAWING_COMMANDS&&(h(r),u(i)),n.type&C.HORIZ_LINE_TO&&h(n.x),n.type&C.VERT_LINE_TO&&u(n.y),n.type&C.LINE_TO&&(h(n.x),u(n.y)),n.type&C.CURVE_TO){h(n.x),u(n.y);for(var l=0,c=x(r,n.x1,n.x2,n.x);l<c.length;l++)0<(R=c[l])&&1>R&&h(b(r,n.x1,n.x2,n.x,R));for(var g=0,d=x(i,n.y1,n.y2,n.y);g<d.length;g++)0<(R=d[g])&&1>R&&u(b(i,n.y1,n.y2,n.y,R))}if(n.type&C.ARC){h(n.x),u(n.y),p(n,r,i);for(var y=n.xRot/180*Math.PI,v=Math.cos(y)*n.rX,S=Math.sin(y)*n.rX,w=-Math.sin(y)*n.rY,T=Math.cos(y)*n.rY,A=n.phi1<n.phi2?[n.phi1,n.phi2]:-180>n.phi2?[n.phi2+360,n.phi1+360]:[n.phi2,n.phi1],O=A[0],P=A[1],E=function(t){var e=t[0],r=t[1],i=180*Math.atan2(r,e)/Math.PI;return i<O?i+360:i},M=0,N=f(w,-v,0).map(E);M<N.length;M++)(R=N[M])>O&&R<P&&h(m(n.cX,v,w,R));for(var _=0,V=f(T,-S,0).map(E);_<V.length;_++){var R;(R=V[_])>O&&R<P&&u(m(n.cY,S,T,R))}}return e}));return o.minX=1/0,o.maxX=-1/0,o.minY=1/0,o.maxY=-1/0,o}}(d||(d={}));var S,w=function(){function t(){}return t.prototype.round=function(t){return this.transform(d.ROUND(t))},t.prototype.toAbs=function(){return this.transform(d.TO_ABS())},t.prototype.toRel=function(){return this.transform(d.TO_REL())},t.prototype.normalizeHVZ=function(t,e,r){return this.transform(d.NORMALIZE_HVZ(t,e,r))},t.prototype.normalizeST=function(){return this.transform(d.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(d.QT_TO_C())},t.prototype.aToC=function(){return this.transform(d.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(d.SANITIZE(t))},t.prototype.translate=function(t,e){return this.transform(d.TRANSLATE(t,e))},t.prototype.scale=function(t,e){return this.transform(d.SCALE(t,e))},t.prototype.rotate=function(t,e,r){return this.transform(d.ROTATE(t,e,r))},t.prototype.matrix=function(t,e,r,i,n,s){return this.transform(d.MATRIX(t,e,r,i,n,s))},t.prototype.skewX=function(t){return this.transform(d.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(d.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(d.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(d.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(d.ANNOTATE_ARCS())},t}(),T=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},A=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},O=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return u(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var r=this;void 0===e&&(e=[]);for(var i=function(t){e.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0},n=0;n<t.length;n++){var s=t[n],a=!(this.curCommandType!==C.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=A(s)&&("0"===this.curNumber&&"0"===s||a);if(!A(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+n);if(this.curCommandType===C.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+n+'"')}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 "'+n+'"');this.curArgs.push(h),this.curArgs.length===P[this.curCommandType]&&(C.HORIZ_LINE_TO===this.curCommandType?i({type:C.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):C.VERT_LINE_TO===this.curCommandType?i({type:C.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===C.MOVE_TO||this.curCommandType===C.LINE_TO||this.curCommandType===C.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),C.MOVE_TO===this.curCommandType&&(this.curCommandType=C.LINE_TO)):this.curCommandType===C.CURVE_TO?i({type:C.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===C.SMOOTH_CURVE_TO?i({type:C.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===C.QUAD_TO?i({type:C.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===C.ARC&&i({type:C.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(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+n+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=C.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=C.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=C.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=C.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=C.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=C.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=C.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=C.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+n+".");this.curCommandType=C.ARC,this.curCommandRelative="a"===s}else e.push({type:C.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,r){void 0===r&&(r=[]);for(var i=0,n=Object.getPrototypeOf(this).parse.call(this,e);i<n.length;i++){var s=n[i],a=t(s);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return r}}})},e}(w),C=function(t){function e(r){var i=t.call(this)||this;return i.commands="string"==typeof r?e.parse(r):r,i}return u(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=d.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var e=[],r=0,i=this.commands;r<i.length;r++){var n=t(i[r]);Array.isArray(n)?e.push.apply(e,n):e.push(n)}return this.commands=e,this},e.encode=function(t){return function(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var i=t[r];if(i.type===C.CLOSE_PATH)e+="z";else if(i.type===C.HORIZ_LINE_TO)e+=(i.relative?"h":"H")+i.x;else if(i.type===C.VERT_LINE_TO)e+=(i.relative?"v":"V")+i.y;else if(i.type===C.MOVE_TO)e+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===C.LINE_TO)e+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===C.CURVE_TO)e+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===C.SMOOTH_CURVE_TO)e+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===C.QUAD_TO)e+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===C.SMOOTH_QUAD_TO)e+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==C.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+r+".");e+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return e}(t)},e.parse=function(t){var e=new O,r=[];return e.parse(t,r),e.finish(r),r},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(w),P=((S={})[C.MOVE_TO]=2,S[C.LINE_TO]=2,S[C.HORIZ_LINE_TO]=1,S[C.VERT_LINE_TO]=1,S[C.CLOSE_PATH]=0,S[C.QUAD_TO]=4,S[C.SMOOTH_QUAD_TO]=2,S[C.CURVE_TO]=6,S[C.SMOOTH_CURVE_TO]=4,S[C.ARC]=7,S);function E(t){return E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}var M=[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],N=[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 _(t,e,r,i,n){if("string"===typeof t&&(t=document.getElementById(t)),!t||"object"!==E(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=t.getContext("2d");try{return s.getImageData(e,r,i,n)}catch(a){throw new Error("unable to access image data: "+a)}}function V(t,e,r,i,n,s){if(!(isNaN(s)||s<1)){s|=0;var a=_(t,e,r,i,n);a=function(t,e,r,i,n,s){for(var a,o=t.data,h=2*s+1,u=i-1,l=n-1,c=s+1,g=c*(c+1)/2,p=new R,f=p,d=1;d<h;d++)f=f.next=new R,d===c&&(a=f);f.next=p;for(var y=null,v=null,m=0,x=0,b=M[s],S=N[s],w=0;w<n;w++){f=p;for(var T=o[x],A=o[x+1],O=o[x+2],C=o[x+3],P=0;P<c;P++)f.r=T,f.g=A,f.b=O,f.a=C,f=f.next;for(var E=0,_=0,V=0,k=0,I=c*T,L=c*A,D=c*O,B=c*C,z=g*T,F=g*A,j=g*O,H=g*C,U=1;U<c;U++){var X=x+((u<U?u:U)<<2),Y=o[X],q=o[X+1],G=o[X+2],W=o[X+3],Q=c-U;z+=(f.r=Y)*Q,F+=(f.g=q)*Q,j+=(f.b=G)*Q,H+=(f.a=W)*Q,E+=Y,_+=q,V+=G,k+=W,f=f.next}y=p,v=a;for(var $=0;$<i;$++){var Z=H*b>>>S;if(o[x+3]=Z,0!==Z){var K=255/Z;o[x]=(z*b>>>S)*K,o[x+1]=(F*b>>>S)*K,o[x+2]=(j*b>>>S)*K}else o[x]=o[x+1]=o[x+2]=0;z-=I,F-=L,j-=D,H-=B,I-=y.r,L-=y.g,D-=y.b,B-=y.a;var J=$+s+1;J=m+(J<u?J:u)<<2,z+=E+=y.r=o[J],F+=_+=y.g=o[J+1],j+=V+=y.b=o[J+2],H+=k+=y.a=o[J+3],y=y.next;var tt=v,et=tt.r,rt=tt.g,it=tt.b,nt=tt.a;I+=et,L+=rt,D+=it,B+=nt,E-=et,_-=rt,V-=it,k-=nt,v=v.next,x+=4}m+=i}for(var st=0;st<i;st++){var at=o[x=st<<2],ot=o[x+1],ht=o[x+2],ut=o[x+3],lt=c*at,ct=c*ot,gt=c*ht,pt=c*ut,ft=g*at,dt=g*ot,yt=g*ht,vt=g*ut;f=p;for(var mt=0;mt<c;mt++)f.r=at,f.g=ot,f.b=ht,f.a=ut,f=f.next;for(var xt=i,bt=0,St=0,wt=0,Tt=0,At=1;At<=s;At++){x=xt+st<<2;var Ot=c-At;ft+=(f.r=at=o[x])*Ot,dt+=(f.g=ot=o[x+1])*Ot,yt+=(f.b=ht=o[x+2])*Ot,vt+=(f.a=ut=o[x+3])*Ot,Tt+=at,bt+=ot,St+=ht,wt+=ut,f=f.next,At<l&&(xt+=i)}x=st,y=p,v=a;for(var Ct=0;Ct<n;Ct++){var Pt=x<<2;o[Pt+3]=ut=vt*b>>>S,ut>0?(ut=255/ut,o[Pt]=(ft*b>>>S)*ut,o[Pt+1]=(dt*b>>>S)*ut,o[Pt+2]=(yt*b>>>S)*ut):o[Pt]=o[Pt+1]=o[Pt+2]=0,ft-=lt,dt-=ct,yt-=gt,vt-=pt,lt-=y.r,ct-=y.g,gt-=y.b,pt-=y.a,Pt=st+((Pt=Ct+c)<l?Pt:l)*i<<2,ft+=Tt+=y.r=o[Pt],dt+=bt+=y.g=o[Pt+1],yt+=St+=y.b=o[Pt+2],vt+=wt+=y.a=o[Pt+3],y=y.next,lt+=at=v.r,ct+=ot=v.g,gt+=ht=v.b,pt+=ut=v.a,Tt-=at,bt-=ot,St-=ht,wt-=ut,v=v.next,x+=i}}return t}(a,0,0,i,n,s),t.getContext("2d").putImageData(a,e,r)}}var R=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};var k=Object.freeze({__proto__:null,offscreen:function(){var{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,e)=>new OffscreenCanvas(t,e),createImage:t=>n((function*(){var e=yield fetch(t),r=yield e.blob();return yield createImageBitmap(r)}))()};return"undefined"===typeof DOMParser&&"undefined"!==typeof t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){var{DOMParser:e,canvas:r,fetch:i}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:i,createCanvas:r.createCanvas,createImage:r.loadImage}}});function I(t){return t.replace(/(?!\u3000)\s+/gm," ")}function L(t){return t.replace(/^[\n \t]+/,"")}function D(t){return t.replace(/[\n \t]+$/,"")}function B(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}var z=/^[A-Z-]+$/;function F(t){return z.test(t)?t.toLowerCase():t}function j(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function H(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,((t,r)=>e--&&r?String(Math.round(parseFloat(t))):t))}var U=/(\[[^\]]+\])/g,X=/(#[^\s+>~.[:]+)/g,Y=/(\.[^\s+>~.[:]+)/g,q=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,G=/(:[\w-]+\([^)]*\))/gi,W=/(:[^\s+>~.[:]+)/g,Q=/([^\s+>~.[:]+)/g;function $(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function Z(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),i=0;return[r,i]=$(r,U),e[1]+=i,[r,i]=$(r,X),e[0]+=i,[r,i]=$(r,Y),e[1]+=i,[r,i]=$(r,q),e[2]+=i,[r,i]=$(r,G),e[1]+=i,[r,i]=$(r,W),e[1]+=i,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,i]=$(r,Q),e[2]+=i,e.join("")}var K=1e-8;function J(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function tt(t,e){return(t[0]*e[0]+t[1]*e[1])/(J(t)*J(e))}function et(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(tt(t,e))}function rt(t){return t*t*t}function it(t){return 3*t*t*(1-t)}function nt(t){return 3*t*(1-t)*(1-t)}function st(t){return(1-t)*(1-t)*(1-t)}function at(t){return t*t}function ot(t){return 2*t*(1-t)}function ht(t){return(1-t)*(1-t)}class ut{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new ut(t,"EMPTY","")}split(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",{document:e,name:r}=this;return I(this.getString()).trim().split(t).map((t=>new ut(e,r,t)))}hasValue(t){var{value:e}=this;return null!==e&&""!==e&&(t||0!==e)&&"undefined"!==typeof e}isString(t){var{value:e}=this,r="string"===typeof e;return r&&t?t.test(e):r}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return"undefined"===typeof t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return"undefined"===typeof t?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return"undefined"===typeof t||this.hasValue()?"undefined"===typeof this.value?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=H(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[r,i]="boolean"===typeof t?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.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(/%$/)&&i:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(r);default:var s=this.getNumber();return e&&s<1?s*n.computeSize(r):s}}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 t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if("function"===typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"===typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?ut.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,i=0,n=0;n<r&&(","===e[n]&&i++,3!==i);n++);if(t.hasValue()&&this.isString()&&3!==i){var s=new o(e);s.ok&&(s.alpha=t.getNumber(),e=s.toRGBA())}return new ut(this.document,this.name,e)}}ut.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 lt{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"===typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class ct{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[r=e,i=e]=B(t);return new ct(r,i)}static parseScale(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,[r=e,i=r]=B(t);return new ct(r,i)}static parsePath(t){for(var e=B(t),r=e.length,i=[],n=0;n<r;n+=2)i.push(new ct(e[n],e[n+1]));return i}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,i=e*t[0]+r*t[2]+t[4],n=e*t[1]+r*t[3]+t[5];this.x=i,this.y=n}}class gt{constructor(t){this.screen=t,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:t,onClick:e,onMouseMove:r}=this,i=t.ctx.canvas;i.onclick=e,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:i}=t.ctx.canvas;i&&(i.cursor=""),e.forEach(((t,e)=>{for(var{run:i}=t,n=r[e];n;)i(n),n=n.parent})),this.events=[],this.eventElements=[]}}checkPath(t,e){if(this.working&&e){var{events:r,eventElements:i}=this;r.forEach(((r,n)=>{var{x:s,y:a}=r;!i[n]&&e.isPointInPath&&e.isPointInPath(s,a)&&(i[n]=t)}))}}checkBoundingBox(t,e){if(this.working&&e){var{events:r,eventElements:i}=this;r.forEach(((r,n)=>{var{x:s,y:a}=r;!i[n]&&e.isPointInBox(s,a)&&(i[n]=t)}))}}mapXY(t,e){for(var{window:r,ctx:i}=this.screen,n=new ct(t,e),s=i.canvas;s;)n.x-=s.offsetLeft,n.y-=s.offsetTop,s=s.offsetParent;return r.scrollX&&(n.x+=r.scrollX),r.scrollY&&(n.y+=r.scrollY),n}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(t){t.onMouseMove&&t.onMouseMove()}})}}var pt="undefined"!==typeof window?window:null,ft="undefined"!==typeof fetch?fetch.bind(void 0):null;class dt{constructor(t){var{fetch:e=ft,window:r=pt}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new lt,this.mouse=new gt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:i,width:n,desiredWidth:s,height:a,desiredHeight:o,minX:h=0,minY:u=0,refX:l,refY:c,clip:g=!1,clipX:p=0,clipY:f=0}=t,d=I(i).replace(/^defer\s/,""),[y,v]=d.split(" "),m=y||"xMidYMid",x=v||"meet",b=n/s,S=a/o,w=Math.min(b,S),T=Math.max(b,S),A=s,O=o;"meet"===x&&(A*=w,O*=w),"slice"===x&&(A*=T,O*=T);var C=new ut(e,"refX",l),P=new ut(e,"refY",c),E=C.hasValue()&&P.hasValue();if(E&&r.translate(-w*C.getPixels("x"),-w*P.getPixels("y")),g){var M=w*p,N=w*f;r.beginPath(),r.moveTo(M,N),r.lineTo(n,N),r.lineTo(n,a),r.lineTo(M,a),r.closePath(),r.clip()}if(!E){var _="meet"===x&&w===S,V="slice"===x&&T===S,R="meet"===x&&w===b,k="slice"===x&&T===b;m.startsWith("xMid")&&(_||V)&&r.translate(n/2-A/2,0),m.endsWith("YMid")&&(R||k)&&r.translate(0,a/2-O/2),m.startsWith("xMax")&&(_||V)&&r.translate(n-A,0),m.endsWith("YMax")&&(R||k)&&r.translate(0,a-O)}switch(!0){case"none"===m:r.scale(b,S);break;case"meet"===x:r.scale(w,w);break;case"slice"===x:r.scale(T,T)}r.translate(-h,-u)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:n=!1,ignoreClear:s=!1,forceRedraw:o,scaleWidth:h,scaleHeight:u,offsetX:l,offsetY:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{FRAMERATE:g,mouse:p}=this,f=1e3/g;if(this.frameDuration=f,this.readyPromise=new Promise((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,n,s,h,u,l,c),e){var d=Date.now(),y=d,v=0,m=()=>{d=Date.now(),(v=d-y)>=f&&(y=d-v%f,this.shouldUpdate(i,o)&&(this.render(t,n,s,h,u,l,c),p.runEvents())),this.intervalId=a(m)};r||p.start(),this.intervalId=a(m)}}stop(){this.intervalId&&(a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this;if(this.animations.reduce(((t,e)=>e.update(r)||t),!1))return!0}return!("function"!==typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}render(t,e,r,i,n,s,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:h,viewPort:u,ctx:l,isFirstRender:c}=this,g=l.canvas;u.clear(),g.width&&g.height?u.setCurrent(g.width,g.height):u.setCurrent(o,h);var p=t.getStyle("width"),f=t.getStyle("height");!e&&(c||"number"!==typeof i&&"number"!==typeof n)&&(p.hasValue()&&(g.width=p.getPixels("x"),g.style&&(g.style.width="".concat(g.width,"px"))),f.hasValue()&&(g.height=f.getPixels("y"),g.style&&(g.style.height="".concat(g.height,"px"))));var d=g.clientWidth||g.width,y=g.clientHeight||g.height;if(e&&p.hasValue()&&f.hasValue()&&(d=p.getPixels("x"),y=f.getPixels("y")),u.setCurrent(d,y),"number"===typeof s&&t.getAttribute("x",!0).setValue(s),"number"===typeof a&&t.getAttribute("y",!0).setValue(a),"number"===typeof i||"number"===typeof n){var v=B(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"===typeof i){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/i:isNaN(v[2])||(m=v[2]/i)}if("number"===typeof n){var S=t.getStyle("height");S.hasValue()?x=S.getPixels("y")/n:isNaN(v[3])||(x=v[3]/n)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(i),t.getAttribute("height",!0).setValue(n);var w=t.getStyle("transform",!0,!0);w.setValue("".concat(w.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}r||l.clearRect(0,0,d,y),t.render(l),c&&(this.isFirstRender=!1)}}dt.defaultWindow=pt,dt.defaultFetch=ft;var{defaultFetch:yt}=dt,vt="undefined"!==typeof DOMParser?DOMParser:null;class mt{constructor(){var{fetch:t=yt,DOMParser:e=vt}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return n((function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)}))()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return n((function*(){var r=yield e.fetch(t),i=yield r.text();return e.parseFromString(i)}))()}}class xt{constructor(t,e){this.type="translate",this.point=null,this.point=ct.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class bt{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=B(e);this.angle=new ut(t,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(t){var{cx:e,cy:r,originX:i,originY:n,angle:s}=this,a=e+i.getPixels("x"),o=r+n.getPixels("y");t.translate(a,o),t.rotate(s.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:e,cy:r,originX:i,originY:n,angle:s}=this,a=e+i.getPixels("x"),o=r+n.getPixels("y");t.translate(a,o),t.rotate(-1*s.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:e,cy:r,angle:i}=this,n=i.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class St{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=ct.parseScale(e);0!==i.x&&0!==i.y||(i.x=K,i.y=K),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:i,originY:n}=this,s=i.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(e,r||e),t.translate(-s,-a)}unapply(t){var{scale:{x:e,y:r},originX:i,originY:n}=this,s=i.getPixels("x"),a=n.getPixels("y");t.translate(s,a),t.scale(1/e,1/r||e),t.translate(-s,-a)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class wt{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=B(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:i}=this,n=e.getPixels("x"),s=r.getPixels("y");t.translate(n,s),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),t.translate(-n,-s)}unapply(t){var{originX:e,originY:r,matrix:i}=this,n=i[0],s=i[2],a=i[4],o=i[1],h=i[3],u=i[5],l=1/(n*(1*h-0*u)-s*(1*o-0*u)+a*(0*o-0*h)),c=e.getPixels("x"),g=r.getPixels("y");t.translate(c,g),t.transform(l*(1*h-0*u),l*(0*u-1*o),l*(0*a-1*s),l*(1*n-0*a),l*(s*u-a*h),l*(a*o-n*u)),t.translate(-c,-g)}applyToPoint(t){t.applyTransform(this.matrix)}}class Tt extends wt{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new ut(t,"angle",e)}}class At extends Tt{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class Ot extends Tt{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class Ct{constructor(t,e,r){this.document=t,this.transforms=[];var i=function(t){return I(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(e);i.forEach((t=>{if("none"!==t){var[e,i]=function(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}(t),n=Ct.transformTypes[e];"undefined"!==typeof n&&this.transforms.push(new n(this.document,i,r))}}))}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[i,n=i]=e.getStyle("transform-origin",!1,!0).split(),s=[i,n];return r.hasValue()?new Ct(t,r.getString(),s):null}apply(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length-1;r>=0;r--)e[r].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].applyToPoint(t)}}Ct.transformTypes={translate:xt,rotate:bt,scale:St,matrix:wt,skewX:At,skewY:Ot};class Pt{constructor(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],e&&1===e.nodeType){if(Array.from(e.attributes).forEach((e=>{var r=F(e.nodeName);this.attributes[r]=new ut(t,r,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map((t=>t.trim()));i.forEach((e=>{if(e){var[r,i]=e.split(":").map((t=>t.trim()));this.styles[r]=new ut(t,r,i)}}))}var{definitions:n}=t,s=this.getAttribute("id");s.hasValue()&&(n[s.getString()]||(n[s.getString()]=this)),Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType)this.addChild(e);else if(r&&(3===e.nodeType||4===e.nodeType)){var i=t.createTextNode(e);i.getText().length>0&&this.addChild(i)}}))}}getAttribute(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var i=new ut(this.document,t,"");return this.attributes[t]=i,i}return r||ut.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return ut.empty(this.document)}getStyle(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.styles[t];if(i)return i;var n=this.getAttribute(t);if(null!==n&&void 0!==n&&n.hasValue())return this.styles[t]=n,n;if(!r){var{parent:s}=this;if(s){var a=s.getStyle(t);if(null!==a&&void 0!==a&&a.hasValue())return a}}if(e){var o=new ut(this.document,t,"");return this.styles[t]=o,o}return i||ut.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Ct.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-