@decidables/detectable-elements 0.0.3 → 0.1.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.
- package/CHANGELOG.md +17 -0
- package/LICENSE.md +641 -750
- package/README.md +22 -10
- package/lib/detectableElements.esm.js +32 -32
- package/lib/detectableElements.esm.js.map +1 -1
- package/lib/detectableElements.esm.min.js +1 -1
- package/lib/detectableElements.esm.min.js.map +1 -1
- package/lib/detectableElements.umd.js +32 -32
- package/lib/detectableElements.umd.js.map +1 -1
- package/lib/detectableElements.umd.min.js +1 -1
- package/lib/detectableElements.umd.min.js.map +1 -1
- package/package.json +17 -9
|
@@ -3,7 +3,7 @@ function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterat
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/var _,S,A=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,E=Symbol(),T=new Map,M=function(){function t(e,r){if(n(this,t),this._$cssResult$=!0,r!==E)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}return a(t,[{key:"styleSheet",get:function(){var t=T.get(this.cssText);return A&&void 0===t&&(T.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}},{key:"toString",value:function(){return this.cssText}}]),t}(),C=function(t){return new M("string"==typeof t?t:t+"",E)},N=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new M(a,E)},R=A?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=x(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return C(n)}(t):t},q=window.trustedTypes,P=q?q.emptyScript:"",z=window.reactiveElementPolyfillSupport,F={toAttribute:function(t,e){switch(e){case Boolean:t=t?P:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},$=function(t,e){return e!==t&&(e==e||t==t)},O={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:$},I=function(r){o(c,h(HTMLElement));var i,s,l=p(c);function c(){var t;return n(this,c),(t=l.call(this))._$Et=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Ei=null,t.o(),t}return a(c,[{key:"o",value:function(){var t,e=this;this._$Ep=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){A?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,i=this.constructor._$Eh(t,a);if(void 0!==i&&!0===a.reflect){var o=(null!==(r=null===(n=a.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:F.toAttribute)(e,a.type);this._$Ei=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,a,i=this.constructor,o=i._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){var s=i.getPropertyOptions(o),l=s.converter,c=null!==(a=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==a?a:F.fromAttribute;this._$Ei=o,this[o]=c(e,s.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||$)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}},{key:"_$EC",value:(i=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),s=function(){var t=this,n=arguments;return new Promise((function(r,a){var o=i.apply(t,n);function s(t){e(o,r,a,s,l,"next",t)}function l(t){e(o,r,a,s,l,"throw",t)}s(void 0)}))},function(){return s.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$E_&&(this._$E_.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$E_=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var a=t._$Eh(r,n);void 0!==a&&(t._$Eu.set(a,r),e.push(a))})),e}},{key:"createProperty",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){var r="symbol"==t(e)?Symbol():"__"+e,a=this.getPropertyDescriptor(e,r,n);void 0!==a&&Object.defineProperty(this.prototype,e,a)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var a=this[t];this[e]=r,this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||O}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=x([].concat(y(Object.getOwnPropertyNames(n)),y(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var a=e.value;this.createProperty(a,n[a])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=x(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var a=n.value;e.unshift(R(a))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(R(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),c}();I.finalized=!0,I.elementProperties=new Map,I.elementStyles=[],I.shadowRootOptions={mode:"open"},null==z||z({ReactiveElement:I}),(null!==(_=globalThis.reactiveElementVersions)&&void 0!==_?_:globalThis.reactiveElementVersions=[]).push("1.1.2");var H=globalThis.trustedTypes,U=H?H.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,D="lit$".concat((Math.random()+"").slice(9),"$"),L="?"+D,j="<".concat(L,">"),V=document,B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return V.createComment(t)},K=function(e){return null===e||"object"!=t(e)&&"function"!=typeof e},X=Array.isArray,G=function(t){var e;return X(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,W=/>/g,Q=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,J=/'/g,tt=/"/g,et=/^(?:script|style|textarea)$/i,nt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return{_$litType$:t,strings:e,values:r}}},rt=nt(1),at=nt(2),it=Symbol.for("lit-noChange"),ot=Symbol.for("lit-nothing"),st=new WeakMap,lt=V.createTreeWalker(V,129,null,!1),ct=function(t,e){for(var n,r=t.length-1,a=[],i=2===e?"<svg>":"",o=Z,s=0;s<r;s++){for(var l=t[s],c=void 0,u=void 0,h=-1,d=0;d<l.length&&(o.lastIndex=d,null!==(u=o.exec(l)));)d=o.lastIndex,o===Z?"!--"===u[1]?o=Y:void 0!==u[1]?o=W:void 0!==u[2]?(et.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=Q):void 0!==u[3]&&(o=Q):o===Q?">"===u[0]?(o=null!=n?n:Z,h=-1):void 0===u[1]?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=void 0===u[3]?Q:'"'===u[3]?tt:J):o===tt||o===J?o=Q:o===Y||o===W?o=Z:(o=Q,n=void 0);var f=o===Q&&t[s+1].startsWith("/>")?" ":"";i+=o===Z?l+j:h>=0?(a.push(c),l.slice(0,h)+"$lit$"+l.slice(h)+D+f):l+D+(-2===h?(a.push(void 0),s):f)}var p=i+(t[r]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(p):p,a]},ut=function(){function t(e,r){var a,i=e.strings,o=e._$litType$;n(this,t),this.parts=[];var s=0,l=0,c=i.length-1,u=this.parts,h=g(ct(i,o),2),d=h[0],f=h[1];if(this.el=t.createElement(d,r),lt.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,y(v.childNodes))}for(;null!==(a=lt.nextNode())&&u.length<c;){if(1===a.nodeType){if(a.hasAttributes()){var m,b=[],w=x(a.getAttributeNames());try{for(w.s();!(m=w.n()).done;){var k=m.value;if(k.endsWith("$lit$")||k.startsWith(D)){var _=f[l++];if(b.push(k),void 0!==_){var S=a.getAttribute(_.toLowerCase()+"$lit$").split(D),A=/([.?@])?(.*)/.exec(_);u.push({type:1,index:s,name:A[2],strings:S,ctor:"."===A[1]?bt:"?"===A[1]?yt:"@"===A[1]?wt:mt})}else u.push({type:6,index:s})}}}catch(t){w.e(t)}finally{w.f()}for(var E=0,T=b;E<T.length;E++){var M=T[E];a.removeAttribute(M)}}if(et.test(a.tagName)){var C=a.textContent.split(D),N=C.length-1;if(N>0){a.textContent=H?H.emptyScript:"";for(var R=0;R<N;R++)a.append(C[R],B()),lt.nextNode(),u.push({type:2,index:++s});a.append(C[N],B())}}}else if(8===a.nodeType)if(a.data===L)u.push({type:2,index:s});else for(var q=-1;-1!==(q=a.data.indexOf(D,q+1));)u.push({type:7,index:s}),q+=D.length-1;s++}}return a(t,null,[{key:"createElement",value:function(t,e){var n=V.createElement("template");return n.innerHTML=t,n}}]),t}();function ht(t,e){var n,r,a,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===it)return e;var l=void 0!==s?null===(n=o._$Cl)||void 0===n?void 0:n[s]:o._$Cu,c=K(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,o,s),void 0!==s?(null!==(a=(i=o)._$Cl)&&void 0!==a?a:i._$Cl=[])[s]=l:o._$Cu=l),void 0!==l&&(e=ht(t,l._$AS(t,e.values),l,s)),e}var dt,ft,pt=function(){function t(e,r){n(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=r}return a(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,a=n.parts,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:V).importNode(r,!0);lt.currentNode=i;for(var o=lt.nextNode(),s=0,l=0,c=a[0];void 0!==c;){if(s===c.index){var u=void 0;2===c.type?u=new vt(o,o.nextSibling,this,t):1===c.type?u=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(u=new kt(o,this,t)),this.v.push(u),c=a[++l]}s!==(null==c?void 0:c.index)&&(o=lt.nextNode(),s++)}return i}},{key:"m",value:function(t){var e,n=0,r=x(this.v);try{for(r.s();!(e=r.n()).done;){var a=e.value;void 0!==a&&(void 0!==a.strings?(a._$AI(t,a,n),n+=a.strings.length-2):a._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),vt=function(){function t(e,r,a,i){var o;n(this,t),this.type=2,this._$AH=ot,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=a,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return a(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=ht(this,t,e),K(t)?t===ot||null==t||""===t?(this._$AH!==ot&&this._$AR(),this._$AH=ot):t!==this._$AH&&t!==it&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):G(t)?this.A(t):this.$(t)}},{key:"M",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"S",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}},{key:"$",value:function(t){this._$AH!==ot&&K(this._$AH)?this._$AA.nextSibling.data=t:this.S(V.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ut.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(n);else{var i=new pt(a,this),o=i.p(this.options);i.m(n),this.S(o),this._$AH=i}}},{key:"_$AC",value:function(t){var e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new ut(t)),e}},{key:"A",value:function(e){X(this._$AH)||(this._$AH=[],this._$AR());var n,r,a=this._$AH,i=0,o=x(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i===a.length?a.push(n=new t(this.M(B()),this.M(B()),this,this.options)):n=a[i],n._$AI(s),i++}}catch(t){o.e(t)}finally{o.f()}i<a.length&&(this._$AR(n&&n._$AB.nextSibling,i),a.length=i)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),mt=function(){function t(e,r,a,i,o){n(this,t),this.type=1,this._$AH=ot,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,a.length>2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=ot}return a(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=this.strings,i=!1;if(void 0===a)t=ht(this,t,e,0),(i=!K(t)||t!==this._$AH&&t!==it)&&(this._$AH=t);else{var o,s,l=t;for(t=a[0],o=0;o<a.length-1;o++)(s=ht(this,l[n+o],e,o))===it&&(s=this._$AH[o]),i||(i=!K(s)||s!==this._$AH[o]),s===ot?t=ot:t!==ot&&(t+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}i&&!r&&this.k(t)}},{key:"k",value:function(t){t===ot?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),bt=function(t){o(r,mt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=3,t}return a(r,[{key:"k",value:function(t){this.element[this.name]=t===ot?void 0:t}}]),r}(),gt=H?H.emptyScript:"",yt=function(t){o(r,mt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=4,t}return a(r,[{key:"k",value:function(t){t&&t!==ot?this.element.setAttribute(this.name,gt):this.element.removeAttribute(this.name)}}]),r}(),wt=function(t){o(r,mt);var e=p(r);function r(t,a,i,o,s){var l;return n(this,r),(l=e.call(this,t,a,i,o,s)).type=5,l}return a(r,[{key:"_$AI",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=ht(this,t,n,0))&&void 0!==e?e:ot)!==it){var r=this._$AH,a=t===ot&&r!==ot||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==ot&&(r===ot||a);a&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),r}(),kt=function(){function t(e,r,a){n(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=a}return a(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){ht(this,t)}}]),t}(),xt=window.litHtmlPolyfillSupport;null==xt||xt(ut,vt),(null!==(S=globalThis.litHtmlVersions)&&void 0!==S?S:globalThis.litHtmlVersions=[]).push("2.1.1");var _t=function(t){o(r,I);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).renderOptions={host:d(t)},t._$Dt=void 0,t}return a(r,[{key:"createRenderRoot",value:function(){var t,e,n=m(s(r.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),m(s(r.prototype),"update",this).call(this,t),this._$Dt=function(t,e,n){var r,a,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new vt(e.insertBefore(B(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;m(s(r.prototype),"connectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;m(s(r.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return it}}]),r}();_t.finalized=!0,_t._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:_t});var St=globalThis.litElementPolyfillSupport;function At(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Et(t){var e=t,n=t,r=t;function a(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<0?a=o+1:i=o}while(a<i)}return a}return 2!==t.length&&(e=function(e,n){return t(e)-n},n=At,r=function(e,n){return At(t(e),n)}),{left:a,center:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=a(t,n,r,i-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<=0?a=o+1:i=o}while(a<i)}return a}}}null==St||St({LitElement:_t}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.1.1");var Tt=Et(At).right;Et((function(t){return null===t?NaN:+t})).center;var Mt=Tt;function Ct(t,e){var n,r;if(void 0===e){var a,i=x(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;null!=o&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}}catch(t){i.e(t)}finally{i.f()}}else{var s,l=-1,c=x(t);try{for(c.s();!(s=c.n()).done;){var u=s.value;null!=(u=e(u,++l,t))&&(void 0===n?u>=u&&(n=r=u):(n>u&&(n=u),r<u&&(r=u)))}}catch(t){c.e(t)}finally{c.f()}}return[n,r]}var Nt=function(){function t(){n(this,t),this._partials=new Float64Array(32),this._n=0}return a(t,[{key:"add",value:function(t){for(var e=this._partials,n=0,r=0;r<this._n&&r<32;r++){var a=e[r],i=t+a,o=Math.abs(t)<Math.abs(a)?t-(i-a):a-(i-t);o&&(e[n++]=o),t=i}return e[n]=t,this._n=n+1,this}},{key:"valueOf",value:function(){var t,e,n,r=this._partials,a=this._n,i=0;if(a>0){for(i=r[--a];a>0&&(t=i,!(n=(e=r[--a])-((i=t+e)-t))););a>0&&(n<0&&r[a-1]<0||n>0&&r[a-1]>0)&&(e=2*n)==(t=i+e)-i&&(i=t)}return i}}]),t}();function Rt(t){return t}var qt=Array.prototype.slice;function Pt(t){return function(){return t}}var zt=Math.sqrt(50),Ft=Math.sqrt(10),$t=Math.sqrt(2);function Ot(t,e,n){var r,a,i,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(a=t,t=e,e=a),0===(o=It(t,e,n))||!isFinite(o))return[];if(o>0){var l=Math.round(t/o),c=Math.round(e/o);for(l*o<t&&++l,c*o>e&&--c,i=new Array(a=c-l+1);++s<a;)i[s]=(l+s)*o}else{o=-o;var u=Math.round(t*o),h=Math.round(e*o);for(u/o<t&&++u,h/o>e&&--h,i=new Array(a=h-u+1);++s<a;)i[s]=(u+s)/o}return r&&i.reverse(),i}function It(t,e,n){var r=(e-t)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=zt?10:i>=Ft?5:i>=$t?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=zt?10:i>=Ft?5:i>=$t?2:1)}function Ht(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=zt?a*=10:i>=Ft?a*=5:i>=$t&&(a*=2),e<t?-a:a}function Ut(t){return Math.ceil(Math.log(function(t,e){var n=0;if(void 0===e){var r,a=x(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;null!=i&&(i=+i)>=i&&++n}}catch(t){a.e(t)}finally{a.f()}}else{var o,s=-1,l=x(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;null!=(c=e(c,++s,t))&&(c=+c)>=c&&++n}}catch(t){l.e(t)}finally{l.f()}}return n}(t))/Math.LN2)+1}function Dt(){var t=Rt,e=Ct,n=Ut;function r(r){Array.isArray(r)||(r=Array.from(r));var a,i,o=r.length,s=new Array(o);for(a=0;a<o;++a)s[a]=t(r[a],a,r);var l=e(s),c=l[0],u=l[1],h=n(s,c,u);if(!Array.isArray(h)){var d=u,f=+h;if(e===Ct){var p=function(t,e,n){for(var r;;){var a=It(t,e,n);if(a===r||0===a||!isFinite(a))return[t,e];a>0?(t=Math.floor(t/a)*a,e=Math.ceil(e/a)*a):a<0&&(t=Math.ceil(t*a)/a,e=Math.floor(e*a)/a),r=a}}(c,u,f),v=g(p,2);c=v[0],u=v[1]}if((h=Ot(c,u,f))[h.length-1]>=u)if(d>=u&&e===Ct){var m=It(c,u,f);isFinite(m)&&(m>0?u=(Math.floor(u/m)+1)*m:m<0&&(u=(Math.ceil(u*-m)+1)/-m))}else h.pop()}for(var b=h.length;h[0]<=c;)h.shift(),--b;for(;h[b-1]>u;)h.pop(),--b;var y,w=new Array(b+1);for(a=0;a<=b;++a)(y=w[a]=[]).x0=a>0?h[a-1]:c,y.x1=a<b?h[a]:u;for(a=0;a<o;++a)null!=(i=s[a])&&c<=i&&i<=u&&w[Mt(h,i,0,b)].push(r[a]);return w}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Pt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Pt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Pt(qt.call(t)):Pt(t),r):n},r}var Lt=regeneratorRuntime.mark(jt);function jt(t){var e,n,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=x(t),a.prev=1,e.s();case 3:if((n=e.n()).done){a.next=8;break}return r=n.value,a.delegateYield(r,"t0",6);case 6:a.next=3;break;case 8:a.next=13;break;case 10:a.prev=10,a.t1=a.catch(1),e.e(a.t1);case 13:return a.prev=13,e.f(),a.finish(13);case 16:case"end":return a.stop()}}),Lt,null,[[1,10,13,16]])}function Vt(t,e,n){t=+t,e=+e,n=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(a);++r<a;)i[r]=t+r*n;return i}function Bt(t){return t}function Kt(t){return"translate("+t+",0)"}function Xt(t){return"translate(0,"+t+")"}function Gt(t){return function(e){return+t(e)}}function Zt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Yt(){return!this.__axis}function Wt(t,e){var n=[],r=null,a=null,i=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Kt:Xt;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==a?e.tickFormat?e.tickFormat.apply(e,n):Bt:a,v=Math.max(i,0)+s,m=e.range(),b=+m[0]+l,g=+m[m.length-1]+l,y=(e.bandwidth?Zt:Gt)(e.copy(),l),w=d.selection?d.selection():d,k=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(f,e).order(),_=x.exit(),S=x.enter().append("g").attr("class","tick"),A=x.select("line"),E=x.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(S),A=A.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*i)),E=E.merge(S.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==w&&(k=k.transition(d),x=x.transition(d),A=A.transition(d),E=E.transition(d),_=_.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),S.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),_.remove(),k.attr("d",4===t||2===t?o?"M"+c*o+","+b+"H"+l+"V"+g+"H"+c*o:"M"+l+","+b+"V"+g:o?"M"+b+","+c*o+"V"+l+"H"+g+"V"+c*o:"M"+b+","+l+"H"+g),x.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),A.attr(u+"2",c*i),E.attr(u,c*v).text(p),w.filter(Yt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=y}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(a=t,d):a},d.tickSize=function(t){return arguments.length?(i=o=+t,d):i},d.tickSizeInner=function(t){return arguments.length?(i=+t,d):i},d.tickSizeOuter=function(t){return arguments.length?(o=+t,d):o},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Qt(t){return Wt(3,t)}function Jt(t){return Wt(4,t)}var te={value:function(){}};function ee(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ne(r)}function ne(t){this._=t}function re(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ae(t,e){for(var n,r=0,a=t.length;r<a;++r)if((n=t[r]).name===e)return n.value}function ie(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=te,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ne.prototype=ee.prototype={constructor:ne,on:function(t,e){var n,r=this._,a=re(t+"",r),i=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<o;)if(n=(t=a[i]).type)r[n]=ie(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ie(r[n],t.name,null);return this}for(;++i<o;)if((n=(t=a[i]).type)&&(n=ae(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,a=new Array(n),i=0;i<n;++i)a[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,a)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,i=r.length;a<i;++a)r[a].value.apply(e,n)}};var oe="http://www.w3.org/1999/xhtml",se={svg:"http://www.w3.org/2000/svg",xhtml:oe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function le(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),se.hasOwnProperty(e)?{space:se[e],local:t}:t}function ce(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===oe&&e.documentElement.namespaceURI===oe?e.createElement(t):e.createElementNS(n,t)}}function ue(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function he(t){var e=le(t);return(e.local?ue:ce)(e)}function de(){}function fe(t){return null==t?de:function(){return this.querySelector(t)}}function pe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ve(){return[]}function me(t){return null==t?ve:function(){return this.querySelectorAll(t)}}function be(t){return function(){return this.matches(t)}}function ge(t){return function(e){return e.matches(t)}}var ye=Array.prototype.find;function we(){return this.firstElementChild}var ke=Array.prototype.filter;function xe(){return Array.from(this.children)}function _e(t){return new Array(t.length)}function Se(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ae(t){return function(){return t}}function Ee(t,e,n,r,a,i){for(var o,s=0,l=e.length,c=i.length;s<c;++s)(o=e[s])?(o.__data__=i[s],r[s]=o):n[s]=new Se(t,i[s]);for(;s<l;++s)(o=e[s])&&(a[s]=o)}function Te(t,e,n,r,a,i,o){var s,l,c,u=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?a[s]=l:u.set(c,l));for(s=0;s<d;++s)c=o.call(t,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Se(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(f[s])===l&&(a[s]=l)}function Me(t){return t.__data__}function Ce(e){return"object"===t(e)&&"length"in e?e:Array.from(e)}function Ne(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Re(t){return function(){this.removeAttribute(t)}}function qe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pe(t,e){return function(){this.setAttribute(t,e)}}function ze(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $e(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Oe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ie(t){return function(){this.style.removeProperty(t)}}function He(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ue(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function De(t,e){return t.style.getPropertyValue(e)||Oe(t).getComputedStyle(t,null).getPropertyValue(e)}function Le(t){return function(){delete this[t]}}function je(t,e){return function(){this[t]=e}}function Ve(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Be(t){return t.trim().split(/^|\s+/)}function Ke(t){return t.classList||new Xe(t)}function Xe(t){this._node=t,this._names=Be(t.getAttribute("class")||"")}function Ge(t,e){for(var n=Ke(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function Ze(t,e){for(var n=Ke(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function Ye(t){return function(){Ge(this,t)}}function We(t){return function(){Ze(this,t)}}function Qe(t,e){return function(){(e.apply(this,arguments)?Ge:Ze)(this,t)}}function Je(){this.textContent=""}function tn(t){return function(){this.textContent=t}}function en(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function nn(){this.innerHTML=""}function rn(t){return function(){this.innerHTML=t}}function an(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function on(){this.nextSibling&&this.parentNode.appendChild(this)}function sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ln(){return null}function cn(){var t=this.parentNode;t&&t.removeChild(this)}function un(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function hn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function dn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fn(t){return function(){var e=this.__on;if(e){for(var n,r=0,a=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++a]=n:this.removeEventListener(n.type,n.listener,n.options);++a?e.length=a:delete this.__on}}}function pn(t,e,n){return function(){var r,a=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(a)for(var o=0,s=a.length;o<s;++o)if((r=a[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},a?a.push(r):this.__on=[r]}}function vn(t,e,n){var r=Oe(t),a=r.CustomEvent;"function"==typeof a?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function mn(t,e){return function(){return vn(this,t,e)}}function bn(t,e){return function(){return vn(this,t,e.apply(this,arguments))}}Se.prototype={constructor:Se,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)}},Xe.prototype={add:function(t){this._names.indexOf(t)<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}};var gn=regeneratorRuntime.mark(yn);function yn(){var t,e,n,r,a,i,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=13;break}r=t[e],a=0,i=r.length;case 3:if(!(a<i)){s.next=10;break}if(!(o=r[a])){s.next=7;break}return s.next=7,o;case 7:++a,s.next=3;break;case 10:++e,s.next=1;break;case 13:case"end":return s.stop()}}),gn,this)}var wn=[null];function kn(t,e){this._groups=t,this._parents=e}function xn(){return new kn([[document.documentElement]],wn)}function _n(t){return"string"==typeof t?new kn([[document.querySelector(t)]],[document.documentElement]):new kn([[t]],wn)}function Sn(t,e){if(t=function(t){for(var e;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.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]}kn.prototype=xn.prototype=i({constructor:kn,select:function(t){"function"!=typeof t&&(t=fe(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o,s=e[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(o=t.call(i,i.__data__,u,s))&&("__data__"in i&&(o.__data__=i.__data__),c[u]=o);return new kn(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return pe(t.apply(this,arguments))}}(t):me(t);for(var e=this._groups,n=e.length,r=[],a=[],i=0;i<n;++i)for(var o,s=e[i],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),a.push(o));return new kn(r,a)},selectChild:function(t){return this.select(null==t?we:function(t){return function(){return ye.call(this.children,t)}}("function"==typeof t?t:ge(t)))},selectChildren:function(t){return this.selectAll(null==t?xe:function(t){return function(){return ke.call(this.children,t)}}("function"==typeof t?t:ge(t)))},filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new kn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Me);var n=e?Te:Ee,r=this._parents,a=this._groups;"function"!=typeof t&&(t=Ae(t));for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],h=a[c],d=h.length,f=Ce(t.call(u,u&&u.__data__,c,r)),p=f.length,v=s[c]=new Array(p),m=o[c]=new Array(p),b=l[c]=new Array(d);n(u,h,v,m,b,f,e);for(var g,y,w=0,k=0;w<p;++w)if(g=v[w]){for(w>=k&&(k=w+1);!(y=m[k])&&++k<p;);g._next=y||null}}return(o=new kn(o,r))._enter=s,o._exit=l,o},enter:function(){return new kn(this._enter||this._groups.map(_e),this._parents)},exit:function(){return new kn(this._exit||this._groups.map(_e),this._parents)},join:function(t,e,n){var r=this.enter(),a=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(a=e(a))&&(a=a.selection()),null==n?i.remove():n(i),r&&a?r.merge(a).order():a},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),l=0;l<o;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<a;++l)s[l]=n[l];return new kn(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,a=t[e],i=a.length-1,o=a[i];--i>=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ne);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o,s=n[i],l=s.length,c=a[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new kn(a,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null},size:function(){var t,e=0,n=x(this);try{for(n.s();!(t=n.n()).done;){t.value;++e}}catch(t){n.e(t)}finally{n.f()}return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a,i=e[n],o=0,s=i.length;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this},attr:function(t,e){var n=le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?qe:Re:"function"==typeof e?n.local?$e:Fe:n.local?ze:Pe)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ie:"function"==typeof e?Ue:He)(t,e,null==n?"":n)):De(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Le:"function"==typeof e?Ve:je)(t,e)):this.node()[t]},classed:function(t,e){var n=Be(t+"");if(arguments.length<2){for(var r=Ke(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each(("function"==typeof e?Qe:e?Ye:We)(n,e))},text:function(t){return arguments.length?this.each(null==t?Je:("function"==typeof t?en:tn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?nn:("function"==typeof t?an:rn)(t)):this.node().innerHTML},raise:function(){return this.each(on)},lower:function(){return this.each(sn)},append:function(t){var e="function"==typeof t?t:he(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:he(t),r=null==e?ln:"function"==typeof e?e:fe(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(cn)},clone:function(t){return this.select(t?hn:un)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,a,i=dn(t+""),o=i.length;if(!(arguments.length<2)){for(s=e?pn:fn,r=0;r<o;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((a=i[r]).type===l.type&&a.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?bn:mn)(t,e))}},Symbol.iterator,yn);var An={passive:!1},En={capture:!0,passive:!1};function Tn(t){t.stopImmediatePropagation()}function Mn(t){t.preventDefault(),t.stopImmediatePropagation()}var Cn=function(t){return function(){return t}};function Nn(t,e){var n=e.sourceEvent,r=e.subject,a=e.target,i=e.identifier,o=e.active,s=e.x,l=e.y,c=e.dx,u=e.dy,h=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}function Rn(t){return!t.ctrlKey&&!t.button}function qn(){return this.parentNode}function Pn(t,e){return null==e?{x:t.x,y:t.y}:e}function zn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fn(){var t,e,n,r,a=Rn,i=qn,o=Pn,s=zn,l={},c=ee("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",b,An).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&a.call(this,o,s)){var l=y(this,i.call(this,o,s),o,s,"mouse");l&&(_n(o.view).on("mousemove.drag",p,En).on("mouseup.drag",v,En),function(t){var e=t.document.documentElement,n=_n(t).on("dragstart.drag",Mn,En);"onselectstart"in e?n.on("selectstart.drag",Mn,En):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(o.view),Tn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(Mn(r),!n){var a=r.clientX-t,i=r.clientY-e;n=a*a+i*i>h}l.mouse("drag",r)}function v(t){_n(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=_n(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mn,En),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,n),Mn(t),l.mouse("end",t)}function m(t,e){if(a.call(this,t,e)){var n,r,o=t.changedTouches,s=i.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=y(this,s,t,e,o[n].identifier,o[n]))&&(Tn(t),r("start",t,o[n]))}}function b(t){var e,n,r=t.changedTouches,a=r.length;for(e=0;e<a;++e)(n=l[r[e].identifier])&&(Mn(t),n("drag",t,r[e]))}function g(t){var e,n,a=t.changedTouches,i=a.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<i;++e)(n=l[a[e].identifier])&&(Tn(t),n("end",t,a[e]))}function y(t,e,n,r,a,i){var s,h,f,p=c.copy(),v=Sn(i||n,e);if(null!=(f=o.call(t,new Nn("beforestart",{sourceEvent:n,target:d,identifier:a,active:u,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-v[0]||0,h=f.y-v[1]||0,function n(i,o,c){var m,b=v;switch(i){case"start":l[a]=n,m=u++;break;case"end":delete l[a],--u;case"drag":v=Sn(c||o,e),m=u}p.call(i,t,new Nn(i,{sourceEvent:o,subject:f,target:d,identifier:a,active:m,x:v[0]+s,y:v[1]+h,dx:v[0]-b[0],dy:v[1]-b[1],dispatch:p}),r)}}return d.filter=function(t){return arguments.length?(a="function"==typeof t?t:Cn(!!t),d):a},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Cn(t),d):i},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:Cn(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Cn(!!t),d):s},d.on=function(){var t=c.on.apply(c,arguments);return t===c?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function $n(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function On(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function In(){}Nn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Hn=1/.7,Un="\\s*([+-]?\\d+)\\s*",Dn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jn=/^#([0-9a-f]{3,8})$/,Vn=new RegExp("^rgb\\("+[Un,Un,Un]+"\\)$"),Bn=new RegExp("^rgb\\("+[Ln,Ln,Ln]+"\\)$"),Kn=new RegExp("^rgba\\("+[Un,Un,Un,Dn]+"\\)$"),Xn=new RegExp("^rgba\\("+[Ln,Ln,Ln,Dn]+"\\)$"),Gn=new RegExp("^hsl\\("+[Dn,Ln,Ln]+"\\)$"),Zn=new RegExp("^hsla\\("+[Dn,Ln,Ln,Dn]+"\\)$"),Yn={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};function Wn(){return this.rgb().formatHex()}function Qn(){return this.rgb().formatRgb()}function Jn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=jn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tr(e):3===n?new ar(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?er(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?er(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Vn.exec(t))?new ar(e[1],e[2],e[3],1):(e=Bn.exec(t))?new ar(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kn.exec(t))?er(e[1],e[2],e[3],e[4]):(e=Xn.exec(t))?er(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Gn.exec(t))?lr(e[1],e[2]/100,e[3]/100,1):(e=Zn.exec(t))?lr(e[1],e[2]/100,e[3]/100,e[4]):Yn.hasOwnProperty(t)?tr(Yn[t]):"transparent"===t?new ar(NaN,NaN,NaN,0):null}function tr(t){return new ar(t>>16&255,t>>8&255,255&t,1)}function er(t,e,n,r){return r<=0&&(t=e=n=NaN),new ar(t,e,n,r)}function nr(t){return t instanceof In||(t=Jn(t)),t?new ar((t=t.rgb()).r,t.g,t.b,t.opacity):new ar}function rr(t,e,n,r){return 1===arguments.length?nr(t):new ar(t,e,n,null==r?1:r)}function ar(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ir(){return"#"+sr(this.r)+sr(this.g)+sr(this.b)}function or(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function sr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function lr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ur(t,e,n,r)}function cr(t){if(t instanceof ur)return new ur(t.h,t.s,t.l,t.opacity);if(t instanceof In||(t=Jn(t)),!t)return new ur;if(t instanceof ur)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),i=Math.max(e,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new ur(o,s,l,t.opacity)}function ur(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}$n(In,Jn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Wn,formatHex:Wn,formatHsl:function(){return cr(this).formatHsl()},formatRgb:Qn,toString:Qn}),$n(ar,rr,On(In,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:ir,formatHex:ir,formatRgb:or,toString:or})),$n(ur,(function(t,e,n,r){return 1===arguments.length?cr(t):new ur(t,e,n,null==r?1:r)}),On(In,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new ur(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ur(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new ar(hr(t>=240?t-240:t+120,a,r),hr(t,a,r),hr(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var dr=function(t){return function(){return t}};function fr(t){return 1==(t=+t)?pr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):dr(isNaN(e)?n:e)}}function pr(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):dr(isNaN(t)?e:t)}var vr=function t(e){var n=fr(e);function r(t,e){var r=n((t=rr(t)).r,(e=rr(e)).r),a=n(t.g,e.g),i=n(t.b,e.b),o=pr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=i(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function mr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,a=e.slice();return function(i){for(n=0;n<r;++n)a[n]=t[n]*(1-i)+e[n]*i;return a}}function br(t,e){var n,r=e?e.length:0,a=t?Math.min(r,t.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=Sr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<a;++n)o[n]=i[n](t);return o}}function gr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function yr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function wr(e,n){var r,a={},i={};for(r in null!==e&&"object"===t(e)||(e={}),null!==n&&"object"===t(n)||(n={}),n)r in e?a[r]=Sr(e[r],n[r]):i[r]=n[r];return function(t){for(r in a)i[r]=a[r](t);return i}}var kr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xr=new RegExp(kr.source,"g");function _r(t,e){var n,r,a,i=kr.lastIndex=xr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=kr.exec(t))&&(r=xr.exec(e));)(a=r.index)>i&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:yr(n,r)})),i=xr.lastIndex;return i<e.length&&(a=e.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Sr(e,n){var r,a=t(n);return null==n||"boolean"===a?dr(n):("number"===a?yr:"string"===a?(r=Jn(n))?(n=r,vr):_r:n instanceof Jn?vr:n instanceof Date?gr:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(n)?mr:Array.isArray(n)?br:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?wr:yr)(e,n)}function Ar(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Er,Tr=180/Math.PI,Mr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cr(t,e,n,r,a,i){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*Tr,skewX:Math.atan(l)*Tr,scaleX:o,scaleY:s}}function Nr(t,e,n,r){function a(t){return t.length?t.pop()+" ":""}return function(i,o){var s=[],l=[];return i=t(i),o=t(o),function(t,r,a,i,o,s){if(t!==a||r!==i){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:yr(t,a)},{i:l-2,x:yr(r,i)})}else(a||i)&&o.push("translate("+a+e+i+n)}(i.translateX,i.translateY,o.translateX,o.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:yr(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(i.rotate,o.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:yr(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(i.skewX,o.skewX,s,l),function(t,e,n,r,i,o){if(t!==n||e!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:yr(t,n)},{i:s-2,x:yr(e,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Rr,qr,Pr=Nr((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Mr:Cr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),zr=Nr((function(t){return null==t?Mr:(Er||(Er=document.createElementNS("http://www.w3.org/2000/svg","g")),Er.setAttribute("transform",t),(t=Er.transform.baseVal.consolidate())?Cr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Mr)}),", ",")",")"),Fr=0,$r=0,Or=0,Ir=0,Hr=0,Ur=0,Dr="object"===("undefined"==typeof performance?"undefined":t(performance))&&performance.now?performance:Date,Lr="object"===("undefined"==typeof window?"undefined":t(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jr(){return Hr||(Lr(Vr),Hr=Dr.now()+Ur)}function Vr(){Hr=0}function Br(){this._call=this._time=this._next=null}function Kr(t,e,n){var r=new Br;return r.restart(t,e,n),r}function Xr(){Hr=(Ir=Dr.now())+Ur,Fr=$r=0;try{!function(){jr(),++Fr;for(var t,e=Rr;e;)(t=Hr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fr}()}finally{Fr=0,function(){var t,e,n=Rr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rr=e);qr=t,Zr(r)}(),Hr=0}}function Gr(){var t=Dr.now(),e=t-Ir;e>1e3&&(Ur-=e,Ir=t)}function Zr(t){Fr||($r&&($r=clearTimeout($r)),t-Hr>24?(t<1/0&&($r=setTimeout(Xr,t-Dr.now()-Ur)),Or&&(Or=clearInterval(Or))):(Or||(Ir=Dr.now(),Or=setInterval(Gr,1e3)),Fr=1,Lr(Xr)))}function Yr(t,e,n){var r=new Br;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Br.prototype=Kr.prototype={constructor:Br,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?jr():+n)+(null==e?0:+e),this._next||qr===this||(qr?qr._next=this:Rr=this,qr=this),this._call=t,this._time=n,Zr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zr())}};var Wr=ee("start","end","cancel","interrupt"),Qr=[];function Jr(t,e,n,r,a,i){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function i(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(i){var c,u,h,d;if(1!==n.state)return l();for(c in a)if((d=a[c]).name===n.name){if(3===d.state)return Yr(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete a[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete a[c])}if(Yr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var a=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,o=r.length;++i<o;)r[i].call(t,a);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete a[e],a)return;delete t.__transition}a[e]=n,n.timer=Kr(i,0,n.time)}(t,n,{name:e,index:r,group:a,on:Wr,tween:Qr,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function ta(t,e){var n=na(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ea(t,e){var n=na(t,e);if(n.state>3)throw new Error("too late; already running");return n}function na(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ra(t,e){var n,r;return function(){var a=ea(this,t),i=a.tween;if(i!==n)for(var o=0,s=(r=n=i).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}a.tween=r}}function aa(t,e,n){var r,a;if("function"!=typeof n)throw new Error;return function(){var i=ea(this,t),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:e,value:n},l=0,c=a.length;l<c;++l)if(a[l].name===e){a[l]=s;break}l===c&&a.push(s)}i.tween=a}}function ia(t,e,n){var r=t._id;return t.each((function(){var t=ea(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return na(t,r).value[e]}}function oa(t,e){var n;return("number"==typeof e?yr:e instanceof Jn?vr:(n=Jn(e))?(e=n,vr):_r)(t,e)}function sa(t){return function(){this.removeAttribute(t)}}function la(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ca(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function ua(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function ha(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttribute(t)}}function da(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function fa(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function pa(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function va(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&pa(t,a)),n}return a._value=e,a}function ma(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&fa(t,a)),n}return a._value=e,a}function ba(t,e){return function(){ta(this,t).delay=+e.apply(this,arguments)}}function ga(t,e){return e=+e,function(){ta(this,t).delay=e}}function ya(t,e){return function(){ea(this,t).duration=+e.apply(this,arguments)}}function wa(t,e){return e=+e,function(){ea(this,t).duration=e}}function ka(t,e){if("function"!=typeof e)throw new Error;return function(){ea(this,t).ease=e}}function xa(t,e,n){var r,a,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ta:ea;return function(){var o=i(this,t),s=o.on;s!==r&&(a=(r=s).copy()).on(e,n),o.on=a}}var _a=xn.prototype.constructor;function Sa(t){return function(){this.style.removeProperty(t)}}function Aa(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ea(t,e,n){var r,a;function i(){var i=e.apply(this,arguments);return i!==a&&(r=(a=i)&&Aa(t,i,n)),r}return i._value=e,i}function Ta(t){return function(e){this.textContent=t.call(this,e)}}function Ma(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ta(r)),e}return r._value=t,r}var Ca=0;function Na(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ra(){return++Ca}var qa=xn.prototype;Na.prototype=i({constructor:Na,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=fe(t));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s,l,c=r[o],u=c.length,h=i[o]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Jr(h[d],e,n,d,h,na(s,n)));return new Na(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=me(t));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=na(l,n),v=0,m=f.length;v<m;++v)(d=f[v])&&Jr(d,e,n,v,f,p);i.push(f),o.push(l)}return new Na(i,o,e,n)},selectChild:qa.selectChild,selectChildren:qa.selectChildren,filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new Na(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var l,c=e[s],u=n[s],h=c.length,d=o[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)o[s]=e[s];return new Na(o,this._parents,this._name,this._id)},selection:function(){return new _a(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ra(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=na(o,e);Jr(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Na(r,this._parents,t,n)},call:qa.call,nodes:qa.nodes,node:qa.node,size:qa.size,empty:qa.empty,each:qa.each,on:function(t,e){var n=this._id;return arguments.length<2?na(this.node(),n).on.on(t):this.each(xa(n,t,e))},attr:function(t,e){var n=le(t),r="transform"===n?zr:oa;return this.attrTween(t,"function"==typeof e?(n.local?da:ha)(n,r,ia(this,"attr."+t,e)):null==e?(n.local?la:sa)(n):(n.local?ua:ca)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=le(t);return this.tween(n,(r.local?va:ma)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Pr:oa;return null==e?this.styleTween(t,function(t,e){var n,r,a;return function(){var i=De(this,t),o=(this.style.removeProperty(t),De(this,t));return i===o?null:i===n&&o===r?a:a=e(n=i,r=o)}}(t,r)).on("end.style."+t,Sa(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,a,i;return function(){var o=De(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=De(this,t)),o===l?null:o===r&&l===a?i:(a=l,i=e(r=o,s))}}(t,r,ia(this,"style."+t,e))).each(function(t,e){var n,r,a,i,o="style."+e,s="end."+o;return function(){var l=ea(this,t),c=l.on,u=null==l.value[o]?i||(i=Sa(e)):void 0;c===n&&a===u||(r=(n=c).copy()).on(s,a=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,a,i=n+"";return function(){var o=De(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ea(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ia(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ma(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,a=na(this.node(),n).tween,i=0,o=a.length;i<o;++i)if((r=a[i]).name===t)return r.value;return null}return this.each((null==e?ra:aa)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ba:ga)(e,t)):na(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ya:wa)(e,t)):na(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ka(e,t)):na(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ea(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,a=n.size();return new Promise((function(i,o){var s={value:o},l={value:function(){0==--a&&i()}};n.each((function(){var n=ea(this,r),a=n.on;a!==t&&((e=(t=a).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===a&&i()}))}},Symbol.iterator,qa[Symbol.iterator]);var Pa=function(t){return+t};function za(t){return t*t*t}function Fa(t){return--t*t*t+1}var $a={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Oa(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition ".concat(e," not found"));return n}xn.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,a,i=t.__transition,o=!0;if(i){for(a in e=null==e?null:e+"",i)(n=i[a]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete t.__transition}}(this,t)}))},xn.prototype.transition=function(t){var e,n;t instanceof Na?(e=t._id,t=t._name):(e=Ra(),(n=$a).time=jr(),t=null==t?null:t+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)(o=s[c])&&Jr(o,t,e,c,s,n||Oa(o,e));return new Na(r,this._parents,t,e)};var Ia=Math.PI,Ha=2*Ia,Ua=Ha-1e-6;function Da(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function La(){return new Da}Da.prototype=La.prototype={constructor:Da,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,a,i){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,n,r,a){t=+t,e=+e,n=+n,r=+r,a=+a;var i=this._x1,o=this._y1,s=n-t,l=r-e,c=i-t,u=o-e,h=c*c+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-l*c)>1e-6&&a){var d=n-i,f=r-o,p=s*s+l*l,v=d*d+f*f,m=Math.sqrt(p),b=Math.sqrt(h),g=a*Math.tan((Ia-Math.acos((p+h-v)/(2*m*b)))/2),y=g/b,w=g/m;Math.abs(y-1)>1e-6&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+a+","+a+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*s)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,a,i){t=+t,e=+e,i=!!i;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^i,h=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%Ha+Ha),h>Ua?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Ia)+","+u+","+(this._x1=t+n*Math.cos(a))+","+(this._y1=e+n*Math.sin(a))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ja=Array.prototype.slice;function Va(t,e){return t-e}var Ba=function(t){return function(){return t}};function Ka(t,e){for(var n,r=-1,a=e.length;++r<a;)if(n=Xa(t,e[r]))return n;return 0}function Xa(t,e){for(var n=e[0],r=e[1],a=-1,i=0,o=t.length,s=o-1;i<o;s=i++){var l=t[i],c=l[0],u=l[1],h=t[s],d=h[0],f=h[1];if(Ga(l,h,e))return 0;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(a=-a)}return a}function Ga(t,e,n){var r;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&function(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}(t[r=+(t[0]===e[0])],n[r],e[r])}function Za(){}var Ya=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Wa(){var t=1,e=1,n=Ut,r=s;function a(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=Ct(t),a=Ht(r[0],r[1],e);e=Ot(Math.floor(r[0]/a)*a,Math.floor(r[1]/a-1)*a,e)}return e.map((function(e){return i(t,e)}))}function i(n,a){var i=[],s=[];return function(n,r,a){var i,s,l,c,u,h,d=new Array,f=new Array;i=s=-1,c=n[0]>=r,Ya[c<<1].forEach(p);for(;++i<t-1;)l=c,c=n[i+1]>=r,Ya[l|c<<1].forEach(p);Ya[c<<0].forEach(p);for(;++s<e-1;){for(i=-1,c=n[s*t+t]>=r,u=n[s*t]>=r,Ya[c<<1|u<<2].forEach(p);++i<t-1;)l=c,c=n[s*t+t+i+1]>=r,h=u,u=n[s*t+i+1]>=r,Ya[l|c<<1|u<<2|h<<3].forEach(p);Ya[c|u<<3].forEach(p)}i=-1,u=n[s*t]>=r,Ya[u<<2].forEach(p);for(;++i<t-1;)h=u,u=n[s*t+i+1]>=r,Ya[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+s],l=[t[1][0]+i,t[1][1]+s],c=o(r),u=o(l);(e=f[c])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(l),a(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(l),f[e.end=u]=e):(e=d[u])?(n=f[c])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(l),a(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=f[u]={start:c,end:u,ring:[r,l]}}Ya[u<<3].forEach(p)}(n,a,(function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==Ka((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:a,coordinates:i}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,a){n.forEach((function(n){var i,o=n[0],s=n[1],l=0|o,c=0|s,u=r[c*t+l];o>0&&o<t&&l===o&&(i=r[c*t+l-1],n[0]=o+(a-i)/(u-i)-.5),s>0&&s<e&&c===s&&(i=r[(c-1)*t+l],n[1]=s+(a-i)/(u-i)-.5)}))}return a.contour=i,a.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,a},a.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ba(ja.call(t)):Ba(t),a):n},a.smooth=function(t){return arguments.length?(r=t?s:Za,a):r===s},a}function Qa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ja(t){return(t=Qa(Math.abs(t)))?t[1]:NaN}var ti,ei=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ni(t){if(!(e=ei.exec(t)))throw new Error("invalid format: "+t);var e;return new ri({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]})}function ri(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ai(t,e){var n=Qa(t,e);if(!n)return t+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}ni.prototype=ri.prototype,ri.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ii={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ai(100*t,e)},r:ai,s:function(t,e){var n=Qa(t,e);if(!n)return t+"";var r=n[0],a=n[1],i=a-(ti=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Qa(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function oi(t){return t}var si,li,ci,ui=Array.prototype.map,hi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function di(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?oi:(e=ui.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var a=t.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(t.substring(a-=s,a+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(n)}),a=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?oi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ui.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=ni(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,v=t.comma,m=t.precision,b=t.trim,g=t.type;"n"===g?(v=!0,g="g"):ii[g]||(void 0===m&&(m=12),b=!0,g="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===d?i:/[%p]/.test(g)?l:"",k=ii[g],x=/[defgprs%]/.test(g);function _(t){var a,i,l,d=y,_=w;if("c"===g)_=k(t)+_,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:k(Math.abs(t),m),b&&(t=function(t){t:for(var e,n=t.length,r=1,a=-1;r<n;++r)switch(t[r]){case".":a=e=r;break;case"0":0===a&&(a=r),e=r;break;default:if(!+t[r])break t;a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,_=("s"===g?hi[8+ti/3]:"")+_+(S&&"("===h?")":""),x)for(a=-1,i=t.length;++a<i;)if(48>(l=t.charCodeAt(a))||l>57){_=(46===l?o+t.slice(a+1):t.slice(a))+_,t=t.slice(0,a);break}}v&&!f&&(t=r(t,1/0));var A=d.length+t.length+_.length,E=A<p?new Array(p-A+1).join(e):"";switch(v&&f&&(t=r(E+t,E.length?p-_.length:1/0),E=""),n){case"<":t=d+t+_+E;break;case"=":t=d+E+t+_;break;case"^":t=E.slice(0,A=E.length>>1)+d+t+_+E.slice(A);break;default:t=E+d+t+_}return s(t)}return m=void 0===m?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),_.toString=function(){return t+""},_}return{format:h,formatPrefix:function(t,e){var n=h(((t=ni(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3))),a=Math.pow(10,-r),i=hi[8+r/3];return function(t){return n(a*t)+i}}}}si=di({thousands:",",grouping:[3],currency:["$",""]}),li=si.format,ci=si.formatPrefix;var fi=Math.PI,pi=2*fi,vi=180/fi,mi=fi/180,bi=Math.abs,gi=Math.cos,yi=Math.sin,wi=Math.sqrt;function ki(){}function xi(t,e){t&&Si.hasOwnProperty(t.type)&&Si[t.type](t,e)}var _i={Feature:function(t,e){xi(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++r<a;)xi(n[r].geometry,e)}},Si={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 n=t.coordinates,r=-1,a=n.length;++r<a;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ai(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ai(n[r],e,0)},Polygon:function(t,e){Ei(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ei(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,a=n.length;++r<a;)xi(n[r],e)}};function Ai(t,e,n){var r,a=-1,i=t.length-n;for(e.lineStart();++a<i;)r=t[a],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ei(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ai(t[n],e,1);e.polygonEnd()}function Ti(t,e){t&&_i.hasOwnProperty(t.type)?_i[t.type](t,e):xi(t,e)}function Mi(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ci(t,e,n,r,a){var i,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(function(t,e){return bi(t[0]-e[0])<1e-6&&bi(t[1]-e[1])<1e-6}(r,o)){if(!r[2]&&!o[2]){for(a.lineStart(),i=0;i<e;++i)a.point((r=t[i])[0],r[1]);return void a.lineEnd()}o[0]+=2e-6}s.push(n=new Mi(r,t,null,!0)),l.push(n.o=new Mi(r,null,n,!1)),s.push(n=new Mi(o,t,null,!1)),l.push(n.o=new Mi(o,null,n,!0))}})),s.length){for(l.sort(e),Ni(s),Ni(l),i=0,o=l.length;i<o;++i)l[i].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,a.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(i=0,o=c.length;i<o;++i)a.point((u=c[i])[0],u[1]);else r(d.x,d.n.x,1,a);d=d.n}else{if(f)for(c=d.p.z,i=c.length-1;i>=0;--i)a.point((u=c[i])[0],u[1]);else r(d.x,d.p.x,-1,a);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);a.lineEnd()}}}function Ni(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r<e;)a.n=n=t[r],n.p=a,a=n;a.n=n=t[0],n.p=a}}function Ri(t,e,n,r){function a(a,i){return t<=a&&a<=n&&e<=i&&i<=r}function i(a,i,s,c){var u=0,h=0;if(null==a||(u=o(a,s))!==(h=o(i,s))||l(a,i)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else c.point(i[0],i[1])}function o(r,a){return bi(r[0]-t)<1e-6?a>0?0:3:bi(r[0]-n)<1e-6?a>0?2:1:bi(r[1]-e)<1e-6?a>0?1:0:a>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,d,f,p,v,m,b,g,y=o,w=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:ki,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}(),k={point:x,lineStart:function(){k.point=_,c&&c.push(u=[]);b=!0,m=!1,p=v=NaN},lineEnd:function(){l&&(_(h,d),f&&m&&w.rejoin(),l.push(w.result()));k.point=x,m&&y.lineEnd()},polygonStart:function(){y=w,l=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,a=c.length;n<a;++n)for(var i,o,s=c[n],l=1,u=s.length,h=s[0],d=h[0],f=h[1];l<u;++l)i=d,o=f,d=(h=s[l])[0],f=h[1],o<=r?f>r&&(d-i)*(r-o)>(f-o)*(t-i)&&++e:f<=r&&(d-i)*(r-o)<(f-o)*(t-i)&&--e;return e}(),n=g&&e,a=(h=l,l=Array.from(jt(h))).length;var h;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),a&&Ci(l,s,e,i,o),o.polygonEnd());y=o,l=c=u=null}};function x(t,e){a(t,e)&&y.point(t,e)}function _(i,o){var s=a(i,o);if(c&&u.push([i,o]),b)h=i,d=o,f=s,b=!1,s&&(y.lineStart(),y.point(i,o));else if(s&&m)y.point(i,o);else{var l=[p=Math.max(-1e9,Math.min(1e9,p)),v=Math.max(-1e9,Math.min(1e9,v))],w=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,a,i){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,d=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-l,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*d),u<1&&(e[0]=s+u*h,e[1]=l+u*d),!0}}}}}(l,w,t,e,n,r)?s&&(y.lineStart(),y.point(i,o),g=!1):(m||(y.lineStart(),y.point(l[0],l[1])),y.point(w[0],w[1]),s||y.lineEnd(),g=!1)}p=i,v=o,m=s}return k}}var qi,Pi,zi,Fi,$i=function(t){return t},Oi=new Nt,Ii=new Nt,Hi={point:ki,lineStart:ki,lineEnd:ki,polygonStart:function(){Hi.lineStart=Ui,Hi.lineEnd=ji},polygonEnd:function(){Hi.lineStart=Hi.lineEnd=Hi.point=ki,Oi.add(bi(Ii)),Ii=new Nt},result:function(){var t=Oi/2;return Oi=new Nt,t}};function Ui(){Hi.point=Di}function Di(t,e){Hi.point=Li,qi=zi=t,Pi=Fi=e}function Li(t,e){Ii.add(Fi*t-zi*e),zi=t,Fi=e}function ji(){Li(qi,Pi)}var Vi=Hi,Bi=1/0,Ki=Bi,Xi=-Bi,Gi=Xi,Zi={point:function(t,e){t<Bi&&(Bi=t);t>Xi&&(Xi=t);e<Ki&&(Ki=e);e>Gi&&(Gi=e)},lineStart:ki,lineEnd:ki,polygonStart:ki,polygonEnd:ki,result:function(){var t=[[Bi,Ki],[Xi,Gi]];return Xi=Gi=-(Ki=Bi=1/0),t}};var Yi,Wi,Qi,Ji,to=Zi,eo=0,no=0,ro=0,ao=0,io=0,oo=0,so=0,lo=0,co=0,uo={point:ho,lineStart:fo,lineEnd:mo,polygonStart:function(){uo.lineStart=bo,uo.lineEnd=go},polygonEnd:function(){uo.point=ho,uo.lineStart=fo,uo.lineEnd=mo},result:function(){var t=co?[so/co,lo/co]:oo?[ao/oo,io/oo]:ro?[eo/ro,no/ro]:[NaN,NaN];return eo=no=ro=ao=io=oo=so=lo=co=0,t}};function ho(t,e){eo+=t,no+=e,++ro}function fo(){uo.point=po}function po(t,e){uo.point=vo,ho(Qi=t,Ji=e)}function vo(t,e){var n=t-Qi,r=e-Ji,a=wi(n*n+r*r);ao+=a*(Qi+t)/2,io+=a*(Ji+e)/2,oo+=a,ho(Qi=t,Ji=e)}function mo(){uo.point=ho}function bo(){uo.point=yo}function go(){wo(Yi,Wi)}function yo(t,e){uo.point=wo,ho(Yi=Qi=t,Wi=Ji=e)}function wo(t,e){var n=t-Qi,r=e-Ji,a=wi(n*n+r*r);ao+=a*(Qi+t)/2,io+=a*(Ji+e)/2,oo+=a,so+=(a=Ji*t-Qi*e)*(Qi+t),lo+=a*(Ji+e),co+=3*a,ho(Qi=t,Ji=e)}var ko=uo;function xo(t){this._context=t}xo.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(){0===this._line&&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,pi)}},result:ki};var _o,So,Ao,Eo,To,Mo=new Nt,Co={point:ki,lineStart:function(){Co.point=No},lineEnd:function(){_o&&Ro(So,Ao),Co.point=ki},polygonStart:function(){_o=!0},polygonEnd:function(){_o=null},result:function(){var t=+Mo;return Mo=new Nt,t}};function No(t,e){Co.point=Ro,So=Eo=t,Ao=To=e}function Ro(t,e){Eo-=t,To-=e,Mo.add(wi(Eo*Eo+To*To)),Eo=t,To=e}var qo=Co;function Po(){this._string=[]}function zo(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Fo(t,e){var n,r,a=4.5;function i(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),Ti(t,n(r))),r.result()}return i.area=function(t){return Ti(t,n(Vi)),Vi.result()},i.measure=function(t){return Ti(t,n(qo)),qo.result()},i.bounds=function(t){return Ti(t,n(to)),to.result()},i.centroid=function(t){return Ti(t,n(ko)),ko.result()},i.projection=function(e){return arguments.length?(n=null==e?(t=null,$i):(t=e).stream,i):t},i.context=function(t){return arguments.length?(r=null==t?(e=null,new Po):new xo(e=t),"function"!=typeof a&&r.pointRadius(a),i):e},i.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),i):a},i.projection(t).context(e)}function $o(){}function Oo(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Ti(n,t.stream(to)),e(to.result()),null!=r&&t.clipExtent(r),t}function Io(t,e,n){return Oo(t,(function(n){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),o=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}function Ho(){var t,e,n,r,a,i,o,s,l=1,c=0,u=0,h=1,d=1,f=0,p=null,v=1,m=1,b=(s={point:function(t,e){var n=w([t,e]);this.stream.point(n[0],n[1])}},function(t){var e=new $o;for(var n in s)e[n]=s[n];return e.stream=t,e}),g=$i;function y(){return v=l*h,m=l*d,i=o=null,w}function w(n){var r=n[0]*v,a=n[1]*m;if(f){var i=a*t-r*e;r=r*t+a*e,a=i}return[r+c,a+u]}return w.invert=function(n){var r=n[0]-c,a=n[1]-u;if(f){var i=a*t+r*e;r=r*t-a*e,a=i}return[r/v,a/m]},w.stream=function(t){return i&&o===t?i:i=b(g(o=t))},w.postclip=function(t){return arguments.length?(g=t,p=n=r=a=null,y()):g},w.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=a=null,$i):Ri(p=+t[0][0],n=+t[0][1],r=+t[1][0],a=+t[1][1]),y()):null==p?null:[[p,n],[r,a]]},w.scale=function(t){return arguments.length?(l=+t,y()):l},w.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],y()):[c,u]},w.angle=function(n){return arguments.length?(e=yi(f=n%360*mi),t=gi(f),y()):f*vi},w.reflectX=function(t){return arguments.length?(h=t?-1:1,y()):h<0},w.reflectY=function(t){return arguments.length?(d=t?-1:1,y()):d<0},w.fitExtent=function(t,e){return Io(w,t,e)},w.fitSize=function(t,e){return function(t,e,n){return Io(t,[[0,0],e],n)}(w,t,e)},w.fitWidth=function(t,e){return function(t,e,n){return Oo(t,(function(n){var r=+e,a=r/(n[1][0]-n[0][0]),i=(r-a*(n[1][0]+n[0][0]))/2,o=-a*n[0][1];t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w.fitHeight=function(t,e){return function(t,e,n){return Oo(t,(function(n){var r=+e,a=r/(n[1][1]-n[0][1]),i=-a*n[0][0],o=(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w}function Uo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Do(t){return+t}Po.prototype={_radius:4.5,_circle:zo(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=zo(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},$o.prototype={constructor:$o,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()}};var Lo=[0,1];function jo(t){return t}function Vo(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Bo(t,e,n){var r=t[0],a=t[1],i=e[0],o=e[1];return a<r?(r=Vo(a,r),i=n(o,i)):(r=Vo(r,a),i=n(i,o)),function(t){return i(r(t))}}function Ko(t,e,n){var r=Math.min(t.length,e.length)-1,a=new Array(r),i=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)a[o]=Vo(t[o],t[o+1]),i[o]=n(e[o],e[o+1]);return function(e){var n=Mt(t,e,1,r)-1;return i[n](a[n](e))}}function Xo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Go(){var t,e,n,r,a,i,o=Lo,s=Lo,l=Sr,c=jo;function u(){var t=Math.min(o.length,s.length);return c!==jo&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?Ko:Bo,a=i=null,h}function h(e){return null==e||isNaN(e=+e)?n:(a||(a=r(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((i||(i=r(s,o.map(t),yr)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Do),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Ar,u()},h.clamp=function(t){return arguments.length?(c=!!t||jo,u()):c!==jo},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Zo(){return Go()(jo,jo)}function Yo(t,e,n,r){var a,i=Ht(t,e,n);switch((r=ni(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3)))-Ja(Math.abs(t)))}(i,o))||(r.precision=a),ci(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ja(e)-Ja(t))+1}(i,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(t){return Math.max(0,-Ja(Math.abs(t)))}(i))||(r.precision=a-2*("%"===r.type))}return li(r)}function Wo(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ot(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Yo(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,a,i=e(),o=0,s=i.length-1,l=i[o],c=i[s],u=10;for(c<l&&(a=l,l=c,c=a,a=o,o=s,s=a);u-- >0;){if((a=It(l,c,n))===r)return i[o]=l,i[s]=c,e(i);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return t},t}function Qo(){var t=Zo();return t.copy=function(){return Xo(t,Qo())},Uo.apply(t,arguments),Wo(t)}var Jo,ts,es,ns,rs,as,is,os,ss,ls=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");function cs(t){return function(){return t}}function us(t){this._context=t}function hs(t){return new us(t)}function ds(t){return t[0]}function fs(t){return t[1]}function ps(e,n){var r=cs(!0),a=null,i=hs,o=null;function s(s){var l,c,u,h=(s=function(e){return"object"===t(e)&&"length"in e?e:Array.from(e)}(s)).length,d=!1;for(null==a&&(o=i(u=La())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+n(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?ds:cs(e),n="function"==typeof n?n:void 0===n?fs:cs(n),s.x=function(t){return arguments.length?(e="function"==typeof t?t:cs(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:cs(+t),s):n},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:cs(!!t),s):r},s.curve=function(t){return arguments.length?(i=t,null!=a&&(o=i(a)),s):i},s.context=function(t){return arguments.length?(null==t?a=o=null:o=i(a=t),s):a},s}us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var vs,ms,bs=function(t){o(r,_t);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).uniqueId="decidables-".concat(r.uniqueId),t}return a(r,[{key:"getComputedStyleValue",value:function(t){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,t):getComputedStyle(this).getPropertyValue(t)}},{key:"firstUpdated",value:function(t){m(s(r.prototype),"firstUpdated",this).call(this,t),_n(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",(function(t){_n(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)})).on("keydown.keyboard",(function(t){_n(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)}))}}],[{key:"uniqueId",get:function(){return r.ID+=1,r.ID}},{key:"greys",get:function(){var t="#999999",e={white:"#ffffff"};return e.light75=vr(t,"#ffffff")(.75),e.light50=vr(t,"#ffffff")(.5),e.light25=vr(t,"#ffffff")(.25),e.grey=t,e.dark25=vr(t,"#000000")(.25),e.dark50=vr(t,"#000000")(.5),e.dark75=vr(t,"#000000")(.75),e.black="#000000",e}},{key:"shadows",get:function(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}},{key:"cssBoxShadow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.shadows.opacityUmbra+this.shadows.opacityBoost,a=this.shadows.opacityPenumbra+this.shadows.opacityBoost,i=this.shadows.opacityAmbient+this.shadows.opacityBoost,o=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(r,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(r,")"),s=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(a,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(a,")"),l=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(i,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(i,")"),c=this.shadows.mapUmbra[t],u=this.shadows.mapPenumbra[t],h=this.shadows.mapAmbient[t],d=e?"".concat(-c.y,"px ").concat(c.y/2,"px ").concat(c.b,"px ").concat(c.s,"px"):"".concat(c.y/2,"px ").concat(c.y,"px ").concat(c.b,"px ").concat(c.s,"px"),f=e?"".concat(-u.y,"px ").concat(u.y/2,"px ").concat(u.b,"px ").concat(u.s,"px"):"".concat(u.y/2,"px ").concat(u.y,"px ").concat(u.b,"px ").concat(u.s,"px"),p=e?"".concat(-h.y,"px ").concat(h.y/2,"px ").concat(h.b,"px ").concat(h.s,"px"):"".concat(h.y/2,"px ").concat(h.y,"px ").concat(h.b,"px ").concat(h.s,"px");return"".concat(d," ").concat(o,", ").concat(f," ").concat(s,", ").concat(p," ").concat(l)}},{key:"svgFilters",get:function(){var t=r.shadows,e=t.elevations.map((function(e){return at(Jo||(Jo=b(["\n <filter id=",' x="-250%" y="-250%" width="600%" height="600%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx='," dy=",' />\n <feOffset in="solid" result="offP" dx='," dy=",' />\n <feOffset in="solid" result="offA" dx='," dy="," />\n ","\n ","\n ","\n <feGaussianBlur in=",' result="blurU" stdDeviation='," />\n <feGaussianBlur in=",' result="blurP" stdDeviation='," />\n <feGaussianBlur in=",' result="blurA" stdDeviation=',' />\n <feFlood in="SourceGraphic" result="opU" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opP" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opA" flood-color='," flood-opacity=",' />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n \x3c!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the "radius" value! --\x3e\n <feMorphology in="solid" result="smaller" operator="erode" radius=',' />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>'])),"shadow-".concat(e),t.mapUmbra[e].y/2,t.mapUmbra[e].y,t.mapPenumbra[e].y/2,t.mapPenumbra[e].y,t.mapAmbient[e].y/2,t.mapAmbient[e].y,0===t.mapUmbra[e].s?at(ts||(ts=b([""]))):at(es||(es=b(['<feMorphology in="offU" result="spreadU" operator='," radius="," />"])),t.mapUmbra[e].s>0?"dilate":"erode",Math.abs(t.mapUmbra[e].s)),0===t.mapPenumbra[e].s?at(ns||(ns=b([""]))):at(rs||(rs=b(['<feMorphology in="offP" result="spreadP" operator='," radius="," />"])),t.mapPenumbra[e].s>0?"dilate":"erode",Math.abs(t.mapPenumbra[e].s)),0===t.mapAmbient[e].s?at(as||(as=b([""]))):at(is||(is=b(['<feMorphology in="offA" result="spreadA" operator='," radius="," />"])),t.mapAmbient[e].s>0?"dilate":"erode",Math.abs(t.mapAmbient[e].s)),0===t.mapUmbra[e].s?"offU":"spreadU",t.mapUmbra[e].b/2,0===t.mapPenumbra[e].s?"offP":"spreadP",t.mapPenumbra[e].b/2,0===t.mapAmbient[e].s?"offA":"spreadA",t.mapAmbient[e].b/2,t.baselineColor,t.opacityUmbra+t.opacityBoost,t.baselineColor,t.opacityPenumbra+t.opacityBoost,t.baselineColor,t.opacityAmbient+t.opacityBoost,1)}));return at(os||(os=b(['\n <svg class="defs">\n <defs>\n ',"\n </defs>\n </svg>\n "])),e)}},{key:"styles",get:function(){return N(ss||(ss=b(["\n :host {\n ---shadow-0: var(--shadow-0, ",");\n ---shadow-2: var(--shadow-2, ",");\n ---shadow-4: var(--shadow-4, ",");\n ---shadow-8: var(--shadow-8, ",");\n\n ---color-background: var(--color-background, ",");\n ---color-border: var(--color-border, ",");\n ---color-text: var(--color-text, ",");\n ---color-text-inverse: var(--color-text-inverse, ",");\n ---color-link: var(--color-link, ",");\n ---color-element-background: var(--color-element-background, ",");\n ---color-element-disabled: var(--color-element-disabled, ",");\n ---color-element-enabled: var(--color-element-enabled, ",");\n ---color-element-selected: var(--color-element-selected, ",");\n ---color-element-border: var(--color-element-border, ",");\n ---color-element-emphasis: var(--color-element-emphasis, ",');\n\n ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);\n ---font-family-math: var(--font-family-math, "Source Serif", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n '])),C(this.cssBoxShadow(0)),C(this.cssBoxShadow(2)),C(this.cssBoxShadow(4)),C(this.cssBoxShadow(8)),C(this.greys.white),C(this.greys.light75),C(this.greys.dark75),C(this.greys.white),C(this.greys.dark25),C(this.greys.light75),C(this.greys.light50),C(this.greys.grey),C(this.greys.dark25),C(this.greys.dark50),C(this.greys.dark75))}}]),r}();bs.ID=0;var gs=function(t){o(r,bs);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t}return a(r,[{key:"render",value:function(){return rt(vs||(vs=b(["\n <button ?disabled=",">\n <slot></slot>\n </button>\n "])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[m(s(r),"styles",this),N(ms||(ms=b(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),r}();customElements.define("decidables-button",gs);
|
|
6
|
+
*/var _,S,A=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,E=Symbol(),T=new Map,M=function(){function t(e,r){if(n(this,t),this._$cssResult$=!0,r!==E)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}return a(t,[{key:"styleSheet",get:function(){var t=T.get(this.cssText);return A&&void 0===t&&(T.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}},{key:"toString",value:function(){return this.cssText}}]),t}(),C=function(t){return new M("string"==typeof t?t:t+"",E)},N=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new M(a,E)},R=A?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=x(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return C(n)}(t):t},q=window.trustedTypes,P=q?q.emptyScript:"",z=window.reactiveElementPolyfillSupport,F={toAttribute:function(t,e){switch(e){case Boolean:t=t?P:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},$=function(t,e){return e!==t&&(e==e||t==t)},O={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:$},I=function(r){o(c,h(HTMLElement));var i,s,l=p(c);function c(){var t;return n(this,c),(t=l.call(this))._$Et=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Ei=null,t.o(),t}return a(c,[{key:"o",value:function(){var t,e=this;this._$Ep=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}},{key:"_$Em",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Et.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){A?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ES",value:function(t,e){var n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,i=this.constructor._$Eh(t,a);if(void 0!==i&&!0===a.reflect){var o=(null!==(r=null===(n=a.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==r?r:F.toAttribute)(e,a.type);this._$Ei=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Ei=null}}},{key:"_$AK",value:function(t,e){var n,r,a,i=this.constructor,o=i._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){var s=i.getPropertyOptions(o),l=s.converter,c=null!==(a=null!==(r=null===(n=l)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof l?l:null)&&void 0!==a?a:F.fromAttribute;this._$Ei=o,this[o]=c(e,s.type),this._$Ei=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||$)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$E_())}},{key:"_$E_",value:(i=regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Ep;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),s=function(){var t=this,n=arguments;return new Promise((function(r,a){var o=i.apply(t,n);function s(t){e(o,r,a,s,l,"next",t)}function l(t){e(o,r,a,s,l,"throw",t)}s(void 0)}))},function(){return s.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((function(t,n){return e[n]=t})),this._$Et=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$Eg)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$EU()}catch(t){throw n=!1,this._$EU(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Ep}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$ES(n,e[n],t)})),this._$EC=void 0),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var a=t._$Eh(r,n);void 0!==a&&(t._$Eu.set(a,r),e.push(a))})),e}},{key:"createProperty",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){var r="symbol"==t(e)?Symbol():"__"+e,a=this.getPropertyDescriptor(e,r,n);void 0!==a&&Object.defineProperty(this.prototype,e,a)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var a=this[t];this[e]=r,this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||O}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=x([].concat(y(Object.getOwnPropertyNames(n)),y(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var a=e.value;this.createProperty(a,n[a])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=x(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var a=n.value;e.unshift(R(a))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(R(t));return e}},{key:"_$Eh",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),c}();I.finalized=!0,I.elementProperties=new Map,I.elementStyles=[],I.shadowRootOptions={mode:"open"},null==z||z({ReactiveElement:I}),(null!==(_=globalThis.reactiveElementVersions)&&void 0!==_?_:globalThis.reactiveElementVersions=[]).push("1.3.1");var H=globalThis.trustedTypes,U=H?H.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,D="lit$".concat((Math.random()+"").slice(9),"$"),L="?"+D,j="<".concat(L,">"),V=document,B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return V.createComment(t)},K=function(e){return null===e||"object"!=t(e)&&"function"!=typeof e},X=Array.isArray,G=function(t){var e;return X(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,W=/>/g,Q=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,J=/'/g,tt=/"/g,et=/^(?:script|style|textarea|title)$/i,nt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return{_$litType$:t,strings:e,values:r}}},rt=nt(1),at=nt(2),it=Symbol.for("lit-noChange"),ot=Symbol.for("lit-nothing"),st=new WeakMap,lt=V.createTreeWalker(V,129,null,!1),ct=function(t,e){for(var n,r=t.length-1,a=[],i=2===e?"<svg>":"",o=Z,s=0;s<r;s++){for(var l=t[s],c=void 0,u=void 0,h=-1,d=0;d<l.length&&(o.lastIndex=d,null!==(u=o.exec(l)));)d=o.lastIndex,o===Z?"!--"===u[1]?o=Y:void 0!==u[1]?o=W:void 0!==u[2]?(et.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=Q):void 0!==u[3]&&(o=Q):o===Q?">"===u[0]?(o=null!=n?n:Z,h=-1):void 0===u[1]?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=void 0===u[3]?Q:'"'===u[3]?tt:J):o===tt||o===J?o=Q:o===Y||o===W?o=Z:(o=Q,n=void 0);var f=o===Q&&t[s+1].startsWith("/>")?" ":"";i+=o===Z?l+j:h>=0?(a.push(c),l.slice(0,h)+"$lit$"+l.slice(h)+D+f):l+D+(-2===h?(a.push(void 0),s):f)}var p=i+(t[r]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(p):p,a]},ut=function(){function t(e,r){var a,i=e.strings,o=e._$litType$;n(this,t),this.parts=[];var s=0,l=0,c=i.length-1,u=this.parts,h=g(ct(i,o),2),d=h[0],f=h[1];if(this.el=t.createElement(d,r),lt.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,y(v.childNodes))}for(;null!==(a=lt.nextNode())&&u.length<c;){if(1===a.nodeType){if(a.hasAttributes()){var m,b=[],w=x(a.getAttributeNames());try{for(w.s();!(m=w.n()).done;){var k=m.value;if(k.endsWith("$lit$")||k.startsWith(D)){var _=f[l++];if(b.push(k),void 0!==_){var S=a.getAttribute(_.toLowerCase()+"$lit$").split(D),A=/([.?@])?(.*)/.exec(_);u.push({type:1,index:s,name:A[2],strings:S,ctor:"."===A[1]?bt:"?"===A[1]?yt:"@"===A[1]?wt:mt})}else u.push({type:6,index:s})}}}catch(t){w.e(t)}finally{w.f()}for(var E=0,T=b;E<T.length;E++){var M=T[E];a.removeAttribute(M)}}if(et.test(a.tagName)){var C=a.textContent.split(D),N=C.length-1;if(N>0){a.textContent=H?H.emptyScript:"";for(var R=0;R<N;R++)a.append(C[R],B()),lt.nextNode(),u.push({type:2,index:++s});a.append(C[N],B())}}}else if(8===a.nodeType)if(a.data===L)u.push({type:2,index:s});else for(var q=-1;-1!==(q=a.data.indexOf(D,q+1));)u.push({type:7,index:s}),q+=D.length-1;s++}}return a(t,null,[{key:"createElement",value:function(t,e){var n=V.createElement("template");return n.innerHTML=t,n}}]),t}();function ht(t,e){var n,r,a,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===it)return e;var l=void 0!==s?null===(n=o._$Cl)||void 0===n?void 0:n[s]:o._$Cu,c=K(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,o,s),void 0!==s?(null!==(a=(i=o)._$Cl)&&void 0!==a?a:i._$Cl=[])[s]=l:o._$Cu=l),void 0!==l&&(e=ht(t,l._$AS(t,e.values),l,s)),e}var dt,ft,pt=function(){function t(e,r){n(this,t),this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=r}return a(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(t){var e,n=this._$AD,r=n.el.content,a=n.parts,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:V).importNode(r,!0);lt.currentNode=i;for(var o=lt.nextNode(),s=0,l=0,c=a[0];void 0!==c;){if(s===c.index){var u=void 0;2===c.type?u=new vt(o,o.nextSibling,this,t):1===c.type?u=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(u=new kt(o,this,t)),this.v.push(u),c=a[++l]}s!==(null==c?void 0:c.index)&&(o=lt.nextNode(),s++)}return i}},{key:"m",value:function(t){var e,n=0,r=x(this.v);try{for(r.s();!(e=r.n()).done;){var a=e.value;void 0!==a&&(void 0!==a.strings?(a._$AI(t,a,n),n+=a.strings.length-2):a._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),vt=function(){function t(e,r,a,i){var o;n(this,t),this.type=2,this._$AH=ot,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=a,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return a(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;t=ht(this,t,e),K(t)?t===ot||null==t||""===t?(this._$AH!==ot&&this._$AR(),this._$AH=ot):t!==this._$AH&&t!==it&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):G(t)?this.S(t):this.$(t)}},{key:"A",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(t,e)}},{key:"k",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}},{key:"$",value:function(t){this._$AH!==ot&&K(this._$AH)?this._$AA.nextSibling.data=t:this.k(V.createTextNode(t)),this._$AH=t}},{key:"T",value:function(t){var e,n=t.values,r=t._$litType$,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=ut.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(n);else{var i=new pt(a,this),o=i.p(this.options);i.m(n),this.k(o),this._$AH=i}}},{key:"_$AC",value:function(t){var e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new ut(t)),e}},{key:"S",value:function(e){X(this._$AH)||(this._$AH=[],this._$AR());var n,r,a=this._$AH,i=0,o=x(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i===a.length?a.push(n=new t(this.A(B()),this.A(B()),this,this.options)):n=a[i],n._$AI(s),i++}}catch(t){o.e(t)}finally{o.f()}i<a.length&&(this._$AR(n&&n._$AB.nextSibling,i),a.length=i)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),mt=function(){function t(e,r,a,i,o){n(this,t),this.type=1,this._$AH=ot,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,a.length>2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=ot}return a(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=this.strings,i=!1;if(void 0===a)t=ht(this,t,e,0),(i=!K(t)||t!==this._$AH&&t!==it)&&(this._$AH=t);else{var o,s,l=t;for(t=a[0],o=0;o<a.length-1;o++)(s=ht(this,l[n+o],e,o))===it&&(s=this._$AH[o]),i||(i=!K(s)||s!==this._$AH[o]),s===ot?t=ot:t!==ot&&(t+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}i&&!r&&this.C(t)}},{key:"C",value:function(t){t===ot?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),bt=function(t){o(r,mt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=3,t}return a(r,[{key:"C",value:function(t){this.element[this.name]=t===ot?void 0:t}}]),r}(),gt=H?H.emptyScript:"",yt=function(t){o(r,mt);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).type=4,t}return a(r,[{key:"C",value:function(t){t&&t!==ot?this.element.setAttribute(this.name,gt):this.element.removeAttribute(this.name)}}]),r}(),wt=function(t){o(r,mt);var e=p(r);function r(t,a,i,o,s){var l;return n(this,r),(l=e.call(this,t,a,i,o,s)).type=5,l}return a(r,[{key:"_$AI",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;if((t=null!==(e=ht(this,t,n,0))&&void 0!==e?e:ot)!==it){var r=this._$AH,a=t===ot&&r!==ot||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==ot&&(r===ot||a);a&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),r}(),kt=function(){function t(e,r,a){n(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=a}return a(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){ht(this,t)}}]),t}(),xt=window.litHtmlPolyfillSupport;null==xt||xt(ut,vt),(null!==(S=globalThis.litHtmlVersions)&&void 0!==S?S:globalThis.litHtmlVersions=[]).push("2.2.1");var _t=function(t){o(r,I);var e=p(r);function r(){var t;return n(this,r),(t=e.apply(this,arguments)).renderOptions={host:d(t)},t._$Dt=void 0,t}return a(r,[{key:"createRenderRoot",value:function(){var t,e,n=m(s(r.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),m(s(r.prototype),"update",this).call(this,t),this._$Dt=function(t,e,n){var r,a,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new vt(e.insertBefore(B(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;m(s(r.prototype),"connectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;m(s(r.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return it}}]),r}();_t.finalized=!0,_t._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:_t});var St=globalThis.litElementPolyfillSupport;function At(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Et(t){var e=t,n=t,r=t;function a(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<0?a=o+1:i=o}while(a<i)}return a}return 2!==t.length&&(e=function(e,n){return t(e)-n},n=At,r=function(e,n){return At(t(e),n)}),{left:a,center:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=a(t,n,r,i-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(a<i){if(0!==n(e,e))return i;do{var o=a+i>>>1;r(t[o],e)<=0?a=o+1:i=o}while(a<i)}return a}}}null==St||St({LitElement:_t}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.2.0");var Tt=Et(At).right;Et((function(t){return null===t?NaN:+t})).center;var Mt=Tt;function Ct(t,e){var n,r;if(void 0===e){var a,i=x(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;null!=o&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}}catch(t){i.e(t)}finally{i.f()}}else{var s,l=-1,c=x(t);try{for(c.s();!(s=c.n()).done;){var u=s.value;null!=(u=e(u,++l,t))&&(void 0===n?u>=u&&(n=r=u):(n>u&&(n=u),r<u&&(r=u)))}}catch(t){c.e(t)}finally{c.f()}}return[n,r]}var Nt=function(){function t(){n(this,t),this._partials=new Float64Array(32),this._n=0}return a(t,[{key:"add",value:function(t){for(var e=this._partials,n=0,r=0;r<this._n&&r<32;r++){var a=e[r],i=t+a,o=Math.abs(t)<Math.abs(a)?t-(i-a):a-(i-t);o&&(e[n++]=o),t=i}return e[n]=t,this._n=n+1,this}},{key:"valueOf",value:function(){var t,e,n,r=this._partials,a=this._n,i=0;if(a>0){for(i=r[--a];a>0&&(t=i,!(n=(e=r[--a])-((i=t+e)-t))););a>0&&(n<0&&r[a-1]<0||n>0&&r[a-1]>0)&&(e=2*n)==(t=i+e)-i&&(i=t)}return i}}]),t}();function Rt(t){return t}var qt=Array.prototype.slice;function Pt(t){return function(){return t}}var zt=Math.sqrt(50),Ft=Math.sqrt(10),$t=Math.sqrt(2);function Ot(t,e,n){var r,a,i,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(a=t,t=e,e=a),0===(o=It(t,e,n))||!isFinite(o))return[];if(o>0){var l=Math.round(t/o),c=Math.round(e/o);for(l*o<t&&++l,c*o>e&&--c,i=new Array(a=c-l+1);++s<a;)i[s]=(l+s)*o}else{o=-o;var u=Math.round(t*o),h=Math.round(e*o);for(u/o<t&&++u,h/o>e&&--h,i=new Array(a=h-u+1);++s<a;)i[s]=(u+s)/o}return r&&i.reverse(),i}function It(t,e,n){var r=(e-t)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=zt?10:i>=Ft?5:i>=$t?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=zt?10:i>=Ft?5:i>=$t?2:1)}function Ht(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=zt?a*=10:i>=Ft?a*=5:i>=$t&&(a*=2),e<t?-a:a}function Ut(t){return Math.ceil(Math.log(function(t,e){var n=0;if(void 0===e){var r,a=x(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;null!=i&&(i=+i)>=i&&++n}}catch(t){a.e(t)}finally{a.f()}}else{var o,s=-1,l=x(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;null!=(c=e(c,++s,t))&&(c=+c)>=c&&++n}}catch(t){l.e(t)}finally{l.f()}}return n}(t))/Math.LN2)+1}function Dt(){var t=Rt,e=Ct,n=Ut;function r(r){Array.isArray(r)||(r=Array.from(r));var a,i,o=r.length,s=new Array(o);for(a=0;a<o;++a)s[a]=t(r[a],a,r);var l=e(s),c=l[0],u=l[1],h=n(s,c,u);if(!Array.isArray(h)){var d=u,f=+h;if(e===Ct){var p=function(t,e,n){for(var r;;){var a=It(t,e,n);if(a===r||0===a||!isFinite(a))return[t,e];a>0?(t=Math.floor(t/a)*a,e=Math.ceil(e/a)*a):a<0&&(t=Math.ceil(t*a)/a,e=Math.floor(e*a)/a),r=a}}(c,u,f),v=g(p,2);c=v[0],u=v[1]}if((h=Ot(c,u,f))[h.length-1]>=u)if(d>=u&&e===Ct){var m=It(c,u,f);isFinite(m)&&(m>0?u=(Math.floor(u/m)+1)*m:m<0&&(u=(Math.ceil(u*-m)+1)/-m))}else h.pop()}for(var b=h.length;h[0]<=c;)h.shift(),--b;for(;h[b-1]>u;)h.pop(),--b;var y,w=new Array(b+1);for(a=0;a<=b;++a)(y=w[a]=[]).x0=a>0?h[a-1]:c,y.x1=a<b?h[a]:u;for(a=0;a<o;++a)null!=(i=s[a])&&c<=i&&i<=u&&w[Mt(h,i,0,b)].push(r[a]);return w}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Pt(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Pt([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Pt(qt.call(t)):Pt(t),r):n},r}var Lt=regeneratorRuntime.mark(jt);function jt(t){var e,n,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=x(t),a.prev=1,e.s();case 3:if((n=e.n()).done){a.next=8;break}return r=n.value,a.delegateYield(r,"t0",6);case 6:a.next=3;break;case 8:a.next=13;break;case 10:a.prev=10,a.t1=a.catch(1),e.e(a.t1);case 13:return a.prev=13,e.f(),a.finish(13);case 16:case"end":return a.stop()}}),Lt,null,[[1,10,13,16]])}function Vt(t,e,n){t=+t,e=+e,n=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((e-t)/n)),i=new Array(a);++r<a;)i[r]=t+r*n;return i}function Bt(t){return t}function Kt(t){return"translate("+t+",0)"}function Xt(t){return"translate(0,"+t+")"}function Gt(t){return function(e){return+t(e)}}function Zt(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Yt(){return!this.__axis}function Wt(t,e){var n=[],r=null,a=null,i=6,o=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?Kt:Xt;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==a?e.tickFormat?e.tickFormat.apply(e,n):Bt:a,v=Math.max(i,0)+s,m=e.range(),b=+m[0]+l,g=+m[m.length-1]+l,y=(e.bandwidth?Zt:Gt)(e.copy(),l),w=d.selection?d.selection():d,k=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(f,e).order(),_=x.exit(),S=x.enter().append("g").attr("class","tick"),A=x.select("line"),E=x.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(S),A=A.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*i)),E=E.merge(S.append("text").attr("fill","currentColor").attr(u,c*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==w&&(k=k.transition(d),x=x.transition(d),A=A.transition(d),E=E.transition(d),_=_.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?h(t+l):this.getAttribute("transform")})),S.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:y(t))+l)}))),_.remove(),k.attr("d",4===t||2===t?o?"M"+c*o+","+b+"H"+l+"V"+g+"H"+c*o:"M"+l+","+b+"V"+g:o?"M"+b+","+c*o+"V"+l+"H"+g+"V"+c*o:"M"+b+","+l+"H"+g),x.attr("opacity",1).attr("transform",(function(t){return h(y(t)+l)})),A.attr(u+"2",c*i),E.attr(u,c*v).text(p),w.filter(Yt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=y}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(a=t,d):a},d.tickSize=function(t){return arguments.length?(i=o=+t,d):i},d.tickSizeInner=function(t){return arguments.length?(i=+t,d):i},d.tickSizeOuter=function(t){return arguments.length?(o=+t,d):o},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Qt(t){return Wt(3,t)}function Jt(t){return Wt(4,t)}var te={value:function(){}};function ee(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ne(r)}function ne(t){this._=t}function re(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ae(t,e){for(var n,r=0,a=t.length;r<a;++r)if((n=t[r]).name===e)return n.value}function ie(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=te,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ne.prototype=ee.prototype={constructor:ne,on:function(t,e){var n,r=this._,a=re(t+"",r),i=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<o;)if(n=(t=a[i]).type)r[n]=ie(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ie(r[n],t.name,null);return this}for(;++i<o;)if((n=(t=a[i]).type)&&(n=ae(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,a=new Array(n),i=0;i<n;++i)a[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,a)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,i=r.length;a<i;++a)r[a].value.apply(e,n)}};var oe="http://www.w3.org/1999/xhtml",se={svg:"http://www.w3.org/2000/svg",xhtml:oe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function le(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),se.hasOwnProperty(e)?{space:se[e],local:t}:t}function ce(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===oe&&e.documentElement.namespaceURI===oe?e.createElement(t):e.createElementNS(n,t)}}function ue(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function he(t){var e=le(t);return(e.local?ue:ce)(e)}function de(){}function fe(t){return null==t?de:function(){return this.querySelector(t)}}function pe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function ve(){return[]}function me(t){return null==t?ve:function(){return this.querySelectorAll(t)}}function be(t){return function(){return this.matches(t)}}function ge(t){return function(e){return e.matches(t)}}var ye=Array.prototype.find;function we(){return this.firstElementChild}var ke=Array.prototype.filter;function xe(){return Array.from(this.children)}function _e(t){return new Array(t.length)}function Se(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ae(t){return function(){return t}}function Ee(t,e,n,r,a,i){for(var o,s=0,l=e.length,c=i.length;s<c;++s)(o=e[s])?(o.__data__=i[s],r[s]=o):n[s]=new Se(t,i[s]);for(;s<l;++s)(o=e[s])&&(a[s]=o)}function Te(t,e,n,r,a,i,o){var s,l,c,u=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=c=o.call(l,l.__data__,s,e)+"",u.has(c)?a[s]=l:u.set(c,l));for(s=0;s<d;++s)c=o.call(t,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Se(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(f[s])===l&&(a[s]=l)}function Me(t){return t.__data__}function Ce(e){return"object"===t(e)&&"length"in e?e:Array.from(e)}function Ne(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Re(t){return function(){this.removeAttribute(t)}}function qe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pe(t,e){return function(){this.setAttribute(t,e)}}function ze(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $e(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Oe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ie(t){return function(){this.style.removeProperty(t)}}function He(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ue(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function De(t,e){return t.style.getPropertyValue(e)||Oe(t).getComputedStyle(t,null).getPropertyValue(e)}function Le(t){return function(){delete this[t]}}function je(t,e){return function(){this[t]=e}}function Ve(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Be(t){return t.trim().split(/^|\s+/)}function Ke(t){return t.classList||new Xe(t)}function Xe(t){this._node=t,this._names=Be(t.getAttribute("class")||"")}function Ge(t,e){for(var n=Ke(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function Ze(t,e){for(var n=Ke(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function Ye(t){return function(){Ge(this,t)}}function We(t){return function(){Ze(this,t)}}function Qe(t,e){return function(){(e.apply(this,arguments)?Ge:Ze)(this,t)}}function Je(){this.textContent=""}function tn(t){return function(){this.textContent=t}}function en(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function nn(){this.innerHTML=""}function rn(t){return function(){this.innerHTML=t}}function an(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function on(){this.nextSibling&&this.parentNode.appendChild(this)}function sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ln(){return null}function cn(){var t=this.parentNode;t&&t.removeChild(this)}function un(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function hn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function dn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fn(t){return function(){var e=this.__on;if(e){for(var n,r=0,a=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++a]=n:this.removeEventListener(n.type,n.listener,n.options);++a?e.length=a:delete this.__on}}}function pn(t,e,n){return function(){var r,a=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(a)for(var o=0,s=a.length;o<s;++o)if((r=a[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},a?a.push(r):this.__on=[r]}}function vn(t,e,n){var r=Oe(t),a=r.CustomEvent;"function"==typeof a?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function mn(t,e){return function(){return vn(this,t,e)}}function bn(t,e){return function(){return vn(this,t,e.apply(this,arguments))}}Se.prototype={constructor:Se,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)}},Xe.prototype={add:function(t){this._names.indexOf(t)<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}};var gn=regeneratorRuntime.mark(yn);function yn(){var t,e,n,r,a,i,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=13;break}r=t[e],a=0,i=r.length;case 3:if(!(a<i)){s.next=10;break}if(!(o=r[a])){s.next=7;break}return s.next=7,o;case 7:++a,s.next=3;break;case 10:++e,s.next=1;break;case 13:case"end":return s.stop()}}),gn,this)}var wn=[null];function kn(t,e){this._groups=t,this._parents=e}function xn(){return new kn([[document.documentElement]],wn)}function _n(t){return"string"==typeof t?new kn([[document.querySelector(t)]],[document.documentElement]):new kn([[t]],wn)}function Sn(t,e){if(t=function(t){for(var e;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.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]}kn.prototype=xn.prototype=i({constructor:kn,select:function(t){"function"!=typeof t&&(t=fe(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o,s=e[a],l=s.length,c=r[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(o=t.call(i,i.__data__,u,s))&&("__data__"in i&&(o.__data__=i.__data__),c[u]=o);return new kn(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return pe(t.apply(this,arguments))}}(t):me(t);for(var e=this._groups,n=e.length,r=[],a=[],i=0;i<n;++i)for(var o,s=e[i],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),a.push(o));return new kn(r,a)},selectChild:function(t){return this.select(null==t?we:function(t){return function(){return ye.call(this.children,t)}}("function"==typeof t?t:ge(t)))},selectChildren:function(t){return this.selectAll(null==t?xe:function(t){return function(){return ke.call(this.children,t)}}("function"==typeof t?t:ge(t)))},filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new kn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Me);var n=e?Te:Ee,r=this._parents,a=this._groups;"function"!=typeof t&&(t=Ae(t));for(var i=a.length,o=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],h=a[c],d=h.length,f=Ce(t.call(u,u&&u.__data__,c,r)),p=f.length,v=s[c]=new Array(p),m=o[c]=new Array(p),b=l[c]=new Array(d);n(u,h,v,m,b,f,e);for(var g,y,w=0,k=0;w<p;++w)if(g=v[w]){for(w>=k&&(k=w+1);!(y=m[k])&&++k<p;);g._next=y||null}}return(o=new kn(o,r))._enter=s,o._exit=l,o},enter:function(){return new kn(this._enter||this._groups.map(_e),this._parents)},exit:function(){return new kn(this._exit||this._groups.map(_e),this._parents)},join:function(t,e,n){var r=this.enter(),a=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(a=e(a))&&(a=a.selection()),null==n?i.remove():n(i),r&&a?r.merge(a).order():a},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),l=0;l<o;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<a;++l)s[l]=n[l];return new kn(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,a=t[e],i=a.length-1,o=a[i];--i>=0;)(r=a[i])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ne);for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o,s=n[i],l=s.length,c=a[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(e)}return new kn(a,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null},size:function(){var t,e=0,n=x(this);try{for(n.s();!(t=n.n()).done;){t.value;++e}}catch(t){n.e(t)}finally{n.f()}return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a,i=e[n],o=0,s=i.length;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this},attr:function(t,e){var n=le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?qe:Re:"function"==typeof e?n.local?$e:Fe:n.local?ze:Pe)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ie:"function"==typeof e?Ue:He)(t,e,null==n?"":n)):De(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Le:"function"==typeof e?Ve:je)(t,e)):this.node()[t]},classed:function(t,e){var n=Be(t+"");if(arguments.length<2){for(var r=Ke(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each(("function"==typeof e?Qe:e?Ye:We)(n,e))},text:function(t){return arguments.length?this.each(null==t?Je:("function"==typeof t?en:tn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?nn:("function"==typeof t?an:rn)(t)):this.node().innerHTML},raise:function(){return this.each(on)},lower:function(){return this.each(sn)},append:function(t){var e="function"==typeof t?t:he(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:he(t),r=null==e?ln:"function"==typeof e?e:fe(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(cn)},clone:function(t){return this.select(t?hn:un)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,a,i=dn(t+""),o=i.length;if(!(arguments.length<2)){for(s=e?pn:fn,r=0;r<o;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((a=i[r]).type===l.type&&a.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?bn:mn)(t,e))}},Symbol.iterator,yn);var An={passive:!1},En={capture:!0,passive:!1};function Tn(t){t.stopImmediatePropagation()}function Mn(t){t.preventDefault(),t.stopImmediatePropagation()}var Cn=function(t){return function(){return t}};function Nn(t,e){var n=e.sourceEvent,r=e.subject,a=e.target,i=e.identifier,o=e.active,s=e.x,l=e.y,c=e.dx,u=e.dy,h=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}function Rn(t){return!t.ctrlKey&&!t.button}function qn(){return this.parentNode}function Pn(t,e){return null==e?{x:t.x,y:t.y}:e}function zn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fn(){var t,e,n,r,a=Rn,i=qn,o=Pn,s=zn,l={},c=ee("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",b,An).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(o,s){if(!r&&a.call(this,o,s)){var l=y(this,i.call(this,o,s),o,s,"mouse");l&&(_n(o.view).on("mousemove.drag",p,En).on("mouseup.drag",v,En),function(t){var e=t.document.documentElement,n=_n(t).on("dragstart.drag",Mn,En);"onselectstart"in e?n.on("selectstart.drag",Mn,En):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(o.view),Tn(o),n=!1,t=o.clientX,e=o.clientY,l("start",o))}}function p(r){if(Mn(r),!n){var a=r.clientX-t,i=r.clientY-e;n=a*a+i*i>h}l.mouse("drag",r)}function v(t){_n(t.view).on("mousemove.drag mouseup.drag",null),function(t,e){var n=t.document.documentElement,r=_n(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mn,En),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,n),Mn(t),l.mouse("end",t)}function m(t,e){if(a.call(this,t,e)){var n,r,o=t.changedTouches,s=i.call(this,t,e),l=o.length;for(n=0;n<l;++n)(r=y(this,s,t,e,o[n].identifier,o[n]))&&(Tn(t),r("start",t,o[n]))}}function b(t){var e,n,r=t.changedTouches,a=r.length;for(e=0;e<a;++e)(n=l[r[e].identifier])&&(Mn(t),n("drag",t,r[e]))}function g(t){var e,n,a=t.changedTouches,i=a.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),e=0;e<i;++e)(n=l[a[e].identifier])&&(Tn(t),n("end",t,a[e]))}function y(t,e,n,r,a,i){var s,h,f,p=c.copy(),v=Sn(i||n,e);if(null!=(f=o.call(t,new Nn("beforestart",{sourceEvent:n,target:d,identifier:a,active:u,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-v[0]||0,h=f.y-v[1]||0,function n(i,o,c){var m,b=v;switch(i){case"start":l[a]=n,m=u++;break;case"end":delete l[a],--u;case"drag":v=Sn(c||o,e),m=u}p.call(i,t,new Nn(i,{sourceEvent:o,subject:f,target:d,identifier:a,active:m,x:v[0]+s,y:v[1]+h,dx:v[0]-b[0],dy:v[1]-b[1],dispatch:p}),r)}}return d.filter=function(t){return arguments.length?(a="function"==typeof t?t:Cn(!!t),d):a},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Cn(t),d):i},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:Cn(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Cn(!!t),d):s},d.on=function(){var t=c.on.apply(c,arguments);return t===c?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function $n(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function On(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function In(){}Nn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Hn=1/.7,Un="\\s*([+-]?\\d+)\\s*",Dn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jn=/^#([0-9a-f]{3,8})$/,Vn=new RegExp("^rgb\\("+[Un,Un,Un]+"\\)$"),Bn=new RegExp("^rgb\\("+[Ln,Ln,Ln]+"\\)$"),Kn=new RegExp("^rgba\\("+[Un,Un,Un,Dn]+"\\)$"),Xn=new RegExp("^rgba\\("+[Ln,Ln,Ln,Dn]+"\\)$"),Gn=new RegExp("^hsl\\("+[Dn,Ln,Ln]+"\\)$"),Zn=new RegExp("^hsla\\("+[Dn,Ln,Ln,Dn]+"\\)$"),Yn={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};function Wn(){return this.rgb().formatHex()}function Qn(){return this.rgb().formatRgb()}function Jn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=jn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tr(e):3===n?new ar(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?er(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?er(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Vn.exec(t))?new ar(e[1],e[2],e[3],1):(e=Bn.exec(t))?new ar(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kn.exec(t))?er(e[1],e[2],e[3],e[4]):(e=Xn.exec(t))?er(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Gn.exec(t))?lr(e[1],e[2]/100,e[3]/100,1):(e=Zn.exec(t))?lr(e[1],e[2]/100,e[3]/100,e[4]):Yn.hasOwnProperty(t)?tr(Yn[t]):"transparent"===t?new ar(NaN,NaN,NaN,0):null}function tr(t){return new ar(t>>16&255,t>>8&255,255&t,1)}function er(t,e,n,r){return r<=0&&(t=e=n=NaN),new ar(t,e,n,r)}function nr(t){return t instanceof In||(t=Jn(t)),t?new ar((t=t.rgb()).r,t.g,t.b,t.opacity):new ar}function rr(t,e,n,r){return 1===arguments.length?nr(t):new ar(t,e,n,null==r?1:r)}function ar(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ir(){return"#"+sr(this.r)+sr(this.g)+sr(this.b)}function or(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function sr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function lr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ur(t,e,n,r)}function cr(t){if(t instanceof ur)return new ur(t.h,t.s,t.l,t.opacity);if(t instanceof In||(t=Jn(t)),!t)return new ur;if(t instanceof ur)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),i=Math.max(e,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new ur(o,s,l,t.opacity)}function ur(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}$n(In,Jn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Wn,formatHex:Wn,formatHsl:function(){return cr(this).formatHsl()},formatRgb:Qn,toString:Qn}),$n(ar,rr,On(In,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ar(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:ir,formatHex:ir,formatRgb:or,toString:or})),$n(ur,(function(t,e,n,r){return 1===arguments.length?cr(t):new ur(t,e,n,null==r?1:r)}),On(In,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new ur(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ur(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new ar(hr(t>=240?t-240:t+120,a,r),hr(t,a,r),hr(t<120?t+240:t-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var dr=function(t){return function(){return t}};function fr(t){return 1==(t=+t)?pr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):dr(isNaN(e)?n:e)}}function pr(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):dr(isNaN(t)?e:t)}var vr=function t(e){var n=fr(e);function r(t,e){var r=n((t=rr(t)).r,(e=rr(e)).r),a=n(t.g,e.g),i=n(t.b,e.b),o=pr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=i(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function mr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,a=e.slice();return function(i){for(n=0;n<r;++n)a[n]=t[n]*(1-i)+e[n]*i;return a}}function br(t,e){var n,r=e?e.length:0,a=t?Math.min(r,t.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=Sr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<a;++n)o[n]=i[n](t);return o}}function gr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function yr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function wr(e,n){var r,a={},i={};for(r in null!==e&&"object"===t(e)||(e={}),null!==n&&"object"===t(n)||(n={}),n)r in e?a[r]=Sr(e[r],n[r]):i[r]=n[r];return function(t){for(r in a)i[r]=a[r](t);return i}}var kr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xr=new RegExp(kr.source,"g");function _r(t,e){var n,r,a,i=kr.lastIndex=xr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=kr.exec(t))&&(r=xr.exec(e));)(a=r.index)>i&&(a=e.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:yr(n,r)})),i=xr.lastIndex;return i<e.length&&(a=e.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Sr(e,n){var r,a=t(n);return null==n||"boolean"===a?dr(n):("number"===a?yr:"string"===a?(r=Jn(n))?(n=r,vr):_r:n instanceof Jn?vr:n instanceof Date?gr:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(n)?mr:Array.isArray(n)?br:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?wr:yr)(e,n)}function Ar(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Er,Tr=180/Math.PI,Mr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cr(t,e,n,r,a,i){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*Tr,skewX:Math.atan(l)*Tr,scaleX:o,scaleY:s}}function Nr(t,e,n,r){function a(t){return t.length?t.pop()+" ":""}return function(i,o){var s=[],l=[];return i=t(i),o=t(o),function(t,r,a,i,o,s){if(t!==a||r!==i){var l=o.push("translate(",null,e,null,n);s.push({i:l-4,x:yr(t,a)},{i:l-2,x:yr(r,i)})}else(a||i)&&o.push("translate("+a+e+i+n)}(i.translateX,i.translateY,o.translateX,o.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(a(n)+"rotate(",null,r)-2,x:yr(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(i.rotate,o.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(a(n)+"skewX(",null,r)-2,x:yr(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(i.skewX,o.skewX,s,l),function(t,e,n,r,i,o){if(t!==n||e!==r){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:yr(t,n)},{i:s-2,x:yr(e,r)})}else 1===n&&1===r||i.push(a(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Rr,qr,Pr=Nr((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Mr:Cr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),zr=Nr((function(t){return null==t?Mr:(Er||(Er=document.createElementNS("http://www.w3.org/2000/svg","g")),Er.setAttribute("transform",t),(t=Er.transform.baseVal.consolidate())?Cr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Mr)}),", ",")",")"),Fr=0,$r=0,Or=0,Ir=0,Hr=0,Ur=0,Dr="object"===("undefined"==typeof performance?"undefined":t(performance))&&performance.now?performance:Date,Lr="object"===("undefined"==typeof window?"undefined":t(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jr(){return Hr||(Lr(Vr),Hr=Dr.now()+Ur)}function Vr(){Hr=0}function Br(){this._call=this._time=this._next=null}function Kr(t,e,n){var r=new Br;return r.restart(t,e,n),r}function Xr(){Hr=(Ir=Dr.now())+Ur,Fr=$r=0;try{!function(){jr(),++Fr;for(var t,e=Rr;e;)(t=Hr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fr}()}finally{Fr=0,function(){var t,e,n=Rr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rr=e);qr=t,Zr(r)}(),Hr=0}}function Gr(){var t=Dr.now(),e=t-Ir;e>1e3&&(Ur-=e,Ir=t)}function Zr(t){Fr||($r&&($r=clearTimeout($r)),t-Hr>24?(t<1/0&&($r=setTimeout(Xr,t-Dr.now()-Ur)),Or&&(Or=clearInterval(Or))):(Or||(Ir=Dr.now(),Or=setInterval(Gr,1e3)),Fr=1,Lr(Xr)))}function Yr(t,e,n){var r=new Br;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Br.prototype=Kr.prototype={constructor:Br,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?jr():+n)+(null==e?0:+e),this._next||qr===this||(qr?qr._next=this:Rr=this,qr=this),this._call=t,this._time=n,Zr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zr())}};var Wr=ee("start","end","cancel","interrupt"),Qr=[];function Jr(t,e,n,r,a,i){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,a=t.__transition;function i(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(i){var c,u,h,d;if(1!==n.state)return l();for(c in a)if((d=a[c]).name===n.name){if(3===d.state)return Yr(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete a[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete a[c])}if(Yr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var a=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,o=r.length;++i<o;)r[i].call(t,a);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete a[e],a)return;delete t.__transition}a[e]=n,n.timer=Kr(i,0,n.time)}(t,n,{name:e,index:r,group:a,on:Wr,tween:Qr,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function ta(t,e){var n=na(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ea(t,e){var n=na(t,e);if(n.state>3)throw new Error("too late; already running");return n}function na(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ra(t,e){var n,r;return function(){var a=ea(this,t),i=a.tween;if(i!==n)for(var o=0,s=(r=n=i).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}a.tween=r}}function aa(t,e,n){var r,a;if("function"!=typeof n)throw new Error;return function(){var i=ea(this,t),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:e,value:n},l=0,c=a.length;l<c;++l)if(a[l].name===e){a[l]=s;break}l===c&&a.push(s)}i.tween=a}}function ia(t,e,n){var r=t._id;return t.each((function(){var t=ea(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return na(t,r).value[e]}}function oa(t,e){var n;return("number"==typeof e?yr:e instanceof Jn?vr:(n=Jn(e))?(e=n,vr):_r)(t,e)}function sa(t){return function(){this.removeAttribute(t)}}function la(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ca(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function ua(t,e,n){var r,a,i=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function ha(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttribute(t)}}function da(t,e,n){var r,a,i;return function(){var o,s,l=n(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===r&&s===a?i:(a=s,i=e(r=o,l));this.removeAttributeNS(t.space,t.local)}}function fa(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function pa(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function va(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&pa(t,a)),n}return a._value=e,a}function ma(t,e){var n,r;function a(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&fa(t,a)),n}return a._value=e,a}function ba(t,e){return function(){ta(this,t).delay=+e.apply(this,arguments)}}function ga(t,e){return e=+e,function(){ta(this,t).delay=e}}function ya(t,e){return function(){ea(this,t).duration=+e.apply(this,arguments)}}function wa(t,e){return e=+e,function(){ea(this,t).duration=e}}function ka(t,e){if("function"!=typeof e)throw new Error;return function(){ea(this,t).ease=e}}function xa(t,e,n){var r,a,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ta:ea;return function(){var o=i(this,t),s=o.on;s!==r&&(a=(r=s).copy()).on(e,n),o.on=a}}var _a=xn.prototype.constructor;function Sa(t){return function(){this.style.removeProperty(t)}}function Aa(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ea(t,e,n){var r,a;function i(){var i=e.apply(this,arguments);return i!==a&&(r=(a=i)&&Aa(t,i,n)),r}return i._value=e,i}function Ta(t){return function(e){this.textContent=t.call(this,e)}}function Ma(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ta(r)),e}return r._value=t,r}var Ca=0;function Na(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ra(){return++Ca}var qa=xn.prototype;Na.prototype=i({constructor:Na,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=fe(t));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s,l,c=r[o],u=c.length,h=i[o]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Jr(h[d],e,n,d,h,na(s,n)));return new Na(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=me(t));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=na(l,n),v=0,m=f.length;v<m;++v)(d=f[v])&&Jr(d,e,n,v,f,p);i.push(f),o.push(l)}return new Na(i,o,e,n)},selectChild:qa.selectChild,selectChildren:qa.selectChildren,filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var i,o=e[a],s=o.length,l=r[a]=[],c=0;c<s;++c)(i=o[c])&&t.call(i,i.__data__,c,o)&&l.push(i);return new Na(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var l,c=e[s],u=n[s],h=c.length,d=o[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)o[s]=e[s];return new Na(o,this._parents,this._name,this._id)},selection:function(){return new _a(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ra(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=na(o,e);Jr(o,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Na(r,this._parents,t,n)},call:qa.call,nodes:qa.nodes,node:qa.node,size:qa.size,empty:qa.empty,each:qa.each,on:function(t,e){var n=this._id;return arguments.length<2?na(this.node(),n).on.on(t):this.each(xa(n,t,e))},attr:function(t,e){var n=le(t),r="transform"===n?zr:oa;return this.attrTween(t,"function"==typeof e?(n.local?da:ha)(n,r,ia(this,"attr."+t,e)):null==e?(n.local?la:sa)(n):(n.local?ua:ca)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=le(t);return this.tween(n,(r.local?va:ma)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Pr:oa;return null==e?this.styleTween(t,function(t,e){var n,r,a;return function(){var i=De(this,t),o=(this.style.removeProperty(t),De(this,t));return i===o?null:i===n&&o===r?a:a=e(n=i,r=o)}}(t,r)).on("end.style."+t,Sa(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,a,i;return function(){var o=De(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=De(this,t)),o===l?null:o===r&&l===a?i:(a=l,i=e(r=o,s))}}(t,r,ia(this,"style."+t,e))).each(function(t,e){var n,r,a,i,o="style."+e,s="end."+o;return function(){var l=ea(this,t),c=l.on,u=null==l.value[o]?i||(i=Sa(e)):void 0;c===n&&a===u||(r=(n=c).copy()).on(s,a=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,a,i=n+"";return function(){var o=De(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ea(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ia(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ma(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,a=na(this.node(),n).tween,i=0,o=a.length;i<o;++i)if((r=a[i]).name===t)return r.value;return null}return this.each((null==e?ra:aa)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ba:ga)(e,t)):na(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ya:wa)(e,t)):na(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ka(e,t)):na(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ea(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,a=n.size();return new Promise((function(i,o){var s={value:o},l={value:function(){0==--a&&i()}};n.each((function(){var n=ea(this,r),a=n.on;a!==t&&((e=(t=a).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===a&&i()}))}},Symbol.iterator,qa[Symbol.iterator]);var Pa=function(t){return+t};function za(t){return t*t*t}function Fa(t){return--t*t*t+1}var $a={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Oa(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition ".concat(e," not found"));return n}xn.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,a,i=t.__transition,o=!0;if(i){for(a in e=null==e?null:e+"",i)(n=i[a]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[a]):o=!1;o&&delete t.__transition}}(this,t)}))},xn.prototype.transition=function(t){var e,n;t instanceof Na?(e=t._id,t=t._name):(e=Ra(),(n=$a).time=jr(),t=null==t?null:t+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o,s=r[i],l=s.length,c=0;c<l;++c)(o=s[c])&&Jr(o,t,e,c,s,n||Oa(o,e));return new Na(r,this._parents,t,e)};var Ia=Math.PI,Ha=2*Ia,Ua=Ha-1e-6;function Da(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function La(){return new Da}Da.prototype=La.prototype={constructor:Da,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,a,i){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,n,r,a){t=+t,e=+e,n=+n,r=+r,a=+a;var i=this._x1,o=this._y1,s=n-t,l=r-e,c=i-t,u=o-e,h=c*c+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-l*c)>1e-6&&a){var d=n-i,f=r-o,p=s*s+l*l,v=d*d+f*f,m=Math.sqrt(p),b=Math.sqrt(h),g=a*Math.tan((Ia-Math.acos((p+h-v)/(2*m*b)))/2),y=g/b,w=g/m;Math.abs(y-1)>1e-6&&(this._+="L"+(t+y*c)+","+(e+y*u)),this._+="A"+a+","+a+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*s)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,a,i){t=+t,e=+e,i=!!i;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^i,h=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%Ha+Ha),h>Ua?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Ia)+","+u+","+(this._x1=t+n*Math.cos(a))+","+(this._y1=e+n*Math.sin(a))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ja=Array.prototype.slice;function Va(t,e){return t-e}var Ba=function(t){return function(){return t}};function Ka(t,e){for(var n,r=-1,a=e.length;++r<a;)if(n=Xa(t,e[r]))return n;return 0}function Xa(t,e){for(var n=e[0],r=e[1],a=-1,i=0,o=t.length,s=o-1;i<o;s=i++){var l=t[i],c=l[0],u=l[1],h=t[s],d=h[0],f=h[1];if(Ga(l,h,e))return 0;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(a=-a)}return a}function Ga(t,e,n){var r;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&function(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}(t[r=+(t[0]===e[0])],n[r],e[r])}function Za(){}var Ya=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Wa(){var t=1,e=1,n=Ut,r=s;function a(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=Ct(t),a=Ht(r[0],r[1],e);e=Ot(Math.floor(r[0]/a)*a,Math.floor(r[1]/a-1)*a,e)}return e.map((function(e){return i(t,e)}))}function i(n,a){var i=[],s=[];return function(n,r,a){var i,s,l,c,u,h,d=new Array,f=new Array;i=s=-1,c=n[0]>=r,Ya[c<<1].forEach(p);for(;++i<t-1;)l=c,c=n[i+1]>=r,Ya[l|c<<1].forEach(p);Ya[c<<0].forEach(p);for(;++s<e-1;){for(i=-1,c=n[s*t+t]>=r,u=n[s*t]>=r,Ya[c<<1|u<<2].forEach(p);++i<t-1;)l=c,c=n[s*t+t+i+1]>=r,h=u,u=n[s*t+i+1]>=r,Ya[l|c<<1|u<<2|h<<3].forEach(p);Ya[c|u<<3].forEach(p)}i=-1,u=n[s*t]>=r,Ya[u<<2].forEach(p);for(;++i<t-1;)h=u,u=n[s*t+i+1]>=r,Ya[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+s],l=[t[1][0]+i,t[1][1]+s],c=o(r),u=o(l);(e=f[c])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(l),a(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(l),f[e.end=u]=e):(e=d[u])?(n=f[c])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(l),a(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=f[u]={start:c,end:u,ring:[r,l]}}Ya[u<<3].forEach(p)}(n,a,(function(t){r(t,n,a),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==Ka((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:a,coordinates:i}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,a){n.forEach((function(n){var i,o=n[0],s=n[1],l=0|o,c=0|s,u=r[c*t+l];o>0&&o<t&&l===o&&(i=r[c*t+l-1],n[0]=o+(a-i)/(u-i)-.5),s>0&&s<e&&c===s&&(i=r[(c-1)*t+l],n[1]=s+(a-i)/(u-i)-.5)}))}return a.contour=i,a.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,a},a.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ba(ja.call(t)):Ba(t),a):n},a.smooth=function(t){return arguments.length?(r=t?s:Za,a):r===s},a}function Qa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ja(t){return(t=Qa(Math.abs(t)))?t[1]:NaN}var ti,ei=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ni(t){if(!(e=ei.exec(t)))throw new Error("invalid format: "+t);var e;return new ri({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]})}function ri(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ai(t,e){var n=Qa(t,e);if(!n)return t+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}ni.prototype=ri.prototype,ri.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ii={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ai(100*t,e)},r:ai,s:function(t,e){var n=Qa(t,e);if(!n)return t+"";var r=n[0],a=n[1],i=a-(ti=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Qa(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function oi(t){return t}var si,li,ci,ui=Array.prototype.map,hi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function di(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?oi:(e=ui.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var a=t.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(t.substring(a-=s,a+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(n)}),a=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?oi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ui.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=ni(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,v=t.comma,m=t.precision,b=t.trim,g=t.type;"n"===g?(v=!0,g="g"):ii[g]||(void 0===m&&(m=12),b=!0,g="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===d?i:/[%p]/.test(g)?l:"",k=ii[g],x=/[defgprs%]/.test(g);function _(t){var a,i,l,d=y,_=w;if("c"===g)_=k(t)+_,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:k(Math.abs(t),m),b&&(t=function(t){t:for(var e,n=t.length,r=1,a=-1;r<n;++r)switch(t[r]){case".":a=e=r;break;case"0":0===a&&(a=r),e=r;break;default:if(!+t[r])break t;a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,_=("s"===g?hi[8+ti/3]:"")+_+(S&&"("===h?")":""),x)for(a=-1,i=t.length;++a<i;)if(48>(l=t.charCodeAt(a))||l>57){_=(46===l?o+t.slice(a+1):t.slice(a))+_,t=t.slice(0,a);break}}v&&!f&&(t=r(t,1/0));var A=d.length+t.length+_.length,E=A<p?new Array(p-A+1).join(e):"";switch(v&&f&&(t=r(E+t,E.length?p-_.length:1/0),E=""),n){case"<":t=d+t+_+E;break;case"=":t=d+E+t+_;break;case"^":t=E.slice(0,A=E.length>>1)+d+t+_+E.slice(A);break;default:t=E+d+t+_}return s(t)}return m=void 0===m?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),_.toString=function(){return t+""},_}return{format:h,formatPrefix:function(t,e){var n=h(((t=ni(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3))),a=Math.pow(10,-r),i=hi[8+r/3];return function(t){return n(a*t)+i}}}}si=di({thousands:",",grouping:[3],currency:["$",""]}),li=si.format,ci=si.formatPrefix;var fi=Math.PI,pi=2*fi,vi=180/fi,mi=fi/180,bi=Math.abs,gi=Math.cos,yi=Math.sin,wi=Math.sqrt;function ki(){}function xi(t,e){t&&Si.hasOwnProperty(t.type)&&Si[t.type](t,e)}var _i={Feature:function(t,e){xi(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++r<a;)xi(n[r].geometry,e)}},Si={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 n=t.coordinates,r=-1,a=n.length;++r<a;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ai(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ai(n[r],e,0)},Polygon:function(t,e){Ei(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Ei(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,a=n.length;++r<a;)xi(n[r],e)}};function Ai(t,e,n){var r,a=-1,i=t.length-n;for(e.lineStart();++a<i;)r=t[a],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ei(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ai(t[n],e,1);e.polygonEnd()}function Ti(t,e){t&&_i.hasOwnProperty(t.type)?_i[t.type](t,e):xi(t,e)}function Mi(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ci(t,e,n,r,a){var i,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(function(t,e){return bi(t[0]-e[0])<1e-6&&bi(t[1]-e[1])<1e-6}(r,o)){if(!r[2]&&!o[2]){for(a.lineStart(),i=0;i<e;++i)a.point((r=t[i])[0],r[1]);return void a.lineEnd()}o[0]+=2e-6}s.push(n=new Mi(r,t,null,!0)),l.push(n.o=new Mi(r,null,n,!1)),s.push(n=new Mi(o,t,null,!1)),l.push(n.o=new Mi(o,null,n,!0))}})),s.length){for(l.sort(e),Ni(s),Ni(l),i=0,o=l.length;i<o;++i)l[i].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,a.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(i=0,o=c.length;i<o;++i)a.point((u=c[i])[0],u[1]);else r(d.x,d.n.x,1,a);d=d.n}else{if(f)for(c=d.p.z,i=c.length-1;i>=0;--i)a.point((u=c[i])[0],u[1]);else r(d.x,d.p.x,-1,a);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);a.lineEnd()}}}function Ni(t){if(e=t.length){for(var e,n,r=0,a=t[0];++r<e;)a.n=n=t[r],n.p=a,a=n;a.n=n=t[0],n.p=a}}function Ri(t,e,n,r){function a(a,i){return t<=a&&a<=n&&e<=i&&i<=r}function i(a,i,s,c){var u=0,h=0;if(null==a||(u=o(a,s))!==(h=o(i,s))||l(a,i)<0^s>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else c.point(i[0],i[1])}function o(r,a){return bi(r[0]-t)<1e-6?a>0?0:3:bi(r[0]-n)<1e-6?a>0?2:1:bi(r[1]-e)<1e-6?a>0?1:0:a>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,u,h,d,f,p,v,m,b,g,y=o,w=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:ki,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}(),k={point:x,lineStart:function(){k.point=_,c&&c.push(u=[]);b=!0,m=!1,p=v=NaN},lineEnd:function(){l&&(_(h,d),f&&m&&w.rejoin(),l.push(w.result()));k.point=x,m&&y.lineEnd()},polygonStart:function(){y=w,l=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,a=c.length;n<a;++n)for(var i,o,s=c[n],l=1,u=s.length,h=s[0],d=h[0],f=h[1];l<u;++l)i=d,o=f,d=(h=s[l])[0],f=h[1],o<=r?f>r&&(d-i)*(r-o)>(f-o)*(t-i)&&++e:f<=r&&(d-i)*(r-o)<(f-o)*(t-i)&&--e;return e}(),n=g&&e,a=(h=l,l=Array.from(jt(h))).length;var h;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),a&&Ci(l,s,e,i,o),o.polygonEnd());y=o,l=c=u=null}};function x(t,e){a(t,e)&&y.point(t,e)}function _(i,o){var s=a(i,o);if(c&&u.push([i,o]),b)h=i,d=o,f=s,b=!1,s&&(y.lineStart(),y.point(i,o));else if(s&&m)y.point(i,o);else{var l=[p=Math.max(-1e9,Math.min(1e9,p)),v=Math.max(-1e9,Math.min(1e9,v))],w=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,a,i){var o,s=t[0],l=t[1],c=0,u=1,h=e[0]-s,d=e[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-l,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}return c>0&&(t[0]=s+c*h,t[1]=l+c*d),u<1&&(e[0]=s+u*h,e[1]=l+u*d),!0}}}}}(l,w,t,e,n,r)?s&&(y.lineStart(),y.point(i,o),g=!1):(m||(y.lineStart(),y.point(l[0],l[1])),y.point(w[0],w[1]),s||y.lineEnd(),g=!1)}p=i,v=o,m=s}return k}}var qi,Pi,zi,Fi,$i=function(t){return t},Oi=new Nt,Ii=new Nt,Hi={point:ki,lineStart:ki,lineEnd:ki,polygonStart:function(){Hi.lineStart=Ui,Hi.lineEnd=ji},polygonEnd:function(){Hi.lineStart=Hi.lineEnd=Hi.point=ki,Oi.add(bi(Ii)),Ii=new Nt},result:function(){var t=Oi/2;return Oi=new Nt,t}};function Ui(){Hi.point=Di}function Di(t,e){Hi.point=Li,qi=zi=t,Pi=Fi=e}function Li(t,e){Ii.add(Fi*t-zi*e),zi=t,Fi=e}function ji(){Li(qi,Pi)}var Vi=Hi,Bi=1/0,Ki=Bi,Xi=-Bi,Gi=Xi,Zi={point:function(t,e){t<Bi&&(Bi=t);t>Xi&&(Xi=t);e<Ki&&(Ki=e);e>Gi&&(Gi=e)},lineStart:ki,lineEnd:ki,polygonStart:ki,polygonEnd:ki,result:function(){var t=[[Bi,Ki],[Xi,Gi]];return Xi=Gi=-(Ki=Bi=1/0),t}};var Yi,Wi,Qi,Ji,to=Zi,eo=0,no=0,ro=0,ao=0,io=0,oo=0,so=0,lo=0,co=0,uo={point:ho,lineStart:fo,lineEnd:mo,polygonStart:function(){uo.lineStart=bo,uo.lineEnd=go},polygonEnd:function(){uo.point=ho,uo.lineStart=fo,uo.lineEnd=mo},result:function(){var t=co?[so/co,lo/co]:oo?[ao/oo,io/oo]:ro?[eo/ro,no/ro]:[NaN,NaN];return eo=no=ro=ao=io=oo=so=lo=co=0,t}};function ho(t,e){eo+=t,no+=e,++ro}function fo(){uo.point=po}function po(t,e){uo.point=vo,ho(Qi=t,Ji=e)}function vo(t,e){var n=t-Qi,r=e-Ji,a=wi(n*n+r*r);ao+=a*(Qi+t)/2,io+=a*(Ji+e)/2,oo+=a,ho(Qi=t,Ji=e)}function mo(){uo.point=ho}function bo(){uo.point=yo}function go(){wo(Yi,Wi)}function yo(t,e){uo.point=wo,ho(Yi=Qi=t,Wi=Ji=e)}function wo(t,e){var n=t-Qi,r=e-Ji,a=wi(n*n+r*r);ao+=a*(Qi+t)/2,io+=a*(Ji+e)/2,oo+=a,so+=(a=Ji*t-Qi*e)*(Qi+t),lo+=a*(Ji+e),co+=3*a,ho(Qi=t,Ji=e)}var ko=uo;function xo(t){this._context=t}xo.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(){0===this._line&&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,pi)}},result:ki};var _o,So,Ao,Eo,To,Mo=new Nt,Co={point:ki,lineStart:function(){Co.point=No},lineEnd:function(){_o&&Ro(So,Ao),Co.point=ki},polygonStart:function(){_o=!0},polygonEnd:function(){_o=null},result:function(){var t=+Mo;return Mo=new Nt,t}};function No(t,e){Co.point=Ro,So=Eo=t,Ao=To=e}function Ro(t,e){Eo-=t,To-=e,Mo.add(wi(Eo*Eo+To*To)),Eo=t,To=e}var qo=Co;function Po(){this._string=[]}function zo(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Fo(t,e){var n,r,a=4.5;function i(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),Ti(t,n(r))),r.result()}return i.area=function(t){return Ti(t,n(Vi)),Vi.result()},i.measure=function(t){return Ti(t,n(qo)),qo.result()},i.bounds=function(t){return Ti(t,n(to)),to.result()},i.centroid=function(t){return Ti(t,n(ko)),ko.result()},i.projection=function(e){return arguments.length?(n=null==e?(t=null,$i):(t=e).stream,i):t},i.context=function(t){return arguments.length?(r=null==t?(e=null,new Po):new xo(e=t),"function"!=typeof a&&r.pointRadius(a),i):e},i.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),i):a},i.projection(t).context(e)}function $o(){}function Oo(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Ti(n,t.stream(to)),e(to.result()),null!=r&&t.clipExtent(r),t}function Io(t,e,n){return Oo(t,(function(n){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),o=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}function Ho(){var t,e,n,r,a,i,o,s,l=1,c=0,u=0,h=1,d=1,f=0,p=null,v=1,m=1,b=(s={point:function(t,e){var n=w([t,e]);this.stream.point(n[0],n[1])}},function(t){var e=new $o;for(var n in s)e[n]=s[n];return e.stream=t,e}),g=$i;function y(){return v=l*h,m=l*d,i=o=null,w}function w(n){var r=n[0]*v,a=n[1]*m;if(f){var i=a*t-r*e;r=r*t+a*e,a=i}return[r+c,a+u]}return w.invert=function(n){var r=n[0]-c,a=n[1]-u;if(f){var i=a*t+r*e;r=r*t-a*e,a=i}return[r/v,a/m]},w.stream=function(t){return i&&o===t?i:i=b(g(o=t))},w.postclip=function(t){return arguments.length?(g=t,p=n=r=a=null,y()):g},w.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=a=null,$i):Ri(p=+t[0][0],n=+t[0][1],r=+t[1][0],a=+t[1][1]),y()):null==p?null:[[p,n],[r,a]]},w.scale=function(t){return arguments.length?(l=+t,y()):l},w.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],y()):[c,u]},w.angle=function(n){return arguments.length?(e=yi(f=n%360*mi),t=gi(f),y()):f*vi},w.reflectX=function(t){return arguments.length?(h=t?-1:1,y()):h<0},w.reflectY=function(t){return arguments.length?(d=t?-1:1,y()):d<0},w.fitExtent=function(t,e){return Io(w,t,e)},w.fitSize=function(t,e){return function(t,e,n){return Io(t,[[0,0],e],n)}(w,t,e)},w.fitWidth=function(t,e){return function(t,e,n){return Oo(t,(function(n){var r=+e,a=r/(n[1][0]-n[0][0]),i=(r-a*(n[1][0]+n[0][0]))/2,o=-a*n[0][1];t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w.fitHeight=function(t,e){return function(t,e,n){return Oo(t,(function(n){var r=+e,a=r/(n[1][1]-n[0][1]),i=-a*n[0][0],o=(r-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([i,o])}),n)}(w,t,e)},w}function Uo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Do(t){return+t}Po.prototype={_radius:4.5,_circle:zo(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=zo(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},$o.prototype={constructor:$o,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()}};var Lo=[0,1];function jo(t){return t}function Vo(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Bo(t,e,n){var r=t[0],a=t[1],i=e[0],o=e[1];return a<r?(r=Vo(a,r),i=n(o,i)):(r=Vo(r,a),i=n(i,o)),function(t){return i(r(t))}}function Ko(t,e,n){var r=Math.min(t.length,e.length)-1,a=new Array(r),i=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)a[o]=Vo(t[o],t[o+1]),i[o]=n(e[o],e[o+1]);return function(e){var n=Mt(t,e,1,r)-1;return i[n](a[n](e))}}function Xo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Go(){var t,e,n,r,a,i,o=Lo,s=Lo,l=Sr,c=jo;function u(){var t=Math.min(o.length,s.length);return c!==jo&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?Ko:Bo,a=i=null,h}function h(e){return null==e||isNaN(e=+e)?n:(a||(a=r(o.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((i||(i=r(s,o.map(t),yr)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Do),u()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=Ar,u()},h.clamp=function(t){return arguments.length?(c=!!t||jo,u()):c!==jo},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Zo(){return Go()(jo,jo)}function Yo(t,e,n,r){var a,i=Ht(t,e,n);switch((r=ni(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3)))-Ja(Math.abs(t)))}(i,o))||(r.precision=a),ci(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ja(e)-Ja(t))+1}(i,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(t){return Math.max(0,-Ja(Math.abs(t)))}(i))||(r.precision=a-2*("%"===r.type))}return li(r)}function Wo(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ot(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Yo(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,a,i=e(),o=0,s=i.length-1,l=i[o],c=i[s],u=10;for(c<l&&(a=l,l=c,c=a,a=o,o=s,s=a);u-- >0;){if((a=It(l,c,n))===r)return i[o]=l,i[s]=c,e(i);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return t},t}function Qo(){var t=Zo();return t.copy=function(){return Xo(t,Qo())},Uo.apply(t,arguments),Wo(t)}var Jo,ts,es,ns,rs,as,is,os,ss,ls=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");function cs(t){return function(){return t}}function us(t){this._context=t}function hs(t){return new us(t)}function ds(t){return t[0]}function fs(t){return t[1]}function ps(e,n){var r=cs(!0),a=null,i=hs,o=null;function s(s){var l,c,u,h=(s=function(e){return"object"===t(e)&&"length"in e?e:Array.from(e)}(s)).length,d=!1;for(null==a&&(o=i(u=La())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+n(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?ds:cs(e),n="function"==typeof n?n:void 0===n?fs:cs(n),s.x=function(t){return arguments.length?(e="function"==typeof t?t:cs(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:cs(+t),s):n},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:cs(!!t),s):r},s.curve=function(t){return arguments.length?(i=t,null!=a&&(o=i(a)),s):i},s.context=function(t){return arguments.length?(null==t?a=o=null:o=i(a=t),s):a},s}us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var vs,ms,bs=function(t){o(r,_t);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).uniqueId="decidables-".concat(r.uniqueId),t}return a(r,[{key:"getComputedStyleValue",value:function(t){return window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,t):getComputedStyle(this).getPropertyValue(t)}},{key:"firstUpdated",value:function(t){m(s(r.prototype),"firstUpdated",this).call(this,t),_n(this.renderRoot.host).classed("keyboard",!0).on("mousemove.keyboard touchstart.keyboard",(function(t){_n(t.currentTarget.renderRoot.host).classed("keyboard",!1).on("mousemove.keyboard touchstart.keyboard",null)})).on("keydown.keyboard",(function(t){_n(t.currentTarget.renderRoot.host).classed("keyboard",!0).on("keydown.keyboard mousemove.keyboard touchstart.keyboard",null)}))}}],[{key:"uniqueId",get:function(){return r.ID+=1,r.ID}},{key:"greys",get:function(){var t="#999999",e={white:"#ffffff"};return e.light75=vr(t,"#ffffff")(.75),e.light50=vr(t,"#ffffff")(.5),e.light25=vr(t,"#ffffff")(.25),e.grey=t,e.dark25=vr(t,"#000000")(.25),e.dark50=vr(t,"#000000")(.5),e.dark75=vr(t,"#000000")(.75),e.black="#000000",e}},{key:"shadows",get:function(){return{elevations:[0,2,4,8,16],baselineColor:"#000000",baselineColorString:"0, 0, 0",inverseBaselineColor:"#FFFFFF",inverseBaselineColorString:"255, 255, 255",opacityUmbra:.2,opacityPenumbra:.14,opacityAmbient:.12,opacityBoost:.2,mapUmbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:3,b:1,s:-2},4:{x:0,y:2,b:4,s:-1},8:{x:0,y:5,b:5,s:-3},16:{x:0,y:8,b:10,s:-5}},mapPenumbra:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:2,b:2,s:0},4:{x:0,y:4,b:5,s:0},8:{x:0,y:8,b:10,s:1},16:{x:0,y:16,b:24,s:2}},mapAmbient:{0:{x:0,y:0,b:0,s:0},2:{x:0,y:1,b:5,s:0},4:{x:0,y:1,b:10,s:0},8:{x:0,y:3,b:14,s:2},16:{x:0,y:6,b:30,s:5}}}}},{key:"cssBoxShadow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.shadows.opacityUmbra+this.shadows.opacityBoost,a=this.shadows.opacityPenumbra+this.shadows.opacityBoost,i=this.shadows.opacityAmbient+this.shadows.opacityBoost,o=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(r,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(r,")"),s=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(a,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(a,")"),l=n?"rgba(".concat(this.shadows.inverseBaselineColorString,", ").concat(i,")"):"rgba(".concat(this.shadows.baselineColorString,", ").concat(i,")"),c=this.shadows.mapUmbra[t],u=this.shadows.mapPenumbra[t],h=this.shadows.mapAmbient[t],d=e?"".concat(-c.y,"px ").concat(c.y/2,"px ").concat(c.b,"px ").concat(c.s,"px"):"".concat(c.y/2,"px ").concat(c.y,"px ").concat(c.b,"px ").concat(c.s,"px"),f=e?"".concat(-u.y,"px ").concat(u.y/2,"px ").concat(u.b,"px ").concat(u.s,"px"):"".concat(u.y/2,"px ").concat(u.y,"px ").concat(u.b,"px ").concat(u.s,"px"),p=e?"".concat(-h.y,"px ").concat(h.y/2,"px ").concat(h.b,"px ").concat(h.s,"px"):"".concat(h.y/2,"px ").concat(h.y,"px ").concat(h.b,"px ").concat(h.s,"px");return"".concat(d," ").concat(o,", ").concat(f," ").concat(s,", ").concat(p," ").concat(l)}},{key:"svgFilters",get:function(){var t=r.shadows,e=t.elevations.map((function(e){return at(Jo||(Jo=b(["\n <filter id=",' x="-250%" y="-250%" width="600%" height="600%">\n <feComponentTransfer in="SourceAlpha" result="solid">\n <feFuncA type="table" tableValues="0 1 1"/>\n </feComponentTransfer>\n <feOffset in="solid" result="offU" dx='," dy=",' />\n <feOffset in="solid" result="offP" dx='," dy=",' />\n <feOffset in="solid" result="offA" dx='," dy="," />\n ","\n ","\n ","\n <feGaussianBlur in=",' result="blurU" stdDeviation='," />\n <feGaussianBlur in=",' result="blurP" stdDeviation='," />\n <feGaussianBlur in=",' result="blurA" stdDeviation=',' />\n <feFlood in="SourceGraphic" result="opU" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opP" flood-color='," flood-opacity=",' />\n <feFlood in="SourceGraphic" result="opA" flood-color='," flood-opacity=",' />\n <feComposite in="opU" in2="blurU" result="shU" operator="in" />\n <feComposite in="opP" in2="blurP" result="shP" operator="in" />\n <feComposite in="opA" in2="blurA" result="shA" operator="in" />\n \x3c!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the "radius" value! --\x3e\n <feMorphology in="solid" result="smaller" operator="erode" radius=',' />\n <feComposite in="shU" in2="smaller" result="finalU" operator="out" />\n <feComposite in="shP" in2="smaller" result="finalP" operator="out" />\n <feComposite in="shA" in2="smaller" result="finalA" operator="out" />\n <feMerge>\n <feMergeNode in="finalU" />\n <feMergeNode in="finalP" />\n <feMergeNode in="finalA" />\n <feMergeNode in="SourceGraphic" />\n </feMerge>\n </filter>'])),"shadow-".concat(e),t.mapUmbra[e].y/2,t.mapUmbra[e].y,t.mapPenumbra[e].y/2,t.mapPenumbra[e].y,t.mapAmbient[e].y/2,t.mapAmbient[e].y,0===t.mapUmbra[e].s?at(ts||(ts=b([""]))):at(es||(es=b(['<feMorphology in="offU" result="spreadU" operator='," radius="," />"])),t.mapUmbra[e].s>0?"dilate":"erode",Math.abs(t.mapUmbra[e].s)),0===t.mapPenumbra[e].s?at(ns||(ns=b([""]))):at(rs||(rs=b(['<feMorphology in="offP" result="spreadP" operator='," radius="," />"])),t.mapPenumbra[e].s>0?"dilate":"erode",Math.abs(t.mapPenumbra[e].s)),0===t.mapAmbient[e].s?at(as||(as=b([""]))):at(is||(is=b(['<feMorphology in="offA" result="spreadA" operator='," radius="," />"])),t.mapAmbient[e].s>0?"dilate":"erode",Math.abs(t.mapAmbient[e].s)),0===t.mapUmbra[e].s?"offU":"spreadU",t.mapUmbra[e].b/2,0===t.mapPenumbra[e].s?"offP":"spreadP",t.mapPenumbra[e].b/2,0===t.mapAmbient[e].s?"offA":"spreadA",t.mapAmbient[e].b/2,t.baselineColor,t.opacityUmbra+t.opacityBoost,t.baselineColor,t.opacityPenumbra+t.opacityBoost,t.baselineColor,t.opacityAmbient+t.opacityBoost,1)}));return at(os||(os=b(['\n <svg class="defs">\n <defs>\n ',"\n </defs>\n </svg>\n "])),e)}},{key:"styles",get:function(){return N(ss||(ss=b(["\n :host {\n ---shadow-0: var(--shadow-0, ",");\n ---shadow-2: var(--shadow-2, ",");\n ---shadow-4: var(--shadow-4, ",");\n ---shadow-8: var(--shadow-8, ",");\n\n ---color-background: var(--color-background, ",");\n ---color-border: var(--color-border, ",");\n ---color-text: var(--color-text, ",");\n ---color-text-inverse: var(--color-text-inverse, ",");\n ---color-link: var(--color-link, ",");\n ---color-element-background: var(--color-element-background, ",");\n ---color-element-disabled: var(--color-element-disabled, ",");\n ---color-element-enabled: var(--color-element-enabled, ",");\n ---color-element-selected: var(--color-element-selected, ",");\n ---color-element-border: var(--color-element-border, ",");\n ---color-element-emphasis: var(--color-element-emphasis, ",');\n\n ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);\n ---font-family-math: var(--font-family-math, "Source Serif", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n '])),C(this.cssBoxShadow(0)),C(this.cssBoxShadow(2)),C(this.cssBoxShadow(4)),C(this.cssBoxShadow(8)),C(this.greys.white),C(this.greys.light75),C(this.greys.dark75),C(this.greys.white),C(this.greys.dark25),C(this.greys.light75),C(this.greys.light50),C(this.greys.grey),C(this.greys.dark25),C(this.greys.dark50),C(this.greys.dark75))}}]),r}();bs.ID=0;var gs=function(t){o(r,bs);var e=p(r);function r(){var t;return n(this,r),(t=e.call(this)).disabled=!1,t}return a(r,[{key:"render",value:function(){return rt(vs||(vs=b(["\n <button ?disabled=",">\n <slot></slot>\n </button>\n "])),this.disabled)}}],[{key:"properties",get:function(){return{disabled:{attribute:"disabled",type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[m(s(r),"styles",this),N(ms||(ms=b(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))]}}]),r}();customElements.define("decidables-button",gs);
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2018 Google LLC
|