function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=typeof global==`object`&&global&&global.Object===Object&&global,a=typeof self==`object`&&self&&self.Object===Object&&self,o=i||a||Function(`return this`)(),s=o.Symbol,c=Object.prototype,l=c.hasOwnProperty,u=c.toString,d=s?s.toStringTag:void 0;function f(e){var t=l.call(e,d),n=e[d];try{e[d]=void 0;var r=!0}catch{}var i=u.call(e);return r&&(t?e[d]=n:delete e[d]),i}var p=Object.prototype.toString;function m(e){return p.call(e)}var h=`[object Null]`,g=`[object Undefined]`,_=s?s.toStringTag:void 0;function v(e){return e==null?e===void 0?g:h:_&&_ in Object(e)?f(e):m(e)}function y(e){return typeof e==`object`&&!!e}var b=`[object Symbol]`;function x(e){return typeof e==`symbol`||y(e)&&v(e)==b}var S=Array.isArray,ee=/\s/;function te(e){for(var t=e.length;t--&&ee.test(e.charAt(t)););return t}var ne=/^\s+/;function re(e){return e&&e.slice(0,te(e)+1).replace(ne,``)}function C(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var ie=NaN,ae=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,se=/^0o[0-7]+$/i,ce=parseInt;function w(e){if(typeof e==`number`)return e;if(x(e))return ie;if(C(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=C(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=re(e);var n=oe.test(e);return n||se.test(e)?ce(e.slice(2),n?2:8):ae.test(e)?ie:+e}var le=`[object AsyncFunction]`,ue=`[object Function]`,de=`[object GeneratorFunction]`,fe=`[object Proxy]`;function pe(e){if(!C(e))return!1;var t=v(e);return t==ue||t==de||t==le||t==fe}var me=o[`__core-js_shared__`],he=function(){var e=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ge(e){return!!he&&he in e}var _e=Function.prototype.toString;function T(e){if(e!=null){try{return _e.call(e)}catch{}try{return e+``}catch{}}return``}var ve=/[\\^$.*+?()[\]{}|]/g,ye=/^\[object .+?Constructor\]$/,be=Function.prototype,xe=Object.prototype,Se=be.toString,Ce=xe.hasOwnProperty,we=RegExp(`^`+Se.call(Ce).replace(ve,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Te(e){return!C(e)||ge(e)?!1:(pe(e)?we:ye).test(T(e))}function Ee(e,t){return e?.[t]}function E(e,t){var n=Ee(e,t);return Te(n)?n:void 0}var De=E(o,`WeakMap`),Oe=9007199254740991,ke=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var n=typeof e;return t=t??Oe,!!t&&(n==`number`||n!=`symbol`&&ke.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Me}function Pe(e){return e!=null&&Ne(e.length)&&!pe(e)}var Fe=Object.prototype;function Ie(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Fe)}function Le(e,t){for(var n=-1,r=Array(e);++n-1}function Kt(e,t){var n=this.__data__,r=M(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function N(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function tn(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=w(n),n=n===n?n:0),t!==void 0&&(t=w(t),t=t===t?t:0),en(w(e),t,n)}function nn(){this.__data__=new N,this.size=0}function rn(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function an(e){return this.__data__.get(e)}function on(e){return this.__data__.has(e)}var sn=200;function cn(e,t){var n=this.__data__;if(n instanceof N){var r=n.__data__;if(!P||r.lengths))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Rn?new z:void 0;for(a.set(e,t),a.set(t,e);++d=t||n<0||d&&r>=a}function _(){var e=pr();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(pr())}function x(){var e=pr(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function vr(e,t){return fr(e,t)}var yr=`Expected a function`;function br(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(yr);return C(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),_r(e,t,{leading:r,maxWait:t,trailing:i})}var V=` `;function xr(e){let t=``;Array.isArray(e)||(e=[e]);for(let n=0;ne.phi1&&(e.phi2-=2*W),e.sweepFlag===1&&e.phi2r)return[];if(r===0)return[[e*n/(e*e+t*t),t*n/(e*e+t*t)]];let i=Math.sqrt(r);return[[(e*n+t*i)/(e*e+t*t),(t*n-e*i)/(e*e+t*t)],[(e*n-t*i)/(e*e+t*t),(t*n+e*i)/(e*e+t*t)]]}var K=Math.PI/180;function Cr(e,t,n){return(1-n)*e+n*t}function wr(e,t,n,r){return e+Math.cos(r/180*W)*t+Math.sin(r/180*W)*n}function Tr(e,t,n,r){let i=1e-6,a=t-e,o=n-t,s=r-n,c=3*a+3*s-6*o,l=(o-a)*6,u=3*a;return Math.abs(c){let[i,a]=H([t*e.rX,n*e.rY],r);return[e.cX+i,e.cY+a]};for(let t=0;t{let r=`relative`in e&&e.relative;return[`x`in e?e.x+(r?t:0):t,`y`in e?e.y+(r?n:0):n]})),r=n[0];t.push(e[0]);for(let i=1;i({...e,x:e.x??t,y:e.y??n,relative:e.relative??!1})),r=[],i=[];for(let a of e){let e=n(a);e.type===$.MOVE_TO&&i.length>0&&(t?r.push(...J(i)):r.unshift(...J(i)),i=[]),i.push(e)}return i.length>0&&(t?r.push(...J(i)):r.unshift(...J(i))),r}function J(e){let t=e[e.length-1]?.type===$.CLOSE_PATH,n=t?e.length-2:e.length-1,r=[{type:$.MOVE_TO,relative:!1,x:e[n].x,y:e[n].y}];for(let t=n;t>0;t--){let n=e[t],i=e[t-1];if(n.relative)throw Error("Relative command are not supported convert first with `toAbs()`");switch(n.type){case $.HORIZ_LINE_TO:r.push({type:$.HORIZ_LINE_TO,relative:!1,x:i.x});break;case $.VERT_LINE_TO:r.push({type:$.VERT_LINE_TO,relative:!1,y:i.y});break;case $.LINE_TO:case $.MOVE_TO:r.push({type:$.LINE_TO,relative:!1,x:i.x,y:i.y});break;case $.CURVE_TO:r.push({type:$.CURVE_TO,relative:!1,x:i.x,y:i.y,x1:n.x2,y1:n.y2,x2:n.x1,y2:n.y1});break;case $.SMOOTH_CURVE_TO:throw Error(`Unsupported command: S (smooth cubic bezier)`);case $.SMOOTH_QUAD_TO:throw Error(`Unsupported command: T (smooth quadratic bezier)`);case $.ARC:throw Error(`Unsupported command: A (arc)`);case $.QUAD_TO:throw Error(`Unsupported command: Q (quadratic bezier)`)}}return t&&r.push({type:$.CLOSE_PATH}),r}function jr(e=0x9184e72a000){U(e);function t(t){return Math.round(t*e)/e}return function(e){return`x1`in e&&e.x1!==void 0&&(e.x1=t(e.x1)),`y1`in e&&e.y1!==void 0&&(e.y1=t(e.y1)),`x2`in e&&e.x2!==void 0&&(e.x2=t(e.x2)),`y2`in e&&e.y2!==void 0&&(e.y2=t(e.y2)),`x`in e&&e.x!==void 0&&(e.x=t(e.x)),`y`in e&&e.y!==void 0&&(e.y=t(e.y)),`rX`in e&&e.rX!==void 0&&(e.rX=t(e.rX)),`rY`in e&&e.rY!==void 0&&(e.rY=t(e.rY)),e}}function Mr(){return Y((e,t,n)=>(e.relative&&(e.x1!==void 0&&(e.x1+=t),e.y1!==void 0&&(e.y1+=n),e.x2!==void 0&&(e.x2+=t),e.y2!==void 0&&(e.y2+=n),e.x!==void 0&&(e.x+=t),e.y!==void 0&&(e.y+=n),e.relative=!1),e))}function Nr(){return Y((e,t,n)=>(e.relative||(e.x1!==void 0&&(e.x1-=t),e.y1!==void 0&&(e.y1-=n),e.x2!==void 0&&(e.x2-=t),e.y2!==void 0&&(e.y2-=n),e.x!==void 0&&(e.x-=t),e.y!==void 0&&(e.y-=n),e.relative=!0),e))}function Pr(e=!0,t=!0,n=!0,r=!0){return Y((i,a,o,s,c)=>{if(isNaN(s)&&!(i.type&$.MOVE_TO))throw Error(`path must start with moveto`);if(t&&i.type&$.HORIZ_LINE_TO&&(i.type=$.LINE_TO,i.y=i.relative?0:o),n&&i.type&$.VERT_LINE_TO&&(i.type=$.LINE_TO,i.x=i.relative?0:a),e&&i.type&$.CLOSE_PATH&&(i.type=$.LINE_TO,i.x=i.relative?s-a:s,i.y=i.relative?c-o:c),i.type&$.ARC&&(i.rX===0||i.rY===0)&&(i.type=$.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),r&&i.type&$.QUAD_TO&&q([a,o],i.relative?[a+i.x1,o+i.y1]:[i.x1,i.y1],i.relative?[a+i.x,o+i.y]:[i.x,i.y])&&(i.type=$.LINE_TO,delete i.x1,delete i.y1),r&&i.type&$.CURVE_TO){let e=[a,o],t=i.relative?[a+i.x1,o+i.y1]:[i.x1,i.y1],n=i.relative?[a+i.x2,o+i.y2]:[i.x2,i.y2],r=i.relative?[a+i.x,o+i.y]:[i.x,i.y];q(e,t,r)&&q(e,n,r)&&(i.type=$.LINE_TO,delete i.x1,delete i.y1,delete i.x2,delete i.y2)}return i})}function Fr(){let e=NaN,t=NaN,n=NaN,r=NaN;return Y((i,a,o)=>(i.type&$.SMOOTH_CURVE_TO&&(i.type=$.CURVE_TO,e=isNaN(e)?a:e,t=isNaN(t)?o:t,i.x1=i.relative?a-e:2*a-e,i.y1=i.relative?o-t:2*o-t),i.type&$.CURVE_TO?(e=i.relative?a+i.x2:i.x2,t=i.relative?o+i.y2:i.y2):(e=NaN,t=NaN),i.type&$.SMOOTH_QUAD_TO&&(i.type=$.QUAD_TO,n=isNaN(n)?a:n,r=isNaN(r)?o:r,i.x1=i.relative?a-n:2*a-n,i.y1=i.relative?o-r:2*o-r),i.type&$.QUAD_TO?(n=i.relative?a+i.x1:i.x1,r=i.relative?o+i.y1:i.y1):(n=NaN,r=NaN),i))}function Ir(){let e=NaN,t=NaN;return Y((n,r,i)=>{if(n.type&$.SMOOTH_QUAD_TO&&(n.type=$.QUAD_TO,e=isNaN(e)?r:e,t=isNaN(t)?i:t,n.x1=n.relative?r-e:2*r-e,n.y1=n.relative?i-t:2*i-t),n.type&$.QUAD_TO){e=n.relative?r+n.x1:n.x1,t=n.relative?i+n.y1:n.y1;let a=n.x1,o=n.y1;n.type=$.CURVE_TO,n.x1=((n.relative?0:r)+a*2)/3,n.y1=((n.relative?0:i)+o*2)/3,n.x2=(n.x+a*2)/3,n.y2=(n.y+o*2)/3}else e=NaN,t=NaN;return n})}function Y(e){let t=0,n=0,r=NaN,i=NaN;return function(a){if(isNaN(r)&&!(a.type&$.MOVE_TO))throw Error(`path must start with moveto`);let o=e(a,t,n,r,i);return a.type&$.CLOSE_PATH&&(t=r,n=i),`x`in a&&a.x!==void 0&&(t=a.relative?t+a.x:a.x),`y`in a&&a.y!==void 0&&(n=a.relative?n+a.y:a.y),a.type&$.MOVE_TO&&(r=t,i=n),o}}function Lr(e=0){U(e);let t=NaN,n=NaN,r=NaN,i=NaN;return Y((a,o,s,c,l)=>{let u=Math.abs,d=!1,f=0,p=0;if(a.type&$.SMOOTH_CURVE_TO&&(f=isNaN(t)?0:o-t,p=isNaN(n)?0:s-n),a.type&($.CURVE_TO|$.SMOOTH_CURVE_TO)?(t=a.relative?o+a.x2:a.x2,n=a.relative?s+a.y2:a.y2):(t=NaN,n=NaN),a.type&$.SMOOTH_QUAD_TO?(r=isNaN(r)?o:2*o-r,i=isNaN(i)?s:2*s-i):a.type&$.QUAD_TO?(r=a.relative?o+a.x1:a.x1,i=a.relative?s+a.y1:a.y2):(r=NaN,i=NaN),a.type&$.LINE_COMMANDS||a.type&$.ARC&&(a.rX===0||a.rY===0||!a.lArcFlag)||a.type&$.CURVE_TO||a.type&$.SMOOTH_CURVE_TO||a.type&$.QUAD_TO||a.type&$.SMOOTH_QUAD_TO){let t=a.x===void 0?0:a.relative?a.x:a.x-o,n=a.y===void 0?0:a.relative?a.y:a.y-s;f=isNaN(r)?a.x1===void 0?f:a.relative?a.x:a.x1-o:r-o,p=isNaN(i)?a.y1===void 0?p:a.relative?a.y:a.y1-s:i-s;let c=a.x2===void 0?0:a.relative?a.x:a.x2-o,l=a.y2===void 0?0:a.relative?a.y:a.y2-s;u(t)<=e&&u(n)<=e&&u(f)<=e&&u(p)<=e&&u(c)<=e&&u(l)<=e&&(d=!0)}return a.type&$.CLOSE_PATH&&u(o-c)<=e&&u(s-l)<=e&&(d=!0),d?[]:a})}function X(e,t,n,r,i,a){return U(e,t,n,r,i,a),Y((o,s,c,l)=>{let u=o.x1,d=o.x2,f=o.relative&&!isNaN(l),p=o.x===void 0?f?0:s:o.x,m=o.y===void 0?f?0:c:o.y;o.type&$.HORIZ_LINE_TO&&t!==0&&(o.type=$.LINE_TO,o.y=o.relative?0:c),o.type&$.VERT_LINE_TO&&n!==0&&(o.type=$.LINE_TO,o.x=o.relative?0:s),o.x!==void 0&&(o.x=o.x*e+m*n+(f?0:i)),o.y!==void 0&&(o.y=p*t+o.y*r+(f?0:a)),o.x1!==void 0&&(o.x1=o.x1*e+o.y1*n+(f?0:i)),o.y1!==void 0&&(o.y1=u*t+o.y1*r+(f?0:a)),o.x2!==void 0&&(o.x2=o.x2*e+o.y2*n+(f?0:i)),o.y2!==void 0&&(o.y2=d*t+o.y2*r+(f?0:a));function h(e){return e*e}let g=e*r-t*n;if(o.xRot!==void 0&&(e!==1||t!==0||n!==0||r!==1))if(g===0)delete o.rX,delete o.rY,delete o.xRot,delete o.lArcFlag,delete o.sweepFlag,o.type=$.LINE_TO;else{let i=o.xRot*Math.PI/180,a=Math.sin(i),s=Math.cos(i),c=1/h(o.rX),l=1/h(o.rY),u=h(s)*c+h(a)*l,d=2*a*s*(c-l),f=h(a)*c+h(s)*l,p=u*r*r-d*t*r+f*t*t,m=d*(e*r+t*n)-2*(u*n*r+f*e*t),_=u*n*n-d*e*n+f*e*e,v=(Math.atan2(m,p-_)+Math.PI)%Math.PI/2,y=Math.sin(v),b=Math.cos(v);o.rX=Math.abs(g)/Math.sqrt(p*h(b)+m*y*b+_*h(y)),o.rY=Math.abs(g)/Math.sqrt(p*h(y)-m*y*b+_*h(b)),o.xRot=v*180/Math.PI}return o.sweepFlag!==void 0&&0>g&&(o.sweepFlag=+!o.sweepFlag),o})}function Rr(e,t=0,n=0){U(e,t,n);let r=Math.sin(e),i=Math.cos(e);return X(i,r,-r,i,t-t*i+n*r,n-t*r-n*i)}function zr(e,t=0){return U(e,t),X(1,0,0,1,e,t)}function Br(e,t=e){return U(e,t),X(e,0,0,t,0,0)}function Vr(e){return U(e),X(1,0,Math.tan(e),1,0,0)}function Hr(e){return U(e),X(1,Math.tan(e),0,1,0,0)}function Ur(e=0){return U(e),X(-1,0,0,1,e,0)}function Wr(e=0){return U(e),X(1,0,0,-1,0,e)}function Gr(){return Y((e,t,n)=>$.ARC===e.type?Or(e,e.relative?0:t,e.relative?0:n):e)}function Kr(){return Y((e,t,n)=>(e.relative&&(t=0,n=0),$.ARC===e.type&&G(e,t,n),e))}function qr(){return e=>({...e})}function Jr(){let e=qr(),t=Mr(),n=Ir(),r=Fr(),i=Y((a,o,s)=>{let c=r(n(t(e(a))));function l(e){e>i.maxX&&(i.maxX=e),ei.maxY&&(i.maxY=e),et&&l(Er(o,c.x1,c.x2,c.x,t));let t=Tr(s,c.y1,c.y2,c.y);for(let e of t)0e&&u(Er(s,c.y1,c.y2,c.y,e))}if(c.type&$.ARC){l(c.x),u(c.y),G(c,o,s);let e=c.xRot/180*Math.PI,t=Math.cos(e)*c.rX,n=Math.sin(e)*c.rX,r=-Math.sin(e)*c.rY,i=Math.cos(e)*c.rY,[a,d]=c.phi1c.phi2?[c.phi2+360,c.phi1+360]:[c.phi2,c.phi1],f=([e,t])=>{let n=Math.atan2(t,e)*180/Math.PI;return na&&ea&&ee===` `||e===` `||e===`\r`||e===` `,Zr=e=>48<=e.charCodeAt(0)&&e.charCodeAt(0)<=57,Qr=class extends Yr{constructor(...e){super(...e),r(this,`curNumber`,``),r(this,`curCommandType`,-1),r(this,`curCommandRelative`,!1),r(this,`canParseCommandOrComma`,!0),r(this,`curNumberHasExp`,!1),r(this,`curNumberHasExpDigits`,!1),r(this,`curNumberHasDecimal`,!1),r(this,`curArgs`,[])}finish(e=[]){if(this.parse(` `,e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw SyntaxError(`Unterminated command at the path end.`);return e}parse(e,t=[]){let n=e=>{t.push(e),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let r=0;re)throw SyntaxError(`Expected positive number, got "${e}" at index "${r}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!==`0`&&this.curNumber!==`1`)throw SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${r}"`)}this.curArgs.push(e),this.curArgs.length===$r[this.curCommandType]&&($.HORIZ_LINE_TO===this.curCommandType?n({type:$.HORIZ_LINE_TO,relative:this.curCommandRelative,x:e}):$.VERT_LINE_TO===this.curCommandType?n({type:$.VERT_LINE_TO,relative:this.curCommandRelative,y:e}):this.curCommandType===$.MOVE_TO||this.curCommandType===$.LINE_TO||this.curCommandType===$.SMOOTH_QUAD_TO?(n({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?n({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?n({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?n({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&&n({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(!Xr(i)){if(i===`,`&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(i===`+`||i===`-`||i===`.`){this.curNumber=i,this.curNumberHasDecimal=i===`.`;continue}if(o){this.curNumber=i,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw SyntaxError(`Unterminated command at index ${r}.`);if(!this.canParseCommandOrComma)throw SyntaxError(`Unexpected character "${i}" at index ${r}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,i===`z`||i===`Z`){t.push({type:$.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(i===`h`||i===`H`)this.curCommandType=$.HORIZ_LINE_TO,this.curCommandRelative=i===`h`;else if(i===`v`||i===`V`)this.curCommandType=$.VERT_LINE_TO,this.curCommandRelative=i===`v`;else if(i===`m`||i===`M`)this.curCommandType=$.MOVE_TO,this.curCommandRelative=i===`m`;else if(i===`l`||i===`L`)this.curCommandType=$.LINE_TO,this.curCommandRelative=i===`l`;else if(i===`c`||i===`C`)this.curCommandType=$.CURVE_TO,this.curCommandRelative=i===`c`;else if(i===`s`||i===`S`)this.curCommandType=$.SMOOTH_CURVE_TO,this.curCommandRelative=i===`s`;else if(i===`q`||i===`Q`)this.curCommandType=$.QUAD_TO,this.curCommandRelative=i===`q`;else if(i===`t`||i===`T`)this.curCommandType=$.SMOOTH_QUAD_TO,this.curCommandRelative=i===`t`;else if(i===`a`||i===`A`)this.curCommandType=$.ARC,this.curCommandRelative=i===`a`;else throw SyntaxError(`Unexpected character "${i}" at index ${r}.`)}}return t}transform(e){return Object.create(this,{parse:{value(t,n=[]){let r=Object.getPrototypeOf(this).parse.call(this,t);for(let t of r){let r=e(t);Array.isArray(r)?n.push(...r):n.push(r)}return n}}})}},Q,$=class e extends Yr{constructor(t){super(),r(this,`commands`,void 0),typeof t==`string`?this.commands=e.parse(t):this.commands=t}encode(){return e.encode(this.commands)}getBounds(){let e=Z.CALCULATE_BOUNDS();return this.transform(e),e}transform(e){let t=[];for(let n of this.commands){let r=e(n);Array.isArray(r)?t.push(...r):t.push(r)}return this.commands=t,this}reverse(e=!0){return this.commands=Z.REVERSE_PATH(this.commands,e),this}removeCollinear(){return this.commands=Z.REMOVE_COLLINEAR(this.commands),this}static encode(e){return xr(e)}static parse(e){let t=new Qr,n=[];return t.parse(e,n),t.finish(n),n}};Q=$,r($,`CLOSE_PATH`,1),r($,`MOVE_TO`,2),r($,`HORIZ_LINE_TO`,4),r($,`VERT_LINE_TO`,8),r($,`LINE_TO`,16),r($,`CURVE_TO`,32),r($,`SMOOTH_CURVE_TO`,64),r($,`QUAD_TO`,128),r($,`SMOOTH_QUAD_TO`,256),r($,`ARC`,512),r($,`LINE_COMMANDS`,Q.LINE_TO|Q.HORIZ_LINE_TO|Q.VERT_LINE_TO),r($,`DRAWING_COMMANDS`,Q.HORIZ_LINE_TO|Q.VERT_LINE_TO|Q.LINE_TO|Q.CURVE_TO|Q.SMOOTH_CURVE_TO|Q.QUAD_TO|Q.SMOOTH_QUAD_TO|Q.ARC);var $r={[$.MOVE_TO]:2,[$.LINE_TO]:2,[$.HORIZ_LINE_TO]:1,[$.VERT_LINE_TO]:1,[$.CLOSE_PATH]:0,[$.QUAD_TO]:4,[$.SMOOTH_QUAD_TO]:2,[$.CURVE_TO]:6,[$.SMOOTH_CURVE_TO]:4,[$.ARC]:7};export{tn as a,_r as i,br as n,r as o,vr as r,$ as t};