celestial-chart 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ // celestial-chart — BSD-3-Clause. Full licence text: LICENSE, notices: NOTICE.md
2
+ // Copyright (c) 2015 Olaf Frohn (d3-celestial), (c) 2026 Fekete László
3
+ // Includes: d3-* and versor modules, (c) Mike Bostock, ISC
4
+
5
+ (()=>{var Gg=Object.defineProperty;var jc=(t,e)=>{for(var r in e)Gg(t,r,{get:e[r],enumerable:!0})};var Ja="http://www.w3.org/1999/xhtml",jl={svg:"http://www.w3.org/2000/svg",xhtml:Ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Cr(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),jl.hasOwnProperty(e)?{space:jl[e],local:t}:t}function Yg(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ja&&e.documentElement.namespaceURI===Ja?e.createElement(t):e.createElementNS(r,t)}}function Wg(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ti(t){var e=Cr(t);return(e.local?Wg:Yg)(e)}function Vg(){}function wn(t){return t==null?Vg:function(){return this.querySelector(t)}}function Fc(t){typeof t!="function"&&(t=wn(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],o=i.length,s=n[a]=new Array(o),l,f,u=0;u<o;++u)(l=i[u])&&(f=t.call(l,l.__data__,u,i))&&("__data__"in l&&(f.__data__=l.__data__),s[u]=f);return new Zt(n,this._parents)}function Bo(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Bg(){return[]}function Xo(t){return t==null?Bg:function(){return this.querySelectorAll(t)}}function Xg(t){return function(){return Bo(t.apply(this,arguments))}}function Lc(t){typeof t=="function"?t=Xg(t):t=Xo(t);for(var e=this._groups,r=e.length,n=[],a=[],i=0;i<r;++i)for(var o=e[i],s=o.length,l,f=0;f<s;++f)(l=o[f])&&(n.push(t.call(l,l.__data__,f,o)),a.push(l));return new Zt(n,a)}function Zo(t){return function(){return this.matches(t)}}function ei(t){return function(e){return e.matches(t)}}var Zg=Array.prototype.find;function Qg(t){return function(){return Zg.call(this.children,t)}}function Kg(){return this.firstElementChild}function Oc(t){return this.select(t==null?Kg:Qg(typeof t=="function"?t:ei(t)))}var Jg=Array.prototype.filter;function t2(){return Array.from(this.children)}function e2(t){return function(){return Jg.call(this.children,t)}}function $c(t){return this.selectAll(t==null?t2:e2(typeof t=="function"?t:ei(t)))}function Uc(t){typeof t!="function"&&(t=Zo(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],o=i.length,s=n[a]=[],l,f=0;f<o;++f)(l=i[f])&&t.call(l,l.__data__,f,i)&&s.push(l);return new Zt(n,this._parents)}function ri(t){return new Array(t.length)}function Hc(){return new Zt(this._enter||this._groups.map(ri),this._parents)}function Qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Qo.prototype={constructor:Qo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Gc(t){return function(){return t}}function r2(t,e,r,n,a,i){for(var o=0,s,l=e.length,f=i.length;o<f;++o)(s=e[o])?(s.__data__=i[o],n[o]=s):r[o]=new Qo(t,i[o]);for(;o<l;++o)(s=e[o])&&(a[o]=s)}function n2(t,e,r,n,a,i,o){var s,l,f=new Map,u=e.length,c=i.length,p=new Array(u),m;for(s=0;s<u;++s)(l=e[s])&&(p[s]=m=o.call(l,l.__data__,s,e)+"",f.has(m)?a[s]=l:f.set(m,l));for(s=0;s<c;++s)m=o.call(t,i[s],s,i)+"",(l=f.get(m))?(n[s]=l,l.__data__=i[s],f.delete(m)):r[s]=new Qo(t,i[s]);for(s=0;s<u;++s)(l=e[s])&&f.get(p[s])===l&&(a[s]=l)}function o2(t){return t.__data__}function Yc(t,e){if(!arguments.length)return Array.from(this,o2);var r=e?n2:r2,n=this._parents,a=this._groups;typeof t!="function"&&(t=Gc(t));for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),f=0;f<i;++f){var u=n[f],c=a[f],p=c.length,m=a2(t.call(u,u&&u.__data__,f,n)),h=m.length,d=s[f]=new Array(h),y=o[f]=new Array(h),b=l[f]=new Array(p);r(u,c,d,y,b,m,e);for(var g=0,k=0,w,D;g<h;++g)if(w=d[g]){for(g>=k&&(k=g+1);!(D=y[k])&&++k<h;);w._next=D||null}}return o=new Zt(o,n),o._enter=s,o._exit=l,o}function a2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wc(){return new Zt(this._exit||this._groups.map(ri),this._parents)}function Vc(t,e,r){var n=this.enter(),a=this,i=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?i.remove():r(i),n&&a?n.merge(a).order():a}function Bc(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,a=r.length,i=n.length,o=Math.min(a,i),s=new Array(a),l=0;l<o;++l)for(var f=r[l],u=n[l],c=f.length,p=s[l]=new Array(c),m,h=0;h<c;++h)(m=f[h]||u[h])&&(p[h]=m);for(;l<a;++l)s[l]=r[l];return new Zt(s,this._parents)}function Xc(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],a=n.length-1,i=n[a],o;--a>=0;)(o=n[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function Zc(t){t||(t=i2);function e(c,p){return c&&p?t(c.__data__,p.__data__):!c-!p}for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i){for(var o=r[i],s=o.length,l=a[i]=new Array(s),f,u=0;u<s;++u)(f=o[u])&&(l[u]=f);l.sort(e)}return new Zt(a,this._parents).order()}function i2(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Qc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Kc(){return Array.from(this)}function Jc(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],a=0,i=n.length;a<i;++a){var o=n[a];if(o)return o}return null}function t0(){let t=0;for(let e of this)++t;return t}function e0(){return!this.node()}function r0(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length,s;i<o;++i)(s=a[i])&&t.call(s,s.__data__,i,a);return this}function s2(t){return function(){this.removeAttribute(t)}}function l2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function u2(t,e){return function(){this.setAttribute(t,e)}}function f2(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function c2(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function p2(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function n0(t,e){var r=Cr(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?l2:s2:typeof e=="function"?r.local?p2:c2:r.local?f2:u2)(r,e))}function ni(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function m2(t){return function(){this.style.removeProperty(t)}}function h2(t,e,r){return function(){this.style.setProperty(t,e,r)}}function d2(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function o0(t,e,r){return arguments.length>1?this.each((e==null?m2:typeof e=="function"?d2:h2)(t,e,r==null?"":r)):Kr(this.node(),t)}function Kr(t,e){return t.style.getPropertyValue(e)||ni(t).getComputedStyle(t,null).getPropertyValue(e)}function g2(t){return function(){delete this[t]}}function v2(t,e){return function(){this[t]=e}}function y2(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function a0(t,e){return arguments.length>1?this.each((e==null?g2:typeof e=="function"?y2:v2)(t,e)):this.node()[t]}function i0(t){return t.trim().split(/^|\s+/)}function Fl(t){return t.classList||new s0(t)}function s0(t){this._node=t,this._names=i0(t.getAttribute("class")||"")}s0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function l0(t,e){for(var r=Fl(t),n=-1,a=e.length;++n<a;)r.add(e[n])}function u0(t,e){for(var r=Fl(t),n=-1,a=e.length;++n<a;)r.remove(e[n])}function x2(t){return function(){l0(this,t)}}function w2(t){return function(){u0(this,t)}}function M2(t,e){return function(){(e.apply(this,arguments)?l0:u0)(this,t)}}function f0(t,e){var r=i0(t+"");if(arguments.length<2){for(var n=Fl(this.node()),a=-1,i=r.length;++a<i;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?M2:e?x2:w2)(r,e))}function b2(){this.textContent=""}function S2(t){return function(){this.textContent=t}}function P2(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function c0(t){return arguments.length?this.each(t==null?b2:(typeof t=="function"?P2:S2)(t)):this.node().textContent}function k2(){this.innerHTML=""}function R2(t){return function(){this.innerHTML=t}}function T2(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function p0(t){return arguments.length?this.each(t==null?k2:(typeof t=="function"?T2:R2)(t)):this.node().innerHTML}function E2(){this.nextSibling&&this.parentNode.appendChild(this)}function m0(){return this.each(E2)}function z2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function h0(){return this.each(z2)}function d0(t){var e=typeof t=="function"?t:ti(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function _2(){return null}function g0(t,e){var r=typeof t=="function"?t:ti(t),n=e==null?_2:typeof e=="function"?e:wn(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function A2(){var t=this.parentNode;t&&t.removeChild(this)}function v0(){return this.each(A2)}function q2(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function C2(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function y0(t){return this.select(t?C2:q2)}function x0(t){return arguments.length?this.property("__data__",t):this.node().__data__}function I2(t){return function(e){t.call(this,e,this.__data__)}}function N2(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function D2(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r<a;++r)i=e[r],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++n]=i;++n?e.length=n:delete this.__on}}}function j2(t,e,r){return function(){var n=this.__on,a,i=I2(e);if(n){for(var o=0,s=n.length;o<s;++o)if((a=n[o]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=r),a.value=e;return}}this.addEventListener(t.type,i,r),a={type:t.type,name:t.name,value:e,listener:i,options:r},n?n.push(a):this.__on=[a]}}function w0(t,e,r){var n=N2(t+""),a,i=n.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,f=s.length,u;l<f;++l)for(a=0,u=s[l];a<i;++a)if((o=n[a]).type===u.type&&o.name===u.name)return u.value}return}for(s=e?j2:D2,a=0;a<i;++a)this.each(s(n[a],e,r));return this}function M0(t,e,r){var n=ni(t),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function F2(t,e){return function(){return M0(this,t,e)}}function L2(t,e){return function(){return M0(this,t,e.apply(this,arguments))}}function b0(t,e){return this.each((typeof e=="function"?L2:F2)(t,e))}function*S0(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],a=0,i=n.length,o;a<i;++a)(o=n[a])&&(yield o)}var Ko=[null];function Zt(t,e){this._groups=t,this._parents=e}function P0(){return new Zt([[document.documentElement]],Ko)}function O2(){return this}Zt.prototype=P0.prototype={constructor:Zt,select:Fc,selectAll:Lc,selectChild:Oc,selectChildren:$c,filter:Uc,data:Yc,enter:Hc,exit:Wc,join:Vc,merge:Bc,selection:O2,order:Xc,sort:Zc,call:Qc,nodes:Kc,node:Jc,size:t0,empty:e0,each:r0,attr:n0,style:o0,property:a0,classed:f0,text:c0,html:p0,raise:m0,lower:h0,append:d0,insert:g0,remove:v0,clone:y0,datum:x0,on:w0,dispatch:b0,[Symbol.iterator]:S0};var Ir=P0;function dt(t){return typeof t=="string"?new Zt([[document.querySelector(t)]],[document.documentElement]):new Zt([[t]],Ko)}function k0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Je(t,e){if(t=k0(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}function oi(t){return typeof t=="string"?new Zt([document.querySelectorAll(t)],[document.documentElement]):new Zt([Bo(t)],Ko)}function $2(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function ai(t,e){return fetch(t,e).then($2)}var Tu={};jc(Tu,{geoAlbers:()=>Ui,geoAlbersUsa:()=>Tp,geoArea:()=>Bl,geoAzimuthalEqualArea:()=>Ep,geoAzimuthalEqualAreaRaw:()=>on,geoAzimuthalEquidistant:()=>zp,geoAzimuthalEquidistantRaw:()=>ar,geoBounds:()=>gi,geoCentroid:()=>nr,geoCircle:()=>je,geoClipAntimeridian:()=>ua,geoClipCircle:()=>zi,geoClipExtent:()=>K0,geoClipRectangle:()=>Lr,geoConicConformal:()=>Ap,geoConicConformalRaw:()=>ku,geoConicEqualArea:()=>_n,geoConicEqualAreaRaw:()=>Su,geoConicEquidistant:()=>qp,geoConicEquidistantRaw:()=>Ru,geoContains:()=>iu,geoDistance:()=>qe,geoEqualEarth:()=>Cp,geoEqualEarthRaw:()=>Vi,geoEquirectangular:()=>Yi,geoEquirectangularRaw:()=>qn,geoGnomonic:()=>xo,geoGnomonicRaw:()=>Cn,geoGraticule:()=>Or,geoGraticule10:()=>sp,geoIdentity:()=>Ip,geoInterpolate:()=>br,geoLength:()=>Ci,geoMercator:()=>_p,geoMercatorRaw:()=>An,geoNaturalEarth1:()=>Np,geoNaturalEarth1Raw:()=>Bi,geoOrthographic:()=>Zi,geoOrthographicRaw:()=>Xi,geoPath:()=>En,geoProjection:()=>$,geoProjectionMutator:()=>Ct,geoRotation:()=>or,geoStereographic:()=>Dp,geoStereographicRaw:()=>Qi,geoStream:()=>Qt,geoTransform:()=>Sp,geoTransverseMercator:()=>jp,geoTransverseMercatorRaw:()=>Ki});function Mn(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ll(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ii(t){let e,r,n;t.length!==2?(e=Mn,r=(s,l)=>Mn(t(s),l),n=(s,l)=>t(s)-l):(e=t===Mn||t===Ll?t:U2,r=t,n=t);function a(s,l,f=0,u=s.length){if(f<u){if(e(l,l)!==0)return u;do{let c=f+u>>>1;r(s[c],l)<0?f=c+1:u=c}while(f<u)}return f}function i(s,l,f=0,u=s.length){if(f<u){if(e(l,l)!==0)return u;do{let c=f+u>>>1;r(s[c],l)<=0?f=c+1:u=c}while(f<u)}return f}function o(s,l,f=0,u=s.length){let c=a(s,l,f,u-1);return c>f&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:a,center:o,right:i}}function U2(){return 0}function Ol(t){return t===null?NaN:+t}var R0=ii(Mn),T0=R0.right,H2=R0.left,G2=ii(Ol).center,$l=T0;var Vt=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let r=this._partials,n=0;for(let a=0;a<this._n&&a<32;a++){let i=r[a],o=e+i,s=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);s&&(r[n++]=s),e=o}return r[n]=e,this._n=n+1,this}valueOf(){let e=this._partials,r=this._n,n,a,i,o=0;if(r>0){for(o=e[--r];r>0&&(n=o,a=e[--r],o=n+a,i=a-(o-n),!i););r>0&&(i<0&&e[r-1]<0||i>0&&e[r-1]>0)&&(a=i*2,n=o+a,a==n-o&&(o=n))}return o}};var Y2=Math.sqrt(50),W2=Math.sqrt(10),V2=Math.sqrt(2);function si(t,e,r){let n=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=Y2?10:i>=W2?5:i>=V2?2:1,s,l,f;return a<0?(f=Math.pow(10,-a)/o,s=Math.round(t*f),l=Math.round(e*f),s/f<t&&++s,l/f>e&&--l,f=-f):(f=Math.pow(10,a)*o,s=Math.round(t/f),l=Math.round(e/f),s*f<t&&++s,l*f>e&&--l),l<s&&.5<=r&&r<2?si(t,e,r*2):[s,l,f]}function li(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[a,i,o]=n?si(e,t,r):si(t,e,r);if(!(i>=a))return[];let s=i-a+1,l=new Array(s);if(n)if(o<0)for(let f=0;f<s;++f)l[f]=(i-f)/-o;else for(let f=0;f<s;++f)l[f]=(i-f)*o;else if(o<0)for(let f=0;f<s;++f)l[f]=(a+f)/-o;else for(let f=0;f<s;++f)l[f]=(a+f)*o;return l}function Jo(t,e,r){return e=+e,t=+t,r=+r,si(t,e,r)[2]}function Ul(t,e,r){e=+e,t=+t,r=+r;let n=e<t,a=n?Jo(e,t,r):Jo(t,e,r);return(n?-1:1)*(a<0?1/-a:a)}function*B2(t){for(let e of t)yield*e}function Jr(t){return Array.from(B2(t))}function tr(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,i=new Array(a);++n<a;)i[n]=t+n*r;return i}var ut=1e-6,Nr=1e-12,Tt=Math.PI,Ut=Tt/2,ao=Tt/4,ne=Tt*2,It=180/Tt,pt=Tt/180,Pt=Math.abs,er=Math.atan,Gt=Math.atan2,it=Math.cos,ta=Math.ceil,ui=Math.exp;var fi=Math.hypot,bn=Math.log,ci=Math.pow,ot=Math.sin,Me=Math.sign||function(t){return t>0?1:t<0?-1:0},Dt=Math.sqrt,io=Math.tan;function pi(t){return t>1?0:t<-1?Tt:Math.acos(t)}function Yt(t){return t>1?Ut:t<-1?-Ut:Math.asin(t)}function Hl(t){return(t=ot(t/2))*t}function Ft(){}function mi(t,e){t&&z0.hasOwnProperty(t.type)&&z0[t.type](t,e)}var E0={Feature:function(t,e){mi(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++n<a;)mi(r[n].geometry,e)}},z0={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){Gl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)Gl(r[n],e,0)},Polygon:function(t,e){_0(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)_0(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,a=r.length;++n<a;)mi(r[n],e)}};function Gl(t,e,r){var n=-1,a=t.length-r,i;for(e.lineStart();++n<a;)i=t[n],e.point(i[0],i[1],i[2]);e.lineEnd()}function _0(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)Gl(t[r],e,1);e.polygonEnd()}function Qt(t,e){t&&E0.hasOwnProperty(t.type)?E0[t.type](t,e):mi(t,e)}var ea=new Vt,hi=new Vt,A0,q0,Yl,Wl,Vl,pr={point:Ft,lineStart:Ft,lineEnd:Ft,polygonStart:function(){ea=new Vt,pr.lineStart=X2,pr.lineEnd=Z2},polygonEnd:function(){var t=+ea;hi.add(t<0?ne+t:t),this.lineStart=this.lineEnd=this.point=Ft},sphere:function(){hi.add(ne)}};function X2(){pr.point=Q2}function Z2(){C0(A0,q0)}function Q2(t,e){pr.point=C0,A0=t,q0=e,t*=pt,e*=pt,Yl=t,Wl=it(e=e/2+ao),Vl=ot(e)}function C0(t,e){t*=pt,e*=pt,e=e/2+ao;var r=t-Yl,n=r>=0?1:-1,a=n*r,i=it(e),o=ot(e),s=Vl*o,l=Wl*i+s*it(a),f=s*n*ot(a);ea.add(Gt(f,l)),Yl=t,Wl=i,Vl=o}function Bl(t){return hi=new Vt,Qt(t,pr),hi*2}function Sn(t){return[Gt(t[1],t[0]),Yt(t[2])]}function rr(t){var e=t[0],r=t[1],n=it(r);return[n*it(e),n*ot(e),ot(r)]}function ra(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Dr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function di(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function na(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Pn(t){var e=Dt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Kt,De,te,Ve,kn,j0,F0,so,oa,tn,Fr,jr={point:Xl,lineStart:I0,lineEnd:N0,polygonStart:function(){jr.point=O0,jr.lineStart=K2,jr.lineEnd=J2,oa=new Vt,pr.polygonStart()},polygonEnd:function(){pr.polygonEnd(),jr.point=Xl,jr.lineStart=I0,jr.lineEnd=N0,ea<0?(Kt=-(te=180),De=-(Ve=90)):oa>ut?Ve=90:oa<-ut&&(De=-90),Fr[0]=Kt,Fr[1]=te},sphere:function(){Kt=-(te=180),De=-(Ve=90)}};function Xl(t,e){tn.push(Fr=[Kt=t,te=t]),e<De&&(De=e),e>Ve&&(Ve=e)}function L0(t,e){var r=rr([t*pt,e*pt]);if(so){var n=Dr(so,r),a=[n[1],-n[0],0],i=Dr(a,n);Pn(i),i=Sn(i);var o=t-kn,s=o>0?1:-1,l=i[0]*It*s,f,u=Pt(o)>180;u^(s*kn<l&&l<s*t)?(f=i[1]*It,f>Ve&&(Ve=f)):(l=(l+360)%360-180,u^(s*kn<l&&l<s*t)?(f=-i[1]*It,f<De&&(De=f)):(e<De&&(De=e),e>Ve&&(Ve=e))),u?t<kn?We(Kt,t)>We(Kt,te)&&(te=t):We(t,te)>We(Kt,te)&&(Kt=t):te>=Kt?(t<Kt&&(Kt=t),t>te&&(te=t)):t>kn?We(Kt,t)>We(Kt,te)&&(te=t):We(t,te)>We(Kt,te)&&(Kt=t)}else tn.push(Fr=[Kt=t,te=t]);e<De&&(De=e),e>Ve&&(Ve=e),so=r,kn=t}function I0(){jr.point=L0}function N0(){Fr[0]=Kt,Fr[1]=te,jr.point=Xl,so=null}function O0(t,e){if(so){var r=t-kn;oa.add(Pt(r)>180?r+(r>0?360:-360):r)}else j0=t,F0=e;pr.point(t,e),L0(t,e)}function K2(){pr.lineStart()}function J2(){O0(j0,F0),pr.lineEnd(),Pt(oa)>ut&&(Kt=-(te=180)),Fr[0]=Kt,Fr[1]=te,so=null}function We(t,e){return(e-=t)<0?e+360:e}function tv(t,e){return t[0]-e[0]}function D0(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function gi(t){var e,r,n,a,i,o,s;if(Ve=te=-(Kt=De=1/0),tn=[],Qt(t,jr),r=tn.length){for(tn.sort(tv),e=1,n=tn[0],i=[n];e<r;++e)a=tn[e],D0(n,a[0])||D0(n,a[1])?(We(n[0],a[1])>We(n[0],n[1])&&(n[1]=a[1]),We(a[0],n[1])>We(n[0],n[1])&&(n[0]=a[0])):i.push(n=a);for(o=-1/0,r=i.length-1,e=0,n=i[r];e<=r;n=a,++e)a=i[e],(s=We(n[1],a[0]))>o&&(o=s,Kt=a[0],te=n[1])}return tn=Fr=null,Kt===1/0||De===1/0?[[NaN,NaN],[NaN,NaN]]:[[Kt,De],[te,Ve]]}var aa,vi,yi,xi,wi,Mi,bi,Si,Zl,Ql,Kl,H0,G0,ze,_e,Ae,mr={sphere:Ft,point:Jl,lineStart:$0,lineEnd:U0,polygonStart:function(){mr.lineStart=nv,mr.lineEnd=ov},polygonEnd:function(){mr.lineStart=$0,mr.lineEnd=U0}};function Jl(t,e){t*=pt,e*=pt;var r=it(e);ia(r*it(t),r*ot(t),ot(e))}function ia(t,e,r){++aa,yi+=(t-yi)/aa,xi+=(e-xi)/aa,wi+=(r-wi)/aa}function $0(){mr.point=ev}function ev(t,e){t*=pt,e*=pt;var r=it(e);ze=r*it(t),_e=r*ot(t),Ae=ot(e),mr.point=rv,ia(ze,_e,Ae)}function rv(t,e){t*=pt,e*=pt;var r=it(e),n=r*it(t),a=r*ot(t),i=ot(e),o=Gt(Dt((o=_e*i-Ae*a)*o+(o=Ae*n-ze*i)*o+(o=ze*a-_e*n)*o),ze*n+_e*a+Ae*i);vi+=o,Mi+=o*(ze+(ze=n)),bi+=o*(_e+(_e=a)),Si+=o*(Ae+(Ae=i)),ia(ze,_e,Ae)}function U0(){mr.point=Jl}function nv(){mr.point=av}function ov(){Y0(H0,G0),mr.point=Jl}function av(t,e){H0=t,G0=e,t*=pt,e*=pt,mr.point=Y0;var r=it(e);ze=r*it(t),_e=r*ot(t),Ae=ot(e),ia(ze,_e,Ae)}function Y0(t,e){t*=pt,e*=pt;var r=it(e),n=r*it(t),a=r*ot(t),i=ot(e),o=_e*i-Ae*a,s=Ae*n-ze*i,l=ze*a-_e*n,f=fi(o,s,l),u=Yt(f),c=f&&-u/f;Zl.add(c*o),Ql.add(c*s),Kl.add(c*l),vi+=u,Mi+=u*(ze+(ze=n)),bi+=u*(_e+(_e=a)),Si+=u*(Ae+(Ae=i)),ia(ze,_e,Ae)}function nr(t){aa=vi=yi=xi=wi=Mi=bi=Si=0,Zl=new Vt,Ql=new Vt,Kl=new Vt,Qt(t,mr);var e=+Zl,r=+Ql,n=+Kl,a=fi(e,r,n);return a<Nr&&(e=Mi,r=bi,n=Si,vi<ut&&(e=yi,r=xi,n=wi),a=fi(e,r,n),a<Nr)?[NaN,NaN]:[Gt(r,e)*It,Yt(n/a)*It]}function Rn(t){return function(){return t}}function sa(t,e){function r(n,a){return n=t(n,a),e(n[0],n[1])}return t.invert&&e.invert&&(r.invert=function(n,a){return n=e.invert(n,a),n&&t.invert(n[0],n[1])}),r}function tu(t,e){return Pt(t)>Tt&&(t-=Math.round(t/ne)*ne),[t,e]}tu.invert=tu;function la(t,e,r){return(t%=ne)?e||r?sa(V0(t),B0(e,r)):V0(t):e||r?B0(e,r):tu}function W0(t){return function(e,r){return e+=t,Pt(e)>Tt&&(e-=Math.round(e/ne)*ne),[e,r]}}function V0(t){var e=W0(t);return e.invert=W0(-t),e}function B0(t,e){var r=it(t),n=ot(t),a=it(e),i=ot(e);function o(s,l){var f=it(l),u=it(s)*f,c=ot(s)*f,p=ot(l),m=p*r+u*n;return[Gt(c*a-m*i,u*r-p*n),Yt(m*a+c*i)]}return o.invert=function(s,l){var f=it(l),u=it(s)*f,c=ot(s)*f,p=ot(l),m=p*a-c*i;return[Gt(c*a+p*i,u*r+m*n),Yt(m*r-u*n)]},o}function or(t){t=la(t[0]*pt,t[1]*pt,t.length>2?t[2]*pt:0);function e(r){return r=t(r[0]*pt,r[1]*pt),r[0]*=It,r[1]*=It,r}return e.invert=function(r){return r=t.invert(r[0]*pt,r[1]*pt),r[0]*=It,r[1]*=It,r},e}function eu(t,e,r,n,a,i){if(r){var o=it(e),s=ot(e),l=n*r;a==null?(a=e+n*ne,i=e-l/2):(a=X0(o,a),i=X0(o,i),(n>0?a<i:a>i)&&(a+=n*ne));for(var f,u=a;n>0?u>i:u<i;u-=l)f=Sn([o,-s*it(u),-s*ot(u)]),t.point(f[0],f[1])}}function X0(t,e){e=rr(e),e[0]-=t,Pn(e);var r=pi(-e[1]);return((-e[2]<0?-r:r)+ne-ut)%ne}function je(){var t=Rn([0,0]),e=Rn(90),r=Rn(2),n,a,i={point:o};function o(l,f){n.push(l=a(l,f)),l[0]*=It,l[1]*=It}function s(){var l=t.apply(this,arguments),f=e.apply(this,arguments)*pt,u=r.apply(this,arguments)*pt;return n=[],a=la(-l[0]*pt,-l[1]*pt,0).invert,eu(i,f,u,1),l={type:"Polygon",coordinates:[n]},n=a=null,l}return s.center=function(l){return arguments.length?(t=typeof l=="function"?l:Rn([+l[0],+l[1]]),s):t},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Rn(+l),s):e},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:Rn(+l),s):r},s}function Pi(){var t=[],e;return{point:function(r,n,a){e.push([r,n,a])},lineStart:function(){t.push(e=[])},lineEnd:Ft,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function lo(t,e){return Pt(t[0]-e[0])<ut&&Pt(t[1]-e[1])<ut}function ki(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function Ri(t,e,r,n,a){var i=[],o=[],s,l;if(t.forEach(function(h){if(!((d=h.length-1)<=0)){var d,y=h[0],b=h[d],g;if(lo(y,b)){if(!y[2]&&!b[2]){for(a.lineStart(),s=0;s<d;++s)a.point((y=h[s])[0],y[1]);a.lineEnd();return}b[0]+=2*ut}i.push(g=new ki(y,h,null,!0)),o.push(g.o=new ki(y,null,g,!1)),i.push(g=new ki(b,h,null,!1)),o.push(g.o=new ki(b,null,g,!0))}}),!!i.length){for(o.sort(e),Z0(i),Z0(o),s=0,l=o.length;s<l;++s)o[s].e=r=!r;for(var f=i[0],u,c;;){for(var p=f,m=!0;p.v;)if((p=p.n)===f)return;u=p.z,a.lineStart();do{if(p.v=p.o.v=!0,p.e){if(m)for(s=0,l=u.length;s<l;++s)a.point((c=u[s])[0],c[1]);else n(p.x,p.n.x,1,a);p=p.n}else{if(m)for(u=p.p.z,s=u.length-1;s>=0;--s)a.point((c=u[s])[0],c[1]);else n(p.x,p.p.x,-1,a);p=p.p}p=p.o,u=p.z,m=!m}while(!p.v);a.lineEnd()}}}function Z0(t){if(e=t.length){for(var e,r=0,n=t[0],a;++r<e;)n.n=a=t[r],a.p=n,n=a;n.n=a=t[0],a.p=n}}function ru(t){return Pt(t[0])<=Tt?t[0]:Me(t[0])*((Pt(t[0])+Tt)%ne-Tt)}function Ti(t,e){var r=ru(e),n=e[1],a=ot(n),i=[ot(r),-it(r),0],o=0,s=0,l=new Vt;a===1?n=Ut+ut:a===-1&&(n=-Ut-ut);for(var f=0,u=t.length;f<u;++f)if(p=(c=t[f]).length)for(var c,p,m=c[p-1],h=ru(m),d=m[1]/2+ao,y=ot(d),b=it(d),g=0;g<p;++g,h=w,y=F,b=U,m=k){var k=c[g],w=ru(k),D=k[1]/2+ao,F=ot(D),U=it(D),K=w-h,et=K>=0?1:-1,P=et*K,S=P>Tt,N=y*F;if(l.add(Gt(N*et*ot(P),b*U+N*it(P))),o+=S?K+et*ne:K,S^h>=r^w>=r){var Y=Dr(rr(m),rr(k));Pn(Y);var x=Dr(i,Y);Pn(x);var v=(S^K>=0?-1:1)*Yt(x[2]);(n>v||n===v&&(Y[0]||Y[1]))&&(s+=S^K>=0?1:-1)}}return(o<-ut||o<ut&&l<-Nr)^s&1}function Ei(t,e,r,n){return function(a){var i=e(a),o=Pi(),s=e(o),l=!1,f,u,c,p={point:m,lineStart:d,lineEnd:y,polygonStart:function(){p.point=b,p.lineStart=g,p.lineEnd=k,u=[],f=[]},polygonEnd:function(){p.point=m,p.lineStart=d,p.lineEnd=y,u=Jr(u);var w=Ti(f,n);u.length?(l||(a.polygonStart(),l=!0),Ri(u,sv,w,r,a)):w&&(l||(a.polygonStart(),l=!0),a.lineStart(),r(null,null,1,a),a.lineEnd()),l&&(a.polygonEnd(),l=!1),u=f=null},sphere:function(){a.polygonStart(),a.lineStart(),r(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function m(w,D){t(w,D)&&a.point(w,D)}function h(w,D){i.point(w,D)}function d(){p.point=h,i.lineStart()}function y(){p.point=m,i.lineEnd()}function b(w,D){c.push([w,D]),s.point(w,D)}function g(){s.lineStart(),c=[]}function k(){b(c[0][0],c[0][1]),s.lineEnd();var w=s.clean(),D=o.result(),F,U=D.length,K,et,P;if(c.pop(),f.push(c),c=null,!!U){if(w&1){if(et=D[0],(K=et.length-1)>0){for(l||(a.polygonStart(),l=!0),a.lineStart(),F=0;F<K;++F)a.point((P=et[F])[0],P[1]);a.lineEnd()}return}U>1&&w&2&&D.push(D.pop().concat(D.shift())),u.push(D.filter(iv))}}return p}}function iv(t){return t.length>1}function sv(t,e){return((t=t.x)[0]<0?t[1]-Ut-ut:Ut-t[1])-((e=e.x)[0]<0?e[1]-Ut-ut:Ut-e[1])}var ua=Ei(function(){return!0},lv,fv,[-Tt,-Ut]);function lv(t){var e=NaN,r=NaN,n=NaN,a;return{lineStart:function(){t.lineStart(),a=1},point:function(i,o){var s=i>0?Tt:-Tt,l=Pt(i-e);Pt(l-Tt)<ut?(t.point(e,r=(r+o)/2>0?Ut:-Ut),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(i,r),a=0):n!==s&&l>=Tt&&(Pt(e-n)<ut&&(e-=n*ut),Pt(i-s)<ut&&(i-=s*ut),r=uv(e,r,i,o),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(s,r),a=0),t.point(e=i,r=o),n=s},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-a}}}function uv(t,e,r,n){var a,i,o=ot(t-r);return Pt(o)>ut?er((ot(e)*(i=it(n))*ot(r)-ot(n)*(a=it(e))*ot(t))/(a*i*o)):(e+n)/2}function fv(t,e,r,n){var a;if(t==null)a=r*Ut,n.point(-Tt,a),n.point(0,a),n.point(Tt,a),n.point(Tt,0),n.point(Tt,-a),n.point(0,-a),n.point(-Tt,-a),n.point(-Tt,0),n.point(-Tt,a);else if(Pt(t[0]-e[0])>ut){var i=t[0]<e[0]?Tt:-Tt;a=r*i/2,n.point(-i,a),n.point(0,a),n.point(i,a)}else n.point(e[0],e[1])}function zi(t){var e=it(t),r=2*pt,n=e>0,a=Pt(e)>ut;function i(u,c,p,m){eu(m,t,r,p,u,c)}function o(u,c){return it(u)*it(c)>e}function s(u){var c,p,m,h,d;return{lineStart:function(){h=m=!1,d=1},point:function(y,b){var g=[y,b],k,w=o(y,b),D=n?w?0:f(y,b):w?f(y+(y<0?Tt:-Tt),b):0;if(!c&&(h=m=w)&&u.lineStart(),w!==m&&(k=l(c,g),(!k||lo(c,k)||lo(g,k))&&(g[2]=1)),w!==m)d=0,w?(u.lineStart(),k=l(g,c),u.point(k[0],k[1])):(k=l(c,g),u.point(k[0],k[1],2),u.lineEnd()),c=k;else if(a&&c&&n^w){var F;!(D&p)&&(F=l(g,c,!0))&&(d=0,n?(u.lineStart(),u.point(F[0][0],F[0][1]),u.point(F[1][0],F[1][1]),u.lineEnd()):(u.point(F[1][0],F[1][1]),u.lineEnd(),u.lineStart(),u.point(F[0][0],F[0][1],3)))}w&&(!c||!lo(c,g))&&u.point(g[0],g[1]),c=g,m=w,p=D},lineEnd:function(){m&&u.lineEnd(),c=null},clean:function(){return d|(h&&m)<<1}}}function l(u,c,p){var m=rr(u),h=rr(c),d=[1,0,0],y=Dr(m,h),b=ra(y,y),g=y[0],k=b-g*g;if(!k)return!p&&u;var w=e*b/k,D=-e*g/k,F=Dr(d,y),U=na(d,w),K=na(y,D);di(U,K);var et=F,P=ra(U,et),S=ra(et,et),N=P*P-S*(ra(U,U)-1);if(!(N<0)){var Y=Dt(N),x=na(et,(-P-Y)/S);if(di(x,U),x=Sn(x),!p)return x;var v=u[0],z=c[0],V=u[1],j=c[1],Z;z<v&&(Z=v,v=z,z=Z);var G=z-v,at=Pt(G-Tt)<ut,xt=at||G<ut;if(!at&&j<V&&(Z=V,V=j,j=Z),xt?at?V+j>0^x[1]<(Pt(x[0]-v)<ut?V:j):V<=x[1]&&x[1]<=j:G>Tt^(v<=x[0]&&x[0]<=z)){var Mt=na(et,(-P+Y)/S);return di(Mt,U),[x,Sn(Mt)]}}}function f(u,c){var p=n?t:Tt-t,m=0;return u<-p?m|=1:u>p&&(m|=2),c<-p?m|=4:c>p&&(m|=8),m}return Ei(o,s,i,n?[0,-t]:[-Tt,t-Tt])}function Q0(t,e,r,n,a,i){var o=t[0],s=t[1],l=e[0],f=e[1],u=0,c=1,p=l-o,m=f-s,h;if(h=r-o,!(!p&&h>0)){if(h/=p,p<0){if(h<u)return;h<c&&(c=h)}else if(p>0){if(h>c)return;h>u&&(u=h)}if(h=a-o,!(!p&&h<0)){if(h/=p,p<0){if(h>c)return;h>u&&(u=h)}else if(p>0){if(h<u)return;h<c&&(c=h)}if(h=n-s,!(!m&&h>0)){if(h/=m,m<0){if(h<u)return;h<c&&(c=h)}else if(m>0){if(h>c)return;h>u&&(u=h)}if(h=i-s,!(!m&&h<0)){if(h/=m,m<0){if(h>c)return;h>u&&(u=h)}else if(m>0){if(h<u)return;h<c&&(c=h)}return u>0&&(t[0]=o+u*p,t[1]=s+u*m),c<1&&(e[0]=o+c*p,e[1]=s+c*m),!0}}}}}var fa=1e9,_i=-fa;function Lr(t,e,r,n){function a(f,u){return t<=f&&f<=r&&e<=u&&u<=n}function i(f,u,c,p){var m=0,h=0;if(f==null||(m=o(f,c))!==(h=o(u,c))||l(f,u)<0^c>0)do p.point(m===0||m===3?t:r,m>1?n:e);while((m=(m+c+4)%4)!==h);else p.point(u[0],u[1])}function o(f,u){return Pt(f[0]-t)<ut?u>0?0:3:Pt(f[0]-r)<ut?u>0?2:1:Pt(f[1]-e)<ut?u>0?1:0:u>0?3:2}function s(f,u){return l(f.x,u.x)}function l(f,u){var c=o(f,1),p=o(u,1);return c!==p?c-p:c===0?u[1]-f[1]:c===1?f[0]-u[0]:c===2?f[1]-u[1]:u[0]-f[0]}return function(f){var u=f,c=Pi(),p,m,h,d,y,b,g,k,w,D,F,U={point:K,lineStart:N,lineEnd:Y,polygonStart:P,polygonEnd:S};function K(v,z){a(v,z)&&u.point(v,z)}function et(){for(var v=0,z=0,V=m.length;z<V;++z)for(var j=m[z],Z=1,G=j.length,at=j[0],xt,Mt,Rt=at[0],q=at[1];Z<G;++Z)xt=Rt,Mt=q,at=j[Z],Rt=at[0],q=at[1],Mt<=n?q>n&&(Rt-xt)*(n-Mt)>(q-Mt)*(t-xt)&&++v:q<=n&&(Rt-xt)*(n-Mt)<(q-Mt)*(t-xt)&&--v;return v}function P(){u=c,p=[],m=[],F=!0}function S(){var v=et(),z=F&&v,V=(p=Jr(p)).length;(z||V)&&(f.polygonStart(),z&&(f.lineStart(),i(null,null,1,f),f.lineEnd()),V&&Ri(p,s,v,i,f),f.polygonEnd()),u=f,p=m=h=null}function N(){U.point=x,m&&m.push(h=[]),D=!0,w=!1,g=k=NaN}function Y(){p&&(x(d,y),b&&w&&c.rejoin(),p.push(c.result())),U.point=K,w&&u.lineEnd()}function x(v,z){var V=a(v,z);if(m&&h.push([v,z]),D)d=v,y=z,b=V,D=!1,V&&(u.lineStart(),u.point(v,z));else if(V&&w)u.point(v,z);else{var j=[g=Math.max(_i,Math.min(fa,g)),k=Math.max(_i,Math.min(fa,k))],Z=[v=Math.max(_i,Math.min(fa,v)),z=Math.max(_i,Math.min(fa,z))];Q0(j,Z,t,e,r,n)?(w||(u.lineStart(),u.point(j[0],j[1])),u.point(Z[0],Z[1]),V||u.lineEnd(),F=!1):V&&(u.lineStart(),u.point(v,z),F=!1)}g=v,k=z,w=V}return U}}function K0(){var t=0,e=0,r=960,n=500,a,i,o;return o={stream:function(s){return a&&i===s?a:a=Lr(t,e,r,n)(i=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1],a=i=null,o):[[t,e],[r,n]]}}}var nu,ou,Ai,qi,uo={sphere:Ft,point:Ft,lineStart:cv,lineEnd:Ft,polygonStart:Ft,polygonEnd:Ft};function cv(){uo.point=mv,uo.lineEnd=pv}function pv(){uo.point=uo.lineEnd=Ft}function mv(t,e){t*=pt,e*=pt,ou=t,Ai=ot(e),qi=it(e),uo.point=hv}function hv(t,e){t*=pt,e*=pt;var r=ot(e),n=it(e),a=Pt(t-ou),i=it(a),o=ot(a),s=n*o,l=qi*r-Ai*n*i,f=Ai*r+qi*n*i;nu.add(Gt(Dt(s*s+l*l),f)),ou=t,Ai=r,qi=n}function Ci(t){return nu=new Vt,Qt(t,uo),+nu}var au=[null,null],dv={type:"LineString",coordinates:au};function qe(t,e){return au[0]=t,au[1]=e,Ci(dv)}var J0={Feature:function(t,e){return Ii(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,a=r.length;++n<a;)if(Ii(r[n].geometry,e))return!0;return!1}},tp={Sphere:function(){return!0},Point:function(t,e){return ep(t.coordinates,e)},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)if(ep(r[n],e))return!0;return!1},LineString:function(t,e){return rp(t.coordinates,e)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)if(rp(r[n],e))return!0;return!1},Polygon:function(t,e){return np(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,a=r.length;++n<a;)if(np(r[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,a=r.length;++n<a;)if(Ii(r[n],e))return!0;return!1}};function Ii(t,e){return t&&tp.hasOwnProperty(t.type)?tp[t.type](t,e):!1}function ep(t,e){return qe(t,e)===0}function rp(t,e){for(var r,n,a,i=0,o=t.length;i<o;i++){if(n=qe(t[i],e),n===0||i>0&&(a=qe(t[i],t[i-1]),a>0&&r<=a&&n<=a&&(r+n-a)*(1-Math.pow((r-n)/a,2))<Nr*a))return!0;r=n}return!1}function np(t,e){return!!Ti(t.map(gv),op(e))}function gv(t){return t=t.map(op),t.pop(),t}function op(t){return[t[0]*pt,t[1]*pt]}function iu(t,e){return(t&&J0.hasOwnProperty(t.type)?J0[t.type]:Ii)(t,e)}function ap(t,e,r){var n=tr(t,e-ut,r).concat(e);return function(a){return n.map(function(i){return[a,i]})}}function ip(t,e,r){var n=tr(t,e-ut,r).concat(e);return function(a){return n.map(function(i){return[i,a]})}}function Or(){var t,e,r,n,a,i,o,s,l=10,f=l,u=90,c=360,p,m,h,d,y=2.5;function b(){return{type:"MultiLineString",coordinates:g()}}function g(){return tr(ta(n/u)*u,r,u).map(h).concat(tr(ta(s/c)*c,o,c).map(d)).concat(tr(ta(e/l)*l,t,l).filter(function(k){return Pt(k%u)>ut}).map(p)).concat(tr(ta(i/f)*f,a,f).filter(function(k){return Pt(k%c)>ut}).map(m))}return b.lines=function(){return g().map(function(k){return{type:"LineString",coordinates:k}})},b.outline=function(){return{type:"Polygon",coordinates:[h(n).concat(d(o).slice(1),h(r).reverse().slice(1),d(s).reverse().slice(1))]}},b.extent=function(k){return arguments.length?b.extentMajor(k).extentMinor(k):b.extentMinor()},b.extentMajor=function(k){return arguments.length?(n=+k[0][0],r=+k[1][0],s=+k[0][1],o=+k[1][1],n>r&&(k=n,n=r,r=k),s>o&&(k=s,s=o,o=k),b.precision(y)):[[n,s],[r,o]]},b.extentMinor=function(k){return arguments.length?(e=+k[0][0],t=+k[1][0],i=+k[0][1],a=+k[1][1],e>t&&(k=e,e=t,t=k),i>a&&(k=i,i=a,a=k),b.precision(y)):[[e,i],[t,a]]},b.step=function(k){return arguments.length?b.stepMajor(k).stepMinor(k):b.stepMinor()},b.stepMajor=function(k){return arguments.length?(u=+k[0],c=+k[1],b):[u,c]},b.stepMinor=function(k){return arguments.length?(l=+k[0],f=+k[1],b):[l,f]},b.precision=function(k){return arguments.length?(y=+k,p=ap(i,a,90),m=ip(e,t,y),h=ap(s,o,90),d=ip(n,r,y),b):y},b.extentMajor([[-180,-90+ut],[180,90-ut]]).extentMinor([[-180,-80-ut],[180,80+ut]])}function sp(){return Or()()}function br(t,e){var r=t[0]*pt,n=t[1]*pt,a=e[0]*pt,i=e[1]*pt,o=it(n),s=ot(n),l=it(i),f=ot(i),u=o*it(r),c=o*ot(r),p=l*it(a),m=l*ot(a),h=2*Yt(Dt(Hl(i-n)+o*l*Hl(a-r))),d=ot(h),y=h?function(b){var g=ot(b*=h)/d,k=ot(h-b)/d,w=k*u+g*p,D=k*c+g*m,F=k*s+g*f;return[Gt(D,w)*It,Gt(F,Dt(w*w+D*D))*It]}:function(){return[r*It,n*It]};return y.distance=h,y}var en=t=>t;var su=new Vt,lu=new Vt,lp,up,uu,fu,rn={point:Ft,lineStart:Ft,lineEnd:Ft,polygonStart:function(){rn.lineStart=vv,rn.lineEnd=xv},polygonEnd:function(){rn.lineStart=rn.lineEnd=rn.point=Ft,su.add(Pt(lu)),lu=new Vt},result:function(){var t=su/2;return su=new Vt,t}};function vv(){rn.point=yv}function yv(t,e){rn.point=fp,lp=uu=t,up=fu=e}function fp(t,e){lu.add(fu*t-uu*e),uu=t,fu=e}function xv(){fp(lp,up)}var cu=rn;var fo=1/0,Ni=fo,ca=-fo,Di=ca,wv={point:Mv,lineStart:Ft,lineEnd:Ft,polygonStart:Ft,polygonEnd:Ft,result:function(){var t=[[fo,Ni],[ca,Di]];return ca=Di=-(Ni=fo=1/0),t}};function Mv(t,e){t<fo&&(fo=t),t>ca&&(ca=t),e<Ni&&(Ni=e),e>Di&&(Di=e)}var co=wv;var pu=0,mu=0,pa=0,ji=0,Fi=0,po=0,hu=0,du=0,ma=0,mp,hp,Sr,Pr,hr={point:Tn,lineStart:cp,lineEnd:pp,polygonStart:function(){hr.lineStart=Pv,hr.lineEnd=kv},polygonEnd:function(){hr.point=Tn,hr.lineStart=cp,hr.lineEnd=pp},result:function(){var t=ma?[hu/ma,du/ma]:po?[ji/po,Fi/po]:pa?[pu/pa,mu/pa]:[NaN,NaN];return pu=mu=pa=ji=Fi=po=hu=du=ma=0,t}};function Tn(t,e){pu+=t,mu+=e,++pa}function cp(){hr.point=bv}function bv(t,e){hr.point=Sv,Tn(Sr=t,Pr=e)}function Sv(t,e){var r=t-Sr,n=e-Pr,a=Dt(r*r+n*n);ji+=a*(Sr+t)/2,Fi+=a*(Pr+e)/2,po+=a,Tn(Sr=t,Pr=e)}function pp(){hr.point=Tn}function Pv(){hr.point=Rv}function kv(){dp(mp,hp)}function Rv(t,e){hr.point=dp,Tn(mp=Sr=t,hp=Pr=e)}function dp(t,e){var r=t-Sr,n=e-Pr,a=Dt(r*r+n*n);ji+=a*(Sr+t)/2,Fi+=a*(Pr+e)/2,po+=a,a=Pr*t-Sr*e,hu+=a*(Sr+t),du+=a*(Pr+e),ma+=a*3,Tn(Sr=t,Pr=e)}var gu=hr;function Li(t){this._context=t}Li.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ne);break}}},result:Ft};var yu=new Vt,vu,gp,vp,ha,da,Oi={point:Ft,lineStart:function(){Oi.point=Tv},lineEnd:function(){vu&&yp(gp,vp),Oi.point=Ft},polygonStart:function(){vu=!0},polygonEnd:function(){vu=null},result:function(){var t=+yu;return yu=new Vt,t}};function Tv(t,e){Oi.point=yp,gp=ha=t,vp=da=e}function yp(t,e){ha-=t,da-=e,yu.add(Dt(ha*ha+da*da)),ha=t,da=e}var xu=Oi;var xp,$i,wp,Mp,mo=class{constructor(e){this._append=e==null?bp:Ev(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,r){switch(this._point){case 0:{this._append`M${e},${r}`,this._point=1;break}case 1:{this._append`L${e},${r}`;break}default:{if(this._append`M${e},${r}`,this._radius!==wp||this._append!==$i){let n=this._radius,a=this._;this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,wp=n,$i=this._append,Mp=this._,this._=a}this._+=Mp;break}}}result(){let e=this._;return this._="",e.length?e:null}};function bp(t){let e=1;this._+=t[0];for(let r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Ev(t){let e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return bp;if(e!==xp){let r=10**e;xp=e,$i=function(a){let i=1;this._+=a[0];for(let o=a.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+a[i]}}return $i}function En(t,e){let r=3,n=4.5,a,i;function o(s){return s&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),Qt(s,a(i))),i.result()}return o.area=function(s){return Qt(s,a(cu)),cu.result()},o.measure=function(s){return Qt(s,a(xu)),xu.result()},o.bounds=function(s){return Qt(s,a(co)),co.result()},o.centroid=function(s){return Qt(s,a(gu)),gu.result()},o.projection=function(s){return arguments.length?(a=s==null?(t=null,en):(t=s).stream,o):t},o.context=function(s){return arguments.length?(i=s==null?(e=null,new mo(r)):new Li(e=s),typeof n!="function"&&i.pointRadius(n),o):e},o.pointRadius=function(s){return arguments.length?(n=typeof s=="function"?s:(i.pointRadius(+s),+s),o):n},o.digits=function(s){if(!arguments.length)return r;if(s==null)r=null;else{let l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);r=l}return e===null&&(i=new mo(r)),o},o.projection(t).digits(r).context(e)}function Sp(t){return{stream:nn(t)}}function nn(t){return function(e){var r=new wu;for(var n in t)r[n]=t[n];return r.stream=e,r}}function wu(){}wu.prototype={constructor:wu,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Mu(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),n!=null&&t.clipExtent(null),Qt(r,t.stream(co)),e(co.result()),n!=null&&t.clipExtent(n),t}function zn(t,e,r){return Mu(t,function(n){var a=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(a/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),s=+e[0][0]+(a-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([s,l])},r)}function ho(t,e,r){return zn(t,[[0,0],e],r)}function go(t,e,r){return Mu(t,function(n){var a=+e,i=a/(n[1][0]-n[0][0]),o=(a-i*(n[1][0]+n[0][0]))/2,s=-i*n[0][1];t.scale(150*i).translate([o,s])},r)}function vo(t,e,r){return Mu(t,function(n){var a=+e,i=a/(n[1][1]-n[0][1]),o=-i*n[0][0],s=(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])},r)}var Pp=16,zv=it(30*pt);function bu(t,e){return+e?Av(t,e):_v(t)}function _v(t){return nn({point:function(e,r){e=t(e,r),this.stream.point(e[0],e[1])}})}function Av(t,e){function r(n,a,i,o,s,l,f,u,c,p,m,h,d,y){var b=f-n,g=u-a,k=b*b+g*g;if(k>4*e&&d--){var w=o+p,D=s+m,F=l+h,U=Dt(w*w+D*D+F*F),K=Yt(F/=U),et=Pt(Pt(F)-1)<ut||Pt(i-c)<ut?(i+c)/2:Gt(D,w),P=t(et,K),S=P[0],N=P[1],Y=S-n,x=N-a,v=g*Y-b*x;(v*v/k>e||Pt((b*Y+g*x)/k-.5)>.3||o*p+s*m+l*h<zv)&&(r(n,a,i,o,s,l,S,N,et,w/=U,D/=U,F,d,y),y.point(S,N),r(S,N,et,w,D,F,f,u,c,p,m,h,d,y))}}return function(n){var a,i,o,s,l,f,u,c,p,m,h,d,y={point:b,lineStart:g,lineEnd:w,polygonStart:function(){n.polygonStart(),y.lineStart=D},polygonEnd:function(){n.polygonEnd(),y.lineStart=g}};function b(K,et){K=t(K,et),n.point(K[0],K[1])}function g(){c=NaN,y.point=k,n.lineStart()}function k(K,et){var P=rr([K,et]),S=t(K,et);r(c,p,u,m,h,d,c=S[0],p=S[1],u=K,m=P[0],h=P[1],d=P[2],Pp,n),n.point(c,p)}function w(){y.point=b,n.lineEnd()}function D(){g(),y.point=F,y.lineEnd=U}function F(K,et){k(a=K,et),i=c,o=p,s=m,l=h,f=d,y.point=k}function U(){r(c,p,u,m,h,d,i,o,a,s,l,f,Pp,n),y.lineEnd=w,w()}return y}}var qv=nn({point:function(t,e){this.stream.point(t*pt,e*pt)}});function Cv(t){return nn({point:function(e,r){var n=t(e,r);return this.stream.point(n[0],n[1])}})}function Iv(t,e,r,n,a){function i(o,s){return o*=n,s*=a,[e+t*o,r-t*s]}return i.invert=function(o,s){return[(o-e)/t*n,(r-s)/t*a]},i}function kp(t,e,r,n,a,i){if(!i)return Iv(t,e,r,n,a);var o=it(i),s=ot(i),l=o*t,f=s*t,u=o/t,c=s/t,p=(s*r-o*e)/t,m=(s*e+o*r)/t;function h(d,y){return d*=n,y*=a,[l*d-f*y+e,r-f*d-l*y]}return h.invert=function(d,y){return[n*(u*d-c*y+p),a*(m-c*d-u*y)]},h}function $(t){return Ct(function(){return t})()}function Ct(t){var e,r=150,n=480,a=250,i=0,o=0,s=0,l=0,f=0,u,c=0,p=1,m=1,h=null,d=ua,y=null,b,g,k,w=en,D=.5,F,U,K,et,P;function S(v){return K(v[0]*pt,v[1]*pt)}function N(v){return v=K.invert(v[0],v[1]),v&&[v[0]*It,v[1]*It]}S.stream=function(v){return et&&P===v?et:et=qv(Cv(u)(d(F(w(P=v)))))},S.preclip=function(v){return arguments.length?(d=v,h=void 0,x()):d},S.postclip=function(v){return arguments.length?(w=v,y=b=g=k=null,x()):w},S.clipAngle=function(v){return arguments.length?(d=+v?zi(h=v*pt):(h=null,ua),x()):h*It},S.clipExtent=function(v){return arguments.length?(w=v==null?(y=b=g=k=null,en):Lr(y=+v[0][0],b=+v[0][1],g=+v[1][0],k=+v[1][1]),x()):y==null?null:[[y,b],[g,k]]},S.scale=function(v){return arguments.length?(r=+v,Y()):r},S.translate=function(v){return arguments.length?(n=+v[0],a=+v[1],Y()):[n,a]},S.center=function(v){return arguments.length?(i=v[0]%360*pt,o=v[1]%360*pt,Y()):[i*It,o*It]},S.rotate=function(v){return arguments.length?(s=v[0]%360*pt,l=v[1]%360*pt,f=v.length>2?v[2]%360*pt:0,Y()):[s*It,l*It,f*It]},S.angle=function(v){return arguments.length?(c=v%360*pt,Y()):c*It},S.reflectX=function(v){return arguments.length?(p=v?-1:1,Y()):p<0},S.reflectY=function(v){return arguments.length?(m=v?-1:1,Y()):m<0},S.precision=function(v){return arguments.length?(F=bu(U,D=v*v),x()):Dt(D)},S.fitExtent=function(v,z){return zn(S,v,z)},S.fitSize=function(v,z){return ho(S,v,z)},S.fitWidth=function(v,z){return go(S,v,z)},S.fitHeight=function(v,z){return vo(S,v,z)};function Y(){var v=kp(r,0,0,p,m,c).apply(null,e(i,o)),z=kp(r,n-v[0],a-v[1],p,m,c);return u=la(s,l,f),U=sa(e,z),K=sa(u,U),F=bu(U,D),x()}function x(){return et=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&N,Y()}}function yo(t){var e=0,r=Tt/3,n=Ct(t),a=n(e,r);return a.parallels=function(i){return arguments.length?n(e=i[0]*pt,r=i[1]*pt):[e*It,r*It]},a}function Rp(t){var e=it(t);function r(n,a){return[n*e,ot(a)/e]}return r.invert=function(n,a){return[n/e,Yt(a*e)]},r}function Su(t,e){var r=ot(t),n=(r+ot(e))/2;if(Pt(n)<ut)return Rp(t);var a=1+r*(2*n-r),i=Dt(a)/n;function o(s,l){var f=Dt(a-2*n*ot(l))/n;return[f*ot(s*=n),i-f*it(s)]}return o.invert=function(s,l){var f=i-l,u=Gt(s,Pt(f))*Me(f);return f*n<0&&(u-=Tt*Me(s)*Me(f)),[u/n,Yt((a-(s*s+f*f)*n*n)/(2*n))]},o}function _n(){return yo(Su).scale(155.424).center([0,33.6442])}function Ui(){return _n().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Nv(t){var e=t.length;return{point:function(r,n){for(var a=-1;++a<e;)t[a].point(r,n)},sphere:function(){for(var r=-1;++r<e;)t[r].sphere()},lineStart:function(){for(var r=-1;++r<e;)t[r].lineStart()},lineEnd:function(){for(var r=-1;++r<e;)t[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<e;)t[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<e;)t[r].polygonEnd()}}}function Tp(){var t,e,r=Ui(),n,a=_n().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i,o=_n().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,f={point:function(p,m){l=[p,m]}};function u(p){var m=p[0],h=p[1];return l=null,n.point(m,h),l||(i.point(m,h),l)||(s.point(m,h),l)}u.invert=function(p){var m=r.scale(),h=r.translate(),d=(p[0]-h[0])/m,y=(p[1]-h[1])/m;return(y>=.12&&y<.234&&d>=-.425&&d<-.214?a:y>=.166&&y<.234&&d>=-.214&&d<-.115?o:r).invert(p)},u.stream=function(p){return t&&e===p?t:t=Nv([r.stream(e=p),a.stream(p),o.stream(p)])},u.precision=function(p){return arguments.length?(r.precision(p),a.precision(p),o.precision(p),c()):r.precision()},u.scale=function(p){return arguments.length?(r.scale(p),a.scale(p*.35),o.scale(p),u.translate(r.translate())):r.scale()},u.translate=function(p){if(!arguments.length)return r.translate();var m=r.scale(),h=+p[0],d=+p[1];return n=r.translate(p).clipExtent([[h-.455*m,d-.238*m],[h+.455*m,d+.238*m]]).stream(f),i=a.translate([h-.307*m,d+.201*m]).clipExtent([[h-.425*m+ut,d+.12*m+ut],[h-.214*m-ut,d+.234*m-ut]]).stream(f),s=o.translate([h-.205*m,d+.212*m]).clipExtent([[h-.214*m+ut,d+.166*m+ut],[h-.115*m-ut,d+.234*m-ut]]).stream(f),c()},u.fitExtent=function(p,m){return zn(u,p,m)},u.fitSize=function(p,m){return ho(u,p,m)},u.fitWidth=function(p,m){return go(u,p,m)},u.fitHeight=function(p,m){return vo(u,p,m)};function c(){return t=e=null,u}return u.scale(1070)}function Hi(t){return function(e,r){var n=it(e),a=it(r),i=t(n*a);return i===1/0?[2,0]:[i*a*ot(e),i*ot(r)]}}function kr(t){return function(e,r){var n=Dt(e*e+r*r),a=t(n),i=ot(a),o=it(a);return[Gt(e*i,n*o),Yt(n&&r*i/n)]}}var on=Hi(function(t){return Dt(2/(1+t))});on.invert=kr(function(t){return 2*Yt(t/2)});function Ep(){return $(on).scale(124.75).clipAngle(180-.001)}var ar=Hi(function(t){return(t=pi(t))&&t/ot(t)});ar.invert=kr(function(t){return t});function zp(){return $(ar).scale(79.4188).clipAngle(180-.001)}function An(t,e){return[t,bn(io((Ut+e)/2))]}An.invert=function(t,e){return[t,2*er(ui(e))-Ut]};function _p(){return Pu(An).scale(961/ne)}function Pu(t){var e=$(t),r=e.center,n=e.scale,a=e.translate,i=e.clipExtent,o=null,s,l,f;e.scale=function(c){return arguments.length?(n(c),u()):n()},e.translate=function(c){return arguments.length?(a(c),u()):a()},e.center=function(c){return arguments.length?(r(c),u()):r()},e.clipExtent=function(c){return arguments.length?(c==null?o=s=l=f=null:(o=+c[0][0],s=+c[0][1],l=+c[1][0],f=+c[1][1]),u()):o==null?null:[[o,s],[l,f]]};function u(){var c=Tt*n(),p=e(or(e.rotate()).invert([0,0]));return i(o==null?[[p[0]-c,p[1]-c],[p[0]+c,p[1]+c]]:t===An?[[Math.max(p[0]-c,o),s],[Math.min(p[0]+c,l),f]]:[[o,Math.max(p[1]-c,s)],[l,Math.min(p[1]+c,f)]])}return u()}function Gi(t){return io((Ut+t)/2)}function ku(t,e){var r=it(t),n=t===e?ot(t):bn(r/it(e))/bn(Gi(e)/Gi(t)),a=r*ci(Gi(t),n)/n;if(!n)return An;function i(o,s){a>0?s<-Ut+ut&&(s=-Ut+ut):s>Ut-ut&&(s=Ut-ut);var l=a/ci(Gi(s),n);return[l*ot(n*o),a-l*it(n*o)]}return i.invert=function(o,s){var l=a-s,f=Me(n)*Dt(o*o+l*l),u=Gt(o,Pt(l))*Me(l);return l*n<0&&(u-=Tt*Me(o)*Me(l)),[u/n,2*er(ci(a/f,1/n))-Ut]},i}function Ap(){return yo(ku).scale(109.5).parallels([30,30])}function qn(t,e){return[t,e]}qn.invert=qn;function Yi(){return $(qn).scale(152.63)}function Ru(t,e){var r=it(t),n=t===e?ot(t):(r-it(e))/(e-t),a=r/n+t;if(Pt(n)<ut)return qn;function i(o,s){var l=a-s,f=n*o;return[l*ot(f),a-l*it(f)]}return i.invert=function(o,s){var l=a-s,f=Gt(o,Pt(l))*Me(l);return l*n<0&&(f-=Tt*Me(o)*Me(l)),[f/n,a-Me(n)*Dt(o*o+l*l)]},i}function qp(){return yo(Ru).scale(131.154).center([0,13.9389])}var ga=1.340264,va=-.081106,ya=893e-6,xa=.003796,Wi=Dt(3)/2,Dv=12;function Vi(t,e){var r=Yt(Wi*ot(e)),n=r*r,a=n*n*n;return[t*it(r)/(Wi*(ga+3*va*n+a*(7*ya+9*xa*n))),r*(ga+va*n+a*(ya+xa*n))]}Vi.invert=function(t,e){for(var r=e,n=r*r,a=n*n*n,i=0,o,s,l;i<Dv&&(s=r*(ga+va*n+a*(ya+xa*n))-e,l=ga+3*va*n+a*(7*ya+9*xa*n),r-=o=s/l,n=r*r,a=n*n*n,!(Pt(o)<Nr));++i);return[Wi*t*(ga+3*va*n+a*(7*ya+9*xa*n))/it(r),Yt(ot(r)/Wi)]};function Cp(){return $(Vi).scale(177.158)}function Cn(t,e){var r=it(e),n=it(t)*r;return[r*ot(t)/n,ot(e)/n]}Cn.invert=kr(er);function xo(){return $(Cn).scale(144.049).clipAngle(60)}function Ip(){var t=1,e=0,r=0,n=1,a=1,i=0,o,s,l=null,f,u,c,p=1,m=1,h=nn({point:function(w,D){var F=k([w,D]);this.stream.point(F[0],F[1])}}),d=en,y,b;function g(){return p=t*n,m=t*a,y=b=null,k}function k(w){var D=w[0]*p,F=w[1]*m;if(i){var U=F*o-D*s;D=D*o+F*s,F=U}return[D+e,F+r]}return k.invert=function(w){var D=w[0]-e,F=w[1]-r;if(i){var U=F*o+D*s;D=D*o-F*s,F=U}return[D/p,F/m]},k.stream=function(w){return y&&b===w?y:y=h(d(b=w))},k.postclip=function(w){return arguments.length?(d=w,l=f=u=c=null,g()):d},k.clipExtent=function(w){return arguments.length?(d=w==null?(l=f=u=c=null,en):Lr(l=+w[0][0],f=+w[0][1],u=+w[1][0],c=+w[1][1]),g()):l==null?null:[[l,f],[u,c]]},k.scale=function(w){return arguments.length?(t=+w,g()):t},k.translate=function(w){return arguments.length?(e=+w[0],r=+w[1],g()):[e,r]},k.angle=function(w){return arguments.length?(i=w%360*pt,s=ot(i),o=it(i),g()):i*It},k.reflectX=function(w){return arguments.length?(n=w?-1:1,g()):n<0},k.reflectY=function(w){return arguments.length?(a=w?-1:1,g()):a<0},k.fitExtent=function(w,D){return zn(k,w,D)},k.fitSize=function(w,D){return ho(k,w,D)},k.fitWidth=function(w,D){return go(k,w,D)},k.fitHeight=function(w,D){return vo(k,w,D)},k}function Bi(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),e*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}Bi.invert=function(t,e){var r=e,n=25,a;do{var i=r*r,o=i*i;r-=a=(r*(1.007226+i*(.015085+o*(-.044475+.028874*i-.005916*o)))-e)/(1.007226+i*(.015085*3+o*(-.044475*7+.028874*9*i-.005916*11*o)))}while(Pt(a)>ut&&--n>0);return[t/(.8707+(i=r*r)*(-.131979+i*(-.013791+i*i*i*(.003971-.001529*i)))),r]};function Np(){return $(Bi).scale(175.295)}function Xi(t,e){return[it(e)*ot(t),ot(e)]}Xi.invert=kr(Yt);function Zi(){return $(Xi).scale(249.5).clipAngle(90+ut)}function Qi(t,e){var r=it(e),n=1+it(t)*r;return[r*ot(t)/n,ot(e)/n]}Qi.invert=kr(function(t){return 2*er(t)});function Dp(){return $(Qi).scale(250).clipAngle(142)}function Ki(t,e){return[bn(io((Ut+e)/2)),-t]}Ki.invert=function(t,e){return[-e,2*er(ui(t))-Ut]};function jp(){var t=Pu(Ki),e=t.center,r=t.rotate;return t.center=function(n){return arguments.length?e([-n[1],n[0]]):(n=e(),[n[1],-n[0]])},t.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function In(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function wo(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function an(){}var wa=.7,es=1/wa,Mo="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jv=/^#([0-9a-f]{3,8})$/,Fv=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),Lv=new RegExp(`^rgb\\(${Rr},${Rr},${Rr}\\)$`),Ov=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${Ma}\\)$`),$v=new RegExp(`^rgba\\(${Rr},${Rr},${Rr},${Ma}\\)$`),Uv=new RegExp(`^hsl\\(${Ma},${Rr},${Rr}\\)$`),Hv=new RegExp(`^hsla\\(${Ma},${Rr},${Rr},${Ma}\\)$`),Fp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};In(an,sn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Lp,formatHex:Lp,formatHex8:Gv,formatHsl:Yv,formatRgb:Op,toString:Op});function Lp(){return this.rgb().formatHex()}function Gv(){return this.rgb().formatHex8()}function Yv(){return Wp(this).formatHsl()}function Op(){return this.rgb().formatRgb()}function sn(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=jv.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?$p(e):r===3?new ye(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Ji(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Ji(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Fv.exec(t))?new ye(e[1],e[2],e[3],1):(e=Lv.exec(t))?new ye(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Ov.exec(t))?Ji(e[1],e[2],e[3],e[4]):(e=$v.exec(t))?Ji(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Uv.exec(t))?Gp(e[1],e[2]/100,e[3]/100,1):(e=Hv.exec(t))?Gp(e[1],e[2]/100,e[3]/100,e[4]):Fp.hasOwnProperty(t)?$p(Fp[t]):t==="transparent"?new ye(NaN,NaN,NaN,0):null}function $p(t){return new ye(t>>16&255,t>>8&255,t&255,1)}function Ji(t,e,r,n){return n<=0&&(t=e=r=NaN),new ye(t,e,r,n)}function zu(t){return t instanceof an||(t=sn(t)),t?(t=t.rgb(),new ye(t.r,t.g,t.b,t.opacity)):new ye}function bo(t,e,r,n){return arguments.length===1?zu(t):new ye(t,e,r,n==null?1:n)}function ye(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}In(ye,bo,wo(an,{brighter(t){return t=t==null?es:Math.pow(es,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?wa:Math.pow(wa,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ye(Dn(this.r),Dn(this.g),Dn(this.b),rs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Up,formatHex:Up,formatHex8:Wv,formatRgb:Hp,toString:Hp}));function Up(){return`#${Nn(this.r)}${Nn(this.g)}${Nn(this.b)}`}function Wv(){return`#${Nn(this.r)}${Nn(this.g)}${Nn(this.b)}${Nn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Hp(){let t=rs(this.opacity);return`${t===1?"rgb(":"rgba("}${Dn(this.r)}, ${Dn(this.g)}, ${Dn(this.b)}${t===1?")":`, ${t})`}`}function rs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Dn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Nn(t){return t=Dn(t),(t<16?"0":"")+t.toString(16)}function Gp(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new dr(t,e,r,n)}function Wp(t){if(t instanceof dr)return new dr(t.h,t.s,t.l,t.opacity);if(t instanceof an||(t=sn(t)),!t)return new dr;if(t instanceof dr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(e===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-e)/s+2:o=(e-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new dr(o,s,l,t.opacity)}function Vp(t,e,r,n){return arguments.length===1?Wp(t):new dr(t,e,r,n==null?1:n)}function dr(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}In(dr,Vp,wo(an,{brighter(t){return t=t==null?es:Math.pow(es,t),new dr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wa:Math.pow(wa,t),new dr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new ye(Eu(t>=240?t-240:t+120,a,n),Eu(t,a,n),Eu(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new dr(Yp(this.h),ts(this.s),ts(this.l),rs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=rs(this.opacity);return`${t===1?"hsl(":"hsla("}${Yp(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Yp(t){return t=(t||0)%360,t<0?t+360:t}function ts(t){return Math.max(0,Math.min(1,t||0))}function Eu(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var Bp=Math.PI/180,Xp=180/Math.PI;var ns=18,Zp=.96422,Qp=1,Kp=.82521,Jp=4/29,So=6/29,tm=3*So*So,Vv=So*So*So;function em(t){if(t instanceof Tr)return new Tr(t.l,t.a,t.b,t.opacity);if(t instanceof $r)return nm(t);t instanceof ye||(t=zu(t));var e=Cu(t.r),r=Cu(t.g),n=Cu(t.b),a=_u((.2225045*e+.7168786*r+.0606169*n)/Qp),i,o;return e===r&&r===n?i=o=a:(i=_u((.4360747*e+.3850649*r+.1430804*n)/Zp),o=_u((.0139322*e+.0971045*r+.7141733*n)/Kp)),new Tr(116*a-16,500*(i-a),200*(a-o),t.opacity)}function Po(t,e,r,n){return arguments.length===1?em(t):new Tr(t,e,r,n==null?1:n)}function Tr(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}In(Tr,Po,wo(an,{brighter(t){return new Tr(this.l+ns*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new Tr(this.l-ns*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Zp*Au(e),t=Qp*Au(t),r=Kp*Au(r),new ye(qu(3.1338561*e-1.6168667*t-.4906146*r),qu(-.9787684*e+1.9161415*t+.033454*r),qu(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function _u(t){return t>Vv?Math.pow(t,1/3):t/tm+Jp}function Au(t){return t>So?t*t*t:tm*(t-Jp)}function qu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Cu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bv(t){if(t instanceof $r)return new $r(t.h,t.c,t.l,t.opacity);if(t instanceof Tr||(t=em(t)),t.a===0&&t.b===0)return new $r(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xp;return new $r(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function rm(t,e,r,n){return arguments.length===1?Bv(t):new $r(t,e,r,n==null?1:n)}function $r(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function nm(t){if(isNaN(t.h))return new Tr(t.l,0,0,t.opacity);var e=t.h*Bp;return new Tr(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}In($r,rm,wo(an,{brighter(t){return new $r(this.h,this.c,this.l+ns*(t==null?1:t),this.opacity)},darker(t){return new $r(this.h,this.c,this.l-ns*(t==null?1:t),this.opacity)},rgb(){return nm(this).rgb()}}));function Iu(t,e,r,n,a){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*r+(1+3*t+3*i-3*o)*n+o*a)/6}function om(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[n],i=t[n+1],o=n>0?t[n-1]:2*a-i,s=n<e-1?t[n+2]:2*i-a;return Iu((r-n/e)*e,o,a,i,s)}}function am(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),a=t[(n+e-1)%e],i=t[n%e],o=t[(n+1)%e],s=t[(n+2)%e];return Iu((r-n/e)*e,a,i,o,s)}}var Nu=t=>()=>t;function Xv(t,e){return function(r){return t+r*e}}function Zv(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function im(t){return(t=+t)==1?Ur:function(e,r){return r-e?Zv(e,r,t):Nu(isNaN(e)?r:e)}}function Ur(t,e){var r=e-t;return r?Xv(t,r):Nu(isNaN(t)?e:t)}var os=(function t(e){var r=im(e);function n(a,i){var o=r((a=bo(a)).r,(i=bo(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),f=Ur(a.opacity,i.opacity);return function(u){return a.r=o(u),a.g=s(u),a.b=l(u),a.opacity=f(u),a+""}}return n.gamma=t,n})(1);function sm(t){return function(e){var r=e.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o<r;++o)s=bo(e[o]),n[o]=s.r||0,a[o]=s.g||0,i[o]=s.b||0;return n=t(n),a=t(a),i=t(i),s.opacity=1,function(l){return s.r=n(l),s.g=a(l),s.b=i(l),s+""}}}var Qv=sm(om),Kv=sm(am);function fe(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ju=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Du=new RegExp(ju.source,"g");function Jv(t){return function(){return t}}function t3(t){return function(e){return t(e)+""}}function Fu(t,e){var r=ju.lastIndex=Du.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(t=t+"",e=e+"";(n=ju.exec(t))&&(a=Du.exec(e));)(i=a.index)>r&&(i=e.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:fe(n,a)})),r=Du.lastIndex;return r<e.length&&(i=e.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?t3(l[0].x):Jv(e):(e=l.length,function(f){for(var u=0,c;u<e;++u)s[(c=l[u]).i]=c.x(f);return s.join("")})}var lm=180/Math.PI,as={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Lu(t,e,r,n,a,i){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*lm,skewX:Math.atan(l)*lm,scaleX:o,scaleY:s}}var is;function um(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?as:Lu(e.a,e.b,e.c,e.d,e.e,e.f)}function fm(t){return t==null?as:(is||(is=document.createElementNS("http://www.w3.org/2000/svg","g")),is.setAttribute("transform",t),(t=is.transform.baseVal.consolidate())?(t=t.matrix,Lu(t.a,t.b,t.c,t.d,t.e,t.f)):as)}function cm(t,e,r,n){function a(f){return f.length?f.pop()+" ":""}function i(f,u,c,p,m,h){if(f!==c||u!==p){var d=m.push("translate(",null,e,null,r);h.push({i:d-4,x:fe(f,c)},{i:d-2,x:fe(u,p)})}else(c||p)&&m.push("translate("+c+e+p+r)}function o(f,u,c,p){f!==u?(f-u>180?u+=360:u-f>180&&(f+=360),p.push({i:c.push(a(c)+"rotate(",null,n)-2,x:fe(f,u)})):u&&c.push(a(c)+"rotate("+u+n)}function s(f,u,c,p){f!==u?p.push({i:c.push(a(c)+"skewX(",null,n)-2,x:fe(f,u)}):u&&c.push(a(c)+"skewX("+u+n)}function l(f,u,c,p,m,h){if(f!==c||u!==p){var d=m.push(a(m)+"scale(",null,",",null,")");h.push({i:d-4,x:fe(f,c)},{i:d-2,x:fe(u,p)})}else(c!==1||p!==1)&&m.push(a(m)+"scale("+c+","+p+")")}return function(f,u){var c=[],p=[];return f=t(f),u=t(u),i(f.translateX,f.translateY,u.translateX,u.translateY,c,p),o(f.rotate,u.rotate,c,p),s(f.skewX,u.skewX,c,p),l(f.scaleX,f.scaleY,u.scaleX,u.scaleY,c,p),f=u=null,function(m){for(var h=-1,d=p.length,y;++h<d;)c[(y=p[h]).i]=y.x(m);return c.join("")}}}var Ou=cm(um,"px, ","px)","deg)"),$u=cm(fm,", ",")",")");var e3=1e-12;function pm(t){return((t=Math.exp(t))+1/t)/2}function r3(t){return((t=Math.exp(t))-1/t)/2}function n3(t){return((t=Math.exp(2*t))-1)/(t+1)}var Uu=(function t(e,r,n){function a(i,o){var s=i[0],l=i[1],f=i[2],u=o[0],c=o[1],p=o[2],m=u-s,h=c-l,d=m*m+h*h,y,b;if(d<e3)b=Math.log(p/f)/e,y=function(U){return[s+U*m,l+U*h,f*Math.exp(e*U*b)]};else{var g=Math.sqrt(d),k=(p*p-f*f+n*d)/(2*f*r*g),w=(p*p-f*f-n*d)/(2*p*r*g),D=Math.log(Math.sqrt(k*k+1)-k),F=Math.log(Math.sqrt(w*w+1)-w);b=(F-D)/e,y=function(U){var K=U*b,et=pm(D),P=f/(r*g)*(et*n3(e*K+D)-r3(D));return[s+P*m,l+P*h,f*et/pm(e*K+D)]}}return y.duration=b*1e3*e/Math.SQRT2,y}return a.rho=function(i){var o=Math.max(.001,+i),s=o*o,l=s*s;return t(o,s,l)},a})(Math.SQRT2,2,4);function gr(t,e){var r=Ur((t=Po(t)).l,(e=Po(e)).l),n=Ur(t.a,e.a),a=Ur(t.b,e.b),i=Ur(t.opacity,e.opacity);return function(o){return t.l=r(o),t.a=n(o),t.b=a(o),t.opacity=i(o),t+""}}function mm(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function hm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function jn(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Er(t){return t=jn(Math.abs(t)),t?t[1]:NaN}function dm(t,e){return function(r,n){for(var a=r.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return i.reverse().join(e)}}function gm(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var o3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ln(t){if(!(e=o3.exec(t)))throw new Error("invalid format: "+t);var e;return new ss({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ln.prototype=ss.prototype;function ss(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ss.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function vm(t){t:for(var e=t.length,r=1,n=-1,a;r<e;++r)switch(t[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+t[r])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var ba;function ym(t,e){var r=jn(t,e);if(!r)return ba=void 0,t.toPrecision(e);var n=r[0],a=r[1],i=a-(ba=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+jn(t,Math.max(0,e+i-1))[0]}function Hu(t,e){var r=jn(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}var Gu={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:hm,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Hu(t*100,e),r:Hu,s:ym,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yu(t){return t}var xm=Array.prototype.map,wm=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Mm(t){var e=t.grouping===void 0||t.thousands===void 0?Yu:dm(xm.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Yu:gm(xm.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function f(c,p){c=ln(c);var m=c.fill,h=c.align,d=c.sign,y=c.symbol,b=c.zero,g=c.width,k=c.comma,w=c.precision,D=c.trim,F=c.type;F==="n"?(k=!0,F="g"):Gu[F]||(w===void 0&&(w=12),D=!0,F="g"),(b||m==="0"&&h==="=")&&(b=!0,m="0",h="=");var U=(p&&p.prefix!==void 0?p.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(F)?"0"+F.toLowerCase():""),K=(y==="$"?n:/[%p]/.test(F)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),et=Gu[F],P=/[defgprs%]/.test(F);w=w===void 0?6:/[gprs]/.test(F)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function S(N){var Y=U,x=K,v,z,V;if(F==="c")x=et(N)+x,N="";else{N=+N;var j=N<0||1/N<0;if(N=isNaN(N)?l:et(Math.abs(N),w),D&&(N=vm(N)),j&&+N==0&&d!=="+"&&(j=!1),Y=(j?d==="("?d:s:d==="-"||d==="("?"":d)+Y,x=(F==="s"&&!isNaN(N)&&ba!==void 0?wm[8+ba/3]:"")+x+(j&&d==="("?")":""),P){for(v=-1,z=N.length;++v<z;)if(V=N.charCodeAt(v),48>V||V>57){x=(V===46?a+N.slice(v+1):N.slice(v))+x,N=N.slice(0,v);break}}}k&&!b&&(N=e(N,1/0));var Z=Y.length+N.length+x.length,G=Z<g?new Array(g-Z+1).join(m):"";switch(k&&b&&(N=e(G+N,G.length?g-x.length:1/0),G=""),h){case"<":N=Y+N+x+G;break;case"=":N=Y+G+N+x;break;case"^":N=G.slice(0,Z=G.length>>1)+Y+N+x+G.slice(Z);break;default:N=G+Y+N+x;break}return i(N)}return S.toString=function(){return c+""},S}function u(c,p){var m=Math.max(-8,Math.min(8,Math.floor(Er(p)/3)))*3,h=Math.pow(10,-m),d=f((c=ln(c),c.type="f",c),{suffix:wm[8+m/3]});return function(y){return d(h*y)}}return{format:f,formatPrefix:u}}var ls,us,fs;Wu({thousands:",",grouping:[3],currency:["$",""]});function Wu(t){return ls=Mm(t),us=ls.format,fs=ls.formatPrefix,ls}function Vu(t){return Math.max(0,-Er(Math.abs(t)))}function Bu(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Er(e)/3)))*3-Er(Math.abs(t)))}function Xu(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Er(e)-Er(t))+1}function Zu(t,e,r,n){var a=Ul(t,e,r),i;switch(n=ln(n==null?",f":n),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(i=Bu(a,o))&&(n.precision=i),fs(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=Xu(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=Vu(a))&&(n.precision=i-(n.type==="%")*2);break}}return us(n)}function bm(t){var e=t.domain;return t.ticks=function(r){var n=e();return li(n[0],n[n.length-1],r==null?10:r)},t.tickFormat=function(r,n){var a=e();return Zu(a[0],a[a.length-1],r==null?10:r,n)},t.nice=function(r){r==null&&(r=10);var n=e(),a=0,i=n.length-1,o=n[a],s=n[i],l,f,u=10;for(s<o&&(f=o,o=s,s=f,f=a,a=i,i=f);u-- >0;){if(f=Jo(o,s,r),f===l)return n[a]=o,n[i]=s,e(n);if(f>0)o=Math.floor(o/f)*f,s=Math.ceil(s/f)*f;else if(f<0)o=Math.ceil(o*f)/f,s=Math.floor(s*f)/f;else break;l=f}return t},t}function ko(){var t=0,e=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[$l(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*e-(l-r)*t)/(r+1);return o}return o.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var f=a.indexOf(l);return f<0?[NaN,NaN]:f<1?[t,n[0]]:f>=r?[n[r-1],e]:[n[f-1],n[f]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return ko().domain([t,e]).range(a).unknown(i)},mm.apply(bm(o),arguments)}var Qu=new Date,Ku=new Date;function Be(t,e,r,n){function a(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{let o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(e(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{let l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let f;do l.push(f=new Date(+i)),e(i,s),t(i);while(f<i&&i<o);return l},a.filter=i=>Be(o=>{if(o>=o)for(;t(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!i(o););else for(;--s>=0;)for(;e(o,1),!i(o););}),r&&(a.count=(i,o)=>(Qu.setTime(+i),Ku.setTime(+o),t(Qu),t(Ku),Math.floor(r(Qu,Ku))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}var Sa=Be(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),i3=Sa.range,Pa=Be(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),s3=Pa.range,Sm=Be(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),l3=Sm.range;function Fn(t){return Be(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ka=Fn(0),Ro=Fn(1),Pm=Fn(2),km=Fn(3),un=Fn(4),Rm=Fn(5),Tm=Fn(6),Em=ka.range,f3=Ro.range,c3=Pm.range,p3=km.range,m3=un.range,h3=Rm.range,d3=Tm.range;function Ln(t){return Be(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var Ra=Ln(0),To=Ln(1),zm=Ln(2),_m=Ln(3),fn=Ln(4),Am=Ln(5),qm=Ln(6),Cm=Ra.range,g3=To.range,v3=zm.range,y3=_m.range,x3=fn.range,w3=Am.range,M3=qm.range;var Hr=Be(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Hr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Be(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var b3=Hr.range,Gr=Be(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Gr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Be(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var S3=Gr.range;function tf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ef(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ta(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function rf(t){var e=t.dateTime,r=t.date,n=t.time,a=t.periods,i=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,f=Ea(a),u=za(a),c=Ea(i),p=za(i),m=Ea(o),h=za(o),d=Ea(s),y=za(s),b=Ea(l),g=za(l),k={a:V,A:j,b:Z,B:G,c:null,d:Lm,e:Lm,f:W3,g:ry,G:oy,H:H3,I:G3,j:Y3,L:Gm,m:V3,M:B3,p:at,q:xt,Q:Um,s:Hm,S:X3,u:Z3,U:Q3,V:K3,w:J3,W:ty,x:null,X:null,y:ey,Y:ny,Z:ay,"%":$m},w={a:Mt,A:Rt,b:q,B:W,c:null,d:Om,e:Om,f:uy,g:xy,G:My,H:iy,I:sy,j:ly,L:Wm,m:fy,M:cy,p:_,q:nt,Q:Um,s:Hm,S:py,u:my,U:hy,V:dy,w:gy,W:vy,x:null,X:null,y:yy,Y:wy,Z:by,"%":$m},D={a:P,A:S,b:N,B:Y,c:x,d:jm,e:jm,f:L3,g:Dm,G:Nm,H:Fm,I:Fm,j:N3,L:F3,m:I3,M:D3,p:et,q:C3,Q:$3,s:U3,S:j3,u:E3,U:z3,V:_3,w:T3,W:A3,x:v,X:z,y:Dm,Y:Nm,Z:q3,"%":O3};k.x=F(r,k),k.X=F(n,k),k.c=F(e,k),w.x=F(r,w),w.X=F(n,w),w.c=F(e,w);function F(rt,wt){return function(Et){var J=[],le=-1,jt=0,At=rt.length,me,ue,L;for(Et instanceof Date||(Et=new Date(+Et));++le<At;)rt.charCodeAt(le)===37&&(J.push(rt.slice(jt,le)),(ue=Im[me=rt.charAt(++le)])!=null?me=rt.charAt(++le):ue=me==="e"?" ":"0",(L=wt[me])&&(me=L(Et,ue)),J.push(me),jt=le+1);return J.push(rt.slice(jt,le)),J.join("")}}function U(rt,wt){return function(Et){var J=Ta(1900,void 0,1),le=K(J,rt,Et+="",0),jt,At;if(le!=Et.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(wt&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(jt=ef(Ta(J.y,0,1)),At=jt.getUTCDay(),jt=At>4||At===0?To.ceil(jt):To(jt),jt=Pa.offset(jt,(J.V-1)*7),J.y=jt.getUTCFullYear(),J.m=jt.getUTCMonth(),J.d=jt.getUTCDate()+(J.w+6)%7):(jt=tf(Ta(J.y,0,1)),At=jt.getDay(),jt=At>4||At===0?Ro.ceil(jt):Ro(jt),jt=Sa.offset(jt,(J.V-1)*7),J.y=jt.getFullYear(),J.m=jt.getMonth(),J.d=jt.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),At="Z"in J?ef(Ta(J.y,0,1)).getUTCDay():tf(Ta(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(At+5)%7:J.w+J.U*7-(At+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,ef(J)):tf(J)}}function K(rt,wt,Et,J){for(var le=0,jt=wt.length,At=Et.length,me,ue;le<jt;){if(J>=At)return-1;if(me=wt.charCodeAt(le++),me===37){if(me=wt.charAt(le++),ue=D[me in Im?wt.charAt(le++):me],!ue||(J=ue(rt,Et,J))<0)return-1}else if(me!=Et.charCodeAt(J++))return-1}return J}function et(rt,wt,Et){var J=f.exec(wt.slice(Et));return J?(rt.p=u.get(J[0].toLowerCase()),Et+J[0].length):-1}function P(rt,wt,Et){var J=m.exec(wt.slice(Et));return J?(rt.w=h.get(J[0].toLowerCase()),Et+J[0].length):-1}function S(rt,wt,Et){var J=c.exec(wt.slice(Et));return J?(rt.w=p.get(J[0].toLowerCase()),Et+J[0].length):-1}function N(rt,wt,Et){var J=b.exec(wt.slice(Et));return J?(rt.m=g.get(J[0].toLowerCase()),Et+J[0].length):-1}function Y(rt,wt,Et){var J=d.exec(wt.slice(Et));return J?(rt.m=y.get(J[0].toLowerCase()),Et+J[0].length):-1}function x(rt,wt,Et){return K(rt,e,wt,Et)}function v(rt,wt,Et){return K(rt,r,wt,Et)}function z(rt,wt,Et){return K(rt,n,wt,Et)}function V(rt){return o[rt.getDay()]}function j(rt){return i[rt.getDay()]}function Z(rt){return l[rt.getMonth()]}function G(rt){return s[rt.getMonth()]}function at(rt){return a[+(rt.getHours()>=12)]}function xt(rt){return 1+~~(rt.getMonth()/3)}function Mt(rt){return o[rt.getUTCDay()]}function Rt(rt){return i[rt.getUTCDay()]}function q(rt){return l[rt.getUTCMonth()]}function W(rt){return s[rt.getUTCMonth()]}function _(rt){return a[+(rt.getUTCHours()>=12)]}function nt(rt){return 1+~~(rt.getUTCMonth()/3)}return{format:function(rt){var wt=F(rt+="",k);return wt.toString=function(){return rt},wt},parse:function(rt){var wt=U(rt+="",!1);return wt.toString=function(){return rt},wt},utcFormat:function(rt){var wt=F(rt+="",w);return wt.toString=function(){return rt},wt},utcParse:function(rt){var wt=U(rt+="",!0);return wt.toString=function(){return rt},wt}}}var Im={"-":"",_:" ",0:"0"},he=/^\s*\d+/,P3=/^%/,k3=/[\\^$*+?|[\]().{}]/g;function Lt(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(e)+a:a)}function R3(t){return t.replace(k3,"\\$&")}function Ea(t){return new RegExp("^(?:"+t.map(R3).join("|")+")","i")}function za(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function T3(t,e,r){var n=he.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function E3(t,e,r){var n=he.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function z3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function _3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function A3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Nm(t,e,r){var n=he.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Dm(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function q3(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function C3(t,e,r){var n=he.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function I3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function jm(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function N3(t,e,r){var n=he.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Fm(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function D3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function j3(t,e,r){var n=he.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function F3(t,e,r){var n=he.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function L3(t,e,r){var n=he.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function O3(t,e,r){var n=P3.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function $3(t,e,r){var n=he.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function U3(t,e,r){var n=he.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Lm(t,e){return Lt(t.getDate(),e,2)}function H3(t,e){return Lt(t.getHours(),e,2)}function G3(t,e){return Lt(t.getHours()%12||12,e,2)}function Y3(t,e){return Lt(1+Sa.count(Hr(t),t),e,3)}function Gm(t,e){return Lt(t.getMilliseconds(),e,3)}function W3(t,e){return Gm(t,e)+"000"}function V3(t,e){return Lt(t.getMonth()+1,e,2)}function B3(t,e){return Lt(t.getMinutes(),e,2)}function X3(t,e){return Lt(t.getSeconds(),e,2)}function Z3(t){var e=t.getDay();return e===0?7:e}function Q3(t,e){return Lt(ka.count(Hr(t)-1,t),e,2)}function Ym(t){var e=t.getDay();return e>=4||e===0?un(t):un.ceil(t)}function K3(t,e){return t=Ym(t),Lt(un.count(Hr(t),t)+(Hr(t).getDay()===4),e,2)}function J3(t){return t.getDay()}function ty(t,e){return Lt(Ro.count(Hr(t)-1,t),e,2)}function ey(t,e){return Lt(t.getFullYear()%100,e,2)}function ry(t,e){return t=Ym(t),Lt(t.getFullYear()%100,e,2)}function ny(t,e){return Lt(t.getFullYear()%1e4,e,4)}function oy(t,e){var r=t.getDay();return t=r>=4||r===0?un(t):un.ceil(t),Lt(t.getFullYear()%1e4,e,4)}function ay(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Lt(e/60|0,"0",2)+Lt(e%60,"0",2)}function Om(t,e){return Lt(t.getUTCDate(),e,2)}function iy(t,e){return Lt(t.getUTCHours(),e,2)}function sy(t,e){return Lt(t.getUTCHours()%12||12,e,2)}function ly(t,e){return Lt(1+Pa.count(Gr(t),t),e,3)}function Wm(t,e){return Lt(t.getUTCMilliseconds(),e,3)}function uy(t,e){return Wm(t,e)+"000"}function fy(t,e){return Lt(t.getUTCMonth()+1,e,2)}function cy(t,e){return Lt(t.getUTCMinutes(),e,2)}function py(t,e){return Lt(t.getUTCSeconds(),e,2)}function my(t){var e=t.getUTCDay();return e===0?7:e}function hy(t,e){return Lt(Ra.count(Gr(t)-1,t),e,2)}function Vm(t){var e=t.getUTCDay();return e>=4||e===0?fn(t):fn.ceil(t)}function dy(t,e){return t=Vm(t),Lt(fn.count(Gr(t),t)+(Gr(t).getUTCDay()===4),e,2)}function gy(t){return t.getUTCDay()}function vy(t,e){return Lt(To.count(Gr(t)-1,t),e,2)}function yy(t,e){return Lt(t.getUTCFullYear()%100,e,2)}function xy(t,e){return t=Vm(t),Lt(t.getUTCFullYear()%100,e,2)}function wy(t,e){return Lt(t.getUTCFullYear()%1e4,e,4)}function My(t,e){var r=t.getUTCDay();return t=r>=4||r===0?fn(t):fn.ceil(t),Lt(t.getUTCFullYear()%1e4,e,4)}function by(){return"+0000"}function $m(){return"%"}function Um(t){return+t}function Hm(t){return Math.floor(+t/1e3)}var Eo,zr,On,Bm,Xm;nf({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function nf(t){return Eo=rf(t),zr=Eo.format,On=Eo.parse,Bm=Eo.utcFormat,Xm=Eo.utcParse,Eo}function _a(t){return function(){return t}}var of=Math.cos;var Aa=Math.sin,de=Math.sqrt;var $n=Math.PI,CS=$n/2,zo=2*$n;var af=Math.PI,sf=2*af,Un=1e-6,Sy=sf-Un;function Zm(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Py(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Zm;let r=10**e;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}var Hn=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Zm:Py(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,i,o){this._append`C${+e},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(e,r,n,a,i){if(e=+e,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-e,f=a-r,u=o-e,c=s-r,p=u*u+c*c;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>Un)if(!(Math.abs(c*l-f*u)>Un)||!i)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-o,h=a-s,d=l*l+f*f,y=m*m+h*h,b=Math.sqrt(d),g=Math.sqrt(p),k=i*Math.tan((af-Math.acos((d+p-y)/(2*b*g)))/2),w=k/g,D=k/b;Math.abs(w-1)>Un&&this._append`L${e+w*u},${r+w*c}`,this._append`A${i},${i},0,0,${+(c*m>u*h)},${this._x1=e+D*l},${this._y1=r+D*f}`}}arc(e,r,n,a,i,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),f=e+s,u=r+l,c=1^o,p=o?a-i:i-a;this._x1===null?this._append`M${f},${u}`:(Math.abs(this._x1-f)>Un||Math.abs(this._y1-u)>Un)&&this._append`L${f},${u}`,n&&(p<0&&(p=p%sf+sf),p>Sy?this._append`A${n},${n},0,1,${c},${e-s},${r-l}A${n},${n},0,1,${c},${this._x1=f},${this._y1=u}`:p>Un&&this._append`A${n},${n},0,${+(p>=af)},${c},${this._x1=e+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}};function Qm(){return new Hn}Qm.prototype=Hn.prototype;function Km(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Hn(e)}var cn={draw(t,e){let r=de(e/$n);t.moveTo(r,0),t.arc(0,0,r,0,zo)}};var cs={draw(t,e){let r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}};var Jm=de(1/3),ky=Jm*2,ps={draw(t,e){let r=de(e/ky),n=r*Jm;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}};var ms={draw(t,e){let r=de(e),n=-r/2;t.rect(n,n,r,r)}};var Ry=.8908130915292852,t1=Aa($n/10)/Aa(7*$n/10),Ty=Aa(zo/10)*t1,Ey=-of(zo/10)*t1,hs={draw(t,e){let r=de(e*Ry),n=Ty*r,a=Ey*r;t.moveTo(0,-r),t.lineTo(n,a);for(let i=1;i<5;++i){let o=zo*i/5,s=of(o),l=Aa(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*a,l*n+s*a)}t.closePath()}};var lf=de(3),ds={draw(t,e){let r=-de(e/(lf*3));t.moveTo(0,r*2),t.lineTo(-lf*r,-r),t.lineTo(lf*r,-r),t.closePath()}};var ir=-.5,sr=de(3)/2,uf=1/de(12),zy=(uf/2+1)*3,gs={draw(t,e){let r=de(e/zy),n=r/2,a=r*uf,i=n,o=r*uf+r,s=-i,l=o;t.moveTo(n,a),t.lineTo(i,o),t.lineTo(s,l),t.lineTo(ir*n-sr*a,sr*n+ir*a),t.lineTo(ir*i-sr*o,sr*i+ir*o),t.lineTo(ir*s-sr*l,sr*s+ir*l),t.lineTo(ir*n+sr*a,ir*a-sr*n),t.lineTo(ir*i+sr*o,ir*o-sr*i),t.lineTo(ir*s+sr*l,ir*l-sr*s),t.closePath()}};function Gn(t,e){let r=null,n=Km(a);t=typeof t=="function"?t:_a(t||cn),e=typeof e=="function"?e:_a(e===void 0?64:+e);function a(){let i;if(r||(r=i=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(t=typeof i=="function"?i:_a(i),a):t},a.size=function(i){return arguments.length?(e=typeof i=="function"?i:_a(+i),a):e},a.context=function(i){return arguments.length?(r=i==null?null:i,a):r},a}var Ay={value:()=>{}};function r1(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new vs(r)}function vs(t){this._=t}function qy(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}vs.prototype=r1.prototype={constructor:vs,on:function(t,e){var r=this._,n=qy(t+"",r),a,i=-1,o=n.length;if(arguments.length<2){for(;++i<o;)if((a=(t=n[i]).type)&&(a=Cy(r[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<o;)if(a=(t=n[i]).type)r[a]=e1(r[a],t.name,e);else if(e==null)for(a in r)r[a]=e1(r[a],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new vs(t)},call:function(t,e){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,i;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],a=0,i=n.length;a<i;++a)n[a].value.apply(e,r)}};function Cy(t,e){for(var r=0,n=t.length,a;r<n;++r)if((a=t[r]).name===e)return a.value}function e1(t,e,r){for(var n=0,a=t.length;n<a;++n)if(t[n].name===e){t[n]=Ay,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var pn=r1;var ys={capture:!0,passive:!1};function xs(t){t.preventDefault(),t.stopImmediatePropagation()}function ff(t){var e=t.document.documentElement,r=dt(t).on("dragstart.drag",xs,ys);"onselectstart"in e?r.on("selectstart.drag",xs,ys):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function cf(t,e){var r=t.document.documentElement,n=dt(t).on("dragstart.drag",null);e&&(n.on("click.drag",xs,ys),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var _o=0,Ca=0,qa=0,o1=1e3,ws,Ia,Ms=0,Yn=0,bs=0,Na=typeof performance=="object"&&performance.now?performance:Date,a1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ja(){return Yn||(a1(Iy),Yn=Na.now()+bs)}function Iy(){Yn=0}function Da(){this._call=this._time=this._next=null}Da.prototype=Ss.prototype={constructor:Da,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?ja():+r)+(e==null?0:+e),!this._next&&Ia!==this&&(Ia?Ia._next=this:ws=this,Ia=this),this._call=t,this._time=r,pf()},stop:function(){this._call&&(this._call=null,this._time=1/0,pf())}};function Ss(t,e,r){var n=new Da;return n.restart(t,e,r),n}function i1(){ja(),++_o;for(var t=ws,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--_o}function n1(){Yn=(Ms=Na.now())+bs,_o=Ca=0;try{i1()}finally{_o=0,Dy(),Yn=0}}function Ny(){var t=Na.now(),e=t-Ms;e>o1&&(bs-=e,Ms=t)}function Dy(){for(var t,e=ws,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:ws=r);Ia=t,pf(n)}function pf(t){if(!_o){Ca&&(Ca=clearTimeout(Ca));var e=t-Yn;e>24?(t<1/0&&(Ca=setTimeout(n1,t-Na.now()-bs)),qa&&(qa=clearInterval(qa))):(qa||(Ms=Na.now(),qa=setInterval(Ny,o1)),_o=1,a1(n1))}}function Ps(t,e,r){var n=new Da;return e=e==null?0:+e,n.restart(a=>{n.stop(),t(a+e)},e,r),n}var jy=pn("start","end","cancel","interrupt"),Fy=[],u1=0,s1=1,Rs=2,ks=3,l1=4,Ts=5,Fa=6;function mn(t,e,r,n,a,i){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;Ly(t,r,{name:e,index:n,group:a,on:jy,tween:Fy,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:u1})}function La(t,e){var r=ce(t,e);if(r.state>u1)throw new Error("too late; already scheduled");return r}function xe(t,e){var r=ce(t,e);if(r.state>ks)throw new Error("too late; already running");return r}function ce(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Ly(t,e,r){var n=t.__transition,a;n[e]=r,r.timer=Ss(i,0,r.time);function i(f){r.state=s1,r.timer.restart(o,r.delay,r.time),r.delay<=f&&o(f-r.delay)}function o(f){var u,c,p,m;if(r.state!==s1)return l();for(u in n)if(m=n[u],m.name===r.name){if(m.state===ks)return Ps(o);m.state===l1?(m.state=Fa,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[u]):+u<e&&(m.state=Fa,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[u])}if(Ps(function(){r.state===ks&&(r.state=l1,r.timer.restart(s,r.delay,r.time),s(f))}),r.state=Rs,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Rs){for(r.state=ks,a=new Array(p=r.tween.length),u=0,c=-1;u<p;++u)(m=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(a[++c]=m);a.length=c+1}}function s(f){for(var u=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(l),r.state=Ts,1),c=-1,p=a.length;++c<p;)a[c].call(t,u);r.state===Ts&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Fa,r.timer.stop(),delete n[e];for(var f in n)return;delete t.__transition}}function Wn(t,e){var r=t.__transition,n,a,i=!0,o;if(r){e=e==null?null:e+"";for(o in r){if((n=r[o]).name!==e){i=!1;continue}a=n.state>Rs&&n.state<Ts,n.state=Fa,n.timer.stop(),n.on.call(a?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[o]}i&&delete t.__transition}}function f1(t){return this.each(function(){Wn(this,t)})}function Oy(t,e){var r,n;return function(){var a=xe(this,t),i=a.tween;if(i!==r){n=r=i;for(var o=0,s=n.length;o<s;++o)if(n[o].name===e){n=n.slice(),n.splice(o,1);break}}a.tween=n}}function $y(t,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var i=xe(this,t),o=i.tween;if(o!==n){a=(n=o).slice();for(var s={name:e,value:r},l=0,f=a.length;l<f;++l)if(a[l].name===e){a[l]=s;break}l===f&&a.push(s)}i.tween=a}}function c1(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=ce(this.node(),r).tween,a=0,i=n.length,o;a<i;++a)if((o=n[a]).name===t)return o.value;return null}return this.each((e==null?Oy:$y)(r,t,e))}function Ao(t,e,r){var n=t._id;return t.each(function(){var a=xe(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return ce(a,n).value[e]}}function Es(t,e){var r;return(typeof e=="number"?fe:e instanceof sn?os:(r=sn(e))?(e=r,os):Fu)(t,e)}function Uy(t){return function(){this.removeAttribute(t)}}function Hy(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Gy(t,e,r){var n,a=r+"",i;return function(){var o=this.getAttribute(t);return o===a?null:o===n?i:i=e(n=o,r)}}function Yy(t,e,r){var n,a=r+"",i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===n?i:i=e(n=o,r)}}function Wy(t,e,r){var n,a,i;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),l=s+"",o===l?null:o===n&&l===a?i:(a=l,i=e(n=o,s)))}}function Vy(t,e,r){var n,a,i;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),l=s+"",o===l?null:o===n&&l===a?i:(a=l,i=e(n=o,s)))}}function p1(t,e){var r=Cr(t),n=r==="transform"?$u:Es;return this.attrTween(t,typeof e=="function"?(r.local?Vy:Wy)(r,n,Ao(this,"attr."+t,e)):e==null?(r.local?Hy:Uy)(r):(r.local?Yy:Gy)(r,n,e))}function By(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function Xy(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Zy(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&Xy(t,i)),r}return a._value=e,a}function Qy(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&By(t,i)),r}return a._value=e,a}function m1(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Cr(t);return this.tween(r,(n.local?Zy:Qy)(n,e))}function Ky(t,e){return function(){La(this,t).delay=+e.apply(this,arguments)}}function Jy(t,e){return e=+e,function(){La(this,t).delay=e}}function h1(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ky:Jy)(e,t)):ce(this.node(),e).delay}function tx(t,e){return function(){xe(this,t).duration=+e.apply(this,arguments)}}function ex(t,e){return e=+e,function(){xe(this,t).duration=e}}function d1(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?tx:ex)(e,t)):ce(this.node(),e).duration}function rx(t,e){if(typeof e!="function")throw new Error;return function(){xe(this,t).ease=e}}function g1(t){var e=this._id;return arguments.length?this.each(rx(e,t)):ce(this.node(),e).ease}function nx(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;xe(this,t).ease=r}}function v1(t){if(typeof t!="function")throw new Error;return this.each(nx(this._id,t))}function y1(t){typeof t!="function"&&(t=Zo(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],o=i.length,s=n[a]=[],l,f=0;f<o;++f)(l=i[f])&&t.call(l,l.__data__,f,i)&&s.push(l);return new Ce(n,this._parents,this._name,this._id)}function x1(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,a=r.length,i=Math.min(n,a),o=new Array(n),s=0;s<i;++s)for(var l=e[s],f=r[s],u=l.length,c=o[s]=new Array(u),p,m=0;m<u;++m)(p=l[m]||f[m])&&(c[m]=p);for(;s<n;++s)o[s]=e[s];return new Ce(o,this._parents,this._name,this._id)}function ox(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function ax(t,e,r){var n,a,i=ox(e)?La:xe;return function(){var o=i(this,t),s=o.on;s!==n&&(a=(n=s).copy()).on(e,r),o.on=a}}function w1(t,e){var r=this._id;return arguments.length<2?ce(this.node(),r).on.on(t):this.each(ax(r,t,e))}function ix(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function M1(){return this.on("end.remove",ix(this._id))}function b1(t){var e=this._name,r=this._id;typeof t!="function"&&(t=wn(t));for(var n=this._groups,a=n.length,i=new Array(a),o=0;o<a;++o)for(var s=n[o],l=s.length,f=i[o]=new Array(l),u,c,p=0;p<l;++p)(u=s[p])&&(c=t.call(u,u.__data__,p,s))&&("__data__"in u&&(c.__data__=u.__data__),f[p]=c,mn(f[p],e,r,p,f,ce(u,r)));return new Ce(i,this._parents,e,r)}function S1(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Xo(t));for(var n=this._groups,a=n.length,i=[],o=[],s=0;s<a;++s)for(var l=n[s],f=l.length,u,c=0;c<f;++c)if(u=l[c]){for(var p=t.call(u,u.__data__,c,l),m,h=ce(u,r),d=0,y=p.length;d<y;++d)(m=p[d])&&mn(m,e,r,d,p,h);i.push(p),o.push(u)}return new Ce(i,o,e,r)}var sx=Ir.prototype.constructor;function P1(){return new sx(this._groups,this._parents)}function lx(t,e){var r,n,a;return function(){var i=Kr(this,t),o=(this.style.removeProperty(t),Kr(this,t));return i===o?null:i===r&&o===n?a:a=e(r=i,n=o)}}function k1(t){return function(){this.style.removeProperty(t)}}function ux(t,e,r){var n,a=r+"",i;return function(){var o=Kr(this,t);return o===a?null:o===n?i:i=e(n=o,r)}}function fx(t,e,r){var n,a,i;return function(){var o=Kr(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Kr(this,t))),o===l?null:o===n&&l===a?i:(a=l,i=e(n=o,s))}}function cx(t,e){var r,n,a,i="style."+e,o="end."+i,s;return function(){var l=xe(this,t),f=l.on,u=l.value[i]==null?s||(s=k1(e)):void 0;(f!==r||a!==u)&&(n=(r=f).copy()).on(o,a=u),l.on=n}}function R1(t,e,r){var n=(t+="")=="transform"?Ou:Es;return e==null?this.styleTween(t,lx(t,n)).on("end.style."+t,k1(t)):typeof e=="function"?this.styleTween(t,fx(t,n,Ao(this,"style."+t,e))).each(cx(this._id,t)):this.styleTween(t,ux(t,n,e),r).on("end.style."+t,null)}function px(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function mx(t,e,r){var n,a;function i(){var o=e.apply(this,arguments);return o!==a&&(n=(a=o)&&px(t,o,r)),n}return i._value=e,i}function T1(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,mx(t,e,r==null?"":r))}function hx(t){return function(){this.textContent=t}}function dx(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function E1(t){return this.tween("text",typeof t=="function"?dx(Ao(this,"text",t)):hx(t==null?"":t+""))}function gx(t){return function(e){this.textContent=t.call(this,e)}}function vx(t){var e,r;function n(){var a=t.apply(this,arguments);return a!==r&&(e=(r=a)&&gx(a)),e}return n._value=t,n}function z1(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,vx(t))}function _1(){for(var t=this._name,e=this._id,r=zs(),n=this._groups,a=n.length,i=0;i<a;++i)for(var o=n[i],s=o.length,l,f=0;f<s;++f)if(l=o[f]){var u=ce(l,e);mn(l,t,r,f,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Ce(n,this._parents,t,r)}function A1(){var t,e,r=this,n=r._id,a=r.size();return new Promise(function(i,o){var s={value:o},l={value:function(){--a===0&&i()}};r.each(function(){var f=xe(this,n),u=f.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),f.on=e}),a===0&&i()})}var yx=0;function Ce(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function q1(t){return Ir().transition(t)}function zs(){return++yx}var Yr=Ir.prototype;Ce.prototype=q1.prototype={constructor:Ce,select:b1,selectAll:S1,selectChild:Yr.selectChild,selectChildren:Yr.selectChildren,filter:y1,merge:x1,selection:P1,transition:_1,call:Yr.call,nodes:Yr.nodes,node:Yr.node,size:Yr.size,empty:Yr.empty,each:Yr.each,on:w1,attr:p1,attrTween:m1,style:R1,styleTween:T1,text:E1,textTween:z1,remove:M1,tween:c1,delay:h1,duration:d1,ease:g1,easeVarying:v1,end:A1,[Symbol.iterator]:Yr[Symbol.iterator]};function _s(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var xx={time:null,delay:0,duration:250,ease:_s};function wx(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function C1(t){var e,r;t instanceof Ce?(e=t._id,t=t._name):(e=zs(),(r=xx).time=ja(),t=t==null?null:t+"");for(var n=this._groups,a=n.length,i=0;i<a;++i)for(var o=n[i],s=o.length,l,f=0;f<s;++f)(l=o[f])&&mn(l,t,e,f,o,r||wx(l,e));return new Ce(n,this._parents,t,e)}Ir.prototype.interrupt=f1;Ir.prototype.transition=C1;var Oa=t=>()=>t;function mf(t,{sourceEvent:e,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function vr(t,e,r){this.k=t,this.x=e,this.y=r}vr.prototype={constructor:vr,scale:function(t){return t===1?this:new vr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new vr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Wr=new vr(1,0,0);hf.prototype=vr.prototype;function hf(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Wr;return t.__zoom}function As(t){t.stopImmediatePropagation()}function qo(t){t.preventDefault(),t.stopImmediatePropagation()}function Mx(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function bx(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function I1(){return this.__zoom||Wr}function Sx(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Px(){return navigator.maxTouchPoints||"ontouchstart"in this}function kx(t,e,r){var n=t.invertX(e[0][0])-r[0][0],a=t.invertX(e[1][0])-r[1][0],i=t.invertY(e[0][1])-r[0][1],o=t.invertY(e[1][1])-r[1][1];return t.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function qs(){var t=Mx,e=bx,r=kx,n=Sx,a=Px,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Uu,f=pn("start","zoom","end"),u,c,p,m=500,h=150,d=0,y=10;function b(x){x.property("__zoom",I1).on("wheel.zoom",K,{passive:!1}).on("mousedown.zoom",et).on("dblclick.zoom",P).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(x,v,z,V){var j=x.selection?x.selection():x;j.property("__zoom",I1),x!==j?D(x,v,z,V):j.interrupt().each(function(){F(this,arguments).event(V).start().zoom(null,typeof v=="function"?v.apply(this,arguments):v).end()})},b.scaleBy=function(x,v,z,V){b.scaleTo(x,function(){var j=this.__zoom.k,Z=typeof v=="function"?v.apply(this,arguments):v;return j*Z},z,V)},b.scaleTo=function(x,v,z,V){b.transform(x,function(){var j=e.apply(this,arguments),Z=this.__zoom,G=z==null?w(j):typeof z=="function"?z.apply(this,arguments):z,at=Z.invert(G),xt=typeof v=="function"?v.apply(this,arguments):v;return r(k(g(Z,xt),G,at),j,o)},z,V)},b.translateBy=function(x,v,z,V){b.transform(x,function(){return r(this.__zoom.translate(typeof v=="function"?v.apply(this,arguments):v,typeof z=="function"?z.apply(this,arguments):z),e.apply(this,arguments),o)},null,V)},b.translateTo=function(x,v,z,V,j){b.transform(x,function(){var Z=e.apply(this,arguments),G=this.__zoom,at=V==null?w(Z):typeof V=="function"?V.apply(this,arguments):V;return r(Wr.translate(at[0],at[1]).scale(G.k).translate(typeof v=="function"?-v.apply(this,arguments):-v,typeof z=="function"?-z.apply(this,arguments):-z),Z,o)},V,j)};function g(x,v){return v=Math.max(i[0],Math.min(i[1],v)),v===x.k?x:new vr(v,x.x,x.y)}function k(x,v,z){var V=v[0]-z[0]*x.k,j=v[1]-z[1]*x.k;return V===x.x&&j===x.y?x:new vr(x.k,V,j)}function w(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}function D(x,v,z,V){x.on("start.zoom",function(){F(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(V).end()}).tween("zoom",function(){var j=this,Z=arguments,G=F(j,Z).event(V),at=e.apply(j,Z),xt=z==null?w(at):typeof z=="function"?z.apply(j,Z):z,Mt=Math.max(at[1][0]-at[0][0],at[1][1]-at[0][1]),Rt=j.__zoom,q=typeof v=="function"?v.apply(j,Z):v,W=l(Rt.invert(xt).concat(Mt/Rt.k),q.invert(xt).concat(Mt/q.k));return function(_){if(_===1)_=q;else{var nt=W(_),rt=Mt/nt[2];_=new vr(rt,xt[0]-nt[0]*rt,xt[1]-nt[1]*rt)}G.zoom(null,_)}})}function F(x,v,z){return!z&&x.__zooming||new U(x,v)}function U(x,v){this.that=x,this.args=v,this.active=0,this.sourceEvent=null,this.extent=e.apply(x,v),this.taps=0}U.prototype={event:function(x){return x&&(this.sourceEvent=x),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(x,v){return this.mouse&&x!=="mouse"&&(this.mouse[1]=v.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=v.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=v.invert(this.touch1[0])),this.that.__zoom=v,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(x){var v=dt(this.that).datum();f.call(x,this.that,new mf(x,{sourceEvent:this.sourceEvent,target:b,type:x,transform:this.that.__zoom,dispatch:f}),v)}};function K(x,...v){if(!t.apply(this,arguments))return;var z=F(this,v).event(x),V=this.__zoom,j=Math.max(i[0],Math.min(i[1],V.k*Math.pow(2,n.apply(this,arguments)))),Z=Je(x);if(z.wheel)(z.mouse[0][0]!==Z[0]||z.mouse[0][1]!==Z[1])&&(z.mouse[1]=V.invert(z.mouse[0]=Z)),clearTimeout(z.wheel);else{if(V.k===j)return;z.mouse=[Z,V.invert(Z)],Wn(this),z.start()}qo(x),z.wheel=setTimeout(G,h),z.zoom("mouse",r(k(g(V,j),z.mouse[0],z.mouse[1]),z.extent,o));function G(){z.wheel=null,z.end()}}function et(x,...v){if(p||!t.apply(this,arguments))return;var z=x.currentTarget,V=F(this,v,!0).event(x),j=dt(x.view).on("mousemove.zoom",xt,!0).on("mouseup.zoom",Mt,!0),Z=Je(x,z),G=x.clientX,at=x.clientY;ff(x.view),As(x),V.mouse=[Z,this.__zoom.invert(Z)],Wn(this),V.start();function xt(Rt){if(qo(Rt),!V.moved){var q=Rt.clientX-G,W=Rt.clientY-at;V.moved=q*q+W*W>d}V.event(Rt).zoom("mouse",r(k(V.that.__zoom,V.mouse[0]=Je(Rt,z),V.mouse[1]),V.extent,o))}function Mt(Rt){j.on("mousemove.zoom mouseup.zoom",null),cf(Rt.view,V.moved),qo(Rt),V.event(Rt).end()}}function P(x,...v){if(t.apply(this,arguments)){var z=this.__zoom,V=Je(x.changedTouches?x.changedTouches[0]:x,this),j=z.invert(V),Z=z.k*(x.shiftKey?.5:2),G=r(k(g(z,Z),V,j),e.apply(this,v),o);qo(x),s>0?dt(this).transition().duration(s).call(D,G,V,x):dt(this).call(b.transform,G,V,x)}}function S(x,...v){if(t.apply(this,arguments)){var z=x.touches,V=z.length,j=F(this,v,x.changedTouches.length===V).event(x),Z,G,at,xt;for(As(x),G=0;G<V;++G)at=z[G],xt=Je(at,this),xt=[xt,this.__zoom.invert(xt),at.identifier],j.touch0?!j.touch1&&j.touch0[2]!==xt[2]&&(j.touch1=xt,j.taps=0):(j.touch0=xt,Z=!0,j.taps=1+!!u);u&&(u=clearTimeout(u)),Z&&(j.taps<2&&(c=xt[0],u=setTimeout(function(){u=null},m)),Wn(this),j.start())}}function N(x,...v){if(this.__zooming){var z=F(this,v).event(x),V=x.changedTouches,j=V.length,Z,G,at,xt;for(qo(x),Z=0;Z<j;++Z)G=V[Z],at=Je(G,this),z.touch0&&z.touch0[2]===G.identifier?z.touch0[0]=at:z.touch1&&z.touch1[2]===G.identifier&&(z.touch1[0]=at);if(G=z.that.__zoom,z.touch1){var Mt=z.touch0[0],Rt=z.touch0[1],q=z.touch1[0],W=z.touch1[1],_=(_=q[0]-Mt[0])*_+(_=q[1]-Mt[1])*_,nt=(nt=W[0]-Rt[0])*nt+(nt=W[1]-Rt[1])*nt;G=g(G,Math.sqrt(_/nt)),at=[(Mt[0]+q[0])/2,(Mt[1]+q[1])/2],xt=[(Rt[0]+W[0])/2,(Rt[1]+W[1])/2]}else if(z.touch0)at=z.touch0[0],xt=z.touch0[1];else return;z.zoom("touch",r(k(G,at,xt),z.extent,o))}}function Y(x,...v){if(this.__zooming){var z=F(this,v).event(x),V=x.changedTouches,j=V.length,Z,G;for(As(x),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),Z=0;Z<j;++Z)G=V[Z],z.touch0&&z.touch0[2]===G.identifier?delete z.touch0:z.touch1&&z.touch1[2]===G.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(G=Je(G,this),Math.hypot(c[0]-G[0],c[1]-G[1])<y)){var at=dt(this).on("dblclick.zoom");at&&at.apply(this,arguments)}}}return b.wheelDelta=function(x){return arguments.length?(n=typeof x=="function"?x:Oa(+x),b):n},b.filter=function(x){return arguments.length?(t=typeof x=="function"?x:Oa(!!x),b):t},b.touchable=function(x){return arguments.length?(a=typeof x=="function"?x:Oa(!!x),b):a},b.extent=function(x){return arguments.length?(e=typeof x=="function"?x:Oa([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),b):e},b.scaleExtent=function(x){return arguments.length?(i[0]=+x[0],i[1]=+x[1],b):[i[0],i[1]]},b.translateExtent=function(x){return arguments.length?(o[0][0]=+x[0][0],o[1][0]=+x[1][0],o[0][1]=+x[0][1],o[1][1]=+x[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(x){return arguments.length?(r=x,b):r},b.duration=function(x){return arguments.length?(s=+x,b):s},b.interpolate=function(x){return arguments.length?(l=x,b):l},b.on=function(){var x=f.on.apply(f,arguments);return x===f?b:x},b.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,b):Math.sqrt(d)},b.tapDistance=function(x){return arguments.length?(y=+x,b):y},b}var j1=Math.acos,Rx=Math.asin,N1=Math.atan2,Vn=Math.cos,D1=Math.hypot,gf=Math.max,vf=Math.min,F1=Math.PI,Bn=Math.sin,$a=F1/180,df=180/F1,Co=class t{static fromCartesian([e,r,n]){return[0,n,-r,e]}static fromAngles([e,r,n]){e*=$a/2,r*=$a/2,n=(n||0)*$a/2;let a=Bn(e),i=Vn(e),o=Bn(r),s=Vn(r),l=Bn(n),f=Vn(n);return[i*s*f+a*o*l,a*s*f-i*o*l,i*o*f+a*s*l,i*s*l-a*o*f]}static toAngles([e,r,n,a]){return[N1(2*(e*r+n*a),1-2*(r*r+n*n))*df,Rx(gf(-1,vf(1,2*(e*n-a*r))))*df,N1(2*(e*a+r*n),1-2*(n*n+a*a))*df]}static interpolateAngles(e,r){let n=t.interpolate(t.fromAngles(e),t.fromAngles(r));return a=>t.toAngles(n(a))}static interpolateLinear([e,r,n,a],[i,o,s,l]){i-=e,o-=r,s-=n,l-=a;let f=new Array(4);return u=>{let c=D1(f[0]=e+i*u,f[1]=r+o*u,f[2]=n+s*u,f[3]=a+l*u);return f[0]/=c,f[1]/=c,f[2]/=c,f[3]/=c,f}}static interpolate([e,r,n,a],[i,o,s,l]){let f=t.dot([e,r,n,a],[i,o,s,l]);if(f<0&&(i=-i,o=-o,s=-s,l=-l,f=-f),f>.9995)return t.interpolateLinear([e,r,n,a],[i,o,s,l]);let u=j1(gf(-1,vf(1,f))),c=new Array(4),p=D1(i-=e*f,o-=r*f,s-=n*f,l-=a*f);return i/=p,o/=p,s/=p,l/=p,m=>{let h=u*m,d=Bn(h),y=Vn(h);return c[0]=e*y+i*d,c[1]=r*y+o*d,c[2]=n*y+s*d,c[3]=a*y+l*d,c}}static dot([e,r,n,a],[i,o,s,l]){return e*i+r*o+n*s+a*l}static multiply([e,r,n,a],[i,o,s,l]){return[e*i-r*o-n*s-a*l,e*o+r*i+n*l-a*s,e*s-r*l+n*i+a*o,e*l+r*s-n*o+a*i]}},Io=Co.fromAngles;Io.multiply=Co.multiply;Io.rotation=Co.toAngles;Io.interpolate=Co.interpolateAngles;Io.cartesian=function(t){let e=t[0]*$a,r=t[1]*$a,n=Vn(r);return[n*Vn(e),n*Bn(e),Bn(r)]};Io.delta=function(t,e,r){arguments.length==2&&(r=1);let n=Math.sqrt;function a(u,c){return[u[1]*c[2]-u[2]*c[1],u[2]*c[0]-u[0]*c[2],u[0]*c[1]-u[1]*c[0]]}function i(u,c){return u[0]*c[0]+u[1]*c[1]+u[2]*c[2]}let o=a(t,e),s=n(i(o,o));if(!s)return[1,0,0,0];let l=r*j1(gf(-1,vf(1,i(t,e))))/2,f=Bn(l);return[Vn(l),o[2]/s*f,-o[1]/s*f,o[0]/s*f]};var Xn=Io;function L1(){var t,e=null,r=pn("zoomstart","zoom","zoomend"),n={r:[0,0,0],k:1},a=qs().on("start",p).on("zoom",m).on("end",h),i,o,s;function l(d){e=d,d.call(a),a.transform(d,Wr.scale(n.k))}function f(d,y){var b=Je(d,y);return isFinite(b[0])&&isFinite(b[1])?b:null}function u(d){var y=t.invert(d);return y&&isFinite(y[0])&&isFinite(y[1])?Xn.cartesian(y):null}function c(d,y){var b=t.translate(),g=Math.atan2(d[1]-b[1],d[0]-b[0])-Math.atan2(y[1]-b[1],y[0]-b[0]);return[Math.cos(g/2),0,0,Math.sin(g/2)]}function p(d){i=f(d,this),o=Xn(t.rotate());var y=i&&u(i);y&&(s=y),r.call("zoomstart",l)}function m(d){t.scale(n.k=d.transform.k);var y=f(d,this);if(y&&i){var b=u(y),g=s&&b?Xn.delta(s,b):null;o=g?Xn.multiply(o,g):Xn.multiply(c(i,y),o),t.rotate(n.r=Xn.rotation(o))}y&&(i=y),r.call("zoom",l)}function h(){r.call("zoomend",l)}return l.projection=function(d){return arguments.length?(t=d,n={r:t.rotate(),k:t.scale()},l):t},l.center=function(d){return arguments.length?l:null},l.scaleExtent=function(d){return arguments.length?(a.scaleExtent(d),l):a.scaleExtent()},l.scale=function(d){return arguments.length?(n.k=d,e&&a.transform(e,Wr.scale(d)),l):n.k},l.on=function(d,y){return arguments.length<2?r.on(d):(r.on(d,y),l)},l}var st={version:"0.8.0",container:null,data:[]};var wc={};jc(wc,{geoAiry:()=>G1,geoAiryRaw:()=>yf,geoAitoff:()=>Y1,geoAitoffRaw:()=>Do,geoArmadillo:()=>W1,geoArmadilloRaw:()=>xf,geoAugust:()=>V1,geoAugustRaw:()=>jo,geoBaker:()=>B1,geoBakerRaw:()=>Is,geoBerghaus:()=>X1,geoBerghausRaw:()=>Mf,geoBertin1953:()=>K1,geoBertin1953Raw:()=>bf,geoBoggs:()=>eh,geoBoggsRaw:()=>Lo,geoBonne:()=>nh,geoBonneRaw:()=>Pf,geoBottomley:()=>oh,geoBottomleyRaw:()=>kf,geoBromley:()=>ah,geoBromleyRaw:()=>Rf,geoChamberlin:()=>Ds,geoChamberlinAfrica:()=>sh,geoChamberlinRaw:()=>zf,geoCollignon:()=>lh,geoCollignonRaw:()=>Ie,geoCraig:()=>uh,geoCraigRaw:()=>_f,geoCraster:()=>fh,geoCrasterRaw:()=>Fs,geoCylindricalEqualArea:()=>ch,geoCylindricalEqualAreaRaw:()=>Kn,geoCylindricalStereographic:()=>ph,geoCylindricalStereographicRaw:()=>Af,geoEckert1:()=>mh,geoEckert1Raw:()=>Ls,geoEckert2:()=>hh,geoEckert2Raw:()=>Os,geoEckert3:()=>dh,geoEckert3Raw:()=>$s,geoEckert4:()=>gh,geoEckert4Raw:()=>Us,geoEckert5:()=>vh,geoEckert5Raw:()=>Hs,geoEckert6:()=>yh,geoEckert6Raw:()=>Gs,geoEisenlohr:()=>xh,geoEisenlohrRaw:()=>Ws,geoFahey:()=>wh,geoFaheyRaw:()=>Bs,geoFoucaut:()=>Mh,geoFoucautRaw:()=>Xs,geoFoucautSinusoidal:()=>bh,geoFoucautSinusoidalRaw:()=>qf,geoGilbert:()=>kh,geoGingery:()=>Th,geoGingeryRaw:()=>Cf,geoGinzburg4:()=>Eh,geoGinzburg4Raw:()=>If,geoGinzburg5:()=>zh,geoGinzburg5Raw:()=>Nf,geoGinzburg6:()=>_h,geoGinzburg6Raw:()=>Df,geoGinzburg8:()=>Ah,geoGinzburg8Raw:()=>Qs,geoGinzburg9:()=>qh,geoGinzburg9Raw:()=>jf,geoGringorten:()=>Ch,geoGringortenQuincuncial:()=>Fd,geoGringortenRaw:()=>Oo,geoGuyou:()=>Dh,geoGuyouRaw:()=>Uo,geoHammer:()=>Q1,geoHammerRaw:()=>Zn,geoHammerRetroazimuthal:()=>Fh,geoHammerRetroazimuthalRaw:()=>Lf,geoHealpix:()=>Lh,geoHealpixRaw:()=>Uf,geoHill:()=>Oh,geoHillRaw:()=>Hf,geoHomolosine:()=>Uh,geoHomolosineRaw:()=>Go,geoHufnagel:()=>Hh,geoHufnagelRaw:()=>Gf,geoHyperelliptical:()=>Yh,geoHyperellipticalRaw:()=>Wf,geoInterrupt:()=>Pe,geoInterruptedBoggs:()=>Vh,geoInterruptedHomolosine:()=>Bh,geoInterruptedMollweide:()=>Xh,geoInterruptedMollweideHemispheres:()=>Zh,geoInterruptedQuarticAuthalic:()=>gd,geoInterruptedSinuMollweide:()=>Qh,geoInterruptedSinusoidal:()=>Kh,geoKavrayskiy7:()=>Jh,geoKavrayskiy7Raw:()=>Js,geoLagrange:()=>td,geoLagrangeRaw:()=>Vf,geoLarrivee:()=>ed,geoLarriveeRaw:()=>tl,geoLaskowski:()=>rd,geoLaskowskiRaw:()=>el,geoLittrow:()=>nd,geoLittrowRaw:()=>rl,geoLoximuthal:()=>od,geoLoximuthalRaw:()=>Xf,geoMiller:()=>ad,geoMillerRaw:()=>nl,geoModifiedStereographic:()=>gn,geoModifiedStereographicAlaska:()=>id,geoModifiedStereographicGs48:()=>sd,geoModifiedStereographicGs50:()=>ld,geoModifiedStereographicLee:()=>fd,geoModifiedStereographicMiller:()=>ud,geoModifiedStereographicRaw:()=>Zf,geoMollweide:()=>J1,geoMollweideRaw:()=>Ze,geoMtFlatPolarParabolic:()=>cd,geoMtFlatPolarParabolicRaw:()=>il,geoMtFlatPolarQuartic:()=>pd,geoMtFlatPolarQuarticRaw:()=>sl,geoMtFlatPolarSinusoidal:()=>md,geoMtFlatPolarSinusoidalRaw:()=>ll,geoNaturalEarth2:()=>hd,geoNaturalEarth2Raw:()=>ul,geoNellHammer:()=>dd,geoNellHammerRaw:()=>fl,geoNicolosi:()=>vd,geoNicolosiRaw:()=>cl,geoPatterson:()=>yd,geoPattersonRaw:()=>ml,geoPeirceQuincuncial:()=>Ld,geoPolyconic:()=>xd,geoPolyconicRaw:()=>hl,geoPolyhedral:()=>yn,geoPolyhedralButterfly:()=>Rd,geoPolyhedralCollignon:()=>zd,geoPolyhedralWaterman:()=>Ad,geoProject:()=>Dd,geoQuantize:()=>Od,geoQuincuncial:()=>Yo,geoRectangularPolyconic:()=>$d,geoRectangularPolyconicRaw:()=>ac,geoRobinson:()=>Ud,geoRobinsonRaw:()=>dl,geoSatellite:()=>Hd,geoSatelliteRaw:()=>ic,geoSinuMollweide:()=>$h,geoSinuMollweideRaw:()=>Ho,geoSinusoidal:()=>rh,geoSinusoidalRaw:()=>$e,geoStitch:()=>Qd,geoTimes:()=>Kd,geoTimesRaw:()=>vl,geoTwoPointAzimuthal:()=>xl,geoTwoPointAzimuthalRaw:()=>gc,geoTwoPointAzimuthalUsa:()=>Jd,geoTwoPointEquidistant:()=>wl,geoTwoPointEquidistantRaw:()=>vc,geoTwoPointEquidistantUsa:()=>tg,geoVanDerGrinten:()=>eg,geoVanDerGrinten2:()=>rg,geoVanDerGrinten2Raw:()=>bl,geoVanDerGrinten3:()=>ng,geoVanDerGrinten3Raw:()=>Sl,geoVanDerGrinten4:()=>og,geoVanDerGrinten4Raw:()=>Pl,geoVanDerGrintenRaw:()=>Ml,geoWagner:()=>kl,geoWagner4:()=>lg,geoWagner4Raw:()=>xc,geoWagner6:()=>ug,geoWagner6Raw:()=>Rl,geoWagner7:()=>ag,geoWagnerRaw:()=>yc,geoWiechel:()=>fg,geoWiechelRaw:()=>Tl,geoWinkel3:()=>cg,geoWinkel3Raw:()=>El});var C=Math.abs,_t=Math.atan,vt=Math.atan2;var R=Math.cos,Fe=Math.exp,Br=Math.floor,Bt=Math.log,Le=Math.max,oe=Math.min,hn=Math.pow,No=Math.round,mt=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sin,ct=Math.tan,H=1e-6,Oe=1e-12,E=Math.PI,Q=E/2,ie=E/4,be=Math.SQRT1_2,qt=A(2),Se=A(E),Xe=E*2,kt=180/E,yt=E/180;function O1(t){return t?t/Math.sin(t):1}function tt(t){return t>1?Q:t<-1?-Q:Math.asin(t)}function Ot(t){return t>1?0:t<-1?E:Math.acos(t)}function A(t){return t>0?Math.sqrt(t):0}function $1(t){return t=Fe(2*t),(t-1)/(t+1)}function Ua(t){return(Fe(t)-Fe(-t))/2}function Cs(t){return(Fe(t)+Fe(-t))/2}function U1(t){return Bt(t+A(t*t+1))}function H1(t){return Bt(t+A(t*t-1))}function yf(t){var e=ct(t/2),r=2*Bt(R(t/2))/(e*e);function n(a,i){var o=R(a),s=R(i),l=T(i),f=s*o,u=-((1-f?Bt((1+f)/2)/(1-f):-.5)+r/(1+f));return[u*s*T(a),u*l]}return n.invert=function(a,i){var o=A(a*a+i*i),s=-t/2,l=50,f;if(!o)return[0,0];do{var u=s/2,c=R(u),p=T(u),m=p/c,h=-Bt(C(c));s-=f=(2/m*h-r*m-o)/(-h/(p*p)+1-r/(2*c*c))*(c<0?.7:1)}while(C(f)>H&&--l>0);var d=T(s);return[vt(a*d,o*R(s)),tt(i*d/o)]},n}function G1(){var t=Q,e=Ct(yf),r=e(t);return r.radius=function(n){return arguments.length?e(t=n*yt):t*kt},r.scale(179.976).clipAngle(147)}function Do(t,e){var r=R(e),n=O1(Ot(r*R(t/=2)));return[2*r*T(t)*n,T(e)*n]}Do.invert=function(t,e){if(!(t*t+4*e*e>E*E+H)){var r=t,n=e,a=25;do{var i=T(r),o=T(r/2),s=R(r/2),l=T(n),f=R(n),u=T(2*n),c=l*l,p=f*f,m=o*o,h=1-p*s*s,d=h?Ot(f*s)*A(y=1/h):y=0,y,b=2*d*f*o-t,g=d*l-e,k=y*(p*m+d*f*s*c),w=y*(.5*i*u-d*2*l*o),D=y*.25*(u*o-d*l*p*i),F=y*(c*s+d*m*f),U=w*D-F*k;if(!U)break;var K=(g*w-b*F)/U,et=(b*D-g*k)/U;r-=K,n-=et}while((C(K)>H||C(et)>H)&&--a>0);return[r,n]}};function Y1(){return $(Do).scale(152.63)}function xf(t){var e=T(t),r=R(t),n=t>=0?1:-1,a=ct(n*t),i=(1+e-r)/2;function o(s,l){var f=R(l),u=R(s/=2);return[(1+f)*T(s),(n*l>-vt(u,a)-.001?0:-n*10)+i+T(l)*r-(1+f)*e*u]}return o.invert=function(s,l){var f=0,u=0,c=50;do{var p=R(f),m=T(f),h=R(u),d=T(u),y=1+h,b=y*m-s,g=i+d*r-y*e*p-l,k=y*p/2,w=-m*d,D=e*y*m/2,F=r*h+e*p*d,U=w*D-F*k,K=(g*w-b*F)/U/2,et=(b*D-g*k)/U;C(et)>2&&(et/=2),f-=K,u-=et}while((C(K)>H||C(et)>H)&&--c>0);return n*u>-vt(R(f),a)-.001?[f*2,u]:null},o}function W1(){var t=20*yt,e=t>=0?1:-1,r=ct(e*t),n=Ct(xf),a=n(t),i=a.stream;return a.parallel=function(o){return arguments.length?(r=ct((e=(t=o*yt)>=0?1:-1)*t),n(t)):t*kt},a.stream=function(o){var s=a.rotate(),l=i(o),f=(a.rotate([0,0]),i(o)),u=a.precision();return a.rotate(s),l.sphere=function(){f.polygonStart(),f.lineStart();for(var c=e*-180;e*c<180;c+=e*90)f.point(c,e*90);if(t)for(;e*(c-=3*e*u)>=-180;)f.point(c,e*-vt(R(c*yt/2),r)*kt);f.lineEnd(),f.polygonEnd()},l},a.scale(218.695).center([0,28.0974])}function jo(t,e){var r=ct(e/2),n=A(1-r*r),a=1+n*R(t/=2),i=T(t)*n/a,o=r/a,s=i*i,l=o*o;return[4/3*i*(3+s-3*l),4/3*o*(3+3*s-l)]}jo.invert=function(t,e){if(t*=3/8,e*=3/8,!t&&C(e)>1)return null;var r=t*t,n=e*e,a=1+r+n,i=A((a-A(a*a-4*e*e))/2),o=tt(i)/3,s=i?H1(C(e/i))/3:U1(C(t))/3,l=R(o),f=Cs(s),u=f*f-l*l;return[mt(t)*2*vt(Ua(s)*l,.25-u),mt(e)*2*vt(f*T(o),.25+u)]};function V1(){return $(jo).scale(66.1603)}var wf=A(8),Tx=Bt(1+qt);function Is(t,e){var r=C(e);return r<ie?[t,Bt(ct(ie+e/2))]:[t*R(r)*(2*qt-1/T(r)),mt(e)*(2*qt*(r-ie)-Bt(ct(r/2)))]}Is.invert=function(t,e){if((i=C(e))<Tx)return[t,2*_t(Fe(e))-Q];var r=ie,n=25,a,i;do{var o=R(r/2),s=ct(r/2);r-=a=(wf*(r-ie)-Bt(s)-i)/(wf-o*o/(2*s))}while(C(a)>Oe&&--n>0);return[t/(R(r)*(wf-1/T(r))),mt(e)*r]};function B1(){return $(Is).scale(112.314)}function Mf(t){var e=2*E/t;function r(n,a){var i=ar(n,a);if(C(n)>Q){var o=vt(i[1],i[0]),s=A(i[0]*i[0]+i[1]*i[1]),l=e*No((o-Q)/e)+Q,f=vt(T(o-=l),2-R(o));o=l+tt(E/s*T(f))-f,i[0]=s*R(o),i[1]=s*T(o)}return i}return r.invert=function(n,a){var i=A(n*n+a*a);if(i>Q){var o=vt(a,n),s=e*No((o-Q)/e)+Q,l=o>s?-1:1,f=i*R(s-o),u=1/ct(l*Ot((f-E)/A(E*(E-2*f)+i*i)));o=s+2*_t((u+l*A(u*u-3))/3),n=i*R(o),a=i*T(o)}return ar.invert(n,a)},r}function X1(){var t=5,e=Ct(Mf),r=e(t),n=r.stream,a=.01,i=-R(a*yt),o=T(a*yt);return r.lobes=function(s){return arguments.length?e(t=+s):t},r.stream=function(s){var l=r.rotate(),f=n(s),u=(r.rotate([0,0]),n(s));return r.rotate(l),f.sphere=function(){u.polygonStart(),u.lineStart();for(var c=0,p=360/t,m=2*E/t,h=90-180/t,d=Q;c<t;++c,h-=p,d-=m)u.point(vt(o*R(d),i)*kt,tt(o*T(d))*kt),h<-90?(u.point(-90,-180-h-a),u.point(-90,-180-h+a)):(u.point(90,h+a),u.point(90,h-a));u.lineEnd(),u.polygonEnd()},f},r.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function Zn(t,e){if(arguments.length<2&&(e=t),e===1)return on;if(e===1/0)return Z1;function r(n,a){var i=on(n/e,a);return i[0]*=t,i}return r.invert=function(n,a){var i=on.invert(n/t,a);return i[0]*=e,i},r}function Z1(t,e){return[t*R(e)/R(e/=2),2*T(e)]}Z1.invert=function(t,e){var r=2*tt(e/2);return[t*R(r/2)/R(r),r]};function Q1(){var t=2,e=Ct(Zn),r=e(t);return r.coefficient=function(n){return arguments.length?e(t=+n):t},r.scale(169.529)}function Qn(t,e,r){var n=100,a,i,o;r=r===void 0?0:+r,e=+e;do i=t(r),o=t(r+H),i===o&&(o=i+H),r-=a=-1*H*(i-e)/(i-o);while(n-- >0&&C(a)>H);return n<0?NaN:r}function Fo(t,e,r){return e===void 0&&(e=40),r===void 0&&(r=Oe),function(n,a,i,o){var s,l,f;i=i===void 0?0:+i,o=o===void 0?0:+o;for(var u=0;u<e;u++){var c=t(i,o),p=c[0]-n,m=c[1]-a;if(C(p)<r&&C(m)<r)break;var h=p*p+m*m;if(h>s){i-=l/=2,o-=f/=2;continue}s=h;var d=(i>0?-1:1)*r,y=(o>0?-1:1)*r,b=t(i+d,o),g=t(i,o+y),k=(b[0]-c[0])/d,w=(b[1]-c[1])/d,D=(g[0]-c[0])/y,F=(g[1]-c[1])/y,U=F*k-w*D,K=(C(U)<.5?.5:1)/U;if(l=(m*D-p*F)*K,f=(p*w-m*k)*K,i+=l,o+=f,C(l)<r&&C(f)<r)break}return[i,o]}}function bf(){var t=Zn(1.68,2),e=1.4,r=12;function n(a,i){if(a+i<-e){var o=(a-i+1.6)*(a+i+e)/8;a+=o,i-=.8*o*T(i+E/2)}var s=t(a,i),l=(1-R(a*i))/r;return s[1]<0&&(s[0]*=1+l),s[1]>0&&(s[1]*=1+l/1.5*s[0]*s[0]),s}return n.invert=Fo(n),n}function K1(){return $(bf()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Sf(t,e){var r=t*T(e),n=30,a;do e-=a=(e+T(e)-r)/(1+R(e));while(C(a)>H&&--n>0);return e/2}function Ha(t,e,r){function n(a,i){return[t*a*R(i=Sf(r,i)),e*T(i)]}return n.invert=function(a,i){return i=tt(i/e),[a/(t*R(i)),tt((2*i+T(2*i))/r)]},n}var Ze=Ha(qt/Q,qt,E);function J1(){return $(Ze).scale(169.529)}var Ns=2.00276,th=1.11072;function Lo(t,e){var r=Sf(E,e);return[Ns*t/(1/R(e)+th/R(r)),(e+qt*T(r))/Ns]}Lo.invert=function(t,e){var r=Ns*e,n=e<0?-ie:ie,a=25,i,o;do o=r-qt*T(n),n-=i=(T(2*n)+2*n-E*T(o))/(2*R(2*n)+2+E*R(o)*qt*R(n));while(C(i)>H&&--a>0);return o=r-qt*T(n),[t*(1/R(o)+th/R(n))/Ns,o]};function eh(){return $(Lo).scale(160.857)}function lr(t){var e=0,r=Ct(t),n=r(e);return n.parallel=function(a){return arguments.length?r(e=a*yt):e*kt},n}function $e(t,e){return[t*R(e),e]}$e.invert=function(t,e){return[t/R(e),e]};function rh(){return $($e).scale(152.63)}function Pf(t){if(!t)return $e;var e=1/ct(t);function r(n,a){var i=e+t-a,o=i&&n*R(a)/i;return[i*T(o),e-i*R(o)]}return r.invert=function(n,a){var i=A(n*n+(a=e-a)*a),o=e+t-i;return[i/R(o)*vt(n,a),o]},r}function nh(){return lr(Pf).scale(123.082).center([0,26.1441]).parallel(45)}function kf(t){function e(r,n){var a=Q-n,i=a&&r*t*T(a)/a;return[a*T(i)/t,Q-a*R(i)]}return e.invert=function(r,n){var a=r*t,i=Q-n,o=A(a*a+i*i),s=vt(a,i);return[(o?o/T(o):1)*s/t,Q-o]},e}function oh(){var t=.5,e=Ct(kf),r=e(t);return r.fraction=function(n){return arguments.length?e(t=+n):t},r.scale(158.837)}var Rf=Ha(1,4/E,E);function ah(){return $(Rf).scale(152.63)}function ih(t,e,r,n,a,i){var o=R(i),s;if(C(t)>1||C(i)>1)s=Ot(r*a+e*n*o);else{var l=T(t/2),f=T(i/2);s=2*tt(A(l*l+e*n*f*f))}return C(s)>H?[s,vt(n*T(i),e*a-r*n*o)]:[0,0]}function Tf(t,e,r){return Ot((t*t+e*e-r*r)/(2*t*e))}function Ex(t){return t-2*E*Br((t+E)/(2*E))}function zf(t,e,r){for(var n=[[t[0],t[1],T(t[1]),R(t[1])],[e[0],e[1],T(e[1]),R(e[1])],[r[0],r[1],T(r[1]),R(r[1])]],a=n[2],i,o=0;o<3;++o,a=i)i=n[o],a.v=ih(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var s=Tf(n[0].v[0],n[2].v[0],n[1].v[0]),l=Tf(n[0].v[0],n[1].v[0],n[2].v[0]),f=E-s;n[2].point[1]=0,n[0].point[0]=-(n[1].point[0]=n[0].v[0]/2);var u=[n[2].point[0]=n[0].point[0]+n[2].v[0]*R(s),2*(n[0].point[1]=n[1].point[1]=n[2].v[0]*T(s))];function c(p,m){var h=T(m),d=R(m),y=new Array(3),b;for(b=0;b<3;++b){var g=n[b];if(y[b]=ih(m-g[1],g[3],g[2],d,h,p-g[0]),!y[b][0])return g.point;y[b][1]=Ex(y[b][1]-g.v[1])}var k=u.slice();for(b=0;b<3;++b){var w=b==2?0:b+1,D=Tf(n[b].v[0],y[b][0],y[w][0]);y[b][1]<0&&(D=-D),b?b==1?(D=l-D,k[0]-=y[b][0]*R(D),k[1]-=y[b][0]*T(D)):(D=f-D,k[0]+=y[b][0]*R(D),k[1]+=y[b][0]*T(D)):(k[0]+=y[b][0]*R(D),k[1]-=y[b][0]*T(D))}return k[0]/=3,k[1]/=3,k}return c}function Ef(t){return t[0]*=yt,t[1]*=yt,t}function sh(){return Ds([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ds(t,e,r){var n=nr({type:"MultiPoint",coordinates:[t,e,r]}),a=[-n[0],-n[1]],i=or(a),o=zf(Ef(i(t)),Ef(i(e)),Ef(i(r)));o.invert=Fo(o);var s=$(o).rotate(a),l=s.center;return delete s.rotate,s.center=function(f){return arguments.length?l(i(f)):i.invert(l())},s.clipAngle(90)}function Ie(t,e){var r=A(1-T(e));return[2/Se*t*r,Se*(1-r)]}Ie.invert=function(t,e){var r=(r=e/Se-1)*r;return[r>0?t*A(E/r)/2:0,tt(1-r)]};function lh(){return $(Ie).scale(95.6464).center([0,30])}function _f(t){var e=ct(t);function r(n,a){return[n,(n?n/T(n):1)*(T(a)*R(n)-e*R(a))]}return r.invert=e?function(n,a){n&&(a*=T(n)/n);var i=R(n);return[n,2*vt(A(i*i+e*e-a*a)-i,e-a)]}:function(n,a){return[n,tt(n?a*ct(n)/n:a)]},r}function uh(){return lr(_f).scale(249.828).clipAngle(90)}var js=A(3);function Fs(t,e){return[js*t*(2*R(2*e/3)-1)/Se,js*Se*T(e/3)]}Fs.invert=function(t,e){var r=3*tt(e/(js*Se));return[Se*t/(js*(2*R(2*r/3)-1)),r]};function fh(){return $(Fs).scale(156.19)}function Kn(t){var e=R(t);function r(n,a){return[n*e,T(a)/e]}return r.invert=function(n,a){return[n/e,tt(a*e)]},r}function ch(){return lr(Kn).parallel(38.58).scale(195.044)}function Af(t){var e=R(t);function r(n,a){return[n*e,(1+e)*ct(a/2)]}return r.invert=function(n,a){return[n/e,_t(a/(1+e))*2]},r}function ph(){return lr(Af).scale(124.75)}function Ls(t,e){var r=A(8/(3*E));return[r*t*(1-C(e)/E),r*e]}Ls.invert=function(t,e){var r=A(8/(3*E)),n=e/r;return[t/(r*(1-C(n)/E)),n]};function mh(){return $(Ls).scale(165.664)}function Os(t,e){var r=A(4-3*T(C(e)));return[2/A(6*E)*t*r,mt(e)*A(2*E/3)*(2-r)]}Os.invert=function(t,e){var r=2-C(e)/A(2*E/3);return[t*A(6*E)/(2*r),mt(e)*tt((4-r*r)/3)]};function hh(){return $(Os).scale(165.664)}function $s(t,e){var r=A(E*(4+E));return[2/r*t*(1+A(1-4*e*e/(E*E))),4/r*e]}$s.invert=function(t,e){var r=A(E*(4+E))/2;return[t*r/(1+A(1-e*e*(4+E)/(4*E))),e*r/2]};function dh(){return $($s).scale(180.739)}function Us(t,e){var r=(2+Q)*T(e);e/=2;for(var n=0,a=1/0;n<10&&C(a)>H;n++){var i=R(e);e-=a=(e+T(e)*(i+2)-r)/(2*i*(1+i))}return[2/A(E*(4+E))*t*(1+R(e)),2*A(E/(4+E))*T(e)]}Us.invert=function(t,e){var r=e*A((4+E)/E)/2,n=tt(r),a=R(n);return[t/(2/A(E*(4+E))*(1+a)),tt((n+r*(a+2))/(2+Q))]};function gh(){return $(Us).scale(180.739)}function Hs(t,e){return[t*(1+R(e))/A(2+E),2*e/A(2+E)]}Hs.invert=function(t,e){var r=A(2+E),n=e*r/2;return[r*t/(1+R(n)),n]};function vh(){return $(Hs).scale(173.044)}function Gs(t,e){for(var r=(1+Q)*T(e),n=0,a=1/0;n<10&&C(a)>H;n++)e-=a=(e+T(e)-r)/(1+R(e));return r=A(2+E),[t*(1+R(e))/r,2*e/r]}Gs.invert=function(t,e){var r=1+Q,n=A(r/2);return[t*2*n/(1+R(e*=n)),tt((e+T(e))/r)]};function yh(){return $(Gs).scale(173.044)}var Ys=3+2*qt;function Ws(t,e){var r=T(t/=2),n=R(t),a=A(R(e)),i=R(e/=2),o=T(e)/(i+qt*n*a),s=A(2/(1+o*o)),l=A((qt*i+(n+r)*a)/(qt*i+(n-r)*a));return[Ys*(s*(l-1/l)-2*Bt(l)),Ys*(s*o*(l+1/l)-2*_t(o))]}Ws.invert=function(t,e){if(!(i=jo.invert(t/1.2,e*1.065)))return null;var r=i[0],n=i[1],a=20,i;t/=Ys,e/=Ys;do{var o=r/2,s=n/2,l=T(o),f=R(o),u=T(s),c=R(s),p=R(n),m=A(p),h=u/(c+qt*f*m),d=h*h,y=A(2/(1+d)),b=qt*c+(f+l)*m,g=qt*c+(f-l)*m,k=b/g,w=A(k),D=w-1/w,F=w+1/w,U=y*D-2*Bt(w)-t,K=y*h*F-2*_t(h)-e,et=u&&be*m*l*d/u,P=(qt*f*c+m)/(2*(c+qt*f*m)*(c+qt*f*m)*m),S=-.5*h*y*y*y,N=S*et,Y=S*P,x=(x=2*c+qt*m*(f-l))*x*w,v=(qt*f*c*m+p)/x,z=-(qt*l*u)/(m*x),V=D*N-2*v/w+y*(v+v/k),j=D*Y-2*z/w+y*(z+z/k),Z=h*F*N-2*et/(1+d)+y*F*et+y*h*(v-v/k),G=h*F*Y-2*P/(1+d)+y*F*P+y*h*(z-z/k),at=j*Z-G*V;if(!at)break;var xt=(K*j-U*G)/at,Mt=(U*Z-K*V)/at;r-=xt,n=Le(-Q,oe(Q,n-Mt))}while((C(xt)>H||C(Mt)>H)&&--a>0);return C(C(n)-Q)<H?[0,n]:a&&[r,n]};function xh(){return $(Ws).scale(62.5271)}var Vs=R(35*yt);function Bs(t,e){var r=ct(e/2);return[t*Vs*A(1-r*r),(1+Vs)*r]}Bs.invert=function(t,e){var r=e/(1+Vs);return[t&&t/(Vs*A(1-r*r)),2*_t(r)]};function wh(){return $(Bs).scale(137.152)}function Xs(t,e){var r=e/2,n=R(r);return[2*t/Se*R(e)*n*n,Se*ct(r)]}Xs.invert=function(t,e){var r=_t(e/Se),n=R(r),a=2*r;return[t*Se/2/(R(a)*n*n),a]};function Mh(){return $(Xs).scale(135.264)}function qf(t){var e=1-t,r=i(E,0)[0]-i(-E,0)[0],n=i(0,Q)[1]-i(0,-Q)[1],a=A(2*n/r);function i(l,f){var u=R(f),c=T(f);return[u/(e+t*u)*l,e*f+t*c]}function o(l,f){var u=i(l,f);return[u[0]*a,u[1]/a]}function s(l){return o(0,l)[1]}return o.invert=function(l,f){var u=Qn(s,f),c=l/a*(t+e/R(u));return[c,u]},o}function bh(){var t=.5,e=Ct(qf),r=e(t);return r.alpha=function(n){return arguments.length?e(t=+n):t},r.scale(168.725)}function Sh(t){return[t[0]/2,tt(ct(t[1]/2*yt))*kt]}function Ph(t){return[t[0]*2,2*_t(T(t[1]*yt))*kt]}function kh(t){t==null&&(t=Zi);var e=t(),r=Yi().scale(kt).precision(0).clipAngle(null).translate([0,0]);function n(i){return e(Sh(i))}e.invert&&(n.invert=function(i){return Ph(e.invert(i))}),n.stream=function(i){var o=e.stream(i),s=r.stream({point:function(l,f){o.point(l/2,tt(ct(-f/2*yt))*kt)},lineStart:function(){o.lineStart()},lineEnd:function(){o.lineEnd()},polygonStart:function(){o.polygonStart()},polygonEnd:function(){o.polygonEnd()}});return s.sphere=o.sphere,s};function a(i){n[i]=function(){return arguments.length?(e[i].apply(e,arguments),n):e[i]()}}return n.rotate=function(i){return arguments.length?(r.rotate(i),n):r.rotate()},n.center=function(i){return arguments.length?(e.center(Sh(i)),n):Ph(e.center())},a("angle"),a("clipAngle"),a("clipExtent"),a("fitExtent"),a("fitHeight"),a("fitSize"),a("fitWidth"),a("scale"),a("translate"),a("precision"),n.scale(249.5)}function Cf(t,e){var r=2*E/e,n=t*t;function a(i,o){var s=ar(i,o),l=s[0],f=s[1],u=l*l+f*f;if(u>n){var c=A(u),p=vt(f,l),m=r*No(p/r),h=p-m,d=t*R(h),y=(t*T(h)-h*T(d))/(Q-d),b=Rh(h,y),g=(E-t)/Zs(b,d,E);l=c;var k=50,w;do l-=w=(t+Zs(b,d,l)*g-c)/(b(l)*g);while(C(w)>H&&--k>0);f=h*T(l),l<Q&&(f-=y*(l-Q));var D=T(m),F=R(m);s[0]=l*F-f*D,s[1]=l*D+f*F}return s}return a.invert=function(i,o){var s=i*i+o*o;if(s>n){var l=A(s),f=vt(o,i),u=r*No(f/r),c=f-u;i=l*R(c),o=l*T(c);for(var p=i-Q,m=T(i),h=o/m,d=i<Q?1/0:0,y=10;;){var b=t*T(h),g=t*R(h),k=T(g),w=Q-g,D=(b-h*k)/w,F=Rh(h,D);if(C(d)<Oe||!--y)break;h-=d=(h*m-D*p-o)/(m-p*2*(w*(g+h*b*R(g)-k)-b*(b-h*k))/(w*w))}l=t+Zs(F,g,i)*(E-t)/Zs(F,g,E),f=u+h,i=l*R(f),o=l*T(f)}return ar.invert(i,o)},a}function Rh(t,e){return function(r){var n=t*R(r);return r<Q&&(n-=e),A(1+n*n)}}function Zs(t,e,r){for(var n=50,a=(r-e)/n,i=t(e)+t(r),o=1,s=e;o<n;++o)i+=2*t(s+=a);return i*.5*a}function Th(){var t=6,e=30*yt,r=R(e),n=T(e),a=Ct(Cf),i=a(e,t),o=i.stream,s=.01,l=-R(s*yt),f=T(s*yt);return i.radius=function(u){return arguments.length?(r=R(e=u*yt),n=T(e),a(e,t)):e*kt},i.lobes=function(u){return arguments.length?a(e,t=+u):t},i.stream=function(u){var c=i.rotate(),p=o(u),m=(i.rotate([0,0]),o(u));return i.rotate(c),p.sphere=function(){m.polygonStart(),m.lineStart();for(var h=0,d=2*E/t,y=0;h<t;++h,y-=d)m.point(vt(f*R(y),l)*kt,tt(f*T(y))*kt),m.point(vt(n*R(y-d/2),r)*kt,tt(n*T(y-d/2))*kt);m.lineEnd(),m.polygonEnd()},p},i.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function dn(t,e,r,n,a,i,o,s){arguments.length<8&&(s=0);function l(f,u){if(!u)return[t*f/E,0];var c=u*u,p=t+c*(e+c*(r+c*n)),m=u*(a-1+c*(i-s+c*o)),h=(p*p+m*m)/(2*m),d=f*tt(p/h)/E;return[h*T(d),u*(1+c*s)+h*(1-R(d))]}return l.invert=function(f,u){var c=E*f/t,p=u,m,h,d=50;do{var y=p*p,b=t+y*(e+y*(r+y*n)),g=p*(a-1+y*(i-s+y*o)),k=b*b+g*g,w=2*g,D=k/w,F=D*D,U=tt(b/D)/E,K=c*U,et=b*b,P=(2*e+y*(4*r+y*6*n))*p,S=a+y*(3*i+y*5*o),N=2*(b*P+g*(S-1)),Y=2*(S-1),x=(N*w-k*Y)/(w*w),v=R(K),z=T(K),V=D*v,j=D*z,Z=c/E*(1/A(1-et/F))*(P*D-b*x)/F,G=j-f,at=p*(1+y*s)+D-V-u,xt=x*z+V*Z,Mt=V*U,Rt=1+x-(x*v-j*Z),q=j*U,W=xt*q-Rt*Mt;if(!W)break;c-=m=(at*xt-G*Rt)/W,p-=h=(G*q-at*Mt)/W}while((C(m)>H||C(h)>H)&&--d>0);return[c,p]},l}var If=dn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Eh(){return $(If).scale(149.995)}var Nf=dn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function zh(){return $(Nf).scale(153.93)}var Df=dn(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function _h(){return $(Df).scale(130.945)}function Qs(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Qs.invert=function(t,e){var r=t,n=e,a=50,i;do{var o=n*n;n-=i=(n*(1+o/12)-e)/(1+o/4)}while(C(i)>H&&--a>0);a=50,t/=1-.162388*o;do{var s=(s=r*r)*s;r-=i=(r*(.87-952426e-9*s)-t)/(.87-.00476213*s)}while(C(i)>H&&--a>0);return[r,n]};function Ah(){return $(Qs).scale(131.747)}var jf=dn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function qh(){return $(jf).scale(131.087)}function Ks(t){var e=t(Q,0)[0]-t(-Q,0)[0];function r(n,a){var i=n>0?-.5:.5,o=t(n+i*E,a);return o[0]-=i*e,o}return t.invert&&(r.invert=function(n,a){var i=n>0?-.5:.5,o=t.invert(n+i*e,a),s=o[0]-i*E;return s<-E?s+=2*E:s>E&&(s-=2*E),o[0]=s,o}),r}function Oo(t,e){var r=mt(t),n=mt(e),a=R(e),i=R(t)*a,o=T(t)*a,s=T(n*e);t=C(vt(o,s)),e=tt(i),C(t-Q)>H&&(t%=Q);var l=zx(t>E/4?Q-t:t,e);return t>E/4&&(s=l[0],l[0]=-l[1],l[1]=-s),l[0]*=r,l[1]*=-n,l}Oo.invert=function(t,e){C(t)>1&&(t=mt(t)*2-t),C(e)>1&&(e=mt(e)*2-e);var r=mt(t),n=mt(e),a=-r*t,i=-n*e,o=i/a<1,s=_x(o?i:a,o?a:i),l=s[0],f=s[1],u=R(f);return o&&(l=-Q-l),[r*(vt(T(l)*u,-T(f))+E),n*tt(R(l)*u)]};function zx(t,e){if(e===Q)return[0,0];var r=T(e),n=r*r,a=n*n,i=1+a,o=1+3*a,s=1-a,l=tt(1/A(i)),f=s+n*i*l,u=(1-r)/f,c=A(u),p=u*i,m=A(p),h=c*s,d,y;if(t===0)return[0,-(h+n*m)];var b=R(e),g=1/b,k=2*r*b,w=(-3*n+l*o)*k,D=(-f*b-(1-r)*w)/(f*f),F=.5*D/c,U=s*F-2*n*c*k,K=n*i*D+u*o*k,et=-g*k,P=-g*K,S=-2*g*U,N=4*t/E,Y;if(t>.222*E||e<E/4&&t>.175*E){if(d=(h+n*A(p*(1+a)-h*h))/(1+a),t>E/4)return[d,d];var x=d,v=.5*d;d=.5*(v+x),y=50;do{var z=A(p-d*d),V=d*(S+et*z)+P*tt(d/m)-N;if(!V)break;V<0?v=d:x=d,d=.5*(v+x)}while(C(x-v)>H&&--y>0)}else{d=H,y=25;do{var j=d*d,Z=A(p-j),G=S+et*Z,at=d*G+P*tt(d/m)-N,xt=G+(P-et*j)/Z;d-=Y=Z?at/xt:0}while(C(Y)>H&&--y>0)}return[d,-h-n*A(p-d*d)]}function _x(t,e){for(var r=0,n=1,a=.5,i=50;;){var o=a*a,s=A(a),l=tt(1/A(1+o)),f=1-o+a*(1+o)*l,u=(1-s)/f,c=A(u),p=u*(1+o),m=c*(1-o),h=p-t*t,d=A(h),y=e+m+a*d;if(C(n-r)<Oe||--i===0||y===0)break;y>0?r=a:n=a,a=.5*(r+n)}if(!i)return null;var b=tt(s),g=R(b),k=1/g,w=2*s*g,D=(-3*a+l*(1+3*o))*w,F=(-f*g-(1-s)*D)/(f*f),U=.5*F/c,K=(1-o)*U-2*a*c*w,et=-2*k*K,P=-k*w,S=-k*(a*(1+o)*F+u*(1+3*o)*w);return[E/4*(t*(et+P*d)+S*tt(t/A(p))),b]}function Ch(){return $(Ks(Oo)).scale(239.75)}function Ih(t,e,r){var n,a,i;return t?(n=Ff(t,r),e?(a=Ff(e,1-r),i=a[1]*a[1]+r*n[0]*n[0]*a[0]*a[0],[[n[0]*a[2]/i,n[1]*n[2]*a[0]*a[1]/i],[n[1]*a[1]/i,-n[0]*n[2]*a[0]*a[2]/i],[n[2]*a[1]*a[2]/i,-r*n[0]*n[1]*a[0]/i]]):[[n[0],0],[n[1],0],[n[2],0]]):(a=Ff(e,1-r),[[0,a[0]/a[1]],[1/a[1],0],[a[2]/a[1],0]])}function Ff(t,e){var r,n,a,i,o;if(e<H)return i=T(t),n=R(t),r=e*(t-i*n)/4,[i-r*n,n+r*i,1-e*i*i/2,t-r];if(e>=1-H)return r=(1-e)/4,n=Cs(t),i=$1(t),a=1/n,o=n*Ua(t),[i+r*(o-t)/(n*n),a-r*i*a*(o-t),a+r*i*a*(o+t),2*_t(Fe(t))-Q+r*(o-t)/n];var s=[1,0,0,0,0,0,0,0,0],l=[A(e),0,0,0,0,0,0,0,0],f=0;for(n=A(1-e),o=1;C(l[f]/s[f])>H&&f<8;)r=s[f++],l[f]=(r-n)/2,s[f]=(r+n)/2,n=A(r*n),o*=2;a=o*s[f]*t;do i=l[f]*T(n=a)/s[f],a=(tt(i)+a)/2;while(--f);return[T(a),i=R(a),i/R(a-n),a]}function Nh(t,e,r){var n=C(t),a=C(e),i=Ua(a);if(n){var o=1/T(n),s=1/(ct(n)*ct(n)),l=-(s+r*(i*i*o*o)-1+r),f=(r-1)*s,u=(-l+A(l*l-4*f))/2;return[$o(_t(1/A(u)),r)*mt(t),$o(_t(A((u/s-1)/r)),1-r)*mt(e)]}return[0,$o(_t(i),1-r)*mt(e)]}function $o(t,e){if(!e)return t;if(e===1)return Bt(ct(t/2+ie));for(var r=1,n=A(1-e),a=A(e),i=0;C(a)>H;i++){if(t%E){var o=_t(n*ct(t)/r);o<0&&(o+=E),t+=o+~~(t/E)*E}else t+=t;a=(r+n)/2,n=A(r*n),a=((r=a)-n)/2}return t/(hn(2,i)*r)}function Uo(t,e){var r=(qt-1)/(qt+1),n=A(1-r*r),a=$o(Q,n*n),i=-1,o=Bt(ct(E/4+C(e)/2)),s=Fe(i*o)/A(r),l=Ax(s*R(i*t),s*T(i*t)),f=Nh(l[0],l[1],n*n);return[-f[1],(e>=0?1:-1)*(.5*a-f[0])]}function Ax(t,e){var r=t*t,n=e+1,a=1-r-e*e;return[.5*((t>=0?Q:-Q)-vt(a,2*t)),-.25*Bt(a*a+4*r)+.5*Bt(n*n+r)]}function qx(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}Uo.invert=function(t,e){var r=(qt-1)/(qt+1),n=A(1-r*r),a=$o(Q,n*n),i=-1,o=Ih(.5*a-e,-t,n*n),s=qx(o[0],o[1]),l=vt(s[1],s[0])/i;return[l,2*_t(Fe(.5/i*Bt(r*s[0]*s[0]+r*s[1]*s[1])))-Q]};function Dh(){return $(Ks(Uo)).scale(151.496)}function Lf(t){var e=T(t),r=R(t),n=jh(t);n.invert=jh(-t);function a(i,o){var s=n(i,o);i=s[0],o=s[1];var l=T(o),f=R(o),u=R(i),c=Ot(e*l+r*f*u),p=T(c),m=C(p)>H?c/p:1;return[m*r*T(i),(C(i)>Q?m:-m)*(e*f-r*l*u)]}return a.invert=function(i,o){var s=A(i*i+o*o),l=-T(s),f=R(s),u=s*f,c=-o*l,p=s*e,m=A(u*u+c*c-p*p),h=vt(u*p+c*m,c*p-u*m),d=(s>Q?-1:1)*vt(i*l,s*R(h)*f+o*T(h)*l);return n.invert(d,h)},a}function jh(t){var e=T(t),r=R(t);return function(n,a){var i=R(a),o=R(n)*i,s=T(n)*i,l=T(a);return[vt(s,o*r-l*e),tt(l*r+o*e)]}}function Fh(){var t=0,e=Ct(Lf),r=e(t),n=r.rotate,a=r.stream,i=je();return r.parallel=function(o){if(!arguments.length)return t*kt;var s=r.rotate();return e(t=o*yt).rotate(s)},r.rotate=function(o){return arguments.length?(n.call(r,[o[0],o[1]-t*kt]),i.center([-o[0],-o[1]]),r):(o=n.call(r),o[1]+=t*kt,o)},r.stream=function(o){return o=a(o),o.sphere=function(){o.polygonStart();var s=.01,l=i.radius(90-s)().coordinates[0],f=l.length-1,u=-1,c;for(o.lineStart();++u<f;)o.point((c=l[u])[0],c[1]);for(o.lineEnd(),l=i.radius(90+s)().coordinates[0],f=l.length-1,o.lineStart();--u>=0;)o.point((c=l[u])[0],c[1]);o.lineEnd(),o.polygonEnd()},o},r.scale(79.4187).parallel(45).clipAngle(180-.001)}var Cx=3,$f=tt(1-1/Cx)*kt,Of=Kn(0);function Uf(t){var e=$f*yt,r=Ie(E,e)[0]-Ie(-E,e)[0],n=Of(0,e)[1],a=Ie(0,e)[1],i=Se-a,o=Xe/t,s=4/Xe,l=n+i*i*4/Xe;function f(u,c){var p,m=C(c);if(m>e){var h=oe(t-1,Le(0,Br((u+E)/o)));u+=E*(t-1)/t-h*o,p=Ie(u,m),p[0]=p[0]*Xe/r-Xe*(t-1)/(2*t)+h*Xe/t,p[1]=n+(p[1]-a)*4*i/Xe,c<0&&(p[1]=-p[1])}else p=Of(u,c);return p[0]*=s,p[1]/=l,p}return f.invert=function(u,c){u/=s,c*=l;var p=C(c);if(p>n){var m=oe(t-1,Le(0,Br((u+E)/o)));u=(u+E*(t-1)/t-m*o)*r/Xe;var h=Ie.invert(u,.25*(p-n)*Xe/i+a);return h[0]-=E*(t-1)/t-m*o,c<0&&(h[1]=-h[1]),h}return Of.invert(u,c)},f}function Ix(t,e){return[t,e&1?90-H:$f]}function Nx(t,e){return[t,e&1?-90+H:-$f]}function Dx(t){return[t[0]*(1-H),t[1]]}function jx(t){var e=[].concat(tr(-180,180+t/2,t).map(Ix),tr(180,-180-t/2,-t).map(Nx));return{type:"Polygon",coordinates:[t===180?e.map(Dx):e]}}function Lh(){var t=4,e=Ct(Uf),r=e(t),n=r.stream;return r.lobes=function(a){return arguments.length?e(t=+a):t},r.stream=function(a){var i=r.rotate(),o=n(a),s=(r.rotate([0,0]),n(a));return r.rotate(i),o.sphere=function(){Qt(jx(180/t),s)},o},r.scale(239.75)}function Hf(t){var e=1+t,r=T(1/e),n=tt(r),a=2*A(E/(i=E+4*n*e)),i,o=.5*a*(e+A(t*(2+t))),s=t*t,l=e*e;function f(u,c){var p=1-T(c),m,h;if(p&&p<2){var d=Q-c,y=25,b;do{var g=T(d),k=R(d),w=n+vt(g,e-k),D=1+l-2*e*k;d-=b=(d-s*n-e*g+D*w-.5*p*i)/(2*e*g*w)}while(C(b)>Oe&&--y>0);m=a*A(D),h=u*w/E}else m=a*(t+p),h=u*n/E;return[m*T(h),o-m*R(h)]}return f.invert=function(u,c){var p=u*u+(c-=o)*c,m=(1+l-p/(a*a))/(2*e),h=Ot(m),d=T(h),y=n+vt(d,e-m);return[tt(u/A(p))*E/y,tt(1-2*(h-s*n-e*d+(1+l-2*e*m)*y)/i)]},f}function Oh(){var t=1,e=Ct(Hf),r=e(t);return r.ratio=function(n){return arguments.length?e(t=+n):t},r.scale(167.774).center([0,18.67])}var Ga=.7109889596207567,Jn=.0528035274542;function Ho(t,e){return e>-Ga?(t=Ze(t,e),t[1]+=Jn,t):$e(t,e)}Ho.invert=function(t,e){return e>-Ga?Ze.invert(t,e-Jn):$e.invert(t,e)};function $h(){return $(Ho).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Go(t,e){return C(e)>Ga?(t=Ze(t,e),t[1]-=e>0?Jn:-Jn,t):$e(t,e)}Go.invert=function(t,e){return C(e)>Ga?Ze.invert(t,e+(e>0?Jn:-Jn)):$e.invert(t,e)};function Uh(){return $(Go).scale(152.63)}function Gf(t,e,r,n){var a=A(4*E/(2*r+(1+t-e/2)*T(2*r)+(t+e)/2*T(4*r)+e/2*T(6*r))),i=A(n*T(r)*A((1+t*R(2*r)+e*R(4*r))/(1+t+e))),o=r*l(1);function s(c){return A(1+t*R(2*c)+e*R(4*c))}function l(c){var p=c*r;return(2*p+(1+t-e/2)*T(2*p)+(t+e)/2*T(4*p)+e/2*T(6*p))/r}function f(c){return s(c)*T(c)}var u=function(c,p){var m=r*Qn(l,o*T(p)/r,p/E);isNaN(m)&&(m=r*mt(p));var h=a*s(m);return[h*i*c/E*R(m),h/i*T(m)]};return u.invert=function(c,p){var m=Qn(f,p*i/a);return[c*E/(R(m)*a*i*s(m)),tt(r*l(m/r)/o)]},r===0&&(a=A(n/E),u=function(c,p){return[c*a,T(p)/a]},u.invert=function(c,p){return[c/a,tt(p*a)]}),u}function Hh(){var t=1,e=0,r=45*yt,n=2,a=Ct(Gf),i=a(t,e,r,n);return i.a=function(o){return arguments.length?a(t=+o,e,r,n):t},i.b=function(o){return arguments.length?a(t,e=+o,r,n):e},i.psiMax=function(o){return arguments.length?a(t,e,r=+o*yt,n):r*kt},i.ratio=function(o){return arguments.length?a(t,e,r,n=+o):n},i.scale(180.739)}function Yf(t,e,r,n,a,i,o,s,l,f,u){if(u.nanEncountered)return NaN;var c,p,m,h,d,y,b,g,k,w;if(c=r-e,p=t(e+c*.25),m=t(r-c*.25),isNaN(p)){u.nanEncountered=!0;return}if(isNaN(m)){u.nanEncountered=!0;return}return h=c*(n+4*p+a)/12,d=c*(a+4*m+i)/12,y=h+d,w=(y-o)/15,f>l?(u.maxDepthCount++,y+w):Math.abs(w)<s?y+w:(b=e+c*.5,g=Yf(t,e,b,n,p,a,h,s*.5,l,f+1,u),isNaN(g)?(u.nanEncountered=!0,NaN):(k=Yf(t,b,r,a,m,i,d,s*.5,l,f+1,u),isNaN(k)?(u.nanEncountered=!0,NaN):g+k))}function Gh(t,e,r,n,a){var i={maxDepthCount:0,nanEncountered:!1};n===void 0&&(n=1e-8),a===void 0&&(a=20);var o=t(e),s=t(.5*(e+r)),l=t(r),f=(o+4*s+l)*(r-e)/6,u=Yf(t,e,r,o,s,l,f,n,a,1,i);return u}function Wf(t,e,r){function n(m){return t+(1-t)*hn(1-hn(m,e),1/e)}function a(m){return Gh(n,0,m,1e-4)}for(var i=1/a(1),o=1e3,s=(1+1e-8)*i,l=[],f=0;f<=o;f++)l.push(a(f/o)*s);function u(m){var h=0,d=o,y=o>>1;do l[y]>m?d=y:h=y,y=h+d>>1;while(y>h);var b=l[y+1]-l[y];return b&&(b=(m-l[y+1])/b),(y+1+b)/o}var c=2*u(1)/E*i/r,p=function(m,h){var d=u(C(T(h))),y=n(d)*m;return d/=c,[y,h>=0?d:-d]};return p.invert=function(m,h){var d;return h*=c,C(h)<1&&(d=mt(h)*tt(a(C(h))*i)),[m/n(C(h)),d]},p}function Yh(){var t=0,e=2.5,r=1.183136,n=Ct(Wf),a=n(t,e,r);return a.alpha=function(i){return arguments.length?n(t=+i,e,r):t},a.k=function(i){return arguments.length?n(t,e=+i,r):e},a.gamma=function(i){return arguments.length?n(t,e,r=+i):r},a.scale(152.63)}function Fx(t,e){return C(t[0]-e[0])<H&&C(t[1]-e[1])<H}function Wh(t,e){for(var r=-1,n=t.length,a=t[0],i,o,s,l=[];++r<n;){i=t[r],o=(i[0]-a[0])/e,s=(i[1]-a[1])/e;for(var f=0;f<e;++f)l.push([a[0]+f*o,a[1]+f*s]);a=i}return l.push(i),l}function Lx(t){var e=[],r,n,a,i,o,s,l,f=t[0].length;for(l=0;l<f;++l)r=t[0][l],n=r[0][0],a=r[0][1],i=r[1][1],o=r[2][0],s=r[2][1],e.push(Wh([[n+H,a+H],[n+H,i-H],[o-H,i-H],[o-H,s+H]],30));for(l=t[1].length-1;l>=0;--l)r=t[1][l],n=r[0][0],a=r[0][1],i=r[1][1],o=r[2][0],s=r[2][1],e.push(Wh([[o-H,s-H],[o-H,i+H],[n+H,i+H],[n+H,a-H]],30));return{type:"Polygon",coordinates:[Jr(e)]}}function Pe(t,e,r){var n,a;function i(l,f){for(var u=f<0?-1:1,c=e[+(f<0)],p=0,m=c.length-1;p<m&&l>c[p][2][0];++p);var h=t(l-c[p][1][0],f);return h[0]+=t(c[p][1][0],u*f>u*c[p][0][1]?c[p][0][1]:f)[0],h}r?i.invert=r(i):t.invert&&(i.invert=function(l,f){for(var u=a[+(f<0)],c=e[+(f<0)],p=0,m=u.length;p<m;++p){var h=u[p];if(h[0][0]<=l&&l<h[1][0]&&h[0][1]<=f&&f<h[1][1]){var d=t.invert(l-t(c[p][1][0],0)[0],f);return d[0]+=c[p][1][0],Fx(i(d[0],d[1]),[l,f])?d:null}}});var o=$(i),s=o.stream;return o.stream=function(l){var f=o.rotate(),u=s(l),c=(o.rotate([0,0]),s(l));return o.rotate(f),u.sphere=function(){Qt(n,c)},u},o.lobes=function(l){return arguments.length?(n=Lx(l),e=l.map(function(f){return f.map(function(u){return[[u[0][0]*yt,u[0][1]*yt],[u[1][0]*yt,u[1][1]*yt],[u[2][0]*yt,u[2][1]*yt]]})}),a=e.map(function(f){return f.map(function(u){var c=t(u[0][0],u[0][1])[0],p=t(u[2][0],u[2][1])[0],m=t(u[1][0],u[0][1])[1],h=t(u[1][0],u[1][1])[1],d;return m>h&&(d=m,m=h,h=d),[[c,m],[p,h]]})}),o):e.map(function(f){return f.map(function(u){return[[u[0][0]*kt,u[0][1]*kt],[u[1][0]*kt,u[1][1]*kt],[u[2][0]*kt,u[2][1]*kt]]})})},e!=null&&o.lobes(e),o}var Ox=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vh(){return Pe(Lo,Ox).scale(160.857)}var $x=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bh(){return Pe(Go,$x).scale(152.63)}var Ux=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Xh(){return Pe(Ze,Ux).scale(169.529)}var Hx=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Zh(){return Pe(Ze,Hx).scale(169.529).rotate([20,0])}var Gx=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function Qh(){return Pe(Ho,Gx,Fo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Yx=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Kh(){return Pe($e,Yx).scale(152.63).rotate([-20,0])}function Js(t,e){return[3/Xe*t*A(E*E/3-e*e),e]}Js.invert=function(t,e){return[Xe/3*t/A(E*E/3-e*e),e]};function Jh(){return $(Js).scale(158.837)}function Vf(t){function e(r,n){if(C(C(n)-Q)<H)return[0,n<0?-2:2];var a=T(n),i=hn((1+a)/(1-a),t/2),o=.5*(i+1/i)+R(r*=t);return[2*T(r)/o,(i-1/i)/o]}return e.invert=function(r,n){var a=C(n);if(C(a-2)<H)return r?null:[0,mt(n)*Q];if(a>2)return null;r/=2,n/=2;var i=r*r,o=n*n,s=2*n/(1+i+o);return s=hn((1+s)/(1-s),1/t),[vt(2*r,1-i-o)/t,tt((s-1)/(s+1))]},e}function td(){var t=.5,e=Ct(Vf),r=e(t);return r.spacing=function(n){return arguments.length?e(t=+n):t},r.scale(124.75)}var Bf=E/qt;function tl(t,e){return[t*(1+A(R(e)))/2,e/(R(e/2)*R(t/6))]}tl.invert=function(t,e){var r=C(t),n=C(e),a=H,i=Q;n<Bf?i*=n/Bf:a+=6*Ot(Bf/n);for(var o=0;o<25;o++){var s=T(i),l=A(R(i)),f=T(i/2),u=R(i/2),c=T(a/6),p=R(a/6),m=.5*a*(1+l)-r,h=i/(u*p)-n,d=l?-.25*a*s/l:0,y=.5*(1+l),b=(1+.5*i*f/u)/(u*p),g=i/u*(c/6)/(p*p),k=d*g-b*y,w=(m*g-h*y)/k,D=(h*d-m*b)/k;if(i-=w,a-=D,C(w)<H&&C(D)<H)break}return[t<0?-a:a,e<0?-i:i]};function ed(){return $(tl).scale(97.2672)}function el(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.119161+r*-.0143059+n*-.0547009)),e*(1.00384+r*(.0802894+n*-.02855+r*199025e-9)+n*(.0998909+n*-.0491032))]}el.invert=function(t,e){var r=mt(t)*E,n=e/2,a=50;do{var i=r*r,o=n*n,s=r*n,l=r*(.975534+o*(-.119161+i*-.0143059+o*-.0547009))-t,f=n*(1.00384+i*(.0802894+o*-.02855+i*199025e-9)+o*(.0998909+o*-.0491032))-e,u=.975534-o*(.119161+3*i*.0143059+o*.0547009),c=-s*(2*.119161+4*.0547009*o+2*.0143059*i),p=s*(2*.0802894+4*199025e-9*i+2*-.02855*o),m=1.00384+i*(.0802894+199025e-9*i)+o*(3*(.0998909-.02855*i)-5*.0491032*o),h=c*p-m*u,d=(f*c-l*m)/h,y=(l*p-f*u)/h;r-=d,n-=y}while((C(d)>H||C(y)>H)&&--a>0);return a&&[r,n]};function rd(){return $(el).scale(139.98)}function rl(t,e){return[T(t)/R(e),ct(e)*R(t)]}rl.invert=function(t,e){var r=t*t,n=e*e,a=n+1,i=r+a,o=t?be*A((i-A(i*i-4*r))/r):1/A(a);return[tt(t*o),mt(e)*Ot(o)]};function nd(){return $(rl).scale(144.049).clipAngle(90-.001)}function Xf(t){var e=R(t),r=ct(ie+t/2);function n(a,i){var o=i-t,s=C(o)<H?a*e:C(s=ie+i/2)<H||C(C(s)-Q)<H?0:a*o/Bt(ct(s)/r);return[s,o]}return n.invert=function(a,i){var o,s=i+t;return[C(i)<H?a/e:C(o=ie+s/2)<H||C(C(o)-Q)<H?0:a*Bt(ct(o)/r)/i,s]},n}function od(){return lr(Xf).parallel(40).scale(158.837)}function nl(t,e){return[t,1.25*Bt(ct(ie+.4*e))]}nl.invert=function(t,e){return[t,2.5*_t(Fe(.8*e))-.625*E]};function ad(){return $(nl).scale(108.318)}function Zf(t){var e=t.length-1;function r(n,a){for(var i=R(a),o=2/(1+i*R(n)),s=o*i*T(n),l=o*T(a),f=e,u=t[f],c=u[0],p=u[1],m;--f>=0;)u=t[f],c=u[0]+s*(m=c)-l*p,p=u[1]+s*p+l*m;return c=s*(m=c)-l*p,p=s*p+l*m,[c,p]}return r.invert=function(n,a){var i=20,o=n,s=a;do{for(var l=e,f=t[l],u=f[0],c=f[1],p=0,m=0,h;--l>=0;)f=t[l],p=u+o*(h=p)-s*m,m=c+o*m+s*h,u=f[0]+o*(h=u)-s*c,c=f[1]+o*c+s*h;p=u+o*(h=p)-s*m,m=c+o*m+s*h,u=o*(h=u)-s*c-n,c=o*c+s*h-a;var d=p*p+m*m,y,b;o-=y=(u*p+c*m)/d,s-=b=(c*p-u*m)/d}while(C(y)+C(b)>H*H&&--i>0);if(i){var g=A(o*o+s*s),k=2*_t(g*.5),w=T(k);return[vt(o*w,g*R(k)),g?tt(s*w/g):0]}},r}var Wx=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Vx=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Bx=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Xx=[[.9245,0],[0,0],[.01943,0]],Zx=[[.721316,0],[0,0],[-.00881625,-.00617325]];function id(){return gn(Wx,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function sd(){return gn(Vx,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ld(){return gn(Bx,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ud(){return gn(Xx,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function fd(){return gn(Zx,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function gn(t,e){var r=$(Zf(t)).rotate(e).clipAngle(90),n=or(e),a=r.center;return delete r.rotate,r.center=function(i){return arguments.length?a(n(i)):n.invert(a())},r}var ol=A(6),al=A(7);function il(t,e){var r=tt(7*T(e)/(3*ol));return[ol*t*(2*R(2*r/3)-1)/al,9*T(r/3)/al]}il.invert=function(t,e){var r=3*tt(e*al/9);return[t*al/(ol*(2*R(2*r/3)-1)),tt(T(r)*3*ol/7)]};function cd(){return $(il).scale(164.859)}function sl(t,e){for(var r=(1+be)*T(e),n=e,a=0,i;a<25&&(n-=i=(T(n/2)+T(n)-r)/(.5*R(n/2)+R(n)),!(C(i)<H));a++);return[t*(1+2*R(n)/R(n/2))/(3*qt),2*A(3)*T(n/2)/A(2+qt)]}sl.invert=function(t,e){var r=e*A(2+qt)/(2*A(3)),n=2*tt(r);return[3*qt*t/(1+2*R(n)/R(n/2)),tt((r+T(n))/(1+be))]};function pd(){return $(sl).scale(188.209)}function ll(t,e){for(var r=A(6/(4+E)),n=(1+E/4)*T(e),a=e/2,i=0,o;i<25&&(a-=o=(a/2+T(a)-n)/(.5+R(a)),!(C(o)<H));i++);return[r*(.5+R(a))*t/1.5,r*a]}ll.invert=function(t,e){var r=A(6/(4+E)),n=e/r;return C(C(n)-Q)<H&&(n=n<0?-Q:Q),[1.5*t/(r*(.5+R(n))),tt((n/2+T(n))/(1+E/4))]};function md(){return $(ll).scale(166.518)}function ul(t,e){var r=e*e,n=r*r,a=r*n;return[t*(.84719-.13063*r+a*a*(-.04515+.05494*r-.02326*n+.00331*a)),e*(1.01183+n*n*(-.02625+.01926*r-.00396*n))]}ul.invert=function(t,e){var r=e,n=25,a,i,o,s;do i=r*r,o=i*i,r-=a=(r*(1.01183+o*o*(-.02625+.01926*i-.00396*o))-e)/(1.01183+o*o*(9*-.02625+11*.01926*i+13*-.00396*o));while(C(a)>Oe&&--n>0);return i=r*r,o=i*i,s=i*o,[t/(.84719-.13063*i+s*s*(-.04515+.05494*i-.02326*o+.00331*s)),r]};function hd(){return $(ul).scale(175.295)}function fl(t,e){return[t*(1+R(e))/2,2*(e-ct(e/2))]}fl.invert=function(t,e){for(var r=e/2,n=0,a=1/0;n<10&&C(a)>H;++n){var i=R(e/2);e-=a=(e-ct(e/2)-r)/(1-.5/(i*i))}return[2*t/(1+R(e)),e]};function dd(){return $(fl).scale(152.63)}var Qx=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gd(){return Pe(Zn(1/0),Qx).rotate([20,0]).scale(152.63)}function cl(t,e){var r=T(e),n=R(e),a=mt(t);if(t===0||C(e)===Q)return[0,e];if(e===0)return[t,0];if(C(t)===Q)return[t*n,Q*r];var i=E/(2*t)-2*t/E,o=2*e/E,s=(1-o*o)/(r-o),l=i*i,f=s*s,u=1+l/f,c=1+f/l,p=(i*r/s-i/2)/u,m=(f*r/l+s/2)/c,h=p*p+n*n/u,d=m*m-(f*r*r/l+s*r-1)/c;return[Q*(p+A(h)*a),Q*(m+A(d<0?0:d)*mt(-e*i)*a)]}cl.invert=function(t,e){t/=Q,e/=Q;var r=t*t,n=e*e,a=r+n,i=E*E;return[t?(a-1+A((1-a)*(1-a)+4*r))/(2*t)*Q:0,Qn(function(o){return a*(E*T(o)-2*o)*E+4*o*o*(e-T(o))+2*E*o-i*e},0)]};function vd(){return $(cl).scale(127.267)}var Qf=1.0148,Kf=.23185,Jf=-.14499,tc=.02406,Kx=Qf,Jx=5*Kf,t5=7*Jf,e5=9*tc,pl=1.790857183;function ml(t,e){var r=e*e;return[t,e*(Qf+r*r*(Kf+r*(Jf+tc*r)))]}ml.invert=function(t,e){e>pl?e=pl:e<-pl&&(e=-pl);var r=e,n;do{var a=r*r;r-=n=(r*(Qf+a*a*(Kf+a*(Jf+tc*a)))-e)/(Kx+a*a*(Jx+a*(t5+e5*a)))}while(C(n)>H);return[t,r]};function yd(){return $(ml).scale(139.319)}function hl(t,e){if(C(e)<H)return[t,0];var r=ct(e),n=t*T(e);return[T(n)/r,e+(1-R(n))/r]}hl.invert=function(t,e){if(C(e)<H)return[t,0];var r=t*t+e*e,n=e*.5,a=10,i;do{var o=ct(n),s=1/R(n),l=r-2*e*n+n*n;n-=i=(o*l+2*(n-e))/(2+l*s*s+2*(n-e)*o)}while(C(i)>H&&--a>0);return o=ct(n),[(C(e)<C(n+1/o)?tt(t*o):mt(e)*mt(t)*(Ot(C(t*o))+Q))/T(n),n]};function xd(){return $(hl).scale(103.74)}function bd(t,e){var r=wd(t[1],t[0]),n=wd(e[1],e[0]),a=r5(r,n),i=Md(r)/Md(n);return Ya([1,0,t[0][0],0,1,t[0][1]],Ya([i,0,0,0,i,0],Ya([R(a),T(a),0,-T(a),R(a),0],[1,0,-e[0][0],0,1,-e[0][1]])))}function Sd(t){var e=1/(t[0]*t[4]-t[1]*t[3]);return[e*t[4],-e*t[1],e*(t[1]*t[5]-t[2]*t[4]),-e*t[3],e*t[0],e*(t[2]*t[3]-t[0]*t[5])]}function Ya(t,e){return[t[0]*e[0]+t[1]*e[3],t[0]*e[1]+t[1]*e[4],t[0]*e[2]+t[1]*e[5]+t[2],t[3]*e[0]+t[4]*e[3],t[3]*e[1]+t[4]*e[4],t[3]*e[2]+t[4]*e[5]+t[5]]}function wd(t,e){return[t[0]-e[0],t[1]-e[1]]}function Md(t){return A(t[0]*t[0]+t[1]*t[1])}function r5(t,e){return vt(t[0]*e[1]-t[1]*e[0],t[0]*e[0]+t[1]*e[1])}function yn(t,e){r(t,{transform:null});function r(l,f){if(l.edges=o5(l.face),f.face){var u=l.shared=n5(l.face,f.face),c=bd(u.map(f.project),u.map(l.project));l.transform=f.transform?Ya(f.transform,c):c;for(var p=f.edges,m=0,h=p.length;m<h;++m)vn(u[0],p[m][1])&&vn(u[1],p[m][0])&&(p[m]=l),vn(u[0],p[m][0])&&vn(u[1],p[m][1])&&(p[m]=l);for(p=l.edges,m=0,h=p.length;m<h;++m)vn(u[0],p[m][0])&&vn(u[1],p[m][1])&&(p[m]=f),vn(u[0],p[m][1])&&vn(u[1],p[m][0])&&(p[m]=f)}else l.transform=f.transform;return l.children&&l.children.forEach(function(d){r(d,l)}),l}function n(l,f){var u=e(l,f),c=u.project([l*kt,f*kt]),p;return(p=u.transform)?[p[0]*c[0]+p[1]*c[1]+p[2],-(p[3]*c[0]+p[4]*c[1]+p[5])]:(c[1]=-c[1],c)}kd(t)&&(n.invert=function(l,f){var u=a(t,[l,-f]);return u&&(u[0]*=yt,u[1]*=yt,u)});function a(l,f){var u=l.project.invert,c=l.transform,p=f;if(c&&(c=Sd(c),p=[c[0]*p[0]+c[1]*p[1]+c[2],c[3]*p[0]+c[4]*p[1]+c[5]]),u&&l===i(m=u(p)))return m;for(var m,h=l.children,d=0,y=h&&h.length;d<y;++d)if(m=a(h[d],f))return m}function i(l){return e(l[0]*yt,l[1]*yt)}var o=$(n),s=o.stream;return o.stream=function(l){var f=o.rotate(),u=s(l),c=(o.rotate([0,0]),s(l));return o.rotate(f),u.sphere=function(){c.polygonStart(),c.lineStart(),Pd(c,t),c.lineEnd(),c.polygonEnd()},u},o.angle(-30)}function Pd(t,e,r){var n,a=e.edges,i=a.length,o,s={type:"MultiPoint",coordinates:e.face},l=e.face.filter(function(d){return C(d[1])!==90}),f=gi({type:"MultiPoint",coordinates:l}),u=!1,c=-1,p=f[1][0]-f[0][0],m=p===180||p===360?[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]:nr(s);if(r)for(;++c<i&&a[c]!==r;);++c;for(var h=0;h<i;++h)o=a[(h+c)%i],Array.isArray(o)?(u||(t.point((n=br(o[0],m)(H))[0],n[1]),u=!0),t.point((n=br(o[1],m)(H))[0],n[1])):(u=!1,o!==r&&Pd(t,o,e))}function vn(t,e){return t&&e&&t[0]===e[0]&&t[1]===e[1]}function n5(t,e){for(var r,n,a=t.length,i=null,o=0;o<a;++o){r=t[o];for(var s=e.length;--s>=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(i)return[i,r];i=r}}}function o5(t){for(var e=t.length,r=[],n=t[e-1],a=0;a<e;++a)r.push([n,n=t[a]]);return r}function kd(t){return t.project.invert||t.children&&t.children.some(kd)}var a5=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],to=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(t){return t.map(function(e){return a5[e]})});function Rd(t){t=t||function(r){var n=nr({type:"MultiPoint",coordinates:r});return xo().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var e=to.map(function(r){return{face:r,project:t(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(r,n){var a=e[r];a&&(a.children||(a.children=[])).push(e[n])}),yn(e[0],function(r,n){return e[r<-E/2?n<0?6:4:r<0?n<0?2:0:r<E/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Td=2/A(3);function Ed(t,e){var r=Ie(t,e);return[r[0]*Td,r[1]]}Ed.invert=function(t,e){return Ie.invert(t/Td,e)};function zd(t){t=t||function(r){var n=nr({type:"MultiPoint",coordinates:r});return $(Ed).translate([0,0]).scale(1).rotate(n[1]>0?[-n[0],0]:[180-n[0],180])};var e=to.map(function(r){return{face:r,project:t(r)}});return[-1,0,0,1,0,1,4,5].forEach(function(r,n){var a=e[r];a&&(a.children||(a.children=[])).push(e[n])}),yn(e[0],function(r,n){return e[r<-E/2?n<0?6:4:r<0?n<0?2:0:r<E/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Ad(t){t=t||function(o){var s=o.length===6?nr({type:"MultiPoint",coordinates:o}):o[0];return xo().scale(1).translate([0,0]).rotate([-s[0],-s[1]])};var e=to.map(function(o){for(var s=o.map(rc),l=s.length,f=s[l-1],u,c=[],p=0;p<l;++p)u=s[p],c.push(_d([f[0]*.9486832980505138+u[0]*.31622776601683794,f[1]*.9486832980505138+u[1]*.31622776601683794,f[2]*.9486832980505138+u[2]*.31622776601683794]),_d([u[0]*.9486832980505138+f[0]*.31622776601683794,u[1]*.9486832980505138+f[1]*.31622776601683794,u[2]*.9486832980505138+f[2]*.31622776601683794])),f=u;return c}),r=[],n=[-1,0,0,1,0,1,4,5];e.forEach(function(o,s){for(var l=to[s],f=l.length,u=r[s]=[],c=0;c<f;++c)e.push([l[c],o[(c*2+2)%(2*f)],o[(c*2+1)%(2*f)]]),n.push(s),u.push(i5(rc(o[(c*2+2)%(2*f)]),rc(o[(c*2+1)%(2*f)])))});var a=e.map(function(o){return{project:t(o),face:o}});n.forEach(function(o,s){var l=a[o];l&&(l.children||(l.children=[])).push(a[s])});function i(o,s){var l=R(s),f=[l*R(o),l*T(o),T(s)],u=o<-E/2?s<0?6:4:o<0?s<0?2:0:o<E/2?s<0?3:1:s<0?7:5,c=r[u];return a[ec(c[0],f)<0?8+3*u:ec(c[1],f)<0?8+3*u+1:ec(c[2],f)<0?8+3*u+2:u]}return yn(a[0],i).angle(-30).scale(110.625).center([0,45])}function ec(t,e){for(var r=0,n=t.length,a=0;r<n;++r)a+=t[r]*e[r];return a}function i5(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function _d(t){return[vt(t[1],t[0])*kt,tt(Le(-1,oe(1,t[2])))*kt]}function rc(t){var e=t[0]*yt,r=t[1]*yt,n=R(r);return[n*R(e),n*T(e),T(r)]}var Wa=()=>{};function qd(t){if((r=t.length)<4)return!1;for(var e=0,r,n=t[r-1][1]*t[0][0]-t[r-1][0]*t[0][1];++e<r;)n+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return n<=0}function Cd(t,e){for(var r=e[0],n=e[1],a=!1,i=0,o=t.length,s=o-1;i<o;s=i++){var l=t[i],f=l[0],u=l[1],c=t[s],p=c[0],m=c[1];u>n^m>n&&r<(p-f)*(n-u)/(m-u)+f&&(a=!a)}return a}function Dd(t,e){var r=e.stream,n;if(!r)throw new Error("invalid projection");switch(t&&t.type){case"Feature":n=jd;break;case"FeatureCollection":n=s5;break;default:n=oc;break}return n(t,r)}function s5(t,e){return{type:"FeatureCollection",features:t.features.map(function(r){return jd(r,e)})}}function jd(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:oc(t.geometry,e)}}function l5(t,e){return{type:"GeometryCollection",geometries:t.geometries.map(function(r){return oc(r,e)})}}function oc(t,e){if(!t)return null;if(t.type==="GeometryCollection")return l5(t,e);var r;switch(t.type){case"Point":r=Id;break;case"MultiPoint":r=Id;break;case"LineString":r=Nd;break;case"MultiLineString":r=Nd;break;case"Polygon":r=nc;break;case"MultiPolygon":r=nc;break;case"Sphere":r=nc;break;default:return null}return Qt(t,e(r)),r.result()}var ke=[],_r=[],Id={point:function(t,e){ke.push([t,e])},result:function(){var t=ke.length?ke.length<2?{type:"Point",coordinates:ke[0]}:{type:"MultiPoint",coordinates:ke}:null;return ke=[],t}},Nd={lineStart:Wa,point:function(t,e){ke.push([t,e])},lineEnd:function(){ke.length&&(_r.push(ke),ke=[])},result:function(){var t=_r.length?_r.length<2?{type:"LineString",coordinates:_r[0]}:{type:"MultiLineString",coordinates:_r}:null;return _r=[],t}},nc={polygonStart:Wa,lineStart:Wa,point:function(t,e){ke.push([t,e])},lineEnd:function(){var t=ke.length;if(t){do ke.push(ke[0].slice());while(++t<4);_r.push(ke),ke=[]}},polygonEnd:Wa,result:function(){if(!_r.length)return null;var t=[],e=[];return _r.forEach(function(r){qd(r)?t.push([r]):e.push(r)}),e.forEach(function(r){var n=r[0];t.some(function(a){if(Cd(a[0],n))return a.push(r),!0})||t.push([r])}),_r=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function Yo(t){var e=t(Q,0)[0]-t(-Q,0)[0];function r(n,a){var i=C(n)<Q,o=t(i?n:n>0?n-E:n+E,a),s=(o[0]-o[1])*be,l=(o[0]+o[1])*be;if(i)return[s,l];var f=e*be,u=s>0^l>0?-1:1;return[u*s-mt(l)*f,u*l-mt(s)*f]}return t.invert&&(r.invert=function(n,a){var i=(n+a)*be,o=(a-n)*be,s=C(i)<.5*e&&C(o)<.5*e;if(!s){var l=e*be,f=i>0^o>0?-1:1,u=-f*n+(o>0?1:-1)*l,c=-f*a+(i>0?1:-1)*l;i=(-u-c)*be,o=(u-c)*be}var p=t.invert(i,o);return s||(p[0]+=i>0?E:-E),p}),$(r).rotate([-90,-90,45]).clipAngle(180-.001)}function Fd(){return Yo(Oo).scale(176.423)}function Ld(){return Yo(Uo).scale(111.48)}function Od(t,e){if(!(0<=(e=+e)&&e<=20))throw new Error("invalid digits");function r(f){var u=f.length,c=2,p=new Array(u);for(p[0]=+f[0].toFixed(e),p[1]=+f[1].toFixed(e);c<u;)p[c]=f[c],++c;return p}function n(f){return f.map(r)}function a(f){for(var u=r(f[0]),c=[u],p=1;p<f.length;p++){var m=r(f[p]);(m.length>2||m[0]!=u[0]||m[1]!=u[1])&&(c.push(m),u=m)}return c.length===1&&f.length>1&&c.push(r(f[f.length-1])),c}function i(f){return f.map(a)}function o(f){if(f==null)return f;var u;switch(f.type){case"GeometryCollection":u={type:"GeometryCollection",geometries:f.geometries.map(o)};break;case"Point":u={type:"Point",coordinates:r(f.coordinates)};break;case"MultiPoint":u={type:f.type,coordinates:n(f.coordinates)};break;case"LineString":u={type:f.type,coordinates:a(f.coordinates)};break;case"MultiLineString":case"Polygon":u={type:f.type,coordinates:i(f.coordinates)};break;case"MultiPolygon":u={type:"MultiPolygon",coordinates:f.coordinates.map(i)};break;default:return f}return f.bbox!=null&&(u.bbox=f.bbox),u}function s(f){var u={type:"Feature",properties:f.properties,geometry:o(f.geometry)};return f.id!=null&&(u.id=f.id),f.bbox!=null&&(u.bbox=f.bbox),u}if(t!=null)switch(t.type){case"Feature":return s(t);case"FeatureCollection":{var l={type:"FeatureCollection",features:t.features.map(s)};return t.bbox!=null&&(l.bbox=t.bbox),l}default:return o(t)}return t}function ac(t){var e=T(t);function r(n,a){var i=e?ct(n*e/2)/e:n/2;if(!a)return[2*i,-t];var o=2*_t(i*T(a)),s=1/ct(a);return[T(o)*s,a+(1-R(o))*s-t]}return r.invert=function(n,a){if(C(a+=t)<H)return[e?2*_t(e*n/2)/e:n,0];var i=n*n+a*a,o=0,s=10,l;do{var f=ct(o),u=1/R(o),c=i-2*a*o+o*o;o-=l=(f*c+2*(o-a))/(2+c*u*u+2*(o-a)*f)}while(C(l)>H&&--s>0);var p=n*(f=ct(o)),m=ct(C(a)<C(o+1/f)?tt(p)*.5:Ot(p)*.5+E/4)/T(o);return[e?2*_t(e*m)/e:2*m,o]},r}function $d(){return lr(ac).scale(131.215)}var Qe=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];Qe.forEach(function(t){t[1]*=1.593415793900743});function dl(t,e){var r=oe(18,C(e)*36/E),n=Br(r),a=r-n,i=(c=Qe[n])[0],o=c[1],s=(c=Qe[++n])[0],l=c[1],f=(c=Qe[oe(19,++n)])[0],u=c[1],c;return[t*(s+a*(f-i)/2+a*a*(f-2*s+i)/2),mt(e)*(l+a*(u-o)/2+a*a*(u-2*l+o)/2)]}dl.invert=function(t,e){var r=e*90,n=oe(18,C(r/5)),a=Le(0,Br(n));do{var i=Qe[a][1],o=Qe[a+1][1],s=Qe[oe(19,a+2)][1],l=s-i,f=s-2*o+i,u=2*(C(e)-o)/l,c=f/l,p=u*(1-c*u*(1-2*c*u));if(p>=0||a===1){r=(e>=0?5:-5)*(p+n);var m=50,h;do n=oe(18,C(r)/5),a=Br(n),p=n-a,i=Qe[a][1],o=Qe[a+1][1],s=Qe[oe(19,a+2)][1],r-=(h=mt(e)*(o+p*(s-i)/2+p*p*(s-2*o+i)/2)-e)*kt;while(C(h)>Oe&&--m>0);break}}while(--a>=0);var d=Qe[a][0],y=Qe[a+1][0],b=Qe[oe(19,a+2)][0];return[t/(y+p*(b-d)/2+p*p*(b-2*y+d)/2),r*yt]};function Ud(){return $(dl).scale(152.63)}function u5(t){function e(r,n){var a=R(n),i=(t-1)/(t-a*R(r));return[i*a*T(r),i*T(n)]}return e.invert=function(r,n){var a=r*r+n*n,i=A(a),o=(t-A(1-a*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[vt(r*o,i*A(1-o*o)),i?tt(n*o/i):0]},e}function ic(t,e){var r=u5(t);if(!e)return r;var n=R(e),a=T(e);function i(o,s){var l=r(o,s),f=l[1],u=f*a/(t-1)+n;return[l[0]*n/u,f/u]}return i.invert=function(o,s){var l=(t-1)/(t-1-s*a);return r.invert(l*o,l*s*n)},i}function Hd(){var t=2,e=0,r=Ct(ic),n=r(t,e);return n.distance=function(a){return arguments.length?r(t=+a,e):t},n.tilt=function(a){return arguments.length?r(t,e=a*yt):e*kt},n.scale(432.147).clipAngle(Ot(1/t)*kt-1e-6)}var gl=1e-4,Gd=1e4,cc=-180,sc=cc+gl,Zd=180,lc=Zd-gl,pc=-90,uc=pc+gl,mc=90,fc=mc-gl;function f5(t){return t.length>0}function c5(t){return Math.floor(t*Gd)/Gd}function Yd(t){return t===pc||t===mc?[0,t]:[cc,c5(t)]}function hc(t){var e=t[0],r=t[1],n=!1;return e<=sc?(e=cc,n=!0):e>=lc&&(e=Zd,n=!0),r<=uc?(r=pc,n=!0):r>=fc&&(r=mc,n=!0),n?[e,r]:t}function Wd(t){return t.map(hc)}function Vd(t,e,r){for(var n=0,a=t.length;n<a;++n){var i=t[n].slice();r.push({index:-1,polygon:e,ring:i});for(var o=0,s=i.length;o<s;++o){var l=i[o],f=l[0],u=l[1];if(f<=sc||f>=lc||u<=uc||u>=fc){i[o]=hc(l);for(var c=o+1;c<s;++c){var p=i[c],m=p[0],h=p[1];if(m>sc&&m<lc&&h>uc&&h<fc)break}if(c===o+1)continue;if(o){var d={index:-1,polygon:e,ring:i.slice(0,o+1)};d.ring[d.ring.length-1]=Yd(u),r[r.length-1]=d}else r.pop();if(c>=s)break;r.push({index:-1,polygon:e,ring:i=i.slice(c-1)}),i[0]=Yd(i[0][1]),o=-1,s=i.length}}}}function Bd(t){var e,r=t.length,n={},a={},i,o,s,l,f;for(e=0;e<r;++e){if(i=t[e],o=i.ring[0],l=i.ring[i.ring.length-1],o[0]===l[0]&&o[1]===l[1]){i.polygon.push(i.ring),t[e]=null;continue}i.index=e,n[o]=a[l]=i}for(e=0;e<r;++e)if(i=t[e],i){if(o=i.ring[0],l=i.ring[i.ring.length-1],s=a[o],f=n[l],delete n[o],delete a[l],o[0]===l[0]&&o[1]===l[1]){i.polygon.push(i.ring);continue}s?(delete a[o],delete n[s.ring[0]],s.ring.pop(),t[s.index]=null,i={index:-1,polygon:s.polygon,ring:s.ring.concat(i.ring)},s===f?i.polygon.push(i.ring):(i.index=r++,t.push(n[i.ring[0]]=a[i.ring[i.ring.length-1]]=i))):f?(delete n[l],delete a[f.ring[f.ring.length-1]],i.ring.pop(),i={index:r++,polygon:f.polygon,ring:i.ring.concat(f.ring)},t[f.index]=null,t.push(n[i.ring[0]]=a[i.ring[i.ring.length-1]]=i)):(i.ring.push(i.ring[0]),i.polygon.push(i.ring))}}function Xd(t){var e={type:"Feature",geometry:dc(t.geometry)};return t.id!=null&&(e.id=t.id),t.bbox!=null&&(e.bbox=t.bbox),t.properties!=null&&(e.properties=t.properties),e}function dc(t){if(t==null)return t;var e,r,n,a;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(dc)};break;case"Point":e={type:"Point",coordinates:hc(t.coordinates)};break;case"MultiPoint":case"LineString":e={type:t.type,coordinates:Wd(t.coordinates)};break;case"MultiLineString":e={type:"MultiLineString",coordinates:t.coordinates.map(Wd)};break;case"Polygon":{var i=[];Vd(t.coordinates,i,r=[]),Bd(r),e={type:"Polygon",coordinates:i};break}case"MultiPolygon":{r=[],n=-1,a=t.coordinates.length;for(var o=new Array(a);++n<a;)Vd(t.coordinates[n],o[n]=[],r);Bd(r),e={type:"MultiPolygon",coordinates:o.filter(f5)};break}default:return t}return t.bbox!=null&&(e.bbox=t.bbox),e}function Qd(t){if(t==null)return t;switch(t.type){case"Feature":return Xd(t);case"FeatureCollection":{var e={type:"FeatureCollection",features:t.features.map(Xd)};return t.bbox!=null&&(e.bbox=t.bbox),e}default:return dc(t)}}function vl(t,e){var r=ct(e/2),n=T(ie*r);return[t*(.74482-.34588*n*n),1.70711*r]}vl.invert=function(t,e){var r=e/1.70711,n=T(ie*r);return[t/(.74482-.34588*n*n),2*_t(r)]};function Kd(){return $(vl).scale(146.153)}function yl(t,e,r){var n=br(e,r),a=n(.5),i=or([-a[0],-a[1]])(e),o=n.distance/2,s=-tt(T(i[1]*yt)/T(o)),l=[-a[0],-a[1],-(i[0]>0?E-s:s)*kt],f=$(t(o)).rotate(l),u=or(l),c=f.center;return delete f.rotate,f.center=function(p){return arguments.length?c(u(p)):u.invert(c())},f.clipAngle(90)}function gc(t){var e=R(t);function r(n,a){var i=Cn(n,a);return i[0]*=e,i}return r.invert=function(n,a){return Cn.invert(n/e,a)},r}function Jd(){return xl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function xl(t,e){return yl(gc,t,e)}function vc(t){if(!(t*=2))return ar;var e=-t/2,r=-e,n=t*t,a=ct(r),i=.5/T(r);function o(s,l){var f=Ot(R(l)*R(s-e)),u=Ot(R(l)*R(s-r)),c=l<0?-1:1;return f*=f,u*=u,[(f-u)/(2*t),c*A(4*n*u-(n-f+u)*(n-f+u))/(2*t)]}return o.invert=function(s,l){var f=l*l,u=R(A(f+(p=s+e)*p)),c=R(A(f+(p=s+r)*p)),p,m;return[vt(m=u-c,p=(u+c)*a),(l<0?-1:1)*Ot(A(p*p+m*m)*i)]},o}function tg(){return wl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function wl(t,e){return yl(vc,t,e)}function Ml(t,e){if(C(e)<H)return[t,0];var r=C(e/Q),n=tt(r);if(C(t)<H||C(C(e)-Q)<H)return[0,mt(e)*E*ct(n/2)];var a=R(n),i=C(E/t-t/E)/2,o=i*i,s=a/(r+a-1),l=s*(2/r-1),f=l*l,u=f+o,c=s-f,p=o+s;return[mt(t)*E*(i*c+A(o*c*c-u*(s*s-f)))/u,mt(e)*E*(l*p-i*A((o+1)*u-p*p))/u]}Ml.invert=function(t,e){if(C(e)<H)return[t,0];if(C(t)<H)return[0,Q*T(2*_t(e/E))];var r=(t/=E)*t,n=(e/=E)*e,a=r+n,i=a*a,o=-C(e)*(1+a),s=o-2*n+r,l=-2*o+1+2*n+i,f=n/l+(2*s*s*s/(l*l*l)-9*o*s/(l*l))/27,u=(o-s*s/(3*l))/l,c=2*A(-u/3),p=Ot(3*f/(u*c))/3;return[E*(a-1+A(1+2*(r-n)+i))/(2*t),mt(e)*E*(-c*R(p+E/3)-s/(3*l))]};function eg(){return $(Ml).scale(79.4183)}function bl(t,e){if(C(e)<H)return[t,0];var r=C(e/Q),n=tt(r);if(C(t)<H||C(C(e)-Q)<H)return[0,mt(e)*E*ct(n/2)];var a=R(n),i=C(E/t-t/E)/2,o=i*i,s=a*(A(1+o)-i*a)/(1+o*r*r);return[mt(t)*E*s,mt(e)*E*A(1-s*(2*i+s))]}bl.invert=function(t,e){if(!t)return[0,Q*T(2*_t(e/E))];var r=C(t/E),n=(1-r*r-(e/=E)*e)/(2*r),a=n*n,i=A(a+1);return[mt(t)*E*(i-n),mt(e)*Q*T(2*vt(A((1-2*n*r)*(n+i)-r),A(i+n+r)))]};function rg(){return $(bl).scale(79.4183)}function Sl(t,e){if(C(e)<H)return[t,0];var r=e/Q,n=tt(r);if(C(t)<H||C(C(e)-Q)<H)return[0,E*ct(n/2)];var a=(E/t-t/E)/2,i=r/(1+R(n));return[E*(mt(t)*A(a*a+1-i*i)-a),E*i]}Sl.invert=function(t,e){if(!e)return[t,0];var r=e/E,n=(E*E*(1-r*r)-t*t)/(2*E*t);return[t?E*(mt(t)*A(n*n+1)-n):0,Q*T(2*_t(r))]};function ng(){return $(Sl).scale(79.4183)}function Pl(t,e){if(!e)return[t,0];var r=C(e);if(!t||r===Q)return[0,e];var n=r/Q,a=n*n,i=(8*n-a*(a+2)-5)/(2*a*(n-1)),o=i*i,s=n*i,l=a+o+2*s,f=n+3*i,u=t/Q,c=u+1/u,p=mt(C(t)-Q)*A(c*c-4),m=p*p,h=l*(a+o*m-1)+(1-a)*(a*(f*f+4*o)+12*s*o+4*o*o),d=(p*(l+o-1)+2*A(h))/(4*l+m);return[mt(t)*Q*d,mt(e)*Q*A(1+p*C(d)-d*d)]}Pl.invert=function(t,e){var r;if(!t||!e)return[t,e];var n=mt(e);e=C(e)/E;var a=mt(t)*t/Q,i=(a*a-1+4*e*e)/C(a),o=i*i,s=e*(2-(e>.5?oe(e,C(t)):0)),l=t*t+e*e,f=50;do{var u=s*s,c=(8*s-u*(u+2)-5)/(2*u*(s-1)),p=(3*s-u*s-10)/(2*u*s),m=c*c,h=s*c,d=s+c,y=d*d,b=s+3*c,g=y*(u+m*o-1)+(1-u)*(u*(b*b+4*m)+m*(12*h+4*m)),k=-2*d*(4*h*m+(1-4*u+3*u*u)*(1+p)+m*(-6+14*u-o+(-8+8*u-2*o)*p)+h*(-8+12*u+(-10+10*u-o)*p)),w=A(g),D=i*(y+m-1)+2*w-a*(4*y+o),F=i*(2*c*p+2*d*(1+p))+k/w-8*d*(i*(-1+m+y)+2*w)*(1+p)/(o+4*y);s-=r=D/F}while(r*l*l>H&&--f>0);return[mt(t)*(A(i*i+4)+i)*E/4,n*Q*s]};function og(){return $(Pl).scale(127.16)}function p5(t,e,r,n,a){function i(o,s){var l=r*T(n*s),f=A(1-l*l),u=A(2/(1+f*R(o*=a)));return[t*f*u*T(o),e*l*u]}return i.invert=function(o,s){var l=o/t,f=s/e,u=A(l*l+f*f),c=2*tt(u/2);return[vt(o*ct(c),t*u)/a,u&&tt(s*T(c)/(e*r*u))/n]},i}function yc(t,e,r,n){var a=E/3;t=Le(t,H),e=Le(e,H),t=oe(t,Q),e=oe(e,E-H),r=Le(r,0),r=oe(r,100-H),n=Le(n,H);var i=r/100+1,o=n/100,s=Ot(i*R(a))/a,l=T(t)/T(s*Q),f=e/E,u=A(o*T(t/2)/T(e/2)),c=u/A(f*l*s),p=1/(u*A(f*l*s));return p5(c,p,l,s,f)}function kl(){var t=65*yt,e=60*yt,r=20,n=200,a=Ct(yc),i=a(t,e,r,n);return i.poleline=function(o){return arguments.length?a(t=+o*yt,e,r,n):t*kt},i.parallels=function(o){return arguments.length?a(t,e=+o*yt,r,n):e*kt},i.inflation=function(o){return arguments.length?a(t,e,r=+o,n):r},i.ratio=function(o){return arguments.length?a(t,e,r,n=+o):n},i.scale(163.775)}function ag(){return kl().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var sg=4*E+3*A(3),ig=2*A(2*E*A(3)/sg),xc=Ha(ig*A(3)/E,ig,sg/6);function lg(){return $(xc).scale(176.84)}function Rl(t,e){return[t*A(1-3*e*e/(E*E)),e]}Rl.invert=function(t,e){return[t/A(1-3*e*e/(E*E)),e]};function ug(){return $(Rl).scale(152.63)}function Tl(t,e){var r=R(e),n=R(t)*r,a=1-n,i=R(t=vt(T(t)*r,-T(e))),o=T(t);return r=A(1-n*n),[o*r-i*a,-i*r-o*a]}Tl.invert=function(t,e){var r=(t*t+e*e)/-2,n=A(-r*(2+r)),a=e*r+t*n,i=t*r-e*n,o=A(i*i+a*a);return[vt(n*a,o*(1+r)),o?-tt(n*i/o):0]};function fg(){return $(Tl).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function El(t,e){var r=Do(t,e);return[(r[0]+t/Q)/2,(r[1]+e)/2]}El.invert=function(t,e){var r=t,n=e,a=25;do{var i=R(n),o=T(n),s=T(2*n),l=o*o,f=i*i,u=T(r),c=R(r/2),p=T(r/2),m=p*p,h=1-f*c*c,d=h?Ot(i*c)*A(y=1/h):y=0,y,b=.5*(2*d*i*p+r/Q)-t,g=.5*(d*o+n)-e,k=.5*y*(f*m+d*i*c*l)+.5/Q,w=y*(u*s/4-d*o*p),D=.125*y*(s*p-d*o*f*u),F=.5*y*(l*c+d*m*i)+.5,U=w*D-F*k,K=(g*w-b*F)/U,et=(b*D-g*k)/U;r-=K,n-=et}while((C(K)>H||C(et)>H)&&--a>0);return[r,n]};function cg(){return $(El).scale(158.837)}var Ar={},pe={width:0,projection:"aitoff",projectionRatio:null,transform:"equatorial",center:null,geopos:null,follow:"zenith",orientationfixed:!0,zoomlevel:null,zoomextend:10,adaptable:!0,interactive:!0,disableAnimations:!1,form:!1,location:!1,formFields:{location:!0,general:!0,stars:!0,dsos:!0,constellations:!0,lines:!0,other:!0,download:!1},advanced:!0,daterange:[],settimezone:!0,timezoneid:"",timezoneResolver:null,controls:!0,lang:"",culture:"",container:"celestial-map",datapath:"data/",stars:{show:!0,limit:6,colors:!0,style:{fill:"#ffffff",opacity:1},designation:!0,designationType:"desig",designationStyle:{fill:"#ddddbb",font:"11px 'Palatino Linotype', Georgia, Times, 'Times Roman', serif",align:"left",baseline:"top"},designationLimit:2.5,propername:!1,propernameType:"name",propernameStyle:{fill:"#ddddbb",font:"13px 'Palatino Linotype', Georgia, Times, 'Times Roman', serif",align:"right",baseline:"bottom"},propernameLimit:1.5,size:7,exponent:-.28,data:"stars.6.json"},dsos:{show:!0,limit:6,colors:!0,style:{fill:"#cccccc",stroke:"#cccccc",width:2,opacity:1},names:!0,namesType:"desig",nameStyle:{fill:"#cccccc",font:"11px 'Lucida Sans Unicode', 'DejaVu Sans', Helvetica, Arial, serif",align:"left",baseline:"bottom"},nameLimit:4,size:null,exponent:1.4,data:"dsos.bright.json",symbols:{gg:{shape:"circle",fill:"#ff0000"},g:{shape:"ellipse",fill:"#ff0000"},s:{shape:"ellipse",fill:"#ff0000"},s0:{shape:"ellipse",fill:"#ff0000"},sd:{shape:"ellipse",fill:"#ff0000"},e:{shape:"ellipse",fill:"#ff0000"},i:{shape:"ellipse",fill:"#ff0000"},oc:{shape:"circle",fill:"#ff9900",stroke:"#ff9900",width:2},gc:{shape:"circle",fill:"#ff9900"},en:{shape:"square",fill:"#ff00cc"},bn:{shape:"square",fill:"#ff00cc"},sfr:{shape:"square",fill:"#cc00ff"},rn:{shape:"square",fill:"#0000ff"},pn:{shape:"diamond",fill:"#00cccc"},snr:{shape:"diamond",fill:"#ff00cc"},dn:{shape:"square",fill:"#999999",stroke:"#999999",width:2},pos:{shape:"marker",fill:"#cccccc",stroke:"#cccccc",width:1.5}}},constellations:{show:!0,names:!0,namesType:"desig",nameStyle:{fill:"#cccc99",align:"center",baseline:"middle",opacity:.8,font:["14px 'Lucida Sans Unicode', 'DejaVu Sans', Helvetica, Arial, sans-serif","12px 'Lucida Sans Unicode', 'DejaVu Sans', Helvetica, Arial, sans-serif","11px 'Lucida Sans Unicode', 'DejaVu Sans', Helvetica, Arial, sans-serif"]},lines:!0,lineStyle:{stroke:"#cccccc",width:1.5,opacity:.6},bounds:!1,boundStyle:{stroke:"#ccff00",width:1,opacity:.8,dash:[4,4]}},mw:{show:!0,style:{fill:"#ffffff",opacity:"0.15"}},lines:{graticule:{show:!0,stroke:"#cccccc",width:.6,opacity:.8,lon:{pos:[],fill:"#eee",font:"10px 'Lucida Sans Unicode', Helvetica, Arial, sans-serif"},lat:{pos:[],fill:"#eee",font:"10px 'Lucida Sans Unicode', Helvetica, Arial, sans-serif"}},equatorial:{show:!0,stroke:"#aaaaaa",width:1.3,opacity:.7},ecliptic:{show:!0,stroke:"#66cc66",width:1.3,opacity:.7},galactic:{show:!1,stroke:"#cc6666",width:1.3,opacity:.7},supergalactic:{show:!1,stroke:"#cc66cc",width:1.3,opacity:.7}},background:{fill:"#000000",opacity:1,stroke:"#000000",width:1.5},horizon:{show:!1,stroke:"#cccccc",width:1,fill:"#000000",opacity:.4},daylight:{show:!1},planets:{show:!1,which:["sol","mer","ven","ter","lun","mar","jup","sat","ura","nep","cer","plu"],symbols:{sol:{symbol:"\u2609",letter:"Su",fill:"#ffff00",size:12},mer:{symbol:"\u263F",letter:"Me",fill:"#cccccc"},ven:{symbol:"\u2640",letter:"V",fill:"#eeeecc"},ter:{symbol:"\u2295",letter:"T",fill:"#00ccff"},lun:{symbol:"\u25CF",letter:"L",fill:"#ffffff",size:12},mar:{symbol:"\u2642",letter:"Ma",fill:"#ff6600"},cer:{symbol:"\u26B3",letter:"C",fill:"#cccccc"},ves:{symbol:"\u26B6",letter:"Ma",fill:"#cccccc"},jup:{symbol:"\u2643",letter:"J",fill:"#ffaa33"},sat:{symbol:"\u2644",letter:"Sa",fill:"#ffdd66"},ura:{symbol:"\u2645",letter:"U",fill:"#66ccff"},nep:{symbol:"\u2646",letter:"N",fill:"#6666ff"},plu:{symbol:"\u2647",letter:"P",fill:"#aaaaaa"},eri:{symbol:"\u26AA",letter:"E",fill:"#eeeeee"}},symbolStyle:{fill:"#cccccc",opacity:1,font:"bold 20px 'DejaVu Sans Mono', 'Arial Unicode MS', sans-serif",align:"center",baseline:"middle"},symbolType:"symbol",names:!1,nameStyle:{fill:"#cccccc",font:"14px 'Lucida Sans Unicode', 'DejaVu Sans', sans-serif",align:"right",baseline:"top"},namesType:"en"},set:function(t,e){var r,n,a={},i={};if(e?Object.assign(a,e):Object.entries(Ar).length===0?Object.assign(a,this):Object.assign(a,Ar),!t)return a;for(r in a)if(B(a,r))if(!B(t,r)||t[r]===null)i[r]=a[r];else if(a[r]===null||a[r].constructor!=Object)i[r]=t[r];else{i[r]={};for(n in a[r])B(t[r],n)?i[r][n]=t[r][n]:i[r][n]=a[r][n]}return i.constellations.nameStyle.font=Ue(i.constellations.nameStyle.font),i.constellations.nameStyle.opacity=Ue(i.constellations.nameStyle.opacity),i.constellations.nameStyle.fill=Ue(i.constellations.nameStyle.fill),i.constellations.lineStyle.width=Ue(i.constellations.lineStyle.width),i.constellations.lineStyle.opacity=Ue(i.constellations.lineStyle.opacity),i.constellations.lineStyle.stroke=Ue(i.constellations.lineStyle.stroke),e||Object.assign(Ar,i),i},applyDefaults:function(t,e){var r={};return Object.assign(r,e?this:Ar),r.stars.size=r.stars.size||7,r.stars.exponent=r.stars.exponent||-.28,(!r.center||r.center.length<=0)&&(r.center=[0,0,0]),r.datapath=r.datapath||"",r.datapath=r.datapath.replace(/([^\/]$)/,"$1/"),(!r.transform||r.transform==="")&&(r.transform="equatorial"),(!r.culture||r.culture.search(/^cn$/)===-1)&&(r.culture="iau"),t&&(B(t,"stars")&&(B(t.stars,"names")&&(r.stars.designation=t.stars.names),B(t.stars,"namelimit")&&(r.stars.designationLimit=t.stars.namelimit),B(t.stars,"namestyle")&&Object.assign(r.stars.designationStyle,t.stars.namestyle),B(t.stars,"proper")&&(r.stars.propername=t.stars.proper),B(t.stars,"propernamelimit")&&(r.stars.propernameLimit=t.stars.propernamelimit),B(t.stars,"propernamestyle")&&Object.assign(r.stars.propernameStyle,t.stars.propernamestyle)),B(t,"dsos")&&(B(t.dsos,"desig")&&t.dsos.desig===!0&&(r.dsos.namesType="desig"),B(t.dsos,"namelimit")&&(r.dsos.nameLimit=t.dsos.namelimit),B(t.dsos,"namestyle")&&Object.assign(r.dsos.nameStyle,t.dsos.namestyle)),B(t,"constellations")&&(B(t.constellations,"show")&&t.constellations.show===!0&&(r.constellations.names=!0),B(t.constellations,"desig")&&t.constellations.desig===!0&&(r.constellations.namesType="desig"),r.constellations.namesType==="latin"&&(r.constellations.namesType="la"),r.constellations.namesType==="iau"&&(r.constellations.namesType="name"),B(t.constellations,"namestyle")&&Object.assign(r.constellations.nameStyle,t.constellations.namestyle),B(t.constellations,"linestyle")&&Object.assign(r.constellations.lineStyle,t.constellations.linestyle),B(t.constellations,"boundstyle")&&Object.assign(r.constellations.boundStyle,t.constellations.boundstyle)),B(t,"planets")&&B(t.planets,"style")&&Object.assign(r.planets.style,t.planets.symbolStyle)),(!r.stars.designationType||r.stars.designationType==="")&&(r.stars.designationType="desig"),B(Wt.starnames[r.culture].designation,r.stars.designationType)||(r.designationType="desig"),(!r.stars.propernameType||r.stars.propernameType==="")&&(r.stars.propernameType="name"),B(Wt.starnames[r.culture].propername,r.stars.propernameType)||(r.propernameType="name"),(!r.dsos.namesType||r.dsos.namesType==="")&&(r.dsos.namesType="desig"),(!r.constellations.namesType||r.constellations.namesType==="")&&(r.constellations.namesType="desig"),B(Wt.constellations[r.culture].names,r.constellations.namesType)||(r.constellations.namesType="name"),(!r.planets.symbolType||r.planets.symbolType==="")&&(r.planets.symbolType="symbol"),(!r.planets.namesType||r.planets.namesType==="")&&(r.planets.namesType="desig"),B(Wt.planets[r.culture].names,r.planets.namesType)||(r.planets.namesType="desig"),r.constellations.nameStyle.font=Ue(r.constellations.nameStyle.font),r.constellations.nameStyle.opacity=Ue(r.constellations.nameStyle.opacity),r.constellations.nameStyle.fill=Ue(r.constellations.nameStyle.fill),r.constellations.lineStyle.width=Ue(r.constellations.lineStyle.width),r.constellations.lineStyle.opacity=Ue(r.constellations.lineStyle.opacity),r.constellations.lineStyle.stroke=Ue(r.constellations.lineStyle.stroke),e||Object.assign(Ar,r),r}};function Ue(t){var e;if(!ee(t))return[t,t,t];if(t.length>=3)return t;if(t.length===1)return[t[0],t[0],t[0]];if(t.length===2)return[t[0],t[1],t[1]]}st.settings=function(){return pe};var Va=ko().domain([-.335,3.347]).range(["#ff4700","#ff4b00","#ff4f00","#ff5300","#ff5600","#ff5900","#ff5b00","#ff5d00","#ff6000","#ff6300","#ff6500","#ff6700","#ff6900","#ff6b00","#ff6d00","#ff7000","#ff7300","#ff7500","#ff7800","#ff7a00","#ff7c00","#ff7e00","#ff8100","#ff8300","#ff8506","#ff870a","#ff8912","#ff8b1a","#ff8e21","#ff9127","#ff932c","#ff9631","#ff9836","#ff9a3c","#ff9d3f","#ffa148","#ffa34b","#ffa54f","#ffa753","#ffa957","#ffab5a","#ffad5e","#ffb165","#ffb269","#ffb46b","#ffb872","#ffb975","#ffbb78","#ffbe7e","#ffc184","#ffc489","#ffc78f","#ffc892","#ffc994","#ffcc99","#ffce9f","#ffd1a3","#ffd3a8","#ffd5ad","#ffd7b1","#ffd9b6","#ffdbba","#ffddbe","#ffdfc2","#ffe1c6","#ffe3ca","#ffe4ce","#ffe8d5","#ffe9d9","#ffebdc","#ffece0","#ffefe6","#fff0e9","#fff2ec","#fff4f2","#fff5f5","#fff6f8","#fff9fd","#fef9ff","#f9f6ff","#f6f4ff","#f3f2ff","#eff0ff","#ebeeff","#e9edff","#e6ebff","#e3e9ff","#e0e7ff","#dee6ff","#dce5ff","#d9e3ff","#d7e2ff","#d3e0ff","#c9d9ff","#bfd3ff","#b7ceff","#afc9ff","#a9c5ff","#a4c2ff","#9fbfff","#9bbcff"].reverse()),Xr={airy:{n:"Airy\u2019s Minimum Error",arg:Math.PI/2,scale:360,ratio:1,clip:!0},aitoff:{n:"Aitoff",arg:null,scale:162},armadillo:{n:"Armadillo",arg:0,scale:250},august:{n:"August",arg:null,scale:94,ratio:1.4},azimuthalEqualArea:{n:"Azimuthal Equal Area",arg:null,scale:340,ratio:1,clip:!0},azimuthalEquidistant:{n:"Azimuthal Equidistant",arg:null,scale:320,ratio:1,clip:!0},baker:{n:"Baker Dinomic",arg:null,scale:160,ratio:1.4},berghaus:{n:"Berghaus Star",arg:0,scale:320,ratio:1,clip:!0},boggs:{n:"Boggs Eumorphic",arg:null,scale:170},bonne:{n:"Bonne",arg:Math.PI/2.5,scale:225,ratio:.88},bromley:{n:"Bromley",arg:null,scale:162},cassini:{n:"Cassini",arg:null,scale:325,ratio:1,clip:!0},collignon:{n:"Collignon",arg:null,scale:100,ratio:2.6},craig:{n:"Craig Retroazimuthal",arg:0,scale:310,ratio:1.5,clip:!0},craster:{n:"Craster Parabolic",arg:null,scale:160},cylindricalEqualArea:{n:"Cylindrical Equal Area",arg:Math.PI/6,scale:190,ratio:2.3},cylindricalStereographic:{n:"Cylindrical Stereographic",arg:Math.PI/4,scale:230,ratio:1.3},eckert1:{n:"Eckert I",arg:null,scale:175},eckert2:{n:"Eckert II",arg:null,scale:175},eckert3:{n:"Eckert III",arg:null,scale:190},eckert4:{n:"Eckert IV",arg:null,scale:190},eckert5:{n:"Eckert V",arg:null,scale:182},eckert6:{n:"Eckert VI",arg:null,scale:182},eisenlohr:{n:"Eisenlohr",arg:null,scale:102},equirectangular:{n:"Equirectangular",arg:null,scale:165},fahey:{n:"Fahey",arg:null,scale:196,ratio:1.4},mtFlatPolarParabolic:{n:"Flat Polar Parabolic",arg:null,scale:175},mtFlatPolarQuartic:{n:"Flat Polar Quartic",arg:null,scale:230,ratio:1.65},mtFlatPolarSinusoidal:{n:"Flat Polar Sinusoidal",arg:null,scale:175,ratio:1.9},foucaut:{n:"Foucaut",arg:null,scale:142},ginzburg4:{n:"Ginzburg IV",arg:null,scale:180,ratio:1.7},ginzburg5:{n:"Ginzburg V",arg:null,scale:196,ratio:1.55},ginzburg6:{n:"Ginzburg VI",arg:null,scale:190,ratio:1.4},ginzburg8:{n:"Ginzburg VIII",arg:null,scale:205,ratio:1.3},ginzburg9:{n:"Ginzburg IX",arg:null,scale:190,ratio:1.4},homolosine:{n:"Goode Homolosine",arg:null,scale:160,ratio:2.2},hammer:{n:"Hammer",arg:2,scale:180},hatano:{n:"Hatano",arg:null,scale:186},healpix:{n:"HEALPix",arg:1,scale:320,ratio:1.2},hill:{n:"Hill Eucyclic",arg:2,scale:190,ratio:1.1},kavrayskiy7:{n:"Kavrayskiy VII",arg:null,scale:185,ratio:1.75},lagrange:{n:"Lagrange",arg:Math.PI/4,scale:88,ratio:1.6,clip:!1},larrivee:{n:"l'Arriv\xE9e",arg:null,scale:160,ratio:1.25},laskowski:{n:"Laskowski Tri-Optimal",arg:null,scale:165,ratio:1.7},loximuthal:{n:"Loximuthal",arg:Math.PI/4,scale:175,ratio:1.8},mercator:{n:"Mercator",arg:null,scale:160,ratio:1.3},miller:{n:"Miller",arg:null,scale:160,ratio:1.5},mollweide:{n:"Mollweide",arg:null,scale:180},naturalEarth:{n:"Natural Earth",arg:null,scale:185,ratio:1.85},nellHammer:{n:"Nell Hammer",arg:null,scale:160,ratio:2.6},orthographic:{n:"Orthographic",arg:null,scale:480,ratio:1,clip:!0},patterson:{n:"Patterson Cylindrical",arg:null,scale:160,ratio:1.75},polyconic:{n:"Polyconic",arg:null,scale:160,ratio:1.3},quincuncial:{n:"Quincuncial",arg:null,scale:160,ratio:1.3},rectangularPolyconic:{n:"Rectangular Polyconic",arg:0,scale:160,ratio:1.65},robinson:{n:"Robinson",arg:null,scale:160},sinusoidal:{n:"Sinusoidal",arg:null,scale:160,ratio:2},stereographic:{n:"Stereographic",arg:null,scale:500,ratio:1,clip:!0},times:{n:"Times",arg:null,scale:210,ratio:1.4},twoPointEquidistant:{n:"Two-Point Equidistant",arg:Math.PI/2,scale:320,ratio:1.15,clip:!0},vanDerGrinten:{n:"van Der Grinten",arg:null,scale:160,ratio:1},vanDerGrinten2:{n:"van Der Grinten II",arg:null,scale:160,ratio:1},vanDerGrinten3:{n:"van Der Grinten III",arg:null,scale:160,ratio:1},vanDerGrinten4:{n:"van Der Grinten IV",arg:null,scale:160,ratio:1.6},wagner4:{n:"Wagner IV",arg:null,scale:185},wagner6:{n:"Wagner VI",arg:null,scale:160},wagner7:{n:"Wagner VII",arg:null,scale:190,ratio:1.8},wiechel:{n:"Wiechel",arg:null,scale:360,ratio:1,clip:!0},winkel3:{n:"Winkel Tripel",arg:null,scale:196,ratio:1.7}};st.projections=function(){return Xr};var Wt={starnames:{iau:{designation:{desig:"Designation",bayer:"Bayer",flam:"Flamsteed",var:"Variable",gl:"Gliese",hd:"Draper",hip:"Hipparcos"},propername:{name:"IAU Name",ar:"Arabic",zh:"Chinese",en:"English",fi:"Finnish",fr:"French",de:"German",el:"Greek",he:"Hebrew",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",la:"Latin",fa:"Persian",ru:"Russian",es:"Spanish",tr:"Turkish"}},cn:{propername:{name:"Proper name",en:"English",pinyin:"Pinyin"},designation:{desig:"IAU Designation"}}},constellations:{iau:{names:{desig:"Designation",name:"IAU Name",ar:"Arabic",zh:"Chinese",cz:"Czech",en:"English",ee:"Estonian",fi:"Finnish",fr:"French",de:"German",el:"Greek",he:"Hebrew",hi:"Hindi",it:"Italian",ja:"Japanese",sw:"Kiswahili",ko:"Korean",la:"Latin",fa:"Persian",ru:"Russian",es:"Spanish",tr:"Turkish"}},cn:{names:{name:"Proper name",en:"English",pinyin:"Pinyin"}}},planets:{iau:{symbol:{symbol:"\u263E Symbol",letter:"\u216C Letter",disk:"\u25CF Disk"},names:{desig:"Designation",ar:"Arabic",zh:"Chinese",en:"English",fr:"French",de:"German",el:"Greek",he:"Hebrew",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",la:"Latin",fa:"Persian",ru:"Russian",es:"Spanish"}},cn:{symbol:{symbol:"\u263E Symbol",letter:"\u216C Letter",disk:"\u25CF Disk"},names:{desig:"Designation",name:"Chinese",pinyin:"Pinyin",en:"English"}}},dsonames:{iau:{names:{desig:"Designation",name:"English",ar:"Arabic",zh:"Chinese",fi:"Finnish",fr:"French",de:"German",el:"Greek",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",la:"Latin",fa:"Persian",ru:"Russian",es:"Spanish",tr:"Turkish"}},cn:{names:{desig:"Designation",name:"Chinese",pinyin:"Pinyin",en:"English"}}}},Mc={iau:Object.keys(Wt.constellations.iau.names).concat(Object.keys(Wt.planets.iau.names)).filter(function(t,e,r){return r.indexOf(t)===e}),cn:Object.keys(Wt.constellations.cn.names).concat(Object.keys(Wt.starnames.cn.propername)).filter(function(t,e,r){return r.indexOf(t)===e})};var m5={naturalEarth:"geoNaturalEarth1Raw"},pg={twoPointEquidistant:function(t){return t/2}},mg={hatano:(function(){var t=1e-6,e=Math.PI/2;function r(n,a){for(var i=Math.sin(a)*(a<0?2.43763:2.67595),o=0,s;o<20&&(a-=s=(a+Math.sin(a)-i)/(1+Math.cos(a)),!(Math.abs(s)<t));o++);return[.85*n*Math.cos(a*=.5),Math.sin(a)*(a<0?1.93052:1.75859)]}return r.invert=function(n,a){var i=Math.abs(i=a*(a<0?.5179951515653813:.5686373742600607))>1-t?i>0?e:-e:Math.asin(i);return[1.1764705882352942*n/Math.cos(i),Math.abs(i=((i+=i)+Math.sin(i))*(a<0?.4102345310814193:.3736990601468637))>1-t?i>0?e:-e:Math.asin(i)]},r})(),healpix:function(t){var e=Kn(0),r=Ie,n=Math.PI,a=n/2,i=41+48/36+37/3600,o=i*n/180,s=2*n,l=r(n,o)[0]-r(-n,o)[0],f=e(0,o)[1],u=r(0,o)[1],c=r(0,a)[1]-u,p=2*n/t;function m(h,d){var y,b=Math.abs(d);if(b>o){var g=Math.min(t-1,Math.max(0,Math.floor((h+n)/p)));h+=n*(t-1)/t-g*p,y=r(h,b),y[0]=y[0]*s/l-s*(t-1)/(2*t)+g*s/t,y[1]=f+(y[1]-u)*4*c/s,d<0&&(y[1]=-y[1])}else y=e(h,d);return y[0]/=2,y}return m.invert=function(h,d){h*=2;var y=Math.abs(d);if(y>f){var b=Math.min(t-1,Math.max(0,Math.floor((h+n)/p)));h=(h+n*(t-1)/t-b*p)*l/s;var g=r.invert(h,.25*(y-f)*s/c+u);return g[0]-=n*(t-1)/t-b*p,d<0&&(g[1]=-g[1]),g}return e.invert(h,d)},m},wagner7:(function(){function t(e,r){var n=.90631*Math.sin(r),a=Math.sqrt(1-n*n),i=Math.sqrt(2/(1+a*Math.cos(e/=3)));return[2.66723*a*i*Math.sin(e),1.24104*n*i]}return t.invert=function(e,r){var n=e/2.66723,a=r/1.24104,i=Math.sqrt(n*n+a*a),o=2*Math.asin(Math.max(-1,Math.min(1,i/2)));return[3*Math.atan2(e*Math.tan(o),2.66723*i),i&&Math.asin(Math.max(-1,Math.min(1,r*Math.sin(o)/(1.24104*.90631*i))))]},t})()};function h5(t,e){var r=B(mg,t)?mg[t]:(function(){var n=m5[t]||"geo"+t.charAt(0).toUpperCase()+t.slice(1)+"Raw";return wc[n]||Tu[n]})();return!r||e===void 0||e===null?r:r(B(pg,t)?pg[t](e):e)}st.projection=function(t){var e,r,n;if(!B(Xr,t))throw new Error("Projection not supported: "+t);if(e=Xr[t],r=h5(t,e.arg),!r)throw new Error("Projection not supported: "+t);return n=function(a,i){return r(-a,i)},n.invert=function(a,i){var o=r.invert&&r.invert(a,i);return o&&(o[0]=-o[0]),o},$(n)};function hg(t,e){var r=$(o).scale(1),n=r.center,a=r.translate,i;function o(s,l){var f=t([s*=180/Math.PI,l*=180/Math.PI]),u=e([s,l]);return[(1-i)*f[0]+i*u[0],(i-1)*f[1]-i*u[1]]}return r.alpha=function(s){if(!arguments.length)return i;i=+s;var l=t.center(),f=e.center(),u=t.translate(),c=e.translate();return n([(1-i)*l[0]+i*f[0],(1-i)*l[1]+i*f[1]]),a([(1-i)*u[0]+i*c[0],(1-i)*u[1]+i*c[1]]),r},delete r.translate,delete r.center,r.alpha(0)}var bc={equatorial:[0,0,0],ecliptic:[0,0,23.4393],galactic:[93.5949,28.9362,-58.5988],supergalactic:[137.31,59.5283,57.7303]},Wo={equatorial:[0,90],ecliptic:[-90,66.5607],galactic:[-167.1405,27.1283],supergalactic:[-76.2458,15.7089]};st.eulerAngles=function(){return bc};st.poles=function(){return Wo};var yr=Math.PI*2,xr=Math.PI/2,M=Math.PI/180;function ur(t,e){var r=d5(t.map(function(n){return n*M}),e);return r.map(function(n){return n/M})}function d5(t,e){var r,n,a,i,o,s,l,f,u,c,p=1e-5;return e?(s=t[0],s<0&&(s+=yr),l=t[1],s-=e[0],i=e[1],o=e[2],r=Math.sin(l)*Math.sin(i)-Math.cos(l)*Math.cos(i)*Math.cos(s),Math.abs(r)<p&&(r=-Math.cos(l+i)+Math.cos(l)*Math.cos(i)*(1-Math.cos(s))),n=-Math.cos(l)*Math.sin(s),r!==0||n!==0?f=Math.atan2(n,r):f=s-Math.PI,u=o+f,u>Math.PI&&(u-=yr),s%Math.PI===0?(c=l+Math.cos(s)*i,c>xr&&(c=Math.PI-c),c<-xr&&(c=-Math.PI-c)):(a=Math.sin(l)*Math.cos(i)+Math.cos(l)*Math.sin(i)*Math.cos(s),Math.abs(a)>.99?(c=Math.abs(Math.acos(Math.sqrt(r*r+n*n))),a<0&&(c*=-1)):c=Math.asin(a)),[u,c]):t}function Zr(t){if(t===null||t.length<=0)return[0,0,0];var e=bc.equatorial;return t[2]||(t[2]=0),[e[0]-t[0],e[1]-t[1],e[2]+t[2]]}var Ke={ecliptic:[-90,23.4393,90],"inverse ecliptic":[90,23.4393,-90],galactic:[-167.1405,62.8717,122.9319],"inverse galactic":[122.9319,62.8717,-167.1405],supergalactic:[283.7542,74.2911,26.4504],"inverse supergalactic":[26.4504,74.2911,283.7542],init:function(){for(var t in this)this[t].constructor==Array&&(this[t]=this[t].map(function(e){return e*M}))},add:function(t,e){if(!(!e||!t||e.length!==3||this.hasOwnProperty(t)))return this[t]=e.map(function(r){return r*M}),this[t]}};Ke.init();st.euler=function(){return Ke};function ae(t){return t+"px"}function qr(t,e){return Math.round(Math.pow(10,e)*t)/Math.pow(10,e)}function Sc(t){return t<10?"0"+t:t}var g5=Object.prototype.hasOwnProperty;function B(t,e){return t!==null&&g5.call(t,e)}function re(t){return t!==null&&!isNaN(parseFloat(t))&&isFinite(t)}function ee(t){return t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function dg(t){var e=typeof t;return e==="function"||e==="object"&&!!t}function v5(t){return typeof t=="function"||!1}function Re(t){return v5(t)?t:function(){return t}}function Pc(t,e){for(var r in e)B(e,r)&&t.classed(r,e[r]);return t}function wr(t,e){for(var r in e)B(e,r)&&t.attr(r,e[r]);return t}function fr(t,e){for(var r in e)B(e,r)&&t.style(r,e[r]);return t}function gg(t){var e=[],r=0,n=0,a=null,i=null;function o(){for(;!a&&r<t&&n<e.length;)r++,e[n++](function(s){if(r--,s&&!a)return a=s,i(a);if(!a){if(r===0&&n===e.length)return i(null);o()}})}return{defer:function(s){return e.push(s),this},await:function(s){return i=s,e.length?o():s(null),this}}}function se(t,e){return ai(t).then(function(r){e(null,r)},function(r){e(r||new Error("failed to load: "+t))})}function vg(t){return t&&t instanceof Date&&!isNaN(t)}function yg(t){var e=0,r=0;if(t.offsetParent)do e+=t.offsetLeft,r+=t.offsetTop;while((t=t.offsetParent)!==null);return[e,r]}function xg(t,e){for(;t.parentNode;){if(t.id===e)return!0;t=t.parentNode}return!1}function kc(t,e,r){var n=e.valueOf()-t.valueOf(),a=r||"d";switch(a){case"y":case"yr":n/=31556926080;break;case"m":case"mo":n/=26298e5;break;case"d":case"dy":n/=864e5;break;case"h":case"hr":n/=36e5;break;case"n":case"mn":n/=6e4;break;case"s":case"sec":n/=1e3;break;case"ms":break}return Math.floor(n)}function zl(t){if(t){var e=t.split(".");if(!(e.length<1)&&(e=e[0].split("-"),e[0]=e[0].replace(/\D/g,""),!!e[0]))return e[1]=e[1]?e[1].replace(/\D/g,""):"1",e[2]=e[2]?e[2].replace(/\D/g,""):"1",new Date(Date.UTC(e[0],e[1]-1,e[2]))}}function wg(t,e,r){return t=(t*M+yr)%yr,e=(e*M+yr)%yr,Math.abs(t-e)>Math.PI&&(t>e?t=t-yr:e>t&&(e=e-yr)),fe(t/M,e/M)}var Te={sinh:function(t){return(Math.pow(Math.E,t)-Math.pow(Math.E,-t))/2},cosh:function(t){return(Math.pow(Math.E,t)+Math.pow(Math.E,-t))/2},tanh:function(t){return 2/(1+Math.exp(-2*t))-1},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},normalize0:function(t){return((t+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI},normalize:function(t){return(t%(Math.PI*2)+Math.PI*2)%(Math.PI*2)},cartesian:function(t){var e=t[0],r=xr-t[1],n=t[2];return{x:n*Math.sin(r)*Math.cos(e),y:n*Math.sin(r)*Math.sin(e),z:n*Math.cos(r)}},spherical:function(t){var e=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),r=Math.atan(t.y/t.x),n=Math.acos(t.z/e);return[r/M,n/M,e]},distance:function(t,e){return Math.acos(Math.sin(t[1])*Math.sin(e[1])+Math.cos(t[1])*Math.cos(e[1])*Math.cos(t[0]-e[0]))}};var pN=Math.PI/2,mN=Math.PI/4,hN=Math.PI*2;var Ba=!1;st.add=function(t){var e={};if(!B(t,"type"))return console.log("Missing type");if((t.type==="dso"||t.type==="json")&&(!B(t,"file")||!B(t,"callback")))return console.log("Can't add data file");if((t.type==="line"||t.type==="raw")&&!B(t,"callback"))return console.log("Can't add data");B(t,"file")&&(e.file=t.file),e.type=t.type,B(t,"callback")&&(e.callback=t.callback),B(t,"redraw")&&(e.redraw=t.redraw),B(t,"save")&&(e.save=t.save),st.data.push(e)};st.remove=function(t){if(t!==null&&t<st.data.length)return st.data.splice(t,1)};st.clear=function(){st.data=[]};st.addCallback=function(t){st.callback=t,Ba=t!==null};st.runCallback=function(t){Ba=!1,st.callback(),Ba=!0};var eo={};eo.symbol=function(){var t=Re("circle"),e=Re(64),r=Re(Math.PI),n=Re("#fff"),a=Re(""),i=Re([2,2]),o;function s(f){l[t()](f)}var l={circle:function(f){var u=Math.sqrt(e()),c=u/2;return f.arc(o[0],o[1],c,0,2*Math.PI),f.closePath(),c},square:function(f){var u=Math.sqrt(e()),c=u/1.7;return f.moveTo(o[0]-c,o[1]-c),f.lineTo(o[0]+c,o[1]-c),f.lineTo(o[0]+c,o[1]+c),f.lineTo(o[0]-c,o[1]+c),f.closePath(),c},diamond:function(f){var u=Math.sqrt(e()),c=u/1.5;return f.moveTo(o[0],o[1]-c),f.lineTo(o[0]+c,o[1]),f.lineTo(o[0],o[1]+c),f.lineTo(o[0]-c,o[1]),f.closePath(),c},triangle:function(f){var u=Math.sqrt(e()),c=u/Math.sqrt(3);return f.moveTo(o[0],o[1]-c),f.lineTo(o[0]+c,o[1]+c),f.lineTo(o[0]-c,o[1]+c),f.closePath(),c},ellipse:function(f){var u=Math.sqrt(e()),c=u/2;return f.save(),f.translate(o[0],o[1]),f.scale(1.6,.8),f.beginPath(),f.arc(0,0,c,0,2*Math.PI),f.closePath(),f.restore(),c},marker:function(f){var u=Math.sqrt(e()),c=u/2;return f.moveTo(o[0],o[1]-c),f.lineTo(o[0],o[1]+c),f.moveTo(o[0]-c,o[1]),f.lineTo(o[0]+c,o[1]),f.closePath(),c},"cross-circle":function(f){var u=Math.sqrt(e()),c=u/2;return f.moveTo(o[0],o[1]-u),f.lineTo(o[0],o[1]+u),f.moveTo(o[0]-u,o[1]),f.lineTo(o[0]+u,o[1]),f.stroke(),f.beginPath(),f.moveTo(o[0],o[1]),f.arc(o[0],o[1],c,0,2*Math.PI),f.closePath(),c},"stroke-circle":function(f){var u=Math.sqrt(e()),c=u/2;return f.moveTo(o[0],o[1]-u),f.lineTo(o[0],o[1]+u),f.stroke(),f.beginPath(),f.moveTo(o[0],o[1]),f.arc(o[0],o[1],c,0,2*Math.PI),f.closePath(),c},crescent:function(f){var u=Math.sqrt(e()),c=u/2,p=r(),m=.5*(1-Math.cos(p)),h=1.98*Math.abs(m-.5)+.01,d=p>Math.PI,y=Math.abs(m)>.5?d:!d,b=f.fillStyle,g=m<.157?"#669":"#557";return f.save(),f.fillStyle=g,f.beginPath(),f.moveTo(o[0],o[1]),f.arc(o[0],o[1],c,0,2*Math.PI),f.closePath(),f.fill(),f.fillStyle=b,f.beginPath(),f.moveTo(o[0],o[1]),f.arc(o[0],o[1],c,-Math.PI/2,Math.PI/2,d),f.scale(h,1),f.arc(o[0]/h,o[1],c,Math.PI/2,-Math.PI/2,y),f.closePath(),f.fill(),f.restore(),c}};return s.type=function(f){return arguments.length?(t=Re(f),s):t},s.size=function(f){return arguments.length?(e=Re(f),s):e},s.age=function(f){return arguments.length?(r=Re(f),s):r},s.text=function(f){return arguments.length?(a=Re(f),s):a},s.position=function(f){if(arguments.length)return o=f,s},s};st.Canvas=eo;var Xa={elements:function(t){var e=(t.jd-2451545)/36525,r=e*e,n=e*r,a=e*n,i=e*a,o=r*1e-4,s=n*1e-6,l=a*1e-8,f=3400.4*Math.cos(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))-635.6*Math.cos(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))-235.6*Math.cos(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))+218.1*Math.cos(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))+181*Math.cos(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))-39.9*Math.cos(M*(103.2079+377336.3051*e-121.035*o-10.724*s+5.028*l))-38.4*Math.cos(M*(233.2295+926533.2733*e-34.136*o+3.705*s-1.769*l))+33.8*Math.cos(M*(336.4374+13038695784e-4*e-155.171*o-7.02*s+3.259*l))+28.8*Math.cos(M*(111.4008+17810684461e-4*e-65.201*o+7.328*s-3.538*l))+12.6*Math.cos(M*(13.1347+13317340404e-4*e+58.906*o+17.971*s-8.566*l))+11.4*Math.cos(M*(186.5442+966404.0351*e-68.058*o-.567*s+.232*l))-11.1*Math.cos(M*(222.5657-441199.8173*e-91.506*o-14.307*s+6.797*l))-10.2*Math.cos(M*(269.9268+954397.7353*e+179.941*o+28.695*s-13.594*l))+9.7*Math.cos(M*(145.6272+18449319583e-4*e+147.34*o+32.359*s-15.363*l))+9.6*Math.cos(M*(240.6422+818536.1225*e-29.529*o+3.582*s-1.769*l))+8*Math.cos(M*(297.8502+445267.1115*e-16.3*o+1.832*s-.884*l))-6.2*Math.cos(M*(132.4925+513197.9179*e+88.434*o+14.388*s-6.797*l))+6*Math.cos(M*(173.5506+13358013346e-4*e-48.901*o+5.496*s-2.653*l))+3.7*Math.cos(M*(113.8717+17450693958e-4*e-63.665*o+7.287*s-3.538*l))+3.6*Math.cos(M*(338.9083+12678705281e-4*e-153.636*o-7.061*s+3.259*l))+3.2*Math.cos(M*(246.3642+22582673137e-4*e+24.769*o+21.675*s-10.335*l))-3*Math.cos(M*(8.1929+1403732141e-3*e+55.834*o+18.052*s-8.566*l))+2.3*Math.cos(M*(98.2661+449334.4057*e-124.107*o-10.643*s+5.028*l))-2.2*Math.cos(M*(357.5291+35999.0503*e-1.536*o+.041*s+0*l))-2*Math.cos(M*(38.5872+858602.4669*e-138.871*o-8.852*s+4.144*l))-1.8*Math.cos(M*(105.6788+341337.2548*e-119.499*o-10.765*s+5.028*l))-1.7*Math.cos(M*(201.474+826670.7108*e-245.142*o-21.367*s+10.057*l))+1.6*Math.cos(M*(184.1196+401329.0556*e+125.428*o+18.579*s-8.798*l))-1.4*Math.cos(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))+1.3*Math.cos(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l)),u=-.55*Math.cos(M*(238.2+854535.2*e))+.1*Math.cos(M*(103.2+377336.3*e))+.1*Math.cos(M*(233.2+926533.3*e)),c=383397.6+f+u*e,p=.014217*Math.cos(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))+.008551*Math.cos(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l))-.001383*Math.cos(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))+.001353*Math.cos(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))-.001146*Math.cos(M*(66.5106+349471.8432*e-335.112*o-35.715*s+16.854*l))-915e-6*Math.cos(M*(201.474+826670.7108*e-245.142*o-21.367*s+10.057*l))+869e-6*Math.cos(M*(103.2079+377336.3051*e-121.035*o-10.724*s+5.028*l))-628e-6*Math.cos(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))-393e-6*Math.cos(M*(291.5472-127727.0245*e-425.082*o-50.062*s+23.651*l))+284e-6*Math.cos(M*(328.2445-99862.5625*e-211.005*o-25.072*s+11.826*l))-278e-6*Math.cos(M*(162.8868-31931.7561*e-106.271*o-12.516*s+5.913*l))-24e-5*Math.cos(M*(269.9268+954397.7353*e+179.941*o+28.695*s-13.594*l))+23e-5*Math.cos(M*(111.4008+17810684461e-4*e-65.201*o+7.328*s-3.538*l))+229e-6*Math.cos(M*(167.2476+762807.1986*e-457.683*o-46.398*s+21.882*l))-202e-6*Math.cos(M*(83.3826-12006.2998*e+247.999*o+29.262*s-13.826*l))+19e-5*Math.cos(M*(190.8102-541062.3799*e-302.511*o-39.379*s+18.623*l))+177e-6*Math.cos(M*(357.5291+35999.0503*e-1.536*o+.041*s+0*l))+153e-6*Math.cos(M*(32.2842+285608.3309*e-547.653*o-60.746*s+28.679*l))-137e-6*Math.cos(M*(44.8902+14315966029e-4*e+269.911*o+43.043*s-20.392*l))+122e-6*Math.cos(M*(145.6272+18449319583e-4*e+147.34*o+32.359*s-15.363*l))+116e-6*Math.cos(M*(302.211+12400060662e-4*e-367.713*o-32.051*s+15.085*l))-111e-6*Math.cos(M*(203.9449+790671.6605*e-243.606*o-21.408*s+10.057*l))-108e-6*Math.cos(M*(68.9815+313472.7929*e-333.576*o-35.756*s+16.854*l))+96e-6*Math.cos(M*(336.4374+13038695784e-4*e-155.171*o-7.02*s+3.259*l))-9e-5*Math.cos(M*(98.2661+449334.4057*e-124.107*o-10.643*s+5.028*l))+9e-5*Math.cos(M*(13.1347+13317340404e-4*e+58.906*o+17.971*s-8.566*l))+56e-6*Math.cos(M*(55.8468-10182612475e-4*e-392.482*o-53.726*s+25.42*l))-56e-6*Math.cos(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))+52e-6*Math.cos(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))-5e-5*Math.cos(M*(133.0212+698943.6863*e-670.224*o-71.429*s+33.708*l))-49e-6*Math.cos(M*(267.9846+1176142554e-3*e-580.254*o-57.082*s+26.911*l))-49e-6*Math.cos(M*(184.1196+401329.0556*e+125.428*o+18.579*s-8.798*l))-45e-6*Math.cos(M*(49.1562-75869.812*e+35.458*o+4.231*s-2.001*l))+44e-6*Math.cos(M*(257.3208-191590.5367*e-637.623*o-75.093*s+35.477*l))+42e-6*Math.cos(M*(105.6788+341337.2548*e-119.499*o-10.765*s+5.028*l))+42e-6*Math.cos(M*(160.4159+4067.2942*e-107.806*o-12.475*s+5.913*l))+4e-5*Math.cos(M*(246.3642+22582673137e-4*e+24.769*o+21.675*s-10.335*l))-4e-5*Math.cos(M*(156.5838-604925.8921*e-515.053*o-64.41*s+30.448*l))+36e-6*Math.cos(M*(169.7185+726808.1483*e-456.147*o-46.439*s+21.882*l))+29e-6*Math.cos(M*(113.8717+17450693958e-4*e-63.665*o+7.287*s-3.538*l))-29e-6*Math.cos(M*(297.8502+445267.1115*e-16.3*o+1.832*s-.884*l))-28e-6*Math.cos(M*(294.0181-163726.0747*e-423.546*o-50.103*s+23.651*l))+27e-6*Math.cos(M*(263.6238+381403.5993*e-228.841*o-23.199*s+10.941*l))-26e-6*Math.cos(M*(358.0578+221744.8187*e-760.194*o-85.777*s+40.505*l))-26e-6*Math.cos(M*(8.1929+1403732141e-3*e+55.834*o+18.052*s-8.566*l)),m=-.0022*Math.cos(M*(103.2+377336.3*e)),h=.055544+p+.001*e*m,d=.0011776*Math.cos(M*(49.1562-75869.812*e+35.458*o+4.231*s-2.001*l))-971e-7*Math.cos(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))+908e-7*Math.cos(M*(186.5442+966404.0351*e-68.058*o-.567*s+.232*l))+623e-7*Math.cos(M*(83.3826-12006.2998*e+247.999*o+29.262*s-13.826*l))+483e-7*Math.cos(M*(51.6271-111868.8623*e+36.994*o+4.19*s-2.001*l))+348e-7*Math.cos(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))-316e-7*Math.cos(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))-253e-7*Math.cos(M*(46.6853-39870.7617*e+33.922*o+4.272*s-2.001*l))-141e-7*Math.cos(M*(274.1928-553068.6797*e-54.513*o-10.116*s+4.797*l))+127e-7*Math.cos(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l))+117e-7*Math.cos(M*(184.1196+401329.0556*e+125.428*o+18.579*s-8.798*l))-78e-7*Math.cos(M*(98.3124-151739.624*e+70.916*o+8.462*s-4.001*l))-63e-7*Math.cos(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))+63e-7*Math.cos(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))+36e-7*Math.cos(M*(321.5076+14436029027e-4*e+21.912*o+13.78*s-6.566*l))-35e-7*Math.cos(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))+24e-7*Math.cos(M*(149.8932+337465.5434*e-87.113*o-6.453*s+3.028*l))+24e-7*Math.cos(M*(170.9849-930404.9848*e+66.523*o+.608*s-.232*l)),y=-.0203*Math.cos(M*(125-1934.1*e))+.0034*Math.cos(M*(220.2-1935.5*e)),b=.0449858+d+.001*y,g=-15.448*Math.sin(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))-9.642*Math.sin(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l))-2.721*Math.sin(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))+2.607*Math.sin(M*(66.5106+349471.8432*e-335.112*o-35.715*s+16.854*l))+2.085*Math.sin(M*(201.474+826670.7108*e-245.142*o-21.367*s+10.057*l))+1.477*Math.sin(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))+.968*Math.sin(M*(291.5472-127727.0245*e-425.082*o-50.062*s+23.651*l))-.949*Math.sin(M*(103.2079+377336.3051*e-121.035*o-10.724*s+5.028*l))-.703*Math.sin(M*(167.2476+762807.1986*e-457.683*o-46.398*s+21.882*l))-.66*Math.sin(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))-.577*Math.sin(M*(190.8102-541062.3799*e-302.511*o-39.379*s+18.623*l))-.524*Math.sin(M*(269.9268+954397.7353*e+179.941*o+28.695*s-13.594*l))-.482*Math.sin(M*(32.2842+285608.3309*e-547.653*o-60.746*s+28.679*l))+.452*Math.sin(M*(357.5291+35999.0503*e-1.536*o+.041*s+0*l))-.381*Math.sin(M*(302.211+12400060662e-4*e-367.713*o-32.051*s+15.085*l))-.342*Math.sin(M*(328.2445-99862.5625*e-211.005*o-25.072*s+11.826*l))-.312*Math.sin(M*(44.8902+14315966029e-4*e+269.911*o+43.043*s-20.392*l))+.282*Math.sin(M*(162.8868-31931.7561*e-106.271*o-12.516*s+5.913*l))+.255*Math.sin(M*(203.9449+790671.6605*e-243.606*o-21.408*s+10.057*l))+.252*Math.sin(M*(68.9815+313472.7929*e-333.576*o-35.756*s+16.854*l))-.211*Math.sin(M*(83.3826-12006.2998*e+247.999*o+29.262*s-13.826*l))+.193*Math.sin(M*(267.9846+1176142554e-3*e-580.254*o-57.082*s+26.911*l))+.191*Math.sin(M*(133.0212+698943.6863*e-670.224*o-71.429*s+33.708*l))-.184*Math.sin(M*(55.8468-10182612475e-4*e-392.482*o-53.726*s+25.42*l))+.182*Math.sin(M*(145.6272+18449319583e-4*e+147.34*o+32.359*s-15.363*l))-.158*Math.sin(M*(257.3208-191590.5367*e-637.623*o-75.093*s+35.477*l))+.148*Math.sin(M*(156.5838-604925.8921*e-515.053*o-64.41*s+30.448*l))-.111*Math.sin(M*(169.7185+726808.1483*e-456.147*o-46.439*s+21.882*l))+.101*Math.sin(M*(13.1347+13317340404e-4*e+58.906*o+17.971*s-8.566*l))+.1*Math.sin(M*(358.0578+221744.8187*e-760.194*o-85.777*s+40.505*l))+.087*Math.sin(M*(98.2661+449334.4057*e-124.107*o-10.643*s+5.028*l))+.08*Math.sin(M*(42.948+16533414216e-4*e-490.283*o-42.734*s+20.113*l))+.08*Math.sin(M*(222.5657-441199.8173*e-91.506*o-14.307*s+6.797*l))+.077*Math.sin(M*(294.0181-163726.0747*e-423.546*o-50.103*s+23.651*l))-.073*Math.sin(M*(280.8834-14954601151e-4*e-482.452*o-68.074*s+32.217*l))-.071*Math.sin(M*(304.6819+12040070159e-4*e-366.177*o-32.092*s+15.085*l))-.069*Math.sin(M*(233.7582+11122790417e-4*e-792.795*o-82.113*s+38.736*l))-.067*Math.sin(M*(34.7551+249609.2807*e-546.117*o-60.787*s+28.679*l))-.067*Math.sin(M*(263.6238+381403.5993*e-228.841*o-23.199*s+10.941*l))+.055*Math.sin(M*(21.6203-10821247597e-4*e-605.023*o-78.757*s+37.246*l))+.055*Math.sin(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))-.054*Math.sin(M*(8.7216+15894779094e-4*e-702.824*o-67.766*s+31.939*l))-.052*Math.sin(M*(179.8536+19087954705e-4*e+359.881*o+57.39*s-27.189*l))-.05*Math.sin(M*(98.7948+635080.1741*e-882.765*o-96.461*s+45.533*l))-.049*Math.sin(M*(128.6604-95795.2683*e-318.812*o-37.547*s+17.738*l))-.047*Math.sin(M*(17.3544+425341.6552*e-370.57*o-39.946*s+18.854*l))-.044*Math.sin(M*(160.4159+4067.2942*e-107.806*o-12.475*s+5.913*l))-.043*Math.sin(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))+.042*Math.sin(M*(270.4555+11401435037e-4*e-578.718*o-57.123*s+26.911*l))-.042*Math.sin(M*(132.4925+513197.9179*e+88.434*o+14.388*s-6.797*l))-.041*Math.sin(M*(122.3573-668789.4043*e-727.594*o-89.441*s+42.274*l))-.04*Math.sin(M*(105.6788+341337.2548*e-119.499*o-10.765*s+5.028*l))+.038*Math.sin(M*(135.4921+662944.6361*e-668.688*o-71.47*s+33.708*l))-.037*Math.sin(M*(242.391-51857.2124*e-460.54*o-54.293*s+25.652*l))+.036*Math.sin(M*(336.4374+13038695784e-4*e-155.171*o-7.02*s+3.259*l))+.035*Math.sin(M*(223.0943-255454.0489*e-850.164*o-100.124*s+47.302*l))-.034*Math.sin(M*(193.2811-577061.4302*e-300.976*o-39.419*s+18.623*l))+.031*Math.sin(M*(87.6023-918398.685*e-181.476*o-28.654*s+13.594*l)),k=2.4*Math.sin(M*(103.2+377336.3*e)),w=83.353+4069.0137*e-103.238*o-12.492*s+5.263*l+g+.001*e*k,D=-1.4979*Math.sin(M*(49.1562-75869.812*e+35.458*o+4.231*s-2.001*l))-.15*Math.sin(M*(357.5291+35999.0503*e-1.536*o+.041*s+0*l))-.1226*Math.sin(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))+.1176*Math.sin(M*(186.5442+966404.0351*e-68.058*o-.567*s+.232*l))-.0801*Math.sin(M*(83.3826-12006.2998*e+247.999*o+29.262*s-13.826*l))-.0616*Math.sin(M*(51.6271-111868.8623*e+36.994*o+4.19*s-2.001*l))+.049*Math.sin(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))+.0409*Math.sin(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))+.0327*Math.sin(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))+.0324*Math.sin(M*(46.6853-39870.7617*e+33.922*o+4.272*s-2.001*l))+.0196*Math.sin(M*(98.3124-151739.624*e+70.916*o+8.462*s-4.001*l))+.018*Math.sin(M*(274.1928-553068.6797*e-54.513*o-10.116*s+4.797*l))+.015*Math.sin(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l))-.015*Math.sin(M*(184.1196+401329.0556*e+125.428*o+18.579*s-8.798*l))-.0078*Math.sin(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))-.0045*Math.sin(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))+.0044*Math.sin(M*(321.5076+14436029027e-4*e+21.912*o+13.78*s-6.566*l))-.0042*Math.sin(M*(162.8868-31931.7561*e-106.271*o-12.516*s+5.913*l))-.0031*Math.sin(M*(170.9849-930404.9848*e+66.523*o+.608*s-.232*l))+.0031*Math.sin(M*(103.2079+377336.3051*e-121.035*o-10.724*s+5.028*l))+.0029*Math.sin(M*(222.612-10422738471e-4*e+103.516*o+4.798*s-2.232*l))+.0028*Math.sin(M*(184.0733+10024030853e-4*e-69.594*o-.526*s+.232*l)),F=25.9*Math.sin(M*(125-1934.1*e))-4.3*Math.sin(M*(220.2-1935.5*e)),U=.38*Math.sin(M*(357.5+35999.1*e)),K=125.0446-1934.13618*e+20.762*o+2.139*s-1.65*l+D+.001*(F+U*e),et=-.92581*Math.sin(M*(235.7004+890534.223*e-32.601*o+3.664*s-1.769*l))+.33262*Math.sin(M*(100.737+413335.3554*e-122.571*o-10.684*s+5.028*l))-.18402*Math.sin(M*(357.5291+35999.0503*e-1.536*o+.041*s+0*l))+.11007*Math.sin(M*(134.9634+477198.8676*e+89.97*o+14.348*s-6.797*l))-.06055*Math.sin(M*(238.1713+854535.1727*e-31.065*o+3.623*s-1.769*l))+.04741*Math.sin(M*(325.7736-63863.5122*e-212.541*o-25.031*s+11.826*l))-.03086*Math.sin(M*(10.6638+13677330907e-4*e+57.37*o+18.011*s-8.566*l))+.02184*Math.sin(M*(103.2079+377336.3051*e-121.035*o-10.724*s+5.028*l))+.01645*Math.sin(M*(49.1562-75869.812*e+35.458*o+4.231*s-2.001*l))+.01022*Math.sin(M*(233.2295+926533.2733*e-34.136*o+3.705*s-1.769*l))-.00756*Math.sin(M*(336.4374+13038695784e-4*e-155.171*o-7.02*s+3.259*l))-.0053*Math.sin(M*(222.5657-441199.8173*e-91.506*o-14.307*s+6.797*l))-.00496*Math.sin(M*(162.8868-31931.7561*e-106.271*o-12.516*s+5.913*l))-.00472*Math.sin(M*(297.8502+445267.1115*e-16.3*o+1.832*s-.884*l))-.00271*Math.sin(M*(240.6422+818536.1225*e-29.529*o+3.582*s-1.769*l))+.00264*Math.sin(M*(132.4925+513197.9179*e+88.434*o+14.388*s-6.797*l))-.00254*Math.sin(M*(186.5442+966404.0351*e-68.058*o-.567*s+.232*l))+.00234*Math.sin(M*(269.9268+954397.7353*e+179.941*o+28.695*s-13.594*l))-.0022*Math.sin(M*(13.1347+13317340404e-4*e+58.906*o+17.971*s-8.566*l))-.00202*Math.sin(M*(355.0582+71998.1006*e-3.072*o+.082*s+0*l))+.00167*Math.sin(M*(328.2445-99862.5625*e-211.005*o-25.072*s+11.826*l))-.00143*Math.sin(M*(173.5506+13358013346e-4*e-48.901*o+5.496*s-2.653*l))-.00121*Math.sin(M*(98.2661+449334.4057*e-124.107*o-10.643*s+5.028*l))-.00116*Math.sin(M*(145.6272+18449319583e-4*e+147.34*o+32.359*s-15.363*l))+.00102*Math.sin(M*(105.6788+341337.2548*e-119.499*o-10.765*s+5.028*l))-9e-4*Math.sin(M*(184.1196+401329.0556*e+125.428*o+18.579*s-8.798*l))-86e-5*Math.sin(M*(338.9083+12678705281e-4*e-153.636*o-7.061*s+3.259*l))-78e-5*Math.sin(M*(111.4008+17810684461e-4*e-65.201*o+7.328*s-3.538*l))+69e-5*Math.sin(M*(323.3027-27864.4619*e-214.077*o-24.99*s+11.826*l))+66e-5*Math.sin(M*(51.6271-111868.8623*e+36.994*o+4.19*s-2.001*l))+65e-5*Math.sin(M*(38.5872+858602.4669*e-138.871*o-8.852*s+4.144*l))-6e-4*Math.sin(M*(83.3826-12006.2998*e+247.999*o+29.262*s-13.826*l))+54e-5*Math.sin(M*(201.474+826670.7108*e-245.142*o-21.367*s+10.057*l))-52e-5*Math.sin(M*(308.4192-489205.1674*e+158.029*o+14.915*s-7.029*l))+48e-5*Math.sin(M*(8.1929+1403732141e-3*e+55.834*o+18.052*s-8.566*l))-41e-5*Math.sin(M*(46.6853-39870.7617*e+33.922*o+4.272*s-2.001*l))-33e-5*Math.sin(M*(274.1928-553068.6797*e-54.513*o-10.116*s+4.797*l))+3e-4*Math.sin(M*(160.4159+4067.2942*e-107.806*o-12.475*s+5.913*l)),P=3.96*Math.sin(M*(119.7+131.8*e))+1.96*Math.sin(M*(125-1934.1*e)),S=.463*Math.sin(M*(357.5+35999.1*e))+.152*Math.sin(M*(238.2+854535.2*e))-.071*Math.sin(M*(27.8+131.8*e))-.055*Math.sin(M*(103.2+377336.3*e))-.026*Math.sin(M*(233.2+926533.3*e)),N=14*Math.sin(M*(357.5+35999.1*e))+5*Math.sin(M*(238.2+854535.2*e)),Y=218.31665+481267.88134*e-13.268*o+1.856*s-1.534*l+et+.001*(P+S*e+N*o);return t.a=c,t.e=h,t.i=2*Math.asin(b),t.w=Te.normalize(M*(w-K)),t.N=Te.normalize(M*K),t.M=Te.normalize(M*(Y-w)),t},corr:function(t,e){return t.age=Te.normalize(t.l-e.l+Math.PI),t.phase=.5*(1-Math.cos(t.age)),t}};var Mg={sol:.0002959122082855911,mer:0x95955473dbc3,ven:0x89d9374048629,ter:0xa923c08a47948,lun:36599199229256,mar:319711652803400,cer:467549107200,ves:129071530155,jup:945905718740635e3,sat:283224952705891e3,ura:0x99ad2c4e2f7f70,nep:0xb54f848fd74430,plu:7327611364884,eri:827117568e4},bg={sol:"\u2609",mer:"\u263F",ven:"\u2640",ter:"\u2295",lun:"\u25CF",mar:"\u2642",cer:"\u26B3",ves:"\u26B6",jup:"\u2643",sat:"\u2644",ura:"\u2645",nep:"\u2646",plu:"\u2647",eri:"\u26AA"},Za=23.43928*M,Rc=Math.sin(Za),Tc=Math.cos(Za),_l=["a","e","i","w","M","L","W","N","n","ep","ref","lecl","becl","Tilt"],Sg=function(){var t=Mg.sol,e="sol",r={},n={},a,i,o;function s(P){return l(P),a==="sol"?(n.ephemeris.x=0,n.ephemeris.y=0,n.ephemeris.z=0,n.ephemeris.mag=-6,s):(f(),s)}var l=function(P){var S,N=n.ephemeris={};P&&(P instanceof Date?S=new Date(P.valueOf()):S=zl(P)),S||(S=new Date),N.jd=D(S),S=zl(r.ep),S||(S=zl("2000-01-01")),N.jd0=D(S),N.d=N.jd-N.jd0,N.cy=N.d/36525},f=function(){var P,S=n.ephemeris;if(a==="lun"){if(S=K(S),!S)return}else{for(var N=0;N<_l.length;N++)P=_l[N],B(r,P)&&(B(r,"d"+P)?S[P]=r[P]+r["d"+P]*S.cy:B(r,P)&&(S[P]=r[P]));B(S,"M")&&!B(S,"dM")&&B(S,"n")&&(S.M+=S.n*S.d)}m(),p(),b()};s.cartesian=function(){return n},s.spherical=function(){return g(),n},s.equatorial=function(P){return d(P),n},s.transpose=function(){return h(n),n},s.elements=function(P){var S;if(!arguments.length||arguments[0]===void 0)return s;for(var N=0;N<_l.length;N++)S=_l[N],B(P,S)&&(r[S]=P[S],S==="a"||S==="e"?r[S]*=1:S!=="ref"&&S!=="ep"&&(r[S]*=M),B(P,"d"+S)&&(S="d"+S,r[S]=P[S],S==="da"||S==="de"?r[S]*=1:r[S]*=M));return s},s.params=function(P){if(!arguments.length)return s;for(var S in P)B(P,S)&&P[S]!=="elements"&&(n[S]=P[S]);return s},s.parentBody=function(P){return arguments.length?(e=P,t=Mg[e],s):e},s.id=function(P){return arguments.length?(a=P,o=bg[P],s):a},s.Name=function(P){return arguments.length?(i=P,s):i},s.symbol=function(P){return arguments.length?(o=bg[P],s):o};function u(P,S){for(var N=S>1?P*P:-P*P,Y=S*N*P/6,x=(1-S)*P-Y,v=4;Math.abs(Y)>1e-15;)Y*=N/(v*(v+1)),x-=Y,v+=2;return x}function c(){var P=n.ephemeris,S,N,Y,x,v=P.e,z=P.M,V=1e-8,j=0,Z=1.9,G=!1,at=0;if(!z)return 0;if(v<1&&((z<-Math.PI||z>Math.PI)&&(x=Te.normalize0(z),j=z-x,z=x),v<.9)){S=Math.atan2(Math.sin(z),Math.cos(z)-v);do N=(S-v*Math.sin(S)-z)/(1-v*Math.cos(S)),S-=N;while(Math.abs(N)>V);return S}if(z<0&&(z=-z,G=!0),S=z,V=V*Math.abs(1-v),V<1e-15&&(V=1e-15),(v>.8&&z<Math.PI/3||v>1)&&(Y=z/Math.abs(1-v),Y*Y>6*Math.abs(1-v)&&(z<Math.PI?Y=Math.pow(6*z,1/3):Y=Te.asinh(z/v)),S=Y),v>1&&z>4&&(S=Math.log(z)),v<1)for(;Math.abs(Z)>V;)at++>8?N=u(S,v)-z:N=S-v*Math.sin(S)-z,Z=-N/(1-v*Math.cos(S)),S+=Z;else for(;Math.abs(Z)>V;)at++>7?N=-u(S,v)-z:N=v*Te.sinh(S)-S-z,Z=-N/(v*Te.cosh(S)-1),S+=Z;return G?j-S:j+S}function p(){var P,S,N,Y,x,v=n.ephemeris;v.e===1?(x=v.jd0-v.T,Y=v.w0*x*.5,S=Math.pow(Y+Math.sqrt(Y*Y+1),1/3),v.v=2*Math.atan(S-1/S)):(v.E=c(),v.e>1?(P=v.e-Te.cosh(v.E),S=Te.sinh(v.E)):(P=Math.cos(v.E)-v.e,S=Math.sin(v.E)),S*=Math.sqrt(Math.abs(1-v.e*v.e)),v.v=Math.atan2(S,P)),N=v.q*(1+v.e),v.r=N/(1+v.e*Math.cos(v.v))}function m(){var P=n.ephemeris;P.hasOwnProperty("w")||(P.w=P.W-P.N),P.hasOwnProperty("M")||(P.M=P.L-P.W),P.e<1&&(P.M=Te.normalize0(P.M)),P.P=yr*Math.sqrt(Math.pow(P.a,3)/t)/365.25,P.T=P.jd0-P.M/xr/P.P,P.e!==1?(P.q=P.a*(1-P.e),P.t0=P.a*Math.sqrt(Math.abs(P.a)/t)):(P.w0=3/Math.sqrt(2)/(P.q*Math.sqrt(P.q/t)),P.a=0,P.t0=0),P.am=Math.sqrt(t*P.q*(1+P.e))}function h(){var P=n.ephemeris;if(!P.ref||P.ref==="ecl"){P.tx=P.x,P.ty=P.y,P.tz=P.z;return}var S=P.lecl,N=Math.PI/2-P.becl,Y=[0,N,-S];var x=Te.cartesian([P.tl,P.tb,P.r]);P.tx=x.x,P.ty=x.y,P.tz=x.z}function d(P){var S=n.ephemeris,N=P.ephemeris;Za=(23.439292-.0130042*S.cy-1667e-10*S.cy*S.cy+5028e-10*S.cy*S.cy*S.cy)*M,Rc=Math.sin(Za),Tc=Math.cos(Za);var Y=a==="lun"?{x:0,y:0,z:0}:{x:N.x,y:N.y,z:N.z};S.xeq=S.x-Y.x,S.yeq=(S.y-Y.y)*Tc-(S.z-Y.z)*Rc,S.zeq=(S.y-Y.y)*Rc+(S.z-Y.z)*Tc,S.ra=Te.normalize(Math.atan2(S.yeq,S.xeq)),S.dec=Math.atan2(S.zeq,Math.sqrt(S.xeq*S.xeq+S.yeq*S.yeq)),a==="lun"&&(S=et(S,N)),S.pos=[S.ra/M,S.dec/M],S.rt=Math.sqrt(S.xeq*S.xeq+S.yeq*S.yeq+S.zeq*S.zeq),a!=="sol"&&(S.mag=y())}function y(){var P=n.ephemeris,S=P.r,N=P.rt,Y=Math.acos((S*S+N*N-1)/(2*S*N)),x=.666*((1-Y/Math.PI)*Math.cos(Y)+1/Math.PI*Math.sin(Y)),v=n.H*1+5*Math.log(S*N)*Math.LOG10E-2.5*Math.log(x)*Math.LOG10E;return v}function b(){var P=n.ephemeris,S=P.v+P.w;return P.x=P.r*(Math.cos(P.N)*Math.cos(S)-Math.sin(P.N)*Math.sin(S)*Math.cos(P.i)),P.y=P.r*(Math.sin(P.N)*Math.cos(S)+Math.cos(P.N)*Math.sin(S)*Math.cos(P.i)),P.z=P.r*(Math.sin(S)*Math.sin(P.i)),n}function g(){var P=n.ephemeris,S=Math.atan2(P.y,P.x),N=Math.atan2(P.z,Math.sqrt(P.x*P.x+P.y*P.y));return P.l=Te.normalize(S),P.b=N,n}function k(P){}function w(P){var S=Math.cos(P.lat)*P.r;return P.x=S*Math.cos(P.lon),P.y=S*Math.sin(P.lon),P.z=P.r*Math.sin(P.lat),P}function D(P){var S=P.getUTCFullYear(),N=P.getUTCMonth()+1,Y=P.getUTCDate(),x=(P.getUTCHours()-12+P.getUTCMinutes()/60+P.getUTCSeconds()/3600)/24,v=-4799;if(S<v)return-1;var z=Math.floor((14-N)/12),V=S+4800-z,j=N+12*z-3,Z=Y+Math.floor((153*j+2)/5)+365*V+Math.floor(V/4)-Math.floor(V/100)+Math.floor(V/400)-32045;return Z+x}function F(P){var S=P||0;return(18.697374558+24.06570982441908*n.ephemeris.d)*15+S}function U(P){var S=298.257223563,N=6378.137,Y=P.h||0,x={},v=F(),z=Math.cos(P.lat),V=Math.sin(P.lat),j=1-1/S,Z=j*j,G=1/Math.sqrt(z*z+Z*V*V),at=N*G+Y,xt=N*Z*G+Y,Mt=Math.sqrt(at*at*z*z+xt*xt*V*V);x.lat=Math.acos(at*z/Mt),x.lon=P.lon,x.r=Y,P.lat<0&&(x.lat*=-1),w(x);var Rt=v*M;return x.x=x.x*Math.cos(Rt)-x.y*Math.sin(Rt),x.y=x.x*Math.sin(Rt)+x.y*Math.cos(Rt),x}function K(P){if(typeof Xa!="undefined")return Xa.elements(P)}function et(P,S){if(g(),typeof Xa!="undefined")return Xa.corr(P,S)}return s};function y5(t,e){return ur(t,Ke[e])}function Ne(t,e){if(e==="equatorial")return t;for(var r=Ke[e],n=t.features,a=0;a<n.length;a++)n[a].geometry.coordinates=x5(n[a],r);return t}function kg(t,e){var r=[];for(var n in t)if(B(t,n)&&e.cfg.planets.which.indexOf(n)!==-1){var a=Sg().id(n);B(t[n],"parent")&&a.parentBody(t[n].parent),a.elements(t[n].elements[0]).params(t[n]),n==="ter"?st.origin=a:r.push(a)}return r}function Qa(t,e,r){if(e=e||st.date(),!!st.origin){var n=st.origin(e).spherical(),a;return r.container.selectAll(".planet").each(function(i){t===i.id()&&(a=i(e).equatorial(n))}),a}}function Rg(t){for(var e={},r=t.features,n=0;n<r.length;n++)e[r[n].id]={center:r[n].properties.display.slice(0,2),scale:r[n].properties.display[2]};return e}function Al(t){var e={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[]}}]},r=t.features[0].geometry.coordinates[0];e.features[0].geometry.coordinates[0]=[];for(var n=0;n<r.length;n++)e.features[0].geometry.coordinates[0][n]=r[n].slice().reverse();return e}function x5(t,e){var r=[];switch(t.geometry.type){case"Point":r=ur(t.geometry.coordinates,e);break;case"LineString":r.push(Ec(t.geometry.coordinates,e));break;case"MultiLineString":r=Pg(t.geometry.coordinates,e);break;case"Polygon":r.push(Ec(t.geometry.coordinates[0],e));break;case"MultiPolygon":r.push(Pg(t.geometry.coordinates[0],e));break}return r}function Vo(t,e,r){var n=[];if(!e)return[];ee(e)||(e=[e]);for(var a=0;a<e.length;a++)switch(e[a]){case"center":t==="lat"?n=n.concat(xn(t,r.cfg.center[0],"N")):n=n.concat(xn(t,r.cfg.center[1],"S"));break;case"outline":t==="lon"?(n=n.concat(xn(t,r.cfg.center[1]-89.99,"S")),n=n.concat(xn(t,r.cfg.center[1]+89.99,"N"))):(n=n.concat(xn(t,r.cfg.center[0]-179.99,"E")),n=n.concat(xn(t,r.cfg.center[0]+179.99,"W")));break;default:if(re(e[a])){t==="lat"?n=n.concat(xn(t,e[a],"N")):n=n.concat(xn(t,e[a],"S"));break}}return w5(n)}function w5(t){for(var e=[],r=0;r<t.length;r++){var n={type:"Feature",id:r,properties:{},geometry:{type:"Point"}};n.properties.value=t[r].value,n.properties.orientation=t[r].orientation,n.geometry.coordinates=t[r].coordinates,e.push(n)}return e}function xn(t,e,r){var n,a,i,o,s,l=t,f=[],u=e;sky.cfg.transform==="equatorial"&&l==="lon"&&(l="ra"),l==="ra"?(n=0,a=23,i=1):l==="lon"?(n=0,a=350,i=10):(n=-80,a=80,i=10);for(var c=n;c<=a;c+=i){var p=r;l==="lat"?(s=[u,c],o=c.toString()+"\xB0",c<0?p+="S":p+="N"):l==="ra"?(s=[c*15,u],o=c.toString()+"\u02B0"):(s=[c,u],o=c.toString()+"\xB0"),f.push({coordinates:s,value:o,orientation:p})}return f}function Ec(t,e){for(var r=[],n=0;n<t.length;n++)r.push(ur(t[n],e));return r}function Pg(t,e){for(var r=[],n=0;n<t.length;n++)r.push(Ec(t[n],e));return r}st.getData=Ne;st.getPoint=y5;st.getPlanet=Qa;function Ka(t,e,r){var n=dt("body").append("div").attr("id","d3-celestial-svg").attr("style","display: none"),a=dt("#d3-celestial-svg").append("svg"),i=st.metrics(),o=t.cfg,s=o.datapath,l=Xr[o.projection],f=Zr(o.center),u=[-f[0],-f[1]],c=l.scale*i.width/1024,p=st.projection(o.projection).rotate(f).translate([i.width/2,i.height/2]).scale([i.scale]),m=o.adaptable?Math.sqrt(i.scale/c):1,h=o.culture!==""&&o.culture!=="iau"?o.culture:"",d,y;a.selectAll("*").remove();var b=a.append("defs");l.clip&&p.clipAngle(90),p.clipExtent([[0,0],[i.width,i.height]]),d=je().radius(179.95).center(u),a.attr("width",i.width).attr("height",i.height);for(var g=["background","milkyWay","milkyWayBg","gridLines","constBoundaries","planesequatorial","planesecliptic","planesgalactic","planessupergalactic","constLines","mapBorder","stars","dsos","planets","gridvaluesLon","gridvaluesLat","constNames","starDesignations","starNames","dsoNames","planetNames","horizon","daylight"],k={},w={},D=0;D<g.length;D++)k[g[D]]=wr(a.append("g"),{id:g[D],":inkscape:groupmode":"layer",":inkscape:label":g[D]}),w[g[D]]={};var F=Or().stepMinor([15,10]),U=En().projection(p),K=gg(2);if(k.background.append("path").datum(d).attr("class","background").attr("d",U),w.background.fill=o.background.fill,o.lines.graticule.show){if(o.transform==="equatorial"?(k.gridLines.append("path").datum(F).attr("class","gridLines").attr("d",U),w.gridLines=v(o.lines.graticule)):(st.graticule(k.gridLines,U,o.transform),w.gridLines=v(o.lines.graticule)),B(o.lines.graticule,"lon")&&o.lines.graticule.lon.pos.length>0){var et={type:"FeatureCollection",features:Vo("lon",o.lines.graticule.lon.pos,t)};k.gridvaluesLon.selectAll(".gridvalues_lon").data(et.features).enter().append("text").attr("transform",function(L,X){return Y(L.geometry.coordinates)}).text(function(L){return L.properties.value}).call(function(L){wr(L,{dy:".5em",dx:"-.75em",class:"gridvaluesLon"})}),w.gridvaluesLon=z(o.lines.graticule.lon)}if(B(o.lines.graticule,"lat")&&o.lines.graticule.lat.pos.length>0){var P={type:"FeatureCollection",features:Vo("lat",o.lines.graticule.lat.pos,t)};k.gridvaluesLat.selectAll(".gridvalues_lat").data(P.features).enter().append("text").attr("transform",function(L,X){return Y(L.geometry.coordinates)}).text(function(L){return L.properties.value}).call(function(L){wr(L,{dy:"-.5em",dx:"-.75em",class:"gridvaluesLat"})}),w.gridvaluesLat=z(o.lines.graticule.lat)}}for(var S in o.lines)B(o.lines,S)&&S!="graticule"&&o.lines[S].show!==!1&&(y="planes"+S,k[y].append("path").datum(je().radius(90).center(Wo[S])).attr("class",y).attr("d",U),w[y]=v(o.lines[S]));o.mw.show&&K.defer(function(L){se(s+"mw.json",function(X,gt){X&&L(X);var St=Ne(gt,o.transform),ft=Al(St);k.milkyWay.selectAll(".mway").data(St.features).enter().append("path").attr("class","milkyWay").attr("d",U),w.milkyWay=v(o.mw.style),(!B(o.background,"opacity")||o.background.opacity>.95)&&(k.milkyWayBg.selectAll(".mwaybg").data(ft.features).enter().append("path").attr("class","milkyWayBg").attr("d",U),w.milkyWayBg={fill:o.background.fill,"fill-opacity":o.background.opacity}),L(null)})}),o.constellations.bounds&&K.defer(function(L){se(s+x("constellations","borders"),function(X,gt){X&&L(X);var St=Ne(gt,o.transform);if(st.constellation)var ft=new RegExp("\\b"+st.constellation+"\\b");k.constBoundaries.selectAll(".bounds").data(St.features).enter().append("path").attr("class",function(Jt){return st.constellation&&Jt.ids.search(ft)!==-1?"constBoundariesSel":"constBoundaries"}).attr("d",U),w.constBoundaries=v(o.constellations.boundStyle),w.constBoundariesSel={fill:"none",stroke:o.constellations.boundStyle.stroke,"stroke-width":o.constellations.boundStyle.width*1.5,"stroke-opacity":1,"stroke-dasharray":"none"},L(null)})}),o.constellations.lines&&K.defer(function(L){se(s+x("constellations","lines"),function(X,gt){X&&L(X);var St=Ne(gt,o.transform);k.constLines.selectAll(".lines").data(St.features).enter().append("path").attr("class",function(Jt){return"constLines"+Jt.properties.rank}).attr("d",U);var ft=B(o.constellations.lineStyle,"dash")?o.constellations.lineStyle.dash.join(" "):"none";w.constLines1={fill:"none",stroke:o.constellations.lineStyle.stroke[0],"stroke-width":o.constellations.lineStyle.width[0],"stroke-opacity":o.constellations.lineStyle.opacity[0],"stroke-dasharray":ft},w.constLines2={fill:"none",stroke:o.constellations.lineStyle.stroke[1],"stroke-width":o.constellations.lineStyle.width[1],"stroke-opacity":o.constellations.lineStyle.opacity[1],"stroke-dasharray":ft},w.constLines3={fill:"none",stroke:o.constellations.lineStyle.stroke[2],"stroke-width":o.constellations.lineStyle.width[2],"stroke-opacity":o.constellations.lineStyle.opacity[2],"stroke-dasharray":ft},L(null)})}),K.defer(function(L){var X=p.rotate();p.rotate([0,0,0]),k.mapBorder.append("path").datum(F.outline).attr("class","mapBorder").attr("d",U),w.mapBorder={fill:"none",stroke:o.background.stroke,"stroke-width":o.background.width,"stroke-opacity":1,"stroke-dasharray":"none"},p.rotate(X),L(null)}),o.constellations.names&&K.defer(function(L){se(s+x("constellations"),function(X,gt){X&&L(X);var St=Ne(gt,o.transform);k.constNames.selectAll(".constnames").data(St.features.filter(function(ft){return N(ft.geometry.coordinates)===1})).enter().append("text").attr("class",function(ft){return"constNames"+ft.properties.rank}).attr("transform",function(ft,Jt){return Y(ft.geometry.coordinates)}).text(function(ft){return wt(ft)}),w.constNames1={fill:o.constellations.nameStyle.fill[0],"fill-opacity":o.constellations.nameStyle.opacity[0],font:o.constellations.nameStyle.font[0],"text-anchor":G(o.constellations.nameStyle.align)},w.constNames2={fill:o.constellations.nameStyle.fill[1],"fill-opacity":o.constellations.nameStyle.opacity[1],font:o.constellations.nameStyle.font[1],"text-anchor":G(o.constellations.nameStyle.align)},w.constNames3={fill:o.constellations.nameStyle.fill[2],"fill-opacity":o.constellations.nameStyle.opacity[2],font:o.constellations.nameStyle.font[2],"text-anchor":G(o.constellations.nameStyle.align)},L(null)})}),o.stars.show&&K.defer(function(L){se(s+o.stars.data,function(X,gt){X&&L(X);var St=Ne(gt,o.transform);k.stars.selectAll(".stars").data(St.features.filter(function(Nt){return Nt.properties.mag<=o.stars.limit})).enter().append("path").attr("class",function(Nt){return"stars"+rt(Nt.properties.bv)}).attr("d",U.pointRadius(function(Nt){return Nt.properties?nt(Nt.properties.mag):1})),w.stars=v(o.stars.style);var ft=Va.domain(),Jt=Math.min(ft[0],ft[1]),ht=Math.max(ft[0],ft[1]);for(D=qr(Jt,1);D<=qr(ht,1);D+=.1)w["stars"+Math.round(D*10).toString()]={fill:Va(D)};o.stars.designation&&(k.starDesignations.selectAll(".stardesigs").data(St.features.filter(function(Nt){return Nt.properties.mag<=o.stars.designationLimit*m&&N(Nt.geometry.coordinates)===1})).enter().append("text").attr("transform",function(Nt){return Y(Nt.geometry.coordinates)}).text(function(Nt){return W(Nt.id)}).call(function(Nt){wr(Nt,{dy:".85em",dx:".35em",class:"starDesignations"})}),w.starDesignations=z(o.stars.designationStyle)),o.stars.propername&&(k.starNames.selectAll(".starnames").data(St.features.filter(function(Nt){return Nt.properties.mag<=o.stars.propernameLimit*m&&N(Nt.geometry.coordinates)===1})).enter().append("text").attr("transform",function(Nt){return Y(Nt.geometry.coordinates)}).text(function(Nt){return _(Nt.id)}).call(function(Nt){wr(Nt,{dy:"-.5em",dx:"-.35em",class:"starNames"})}),w.starNames=z(o.stars.propernameStyle)),L(null)})}),o.dsos.show&&K.defer(function(L){se(s+o.dsos.data,function(X,gt){X&&L(X);var St=Ne(gt,o.transform);k.dsos.selectAll(".dsos").data(St.features.filter(function(ft){return N(ft.geometry.coordinates)===1&&(ft.properties.mag===999&&Math.sqrt(parseInt(ft.properties.dim))>o.dsos.limit*m||ft.properties.mag!==999&&ft.properties.mag<=o.dsos.limit)})).enter().append("path").attr("class",function(ft){return"dsos"+ft.properties.type}).attr("transform",function(ft){return Y(ft.geometry.coordinates)}).attr("d",function(ft){return at(ft.properties)}),w.dsos=v(o.dsos.style);for(S in o.dsos.symbols)B(o.dsos.symbols,S)&&(y="dsos"+S,w[y]={"fill-opacity":o.dsos.style.opacity,"stroke-opacity":o.dsos.style.opacity},B(o.dsos.symbols[S],"stroke")?(w[y].fill="none",w[y].stroke=o.dsos.colors?o.dsos.symbols[S].stroke:o.dsos.style.stroke,w[y]["stroke-width"]=o.dsos.colors?o.dsos.symbols[S].width:o.dsos.style.width):(w[y].stroke="none",w[y].fill=o.dsos.colors?o.dsos.symbols[S].fill:o.dsos.style.fill));if(o.dsos.names){k.dsoNames.selectAll(".dsonames").data(St.features.filter(function(ft){return N(ft.geometry.coordinates)===1&&(ft.properties.mag==999&&Math.sqrt(parseInt(ft.properties.dim))>o.dsos.nameLimit||ft.properties.mag!=999&&ft.properties.mag<=o.dsos.nameLimit)})).enter().append("text").attr("class",function(ft){return"dsoNames "+ft.properties.type}).attr("transform",function(ft){return Y(ft.geometry.coordinates)}).text(function(ft){return Rt(ft)}).call(function(ft){wr(ft,{dy:"-.5em",dx:".35em"})}),w.dsoNames={"fill-opacity":o.dsos.style.opacity,font:o.dsos.nameStyle.font,"text-anchor":G(o.dsos.nameStyle.align)};for(S in o.dsos.symbols)B(o.dsos.symbols,S)&&(w[S]={fill:o.dsos.colors?o.dsos.symbols[S].fill:o.dsos.style.fill})}L(null)})}),(o.location||o.formFields.location)&&o.planets.show&&st.origin&&K.defer(function(L){var X=st.date(),gt=st.origin(X).spherical(),St={type:"FeatureCollection",features:[]},ft={type:"FeatureCollection",features:[]};if(t.container.selectAll(".planet").each(function(ht){var Nt=ht.id(),no=12,cr=ht(X).equatorial(gt);cr.ephemeris.pos=ur(cr.ephemeris.pos,Ke[o.transform]),N(cr.ephemeris.pos)===1&&(Nt==="lun"?ft.features.push(At(cr)):St.features.push(At(cr)))}),o.planets.symbolType==="disk"?k.planets.selectAll(".planets").data(St.features).enter().append("path").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).attr("d",function(ht){var Nt=B(o.planets.symbols[ht.id],"size")?(o.planets.symbols[ht.id].size-1)*m:null;return J(ht.properties,Nt)}).attr("class",function(ht){return"planets "+ht.id}):k.planets.selectAll(".planets").data(St.features).enter().append("text").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).text(function(ht){return ht.properties.symbol}).attr("class",function(ht){return"planets "+ht.id}).call(function(ht){wr(ht,{dy:".35em"})}),ft.features.length>0)if(o.planets.symbolType==="letter")k.planets.selectAll(".moon").data(ft.features).enter().append("text").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).text(function(ht){return ht.properties.symbol}).attr("class",function(ht){return"planets "+ht.id}).call(function(ht){wr(ht,{dy:".35em"})});else{var Jt=B(o.planets.symbols.lun,"size")?(o.planets.symbols.lun.size-1)*m:11*m;k.planets.selectAll(".dmoon").data(ft.features).enter().append("path").attr("class","darkluna").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).attr("d",function(ht){return Gn().type(cn).size(Jt*Jt)()}),k.planets.selectAll(".moon").data(ft.features).enter().append("path").attr("class",function(ht){return"planets "+ht.id}).attr("transform",function(ht){return Y(ht.geometry.coordinates)}).attr("d",function(ht){return Et(ht.properties,Jt)})}w.planets=z(o.planets.symbolStyle),w.planets.font=le(o.planets.symbolStyle.font),w.darkluna={fill:"#557"};for(S in o.planets.symbols)B(o.planets.symbols,S)&&(w[S]={fill:o.planets.symbols[S].fill});o.planets.names&&(k.planetNames.selectAll(".planetnames").data(St.features).enter().append("text").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).text(function(ht){return ht.properties.name}).call(function(ht){wr(ht,{dy:".85em",dx:"-.35em"})}).attr("class",function(ht){return"planetNames "+ht.id}),ft.features.length>0&&k.planetNames.selectAll(".moonname").data(ft.features).enter().append("text").attr("transform",function(ht){return Y(ht.geometry.coordinates)}).text(function(ht){return ht.properties.name}).call(function(ht){wr(ht,{dy:".85em",dx:"-.35em"})}).attr("class",function(ht){return"planetNames "+ht.id})),w.planetNames=z(o.planets.nameStyle),L(null)}),(o.location||o.formFields.location)&&o.daylight.show&&l.clip&&K.defer(function(L){var X=Qa("sol",void 0,t);if(X){var gt=st.zenith(),St=X.ephemeris.pos,ft=qe(gt,St),Jt=p(St),ht=je().radius(179.95).center(St);k.daylight.append("path").datum(ht).attr("class","daylight").attr("d",U),w.daylight=j(ft,Jt),N(St)===1&&ft<xr&&k.daylight.append("circle").attr("cx",Jt[0]).attr("cy",Jt[1]).attr("r",5).style("fill","#fff")}L(null)}),(o.location||o.formFields.location)&&o.horizon.show&&!l.clip&&K.defer(function(L){var X=je().radius(90).center(st.nadir());k.horizon.append("path").datum(X).attr("class","horizon").attr("d",U),w.horizon=v(o.horizon),L(null)}),st.data.length>0&&st.data.forEach(function(L){B(L,"save")&&K.defer(function(X){L.save(),X(null)})});function N(L){return l.clip&&qe(u,L)>xr?0:1}function Y(L){return"translate("+p(L)+")"}function x(L,X,gt){var St=B(Wt[L],h)?"."+h:"";return gt=gt?"."+gt:".json",X=X?"."+X:"",L+X+St+gt}function v(L){var X={};return X.fill=L.fill||"none",X["fill-opacity"]=L.opacity!==null?L.opacity:1,X.stroke=L.stroke||"none",X["stroke-width"]=L.width!==null?L.width:0,X["stroke-opacity"]=L.opacity!==null?L.opacity:1,B(L,"dash")?X["stroke-dasharray"]=L.dash.join(" "):X["stroke-dasharray"]="none",X.font=L.font||null,X}function z(L){var X={};return X.stroke="none",X.fill=L.fill||"none",X["fill-opacity"]=L.opacity!==null?L.opacity:1,X["text-anchor"]=G(L.align),X.font=L.font||null,X}function V(L,X){var gt={};return L=L||1,gt.fill=ee(X.fill)?X.fill[L-1]:null,gt["fill-opacity"]=ee(X.opacity)?X.opacity[L-1]:1,gt.stroke=ee(X.stroke)?X.stroke[L-1]:null,gt["stroke-width"]=ee(X.width)?X.width[L-1]:null,gt["stroke-opacity"]=ee(X.opacity)?X.opacity[L-1]:1,gt["text-anchor"]=G(X.align),gt.font=ee(X.font)?X.font[L-1]:null,gt}function j(L,X){var gt,St,ft,Jt,ht=1.36,Nt=1.885;if(L>Nt)return{fill:"transparent"};L<=ht?(St="#daf1fa",ft="#93d7f0",Jt="#57c0e8",gt=-(ht-L)/10):(gt=(L-ht)/(Nt-ht),St=gr("#daf1fa","#e8c866")(gt),ft=gr("#93c7d0","#ff854a")(gt),Jt=gr("#57b0c8","#6caae2")(gt));var no=k.daylight.append("radialGradient").attr("cx",X[0]).attr("cy",X[1]).attr("fr","0").attr("r","300").attr("id","skygradient").attr("gradientUnits","userSpaceOnUse");return no.append("stop").attr("offset","0").attr("stop-color",St),no.append("stop").attr("offset",.2+.4*gt).attr("stop-color",ft),no.append("stop").attr("offset","1").attr("stop-color",Jt),{fill:"url(#skygradient)","fill-opacity":Z(gt,1.4)}}function Z(L,X){return .9*(1-(Math.pow(Math.E,L*X)-1)/(Math.pow(Math.E,X)-1))}function G(L){return L?L==="center"?"middle":L==="right"?"end":"start":"start"}function at(L){var X=Mt(L.mag,L.dim)||9,gt=xt(L.type),St=b5(gt);return St?Gn().type(St).size(X)():Tg().type(gt).size(X)()}function xt(L){return!L||!B(o.dsos.symbols,L)?"circle":o.dsos.symbols[L].shape}function Mt(L,X){return!L||L===999?Math.pow(parseInt(X)*o.dsos.size*m/7,.5):Math.pow(2*o.dsos.size*m-L,o.dsos.exponent)}function Rt(L){var X=o.dsos.namesType,gt=L.id;return X==="desig"||!B(t.dsonames,gt)?L.properties.desig:B(t.dsonames[gt],X)?t.dsonames[gt][X]:L.properties.desig}function q(L){return o.dsos.colors===!0?v(o.dsos.symbols[L.type]):v(o.dsos.style)}function W(L){return B(t.starnames,L)?t.starnames[L][o.stars.designationType]:""}function _(L){var X=o.stars.propernameType;return B(t.starnames,L)?B(t.starnames[L],X)?t.starnames[L][X]:t.starnames[L].name:""}function nt(L){if(L===null)return .1;var X=o.stars.size*m*Math.exp(o.stars.exponent*(L+2));return Math.max(X,.1)}function rt(L){return!o.stars.colors||isNaN(L)?"":Math.round(L*10).toString()}function wt(L){return L.properties[o.constellations.namesType]}function Et(L,X){var gt=X?X*X:121;return Tg().type("crescent").size(gt).ratio(L.age)()}function J(L,X){var gt=X?X*X:jt(L.mag);return Gn().type(cn).size(gt)()}function le(L){var X=L.replace(/(^\D*)(\d+)(\D.+$)/i,"$2");return X=Math.round(m*X),L.replace(/(^\D*)(\d+)(\D.+$)/i,"$1"+X+"$3")}function jt(L){var X=L||2,gt=4*m*Math.exp(-.05*(X+2));return Math.max(gt,2)}function At(L){var X={type:"Feature",id:L.id,properties:{},geometry:{}};return X.properties.name=L[o.planets.namesType],(o.planets.symbolType==="symbol"||o.planets.symbolType==="letter")&&(X.properties.symbol=o.planets.symbols[X.id][o.planets.symbolType]),X.properties.mag=L.ephemeris.mag||10,X.id==="lun"&&(X.properties.age=L.ephemeris.age,X.properties.phase=L.ephemeris.phase),X.geometry.type="Point",X.geometry.coordinates=L.ephemeris.pos,X}function me(){var L="";for(var X in w)B(w,X)&&(L+=" ."+X+ue(w[X]));return`/*<![CDATA[*/
6
+ `+L+`
7
+ /*]]>*/`}function ue(L){var X=" {";for(var gt in L)B(L,gt)&&(X+=gt+":"+L[gt]+"; ");return X+"} "}K.await(function(L){if(L)throw L;var X=dt("#d3-celestial-svg svg").attr("title","D3-Celestial").attr("version",1.1).attr("encoding","UTF-8").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("xmlns:sodipodi","http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd").attr("xmlns:inkscape","http://www.inkscape.org/namespaces/inkscape").attr("viewBox"," 0 0 "+i.width+" "+i.height);if(b.append("style").attr("type","text/css").text(me()),r){var gt=new Blob([X.node().outerHTML],{type:"image/svg+xml;charset=utf-8"}),St=dt("body").append("a").node();St.download=r||"d3-celestial.svg",St.rel="noopener",St.href=URL.createObjectURL(gt),St.click(),dt(St).remove()}else e!==null&&e(X.node().outerHTML);dt("#d3-celestial-svg").remove()})}var M5=new Map(Object.entries({ellipse:function(t,e){var r=Math.sqrt(t),n=r*.666,a=r/3;return"M"+-n+","+-a+" m"+-n+",0 a"+n+","+a+" 0 1,0"+n*2+",0 a"+n+","+a+" 0 1,0"+-(n*2)+",0"},marker:function(t,e){var r=t>48?t/4:12,n=r/2,a=n-3;return"M "+-n+" 0 h "+a+" M 0 "+-n+" v "+a+" M "+n+" 0 h "+-a+" M 0 "+n+" v "+-a},"cross-circle":function(t,e){var r=Math.sqrt(t),n=r/2;return"M"+-n+","+-n+" m"+-n+",0 a"+n+","+n+" 0 1,0"+n*2+",0 a"+n+","+n+" 0 1,0"+-(n*2)+",0 M"+-n+" 0 h "+r+" M 0 "+-n+" v "+r},"stroke-circle":function(t,e){var r=Math.sqrt(t),n=r/2;return"M"+-n+","+-n+" m"+-n+",0 a"+n+","+n+" 0 1,0"+n*2+",0 a"+n+","+n+" 0 1,0"+-(n*2)+",0 M"+(-r-2)+","+(-r-2)+" l"+(r+4)+","+(r+4)},crescent:function(t,e){var r=Math.sqrt(t),n=r/2,a=.5*(1-Math.cos(e)),i=1.98*Math.abs(a-.5)+.01,o=e>Math.PI?0:1,s=Math.abs(a)>.5?o:Math.abs(o-1);return"M -1,-1 m 1,"+(-n+1)+" a"+n+","+n+" 0 1 "+o+" 0,"+n*2+" a"+n*i+","+n+" 0 1 "+s+" 0,"+-(n*2)+"z"}}));function b5(t){switch(t){case"circle":return cn;case"cross":return cs;case"diamond":return ps;case"square":return ms;case"star":return hs;case"wye":return gs;case"triangle":case"triangle-up":case"triangle-down":return ds;default:return null}}function Tg(){var t,e=64,r=Re(1);function n(a,i){return M5.get(t.call(this,a,i))(e.call(this,a,i),r.call(this,a,i))}return n.type=function(a){return arguments.length?(t=Re(a),n):t},n.size=function(a){return arguments.length?(e=Re(a),n):e},n.ratio=function(a){return arguments.length?(r=Re(a),n):r},n}st.exportSVG=function(t){t&&Ka(this&&this.cfg?this:st,t)};function Eg(t){var e=t.cfg,r=pe.set(e),n={"stars-show":["stars-limit","stars-colors","stars-style-fill","stars-designation","stars-propername","stars-size","stars-exponent"],"stars-designation":["stars-designationType","stars-designationLimit"],"stars-propername":["stars-propernameLimit","stars-propernameType"],"dsos-show":["dsos-limit","dsos-colors","dsos-style-fill","dsos-names","dsos-size","dsos-exponent"],"dsos-names":["dsos-namesType","dsos-nameLimit"],"mw-show":["mw-style-opacity","mw-style-fill"],"constellations-names":["constellations-namesType"],"planets-show":["planets-symbolType","planets-names"],"planets-names":["planets-namesType"]};function a(q){var W=q.id,_;switch(W){case"stars-show":_=!p(W).checked;for(var nt=0;nt<n[W].length;nt++)i(n[W][nt],_);case"stars-designation":for(_=!p("stars-designation").checked||!p("stars-show").checked,nt=0;nt<n["stars-designation"].length;nt++)i(n["stars-designation"][nt],_);case"stars-propername":for(_=!p("stars-propername").checked||!p("stars-show").checked,nt=0;nt<n["stars-propername"].length;nt++)i(n["stars-propername"][nt],_);break;case"dsos-show":for(_=!p(W).checked,nt=0;nt<n[W].length;nt++)i(n[W][nt],_);case"dsos-names":for(_=!p("dsos-names").checked||!p("dsos-show").checked,nt=0;nt<n["dsos-names"].length;nt++)i(n["dsos-names"][nt],_);break;case"planets-show":for(_=!p(W).checked,nt=0;nt<n[W].length;nt++)i(n[W][nt],_);case"planets-names":for(_=!p("planets-names").checked||!p("planets-show").checked,nt=0;nt<n["planets-names"].length;nt++)i(n["planets-names"][nt],_);break;case"constellations-names":case"mw-show":for(_=!p(W).checked,nt=0;nt<n[W].length;nt++)i(n[W][nt],_);break}}function i(q,W){var _=p(q);_&&(_.disabled=W,_.style.color=W?"#999":"#000",_.previousSibling.style.color=W?"#999":"#000")}function o(q,W){var _=p("centerx");return _?(W&&(q==="equatorial"&&W!=="equatorial"?(_.value=(_.value/15).toFixed(1),_.value<0&&(_.value+=24)):q!=="equatorial"&&W==="equatorial"&&(_.value=(_.value*15).toFixed(1),_.value>180&&(_.value-=360))),q==="equatorial"?(_.min="0",_.max="24",p("cxunit").innerHTML="h"):(_.min="-180",_.max="180",p("cxunit").innerHTML="\xB0"),_.value):null}function s(q,W){var _=p("centerx"),nt=p("centery"),rt=p("centerz");!_||!nt||((q===null||q.length<1)&&(q=[0,0,0]),(q.length<=2||q[2]===void 0)&&(q[2]=0),W!=="equatorial"?_.value=q[0].toFixed(1):_.value=q[0]<0?(q[0]/15+24).toFixed(1):(q[0]/15).toFixed(1),nt.value=q[1].toFixed(1),rt.value=q[2]!==null?q[2].toFixed(1):0,pe.set({center:q}))}function l(){var q,W=/\d+(\.\d+)?/g,_,nt,rt={s:6,d:6},wt=st.settings();return nt=wt.dsos.data,q=nt.match(W),q!==null&&(rt.d=parseFloat(q[q.length-1])),rt.d!==6&&(p("dsos-limit").max=rt.d,p("dsos-nameLimit").max=rt.d),_=wt.stars.data,q=_.match(W),q!==null&&(rt.s=parseFloat(q[q.length-1])),rt.s!=6&&(p("stars-limit").max=rt.s,p("stars-designationLimit").max=rt.s,p("stars-propernameLimit").max=rt.s),rt}function f(q){var W=q?"inline-block":"none";dt(t.parentElement+" ~ #celestial-form").selectAll(".advanced").style("display",W),dt(t.parentElement+" ~ #celestial-form").selectAll("#label-propername").style("display",q?"none":"inline-block")}function u(q,W){var _,nt;if(B(q,"formFields")){if(W&&B(q.formFields,W)){fr(dt(t.parentElement+" ~ #celestial-form").select("#"+W),{display:"none"});return}if(q.form===!1&&q.location===!0){dt(t.parentElement+" ~ #celestial-form").style("display","inline-block");for(nt in q.formFields)B(q.formFields,nt)&&nt!=="location"&&fr(dt(t.parentElement+" ~ #celestial-form").select("#"+nt),{display:"none"});return}q.form===!1&&dt(t.parentElement+" ~ #celestial-form").style("display","none");for(nt in q.formFields)B(q.formFields,nt)&&nt!=="location"&&(_=q.formFields[nt]===!1?"none":"block",fr(dt(t.parentElement+" ~ #celestial-form").select("#"+nt),{display:_}))}}function c(){var q=dt(t.parentElement+" ~ #celestial-form").select("#constellation"),W=[],_=0,nt,rt,wt=t.cfg;if(t.container.selectAll(".constname").each(function(Et,J){nt=Et.id,nt===wt.constellation&&(_=J),rt=Et.properties[wt.constellations.namesType],rt!==nt&&(rt+=" ("+nt+")"),W.push({o:nt,n:rt})}),W.length<1||q.length<1){setTimeout(c,1e3);return}W=[{o:"---",n:"(Select constellation)"}].concat(W),q.selectAll("option").remove(),q.selectAll("option").data(W).enter().append("option").attr("value",function(Et){return Et.o}).text(function(Et){return Et.n}),q.property("selectedIndex",_)}function p(q){return document.querySelector(t.parentElement+" ~ #celestial-form #"+q)}var m=st.projections(),h=st.eulerAngles(),d=dt(t.parentElement+" ~ #celestial-form");d.size()<1?d=dt(t.parentElement).select(function(){return this.parentNode}).append("div").attr("id","celestial-form"):d.selectAll("*").remove();var y=d.append("div").attr("class","ctrl"),b=y.append("form").attr("id","params").attr("name","params").attr("method","get").attr("action","#"),g=b.append("div").attr("class","col").attr("id","general");g.append("label").attr("title","Map width in pixel, 0 indicates full width").attr("for","width").html("Width "),g.append("input").attr("type","number").attr("maxlength","4").attr("max","20000").attr("min","0").attr("title","Map width").attr("id","width").attr("value",r.width).on("change",N),g.append("span").html("px"),g.append("label").attr("title","Map projection, (hemi) indicates hemispherical projection").attr("for","projection").html("Projection");var k=g.append("select").attr("id","projection").on("change",x),w=0,D=Object.keys(m).map(function(q,W){var _=m[q].clip&&m[q].clip===!0?m[q].n+" (hemi)":m[q].n;return q===r.projection&&(w=W),{o:q,n:_}});k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),w=0,g.append("label").attr("title","Coordinate space in which the map is displayed").attr("for","transform").html("Coordinates"),k=g.append("select").attr("id","transform").on("change",Y),D=Object.keys(h).map(function(q,W){return q===r.transform&&(w=W),{o:q,n:q.replace(/^([a-z])/,function(_,nt){return nt.toUpperCase()})}}),k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),g.append("br"),g.append("label").attr("title","Center coordinates long/lat in selected coordinate space").attr("for","centerx").html("Center"),g.append("input").attr("type","number").attr("id","centerx").attr("title","Center right ascension/longitude").attr("max","24").attr("min","0").attr("step","0.1").on("change",v),g.append("span").attr("id","cxunit").html("h"),g.append("input").attr("type","number").attr("id","centery").attr("title","Center declination/latitude").attr("max","90").attr("min","-90").attr("step","0.1").on("change",v),g.append("span").html("\xB0"),g.append("label").attr("title","Orientation").attr("for","centerz").html("Orientation"),g.append("input").attr("type","number").attr("id","centerz").attr("title","Center orientation").attr("max","180").attr("min","-180").attr("step","0.1").on("change",v),g.append("span").html("\xB0"),g.append("label").attr("for","orientationfixed").attr("class","advanced").html("Fixed"),g.append("input").attr("type","checkbox").attr("id","orientationfixed").attr("class","advanced").property("checked",r.orientationfixed).on("change",G),g.append("label").attr("title","Center and zoom in on this constellation").attr("for","constellation").html("Show"),g.append("select").attr("id","constellation").on("change",j),s(r.center,r.transform),g=b.append("div").attr("class","col").attr("id","stars"),g.append("label").attr("class","header").attr("for","stars-show").html("Stars"),g.append("input").attr("type","checkbox").attr("id","stars-show").property("checked",r.stars.show).on("change",G),g.append("label").attr("for","stars-limit").html("down to magnitude"),g.append("input").attr("type","number").attr("id","stars-limit").attr("title","Star display limit (magnitude)").attr("value",r.stars.limit).attr("max","6").attr("min","-1").attr("step","0.1").on("change",G),g.append("label").attr("for","stars-colors").html("with spectral colors"),g.append("input").attr("type","checkbox").attr("id","stars-colors").property("checked",r.stars.colors).on("change",G),g.append("label").attr("for","stars-color").html("or default color "),g.append("input").attr("type","color").attr("autocomplete","off").attr("id","stars-style-fill").attr("title","Star color").property("value",r.stars.style.fill).on("change",G),g.append("br");var F=Wt.starnames[r.culture]||Wt.starnames.iau;for(var U in F)if(B(F,U)){var K=Object.keys(F[U]);K.length>1?(g.append("label").attr("for","stars-"+U).html("Show"),w=0,g.append("label").attr("title","Type of star name").attr("id","label-propername").attr("for","stars-"+U+"Type").html(function(){return U==="propername"?"proper names":""}),k=g.append("select").attr("id","stars-"+U+"Type").attr("class",function(){return U==="propername"?"advanced":""}).on("change",G),D=K.map(function(q,W){return q===r.stars[U+"Type"]&&(w=W),{o:q,n:F[U][q]}}),k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),g.append("input").attr("type","checkbox").attr("id","stars-"+U).property("checked",r.stars[U]).on("change",G)):K.length===1&&(g.append("label").attr("for","stars-"+U).html(" "+F[U][K[0]]),g.append("input").attr("type","checkbox").attr("id","stars-"+U).property("checked",r.stars[U]).on("change",G)),g.append("label").attr("for","stars-"+U+"Limit").html("down to mag"),g.append("input").attr("type","number").attr("id","stars-"+U+"Limit").attr("title","Star name display limit (magnitude)").attr("value",r.stars[U+"Limit"]).attr("max","6").attr("min","-1").attr("step","0.1").on("change",G)}g.append("br"),g.append("label").attr("for","stars-size").attr("class","advanced").html("Stellar disk size: base"),g.append("input").attr("type","number").attr("id","stars-size").attr("class","advanced").attr("title","Size of the displayed star disk; base").attr("value",r.stars.size).attr("max","100").attr("min","0").attr("step","0.1").on("change",G),g.append("label").attr("for","stars-exponent").attr("class","advanced").html(" * e ^ (exponent"),g.append("input").attr("type","number").attr("id","stars-exponent").attr("class","advanced").attr("title","Size of the displayed star disk; exponent").attr("value",r.stars.exponent).attr("max","3").attr("min","-1").attr("step","0.01").on("change",G),g.append("span").attr("class","advanced").text(" * (magnitude + 2)) [* adaptation]"),a(p("stars-show")),g=b.append("div").attr("class","col").attr("id","dsos"),g.append("label").attr("class","header").attr("title","Deep Space Objects").attr("for","dsos-show").html("DSOs"),g.append("input").attr("type","checkbox").attr("id","dsos-show").property("checked",r.dsos.show).on("change",G),g.append("label").attr("for","dsos-limit").html("down to mag"),g.append("input").attr("type","number").attr("id","dsos-limit").attr("title","DSO display limit (magnitude)").attr("value",r.dsos.limit).attr("max","6").attr("min","0").attr("step","0.1").on("change",G),g.append("label").attr("for","dsos-colors").html("with symbol colors"),g.append("input").attr("type","checkbox").attr("id","dsos-colors").property("checked",r.dsos.colors).on("change",G),g.append("label").attr("for","dsos-color").html("or default color "),g.append("input").attr("type","color").attr("autocomplete","off").attr("id","dsos-style-fill").attr("title","DSO color").property("value",r.dsos.style.fill).on("change",G),g.append("br"),F=Wt.dsonames[r.culture]||Wt.dsonames.iau;for(U in F)if(B(F,U)){var et=Object.keys(F[U]);g.append("label").attr("for","dsos-"+U).html("Show"),w=0,g.append("label").attr("title","Type of DSO name").attr("for","dsos-"+U+"Type").attr("class","advanced").html(""),k=g.append("select").attr("id","dsos-"+U+"Type").attr("class","advanced").on("change",G),D=et.map(function(q,W){return q===r.stars[U+"Type"]&&(w=W),{o:q,n:F[U][q]}}),k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),g.append("label").attr("for","dsos-"+U).html("names"),g.append("input").attr("type","checkbox").attr("id","dsos-"+U).property("checked",r.dsos[U]).on("change",G)}g.append("label").attr("for","dsos-nameLimit").html("down to mag"),g.append("input").attr("type","number").attr("id","dsos-nameLimit").attr("title","DSO name display limit (magnitude)").attr("value",r.dsos.nameLimit).attr("max","6").attr("min","0").attr("step","0.1").on("change",G),g.append("br"),g.append("label").attr("for","dsos-size").attr("class","advanced").html("DSO symbol size: (base"),g.append("input").attr("type","number").attr("id","dsos-size").attr("class","advanced").attr("title","Size of the displayed symbol: base").attr("value",r.dsos.size).attr("max","100").attr("min","0").attr("step","0.1").on("change",G),g.append("label").attr("for","dsos-exponent").attr("class","advanced").html(" * 2 [* adaptation] - magnitude) ^ exponent"),g.append("input").attr("type","number").attr("id","dsos-exponent").attr("class","advanced").attr("title","Size of the displayed symbol; exponent").attr("value",r.dsos.exponent).attr("max","3").attr("min","-1").attr("step","0.01").on("change",G),a(p("dsos-show")),g=b.append("div").attr("class","col").attr("id","constellations"),g.append("label").attr("class","header").html("Constellations"),F=Wt.constellations[r.culture]||Wt.constellations.iau;for(U in F)if(B(F,U)){var P=Object.keys(F[U]);P.length>1?(g.append("label").attr("for","constellations-"+U).html("Show"),w=0,g.append("label").attr("title","Language of constellation names").attr("for","constellations-"+U+"Type").attr("class","advanced").html(""),k=g.append("select").attr("id","constellations-"+U+"Type").attr("class","advanced").on("change",G),D=P.map(function(q,W){return q===r.constellations[U+"Type"]&&(w=W),{o:q,n:F[U][q]}}),k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),g.append("label").attr("for","constellations-"+U).html("names"),g.append("input").attr("type","checkbox").attr("id","constellations-"+U).property("checked",r.constellations[U]).on("change",G)):P.length===1&&(g.append("label").attr("for","constellations-"+U).attr("class","advanced").html(" "+F[U][P[0]]),g.append("input").attr("type","checkbox").attr("id","constellations-"+U).attr("class","advanced").property("checked",r.constellations[U]).on("change",G))}g.append("label").attr("for","constellations-lines").html(" lines"),g.append("input").attr("type","checkbox").attr("id","constellations-lines").property("checked",r.constellations.lines).on("change",G),g.append("label").attr("for","constellations-bounds").html(" boundaries"),g.append("input").attr("type","checkbox").attr("id","constellations-bounds").property("checked",r.constellations.bounds).on("change",G),a(p("constellations-names")),g=b.append("div").attr("class","col").attr("id","lines"),g.append("label").attr("class","header").html("Lines"),g.append("label").attr("title","Latitude/longitude grid lines").attr("for","lines-graticule").html("Graticule"),g.append("input").attr("type","checkbox").attr("id","lines-graticule-show").property("checked",r.lines.graticule.show).on("change",G),g.append("label").attr("for","lines-equatorial").html("Equator"),g.append("input").attr("type","checkbox").attr("id","lines-equatorial-show").property("checked",r.lines.equatorial.show).on("change",G),g.append("label").attr("for","lines-ecliptic").html("Ecliptic"),g.append("input").attr("type","checkbox").attr("id","lines-ecliptic-show").property("checked",r.lines.ecliptic.show).on("change",G),g.append("label").attr("for","lines-galactic").html("Galactic plane"),g.append("input").attr("type","checkbox").attr("id","lines-galactic-show").property("checked",r.lines.galactic.show).on("change",G),g.append("label").attr("for","lines-supergalactic").html("Supergalactic plane"),g.append("input").attr("type","checkbox").attr("id","lines-supergalactic-show").property("checked",r.lines.supergalactic.show).on("change",G),g=b.append("div").attr("class","col").attr("id","other"),g.append("label").attr("class","header").html("Other"),g.append("label").attr("for","mw-show").html("Milky Way"),g.append("input").attr("type","checkbox").attr("id","mw-show").property("checked",r.mw.show).on("change",G),g.append("label").attr("for","mw-style-fill").attr("class","advanced").html(" color"),g.append("input").attr("type","color").attr("id","mw-style-fill").attr("class","advanced").attr("title","Milky Way color").attr("value",r.mw.style.fill).on("change",G),g.append("label").attr("for","mw-style-opacity").attr("class","advanced").html(" opacity"),g.append("input").attr("type","number").attr("id","mw-style-opacity").attr("class","advanced").attr("title","Transparency of each Milky Way layer").attr("value",r.mw.style.opacity).attr("max","1").attr("min","0").attr("step","0.01").on("change",G),g.append("label").attr("for","advanced").html("Advanced options"),g.append("input").attr("type","checkbox").attr("id","advanced").property("checked",r.advanced).on("change",G),g.append("br"),g.append("label").attr("for","background-fill").html("Background color"),g.append("input").attr("type","color").attr("id","background-fill").attr("title","Background color").attr("value",r.background.fill).on("change",G),g.append("label").attr("for","background-opacity").attr("class","advanced").html("opacity"),g.append("input").attr("type","number").attr("id","background-opacity").attr("class","advanced").attr("title","Background opacity").attr("value",r.background.opacity).attr("max","1").attr("min","0").attr("step","0.01").on("change",G),g.append("label").attr("title","Star/DSO sizes are increased with higher zoom-levels").attr("for","adaptable").attr("class","advanced").html("Adaptable object sizes"),g.append("input").attr("type","checkbox").attr("id","adaptable").attr("class","advanced").property("checked",r.adaptable).on("change",G);var S=Mc[r.culture];w=0,g.append("label").attr("title","General language setting").attr("for","lang").html("Object names "),k=g.append("select").attr("id","lang").on("change",G),D=S.map(function(q,W){return q===r.lang&&(w=W),{o:q,n:Wt.constellations[r.culture].names[q]}}),D=[{o:"---",n:"(Select language)"}].concat(D),k.selectAll("option").data(D).enter().append("option").attr("value",function(q){return q.o}).text(function(q){return q.n}),k.property("selectedIndex",w),g=b.append("div").attr("class","col").attr("id","download"),g.append("label").attr("class","header").html("Download"),g.append("input").attr("type","button").attr("id","download-png").attr("value","PNG Image").on("click",function(){var q=dt("body").append("a").node(),W=document.querySelector(t.parentElement+" canvas");q.download=V(".png"),q.rel="noopener",q.href=W.toDataURL("image/png").replace("image/png","image/octet-stream"),q.click(),dt(q).remove()}),g.append("input").attr("type","button").attr("id","download-svg").attr("value","SVG File").on("click",function(){return Ka(V(".svg")),!1}),l(),o(r.transform),u(e),f(r.advanced);function N(){var q=this,W=q.value;Mr(q)!==!1&&(r.width=W,t.resize({width:W}))}function Y(){var q=this,W=q.value,_=o(W,r.transform);_!==null&&(r.center[0]=_),r.transform=W,pe.set(r),t.reload(r)}function x(){var q=this;q&&(r.projection=q.value,pe.set(r),t.reproject(r))}function v(){Mr(this)!==!1&&z()!==!1&&t.rotate(r)}function z(){var q=p("centerx"),W=p("centery"),_=p("centerz"),nt=[];if(!(!q||!W)){if(r.transform!=="equatorial")r.center[0]=parseFloat(q.value);else{var rt=parseFloat(q.value);r.center[0]=rt>12?rt*15-360:rt*15}r.center[1]=parseFloat(W.value);var wt=parseFloat(_.value);return r.center[2]=isNaN(wt)?0:wt,q.value!==""&&W.value!==""}}function V(q){var W=zr("%Y%m%dT%H%M%S%Z"),_="d3-celestial",nt=t.date();return nt&&(_+=W(nt)),_+q}function j(){var q=this.value;q&&Z(q)}function Z(q){var W,_=[],nt=Ar;if(q==="---"){t.constellation=null,W=t.zoomBy(),W!==1&&_.push({param:"zoom",value:1/W,duration:0}),t.animate(_,!1);return}if(!(!dg(t.constellations)||!B(t.constellations,q))){var rt=t.constellations[q],wt=ur(rt.center,Ke[nt.transform]);nt.center=wt,s(nt.center,nt.transform),W=t.zoomBy(),W!==1&&_.push({param:"zoom",value:1/W,duration:0}),_.push({param:"center",value:wt,duration:0});var Et=1+360/rt.scale;_.push({param:"zoom",value:Et,duration:0}),t.constellation=q,t.animate(_,!1)}}function G(){var q,W=this;switch(Object.assign(r,pe.set()),W.type){case"checkbox":q=W.checked,a(W);break;case"number":if(Mr(W)===!1)return;q=parseFloat(W.value);break;case"color":if(ql(W)===!1)return;q=W.value;break;case"text":if(W.id.search(/fill$/)===-1||ql(W)===!1)return;q=W.value;break;case"select-one":q=W.value;break}q!==null&&(at(W.id,q),W.id==="dsos-style-fill"?(at("dsos-style-stroke",q),at("dsos-nameStyle-fill",q)):W.id==="constellations-namesType"?c():W.id==="lang"?xt(q):W.id==="advanced"&&f(q),z(),Object.assign(Ar,r),t.apply(r))}function at(q,W){var _=q.split("-");switch(_.length){case 1:r[_[0]]=W;break;case 2:r[_[0]][_[1]]=W;break;case 3:r[_[0]][_[1]][_[2]]=W;break;default:return}}function xt(q){Object.assign(r,Ar),r.lang=q;for(var W=["constellations","planets"],_=0;_<W.length;_++)B(Wt[W[_]][r.culture].names,q)?r[W[_]].namesType=q:B(Wt[W[_]][r.culture].names,"desig")?r[W[_]].namesType="desig":r[W[_]].namesType="name";return B(Wt.dsonames[r.culture].names,q)?r.dsos.namesType=q:r.dsos.namesType="desig",B(Wt.starnames[r.culture].propername,q)?r.stars.propernameType=q:r.stars.propernameType="desig",Object.assign(Ar,r),Mt(),c(),r}function Mt(){oi(t.parentElement+" ~ #celestial-form input, "+t.parentElement+" ~ #celestial-form select").each(function(q,W){if(this!==void 0){var _=this.id;if(_==="lat"||_==="lon")ee(r.geopos)&&(this.value=_==="lat"?r.geopos[0]:r.geopos[1]);else if(_.search(/center/)!==-1){if(ee(r.center))switch(_){case"centerx":this.value=r.center[0];break;case"centery":this.value=r.center[1];break;case"centerz":this.value=r.center[2]||0;break}}else{if(_==="datetime"||_==="hr"||_==="min"||_==="sec"||_==="tz")return;if(this.type!=="button"){var nt=Rt(_);switch(this.type){case"checkbox":this.checked=nt,a(_);break;case"number":if(Mr(this)===!1)break;this.value=parseFloat(Rt(_));break;case"color":if(ql(this)===!1)break;this.value=nt;break;case"text":if(_.search(/fill$/)===-1||ql(this)===!1)break;this.value=nt;break;case"select-one":this.value=nt;break}}}}})}function Rt(q){var W=q.split("-");switch(W.length){case 1:return r[W[0]];case 2:return r[W[0]][W[1]];case 3:return r[W[0]][W[1]][W[2]];default:return}}return t.updateForm=Mt,t.showConstellation=Z,t.setLanguage=function(q){var W=pe.set();return Mc[r.culture].indexOf(q)!==-1&&(W=xt(q)),W},{$form:p,enable:a,fldEnable:i,listConstellations:c,setCenter:s,setLimits:l,setVisibility:u,showAdvanced:f}}function ro(t,e){var r=yg(t);fr(dt("#error").html(e),{top:ae(r[1]+t.offsetHeight+1),left:ae(r[0]),opacity:1}),t.focus()}function Mr(t){var e,r=t.id==="hr"||t.id==="min"||t.id==="sec"?1:0;if(t.validity){if(e=t.validity,e.typeMismatch||e.badInput)return ro(t,t.title+": check field value"),!1;if(e.rangeOverflow||e.rangeUnderflow)return ro(t,t.title+" must be between "+(parseInt(t.min)+r)+" and "+(parseInt(t.max)-r)),!1}else{if(e=t.value,!re(e))return ro(t,t.title+": check field value"),!1;if(e=parseFloat(e),e<t.min||e>t.max)return ro(t,t.title+" must be between "+(t.min+r)+" and "+(+t.max-r)),!1}return fr(dt("#error"),{top:"-9999px",left:"-9999px",opacity:0}),!0}function ql(t){var e;if(t.validity){if(e=t.validity,e.typeMismatch||e.badInput)return ro(t,t.title+": check field value"),!1;if(t.value.search(/^#[0-9A-F]{6}$/i)===-1)return ro(t,t.title+": not a color value"),!1}else{if(e=t.value,e==="")return!0;if(e.search(/^#[0-9A-F]{6}$/i)===-1)return ro(t,t.title+": not a color value"),!1}return fr(dt("#error"),{top:"-9999px",left:"-9999px",opacity:0}),!0}var zg=function(t,e){var r=t.cfg,n=t.form.$form,a=new Date,i=zr("%Z"),o=[{"\u221212:00":-720},{"\u221211:00":-660},{"\u221210:00":-600},{"\u221209:30":-570},{"\u221209:00":-540},{"\u221208:00":-480},{"\u221207:00":-420},{"\u221206:00":-360},{"\u221205:00":-300},{"\u221204:30":-270},{"\u221204:00":-240},{"\u221203:30":-210},{"\u221203:00":-180},{"\u221202:30":-150},{"\u221202:00":-120},{"\u221201:00":-60},{"\xB100:00":0},{"+01:00":60},{"+02:00":120},{"+03:00":180},{"+03:30":210},{"+04:00":240},{"+04:30":270},{"+05:00":300},{"+05:30":330},{"+05:45":345},{"+06:00":360},{"+06:30":390},{"+07:00":420},{"+08:00":480},{"+08:30":510},{"+08:45":525},{"+09:00":540},{"+09:30":570},{"+10:00":600},{"+10:30":630},{"+11:00":660},{"+12:00":720},{"+12:45":765},{"+13:00":780},{"+14:00":840}],s=["January","February","March","April","May","June","July","August","September","October","November","December"],l=["Su","M","Tu","W","Th","F","Sa"],f=F(a),u=zr("%Y-%m-%d"),c=On("%Y-%m-%d"),p=r.daterange||[],m=dt(t.parentElement+" ~ #celestial-form").append("div").attr("id","celestial-date");k("left"),g(),y(),k("right");var h=m.append("div").attr("id","cal");d(),w(),D();function d(){var N=n("mon").value,Y=n("yr").value,x=new Date(Y,N,1),v=dt(t.parentElement+" ~ #celestial-form").select("#cal"),z=new Date;Y=parseInt(Y),N=parseInt(N),x.setDate(x.getDate()-x.getDay());for(var V=v.node();V.firstChild;)V.removeChild(V.firstChild);for(var j=0;j<7;j++)Pc(v.append("div"),{date:!0,weekday:!0}).html(l[j]);for(j=0;j<42;j++){var Z=x.getMonth(),G=x.getDay(),at=u(x);Pc(v.append("div"),{date:!0,grey:Z!==N,weekend:Z===N&&(G===0||G===6),today:kc(x,z)===0,selected:kc(x,a)===0}).attr("id",at).on("click",S).html(x.getDate().toString()),x.setDate(x.getDate()+1)}}function y(){m.append("select").attr("title","Year").attr("id","yr").on("change",d),b()}function b(){var N=dt(t.parentElement+" ~ #celestial-form").select("select#yr"),Y=a.getFullYear(),x=0,v=F(a);N.selectAll("*").remove(),N.selectAll("option").data(v).enter().append("option").text(function(z,V){return z===Y&&(x=V),z.toString()}),N.property("selectedIndex",x)}function g(){var N=m.append("select").attr("title","Month").attr("id","mon").on("change",d),Y=0,x=a.getMonth();N.selectAll("option").data(s).enter().append("option").attr("value",function(v,z){return z===x&&(Y=z),z}).text(function(v){return v}),N.property("selectedIndex",Y)}function k(N){var Y=m.append("div").attr("id",N).on("click",function(){var x=n("mon"),v=n("yr");N==="left"?x.selectedIndex===0?(x.selectedIndex=11,v.selectedIndex--):x.selectedIndex--:x.selectedIndex===11?(x.selectedIndex=0,v.selectedIndex++):x.selectedIndex++,d()})}function w(){m.append("input").attr("type","number").attr("id","hr").attr("title","Hours").attr("max","24").attr("min","-1").attr("step","1").attr("value",a.getHours()).on("change",function(){Mr(this)===!0&&S()}),m.append("input").attr("type","number").attr("id","min").attr("title","Minutes").attr("max","60").attr("min","-1").attr("step","1").attr("value",a.getMinutes()).on("change",function(){Mr(this)===!0&&S()}),m.append("input").attr("type","number").attr("id","sec").attr("title","Seconds").attr("max","60").attr("min","-1").attr("step","1").attr("value",a.getSeconds()).on("change",function(){Mr(this)===!0&&S()})}function D(){var N=m.append("select").attr("title","Time zone offset from UTC").attr("id","tz").on("change",S),Y=15,x=-a.getTimezoneOffset();N.selectAll("option").data(o).enter().append("option").attr("value",function(v,z){var V=Object.keys(v)[0];return v[V]===x&&(Y=z),v[V]}).text(function(v){return Object.keys(v)[0]}),N.property("selectedIndex",Y)}function F(N){for(var Y=U(N.getFullYear()),x=[],v=Y[0];v<=Y[1];v++)x.push(v);return x}function U(N){return!p||p.length<1?[N-10,N+10]:p.length===1&&re(p[0])?p[0]>=100?[p[0]-10,p[0]+10]:[N-p[0],N+p[0]]:p.length===2&&re(p[0])&&re(p[1])?p[1]>=100?[p[0],p[1]]:[p[0]-p[1],p[0]+p[1]]:[N-10,N+10]}function K(N,Y){for(var x=n(N),v=0;v<x.childNodes.length;v++)if(x.childNodes[v].value==Y){x.selectedIndex=v;break}}function et(N){N&&a.setTime(N.valueOf()),K("yr",a.getFullYear()),K("mon",a.getMonth()),d(),n("hr").value=a.getHours(),n("min").value=a.getMinutes(),n("sec").value=a.getSeconds()}this.show=function(N,Y){var x=n("celestial-date"),v=n("datepick"),z=v.offsetLeft+v.offsetWidth-x.offsetWidth,V=v.offsetTop-x.offsetHeight-1;x.offsetTop===-9999?(a.setTime(N.valueOf()),K("tz",Y),et(),fr(dt(t.parentElement+" ~ #celestial-form").select("#celestial-date"),{top:ae(V),left:ae(z),opacity:1}),dt(t.parentElement+" ~ #celestial-form").select("#datepick").classed("active",!0)):P()},this.isVisible=function(){return document.getElementById("datepick")?dt(t.parentElement+" ~ #celestial-form").select("#datepick").classed("active")===!0:!1},this.hide=function(){P()};function P(){dt(t.parentElement+" ~ #celestial-form").select("#celestial-date").style("opacity",0),fr(dt("#error"),{top:"-9999px",left:"-9999px",opacity:0}),dt(t.parentElement+" ~ #celestial-form").select("#datepick").classed("active",!1),setTimeout(function(){n("celestial-date").style.top=ae(-9999)},600)}function S(){var N=n("hr").value,Y=n("min").value,x=n("sec").value,v=n("tz").value;this.id&&this.id.search(/^\d/)!==-1&&(a=c(this.id)),b(),a.setHours(N,Y,x),et(),e(a,v)}};var Cl=function(t,e,r){var n=zc(t,r[1])-e[0];n<0&&(n=n+360),n=n*M;var a=e[1]*M,i=r[0]*M,o=Math.asin(Math.sin(a)*Math.sin(i)+Math.cos(a)*Math.cos(i)*Math.cos(n)),s=Math.acos((Math.sin(a)-Math.sin(o)*Math.sin(i))/(Math.cos(o)*Math.cos(i)));return Math.sin(n)>0&&(s=Math.PI*2-s),[o/M,s/M,0]};Cl.inverse=function(t,e,r){var n=e[0]*M,a=e[1]*M,i=r[0]*M,o=Math.asin(Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos(a)),s=(Math.sin(n)-Math.sin(o)*Math.sin(i))/(Math.cos(o)*Math.cos(i));s=Math.acos(Math.max(-1,Math.min(1,s))),Math.sin(a)>0&&(s=-s),s=s/M;var l=zc(t,r[1])-s;return[l,o/M,0]};function zc(t,e){var r=t.getUTCFullYear(),n=t.getUTCMonth()+1,a=t.getUTCDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),s=t.getUTCSeconds();(n==1||n==2)&&(r=r-1,n=n+12);var l=Math.floor(r/100),f=2-l+Math.floor(l/4),u=Math.floor(365.25*r),c=Math.floor(30.6001*(n+1)),p=f+u+c-730550.5+a+(i+o/60+s/3600)/24,m=p/36525,h=280.46061837+360.98564736629*p+387933e-9*m*m-m*m*m/3871e4+e;if(h>0)for(;h>360;)h=h-360;else for(;h<0;)h=h+360;return h}st.horizontal=Cl;st.ha=function(t,e,r){var n=zc(t,e)-r;return n<0&&(n=n+360),n};var _c=null;function _g(t){var e=t.cfg,r=t.form.$form,n=t.form.enable,a=t.form.showAdvanced,i=zr("%Y-%m-%d %H:%M:%S"),o=On("%Y-%m-%d %H:%M:%S"),s=[0,0],l=[0,0],f=new Date,u=-f.getTimezoneOffset(),c=u,p=pe.set(e),m=dt(t.parentElement+" ~ #celestial-form form").insert("div","div#general").attr("id","loc"),h=new zg(t,function(j,Z){r("datetime").value=P(j,Z),c=Z,x()});B(p,"geopos")&&p.geopos!==null&&p.geopos.length===2&&(l=p.geopos);var d=m.append("div").attr("class","col").attr("id","location").style("display","none");d.append("label").attr("title","Location coordinates long/lat").attr("for","lat").html("Location"),d.append("input").attr("type","number").attr("id","lat").attr("title","Latitude").attr("placeholder","Latitude").attr("max","90").attr("min","-90").attr("step","0.0001").attr("value",l[0]).on("change",function(){Mr(this)===!0&&x()}),d.append("span").html("\xB0"),d.append("input").attr("type","number").attr("id","lon").attr("title","Longitude").attr("placeholder","Longitude").attr("max","180").attr("min","-180").attr("step","0.0001").attr("value",l[1]).on("change",function(){Mr(this)===!0&&x()}),d.append("span").html("\xB0"),"geolocation"in navigator&&d.append("input").attr("type","button").attr("value","Here").attr("id","here").on("click",K),d.append("label").attr("title","Local date/time").attr("for","datetime").html(" Date/time"),d.append("input").attr("type","button").attr("id","day-left").attr("title","One day back").on("click",function(){f.setDate(f.getDate()-1),r("datetime").value=P(f,c),x()}),d.append("input").attr("type","text").attr("id","datetime").attr("title","Date and time").attr("value",P(f,c)).on("click",et,!0).on("input",function(){this.value=P(f,c),h.isVisible()||et()}),d.append("div").attr("id","datepick").on("click",et),d.append("input").attr("type","button").attr("id","day-right").attr("title","One day forward").on("click",function(){f.setDate(f.getDate()+1),r("datetime").value=P(f,c),x()}),d.append("input").attr("type","button").attr("value","Now").attr("id","now").on("click",U),d.append("br"),d.append("label").attr("title","Show horizon marker").attr("for","horizon-show").html(" Horizon marker"),d.append("input").attr("type","checkbox").attr("id","horizon-show").property("checked",p.horizon.show).on("change",Y),d.append("label").attr("title","Show daylight").attr("for","daylight-show").html("Daylight sky"),d.append("input").attr("type","checkbox").attr("id","daylight-show").property("checked",p.daylight.show).on("change",Y),d.append("br"),d.append("label").attr("title","Show solar system objects").attr("for","planets-show").html(" Planets, Sun & Moon"),d.append("input").attr("type","checkbox").attr("id","planets-show").property("checked",p.planets.show).on("change",Y);var y=Wt.planets[p.culture]||Wt.planets.iau;for(var b in y)if(B(y,b)){var g=Object.keys(y[b]);if(g.length>1){var k=b==="symbol"?"as":"with";d.append("label").attr("for","planets-"+b+"Type").html(k);var w=0;d.append("label").attr("title","Type of planet name").attr("for","planets-"+b+"Type").attr("class","advanced").html("");var D=d.append("select").attr("id","planets-"+b+"Type").on("change",Y),F=g.map(function(j,Z){return j===p.planets[b+"Type"]&&(w=Z),{o:j,n:y[b][j]}});D.selectAll("option").data(F).enter().append("option").attr("value",function(j){return j.o}).text(function(j){return j.n}),D.property("selectedIndex",w),b==="names"&&(D.attr("class","advanced"),d.append("label").attr("for","planets-"+b).html("names"),d.append("input").attr("type","checkbox").attr("id","planets-"+b).property("checked",p.planets[b]).on("change",Y))}}n(r("planets-show")),a(p.advanced),dt(document).on("mousedown",function(j){!xg(j.target,"celestial-date")&&h.isVisible()&&h.hide()});function U(){f.setTime(Date.now()),r("datetime").value=P(f,c),x()}function K(){navigator.geolocation.getCurrentPosition(function(j){l=[qr(j.coords.latitude,4),qr(j.coords.longitude,4)],r("lat").value=l[0],r("lon").value=l[1],x()})}function et(){h.show(f,c)}function P(j,Z){var G;if(!Z||Z==="0")G=" \xB10000";else{var at=Math.floor(Math.abs(Z)/60),xt=Math.abs(Z)-at*60,Mt=Z>0?" +":" \u2212";G=Mt+Sc(at)+Sc(xt)}return i(j)+G}function S(j){return!(!j||!ee(j)||j.length<2||!re(j[0])||j[0]<-90||j[0]>90||!re(j[1])||j[1]<-180||j[1]>180)}function N(j){return!(j==null||!re(j)&&Math.abs(j)>840)}function Y(){Object.assign(p,pe.set()),p.horizon.show=!!r("horizon-show").checked,p.daylight.show=!!r("daylight-show").checked,p.planets.show=!!r("planets-show").checked,p.planets.names=!!r("planets-names").checked,p.planets.namesType=r("planets-namesType").value,p.planets.symbolType=r("planets-symbolType").value,n(r("planets-show")),t.apply(p)}function x(){var j=parseFloat(r("lon").value),Z=parseFloat(r("lat").value),G;if(Object.assign(p,pe.set()),f=o(r("datetime").value.slice(0,-6)),!isNaN(j)&&!isNaN(Z)){if(Z!==l[0]||j!==l[1]){l=[Z,j],V([Z,j],!0);return}r("datetime").value=P(f,c);var at=new Date(f.valueOf()-(c-u)*6e4);s=st.getPoint(Cl.inverse(at,[90,0],l),p.transform),s[2]=0,p.follow==="zenith"?t.rotate({center:s}):t.redraw()}}function v(j,Z){c=Math.round(j[1]/15)*60,_c={gmtOffset:c*60,message:"Estimated from longitude",timestamp:Z}}function z(){r("datetime").value=P(f,c),x()}function V(j,Z){if(!(!j||!B(p,"settimezone")||p.settimezone===!1)){var G=Math.floor(f.getTime()/1e3);if(typeof p.timezoneResolver=="function"){Promise.resolve(p.timezoneResolver(j[0],j[1],G)).then(function(Mt){Number.isFinite(Mt)?(c=Mt,_c={gmtOffset:Mt*60,message:"From timezoneResolver",timestamp:G}):v(j,G),z()},function(Mt){console.warn("timezoneResolver failed, estimating from longitude:",Mt),v(j,G),z()});return}if(!p.timezoneid){v(j,G),z();return}var at=window&&window.location.protocol==="https:"?"https":"http",xt=at+"://api.timezonedb.com/v2.1/get-time-zone?key="+p.timezoneid+"&format=json&by=position&lat="+j[0]+"&lng="+j[1]+"&time="+G;se(xt,function(Mt,Rt){if(Mt)return console.warn(Mt);Rt.status==="FAILED"?v(j,G):(c=Rt.gmtOffset/60,_c=Rt),z()})}}t.dateFormat=P,t.date=function(j,Z){if(!j)return f;N(Z)&&(c=Z),Object.assign(p,pe.set()),h.isVisible()&&h.hide(),f.setTime(j.valueOf()),r("datetime").value=P(j,c),x()},t.timezone=function(j){if(!j)return c;N(j)&&(c=j),Object.assign(p,pe.set()),h.isVisible()&&h.hide(),r("datetime").value=P(f,c),x()},t.position=function(){return l},t.location=function(j,Z){if(!j||j.length<2)return l;S(j)&&(l=j.slice(),r("lat").value=l[0],r("lon").value=l[1],N(Z)?c=Z:V(l,!0))},t.skyview=function(j){if(!j)return{date:f,location:l,timezone:c};var Z=!1;if(h.isVisible()&&h.hide(),B(j,"timezone")&&N(j.timezone)&&(c=j.timezone,Z=!0),B(j,"date")&&vg(j.date)&&(f.setTime(j.date.valueOf()),r("datetime").value=P(j.date,c),Z=!0),B(j,"location")&&S(j.location)&&(l=j.location.slice(),r("lat").value=l[0],r("lon").value=l[1],!B(j,"timezone"))){V(l,!B(j,"date"));return}if(Z===!1)return{date:f,location:l,timezone:c};p.follow==="zenith"?x():t.redraw()},t.dtLoc=t.skyview,t.zenith=function(){return s},t.nadir=function(){var j=-s[1],Z=s[0]+180;return Z>180&&(Z-=360),[Z,j-.001]},B(p,"formFields")&&(p.location===!0||p.formFields.location===!0)&&fr(dt(t.parentElement+" ~ #celestial-form").select("#location"),{display:"inline-block"}),S(l)&&(p.location===!0||p.formFields.location===!0)&&p.follow==="zenith"&&setTimeout(x,1e3)}var Ag=.035,S5=1.4,P5=2e3,k5=2500,R5=1500,Il=null,Ac=class{constructor(e,r){var n,a=null,i=[],o=0,s=!1,l=10,f=1,u,c,p,m,h,d,y,b={},g={},k=r&&r.standalone?pe:void 0,w=this;function D(I){return document.querySelector(p+" #"+I)}["cfg","mapProjection","container","map","parentElement","starnames","dsonames"].forEach(function(I){Object.defineProperty(w,I,{get:function(){switch(I){case"cfg":return u;case"mapProjection":return c;case"container":return a;case"map":return h;case"parentElement":return p;case"starnames":return b;default:return g}},enumerable:!0,configurable:!0})}),o=this,u=pe.set(e,k).applyDefaults(e,k),re(u.zoomextend)&&(l=u.zoomextend),re(u.zoomlevel)&&(f=u.zoomlevel);var F=document.getElementById(u.container);if(F){p="#"+u.container;var U=window.getComputedStyle(F,null);!parseInt(U.width)&&!u.width&&(F.style.width=ae(F.parentNode.clientWidth))}else p="body",F=null;var K=[16,16],et=Dc(),P=re(u.background.width)?et+u.background.width:et,S=window.devicePixelRatio||1,N=Nl(u.projection,u.projectionRatio);if(!N)return;u.lines.graticule.lat&&u.lines.graticule.lat.pos[0]==="outline"&&(N.scale-=2);var Y=N.ratio,x=Math.round(et/Y),v=Math.round(P/Y),z=N.scale*et/1024,V=u.stars.size,j=u.dsos.size||V,Z=u.stars.exponent,G=u.dsos.exponent||Z,at=1,xt=Zr(u.center),Mt=u.datapath;p!=="body"&&(F.style.height=ae(v));var Rt=Eg(this);this.form=Rt,c=st.projection(u.projection).rotate(xt).translate([P/2,v/2]).scale(z*f),m=L1().projection(c).center([P/2,v/2]).scaleExtent([z,z*l]).on("zoom.redraw",At),z*=f;var q=dt(p).selectAll("canvas"),W=u.culture!==""&&u.culture!=="iau"?u.culture:"";q.empty()&&(q=dt(p).append("canvas")),q.style("width",ae(P)).style("height",ae(v)).attr("width",P*S).attr("height",v*S);var _=q.node().getContext("2d");_.setTransform(S,0,0,S,0,0);var nt=Or().stepMinor([15,10]);h=En().projection(c).context(_),a=dt(p).select("container"),a.empty()?a=dt(p).append("container"):a.selectAll(p+" *").remove(),u.interactive?(q.call(m),dt(p).on("dblclick",function(){return wt(1.5625),!1})):q.attr("style","cursor: default!important"),cr(N.clip),dt(window).on("resize",function(){le()}),u.interactive===!0&&u.controls===!0&&D("celestial-zoomin")===null&&(dt(p).append("input").attr("type","button").attr("id","celestial-zoomin").attr("value","+").on("click",function(){return wt(1.25),!1}),dt(p).append("input").attr("type","button").attr("id","celestial-zoomout").attr("value","\u2212").on("click",function(){return wt(.8),!1})),d=je().radius(90),y=je().radius(179.9),D("error")===null&&dt("body").append("div").attr("id","error"),D("loc")===null?_g(this):u.location===!0&&u.follow==="zenith"&&J({center:st.zenith()}),(u.location===!0||u.formFields.location===!0)&&(dt(p+" #location").style("display","inline-block"),Rt.fldEnable("horizon-show",N.clip),Rt.fldEnable("daylight-show",!N.clip));function rt(){cr(N.clip),a.append("path").datum(nt.outline).attr("class","outline"),a.append("path").datum(d).attr("class","horizon"),a.append("path").datum(y).attr("class","daylight"),u.transform==="equatorial"?nt.stepMinor([15,10]):nt.stepMinor([10,10]);for(var I in u.lines)B(u.lines,I)&&(I==="graticule"?(a.append("path").datum(nt).attr("class","graticule"),B(u.lines.graticule,"lon")&&u.lines.graticule.lon.pos.length>0&&a.selectAll(p+" .gridvalues_lon").data(Vo("lon",u.lines.graticule.lon.pos,w)).enter().append("path").attr("class","graticule_lon"),B(u.lines.graticule,"lat")&&u.lines.graticule.lat.pos.length>0&&a.selectAll(p+" .gridvalues_lat").data(Vo("lat",u.lines.graticule.lat.pos,w)).enter().append("path").attr("class","graticule_lat")):a.append("path").datum(je().radius(90).center(ur(Wo[I],Ke[u.transform]))).attr("class",I));se(Mt+"mw.json",function(O,lt){if(O)return window.alert("Data file could not be loaded or doesn't exist. See readme.md"),console.warn(O);var zt=Ne(lt,u.transform),Xt=Al(zt);a.selectAll(p+" .mway").data(zt.features).enter().append("path").attr("class","mw"),a.selectAll(p+" .mwaybg").data(Xt.features).enter().append("path").attr("class","mwbg"),At()}),se(Mt+oo("constellations"),function(O,lt){if(O)return console.warn(O);var zt=Ne(lt,u.transform);a.selectAll(p+" .constnames").data(zt.features).enter().append("text").attr("class","constname"),w.constellations=Rg(zt),At()}),se(Mt+oo("constellations","borders"),function(O,lt){if(O)return console.warn(O);var zt=Ne(lt,u.transform);a.selectAll(p+" .bounds").data(zt.features).enter().append("path").attr("class","boundaryline"),At()}),se(Mt+oo("constellations","lines"),function(O,lt){if(O)return console.warn(O);var zt=Ne(lt,u.transform);a.selectAll(p+" .lines").data(zt.features).enter().append("path").attr("class","constline"),Rt.listConstellations(),At()}),se(Mt+u.stars.data,function(O,lt){if(O)return console.warn(O);var zt=Ne(lt,u.transform);a.selectAll(p+" .stars").data(zt.features).enter().append("path").attr("class","star"),At()}),se(Mt+oo("starnames"),function(O,lt){if(O)return console.warn(O);Object.assign(b,lt),At()}),se(Mt+u.dsos.data,function(O,lt){if(O)return console.warn(O);var zt=Ne(lt,u.transform);a.selectAll(p+" .dsos").data(zt.features).enter().append("path").attr("class","dso"),At()}),se(Mt+oo("dsonames"),function(O,lt){if(O)return console.warn(O);Object.assign(g,lt),At()}),se(Mt+oo("planets"),function(O,lt){if(O)return console.warn(O);var zt=kg(lt,w);a.selectAll(p+" .planets").data(zt).enter().append("path").attr("class","planet"),At()}),st.data.length>0&&st.data.forEach(function(O){B(O,"file")?se(O.file,O.callback):setTimeout(O.callback,0)},this),u.lang&&u.lang!=""&&Et(st.setLanguage(u.lang))}function wt(I){if(!(!I||I===1)){var O=c.scale(),lt=O*I,zt=m.scaleExtent(),Xt=R5*Math.sqrt(Math.abs(1-I));if(lt<zt[0]&&(lt=zt[0]),lt>zt[1]&&(lt=zt[1]),u.disableAnimations===!0)return c.scale(lt),m.scale(lt),At(),0;var ge=fe(O,lt);return dt({}).transition().duration(Xt).tween("scale",function(){return function(we){var He=ge(we);c.scale(He),At()}}).transition().duration(0).tween("scale",function(){m.scale(lt),At()}),Xt}}function Et(I){u=pe.set(I),At()}function J(I){var O=u.center,lt=c.rotate(),zt=c.scale(),Xt=P5,ge=!1,we,He,ve,bt=u.orientationfixed;qr(lt[1],1)===-qr(I.center[1],1)&&(ge=!0),u=u.set(I);var Ht=qr(qe(O,u.center),2),$t=qe([O[2],0],[u.center[2],0]);return Ht<Ag&&$t<Ag||u.disableAnimations===!0?(xt=Zr(u.center),c.rotate(xt),At(),0):(zt>z*S5?He=fe(zt,z):He=function(){return zt},$t===0?ve=function(){return lt[2]}:ve=wg(O[2],u.center[2]),Ht>=3.14&&(O=[O[0]+.01,O[1],O[2]]),u.orientationfixed=!1,Ht===0?we=function(){return u.center}:we=br(O,u.center),Xt=Ht!==0?Xt*Ht:Xt*$t,dt({}).transition().duration(Xt).tween("center",function(){return function(Ee){var Qr=Zr(we(Ee));Qr[2]=ve(Ee);var Ge=Ee<.5?He(Ee):He(1-Ee);ge&&(Qr[1]=lt[1]),c.scale(Ge),c.rotate(Qr),At()}}).transition().duration(0).tween("center",function(){u.orientationfixed=bt,xt=Zr(u.center),c.rotate(xt),At()}),Xt)}function le(I){et=Dc(),!(u.width===et&&!I)&&(x=et/Y,P=re(u.background.width)?et+u.background.width:et,v=Math.round(P/Y),z=N.scale*et/1024,q.style("width",ae(P)).style("height",ae(v)).attr("width",P*S).attr("height",v*S),m.scaleExtent([z,z*l]).scale(z*f),c.translate([P/2,v/2]).scale(z*f),F&&(F.style.height=ae(x)),z*=f,At())}function jt(I){var O=Nl(I.projection,I.projectionRatio);if(O){var lt=c.rotate(),zt=c.center(),Xt=c.scale(),ge=m.scaleExtent(),we=[],He=st.projection(u.projection).center(zt).translate([P/2,v/2]).scale([ge[0]]),ve=k5,bt=0,Ht=null,$t=fe(Y,O.ratio);(N.clip!=O.clip||u.disableAnimations===!0)&&(ve=0),cr(O.clip);var Ee=st.projection(I.projection).center(zt).translate([P/2,P/O.ratio/2]).scale([O.scale*et/1024]),Qr=u.adaptable;return Xt>ge[0]?(bt=wt(.1),setTimeout(jt,bt,I),bt+ve):((u.location||u.formFields.location)&&(Rt.fldEnable("horizon-show",O.clip),Rt.fldEnable("daylight-show",!O.clip)),c=hg(He,Ee),u.adaptable=!1,dt({}).transition().duration(ve).tween("projection",function(){return function(Ge){c.alpha(Ge).rotate(lt),h.projection(c),cr(O.clip),Y=$t(Ge),x=et/Y,q.style("width",ae(P)).style("height",ae(v)).attr("width",P*S).attr("height",v*S),F&&(F.style.height=ae(v)),At()}}).transition().duration(0).tween("projection",function(){N=O,Y=N.ratio,x=et/N.ratio,v=re(u.background.width)?x+u.background.width:x,z=N.scale*et/1024,q.style("width",ae(P)).style("height",ae(v)).attr("width",P*S).attr("height",v*S),F&&(F.style.height=ae(v)),u.projection=I.projection,c=st.projection(I.projection).rotate(lt).translate([P/2,v/2]).scale(z*f),h.projection(c),cr(N.clip),m.projection(c).scaleExtent([z,z*l]).scale(z*f),u.adaptable=Qr,z*=f,At()}),ve)}}function At(){var I=c.rotate();_.setTransform(S,0,0,S,0,0),u.adaptable&&(at=Math.sqrt(c.scale()/z)),at||(at=1),V=u.stars.size,Z=u.stars.exponent,j=u.dsos.size||V,G=u.dsos.exponent,u.orientationfixed&&u.center.length>2&&(I[2]=u.center[2],c.rotate(I)),u.center=[-I[0],-I[1],I[2]],Rt.setCenter(u.center,u.transform),$g(),me(),u.mw.show&&(a.selectAll(p+" .mw").each(function(bt){St(u.mw.style),h(bt),X(!1)&&(St(u.mw.style),h(gt(bt))),_.fill()}),u.transform!=="supergalactic"&&u.background.opacity>.95&&a.selectAll(p+" .mwbg").each(function(bt){St(u.background),h(bt),X(!0)&&(St(u.background),h(gt(bt))),_.fill()}));for(var O in u.lines)B(u.lines,O)&&u.lines[O].show===!0&&(St(u.lines[O]),a.selectAll(p+" ."+O).attr("d",h),_.stroke());if(B(u.lines.graticule,"lon")&&(ft(u.lines.graticule.lon),a.selectAll(p+" .graticule_lon").each(function(bt,Ht){if(ue(bt.geometry.coordinates)){var $t=c(bt.geometry.coordinates);Nc($t,bt.properties.orientation),_.fillText(bt.properties.value,$t[0],$t[1])}})),B(u.lines.graticule,"lat")&&(ft(u.lines.graticule.lat),a.selectAll(p+" .graticule_lat").each(function(bt,Ht){if(ue(bt.geometry.coordinates)){var $t=c(bt.geometry.coordinates);Nc($t,bt.properties.orientation),_.fillText(bt.properties.value,$t[0],$t[1])}})),u.constellations.bounds&&(a.selectAll(p+" .boundaryline").each(function(bt){if(St(u.constellations.boundStyle),st.constellation){var Ht=new RegExp("\\b"+st.constellation+"\\b");bt.ids.search(Ht)!==-1&&(_.lineWidth*=1.5,_.globalAlpha=1,_.setLineDash([]))}h(bt),_.stroke()}),_.setLineDash([])),u.constellations.lines&&a.selectAll(p+" .constline").each(function(bt){Jt(bt.properties.rank,u.constellations.lineStyle),h(bt),_.stroke()}),me(!0),u.constellations.names&&a.selectAll(p+" .constname").each(function(bt){if(ue(bt.geometry.coordinates)){Jt(bt.properties.rank,u.constellations.nameStyle);var Ht=c(bt.geometry.coordinates);_.fillText(Fg(bt),Ht[0],Ht[1])}}),u.stars.show&&(St(u.stars.style),a.selectAll(p+" .star").each(function(bt){if(ue(bt.geometry.coordinates)&&bt.properties.mag<=u.stars.limit){var Ht=c(bt.geometry.coordinates),$t=jg(bt);_.fillStyle=Ic(bt),_.beginPath(),_.arc(Ht[0],Ht[1],$t,0,2*Math.PI),_.closePath(),_.fill(),u.stars.designation&&bt.properties.mag<=u.stars.designationLimit*at&&(ft(u.stars.designationStyle),_.fillText(Ng(bt.id),Ht[0]+$t,Ht[1])),u.stars.propername&&bt.properties.mag<=u.stars.propernameLimit*at&&(ft(u.stars.propernameStyle),_.fillText(Dg(bt.id),Ht[0]-$t,Ht[1]))}})),u.dsos.show&&a.selectAll(p+" .dso").each(function(bt){if(ue(bt.geometry.coordinates)&&qc(bt.properties,u.dsos.limit)){var Ht=c(bt.geometry.coordinates),$t=bt.properties.type;u.dsos.colors===!0?St(u.dsos.symbols[$t]):St(u.dsos.style);var Ee=Cc(bt,Ht);B(u.dsos.symbols[$t],"stroke")?_.stroke():_.fill(),u.dsos.names&&qc(bt.properties,u.dsos.nameLimit*at)&&(ft(u.dsos.nameStyle),u.dsos.colors===!0&&(_.fillStyle=u.dsos.symbols[$t].fill),_.fillText(Ig(bt),Ht[0]+Ee,Ht[1]-Ee))}}),(u.location||u.formFields.location)&&u.planets.show&&st.origin){var lt=st.date(),zt=st.origin(lt).spherical();a.selectAll(p+" .planet").each(function(bt){var Ht=bt.id(),$t=12*at,Ee=bt(lt).equatorial(zt),Qr=ur(Ee.ephemeris.pos,Ke[u.transform]);if(ue(Qr)){var Ge=c(Qr),Ye=u.planets.symbols[Ht];if(u.planets.symbolType==="letter"?(ft(u.planets.symbolStyle),_.fillStyle=Ye.fill,_.fillText(Ye.letter,Ge[0],Ge[1])):Ht==="lun"?(B(Ye,"size")&&re(Ye.size)&&($t=Ye.size*at),_.fillStyle=Ye.fill,eo.symbol().type("crescent").size($t*$t).age(Ee.ephemeris.age).position(Ge)(_)):u.planets.symbolType==="disk"?($t=B(Ye,"size")&&re(Ye.size)?Ye.size*at:Lg(Ee.ephemeris),_.fillStyle=Ye.fill,eo.symbol().type("circle").size($t*$t).position(Ge)(_),_.fill()):u.planets.symbolType==="symbol"&&(ft(u.planets.symbolStyle),_.font=Og(u.planets.symbolStyle.font),_.fillStyle=Ye.fill,_.fillText(Ye[u.planets.symbolType],Ge[0],Ge[1])),u.planets.names){var Hg=Ee[u.planets.namesType];ft(u.planets.nameStyle),_.fillStyle=Ye.fill,_.fillText(Hg,Ge[0]-$t/2,Ge[1]+$t/2)}}})}if(st.data.length>0&&st.data.forEach(function(bt){bt.redraw()}),(u.location||u.formFields.location)&&u.daylight.show&&N.clip){var Xt=Qa("sol",void 0,w);if(Xt){var ge=st.zenith(),we=Xt.ephemeris.pos,He=qe(ge,we),ve=c(we);y.center(we),ht(He,ve),a.selectAll(p+" .daylight").datum(y).attr("d",h),_.fill(),_.fillStyle="#fff",ue(we)&&(_.beginPath(),_.arc(ve[0],ve[1],6,0,2*Math.PI),_.closePath(),_.fill())}}(u.location||u.formFields.location)&&u.horizon.show&&!N.clip&&(d.center(st.nadir()),St(u.horizon),a.selectAll(p+" .horizon").datum(d).attr("d",h),_.fill(),u.horizon.stroke&&_.stroke()),u.controls&&no(c.scale()),Ba&&st.runCallback()}function me(I){var O=c.rotate(),lt=Nl(u.projection,e.projectionRatio);c.rotate([0,0]),St(u.background),a.selectAll(p+" .outline").attr("d",h),I===!0?(_.globalAlpha=1,_.stroke()):_.fill(),c.rotate(O)}function ue(I){return N.clip&&qe(u.center,I)>xr?0:1}function L(){var I=ur(Wo.galactic,Ke[u.transform]);return ue(I)||(I=[I[0]+180,-I[1]]),c(I)}function X(I){var O=L();return!O||!isFinite(O[0])||!isFinite(O[1])?!1:_.isPointInPath(O[0]*S,O[1]*S)!==I}function gt(I){return I.reversedCopy||(I.reversedCopy={type:I.type,geometry:{type:I.geometry.type,coordinates:I.geometry.coordinates.map(function(O){return O.map(function(lt){return lt.slice().reverse()})})}}),I.reversedCopy}function St(I){_.fillStyle=I.fill||null,_.strokeStyle=I.stroke||null,_.lineWidth=I.width||null,_.globalAlpha=I.opacity!==null?I.opacity:1,_.font=I.font||null,B(I,"dash")?_.setLineDash(I.dash):_.setLineDash([]),_.beginPath()}function ft(I){_.fillStyle=I.fill,_.textAlign=I.align||"left",_.textBaseline=I.baseline||"bottom",_.globalAlpha=I.opacity!==null?I.opacity:1,_.font=I.font}function Jt(I,O){I=I||1,_.fillStyle=ee(O.fill)?O.fill[I-1]:null,_.strokeStyle=ee(O.stroke)?O.stroke[I-1]:null,_.lineWidth=ee(O.width)?O.width[I-1]:null,_.globalAlpha=ee(O.opacity)?O.opacity[I-1]:1,_.font=ee(O.font)?O.font[I-1]:null,B(O,"dash")?_.setLineDash(O.dash):_.setLineDash([]),_.textAlign=O.align||"left",_.textBaseline=O.baseline||"bottom",_.beginPath()}function ht(I,O){var lt,zt,Xt,ge,we=1.36,He=1.885;if(I>He){_.fillStyle="transparent",_.globalAlpha=0;return}I<=we?(zt="#daf1fa",Xt="#93d7f0",ge="#57c0e8",lt=-(we-I)/10):(lt=(I-we)/(He-we),zt=gr("#daf1fa","#e8c866")(lt),Xt=gr("#93c7d0","#ff854a")(lt),ge=gr("#57b0c8","#6caae2")(lt));var ve=_.createRadialGradient(O[0],O[1],0,O[0],O[1],300);ve.addColorStop(0,zt),ve.addColorStop(.2+.4*lt,Xt),ve.addColorStop(1,ge),_.fillStyle=ve,_.globalAlpha=.9*(1-Nt(lt,1.4))}function Nt(I,O){return(Math.pow(Math.E,I*O)-1)/(Math.pow(Math.E,O)-1)}function no(I){var O=D("celestial-zoomin"),lt=D("celestial-zoomout"),zt=N.scale*et/1024;!O||!lt||(O.disabled=I>=zt*l*.99,lt.disabled=I<=zt)}function cr(I){I?c.clipAngle(90):c.clipAngle(null)}function oo(I,O,lt){var zt=B(Wt[I],W)?"."+W:"";return lt=lt?"."+lt:".json",O=O?"."+O:"",I+O+zt+lt}function qc(I,O){return I.mag===999&&Math.sqrt(parseInt(I.dim))>O||I.mag!==999&&I.mag<=O}function Cc(I,O){var lt=I.properties,zt=Cg(lt)||9,Xt=qg(lt.type);return eo.symbol().type(Xt).size(zt).position(O)(_),Math.sqrt(zt)/2}function qg(I){return!I||!B(u.dsos.symbols,I)?"circle":u.dsos.symbols[I].shape}function Cg(I){return!I.mag||I.mag===999?Math.pow(parseInt(I.dim)*j*at/7,.5):Math.pow(2*j*at-I.mag,G)}function Ig(I){var O=u.dsos.namesType,lt=I.id;return O==="desig"||!B(g,lt)?I.properties.desig:B(g[lt],O)?g[lt][O]:I.properties.desig}function Ng(I){return B(b,I)?b[I][u.stars.designationType]:""}function Dg(I){var O=u.stars.propernameType;return B(b,I)?B(b[I],O)?b[I][O]:b[I].name:""}function jg(I){var O=I.properties.mag;if(O===null)return .1;var lt=V*at*Math.exp(Z*(O+2));return Math.max(lt,.1)}function Ic(I){var O=I.properties.bv;return!u.stars.colors||isNaN(O)?u.stars.style.fill:Va(O)}function Fg(I){return I.properties[u.constellations.namesType]}function Lg(I){var O=I.mag;if(O===null)return 2;var lt=4*at*Math.exp(-.05*(O+2));return Math.max(lt,2)}function Og(I){var O=I.replace(/(^\D*)(\d+)(\D.+$)/i,"$2");return O=Math.round(at*O),I.replace(/(^\D*)(\d+)(\D.+$)/i,"$1"+O+"$3")}function Nc(I,O){for(var lt=O.split(""),zt="center",Xt="middle",ge=lt.length-1;ge>=0;ge--)switch(lt[ge]){case"N":Xt="bottom";break;case"S":Xt="top";break;case"E":zt="left",I[0]+=2;break;case"W":zt="right",I[0]-=2;break}return _.textAlign=zt,_.textBaseline=Xt,I}function $g(){_.clearRect(0,0,P+K[0],v+K[1])}function Dc(){var I=0;return re(u.width)&&u.width>0?I=u.width:F?I=F.getBoundingClientRect().width-K[0]*2:I=document.body.getBoundingClientRect().width-K[0]*2,I}function Nl(I,O){if(B(Xr,I)){var lt=Xr[I];return B(lt,"ratio")||(lt.ratio=2),lt.ratio=O||lt.ratio,lt}}function Dl(){if(!(!i||i.length<1)){var I,O=i[o];switch(O.param){case"projection":I=jt({projection:O.value});break;case"center":I=J({center:O.value});break;case"zoom":I=wt(O.value)}O.callback&&setTimeout(O.callback,I),o++,s===!0&&o===i.length&&(o=0),I=O.duration===0||O.duration<I?I:O.duration,o<i.length&&(n=setTimeout(Dl,I))}}function Ug(){clearTimeout(n)}this.clip=ue,this.context=_,this.exportSVG=function(I){return Ka(w,I)},this.metrics=function(){return{width:et,height:x,margin:K,scale:c.scale()}},this.setStyle=St,this.setTextStyle=ft,this.setStyleA=Jt,this.setConstStyle=function(I,O){var lt=Ue(O);_.font=lt[I]},this.symbol=eo.symbol,this.dsoSymbol=Cc,this.redraw=At,this.resize=function(I){return I!==void 0&&(B(I,"width")?u.width=I.width:re(I)&&(u.width=I)),le(!0),u.width},this.reload=function(I){var O;I&&Object.assign(u,pe.set(I)),u.follow==="center"&&B(u,"center")?O=Zr(u.center):u.follow==="zenith"&&(O=Zr(st.zenith())),O&&c.rotate(O),a.selectAll(p+" *").remove(),rt()},this.apply=function(I){Et(I)},this.reproject=function(I){return jt(I)},this.rotate=function(I){return I?J(I):u.center},this.zoomBy=function(I){return I?wt(I):c.scale()/z},this.color=function(I){return I&&B(u.dsos.symbols,I)?u.dsos.symbols[I].fill:"#000"},this.starColor=Ic,this.animate=function(I,O){I&&(i=I,o=0,s=!!O,Dl())},this.stop=function(I){Ug(),I===!0&&(i=[])},this.go=function(I){i.length<1||(I&&I<i.length&&(o=I),Dl())},rt()}};["constellations","constellation"].forEach(function(t){Object.defineProperty(st,t,{get:function(){return Il?Il[t]:void 0},set:function(e){Il&&(Il[t]=e)},enumerable:!0,configurable:!0})});st.display=function(t){var e=new Ac(t);Object.defineProperties(e,{});var r=Object.getOwnPropertyDescriptors(e);for(var n in r)n==="constructor"||n==="constellations"||n==="constellation"||Object.defineProperty(st,n,r[n]);return e};window.Celestial=st;})();