1
2
3
|
/*! @svgdotjs/svg.js v3.0.0 MIT*/;
var SVG=function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var m=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),y=t(function(t){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)}),g=(y.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),p=function(t){if(!g(t))throw TypeError(t+" is not an object!");return t},w=function(t){try{return!!t()}catch(t){return!0}},o=!w(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),e=m.document,n=g(e)&&g(e.createElement),r=function(t){return n?e.createElement(t):{}},i=!o&&!w(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),s=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},u=Object.defineProperty,a={f:o?Object.defineProperty:function(t,e,n){if(p(t),e=s(e,!0),p(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=o?function(t,e,n){return a.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},h={}.hasOwnProperty,l=function(t,e){return h.call(t,e)},c=0,f=Math.random(),v=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++c+f).toString(36))},O=t(function(t){var s=v("src"),e="toString",n=Function[e],o=(""+n).split(e);y.inspectSource=function(t){return n.call(t)},(t.exports=function(t,e,n,r){var i="function"==typeof n;i&&(l(n,"name")||x(n,"name",e)),t[e]!==n&&(i&&(l(n,s)||x(n,s,t[e]?""+t[e]:o.join(String(e)))),t===m?t[e]=n:r?t[e]?t[e]=n:x(t,e,n):(delete t[e],x(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[s]||n.call(this)})}),d=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},b=function(r,i,t){if(d(r),void 0===i)return r;switch(t){case 1:return function(t){return r.call(i,t)};case 2:return function(t,e){return r.call(i,t,e)};case 3:return function(t,e,n){return r.call(i,t,e,n)}}return function(){return r.apply(i,arguments)}},_="prototype",S=function(t,e,n){var r,i,s,o,u=t&S.F,a=t&S.G,h=t&S.S,l=t&S.P,c=t&S.B,f=a?m:h?m[e]||(m[e]={}):(m[e]||{})[_],v=a?y:y[e]||(y[e]={}),d=v[_]||(v[_]={});for(r in a&&(n=e),n)s=((i=!u&&f&&void 0!==f[r])?f:n)[r],o=c&&i?b(s,m):l&&"function"==typeof s?b(Function.call,s):s,f&&O(f,r,s,t&S.U),v[r]!=s&&x(v,r,o),l&&d[r]!=s&&(d[r]=s)};m.core=y,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128;var j=S,M={}.toString,E=function(t){return M.call(t).slice(8,-1)},T=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==E(t)?t.split(""):Object(t)},C=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},P=function(t){return T(C(t))},N=Math.ceil,L=Math.floor,D=function(t){return isNaN(t=+t)?0:(0<t?L:N)(t)},F=Math.min,R=function(t){return 0<t?F(D(t),9007199254740991):0},z=Math.max,I=Math.min,q=function(h){return function(t,e,n){var r,i,s,o=P(t),u=R(o.length),a=(i=u,(r=D(r=n))<0?z(r+i,0):I(r,i));if(h&&e!=e){for(;a<u;)if((s=o[a++])!=s)return!0}else for(;a<u;a++)if((h||a in o)&&o[a]===e)return h||a||0;return!h&&-1}},Y=t(function(t){var e="__core-js_shared__",n=m[e]||(m[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:y.version,mode:"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),X=Y("keys"),H=function(t){return X[t]||(X[t]=v(t))},B=q(!1),V=H("IE_PROTO"),W=function(t,e){var n,r=P(t),i=0,s=[];for(n in r)n!=V&&l(r,n)&&s.push(n);for(;e.length>i;)l(r,n=e[i++])&&(~B(s,n)||s.push(n));return s},Q="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),U=Object.keys||function(t){return W(t,Q)},J={f:Object.getOwnPropertySymbols},$={f:{}.propertyIsEnumerable},K=function(t){return Object(C(t))},Z=Object.assign,tt=!Z||w(function(){var A={},e={},t=Symbol(),n="abcdefghijklmnopqrst";return A[t]=7,n.split("").forEach(function(t){e[t]=t}),7!=Z({},A)[t]||Object.keys(Z({},e)).join("")!=n})?function(t,e){for(var n=K(t),r=arguments.length,i=1,s=J.f,o=$.f;i<r;)for(var u,a=T(arguments[i++]),h=s?U(a).concat(s(a)):U(a),l=h.length,c=0;c<l;)o.call(a,u=h[c++])&&(n[u]=a[u]);return n}:Z;j(j.S+j.F,"Object",{assign:tt});var et=t(function(t){var e=Y("wks"),Symbol=m.Symbol,n="function"==typeof Symbol;(t.exports=function(t){return e[t]||(e[t]=n&&Symbol[t]||(n?Symbol:v)("Symbol."+t))}).store=e}),nt=et("unscopables"),rt=Array.prototype;null==rt[nt]&&x(rt,nt,{});var it=function(t){rt[nt][t]=!0},st=function(t,e){return{value:e,done:!!t}},ot={},ut=o?Object.defineProperties:function(t,e){p(t);for(var n,r=U(e),i=r.length,s=0;s<i;)a.f(t,n=r[s++],e[n]);return t},at=m.document,ht=at&&at.documentElement,lt=H("IE_PROTO"),ct=function(){},ft="prototype",vt=function(){var t,e=r("iframe"),n=Q.length;for(e.style.display="none",ht.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),vt=t.F;n--;)delete vt[ft][Q[n]];return vt()},dt=Object.create||function(t,e){var n;return null!==t?(ct[ft]=p(t),n=new ct,ct[ft]=null,n[lt]=t):n=vt(),void 0===e?n:ut(n,e)},yt=a.f,pt=et("toStringTag"),mt=function(t,e,n){t&&!l(t=n?t:t.prototype,pt)&&yt(t,pt,{configurable:!0,value:e})},gt={};x(gt,et("iterator"),function(){return this});var wt=H("IE_PROTO"),bt=Object.prototype,_t=Object.getPrototypeOf||function(t){return t=K(t),l(t,wt)?t[wt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?bt:null},kt=et("iterator"),xt=!([].keys&&"next"in[].keys()),Ot="values",St=function(){return this},At=function(t,e,n,r,i,s,o){var u,a,h;a=e,h=r,(u=n).prototype=dt(gt,{next:k(1,h)}),mt(u,a+" Iterator");var l,c,f,v=function(t){if(!xt&&t in m)return m[t];switch(t){case"keys":case Ot:return function(){return new n(this,t)}}return function(){return new n(this,t)}},d=e+" Iterator",y=i==Ot,p=!1,m=t.prototype,g=m[kt]||m["@@iterator"]||i&&m[i],w=g||v(i),b=i?y?v("entries"):w:void 0,_="Array"==e&&m.entries||g;if(_&&(f=_t(_.call(new t)))!==Object.prototype&&f.next&&(mt(f,d,!0),"function"!=typeof f[kt]&&x(f,kt,St)),y&&g&&g.name!==Ot&&(p=!0,w=function(){return g.call(this)}),(xt||p||!m[kt])&&x(m,kt,w),ot[e]=w,ot[d]=St,i)if(l={values:y?w:v(Ot),keys:s?w:v("keys"),entries:b},o)for(c in l)c in m||O(m,c,l[c]);else j(j.P+j.F*(xt||p),e,l);return l},jt=At(Array,"Array",function(t,e){this._t=P(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,st(1)):st(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ot.Arguments=ot.Array,it("keys"),it("values"),it("entries");for(var Mt=et("iterator"),Et=et("toStringTag"),Tt=ot.Array,Ct={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Pt=U(Ct),Nt=0;Nt<Pt.length;Nt++){var Lt,Dt=Pt[Nt],Ft=Ct[Dt],Rt=m[Dt],zt=Rt&&Rt.prototype;if(zt&&(zt[Mt]||x(zt,Mt,Tt),zt[Et]||x(zt,Et,Dt),ot[Dt]=Tt,Ft))for(Lt in jt)zt[Lt]||O(zt,Lt,jt[Lt],!0)}var It,qt,Yt,Xt;It="keys",qt=function(){return function(t){return U(K(t))}},Yt=(y.Object||{})[It]||Object[It],(Xt={})[It]=qt(Yt),j(j.S+j.F*w(function(){Yt(1)}),"Object",Xt);var Gt=a.f,Ht=Function.prototype,Bt=/^\s*function ([^ (]*)/;function Vt(t){return(Vt="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})(t)}function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"===Vt(Symbol.iterator)?function(t){return Vt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Vt(t)})(t)}"name"in Ht||o&&Gt(Ht,"name",{configurable:!0,get:function(){try{return(""+this).match(Bt)[1]}catch(t){return""}}});var Qt,Ut=(Qt=!0,function(t,e){var n,r,i=String(C(t)),s=D(e),o=i.length;return s<0||o<=s?Qt?"":void 0:(n=i.charCodeAt(s))<55296||56319<n||s+1===o||(r=i.charCodeAt(s+1))<56320||57343<r?Qt?i.charAt(s):n:Qt?i.slice(s,s+2):r-56320+(n-55296<<10)+65536});At(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ut(e,n),this._i+=t.length,{value:t,done:!1})});var Jt=function(t,e,n){for(var r in e)O(t,r,e[r],n);return t},$t=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Kt=function(e,t,n,r){try{return r?t(p(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&p(i.call(e)),t}},Zt=et("iterator"),te=Array.prototype,ee=et("toStringTag"),ne="Arguments"==E(function(){return arguments}()),re=et("iterator"),ie=y.getIteratorMethod=function(t){if(null!=t)return t[re]||t["@@iterator"]||ot[(e=t,void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(n=Object(e),ee))?r:ne?E(n):"Object"==(i=E(n))&&"function"==typeof n.callee?"Arguments":i)];var e,n,r,i},se=t(function(t){var v={},d={},e=t.exports=function(t,e,n,r,i){var s,o,u,a,h,l=i?function(){return t}:ie(t),c=b(n,r,e?2:1),f=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ot.Array!==h&&te[Zt]!==h){for(u=l.call(t);!(o=u.next()).done;)if((a=Kt(u,c,o.value,e))===v||a===d)return a}else for(s=R(t.length);f<s;f++)if((a=e?c(p(o=t[f])[0],o[1]):c(t[f]))===v||a===d)return a};e.BREAK=v,e.RETURN=d}),oe=et("species"),ue=t(function(t){var n=v("meta"),e=a.f,r=0,i=Object.isExtensible||function(){return!0},s=!w(function(){return i(Object.preventExtensions({}))}),o=function(t){e(t,n,{value:{i:"O"+ ++r,w:{}}})},u=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!g(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].i},getWeak:function(t,e){if(!l(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].w},onFreeze:function(t){return s&&u.NEED&&i(t)&&!l(t,n)&&o(t),t}}}),ae=(ue.KEY,ue.NEED,ue.fastKey,ue.getWeak,ue.onFreeze,function(t,e){if(!g(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),he=a.f,le=ue.fastKey,ce=o?"_s":"size",fe=function(t,e){var n,r=le(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},ve={getConstructor:function(t,s,n,r){var i=t(function(t,e){$t(t,i,s,"_i"),t._t=s,t._i=dt(null),t._f=void 0,t._l=void 0,t[ce]=0,null!=e&&se(e,n,t[r],t)});return Jt(i.prototype,{clear:function(){for(var t=ae(this,s),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[ce]=0},delete:function(t){var e=ae(this,s),n=fe(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[ce]--}return!!n},forEach:function(t){ae(this,s);for(var e,n=b(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!fe(ae(this,s),t)}}),o&&he(i.prototype,"size",{get:function(){return ae(this,s)[ce]}}),i},def:function(t,e,n){var r,i,s=fe(t,e);return s?s.v=n:(t._l=s={i:i=le(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[ce]++,"F"!==i&&(t._i[i]=s)),t},getEntry:fe,setStrong:function(t,n,e){var r;At(t,n,function(t,e){this._t=ae(t,n),this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?st(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,st(1))},e?"entries":"values",!e,!0),r=m[n],o&&r&&!r[oe]&&a.f(r,oe,{configurable:!0,get:function(){return this}})}},de=et("iterator"),ye=!1;try{[7][de]().return=function(){ye=!0}}catch(t){}var pe=Object.getOwnPropertyDescriptor,me={f:o?pe:function(t,e){if(t=P(t),e=s(e,!0),i)try{return pe(t,e)}catch(t){}if(l(t,e))return k(!$.f.call(t,e),t[e])}},ge=function(t,e){if(p(t),!g(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},we={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=b(Function.call,me.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return ge(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:ge}.set;!function(u,t,e,n,a,r){var h=m[u],l=h,c=a?"set":"add",i=l&&l.prototype,s={},o=function(t){var n=i[t];O(i,t,"delete"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return r&&!g(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof l&&(r||i.forEach&&!w(function(){(new l).entries().next()}))){var f=new l,v=f[c](r?{}:-0,1)!=f,d=w(function(){f.has(1)}),y=function(t,e){if(!e&&!ye)return!1;var n=!1;try{var r=[7],i=r[de]();i.next=function(){return{done:n=!0}},r[de]=function(){return i},t(r)}catch(t){}return n}(function(t){new l(t)}),p=!r&&w(function(){for(var t=new l,e=5;e--;)t[c](e,e);return!t.has(-0)});y||(((l=t(function(t,e){$t(t,l,u);var n,r,i,s,o=(n=new h,r=l,(s=t.constructor)!==r&&"function"==typeof s&&(i=s.prototype)!==r.prototype&&g(i)&&we&&we(n,i),n);return null!=e&&se(e,a,o[c],o),o})).prototype=i).constructor=l),(d||p)&&(o("delete"),o("has"),a&&o("get")),(p||v)&&o(c),r&&i.clear&&delete i.clear}else l=n.getConstructor(t,u,a,c),Jt(l.prototype,e),ue.NEED=!0;mt(l,u),s[u]=l,j(j.G+j.W+j.F*(l!=h),s),r||n.setStrong(l,u,a)}("Set",function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},{add:function(t){return ve.def(ae(this,"Set"),t=0===t?0:t,t)}},ve);function be(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var _e={f:et},ke=a.f,xe=function(t){var e=y.Symbol||(y.Symbol=m.Symbol||{});"_"==t.charAt(0)||t in e||ke(e,t,{value:_e.f(t)})};xe("asyncIterator");var Oe=Array.isArray||function(t){return"Array"==E(t)},Se=Q.concat("length","prototype"),Ae={f:Object.getOwnPropertyNames||function(t){return W(t,Se)}},je=Ae.f,Me={}.toString,Ee="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te={f:function(t){return Ee&&"[object Window]"==Me.call(t)?function(t){try{return je(t)}catch(t){return Ee.slice()}}(t):je(P(t))}},Ce=ue.KEY,Pe=me.f,Ne=a.f,Le=Te.f,De=m.Symbol,Fe=m.JSON,Re=Fe&&Fe.stringify,ze="prototype",Ie=et("_hidden"),qe=et("toPrimitive"),Ye={}.propertyIsEnumerable,Xe=Y("symbol-registry"),Ge=Y("symbols"),He=Y("op-symbols"),Be=Object[ze],Ve="function"==typeof De,We=m.QObject,Qe=!We||!We[ze]||!We[ze].findChild,Ue=o&&w(function(){return 7!=dt(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Pe(Be,e);r&&delete Be[e],Ne(t,e,n),r&&t!==Be&&Ne(Be,e,r)}:Ne,Je=function(t){var e=Ge[t]=dt(De[ze]);return e._k=t,e},$e=Ve&&"symbol"==typeof De.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof De},Ke=function(t,e,n){return t===Be&&Ke(He,e,n),p(t),e=s(e,!0),p(n),l(Ge,e)?(n.enumerable?(l(t,Ie)&&t[Ie][e]&&(t[Ie][e]=!1),n=dt(n,{enumerable:k(0,!1)})):(l(t,Ie)||Ne(t,Ie,k(1,{})),t[Ie][e]=!0),Ue(t,e,n)):Ne(t,e,n)},Ze=function(t,e){p(t);for(var n,r=function(t){var e=U(t),n=J.f;if(n)for(var r,i=n(t),s=$.f,o=0;i.length>o;)s.call(t,r=i[o++])&&e.push(r);return e}(e=P(e)),i=0,s=r.length;i<s;)Ke(t,n=r[i++],e[n]);return t},tn=function(t){var e=Ye.call(this,t=s(t,!0));return!(this===Be&&l(Ge,t)&&!l(He,t))&&(!(e||!l(this,t)||!l(Ge,t)||l(this,Ie)&&this[Ie][t])||e)},en=function(t,e){if(t=P(t),e=s(e,!0),t!==Be||!l(Ge,e)||l(He,e)){var n=Pe(t,e);return!n||!l(Ge,e)||l(t,Ie)&&t[Ie][e]||(n.enumerable=!0),n}},nn=function(t){for(var e,n=Le(P(t)),r=[],i=0;n.length>i;)l(Ge,e=n[i++])||e==Ie||e==Ce||r.push(e);return r},rn=function(t){for(var e,n=t===Be,r=Le(n?He:P(t)),i=[],s=0;r.length>s;)!l(Ge,e=r[s++])||n&&!l(Be,e)||i.push(Ge[e]);return i};Ve||(O((De=function(){if(this instanceof De)throw TypeError("Symbol is not a constructor!");var e=v(0<arguments.length?arguments[0]:void 0),n=function(t){this===Be&&n.call(He,t),l(this,Ie)&&l(this[Ie],e)&&(this[Ie][e]=!1),Ue(this,e,k(1,t))};return o&&Qe&&Ue(Be,e,{configurable:!0,set:n}),Je(e)})[ze],"toString",function(){return this._k}),me.f=en,a.f=Ke,Ae.f=Te.f=nn,$.f=tn,J.f=rn,o&&O(Be,"propertyIsEnumerable",tn,!0),_e.f=function(t){return Je(et(t))}),j(j.G+j.W+j.F*!Ve,{Symbol:De});for(var sn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),on=0;sn.length>on;)et(sn[on++]);for(var un=U(et.store),an=0;un.length>an;)xe(un[an++]);j(j.S+j.F*!Ve,"Symbol",{for:function(t){return l(Xe,t+="")?Xe[t]:Xe[t]=De(t)},keyFor:function(t){if(!$e(t))throw TypeError(t+" is not a symbol!");for(var e in Xe)if(Xe[e]===t)return e},useSetter:function(){Qe=!0},useSimple:function(){Qe=!1}}),j(j.S+j.F*!Ve,"Object",{create:function(t,e){return void 0===e?dt(t):Ze(dt(t),e)},defineProperty:Ke,defineProperties:Ze,getOwnPropertyDescriptor:en,getOwnPropertyNames:nn,getOwnPropertySymbols:rn}),Fe&&j(j.S+j.F*(!Ve||w(function(){var t=De();return"[null]"!=Re([t])||"{}"!=Re({a:t})||"{}"!=Re(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!$e(t))return Oe(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$e(e))return e}),r[1]=e,Re.apply(Fe,r)}}),De[ze][qe]||x(De[ze],qe,De[ze].valueOf),mt(De,"Symbol"),mt(Math,"Math",!0),mt(m.JSON,"JSON",!0);var hn={},ln=[];function cn(t,e){if(Array.isArray(t)){var n=!0,r=!1,i=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){cn(s.value,e)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}else if("object"!==Wt(t))vn(Object.keys(e)),hn[t]=Object.assign(hn[t]||{},e);else for(var u in t)cn(u,t[u])}function fn(t){return hn[t]||{}}function vn(t){ln.push.apply(ln,be(t))}var dn=q(!0);j(j.P,"Array",{includes:function(t){return dn(this,t,1<arguments.length?arguments[1]:void 0)}}),it("includes");var yn=et("match"),pn=function(t){var e;return g(t)&&(void 0!==(e=t[yn])?!!e:"RegExp"==E(t))},mn=et("match"),gn="includes";j(j.P+j.F*function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[mn]=!1,!"/./"[e](n)}catch(t){}}return!0}(gn),"String",{includes:function(t){return!!~function(t,e,n){if(pn(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(C(t))}(this,t,gn).indexOf(t,1<arguments.length?arguments[1]:void 0)}});var wn=function(e,t,n){var r=et(e),i=n(C,r,""[e]),s=i[0],o=i[1];w(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})&&(O(String.prototype,e,s),x(RegExp.prototype,r,2==t?function(t,e){return o.call(t,this,e)}:function(t){return o.call(t,this)}))};function bn(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function _n(t){return t%360*Math.PI/180}function kn(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function xn(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function On(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Sn(t,e,n){if(null==e||null==n){var r=t.bbox();null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)}return{width:e,height:n}}function An(t,e){var n,r,i=t.origin;if("string"==typeof i||null==i){var s=(i||"center").toLowerCase().trim(),o=e.bbox(),u=o.height,a=o.width,h=o.x,l=o.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+u:l+u/2;n=null!=t.ox?t.ox:c,r=null!=t.oy?t.oy:f}else n=i[0],r=i[1];return[n,r]}wn("replace",2,function(i,s,o){return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var jn=Object.freeze({map:bn,filter:function(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i},radians:_n,degrees:function(t){return 180*t/Math.PI%360},camelCase:kn,unCamelCase:xn,capitalize:On,proportionalSize:Sn,getOrigin:An}),Mn="http://www.w3.org/2000/svg",En="http://www.w3.org/2000/xmlns/",Tn="http://www.w3.org/1999/xlink",Cn="http://svgjs.com/svgjs",Pn=Object.freeze({ns:Mn,xmlns:En,xlink:Tn,svgjs:Cn}),Nn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function Ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dn=function t(){Ln(this,t)},Fn={},Rn="___SYMBOL___ROOT___";function zn(t){return Nn.document.createElementNS(Mn,t)}function In(t){if(t instanceof Dn)return t;if("object"===Wt(t))return Xn(t);if(null==t)return new Fn[Rn];if("string"==typeof t&&"<"!==t.charAt(0))return Xn(Nn.document.querySelector(t));var e=zn("svg");return e.innerHTML=t,t=Xn(e.firstChild)}function qn(t,e){return e instanceof Nn.window.Node?e:zn(t)}function Yn(t){if(!t)return null;if(t.instance instanceof Dn)return t.instance;var e=On(t.nodeName);return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Fn[e]||(e="Dom"),new Fn[e](t)}var Xn=Yn;function Gn(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Fn[e]=t,n&&(Fn[Rn]=t),vn(Object.keys(t.prototype)),t}function Hn(t){return Fn[t]}var Bn=1e3;function Vn(t){return"Svgjs"+On(t)+Bn++}function Wn(t){for(var e=t.children.length-1;0<=e;e--)Wn(t.children[e]);return t.id?Yn(t).id(Vn(t.nodeName)):Yn(t)}function Qn(t,e,n){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(r in e){var s=e[r];n&&(s=Un(e[r])),t[i].prototype[r]=s}}function Un(i){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[e.length-1];return!r||r.constructor!==Object||r instanceof Array?i.apply(this,e):i.apply(this,e.slice(0,-1)).attr(r)}}cn("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){(t=In(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=In(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){(t=In(t)).before(this)},insertAfter:function(t){(t=In(t)).after(this)}}),wn("split",2,function(i,s,o){var v=pn,d=o,y=[].push,t="split",p="length",m="lastIndex";if("c"=="abbc"[t](/(b)*/)[1]||4!="test"[t](/(?:)/,-1)[p]||2!="ab"[t](/(?:ab)*/)[p]||4!="."[t](/(.?)(.?)/)[p]||1<"."[t](/()()/)[p]||""[t](/.?/)[p]){var g=void 0===/()??/.exec("")[1];o=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!v(t))return d.call(n,t,e);var r,i,s,o,u,a=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,c=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,h+"g");for(g||(r=new RegExp("^"+f.source+"$(?!\\s)",h));(i=f.exec(n))&&!(l<(s=i.index+i[0][p])&&(a.push(n.slice(l,i.index)),!g&&1<i[p]&&i[0].replace(r,function(){for(u=1;u<arguments[p]-2;u++)void 0===arguments[u]&&(i[u]=void 0)}),1<i[p]&&i.index<n[p]&&y.apply(a,i.slice(1)),o=i[0][p],l=s,a[p]>=c));)f[m]===i.index&&f[m]++;return l===n[p]?!o&&f.test("")||a.push(""):a.push(n.slice(l)),a[p]>c?a.slice(0,c):a}}else"0"[t](void 0,0)[p]&&(o=function(t,e){return void 0===t&&0===e?[]:d.call(this,t,e)});return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var Jn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,$n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Kn=/rgb\((\d+),(\d+),(\d+)\)/,Zn=/(#[a-z0-9\-_]+)/i,tr=/\)\s*,?\s*/,er=/\s/g,nr=/^#[a-f0-9]{3,6}$/i,rr=/^rgb\(/,ir=/^(\s+)?$/,sr=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,or=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,ur=/[\s,]+/,ar=/([^e])-/gi,hr=/[MLHVCSQTAZ]/gi,lr=/[MLHVCSQTAZ]/i,cr=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,fr=/\./g,vr=Object.freeze({numberAndUnit:Jn,hex:$n,rgb:Kn,reference:Zn,transforms:tr,whitespace:er,isHex:nr,isRgb:rr,isCss:/[^:]+:[^;]+;?/,isBlank:ir,isNumber:sr,isPercent:/^-?[\d.]+%$/,isImage:or,delimiter:ur,hyphen:ar,pathLetters:hr,isPathLetter:lr,numbersWithDots:cr,dots:fr});cn("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(ur)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),cn("Dom",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var a=kn(o.value);n[a]=this.node.style[a]}}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}if("string"==typeof t)return this.node.style[kn(t)];if("object"===Wt(t))for(var h in t)this.node.style[kn(h)]=null==t[h]||ir.test(t[h])?"":t[h]}return 2===arguments.length&&(this.node.style[kn(t)]=null==e||ir.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),cn("Dom",{data:function(e,t,n){if("object"===Wt(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),cn("Dom",{remember:function(t,e){if("object"===Wt(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var dr=0;function yr(t){var e=In(t).getEventHolder();return e.events||(e.events={}),e.events}function pr(t){return In(t).getEventTarget()}function mr(t,e,r,n,i){var s=r.bind(n||t),o=yr(t),u=pr(t);e=Array.isArray(e)?e:e.split(ur),r._svgjsListenerId||(r._svgjsListenerId=++dr),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][r._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)})}function gr(o,t,u,a){var h=yr(o),l=pr(o);("function"!=typeof u||(u=u._svgjsListenerId))&&(t=Array.isArray(t)?t:(t||"").split(ur)).forEach(function(t){var e,n,r,i=t&&t.split(".")[0],s=t&&t.split(".")[1];if(u)h[i]&&h[i][s||"*"]&&(l.removeEventListener(i,h[i][s||"*"][u],a||!1),delete h[i][s||"*"][u]);else if(i&&s){if(h[i]&&h[i][s]){for(n in h[i][s])gr(l,[i,s].join("."),n);delete h[i][s]}}else if(s)for(t in h)for(e in h[t])s===e&&gr(l,[t,s].join("."));else if(i){if(h[i]){for(e in h[i])gr(l,[i,e].join("."));delete h[i]}}else{for(t in h)gr(l,t);(r=In(o).getEventHolder()).events&&(r.events={})}})}function wr(t,e,n){var r=pr(t);return e instanceof Nn.window.Event||(e=new Nn.window.CustomEvent(e,{detail:n,cancelable:!0})),r.dispatchEvent(e),e}function br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _r(t,e,n){return e&&br(t.prototype,e),n&&br(t,n),t}var kr=function(){var t=p(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};o&&"g"!=/./g.flags&&a.f(RegExp.prototype,"flags",{configurable:!0,get:kr});var xr="toString",Or=/./[xr],Sr=function(t){O(RegExp.prototype,xr,t,!0)};function Ar(t){var e=t.toString(16);return 1===e.length?"0"+e:e}w(function(){return"/a/b"!=Or.call({source:"a",flags:"b"})})?Sr(function(){var t=p(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?kr.call(t):void 0)}):Or.name!=xr&&Sr(function(){return Or.call(this)});var jr=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t,e,n){var r,i;if(this.r=0,this.g=0,this.b=0,t)return"string"==typeof t?rr.test(t)?(r=Kn.exec(t.replace(er,"")),this.r=parseInt(r[1]),this.g=parseInt(r[2]),this.b=parseInt(r[3])):nr.test(t)&&(r=$n.exec(4===(i=t).length?["#",i.substring(1,2),i.substring(1,2),i.substring(2,3),i.substring(2,3),i.substring(3,4),i.substring(3,4)].join(""):i),this.r=parseInt(r[1],16),this.g=parseInt(r[2],16),this.b=parseInt(r[3],16)):Array.isArray(t)?(this.r=t[0],this.g=t[1],this.b=t[2]):"object"===Wt(t)?(this.r=t.r,this.g=t.g,this.b=t.b):3===arguments.length&&(this.r=t,this.g=e,this.b=n),this}},{key:"toString",value:function(){return this.toHex()}},{key:"toArray",value:function(){return[this.r,this.g,this.b]}},{key:"toHex",value:function(){return"#"+Ar(Math.round(this.r))+Ar(Math.round(this.g))+Ar(Math.round(this.b))}},{key:"toRgb",value:function(){return"rgb("+[this.r,this.g,this.b].join()+")"}},{key:"brightness",value:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11}}],[{key:"test",value:function(t){return t+="",nr.test(t)||rr.test(t)}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return this.isRgb(t)||this.test(t)}}]),t}();function Mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Er(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?Mr(t):e}function Tr(t){return(Tr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Cr(t,e,n){return(Cr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Pr(t,e){return(Pr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pr(t,e)}wn("match",1,function(r,i,t){return[function(t){var e=r(this),n=null==t?void 0:t[i];return void 0!==n?n.call(t,e):new RegExp(t)[i](String(e))},t]});var Lr=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return _r(e,[{key:"init",value:function(t,e){var n,r=0,i=0;return n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===Wt(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==n.x?r:n.x,this.y=null==n.y?i:n.y,this}},{key:"clone",value:function(){return new e(this)}},{key:"transform",value:function(t){return new e(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}},{key:"toArray",value:function(){return[this.x,this.y]}}]),e}();function Dr(){if(!Dr.nodes){var t=In().size(2,0);t.node.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";");var e=t.path().node;Dr.nodes={svg:t,path:e}}if(!Dr.nodes.svg.node.parentNode){var n=Nn.document.body||Nn.document.documentElement;Dr.nodes.svg.addTo(n)}return Dr.nodes}function Fr(t){return!(t.w||t.h||t.x||t.y)}var Rr=function(){function o(){Ln(this,o),this.init.apply(this,arguments)}return _r(o,[{key:"init",value:function(t){return t="string"==typeof t?t.split(ur).map(parseFloat):Array.isArray(t)?t:"object"===Wt(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new o(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){var n=1/0,r=-1/0,i=1/0,s=-1/0;return[new Lr(this.x,this.y),new Lr(this.x2,this.y),new Lr(this.x,this.y2),new Lr(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)}),new o(n,i,r-n,s-i)}},{key:"addOffset",value:function(){return this.x+=Nn.window.pageXOffset,this.y+=Nn.window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}},{key:"isNulled",value:function(){return Fr(this)}}]),o}();function zr(t,e){var n,r;try{if(Fr(n=t(this.node))&&(r=this.node,!(Nn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(Nn.document.documentElement,r)))throw new Error("Element not in the dom")}catch(t){n=e(this)}return n}function Ir(t,e,n){return Math.abs(e-t)<(n||1e-6)}cn({viewbox:{viewbox:function(t,e,n,r){return null==t?new Rr(this.attr("viewBox")):this.attr("viewBox",new Rr(t,e,n,r))}}});var qr=function(){function h(){Ln(this,h),this.init.apply(this,arguments)}return _r(h,[{key:"init",value:function(t){var e=h.fromArray([1,0,0,1,0,0]);return t=t instanceof Element?t.matrixify():"string"==typeof t?h.fromArray(t.split(ur).map(parseFloat)):Array.isArray(t)?h.fromArray(t):"object"===Wt(t)&&h.isMatrixLike(t)?t:"object"===Wt(t)?(new h).transform(t):6===arguments.length?h.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(h.isMatrixLike(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new Lr(e.ox,e.oy).transform(this),r=n.x,i=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-r,-i).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(r,i);if(isFinite(e.px)||isFinite(e.py)){var o=new Lr(r,i).transform(s),u=e.px?e.px-o.x:0,a=e.py?e.py-o.y:0;s.translateO(u,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,r=t.scaleX||1,i=t.scaleY||1,s=t.shear||0,o=t.rotate||0,u=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(r,i).shearO(s).rotateO(o).translateO(u,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=0<a?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,v=Math.cos(c),d=Math.sin(c),y=(n*i+r*s)/a,p=i*l/(y*n-r)||s*l/(y*r+n);return{scaleX:l,scaleY:p,shear:y,rotate:f,translateX:o-t+t*v*l+e*(y*v*l-d*p),translateY:u-e+t*d*l+e*(y*d*l+v*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);var u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,r){var i;return(i=this.clone()).scaleO.apply(i,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t);var i=this.a,s=this.b,o=this.c,u=this.d,a=this.e,h=this.f;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=_n(t);var r=Math.cos(t),i=Math.sin(t),s=this.a,o=this.b,u=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f;return this.a=n+r*t,this.c=i+s*t,this.e=o+u*t-e*t,this}},{key:"skew",value:function(t,e,n,r){var i;return(i=this.clone()).skewO.apply(i,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t),t=_n(t),e=_n(e);var i=Math.tan(t),s=Math.tan(e),o=this.a,u=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"equals",value:function(t){var e=new h(t);return Ir(this.a,e.a)&&Ir(this.b,e.b)&&Ir(this.c,e.c)&&Ir(this.d,e.d)&&Ir(this.e,e.e)&&Ir(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new Lr(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,v=new Lr(t.position||t.px||t.positionX,t.py||t.positionY),d=v.x,y=v.y,p=new Lr(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new Lr(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:d,py:y}}},{key:"matrixMultiply",value:function(t,e,n){var r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}}]),h}();var Yr=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {"," [name]: class extends baseClass {"," constructor (...args) {"," super(...args)"," _constructor && _constructor.apply(this, args)"," }"," }","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,r=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return((r.prototype=Object.create(e.prototype)).constructor=r).prototype.map=function(t){var e=new r;return e.push.apply(e,Array.prototype.map.call(this,t)),e},r}}}(),Xr=Yr("List",Array,function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if("number"==typeof t)return this;this.length=0,this.push.apply(this,be(t))});function Gr(t,e){return new Xr(bn((e||Nn.document).querySelectorAll(t),function(t){return Yn(t)}))}Qn(Xr,{each:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof e?this.map(function(t){return t[e].apply(t,n)}):(this.forEach(function(t){e.call(t,t)}),this)},toArray:function(){return Array.prototype.concat.apply([],this)}}),Xr.extend=function(t){t=t.reduce(function(t,r){return t[r]=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.each.apply(this,[r].concat(e))},t},{}),Qn(Xr,t)};var Hr=function(t){function r(){var t,e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).events,n=void 0===e?{}:e;return Ln(this,r),(t=Er(this,Tr(r).call(this))).events=n,t}return Nr(r,Dn),_r(r,[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e){return wr(this,t,e)}},{key:"dispatchEvent",value:function(t){var e=this.getEventHolder().events;if(!e)return!0;var n=e[t.type];for(var r in n)for(var i in n[r])n[r][i](t);return!t.defaultPrevented}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}},{key:"getEventHolder",value:function(){return this}},{key:"getEventTarget",value:function(){return this}},{key:"off",value:function(t,e){return gr(this,t,e),this}},{key:"on",value:function(t,e,n,r){return mr(this,t,e,n,r),this}},{key:"removeEventListener",value:function(){}}]),r}();function Br(){}var Vr={duration:400,ease:">",delay:0},Wr={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},Qr=Object.freeze({noop:Br,timeline:Vr,attrs:Wr}),Ur=Yr("SVGArray",Array,function(t){this.init(t)});Qn(Ur,{init:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,be(this.parse(t)))),this},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,be(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(ur).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var Jr=function(){function n(){Ln(this,n),this.init.apply(this,arguments)}return _r(n,[{key:"init",value:function(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(Jn))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit),this}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}}]),n}(),$r=[];var Dom=function(t){function Dom(t,e){var n;return Ln(this,Dom),(n=Er(this,Tr(Dom).call(this,t))).node=t,n.type=t.nodeName,e&&t!==e&&n.attr(e),n}return Nr(Dom,Hr),_r(Dom,[{key:"add",value:function(t,e){return t=In(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"addTo",value:function(t){return In(t).put(this)}},{key:"children",value:function(){return new Xr(bn(this.node.children,function(t){return Yn(t)}))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}},{key:"clone",value:function(){return this.writeDataToDom(),Wn(this.node.cloneNode(!0))}},{key:"each",value:function(t,e){var n,r,i=this.children();for(n=0,r=i.length;n<r;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}},{key:"element",value:function(t){return this.put(new Dom(zn(t)))}},{key:"first",value:function(){return Yn(this.node.firstChild)}},{key:"get",value:function(t){return Yn(this.node.childNodes[t])}},{key:"getEventHolder",value:function(){return this.node}},{key:"getEventTarget",value:function(){return this.node}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=Vn(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return Yn(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node;return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=Yn(e.node.parentNode),!t)return e;for(;e&&e.node instanceof Nn.window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=Yn(e.node.parentNode)}}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"putIn",value:function(t){return In(t).add(this)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=In(t),this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:2,e=1<arguments.length?arguments[1]:void 0,n=Math.pow(10,t),r=this.attr();e||(e=Object.keys(r));var i={};return e.forEach(function(t){i[t]=Math.round(r[t]*n)/n}),this.attr(i),this}},{key:"toString",value:function(){return this.id()}},{key:"svg",value:function(n,t){var e,r,i;if(!1===n&&(t=!1,n=null),null==n||"function"==typeof n){t=null==t||t,this.writeDataToDom();var s=this;if(null!=n){if(s=Yn(s.node.cloneNode(!0)),t){var o=n(s);if(s=o||s,!1===o)return""}s.each(function(){var t=n(this),e=t||this;!1===t?this.remove():t&&this!==e&&this.replace(e)},!0)}return t?s.node.outerHTML:s.node.innerHTML}for(t=null!=t&&t,e=Nn.document.createElementNS(Mn,"svg"),i=Nn.document.createDocumentFragment(),e.innerHTML=n,r=e.children.length;r--;)i.appendChild(e.firstElementChild);var u=this.parent();return t?this.replace(i)&&u:this.add(i)}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this}}]),Dom}();Qn(Dom,{attr:function(n,t,e){var r=this;if(null==n){n={},t=this.node.attributes;var i=!0,s=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(i=(u=a.next()).done);i=!0){var h=u.value;n[h.nodeName]=sr.test(h.nodeValue)?parseFloat(h.nodeValue):h.nodeValue}}catch(t){s=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(s)throw o}}return n}if(n instanceof Array)return n.reduce(function(t,e){return t[e]=r.attr(e),t},{});if("object"===Wt(n))for(t in n)this.attr(t,n[t]);else if(null===t)this.node.removeAttribute(n);else{if(null==t)return null==(t=this.node.getAttribute(n))?Wr[n]:sr.test(t)?parseFloat(t):t;"number"==typeof(t=$r.reduce(function(t,e){return e(n,t,r)},t))?t=new Jr(t):jr.isColor(t)?t=new jr(t):t.constructor===Array&&(t=new Ur(t)),"leading"===n?this.leading&&this.leading(t):"string"==typeof e?this.node.setAttributeNS(e,n,t.toString()):this.node.setAttribute(n,t.toString()),!this.rebuild||"font-size"!==n&&"x"!==n||this.rebuild()}return this},find:function(t){return Gr(t,this.node)}}),Gn(Dom);var Svg=Hn(Rn),Element=function(t){function Element(t,e){var n;return Ln(this,Element),(n=Er(this,Tr(Element).call(this,t,e))).dom={},n.node.instance=Mr(Mr(n)),t.hasAttribute("svgjs:data")&&n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n}return Nr(Element,Dom),_r(Element,[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){return this.root().defs()}},{key:"root",value:function(){var t=this.parent(Svg);return t&&t.root()}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Nn.document;t=In(t);for(var e=new Xr,n=this;(n=n.parent())&&n.node!==t.node&&n.node!==Nn.document;)e.push(n);return e}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=t.match(Zn);return e?In(e[1]):null}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.width(new Jr(n.width)).height(new Jr(n.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),Cr(Tr(Element.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}]),Element}();Qn(Element,{bbox:function(){return new Rr(zr.call(this,function(t){return t.getBBox()},function(e){try{var t=e.clone().addTo(Dr().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error('Getting bbox of element "'+e.node.nodeName+'" is not possible')}}))},rbox:function(t){var e=new Rr(zr.call(this,function(t){return t.getBoundingClientRect()},function(t){throw new Error('Getting rbox of element "'+t.node.nodeName+'" is not possible')}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new Lr(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new qr(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new qr(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new qr(e)}}),Gn(Element);var Kr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function Zr(i){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,r;e=i,r=s[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return i}function ti(t){return this.attr("rx",t)}function ei(t){return this.attr("ry",t)}function ni(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ri(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ii(t){return null==t?this.attr("cx"):this.attr("cx",t)}function si(t){return null==t?this.attr("cy"):this.attr("cy",t)}function oi(t){return null==t?2*this.rx():this.rx(new Jr(t).divide(2))}function ui(t){return null==t?2*this.ry():this.ry(new Jr(t).divide(2))}["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this.attr(e);if("string"==typeof t||jr.isRgb(t)||t instanceof Element)this.attr(e,t);else for(n=Kr[e].length-1;0<=n;n--)null!=t[Kr[e][n]]&&this.attr(Kr.prefix(e,Kr[e][n]),t[Kr[e][n]]);return this},cn(["Shape","Runner"],t)}),cn(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new qr(this):this.attr("transform",new qr(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),r="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];this.transform({flip:n,origin:r},!0)},opacity:function(t){return this.attr("opacity",t)},dmove:function(t,e){return this.dx(t).dy(e)}}),cn("Element",{dx:function(t){return this.x(new Jr(t).plus(this.x()))},dy:function(t){return this.y(new Jr(t).plus(this.y()))}}),cn("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new Jr(t)):this.rx(t).ry(null==e?t:e)}}),cn("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Lr(this.node.getPointAtLength(t))}}),cn(["Element","Runner"],{font:function(t,e){if("object"===Wt(t))for(e in t)this.font(e,t[e]);return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),cn("Text",{ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},amove:function(t,e){return this.ax(t).ay(e)}}),cn("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?gr(this,e):mr(this,e,t),this},t},{})),cn("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(tr).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(ur).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(qr.fromArray(e[1])):t[e[0]].apply(t,e[1])},new qr)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toRoot:function(){return this.toParent(this.root())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new qr(this).decompose();return n[t]||n}qr.isMatrixLike(t)||(t=Zr({},t,{origin:An(t,this)}));var r=new qr(!0===e?this:e||!1).transform(t);return this.attr("transform",r)}});var ai=Object.freeze({rx:ti,ry:ei,x:ni,y:ri,cx:ii,cy:si,width:oi,height:ui}),Shape=function(t){function Shape(){return Ln(this,Shape),Er(this,Tr(Shape).apply(this,arguments))}return Nr(Shape,Element),Shape}();Gn(Shape);var Circle=function(t){function Circle(t){return Ln(this,Circle),Er(this,Tr(Circle).call(this,qn("circle",t),t))}return Nr(Circle,Shape),_r(Circle,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new Jr(t).divide(2))}}]),Circle}();Qn(Circle,{x:ni,y:ri,cx:ii,cy:si,width:oi,height:ui}),cn({Element:{circle:Un(function(t){return this.put(new Circle).size(t).move(0,0)})}}),Gn(Circle);var Container=function(t){function Container(){return Ln(this,Container),Er(this,Tr(Container).apply(this,arguments))}return Nr(Container,Element),_r(Container,[{key:"flatten",value:function(t){return this.each(function(){return this instanceof Container?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),Container}();Gn(Container);var Defs=function(t){function Defs(t){return Ln(this,Defs),Er(this,Tr(Defs).call(this,qn("defs",t),t))}return Nr(Defs,Container),_r(Defs,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),Defs}();Gn(Defs);var Ellipse=function(t){function Ellipse(t){return Ln(this,Ellipse),Er(this,Tr(Ellipse).call(this,qn("ellipse",t),t))}return Nr(Ellipse,Shape),_r(Ellipse,[{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.rx(new Jr(n.width).divide(2)).ry(new Jr(n.height).divide(2))}}]),Ellipse}();Qn(Ellipse,ai),cn("Container",{ellipse:Un(function(t,e){return this.put(new Ellipse).size(t,e).move(0,0)})}),Gn(Ellipse);var Stop=function(t){function Stop(t){return Ln(this,Stop),Er(this,Tr(Stop).call(this,qn("stop",t),t))}return Nr(Stop,Element),_r(Stop,[{key:"update",value:function(t){return("number"==typeof t||t instanceof Jr)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Jr(t.offset)),this}}]),Stop}();function hi(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Jr(t),fy:new Jr(e)}):this.attr({x1:new Jr(t),y1:new Jr(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Jr(t),cy:new Jr(e)}):this.attr({x2:new Jr(t),y2:new Jr(e)})}Gn(Stop);var ci=Object.freeze({from:hi,to:li}),Gradient=function(t){function Gradient(t,e){return Ln(this,Gradient),Er(this,Tr(Gradient).call(this,qn(t+"Gradient","string"==typeof t?null:t),e))}return Nr(Gradient,Container),_r(Gradient,[{key:"stop",value:function(t,e,n){return this.put(new Stop).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),Cr(Tr(Gradient.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Gr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Rr}}]),Gradient}();Qn(Gradient,ci),cn({Container:{gradient:Un(function(t,e){return this.defs().gradient(t,e)})},Defs:{gradient:Un(function(t,e){return this.put(new Gradient(t)).update(e)})}}),Gn(Gradient);var Pattern=function(t){function Pattern(t){return Ln(this,Pattern),Er(this,Tr(Pattern).call(this,qn("pattern",t),t))}return Nr(Pattern,Container),_r(Pattern,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),Cr(Tr(Pattern.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Gr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Rr}}]),Pattern}();cn({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:Un(function(t,e,n){return this.put(new Pattern).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),Gn(Pattern);var fi,Image=function(t){function Image(t){return Ln(this,Image),Er(this,Tr(Image).call(this,qn("image",t),t))}return Nr(Image,Shape),_r(Image,[{key:"load",value:function(t,n){if(!t)return this;var r=new Nn.window.Image;return mr(r,"load",function(t){var e=this.parent(Pattern);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof Pattern&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)},this),mr(r,"load error",function(){gr(r)}),this.attr("href",r.src=t,Tn)}}]),Image}();fi=function(t,e,n){return"fill"!==t&&"stroke"!==t||or.test(e)&&(e=n.root().defs().image(e)),e instanceof Image&&(e=n.root().defs().pattern(0,0,function(t){t.add(e)})),e},$r.push(fi),cn({Container:{image:Un(function(t,e){return this.put(new Image).size(0,0).load(t,e)})}}),Gn(Image);var vi=Yr("PointArray",Ur);Qn(vi,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,r=[];e<n;e++)r.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new vi(r)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(ur).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r=this.length-1;0<=r;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this},size:function(t,e){var n,r=this.bbox();for(n=this.length-1;0<=n;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this},bbox:function(){var e=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),r=Math.min(t[0],r),i=Math.min(t[1],i)}),{x:r,y:i,width:e-r,height:n-i}}});var di=vi;var yi=Object.freeze({MorphArray:di,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),Line=function(t){function Line(t){return Ln(this,Line),Er(this,Tr(Line).call(this,qn("line",t),t))}return Nr(Line,Shape),_r(Line,[{key:"array",value:function(){return new vi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new vi(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),Line}();Qn(Line,yi),cn({Container:{line:Un(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Line.prototype.plot.apply(this.put(new Line),null!=e[0]?e:[0,0,0,0])})}}),Gn(Line);var Marker=function(t){function Marker(t){return Ln(this,Marker),Er(this,Tr(Marker).call(this,qn("marker",t),t))}return Nr(Marker,Container),_r(Marker,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),Marker}();cn({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:Un(function(t,e,n){return this.put(new Marker).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker:function(t,e,n,r){var i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=e instanceof Marker?e:this.defs().marker(e,n,r),this.attr(i,t)}}}),Gn(Marker);var pi,mi,gi=[].sort,wi=[1,2,3];function bi(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}j(j.P+j.F*(w(function(){wi.sort(void 0)})||!w(function(){wi.sort(null)})||!((pi=gi)&&w(function(){mi?pi.call(null,function(){},1):pi.call(null)}))),"Array",{sort:function(t){return void 0===t?gi.call(K(this)):gi.call(K(this),d(t))}});var _i={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(e,n,r,i){return function(t){return t<0?0<e?n/e*t:0<r?i/r*t:0:1<t?r<1?(1-i)/(1-r)*t+(i-r)/(1-r):e<1?(1-n)/(1-e)*t+(n-e)/(1-e):1:3*t*Math.pow(1-t,2)*n+3*Math.pow(t,2)*(1-t)*i+Math.pow(t,3)}},steps:function(i){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"end";s=s.split("-").reverse()[0];var o=i;return"none"===s?--o:"both"===s&&++o,function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=Math.floor(t*i),r=t*n%1==0;return"start"!==s&&"both"!==s||++n,e&&r&&--n,0<=t&&n<0&&(n=0),t<=1&&o<n&&(n=o),n/o}}},ki=function(){function t(){Ln(this,t)}return _r(t,[{key:"done",value:function(){return!1}}]),t}(),xi=function(t){function n(t){var e;return Ln(this,n),(e=Er(this,Tr(n).call(this))).ease=_i[t||Vr.ease]||t,e}return Nr(n,ki),_r(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),Oi=function(t){function n(t){var e;return Ln(this,n),(e=Er(this,Tr(n).call(this))).stepper=t,e}return Nr(n,ki),_r(n,[{key:"step",value:function(t,e,n,r){return this.stepper(t,e,n,r)}},{key:"done",value:function(t){return t.done}}]),n}();function Si(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}var Ai=function(t){function r(t,e){var n;return Ln(this,r),(n=Er(this,Tr(r).call(this))).duration(t||500).overshoot(e||0),n}return Nr(r,Oi),_r(r,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}}]),r}();Qn(Ai,{duration:bi("_duration",Si),overshoot:bi("_overshoot",Si)});var ji=function(t){function s(t,e,n,r){var i;return Ln(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,r=null==r?1e3:r,(i=Er(this,Tr(s).call(this))).p(t).i(e).d(n).windup(r),i}return Nr(s,Oi),_r(s,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;var i=e-t,s=(r.integral||0)+i*n,o=(i-(r.error||0))/n,u=this.windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}}]),s}();Qn(ji,{windup:bi("windup"),p:bi("P"),i:bi("I"),d:bi("D")});var Mi=Yr("PathArray",Ur);function Ei(t,e,n,r){return n+r.replace(fr," .")}for(var Ti={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ci="mlhvqtcsaz".split(""),Pi=0,Ni=Ci.length;Pi<Ni;++Pi)Ti[Ci[Pi]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var r=0,i=t.length;r<i;++r)t[r]=t[r]+(r%2?e.y:e.x);return Ti[s](t,e,n)}}(Ci[Pi].toUpperCase());Qn(Mi,{toString:function(){return function(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e][0],null!=t[e][1]&&(r+=t[e][1],null!=t[e][2]&&(r+=" ",r+=t[e][2],null!=t[e][3]&&(r+=" ",r+=t[e][3],r+=" ",r+=t[e][4],null!=t[e][5]&&(r+=" ",r+=t[e][5],r+=" ",r+=t[e][6],null!=t[e][7]&&(r+=" ",r+=t[e][7])))));return r+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r,i=this.length-1;0<=i;i--)"M"===(r=this[i][0])||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this},size:function(t,e){var n,r,i=this.bbox();for(n=this.length-1;0<=n;n--)"M"===(r=this[n][0])||"L"===r||"T"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===r?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===r?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===r||"S"===r||"Q"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===r&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===r&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this},equalCommands:function(t){var e,n,r;for(t=new Mi(t),r=this.length===t.length,e=0,n=this.length;r&&e<n;e++)r=this[e][0]===t[e][0];return r},morph:function(t){return t=new Mi(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,r,i,s=this,o=this.destination.value,u=[],a=new Mi;for(e=0,n=s.length;e<n;e++){for(u[e]=[s[e][0]],r=1,i=s[e].length;r<i;r++)u[e][r]=s[e][r]+(o[e][r]-s[e][r])*t;"A"===u[e][0]&&(u[e][4]=+(0!==u[e][4]),u[e][5]=+(0!==u[e][5]))}return a.value=u,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof Mi)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(cr,Ei).replace(hr," $& ").replace(ar,"$1 -").trim().split(ur):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var r=[],i=new Lr,s=new Lr,o=0,u=e.length;lr.test(e[o])?(t=e[o],++o):"M"===t?t="L":"m"===t&&(t="l"),r.push(Ti[t].call(null,e.slice(o,o+=n[t.toUpperCase()]).map(parseFloat),i,s)),o<u;);return r},bbox:function(){return Dr().path.setAttribute("d",this.toString()),Dr.nodes.path.getBBox()}});var Li=function(){function e(t){Ln(this,e),this._stepper=t||new xi("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return _r(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=Wt(t);"number"===e?this.type(Jr):"string"===e?jr.isColor(t)?this.type(jr):ur.test(t)?this.type(hr.test(t)?Mi:Ur):Jn.test(t)?this.type(Jr):this.type(Di):-1<zi.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(Ur):"object"===e?this.type(Ri):this.type(Di)}var n=new this._type(t).toArray();return this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var r=this;return this._morphObj.fromArray(this._from.map(function(t,e){return r._stepper.step(t,r._to[e],n,r._context[e],r._context)}))}}]),e}(),Di=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),Fi=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return _r(e,[{key:"init",value:function(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();Fi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Ri=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(var n in t)e.push([n,t[n]]);return e.sort(function(t,e){return t[0]-e[0]}),this.values=e.reduce(function(t,e){return t.concat(e)},[]),this}this.values=t}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),zi=[Di,Fi,Ri];function Ii(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];zi.push.apply(zi,be([].concat(t)))}function qi(){Qn(zi,{to:function(t){return(new Li).type(this.constructor).from(this.valueOf()).to(t)},fromArray:function(t){return this.init(t),this}})}var Path=function(t){function Path(t){return Ln(this,Path),Er(this,Tr(Path).call(this,qn("path",t),t))}return Nr(Path,Shape),_r(Path,[{key:"array",value:function(){return this._array||(this._array=new Mi(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Mi(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return Gr('svg textpath [href*="'+this.id()+'"]')}}]),Path}();Path.prototype.MorphArray=Mi,cn({Container:{path:Un(function(t){return this.put(new Path).plot(t||new Mi)})}}),Gn(Path);var Yi=Object.freeze({array:function(){return this._array||(this._array=new vi(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new vi(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=Sn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),Polygon=function(t){function Polygon(t){return Ln(this,Polygon),Er(this,Tr(Polygon).call(this,qn("polygon",t),t))}return Nr(Polygon,Shape),Polygon}();cn({Container:{polygon:Un(function(t){return this.put(new Polygon).plot(t||new vi)})}}),Qn(Polygon,yi),Qn(Polygon,Yi),Gn(Polygon);var Polyline=function(t){function Polyline(t){return Ln(this,Polyline),Er(this,Tr(Polyline).call(this,qn("polyline",t),t))}return Nr(Polyline,Shape),Polyline}();cn({Container:{polyline:Un(function(t){return this.put(new Polyline).plot(t||new vi)})}}),Qn(Polyline,yi),Qn(Polyline,Yi),Gn(Polyline);var Rect=function(t){function Rect(t){return Ln(this,Rect),Er(this,Tr(Rect).call(this,qn("rect",t),t))}return Nr(Rect,Shape),Rect}();Qn(Rect,{rx:ti,ry:ei}),cn({Container:{rect:Un(function(t,e){return this.put(new Rect).size(t,e)})}}),Gn(Rect);var Xi=function(){function t(){Ln(this,t),this._first=null,this._last=null}return _r(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),Gi={nextDraw:null,frames:new Xi,timeouts:new Xi,timer:function(){return Nn.window.performance||Nn.window.Date},transforms:[],frame:function(t){var e=Gi.frames.push({run:t});return null===Gi.nextDraw&&(Gi.nextDraw=Nn.window.requestAnimationFrame(Gi._draw)),e},transform_frame:function(t,e){Gi.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Gi.timer().now()+e,r=Gi.timeouts.push({run:t,time:n});return null===Gi.nextDraw&&(Gi.nextDraw=Nn.window.requestAnimationFrame(Gi._draw)),r},cancelFrame:function(t){null!=t&&Gi.frames.remove(t)},clearTimeout:function(t){null!=t&&Gi.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Gi.timeouts.last();(e=Gi.timeouts.shift())&&(t>=e.time?e.run():Gi.timeouts.push(e),e!==n););for(var r=null,i=Gi.frames.last();r!==i&&(r=Gi.frames.shift());)r.run();Gi.transforms.forEach(function(t){t()}),Gi.nextDraw=Gi.timeouts.first()||Gi.frames.first()?Nn.window.requestAnimationFrame(Gi._draw):null}},Hi=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Bi=function(){var t=Nn.window;return(t.performance||t.Date).now()},Vi=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Bi;return Ln(this,n),(t=Er(this,Tr(n).call(this)))._timeSource=e,t._startTime=0,t._speed=1,t._persist=0,t._nextFrame=null,t._paused=!0,t._runners=[],t._order=[],t._time=0,t._lastSourceTime=0,t._lastStepTime=0,t._step=t._step.bind(Mr(Mr(t))),t}return Nr(n,Hr),_r(n,[{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Hi).sort(function(t,e){return t.runner.id-e.runner.id});var r=0,i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var s=this._runners[t.id];s&&(r=s.start+e,e=0)}return t.unschedule(),t.timeline(this),this._runners[t.id]={persist:this.persist(),runner:t,start:r+e},this._order.push(t.id),this.updateTime()._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"getEndTime",value:function(){var t=this._runners[this._order[this._order.length-1]],e=t?t.runner.duration():0;return(t?t.start:0)+e}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"finish",value:function(){return this.time(this.getEndTime()+1),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_step",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),n=e-this._lastSourceTime;t&&(n=0);var r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var i=!1,s=0,o=this._order.length;s<o;s++){var u=this._runners[this._order[s]],a=u.runner,h=r,l=this._time-u.start;if(l<=0)i=!0,a.reset();else if(l<h&&(h=l),a.active())if(a.step(h).done){if(!0!==u.persist){a.duration()-a.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[s]],this._order.splice(s--,1)&&--o,a.timeline(null))}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._order.length&&this._speed<0&&0<this._time?this._continue():(this.fire("finished"),this.pause()),this}},{key:"_continue",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return Gi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._step(!0):(this._paused||(this._nextFrame=Gi.frame(this._step)),this)}},{key:"active",value:function(){return!!this._nextFrame}}]),n}();cn({Element:{timeline:function(){return this._timeline=this._timeline||new Vi,this._timeline}}});var Wi=function(t){function s(t){var e;return Ln(this,s),(e=Er(this,Tr(s).call(this))).id=s.id++,t="function"==typeof(t=null==t?Vr.duration:t)?new Oi(t):t,e._element=null,e._timeline=null,e.done=!1,e._queue=[],e._duration="number"==typeof t&&t,e._isDeclarative=t instanceof Oi,e._stepper=e._isDeclarative?t:new xi,e._history={},e.enabled=!0,e._time=0,e._lastTime=0,e._reseted=!0,e.transforms=new qr,e.transformId=1,e._haveReversed=!1,e._reverse=!1,e._loopsDone=0,e._swing=!1,e._wait=0,e._times=1,e}return Nr(s,Hr),_r(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var r=s.sanitise(t,e,n),i=new s(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof Vi||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===Wt(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n,r){return this._queue.push({initialiser:t||Br,runner:e||Br,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finish",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),r=(this._time-n*e)/this._duration;return Math.min(n+r,this._times)}var i=t%1,s=e*Math.floor(t)+this._duration*i;return this.time(s)}},{key:"position",value:function(t){var e,n=this._time,i=this._duration,s=this._wait,r=this._times,o=this._swing,u=this._reverse;if(null==t){var a=function(t){var e=o*Math.floor(t%(2*(s+i))/(s+i)),n=e&&!u||!e&&u,r=Math.pow(-1,n)*(t%(s+i))/i+n;return Math.max(Math.min(r,1),0)},h=r*(s+i)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=o&&l%2==0;return e=l+(c&&!u||u&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var r=this.duration(),i=this._lastTime<=0&&0<this._time,s=this._lastTime<this._time&&this.time>r;this._lastTime=this._time,i&&this.fire("start",this);var o=this._isDeclarative;if(this.done=!o&&!s&&this._time>=r,this._reseted=!1,n||o){this._initialise(n),this.transforms=new qr;var u=this._run(o?t:e);this.fire("step",this)}return this.done=this.done||u&&o,this.done&&this.fire("finish",this),this}},{key:"reset",value:function(){return this._reseted||(this.loops(0),this._reseted=!0),this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new xi(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var r=this.timeline();return r&&r._continue(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var r=this._queue[e],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,r=this._queue.length;n<r;++n){var i=this._queue[n],s=i.runner.call(this,t);i.finished=i.finished||!0===s,e=e&&i.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new qr,this}},{key:"clearTransformsFromQueue",value:function(){this.done||(this._queue=this._queue.filter(function(t){return!t.isTransform}))}}],[{key:"sanitise",value:function(t,e,n){var r=1,i=!1,s=0;return e=e||Vr.delay,n=n||"last","object"!==Wt(t=t||Vr.duration)||t instanceof ki||(e=t.delay||e,n=t.when||n,i=t.swing||i,r=t.times||r,s=t.wait||s,t=t.duration||Vr.duration),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}}]),s}();Wi.id=0;var Qi=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new qr,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];Ln(this,r),this.transforms=t,this.id=e,this.done=n}return _r(r,[{key:"clearTransformsFromQueue",value:function(){}}]),r}();Qn([Wi,Qi],{mergeWith:function(t){return new Qi(t.transforms.lmultiply(this.transforms),t.id)}});var Ui=function(t,e){return t.lmultiplyO(e)},Ji=function(t){return t.transforms};var $i=function(){function t(){Ln(this,t),this.runners=[],this.ids=[]}return _r(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),r=this.ids.indexOf(e)+1;return this.ids.splice(r,0,n),this.runners.splice(r,0,t),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,r=null;return this.runners.forEach(function(t,e){r&&t.done&&r.done&&(n.remove(t.id),n.edit(r.id,t.mergeWith(r))),r=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Qi).forEach(function(t){return t.clearTransformsFromQueue()}),this}}]),t}(),Ki=0;cn({Element:{animate:function(t,e,n){var r=Wi.sanitise(t,e,n),i=this.timeline();return new Wi(r.duration).loop(r).element(this).timeline(i.play()).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(Ji).reduce(Ui,new qr)},addRunner:function(t){this._transformationRunners.add(t),Gi.transform_frame(function(){var t=this._transformationRunners.runners.map(Ji).reduce(Ui,new qr);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new $i).add(new Qi(new qr(this))),this._frameId=Ki++)}}}),Qn(Wi,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===Wt(n))for(var r in t)this.styleAttr(e,r,t[r]);var i=new Li(this._stepper).to(t);return this.queue(function(){i=i.from(this.element()[e](n))},function(t){return this.element()[e](n,i.at(t)),i.done()}),this},zoom:function(t,e){var n=new Li(this._stepper).to(new Jr(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(v,d,y){if(d=v.relative||d,this._isDeclarative&&!d&&this._tryRetarget("transform",v))return this;var p=qr.isMatrixLike(v);y=null!=v.affine?v.affine:null!=y?y:!p;var m,g,w,b,_,k=new Li(this._stepper).type(y?Fi:qr);return this.queue(function(){g=g||this.element(),m=m||An(v,g),_=new qr(d?void 0:g),g.addRunner(this),d||g._clearTransformRunnersBefore(this)},function(t){d||this.clearTransform();var e=new Lr(m).transform(g._currentTransform(this)),n=e.x,r=e.y,i=new qr(Zr({},v,{origin:[n,r]})),s=this._isDeclarative&&w?w:_;if(y){i=i.decompose(n,r),s=s.decompose(n,r);var o=i.rotate,u=s.rotate,a=[o-360,o,o+360],h=a.map(function(t){return Math.abs(t-u)}),l=Math.min.apply(Math,be(h)),c=h.indexOf(l);i.rotate=a[c]}d&&(p||(i.rotate=v.rotate||0),this._isDeclarative&&b&&(s.rotate=b)),k.from(s),k.to(i);var f=k.at(t);return b=f.rotate,w=new qr(f),this.addTransform(w),k.done()},function(t){(t.origin||"center").toString()!==(v.origin||"center").toString()&&(m=An(v,g)),v=Zr({},t,{origin:m})},!0),this._isDeclarative&&this._rememberMorpher("transform",k),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("x",t)},dy:function(t){return this._queueNumberDelta("y",t)},_queueNumberDelta:function(e,t){if(t=new Jr(t),this._tryRetarget(e,t))return this;var n=new Li(this._stepper).to(t),r=null;return this.queue(function(){r=this.element()[e](),n.from(r),n.to(r+t)},function(t){return this.element()[e](n.at(t)),n.done()},function(t){n.to(r+new Jr(t))}),this._rememberMorpher(e,n),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Li(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new Jr(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);var i=this._element.MorphArray().to(t);return this.queue(function(){i.from(this._element.array())},function(t){this._element.plot(i.at(t))}),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,r){return this._queueObject("viewbox",new Rr(t,e,n,r))},update:function(t){return"object"!==Wt(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Qn(Wi,{rx:ti,ry:ei,from:hi,to:li});var Zi=function(t){function Svg(t){var e;return Ln(this,Svg),(e=Er(this,Tr(Svg).call(this,qn("svg",t),t))).namespace(),e}return Nr(Svg,Container),_r(Svg,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof Nn.window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"root",value:function(){return this.isRoot()?this:Cr(Tr(Svg.prototype),"root",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Mn,version:"1.1"}).attr("xmlns:xlink",Tn,En).attr("xmlns:svgjs",Cn,En):this.root().namespace()}},{key:"defs",value:function(){return this.isRoot()?Yn(this.node.getElementsByTagName("defs")[0])||this.put(new Defs):this.root().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:Yn(this.node.parentNode):Cr(Tr(Svg.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),Svg}();cn({Container:{nested:Un(function(){return this.put(new Zi)})}}),Gn(Zi,"Svg",!0);var ts=function(t){function e(t){return Ln(this,e),Er(this,Tr(e).call(this,qn("symbol",t),t))}return Nr(e,Container),e}();cn({Container:{symbol:Un(function(){return this.put(new ts)})}}),Gn(ts);var es=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Nn.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Text=function(t){function Text(t){var e;return Ln(this,Text),(e=Er(this,Tr(Text).call(this,qn("text",t),t))).dom.leading=new Jr(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",Wr["font-family"]),e}return Nr(Text,Shape),_r(Text,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var r=0,i=e.length;r<i;++r)"textPath"!==e[r].nodeName?(r!==n&&3!==e[r].nodeType&&!0===Yn(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent):0===r&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,o=(t=t.split("\n")).length;s<o;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new Jr(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var n=this,r=0,i=this.dom.leading;this.each(function(){var t=Nn.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=i*new Jr(t);this.dom.newLined&&(this.attr("x",n.attr("x")),"\n"===this.text()?r+=e:(this.attr("dy",e+r),r=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new Jr(t.leading||1.3),this}}]),Text}();Qn(Text,es),cn({Container:{text:Un(function(t){return this.put(new Text).text(t)}),plain:Un(function(t){return this.put(new Text).plain(t)})}}),Gn(Text);var Tspan=function(t){function Tspan(t){return Ln(this,Tspan),Er(this,Tr(Tspan).call(this,qn("tspan",t),t))}return Nr(Tspan,Text),_r(Tspan,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){var t=this.parent(Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),Tspan}();Qn(Tspan,es),cn({Tspan:{tspan:Un(function(t){var e=new Tspan;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)})}}),Gn(Tspan);var ClipPath=function(t){function ClipPath(t){return Ln(this,ClipPath),Er(this,Tr(ClipPath).call(this,qn("clipPath",t),t))}return Nr(ClipPath,Container),_r(ClipPath,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),Cr(Tr(ClipPath.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Gr('svg [clip-path*="'+this.id()+'"]')}}]),ClipPath}();cn({Container:{clip:Un(function(){return this.defs().put(new ClipPath)})},Element:{clipWith:function(t){var e=t instanceof ClipPath?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),Gn(ClipPath);var G=function(t){function G(t){return Ln(this,G),Er(this,Tr(G).call(this,qn("g",t),t))}return Nr(G,Container),G}();cn({Element:{group:Un(function(){return this.put(new G)})}}),Gn(G);var A=function(t){function A(t){return Ln(this,A),Er(this,Tr(A).call(this,qn("a",t),t))}return Nr(A,Container),_r(A,[{key:"to",value:function(t){return this.attr("href",t,Tn)}},{key:"target",value:function(t){return this.attr("target",t)}}]),A}();cn({Container:{link:Un(function(t){return this.put(new A).to(t)})},Element:{linkTo:function(t){var e=new A;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),Gn(A);var Mask=function(t){function Mask(t){return Ln(this,Mask),Er(this,Tr(Mask).call(this,qn("mask",t),t))}return Nr(Mask,Container),_r(Mask,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),Cr(Tr(Mask.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Gr('svg [mask*="'+this.id()+'"]')}}]),Mask}();cn({Container:{mask:Un(function(){return this.defs().put(new Mask)})},Element:{maskWith:function(t){var e=t instanceof Mask?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),Gn(Mask);var Style=function(t){function Style(t){return Ln(this,Style),Er(this,Tr(Style).call(this,qn("style",t),t))}return Nr(Style,Element),_r(Style,[{key:"addText",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",Zr({fontFamily:t,src:e},n))}},{key:"rule",value:function(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;var n=t+"{";for(var r in e)n+=xn(r)+":"+e[r]+";";return n+="}"}(t,e))}}]),Style}();cn("Dom",{style:Un(function(t,e){return this.put(new Style).rule(t,e)}),fontface:Un(function(t,e,n){return this.put(new Style).font(t,e,n)})}),Gn(Style);var ns,rs,is,ss,os,us,as,hs,ls,cs=et("species"),fs=(is=1==(ns=5),ss=2==ns,os=3==ns,us=4==ns,as=6==ns,hs=5==ns||as,ls=rs||function(t,e){return Oe(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!Oe(r.prototype)||(r=void 0),g(r)&&null===(r=r[cs])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r},function(t,e,n){for(var r,i,s=K(t),o=T(s),u=b(e,n,3),a=R(o.length),h=0,l=is?ls(t,a):ss?ls(t,0):void 0;h<a;h++)if((hs||h in o)&&(i=u(r=o[h],h,s),ns))if(is)l[h]=i;else if(i)switch(ns){case 3:return!0;case 5:return r;case 6:return h;case 2:l.push(r)}else if(us)return!1;return as?-1:os||us?us:l}),vs="find",ds=!0;vs in[]&&Array(1)[vs](function(){ds=!1}),j(j.P+j.F*ds,"Array",{find:function(t){return fs(this,t,1<arguments.length?arguments[1]:void 0)}}),it(vs);var TextPath=function(t){function TextPath(t){return Ln(this,TextPath),Er(this,Tr(TextPath).call(this,qn("textPath",t),t))}return Nr(TextPath,Text),_r(TextPath,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),TextPath}();cn({Container:{textPath:Un(function(t,e){return this.defs().path(e).text(t).addTo(this)})},Text:{path:Un(function(t){var e=new TextPath;return t instanceof Path||(t=this.root().defs().path(t)),e.attr("href","#"+t,Tn),this.put(e)}),textPath:function(){return this.find("textPath")[0]}},Path:{text:Un(function(t){if(t instanceof Text){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Text).path(this).text(t)}),targets:function(){return Gr('svg [href*="'+this.id()+'"]')}}}),TextPath.prototype.MorphArray=Mi,Gn(TextPath);var Use=function(t){function Use(t){return Ln(this,Use),Er(this,Tr(Use).call(this,qn("use",t),t))}return Nr(Use,Shape),_r(Use,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,Tn)}}]),Use}();cn({Container:{use:Un(function(t,e){return this.put(new Use).element(t,e)})}}),Gn(Use);var ys=In;Qn([Zi,ts,Image,Pattern,Marker],fn("viewbox")),Qn([Line,Polyline,Polygon,Path],fn("marker")),Qn(Text,fn("Text")),Qn(Path,fn("Path")),Qn(Defs,fn("Defs")),Qn([Text,Tspan],fn("Tspan")),Qn([Rect,Ellipse,Circle,Gradient],fn("radius")),Qn(Hr,fn("EventTarget")),Qn(Dom,fn("Dom")),Qn(Element,fn("Element")),Qn(Shape,fn("Shape")),Qn(Container,fn("Container")),Qn(Wi,fn("Runner")),Xr.extend(be(new Set(ln))),Ii([Jr,jr,Rr,qr,Ur,vi,Mi]),qi();var ps=Object.freeze({Morphable:Li,registerMorphableType:Ii,makeMorphable:qi,TransformBag:Fi,ObjectBag:Ri,NonMorphable:Di,defaults:Qr,utils:jn,namespaces:Pn,regex:vr,SVG:ys,parser:Dr,find:Gr,registerWindow:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;Nn.window=t,Nn.document=e},Animator:Gi,Controller:Oi,Ease:xi,PID:ji,Spring:Ai,easing:_i,Queue:Xi,Runner:Wi,Timeline:Vi,Array:Ur,Box:Rr,Color:jr,EventTarget:Hr,Matrix:qr,Number:Jr,PathArray:Mi,Point:Lr,PointArray:vi,List:Xr,Circle:Circle,ClipPath:ClipPath,Container:Container,Defs:Defs,Dom:Dom,Element:Element,Ellipse:Ellipse,Gradient:Gradient,G:G,A:A,Image:Image,Line:Line,Marker:Marker,Mask:Mask,Path:Path,Pattern:Pattern,Polygon:Polygon,Polyline:Polyline,Rect:Rect,Shape:Shape,Stop:Stop,Style:Style,Svg:Zi,Symbol:ts,Text:Text,TextPath:TextPath,Tspan:Tspan,Use:Use,on:mr,off:gr,dispatch:wr,root:Rn,makeNode:zn,makeInstance:In,nodeOrNew:qn,adopt:Yn,mockAdopt:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Yn;Xn=t},register:Gn,getClass:Hn,eid:Vn,assignNewId:Wn,extend:Qn,wrapWithAttrCheck:Un});function ms(t){return In(t)}return Object.assign(ms,ps),ms}();
//# sourceMappingURL=svg.min.js.map
|