diff --git a/_app/chunks/state-93a77356.js b/_app/chunks/state-93a77356.js new file mode 100644 index 00000000..b24220ca --- /dev/null +++ b/_app/chunks/state-93a77356.js @@ -0,0 +1 @@ +var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,a,r)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r,n=(e,t)=>{for(var a in t||(t={}))o.call(t,a)&&i(e,a,t[a]);if(r)for(var a of r(t))s.call(t,a)&&i(e,a,t[a]);return e},c=(e,r)=>t(e,a(r));import{C as l,J as d,K as m,L as p,M as u,N as y,O as g}from"./vendor-21474ee4.js";import{_ as f}from"./preload-helper-1db36302.js";const h=l({loading:!1}),O=async(e,t)=>{h.set({loading:!0,message:e});const a=await t;return h.set({loading:!1}),a};let b;const v=async()=>{if(!b)try{const{Analytics:e}=await f((()=>import("./analytics.browser.es-afad5c8e.js")),[]),t=await f((()=>import("./analytics-plugin-ga.browser.es-1cdb0512.js")),[]);b=e({app:"mermaid-live-editor",plugins:[t.init({trackingId:"UA-153180559-1"})]})}catch{console.info("Analytics blocked ;)")}};let S;const j={code:"graph TD\n A[Christmas] --\x3e|Get money| B(Go shopping)\n B --\x3e C{Let me think}\n C --\x3e|One| D[Laptop]\n C --\x3e|Two| E[iPhone]\n C --\x3e|Three| F[fa:fa-car Car]\n ",mermaid:JSON.stringify({theme:"default"},null,2),updateEditor:!1,autoSync:!0,updateDiagram:!0},E=d(l(j),m(),"codeStore"),L=p([E],(([e],t)=>{t(u(JSON.stringify(e),!0))})),_=e=>{let t;try{const a=g(e);console.log(`Trying to load state: ${a}`),t=JSON.parse(a);const r="string"==typeof t.mermaid?JSON.parse(t.mermaid):t.mermaid;r.securityLevel&&"strict"!==r.securityLevel&&confirm(`Removing "securityLevel":"${r.securityLevel}" from the config for safety.\nClick Cancel if you trust the source of this Diagram.`)&&delete r.securityLevel,t.mermaid=JSON.stringify(r,null,2)}catch(a){e&&console.error("Init error",a),t=y(E),console.log(t)}w(c(n({},t),{updateEditor:!0}))},w=e=>{E.update((t=>n(n({},t),e)))};let C=!1;const T=(e,t,a=!1)=>{var r;r=e,b&&(clearTimeout(S),S=setTimeout((function(){const e=r.replace(/^\s*%%.*\n/g,"\n").trimStart().split(" ")[0];console.debug("ga:","send","event","render",e),b.track("render",{graphType:e})}),5e3));if((e.match(/\n/g)||"").length+1>50&&!C&&y(E).autoSync){const e=confirm("Long diagram detected. Turn off Auto Sync? Click the sync logo to manually sync.");C=!0,e&&w({autoSync:!1})}E.update((r=>c(n({},r),{code:e,updateEditor:t,updateDiagram:a})))},k=(e,t)=>{E.update((a=>c(n({},a),{mermaid:e,updateEditor:t})))},J=e=>{E.update((t=>{const a=JSON.parse(t.mermaid);return a.theme&&!["dark","default"].includes(a.theme)||(a.theme=e?"dark":"default"),c(n({},t),{mermaid:JSON.stringify(a,null,2),updateEditor:!0})}))},N=()=>{L.subscribe((e=>{history.replaceState(void 0,void 0,`#${e}`)}))},D=()=>JSON.stringify(y(E));export{b as a,L as b,E as c,k as d,j as e,w as f,D as g,N as h,O as i,v as j,_ as k,h as l,J as t,T as u}; diff --git a/_app/chunks/theme-c4fa06bf.js b/_app/chunks/theme-c4fa06bf.js new file mode 100644 index 00000000..e8d998a5 --- /dev/null +++ b/_app/chunks/theme-c4fa06bf.js @@ -0,0 +1 @@ +import{J as e,K as s,C as t}from"./vendor-21474ee4.js";const a=e(t({isDark:!1}),s(),"themeStore"),o=["dark","synthwave","halloween","aqua","forest","luxury","black","dracula"],r=e=>{e.includes(" ")&&(e=e.split(" ")[1].trim());const s=o.includes(e);console.log("Setting theme",e),a.set({theme:e,isDark:s})};export{r as s,a as t}; diff --git a/_app/chunks/util-eb135afb.js b/_app/chunks/util-eb135afb.js new file mode 100644 index 00000000..29526445 --- /dev/null +++ b/_app/chunks/util-eb135afb.js @@ -0,0 +1 @@ +var t=Object.defineProperty,a=Object.defineProperties,e=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(a,e,o)=>e in a?t(a,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[e]=o,n=(t,a)=>{for(var e in a||(a={}))s.call(a,e)&&i(t,e,a[e]);if(o)for(var e of o(a))r.call(a,e)&&i(t,e,a[e]);return t},c=(t,o)=>a(t,e(o));import{C as l,S as d,i as u,s as p,e as f,c as m,a as h,d as g,b as y,Z as w,f as v,E as b,P as j,I as O,A as S,ab as D,ac as E,R as $,J as P,K as x,L as I,ad as L,N as H}from"./vendor-21474ee4.js";import{c as R,e as T,f as J,i as N,h as U,j as V,a as _,k}from"./state-93a77356.js";const M=l(void 0);function z(t){let a,e;return{c(){a=f("div"),e=f("div"),this.h()},l(t){a=m(t,"DIV",{id:!0,class:!0});var o=h(a);e=m(o,"DIV",{id:!0,class:!0}),h(e).forEach(g),o.forEach(g),this.h()},h(){y(e,"id","container"),y(e,"class","flex-1 overflow-auto"),y(a,"id","view"),y(a,"class","p-2 svelte-5ndy2s"),w(a,"error",t[2]),w(a,"outOfSync",t[3])},m(o,s){v(o,a,s),b(a,e),t[4](e),t[5](a)},p(t,[e]){4&e&&w(a,"error",t[2]),8&e&&w(a,"outOfSync",t[3])},i:j,o:j,d(e){e&&g(a),t[4](null),t[5](null)}}}function A(t,a,e){let o;O(t,R,(t=>e(9,o=t)));let s,r,i="",n="",c=!1,l=!1,d=!0;return S((()=>{R.subscribe((t=>{try{if(s&&t&&(t.updateDiagram||t.autoSync)){if(t.autoSync||D(R,o.updateDiagram=!1,o),e(3,l=!1),d=!0,i===t.code&&n===t.mermaid)return;i=t.code,n=t.mermaid;const a=r.parentElement.scrollTop;delete s.dataset.processed,E.initialize(Object.assign({},JSON.parse(t.mermaid))),E.render("graph-div",i,(t=>{e(0,s.innerHTML=t,s)})),e(1,r.parentElement.scrollTop=a,r),e(2,c=!1)}else d?d=!1:e(3,l=!0)}catch(a){console.log("view fail",a),e(2,c=!0)}})),M.subscribe((t=>{void 0===t?e(2,c=!1):(e(2,c=!0),console.log("Error: ",t))}))})),[s,r,c,l,function(t){$[t?"unshift":"push"]((()=>{s=t,e(0,s)}))},function(t){$[t?"unshift":"push"]((()=>{r=t,e(1,r)}))}]}class C extends d{constructor(t){super(),u(this,t,A,z,p,{})}}const G=P(l("manual"),x(),"autoHistoryMode"),K=P(l([]),x(),"autoHistoryStore"),Z=P(l([]),x(),"manualHistoryStore"),q=l([]),B=I([G,K,Z,q],(([t,a,e,o],s)=>{s("auto"===t?a:"manual"===t?e:"loader"===t?o:a)})),F=t=>{"loader"!==t.type?(t.name=L(2),"auto"===t.type?K.update((a=>(30===a.length&&a.pop(),[t,...a]))):Z.update((a=>[t,...a]))):q.update((a=>[t,...a]))},Q=t=>{("auto"===H(G)?K:Z).update((a=>("loader"!==H(G)&&(a=a.filter((a=>t&&a.time!=t))),a)))},W=t=>{const a=H(t?K:Z);return a.length>0?JSON.stringify(a[0].state):""},X=async t=>t.truncated?await(await fetch(t.raw_url)).text():t.content,Y=async t=>{const[a,e,o,s]=t.split("github.com").pop().split("/"),{html_url:r,files:i,history:n}=await(await fetch(`https://api.github.com/gists/${o}${s?"/"+s:""}`)).json();if((t=>"code.mmd"in t)(i)){const t=await X(i["code.mmd"]);let a;"config.json"in i&&(a=await X(i["config.json"]));const e=n[0];return{url:`${r}/${e.version}`,code:t,config:a,author:e.user.login,time:new Date(e.committed_at).getTime(),version:e.version.slice(-7)}}throw"Invalid gist provided"},tt=(t,a=t.url)=>{const e=c(n({},T),{code:t.code,loader:{type:"gist",config:{url:a}}});return t.config&&(e.mermaid=t.config),e},at={gist:async t=>{try{const[a,e,o,s]=t.split("github.com").pop().split("/"),{history:r}=await(await fetch(`https://api.github.com/gists/${o}${s?"/"+s:""}`)).json(),i=[];for(const t of r){const a=await Y(t.url).catch((()=>{}));a&&i.push(a)}if(0===i.length)throw"Invalid gist provided";i.reverse();const n=tt(i.slice(-1).pop(),t);for(const t of i)F({state:tt(t),time:t.time,type:"loader",url:t.url,name:`${t.author} v${t.version}`});return n}catch(a){console.error(a)}}},et=()=>{J({updateDiagram:!0})},ot=async()=>{var t;k(window.location.hash.slice(1)),await N("Loading Gist...",(async()=>{const t=new URLSearchParams(window.location.search);let a,e,o=T,s=!1;const r=t.get("code"),i=t.get("config");if(r&&(a=await(await fetch(r)).text(),s=!0),e=i?await(await fetch(i)).text():T.mermaid,a)o={code:a,mermaid:e,loader:{type:"files",config:{codeURL:r,configURL:i}}};else for(const[n,c]of t.entries())if(n in at)try{o=await at[n](c),s=!0;break}catch(l){console.error(l)}s&&J(c(n({},o),{autoSync:!0,updateDiagram:!0,updateEditor:!0}))})().catch(console.error)),et(),U(),await V(),null==(t=_)||t.page()};export{C as V,B as a,F as b,Q as c,M as e,W as g,G as h,ot as i,q as l,et as s}; diff --git a/_app/chunks/vendor-21474ee4.js b/_app/chunks/vendor-21474ee4.js new file mode 100644 index 00000000..b5ac48db --- /dev/null +++ b/_app/chunks/vendor-21474ee4.js @@ -0,0 +1,40 @@ +function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function i(){return Object.create(null)}function a(t){t.forEach(r)}function o(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function l(t){let e;return c(t,(t=>e=t))(),e}function u(t,e,n){t.$$.on_destroy.push(c(e,n))}function h(t,e,n,r){if(t){const i=d(t,e,n,r);return t[0](i)}}function d(t,e,r,i){return t[1]&&i?n(r.ctx.slice(),t[1](i(e))):r.ctx}function f(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r32){const e=[],n=t.ctx.length/32;for(let t=0;twindow.performance.now():()=>Date.now(),_=v?t=>requestAnimationFrame(t):t;const w=new Set;function x(t){w.forEach((e=>{e.c(t)||(w.delete(e),e.f())})),0!==w.size&&_(x)}let k=!1;function T(t,e,n,r){for(;t>1);n(i)<=r?t=i+1:e=i}return t}function C(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function E(t){const e=D("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(C(t),e),e}function S(t,e){if(k){for(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n0&&e[n[i]].claim_order<=t?i+1:T(1,i,(t=>e[n[t]].claim_order),t))-1;r[c]=n[a]+1;const o=a+1;n[o]=c,i=Math.max(o,i)}const a=[],o=[];let s=e.length-1;for(let c=n[i]+1;0!=c;c=r[c-1]){for(a.push(e[c-1]);s>=c;s--)o.push(e[s]);s--}for(;s>=0;s--)o.push(e[s]);a.reverse(),o.sort(((t,e)=>t.claim_order-e.claim_order));for(let c=0,l=0;c=a[l].claim_order;)l++;const e=lt.removeEventListener(e,n,r)}function I(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function F(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t){return""===t?null:+t}function Y(t){return Array.from(t.childNodes)}function z(t,e,n,r,i=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const a=(()=>{for(let r=t.claim_info.last_index;r=0;r--){const a=t[r];if(e(a)){const e=n(a);return void 0===e?t.splice(r,1):t[r]=e,i?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,a}}return r()})();return a.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,a}function U(t,e,n,r){return z(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;rt.removeAttribute(e)))}),(()=>r(e)))}function $(t,e,n){return U(t,e,n,D)}function W(t,e,n){return U(t,e,n,j)}function q(t,e){return z(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>N(e)),!0)}function H(t){return q(t," ")}function V(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function G(t,e){t.value=null==e?"":e}function X(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function Z(t,e,n){t.classList[n?"add":"remove"](e)}function Q(t,e,n=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,!1,e),r}const K=new Set;let J,tt=0;function et(t,e,n,r,i,a,o,s=0){const c=16.666/r;let l="{\n";for(let y=0;y<=1;y+=c){const t=e+(n-e)*a(y);l+=100*y+`%{${o(t,1-t)}}\n`}const u=l+`100% {${o(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,d=C(t);K.add(d);const f=d.__svelte_stylesheet||(d.__svelte_stylesheet=E(t).sheet),p=d.__svelte_rules||(d.__svelte_rules={});p[h]||(p[h]=!0,f.insertRule(`@keyframes ${h} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${h} ${r}ms linear ${i}ms 1 both`,tt+=1,h}function nt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),tt-=i,tt||_((()=>{tt||(K.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),K.clear())})))}function rt(t){J=t}function it(){if(!J)throw new Error("Function called outside component initialization");return J}function at(t){it().$$.on_mount.push(t)}function ot(t){it().$$.after_update.push(t)}function st(){const t=it();return(e,n)=>{const r=t.$$.callbacks[e];if(r){const i=Q(e,n);r.slice().forEach((e=>{e.call(t,i)}))}}}function ct(t,e){it().$$.context.set(t,e)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const ut=[],ht=[],dt=[],ft=[],pt=Promise.resolve();let gt=!1;function yt(t){dt.push(t)}function mt(t){ft.push(t)}let vt=!1;const bt=new Set;function _t(){if(!vt){vt=!0;do{for(let t=0;t{Tt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}const Mt={duration:0};function Dt(n,r,i,s){let c=r(n,i),l=s?0:1,u=null,h=null,d=null;function f(){d&&nt(n,d)}function p(t,e){const n=t.b-l;return e*=Math.abs(n),{a:l,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function g(r){const{delay:i=0,duration:o=300,easing:s=e,tick:g=t,css:y}=c||Mt,m={start:b()+i,b:r};r||(m.group=Ct,Ct.r+=1),u||h?h=m:(y&&(f(),d=et(n,l,r,o,i,s,y)),r&&g(0,1),u=p(m,o),yt((()=>kt(n,r,"start"))),function(t){let e;0===w.size&&_(x),new Promise((n=>{w.add(e={c:t,f:n})}))}((t=>{if(h&&t>h.start&&(u=p(h,o),h=null,kt(n,u.b,"start"),y&&(f(),d=et(n,l,u.b,u.duration,0,s,c.css))),u)if(t>=u.end)g(l=u.b,1-l),kt(n,u.b,"end"),h||(u.b?f():--u.group.r||a(u.group.c)),u=null;else if(t>=u.start){const e=t-u.start;l=u.a+u.d*s(e/u.duration),g(l,1-l)}return!(!u&&!h)})))}return{run(t){o(c)?(xt||(xt=Promise.resolve(),xt.then((()=>{xt=null}))),xt).then((()=>{c=c(),g(t)})):g(t)},end(){f(),u=h=null}}}function jt(t,e){const n={},r={},i={$$scope:1};let a=t.length;for(;a--;){const o=t[a],s=e[a];if(s){for(const t in o)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[a]=s}else for(const t in o)i[t]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Nt(t){return"object"==typeof t&&null!==t?t:{}}function Bt(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Lt(t){t&&t.c()}function Rt(t,e){t&&t.l(e)}function It(t,e,n,i){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,n),i||yt((()=>{const e=c.map(r).filter(o);l?l.push(...e):a(e),t.$$.on_mount=[]})),u.forEach(yt)}function Ft(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e){-1===t.$$.dirty[0]&&(ut.push(t),gt||(gt=!0,pt.then(_t)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const i=r.length?r[0]:n;return d.ctx&&s(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),f&&Pt(e,t)),n})):[],d.update(),f=!0,a(d.before_update),d.fragment=!!o&&o(d.ctx),n.target){if(n.hydrate){k=!0;const t=Y(n.target);d.fragment&&d.fragment.l(t),t.forEach(A)}else d.fragment&&d.fragment.c();n.intro&&Ot(e.$$.fragment),It(e,n.target,n.anchor,n.customElement),k=!1,_t()}rt(h)}class zt{$destroy(){Ft(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ut=[];function $t(e,n=t){let r;const i=new Set;function a(t){if(s(e,t)&&(e=t,r)){const t=!Ut.length;for(const n of i)n[1](),Ut.push(n,e);if(t){for(let t=0;t{i.delete(c),0===i.size&&(r(),r=null)}}}}function Wt(e,n,r){const i=!Array.isArray(e),s=i?[e]:e,l=n.length<2;return{subscribe:$t(r,(e=>{let r=!1;const u=[];let h=0,d=t;const f=()=>{if(h)return;d();const r=n(i?u[0]:u,e);l?e(r):d=o(r)?r:t},p=s.map(((t,e)=>c(t,(t=>{u[e]=t,h&=~(1<{h|=1<{t.set(e)})),t.subscribe((t=>{e.setValue(n,t)})),Object.assign(Object.assign({},t),{delete(){e.deleteValue(n)}})}function Vt(t,e=!1){const n=[],r=e=>{const r=e.key;e.storageArea===t&&n.filter((({key:t})=>t===r)).forEach((({listener:t})=>{let n=e.newValue;try{n=JSON.parse(e.newValue)}catch(r){}t(n)}))};return{addListener(t,i){n.push({key:t,listener:i}),1===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.addEventListener)&&window.addEventListener("storage",r)},removeListener(t,i){const a=n.indexOf({key:t,listener:i});-1!==a&&n.splice(a,1),0===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("storage",r)},getValue(e){let n=t.getItem(e);if(null!=n)try{n=JSON.parse(n)}catch(r){}return n},deleteValue(e){t.removeItem(e)},setValue(e,n){t.setItem(e,JSON.stringify(n))}}}function Gt(t=!1){return"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.localStorage)?Vt(window.localStorage,t):(console.warn("Unable to find the localStorage. No data will be persisted."),{getValue:()=>null,deleteValue(){},setValue(){}})}(qt={}).defaults={},qt.set=function(t,e,n){var r=n||{},i=qt.defaults,a=r.expires||i.expires,o=r.domain||i.domain,s=void 0!==r.path?r.path:void 0!==i.path?i.path:"/",c=void 0!==r.secure?r.secure:i.secure,l=void 0!==r.httponly?r.httponly:i.httponly,u=void 0!==r.samesite?r.samesite:i.samesite,h=a?new Date("number"==typeof a?(new Date).getTime()+864e5*a:a):0;document.cookie=t.replace(/[^+#$&^`|]/g,encodeURIComponent).replace("(","%28").replace(")","%29")+"="+e.replace(/[^+#$&/:<-\[\]-}]/g,encodeURIComponent)+(h&&h.getTime()>=0?";expires="+h.toUTCString():"")+(o?";domain="+o:"")+(s?";path="+s:"")+(c?";secure":"")+(l?";httponly":"")+(u?";samesite="+u:"")},qt.get=function(t){for(var e=document.cookie.split(";");e.length;){var n=e.pop(),r=n.indexOf("=");if(r=r<0?n.length:r,decodeURIComponent(n.slice(0,r).replace(/^\s+/,""))===t)return decodeURIComponent(n.slice(r+1))}return null},qt.erase=function(t,e){qt.set(t,"",{expires:-1,domain:e&&e.domain,path:e&&e.path,secure:0,httponly:0})},qt.all=function(){for(var t={},e=document.cookie.split(";");e.length;){var n=e.pop(),r=n.indexOf("=");r=r<0?n.length:r,t[decodeURIComponent(n.slice(0,r).replace(/^\s+/,""))]=decodeURIComponent(n.slice(r+1))}return t};const Xt="function"==typeof atob,Zt="function"==typeof btoa,Qt="function"==typeof Buffer,Kt="function"==typeof TextDecoder?new TextDecoder:void 0,Jt="function"==typeof TextEncoder?new TextEncoder:void 0,te=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ee=(t=>{let e={};return te.forEach(((t,n)=>e[t]=n)),e})(),ne=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,re=String.fromCharCode.bind(String),ie="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(t,e=(t=>t))=>new Uint8Array(Array.prototype.slice.call(t,0).map(e)),ae=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),oe=Zt?t=>btoa(t):Qt?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,r,i,a="";const o=t.length%3;for(let s=0;s255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,a+=te[e>>18&63]+te[e>>12&63]+te[e>>6&63]+te[63&e]}return o?a.slice(0,o-3)+"===".substring(o):a},se=Qt?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let n=0,r=t.length;n{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?re(192|e>>>6)+re(128|63&e):re(224|e>>>12&15)+re(128|e>>>6&63)+re(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return re(240|e>>>18&7)+re(128|e>>>12&63)+re(128|e>>>6&63)+re(128|63&e)},le=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ue=Qt?t=>Buffer.from(t,"utf8").toString("base64"):Jt?t=>se(Jt.encode(t)):t=>oe(t.replace(le,ce)),he=(t,e=!1)=>e?(t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_")))(ue(t)):ue(t),de=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,fe=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return re(55296+(e>>>10))+re(56320+(1023&e));case 3:return re((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return re((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},pe=Xt?t=>atob(ae(t)):Qt?t=>Buffer.from(t,"base64").toString("binary"):t=>{if(t=t.replace(/\s+/g,""),!ne.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,n,r,i="";for(let a=0;a>16&255):64===r?re(e>>16&255,e>>8&255):re(e>>16&255,e>>8&255,255&e);return i},ge=Qt?t=>ie(Buffer.from(t,"base64")):t=>ie(pe(t),(t=>t.charCodeAt(0))),ye=Qt?t=>Buffer.from(t,"base64").toString("utf8"):Kt?t=>Kt.decode(ge(t)):t=>pe(t).replace(de,fe),me=t=>ye(ae(t.replace(/[-_]/g,(t=>"-"==t?"+":"/")))),ve="8.12.1";function be(t){const e=t-1;return e*e*e+1}function _e(t,{delay:n=0,duration:r=400,easing:i=e}={}){const a=+getComputedStyle(t).opacity;return{delay:n,duration:r,easing:i,css:t=>"opacity: "+t*a}}function we(t,{delay:e=0,duration:n=400,easing:r=be}={}){const i=getComputedStyle(t),a=+i.opacity,o=parseFloat(i.height),s=parseFloat(i.paddingTop),c=parseFloat(i.paddingBottom),l=parseFloat(i.marginTop),u=parseFloat(i.marginBottom),h=parseFloat(i.borderTopWidth),d=parseFloat(i.borderBottomWidth);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*a};height: ${t*o}px;padding-top: ${t*s}px;padding-bottom: ${t*c}px;margin-top: ${t*l}px;margin-bottom: ${t*u}px;border-top-width: ${t*h}px;border-bottom-width: ${t*d}px;`}} +//! moment.js +//! version : 2.29.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var xe,ke;function Te(){return xe.apply(null,arguments)}function Ce(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function Ee(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function Se(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Oe(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(Se(t,e))return!1;return!0}function Ae(t){return void 0===t}function Me(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function De(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function je(t,e){var n,r=[];for(n=0;n>>0;for(e=0;e0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Ke=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Je=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tn={},en={};function nn(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(en[t]=i),e&&(en[e[0]]=function(){return Qe(i.apply(this,arguments),e[1],e[2])}),n&&(en[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function rn(t,e){return t.isValid()?(e=an(e,t.localeData()),tn[e]=tn[e]||function(t){var e,n,r,i=t.match(Ke);for(e=0,n=i.length;e=0&&Je.test(t);)t=t.replace(Je,r),Je.lastIndex=0,n-=1;return t}var on={};function sn(t,e){var n=t.toLowerCase();on[n]=on[n+"s"]=on[e]=t}function cn(t){return"string"==typeof t?on[t]||on[t.toLowerCase()]:void 0}function ln(t){var e,n,r={};for(n in t)Se(t,n)&&(e=cn(n))&&(r[e]=t[n]);return r}var un={};function hn(t,e){un[t]=e}function dn(t){return t%4==0&&t%100!=0||t%400==0}function fn(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function pn(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=fn(e)),n}function gn(t,e){return function(n){return null!=n?(mn(this,t,n),Te.updateOffset(this,e),this):yn(this,t)}}function yn(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function mn(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&dn(t.year())&&1===t.month()&&29===t.date()?(n=pn(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),$n(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var vn,bn=/\d/,_n=/\d\d/,wn=/\d{3}/,xn=/\d{4}/,kn=/[+-]?\d{6}/,Tn=/\d\d?/,Cn=/\d\d\d\d?/,En=/\d\d\d\d\d\d?/,Sn=/\d{1,3}/,On=/\d{1,4}/,An=/[+-]?\d{1,6}/,Mn=/\d+/,Dn=/[+-]?\d+/,jn=/Z|[+-]\d\d:?\d\d/gi,Nn=/Z|[+-]\d\d(?::?\d\d)?/gi,Bn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ln(t,e,n){vn[t]=Ge(e)?e:function(t,r){return t&&n?n:e}}function Rn(t,e){return Se(vn,t)?vn[t](e._strict,e._locale):new RegExp(In(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function In(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}vn={};var Fn={};function Pn(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),Me(e)&&(r=function(t,n){n[e]=pn(t)}),n=0;n68?1900:2e3)};var tr=gn("FullYear",!0);function er(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function nr(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function rr(t,e,n){var r=7+e-n;return-((7+nr(t,0,r).getUTCDay()-e)%7)+r-1}function ir(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+rr(t,r,i);return s<=0?o=Jn(a=t-1)+s:s>Jn(t)?(a=t+1,o=s-Jn(t)):(a=t,o=s),{year:a,dayOfYear:o}}function ar(t,e,n){var r,i,a=rr(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+or(i=t.year()-1,e,n):o>or(t.year(),e,n)?(r=o-or(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function or(t,e,n){var r=rr(t,e,n),i=rr(t+1,e,n);return(Jn(t)-r+i)/7}nn("w",["ww",2],"wo","week"),nn("W",["WW",2],"Wo","isoWeek"),sn("week","w"),sn("isoWeek","W"),hn("week",5),hn("isoWeek",5),Ln("w",Tn),Ln("ww",Tn,_n),Ln("W",Tn),Ln("WW",Tn,_n),Yn(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=pn(t)}));function sr(t,e){return t.slice(e,7).concat(t.slice(0,e))}nn("d",0,"do","day"),nn("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),nn("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),nn("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),nn("e",0,0,"weekday"),nn("E",0,0,"isoWeekday"),sn("day","d"),sn("weekday","e"),sn("isoWeekday","E"),hn("day",11),hn("weekday",11),hn("isoWeekday",11),Ln("d",Tn),Ln("e",Tn),Ln("E",Tn),Ln("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Ln("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Ln("dddd",(function(t,e){return e.weekdaysRegex(t)})),Yn(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:Le(n).invalidWeekday=t})),Yn(["d","e","E"],(function(t,e,n,r){e[r]=pn(t)}));var cr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ur="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),hr=Bn,dr=Bn,fr=Bn;function pr(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Be([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Un.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Un.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Un.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Un.call(this._weekdaysParse,o))||-1!==(i=Un.call(this._shortWeekdaysParse,o))||-1!==(i=Un.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Un.call(this._shortWeekdaysParse,o))||-1!==(i=Un.call(this._weekdaysParse,o))||-1!==(i=Un.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Un.call(this._minWeekdaysParse,o))||-1!==(i=Un.call(this._weekdaysParse,o))||-1!==(i=Un.call(this._shortWeekdaysParse,o))?i:null}function gr(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=Be([2e3,1]).day(e),r=In(this.weekdaysMin(n,"")),i=In(this.weekdaysShort(n,"")),a=In(this.weekdays(n,"")),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);o.sort(t),s.sort(t),c.sort(t),l.sort(t),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function yr(){return this.hours()%12||12}function mr(t,e){nn(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function vr(t,e){return e._meridiemParse}nn("H",["HH",2],0,"hour"),nn("h",["hh",2],0,yr),nn("k",["kk",2],0,(function(){return this.hours()||24})),nn("hmm",0,0,(function(){return""+yr.apply(this)+Qe(this.minutes(),2)})),nn("hmmss",0,0,(function(){return""+yr.apply(this)+Qe(this.minutes(),2)+Qe(this.seconds(),2)})),nn("Hmm",0,0,(function(){return""+this.hours()+Qe(this.minutes(),2)})),nn("Hmmss",0,0,(function(){return""+this.hours()+Qe(this.minutes(),2)+Qe(this.seconds(),2)})),mr("a",!0),mr("A",!1),sn("hour","h"),hn("hour",13),Ln("a",vr),Ln("A",vr),Ln("H",Tn),Ln("h",Tn),Ln("k",Tn),Ln("HH",Tn,_n),Ln("hh",Tn,_n),Ln("kk",Tn,_n),Ln("hmm",Cn),Ln("hmmss",En),Ln("Hmm",Cn),Ln("Hmmss",En),Pn(["H","HH"],3),Pn(["k","kk"],(function(t,e,n){var r=pn(t);e[3]=24===r?0:r})),Pn(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Pn(["h","hh"],(function(t,e,n){e[3]=pn(t),Le(n).bigHour=!0})),Pn("hmm",(function(t,e,n){var r=t.length-2;e[3]=pn(t.substr(0,r)),e[4]=pn(t.substr(r)),Le(n).bigHour=!0})),Pn("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=pn(t.substr(0,r)),e[4]=pn(t.substr(r,2)),e[5]=pn(t.substr(i)),Le(n).bigHour=!0})),Pn("Hmm",(function(t,e,n){var r=t.length-2;e[3]=pn(t.substr(0,r)),e[4]=pn(t.substr(r))})),Pn("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=pn(t.substr(0,r)),e[4]=pn(t.substr(r,2)),e[5]=pn(t.substr(i))}));var br=gn("Hours",!0);var _r,wr={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Wn,monthsShort:qn,week:{dow:0,doy:6},weekdays:cr,weekdaysMin:ur,weekdaysShort:lr,meridiemParse:/[ap]\.?m?\.?/i},xr={},kr={};function Tr(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n0;){if(r=Er(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&Tr(i,n)>=e-1)break;e--}a++}return _r}(t)}function Mr(t){var e,n=t._a;return n&&-2===Le(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>$n(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,Le(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),Le(t)._overflowWeeks&&-1===e&&(e=7),Le(t)._overflowWeekday&&-1===e&&(e=8),Le(t).overflow=e),t}var Dr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nr=/Z|[+-]\d\d(?::?\d\d)?/,Br=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Lr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rr=/^\/?Date\((-?\d+)/i,Ir=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Fr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pr(t){var e,n,r,i,a,o,s=t._i,c=Dr.exec(s)||jr.exec(s);if(c){for(Le(t).iso=!0,e=0,n=Br.length;e7)&&(c=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,l=ar(Vr(),a,o),n=Ur(e.gg,t._a[0],l.year),r=Ur(e.w,l.week),null!=e.d?((i=e.d)<0||i>6)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a);r<1||r>or(n,a,o)?Le(t)._overflowWeeks=!0:null!=c?Le(t)._overflowWeekday=!0:(s=ir(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=Ur(t._a[0],r[0]),(t._dayOfYear>Jn(a)||0===t._dayOfYear)&&(Le(t)._overflowDayOfYear=!0),n=nr(a,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?nr:er).apply(null,o),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(Le(t).weekdayMismatch=!0)}}function Wr(t){if(t._f!==Te.ISO_8601)if(t._f!==Te.RFC_2822){t._a=[],Le(t).empty=!0;var e,n,r,i,a,o,s=""+t._i,c=s.length,l=0;for(r=an(t._f,t._locale).match(Ke)||[],e=0;e0&&Le(t).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),en[i]?(n?Le(t).empty=!1:Le(t).unusedTokens.push(i),zn(i,n,t)):t._strict&&!n&&Le(t).unusedTokens.push(i);Le(t).charsLeftOver=c-l,s.length>0&&Le(t).unusedInput.push(s),t._a[3]<=12&&!0===Le(t).bigHour&&t._a[3]>0&&(Le(t).bigHour=void 0),Le(t).parsedDateParts=t._a.slice(0),Le(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(o=Le(t).era)&&(t._a[0]=t._locale.erasConvertYear(o,t._a[0])),$r(t),Mr(t)}else zr(t);else Pr(t)}function qr(t){var e=t._i,n=t._f;return t._locale=t._locale||Ar(t._l),null===e||void 0===n&&""===e?Ie({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),Ue(e)?new ze(Mr(e)):(De(e)?t._d=e:Ce(n)?function(t){var e,n,r,i,a,o,s=!1;if(0===t._f.length)return Le(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;ithis?this:t:Ie()}));function Zr(t,e){var n,r;if(1===e.length&&Ce(e[0])&&(e=e[0]),!e.length)return Vr();for(n=e[0],r=1;r=0?new Date(t+400,e,n)-126227808e5:new Date(t,e,n).valueOf()}function Ci(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-126227808e5:Date.UTC(t,e,n)}function Ei(t,e){return e.erasAbbrRegex(t)}function Si(){var t,e,n=[],r=[],i=[],a=[],o=this.eras();for(t=0,e=o.length;t(a=or(t,r,i))&&(e=a),Mi.call(this,t,e,n,r,i))}function Mi(t,e,n,r,i){var a=ir(t,e,n,r,i),o=nr(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}nn("N",0,0,"eraAbbr"),nn("NN",0,0,"eraAbbr"),nn("NNN",0,0,"eraAbbr"),nn("NNNN",0,0,"eraName"),nn("NNNNN",0,0,"eraNarrow"),nn("y",["y",1],"yo","eraYear"),nn("y",["yy",2],0,"eraYear"),nn("y",["yyy",3],0,"eraYear"),nn("y",["yyyy",4],0,"eraYear"),Ln("N",Ei),Ln("NN",Ei),Ln("NNN",Ei),Ln("NNNN",(function(t,e){return e.erasNameRegex(t)})),Ln("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),Pn(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Le(n).era=i:Le(n).invalidEra=t})),Ln("y",Mn),Ln("yy",Mn),Ln("yyy",Mn),Ln("yyyy",Mn),Ln("yo",(function(t,e){return e._eraYearOrdinalRegex||Mn})),Pn(["y","yy","yyy","yyyy"],0),Pn(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[0]=n._locale.eraYearOrdinalParse(t,i):e[0]=parseInt(t,10)})),nn(0,["gg",2],0,(function(){return this.weekYear()%100})),nn(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Oi("gggg","weekYear"),Oi("ggggg","weekYear"),Oi("GGGG","isoWeekYear"),Oi("GGGGG","isoWeekYear"),sn("weekYear","gg"),sn("isoWeekYear","GG"),hn("weekYear",1),hn("isoWeekYear",1),Ln("G",Dn),Ln("g",Dn),Ln("GG",Tn,_n),Ln("gg",Tn,_n),Ln("GGGG",On,xn),Ln("gggg",On,xn),Ln("GGGGG",An,kn),Ln("ggggg",An,kn),Yn(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=pn(t)})),Yn(["gg","GG"],(function(t,e,n,r){e[r]=Te.parseTwoDigitYear(t)})),nn("Q",0,"Qo","quarter"),sn("quarter","Q"),hn("quarter",7),Ln("Q",bn),Pn("Q",(function(t,e){e[1]=3*(pn(t)-1)})),nn("D",["DD",2],"Do","date"),sn("date","D"),hn("date",9),Ln("D",Tn),Ln("DD",Tn,_n),Ln("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Pn(["D","DD"],2),Pn("Do",(function(t,e){e[2]=pn(t.match(Tn)[0])}));var Di=gn("Date",!0);nn("DDD",["DDDD",3],"DDDo","dayOfYear"),sn("dayOfYear","DDD"),hn("dayOfYear",4),Ln("DDD",Sn),Ln("DDDD",wn),Pn(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=pn(t)})),nn("m",["mm",2],0,"minute"),sn("minute","m"),hn("minute",14),Ln("m",Tn),Ln("mm",Tn,_n),Pn(["m","mm"],4);var ji=gn("Minutes",!1);nn("s",["ss",2],0,"second"),sn("second","s"),hn("second",15),Ln("s",Tn),Ln("ss",Tn,_n),Pn(["s","ss"],5);var Ni,Bi,Li=gn("Seconds",!1);for(nn("S",0,0,(function(){return~~(this.millisecond()/100)})),nn(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),nn(0,["SSS",3],0,"millisecond"),nn(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),nn(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),nn(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),nn(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),nn(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),nn(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),sn("millisecond","ms"),hn("millisecond",16),Ln("S",Sn,bn),Ln("SS",Sn,_n),Ln("SSS",Sn,wn),Ni="SSSS";Ni.length<=9;Ni+="S")Ln(Ni,Mn);function Ri(t,e){e[6]=pn(1e3*("0."+t))}for(Ni="S";Ni.length<=9;Ni+="S")Pn(Ni,Ri);Bi=gn("Milliseconds",!1),nn("z",0,0,"zoneAbbr"),nn("zz",0,0,"zoneName");var Ii=ze.prototype;function Fi(t){return t}Ii.add=pi,Ii.calendar=function(t,e){1===arguments.length&&(arguments[0]?mi(arguments[0])?(t=arguments[0],e=void 0):vi(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Vr(),r=ii(n,this).startOf("day"),i=Te.calendarFormat(this,r)||"sameElse",a=e&&(Ge(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Vr(n)))},Ii.clone=function(){return new ze(this)},Ii.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=ii(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=cn(e)){case"year":a=bi(this,r)/12;break;case"month":a=bi(this,r);break;case"quarter":a=bi(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:fn(a)},Ii.endOf=function(t){var e,n;if(void 0===(t=cn(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?Ci:Ti,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-ki(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-ki(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-ki(e,1e3)-1}return this._d.setTime(e),Te.updateOffset(this,!0),this},Ii.format=function(t){t||(t=this.isUtc()?Te.defaultFormatUtc:Te.defaultFormat);var e=rn(this,t);return this.localeData().postformat(e)},Ii.from=function(t,e){return this.isValid()&&(Ue(t)&&t.isValid()||Vr(t).isValid())?li({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ii.fromNow=function(t){return this.from(Vr(),t)},Ii.to=function(t,e){return this.isValid()&&(Ue(t)&&t.isValid()||Vr(t).isValid())?li({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ii.toNow=function(t){return this.to(Vr(),t)},Ii.get=function(t){return Ge(this[t=cn(t)])?this[t]():this},Ii.invalidAt=function(){return Le(this).overflow},Ii.isAfter=function(t,e){var n=Ue(t)?t:Vr(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=cn(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?rn(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ge(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",rn(n,"Z")):rn(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Ii.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+r+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Ii[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ii.toJSON=function(){return this.isValid()?this.toISOString():null},Ii.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Ii.unix=function(){return Math.floor(this.valueOf()/1e3)},Ii.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Ii.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Ii.eraName=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;tthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Ii.isLocal=function(){return!!this.isValid()&&!this._isUTC},Ii.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Ii.isUtc=oi,Ii.isUTC=oi,Ii.zoneAbbr=function(){return this._isUTC?"UTC":""},Ii.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Ii.dates=We("dates accessor is deprecated. Use date instead.",Di),Ii.months=We("months accessor is deprecated. Use month instead",Qn),Ii.years=We("years accessor is deprecated. Use year instead",tr),Ii.zone=We("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),Ii.isDSTShifted=We("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!Ae(this._isDSTShifted))return this._isDSTShifted;var t,e={};return Ye(e,this),(e=qr(e))._a?(t=e._isUTC?Be(e._a):Vr(e._a),this._isDSTShifted=this.isValid()&&function(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var Pi=Ze.prototype;function Yi(t,e,n,r){var i=Ar(),a=Be().set(r,e);return i[n](a,t)}function zi(t,e,n){if(Me(t)&&(e=t,t=void 0),t=t||"",null!=e)return Yi(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Yi(t,r,n,"month");return i}function Ui(t,e,n,r){"boolean"==typeof t?(Me(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,Me(e)&&(n=e,e=void 0),e=e||"");var i,a=Ar(),o=t?a._week.dow:0,s=[];if(null!=n)return Yi(e,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=Yi(e,(i+o)%7,r,"day");return s}Pi.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Ge(r)?r.call(e,n):r},Pi.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Ke).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},Pi.invalidDate=function(){return this._invalidDate},Pi.ordinal=function(t){return this._ordinal.replace("%d",t)},Pi.preparse=Fi,Pi.postformat=Fi,Pi.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return Ge(i)?i(t,e,n,r):i.replace(/%d/i,t)},Pi.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return Ge(n)?n(e):n.replace(/%s/i,e)},Pi.set=function(t){var e,n;for(n in t)Se(t,n)&&(Ge(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Pi.eras=function(t,e){var n,r,i,a=this._eras||Ar("en")._eras;for(n=0,r=a.length;n=0)return c[r]},Pi.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?Te(t.since).year():Te(t.since).year()+(e-t.offset)*n},Pi.erasAbbrRegex=function(t){return Se(this,"_erasAbbrRegex")||Si.call(this),t?this._erasAbbrRegex:this._erasRegex},Pi.erasNameRegex=function(t){return Se(this,"_erasNameRegex")||Si.call(this),t?this._erasNameRegex:this._erasRegex},Pi.erasNarrowRegex=function(t){return Se(this,"_erasNarrowRegex")||Si.call(this),t?this._erasNarrowRegex:this._erasRegex},Pi.months=function(t,e){return t?Ce(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Hn).test(e)?"format":"standalone"][t.month()]:Ce(this._months)?this._months:this._months.standalone},Pi.monthsShort=function(t,e){return t?Ce(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Hn.test(e)?"format":"standalone"][t.month()]:Ce(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Pi.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return Xn.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Be([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},Pi.monthsRegex=function(t){return this._monthsParseExact?(Se(this,"_monthsRegex")||Kn.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Se(this,"_monthsRegex")||(this._monthsRegex=Gn),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Pi.monthsShortRegex=function(t){return this._monthsParseExact?(Se(this,"_monthsRegex")||Kn.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Se(this,"_monthsShortRegex")||(this._monthsShortRegex=Vn),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Pi.week=function(t){return ar(t,this._week.dow,this._week.doy).week},Pi.firstDayOfYear=function(){return this._week.doy},Pi.firstDayOfWeek=function(){return this._week.dow},Pi.weekdays=function(t,e){var n=Ce(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?sr(n,this._week.dow):t?n[t.day()]:n},Pi.weekdaysMin=function(t){return!0===t?sr(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},Pi.weekdaysShort=function(t){return!0===t?sr(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},Pi.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return pr.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Be([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},Pi.weekdaysRegex=function(t){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||gr.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Se(this,"_weekdaysRegex")||(this._weekdaysRegex=hr),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Pi.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||gr.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Se(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=dr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Pi.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||gr.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Se(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fr),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Pi.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Pi.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},Sr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===pn(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),Te.lang=We("moment.lang is deprecated. Use moment.locale instead.",Sr),Te.langData=We("moment.langData is deprecated. Use moment.localeData instead.",Ar);var $i=Math.abs;function Wi(t,e,n,r){var i=li(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function qi(t){return t<0?Math.floor(t):Math.ceil(t)}function Hi(t){return 4800*t/146097}function Vi(t){return 146097*t/4800}function Gi(t){return function(){return this.as(t)}}var Xi=Gi("ms"),Zi=Gi("s"),Qi=Gi("m"),Ki=Gi("h"),Ji=Gi("d"),ta=Gi("w"),ea=Gi("M"),na=Gi("Q"),ra=Gi("y");function ia(t){return function(){return this.isValid()?this._data[t]:NaN}}var aa=ia("milliseconds"),oa=ia("seconds"),sa=ia("minutes"),ca=ia("hours"),la=ia("days"),ua=ia("months"),ha=ia("years");var da=Math.round,fa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pa(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}var ga=Math.abs;function ya(t){return(t>0)-(t<0)||+t}function ma(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,a,o,s,c=ga(this._milliseconds)/1e3,l=ga(this._days),u=ga(this._months),h=this.asSeconds();return h?(t=fn(c/60),e=fn(t/60),c%=60,t%=60,n=fn(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",a=ya(this._months)!==ya(h)?"-":"",o=ya(this._days)!==ya(h)?"-":"",s=ya(this._milliseconds)!==ya(h)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(l?o+l+"D":"")+(e||t||c?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(c?s+r+"S":"")):"P0D"}var va=Kr.prototype;va.isValid=function(){return this._isValid},va.abs=function(){var t=this._data;return this._milliseconds=$i(this._milliseconds),this._days=$i(this._days),this._months=$i(this._months),t.milliseconds=$i(t.milliseconds),t.seconds=$i(t.seconds),t.minutes=$i(t.minutes),t.hours=$i(t.hours),t.months=$i(t.months),t.years=$i(t.years),this},va.add=function(t,e){return Wi(this,t,e,1)},va.subtract=function(t,e){return Wi(this,t,e,-1)},va.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=cn(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Hi(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Vi(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},va.asMilliseconds=Xi,va.asSeconds=Zi,va.asMinutes=Qi,va.asHours=Ki,va.asDays=Ji,va.asWeeks=ta,va.asMonths=ea,va.asQuarters=na,va.asYears=ra,va.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*pn(this._months/12):NaN},va._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*qi(Vi(s)+o),o=0,s=0),c.milliseconds=a%1e3,t=fn(a/1e3),c.seconds=t%60,e=fn(t/60),c.minutes=e%60,n=fn(e/60),c.hours=n%24,o+=fn(n/24),s+=i=fn(Hi(o)),o-=qi(Vi(i)),r=fn(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},va.clone=function(){return li(this)},va.get=function(t){return t=cn(t),this.isValid()?this[t+"s"]():NaN},va.milliseconds=aa,va.seconds=oa,va.minutes=sa,va.hours=ca,va.days=la,va.weeks=function(){return fn(this.days()/7)},va.months=ua,va.years=ha,va.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=fa;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(a=Object.assign({},fa,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),r=function(t,e,n,r){var i=li(t).abs(),a=da(i.as("s")),o=da(i.as("m")),s=da(i.as("h")),c=da(i.as("d")),l=da(i.as("M")),u=da(i.as("w")),h=da(i.as("y")),d=a<=n.ss&&["s",a]||a0,d[4]=r,pa.apply(null,d)}(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},va.toISOString=ma,va.toString=ma,va.toJSON=ma,va.locale=_i,va.localeData=xi,va.toIsoString=We("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),va.lang=wi,nn("X",0,0,"unix"),nn("x",0,0,"valueOf"),Ln("x",Dn),Ln("X",/[+-]?\d+(\.\d{1,3})?/),Pn("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),Pn("x",(function(t,e,n){n._d=new Date(pn(t))})), +//! moment.js +Te.version="2.29.1",xe=Vr,Te.fn=Ii,Te.min=function(){var t=[].slice.call(arguments,0);return Zr("isBefore",t)},Te.max=function(){var t=[].slice.call(arguments,0);return Zr("isAfter",t)},Te.now=function(){return Date.now?Date.now():+new Date},Te.utc=Be,Te.unix=function(t){return Vr(1e3*t)},Te.months=function(t,e){return zi(t,e,"months")},Te.isDate=De,Te.locale=Sr,Te.invalid=Ie,Te.duration=li,Te.isMoment=Ue,Te.weekdays=function(t,e,n){return Ui(t,e,n,"weekdays")},Te.parseZone=function(){return Vr.apply(null,arguments).parseZone()},Te.localeData=Ar,Te.isDuration=Jr,Te.monthsShort=function(t,e){return zi(t,e,"monthsShort")},Te.weekdaysMin=function(t,e,n){return Ui(t,e,n,"weekdaysMin")},Te.defineLocale=Or,Te.updateLocale=function(t,e){if(null!=e){var n,r,i=wr;null!=xr[t]&&null!=xr[t].parentLocale?xr[t].set(Xe(xr[t]._config,e)):(null!=(r=Er(t))&&(i=r._config),e=Xe(i,e),null==r&&(e.abbr=t),(n=new Ze(e)).parentLocale=xr[t],xr[t]=n),Sr(t)}else null!=xr[t]&&(null!=xr[t].parentLocale?(xr[t]=xr[t].parentLocale,t===Sr()&&Sr(t)):null!=xr[t]&&delete xr[t]);return xr[t]},Te.locales=function(){return qe(xr)},Te.weekdaysShort=function(t,e,n){return Ui(t,e,n,"weekdaysShort")},Te.normalizeUnits=cn,Te.relativeTimeRounding=function(t){return void 0===t?da:"function"==typeof t&&(da=t,!0)},Te.relativeTimeThreshold=function(t,e){return void 0!==fa[t]&&(void 0===e?fa[t]:(fa[t]=e,"s"===t&&(fa.ss=e-1),!0))},Te.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},Te.prototype=Ii,Te.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var ba="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wa(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})})),e}function xa(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ka={exports:{}},Ta=/^(%20|\s)*(javascript|data)/im,Ca=/[^\x20-\x7E]/gim,Ea=/^([^:]+):/gm,Sa=[".","/"];var Oa={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,r=t.replace(Ca,"").trim();return function(t){return Sa.indexOf(t[0])>-1}(r)?r:(n=r.match(Ea))?(e=n[0],Ta.test(e)?"about:blank":r):"about:blank"}};function Aa(t,e){return te?1:t>=e?0:NaN}function Ma(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Aa(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var Da=Ma(Aa),ja=Da.right,Na=Da.left;function Ba(t,e){return[t,e]}function La(t){return null===t?NaN:+t}function Ra(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o1)return c/(a-1)}function Ia(t,e){var n=Ra(t,e);return n?Math.sqrt(n):n}function Fa(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i0)return[t];if((r=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=0?(a>=qa?10:a>=Ha?5:a>=Va?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=qa?10:a>=Ha?5:a>=Va?2:1)}function Za(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=qa?i*=10:a>=Ha?i*=5:a>=Va&&(i*=2),e=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function Ja(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r}function to(t){for(var e,n,r,i=t.length,a=-1,o=0;++a=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function eo(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r}function no(t){if(!(i=t.length))return[];for(var e=-1,n=eo(t,ro),r=new Array(n);++e=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 mo(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),_o.hasOwnProperty(e)?{space:_o[e],local:t}:t}function xo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===bo&&e.documentElement.namespaceURI===bo?e.createElement(t):e.createElementNS(n,t)}}function ko(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function To(t){var e=wo(t);return(e.local?ko:xo)(e)}function Co(){}function Eo(t){return null==t?Co:function(){return this.querySelector(t)}}function So(){return[]}function Oo(t){return null==t?So:function(){return this.querySelectorAll(t)}}function Ao(t){return function(){return this.matches(t)}}function Mo(t){return new Array(t.length)}function Do(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Do.prototype={constructor:Do,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function jo(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;se?1:t>=e?0:NaN}function Lo(t){return function(){this.removeAttribute(t)}}function Ro(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Io(t,e){return function(){this.setAttribute(t,e)}}function Fo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Po(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Yo(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 zo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Uo(t){return function(){this.style.removeProperty(t)}}function $o(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wo(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function qo(t,e){return t.style.getPropertyValue(e)||zo(t).getComputedStyle(t,null).getPropertyValue(e)}function Ho(t){return function(){delete this[t]}}function Vo(t,e){return function(){this[t]=e}}function Go(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Xo(t){return t.trim().split(/^|\s+/)}function Zo(t){return t.classList||new Qo(t)}function Qo(t){this._node=t,this._names=Xo(t.getAttribute("class")||"")}function Ko(t,e){for(var n=Zo(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var gs={},ys=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(gs={mouseenter:"mouseover",mouseleave:"mouseout"}));function ms(t,e,n){return t=vs(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function vs(t,e,n){return function(r){var i=ys;ys=r;try{t.call(this,this.__data__,e,n)}finally{ys=i}}}function bs(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 _s(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=w&&(w=_+1);!(b=m[w])&&++w=0;)(r=i[a])&&(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=Bo);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?Uo:"function"==typeof e?Wo:$o)(t,e,null==n?"":n)):qo(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ho:"function"==typeof e?Go:Vo)(t,e)):this.node()[t]},classed:function(t,e){var n=Xo(t+"");if(arguments.length<2){for(var r=Zo(this.node()),i=-1,a=n.length;++i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?dc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?dc(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=ec.exec(t))?new gc(e[1],e[2],e[3],1):(e=nc.exec(t))?new gc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rc.exec(t))?dc(e[1],e[2],e[3],e[4]):(e=ic.exec(t))?dc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ac.exec(t))?bc(e[1],e[2]/100,e[3]/100,1):(e=oc.exec(t))?bc(e[1],e[2]/100,e[3]/100,e[4]):sc.hasOwnProperty(t)?hc(sc[t]):"transparent"===t?new gc(NaN,NaN,NaN,0):null}function hc(t){return new gc(t>>16&255,t>>8&255,255&t,1)}function dc(t,e,n,r){return r<=0&&(t=e=n=NaN),new gc(t,e,n,r)}function fc(t){return t instanceof Xs||(t=uc(t)),t?new gc((t=t.rgb()).r,t.g,t.b,t.opacity):new gc}function pc(t,e,n,r){return 1===arguments.length?fc(t):new gc(t,e,n,null==r?1:r)}function gc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function yc(){return"#"+vc(this.r)+vc(this.g)+vc(this.b)}function mc(){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 vc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function bc(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xc(t,e,n,r)}function _c(t){if(t instanceof xc)return new xc(t.h,t.s,t.l,t.opacity);if(t instanceof Xs||(t=uc(t)),!t)return new xc;if(t instanceof xc)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new xc(o,s,c,t.opacity)}function wc(t,e,n,r){return 1===arguments.length?_c(t):new xc(t,e,n,null==r?1:r)}function xc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Vs(Xs,uc,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:cc,formatHex:cc,formatHsl:function(){return _c(this).formatHsl()},formatRgb:lc,toString:lc}),Vs(gc,pc,Gs(Xs,{brighter:function(t){return t=null==t?Zs:Math.pow(Zs,t),new gc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new gc(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:yc,formatHex:yc,formatRgb:mc,toString:mc})),Vs(xc,wc,Gs(Xs,{brighter:function(t){return t=null==t?Zs:Math.pow(Zs,t),new xc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new xc(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,i=2*n-r;return new gc(kc(t>=240?t-240:t+120,i,r),kc(t,i,r),kc(t<120?t+240:t-120,i,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 Tc=Math.PI/180,Cc=180/Math.PI,Ec=4/29,Sc=6/29,Oc=3*Sc*Sc;function Ac(t){if(t instanceof Dc)return new Dc(t.l,t.a,t.b,t.opacity);if(t instanceof Fc)return Pc(t);t instanceof gc||(t=fc(t));var e,n,r=Lc(t.r),i=Lc(t.g),a=Lc(t.b),o=jc((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=jc((.4360747*r+.3850649*i+.1430804*a)/.96422),n=jc((.0139322*r+.0971045*i+.7141733*a)/.82521)),new Dc(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Mc(t,e,n,r){return 1===arguments.length?Ac(t):new Dc(t,e,n,null==r?1:r)}function Dc(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function jc(t){return t>.008856451679035631?Math.pow(t,1/3):t/Oc+Ec}function Nc(t){return t>Sc?t*t*t:Oc*(t-Ec)}function Bc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Rc(t){if(t instanceof Fc)return new Fc(t.h,t.c,t.l,t.opacity);if(t instanceof Dc||(t=Ac(t)),0===t.a&&0===t.b)return new Fc(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r180||n<-180?n-360*Math.round(n/360):n):tl(isNaN(t)?e:t)}function rl(t){return 1==(t=+t)?il: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):tl(isNaN(e)?n:e)}}function il(t,e){var n=e-t;return n?el(t,n):tl(isNaN(t)?e:t)}Vs(Zc,Xc,Gs(Xs,{brighter:function(t){return t=null==t?Zs:Math.pow(Zs,t),new Zc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Zc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Tc,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new gc(255*(e+n*(Yc*r+zc*i)),255*(e+n*(Uc*r+$c*i)),255*(e+n*(Wc*r)),this.opacity)}}));var al=function t(e){var n=rl(e);function r(t,e){var r=n((t=pc(t)).r,(e=pc(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=il(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ol(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:fl(n,r)})),a=yl.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:fl(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:fl(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:fl(t,n)},{i:s-2,x:fl(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n=0&&e._call.call(null,t),e=e._next;--Wl}function ru(){Gl=(Vl=Zl.now())+Xl,Wl=ql=0;try{nu()}finally{Wl=0,function(){var t,e,n=Ul,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:Ul=e);$l=t,au(r)}(),Gl=0}}function iu(){var t=Zl.now(),e=t-Vl;e>1e3&&(Xl-=e,Vl=t)}function au(t){Wl||(ql&&(ql=clearTimeout(ql)),t-Gl>24?(t<1/0&&(ql=setTimeout(ru,t-Zl.now()-Xl)),Hl&&(Hl=clearInterval(Hl))):(Hl||(Vl=Zl.now(),Hl=setInterval(iu,1e3)),Wl=1,Ql(ru)))}function ou(t,e,n){var r=new tu;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}tu.prototype=eu.prototype={constructor:tu,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Kl():+n)+(null==e?0:+e),this._next||$l===this||($l?$l._next=this:Ul=this,$l=this),this._call=t,this._time=n,au()},stop:function(){this._call&&(this._call=null,this._time=1/0,au())}};var su=po("start","end","cancel","interrupt"),cu=[];function lu(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,u,h,d;if(1!==n.state)return c();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return ou(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l0)throw new Error("too late; already scheduled");return n}function hu(t,e){var n=du(t,e);if(n.state>3)throw new Error("too late; already running");return n}function du(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function fu(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).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 a[i]):o=!1;o&&delete t.__transition}}function pu(t,e){var n,r;return function(){var i=hu(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?uu:hu;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Bu=Os.prototype.constructor;function Lu(t){return function(){this.style.removeProperty(t)}}function Ru(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Iu(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Ru(t,a,n)),r}return a._value=e,a}function Fu(t){return function(e){this.textContent=t.call(this,e)}}function Pu(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fu(r)),e}return r._value=t,r}var Yu=0;function zu(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Uu(t){return Os().transition(t)}function $u(){return++Yu}var Wu=Os.prototype;function qu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Hu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}zu.prototype=Uu.prototype={constructor:zu,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Eo(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;oMath.abs(t[1]-B[1])?y=!0:g=!0),B=t,p=!0,vh(),Y()}function Y(){var t;switch(A=B[0]-N[0],M=B[1]-N[1],b){case _h:case bh:_&&(A=Math.max(C-n,Math.min(S-c,A)),i=n+A,h=c+A),w&&(M=Math.max(E-o,Math.min(O-d,M)),s=o+M,f=d+M);break;case wh:_<0?(A=Math.max(C-n,Math.min(S-n,A)),i=n+A,h=c):_>0&&(A=Math.max(C-c,Math.min(S-c,A)),i=n,h=c+A),w<0?(M=Math.max(E-o,Math.min(O-o,M)),s=o+M,f=d):w>0&&(M=Math.max(E-d,Math.min(O-d,M)),s=o,f=d+M);break;case xh:_&&(i=Math.max(C,Math.min(S,n-A*_)),h=Math.max(C,Math.min(S,c+A*_))),w&&(s=Math.max(E,Math.min(O,o-M*w)),f=Math.max(E,Math.min(O,d+M*w)))}h0&&(n=i-A),w<0?d=f-M:w>0&&(o=s-M),b=_h,I.attr("cursor",Ah.selection),Y());break;default:return}vh()}function $(){switch(ys.keyCode){case 16:D&&(g=y=D=!1,Y());break;case 18:b===xh&&(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=wh,Y());break;case 32:b===_h&&(ys.altKey?(_&&(c=h-A*_,n=i+A*_),w&&(d=f-M*w,o=s+M*w),b=xh):(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=wh),I.attr("cursor",Ah[v]),Y());break;default:return}vh()}}function f(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=Th(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){u(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){u(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=u(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=vl(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=u(e,r).beforestart();fu(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){xs(new yh(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:gh(Th(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:gh(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:gh(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var zh=Math.cos,Uh=Math.sin,$h=Math.PI,Wh=$h/2,qh=2*$h,Hh=Math.max;function Vh(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Gh=Array.prototype.slice;function Xh(t){return function(){return t}}var Zh=Math.PI,Qh=2*Zh,Kh=Qh-1e-6;function Jh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function td(){return new Jh}function ed(t){return t.source}function nd(t){return t.target}function rd(t){return t.radius}function id(t){return t.startAngle}function ad(t){return t.endAngle}Jh.prototype=td.prototype={constructor:Jh,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,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-c*l)>1e-6&&i){var d=n-a,f=r-o,p=s*s+c*c,g=d*d+f*f,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((Zh-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Qh+Qh),h>Kh?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Zh)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},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._}};function od(){}function sd(t,e){var n=new od;if(t instanceof od)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++ir!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=-i)}return i}function _d(t,e,n){var r,i,a,o;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)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function wd(){}var xd=[[],[[[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 kd(){var t=1,e=1,n=Qa,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(yd);else{var r=Fa(t),i=r[0],o=r[1];e=Za(i,o,e),e=Wa(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,l,u,h,d=new Array,f=new Array;a=s=-1,l=n[0]>=r,xd[l<<1].forEach(p);for(;++a=r,xd[c|l<<1].forEach(p);xd[l<<0].forEach(p);for(;++s=r,u=n[s*t]>=r,xd[l<<1|u<<2].forEach(p);++a=r,h=u,u=n[s*t+a+1]>=r,xd[c|l<<1|u<<2|h<<3].forEach(p);xd[l|u<<3].forEach(p)}a=-1,u=n[s*t]>=r,xd[u<<2].forEach(p);for(;++a=r,xd[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],l=o(r),u=o(c);(e=f[l])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(c),i(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(c),f[e.end=u]=e):(e=d[u])?(n=f[l])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(c),i(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=l]=e):d[l]=f[u]={start:l,end:u,ring:[r,c]}}xd[u<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n0&&o0&&s0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?md(gd.call(t)):md(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:wd,i):r===s},i}function Td(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function Cd(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function Ed(t){return t[0]}function Sd(t){return t[1]}function Od(){return 1}var Ad={},Md={};function Dd(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function jd(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Nd(t,e){var n=t+"",r=n.length;return r9999?"+"+Nd(e,6):Nd(e,4))+"-"+Nd(t.getUTCMonth()+1,2)+"-"+Nd(t.getUTCDate(),2)+(a?"T"+Nd(n,2)+":"+Nd(r,2)+":"+Nd(i,2)+"."+Nd(a,3)+"Z":i?"T"+Nd(n,2)+":"+Nd(r,2)+":"+Nd(i,2)+"Z":r||n?"T"+Nd(n,2)+":"+Nd(r,2)+"Z":"")}function Ld(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,l=!1;function u(){if(c)return Md;if(l)return l=!1,Ad;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++=a?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,i=f,!(f=f[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,f.data),c=+t._y.call(null,f.data),e===s&&n===c)return p.next=f,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o}while((h=u<<1|l)==(d=(c>=o)<<1|s>=a));return i[d]=f,i[h]=p,t}function gf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function yf(t){return t[0]}function mf(t){return t[1]}function vf(t,e,n){var r=new bf(null==e?yf:e,null==n?mf:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function bf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function _f(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var wf=vf.prototype=bf.prototype;function xf(t){return t.x+t.vx}function kf(t){return t.y+t.vy}function Tf(t){return t.index}function Cf(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Ef(t){return t.x}function Sf(t){return t.y}wf.copy=function(){var t,e,n=new bf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=_f(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=_f(e));return n},wf.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return pf(this.cover(e,n),e,n,t)},wf.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;nu&&(u=r),ih&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;nt||t>=i||r>e||e>=a;)switch(s=(ed||(a=c.y0)>f||(o=c.x1)=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=f,!(f=f[h=u<<1|l]))return this;if(!f.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,d=h)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},wf.removeAll=function(t){for(var e=0,n=t.length;e1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Mf(t){return(t=Af(Math.abs(t)))?t[1]:NaN}var Df,jf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nf(t){if(!(e=jf.exec(t)))throw new Error("invalid format: "+t);var e;return new Bf({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 Bf(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 Lf(t,e){var n=Af(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Nf.prototype=Bf.prototype,Bf.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 Rf={"%":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 Lf(100*t,e)},r:Lf,s:function(t,e){var n=Af(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Df=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Af(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function If(t){return t}var Ff,Pf,Yf,zf=Array.prototype.map,Uf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $f(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?If:(e=zf.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?If:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(zf.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Nf(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Rf[v]||(void 0===y&&(y=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===d?a:/[%p]/.test(v)?c:"",w=Rf[v],x=/[defgprs%]/.test(v);function k(t){var i,a,c,d=b,k=_;if("c"===v)k=w(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),d=(T?"("===h?h:l:"-"===h||"("===h?"":h)+d,k=("s"===v?Uf[8+Df/3]:"")+k+(T&&"("===h?")":""),x)for(i=-1,a=t.length;++i(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var C=d.length+t.length+k.length,E=C>1)+d+t+k+E.slice(C);break;default:t=E+d+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Nf(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Mf(e)/3))),i=Math.pow(10,-r),a=Uf[8+r/3];return function(t){return n(i*t)+a}}}}function Wf(t){return Ff=$f(t),Pf=Ff.format,Yf=Ff.formatPrefix,Ff}function qf(t){return Math.max(0,-Mf(Math.abs(t)))}function Hf(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Mf(e)/3)))-Mf(Math.abs(t)))}function Vf(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mf(e)-Mf(t))+1}function Gf(){return new Xf}function Xf(){this.reset()}Wf({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Xf.prototype={constructor:Xf,reset:function(){this.s=this.t=0},add:function(t){Qf(Zf,t,this.t),Qf(this,Zf.s,this.s),this.s?this.t+=Zf.t:this.s=Zf.t},valueOf:function(){return this.s}};var Zf=new Xf;function Qf(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Kf=Math.PI,Jf=Kf/2,tp=Kf/4,ep=2*Kf,np=180/Kf,rp=Kf/180,ip=Math.abs,ap=Math.atan,op=Math.atan2,sp=Math.cos,cp=Math.ceil,lp=Math.exp,up=Math.log,hp=Math.pow,dp=Math.sin,fp=Math.sign||function(t){return t>0?1:t<0?-1:0},pp=Math.sqrt,gp=Math.tan;function yp(t){return t>1?0:t<-1?Kf:Math.acos(t)}function mp(t){return t>1?Jf:t<-1?-Jf:Math.asin(t)}function vp(t){return(t=dp(t/2))*t}function bp(){}function _p(t,e){t&&xp.hasOwnProperty(t.type)&&xp[t.type](t,e)}var wp={Feature:function(t,e){_p(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=sp(e=(e*=rp)/2+tp),o=dp(e),s=Mp*o,c=Ap*a+s*sp(i),l=s*r*dp(i);Dp.add(op(l,c)),Op=t,Ap=a,Mp=o}function Fp(t){return[op(t[1],t[0]),mp(t[2])]}function Pp(t){var e=t[0],n=t[1],r=sp(n);return[r*sp(e),r*dp(e),dp(n)]}function Yp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zp(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Up(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function $p(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Wp(t){var e=pp(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var qp,Hp,Vp,Gp,Xp,Zp,Qp,Kp,Jp,tg,eg,ng,rg,ig,ag,og,sg,cg,lg,ug,hg,dg,fg,pg,gg,yg,mg=Gf(),vg={point:bg,lineStart:wg,lineEnd:xg,polygonStart:function(){vg.point=kg,vg.lineStart=Tg,vg.lineEnd=Cg,mg.reset(),Np.polygonStart()},polygonEnd:function(){Np.polygonEnd(),vg.point=bg,vg.lineStart=wg,vg.lineEnd=xg,Dp<0?(qp=-(Vp=180),Hp=-(Gp=90)):mg>1e-6?Gp=90:mg<-1e-6&&(Hp=-90),tg[0]=qp,tg[1]=Vp},sphere:function(){qp=-(Vp=180),Hp=-(Gp=90)}};function bg(t,e){Jp.push(tg=[qp=t,Vp=t]),eGp&&(Gp=e)}function _g(t,e){var n=Pp([t*rp,e*rp]);if(Kp){var r=zp(Kp,n),i=zp([r[1],-r[0],0],r);Wp(i),i=Fp(i);var a,o=t-Xp,s=o>0?1:-1,c=i[0]*np*s,l=ip(o)>180;l^(s*XpGp&&(Gp=a):l^(s*Xp<(c=(c+360)%360-180)&&cGp&&(Gp=e)),l?tEg(qp,Vp)&&(Vp=t):Eg(t,Vp)>Eg(qp,Vp)&&(qp=t):Vp>=qp?(tVp&&(Vp=t)):t>Xp?Eg(qp,t)>Eg(qp,Vp)&&(Vp=t):Eg(t,Vp)>Eg(qp,Vp)&&(qp=t)}else Jp.push(tg=[qp=t,Vp=t]);eGp&&(Gp=e),Kp=n,Xp=t}function wg(){vg.point=_g}function xg(){tg[0]=qp,tg[1]=Vp,vg.point=bg,Kp=null}function kg(t,e){if(Kp){var n=t-Xp;mg.add(ip(n)>180?n+(n>0?360:-360):n)}else Zp=t,Qp=e;Np.point(t,e),_g(t,e)}function Tg(){Np.lineStart()}function Cg(){kg(Zp,Qp),Np.lineEnd(),ip(mg)>1e-6&&(qp=-(Vp=180)),tg[0]=qp,tg[1]=Vp,Kp=null}function Eg(t,e){return(e-=t)<0?e+360:e}function Sg(t,e){return t[0]-e[0]}function Og(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eKf?t+Math.round(-t/ep)*ep:t,e]}function $g(t,e,n){return(t%=ep)?e||n?zg(qg(t),Hg(e,n)):qg(t):e||n?Hg(e,n):Ug}function Wg(t){return function(e,n){return[(e+=t)>Kf?e-ep:e<-Kf?e+ep:e,n]}}function qg(t){var e=Wg(t);return e.invert=Wg(-t),e}function Hg(t,e){var n=sp(t),r=dp(t),i=sp(e),a=dp(e);function o(t,e){var o=sp(e),s=sp(t)*o,c=dp(t)*o,l=dp(e),u=l*n+s*r;return[op(c*i-u*a,s*n-l*r),mp(u*i+c*a)]}return o.invert=function(t,e){var o=sp(e),s=sp(t)*o,c=dp(t)*o,l=dp(e),u=l*i-c*a;return[op(c*i+l*a,s*n+u*r),mp(u*n-s*r)]},o}function Vg(t){function e(e){return(e=t(e[0]*rp,e[1]*rp))[0]*=np,e[1]*=np,e}return t=$g(t[0]*rp,t[1]*rp,t.length>2?t[2]*rp:0),e.invert=function(e){return(e=t.invert(e[0]*rp,e[1]*rp))[0]*=np,e[1]*=np,e},e}function Gg(t,e,n,r,i,a){if(n){var o=sp(e),s=dp(e),c=r*n;null==i?(i=e+r*ep,a=e-c/2):(i=Xg(o,i),a=Xg(o,a),(r>0?ia)&&(i+=r*ep));for(var l,u=i;r>0?u>a:u1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Qg(t,e){return ip(t[0]-e[0])<1e-6&&ip(t[1]-e[1])<1e-6}function Kg(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 Jg(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Qg(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a=0;--a)i.point((u=l[a])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}l=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function ty(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,C=T*k,E=C>Kf,S=g*w;if(ey.add(op(S*T*dp(C),y*x+S*sp(C))),o+=E?k+T*ep:k,E^f>=n^b>=n){var O=zp(Pp(d),Pp(v));Wp(O);var A=zp(a,O);Wp(A);var M=(E^k>=0?-1:1)*mp(A[2]);(r>M||r===M&&(O[0]||O[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ey<-1e-6)^1&s}function iy(t,e,n,r){return function(i){var a,o,s,c=e(i),l=Zg(),u=e(l),h=!1,d={point:f,lineStart:g,lineEnd:y,polygonStart:function(){d.point=m,d.lineStart=v,d.lineEnd=b,o=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=y,o=to(o);var t=ry(a,r);o.length?(h||(i.polygonStart(),h=!0),Jg(o,oy,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){d.point=p,c.lineStart()}function y(){d.point=f,c.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),d=l.result(),f=d.length;if(s.pop(),a.push(s),s=null,f)if(1&c){if((e=(n=d[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&d.push(d.pop().concat(d.shift())),o.push(d.filter(ay))}return d}}function ay(t){return t.length>1}function oy(t,e){return((t=t.x)[0]<0?t[1]-Jf-1e-6:Jf-t[1])-((e=e.x)[0]<0?e[1]-Jf-1e-6:Jf-e[1])}var sy=iy((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Kf:-Kf,c=ip(a-n);ip(c-Kf)<1e-6?(t.point(n,r=(r+o)/2>0?Jf:-Jf),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Kf&&(ip(n-i)<1e-6&&(n-=1e-6*i),ip(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=dp(t-n);return ip(o)>1e-6?ap((dp(e)*(a=sp(r))*dp(n)-dp(r)*(i=sp(e))*dp(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Jf,r.point(-Kf,i),r.point(0,i),r.point(Kf,i),r.point(Kf,0),r.point(Kf,-i),r.point(0,-i),r.point(-Kf,-i),r.point(-Kf,0),r.point(-Kf,i);else if(ip(t[0]-e[0])>1e-6){var a=t[0]0,i=ip(e)>1e-6;function a(t,n){return sp(t)*sp(n)>e}function o(t,n,r){var i=[1,0,0],a=zp(Pp(t),Pp(n)),o=Yp(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var l=e*o/c,u=-e*s/c,h=zp(i,a),d=$p(i,l);Up(d,$p(a,u));var f=h,p=Yp(d,f),g=Yp(f,f),y=p*p-g*(Yp(d,d)-1);if(!(y<0)){var m=pp(y),v=$p(f,(-p-m)/g);if(Up(v,d),v=Fp(v),!r)return v;var b,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(b=_,_=w,w=b);var T=w-_,C=ip(T-Kf)<1e-6;if(!C&&k0^v[1]<(ip(v[0]-_)<1e-6?x:k):x<=v[1]&&v[1]<=k:T>Kf^(_<=v[0]&&v[0]<=w)){var E=$p(f,(-p+m)/g);return Up(E,d),[v,Fp(E)]}}}function s(e,n){var i=r?t:Kf-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return iy(a,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(h,d){var f,p=[h,d],g=a(h,d),y=r?g?0:s(h,d):g?s(h+(h<0?Kf:-Kf),d):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(f=o(e,p))||Qg(e,f)||Qg(p,f))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),f=o(p,e),t.point(f[0],f[1])):(f=o(e,p),t.point(f[0],f[1],2),t.lineEnd()),e=f;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(u=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Qg(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,a){Gg(a,t,n,i,e,r)}),r?[0,-t]:[-Kf,t-Kf])}function ly(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else l.point(a[0],a[1])}function o(r,i){return ip(r[0]-t)<1e-6?i>0?0:3:ip(r[0]-n)<1e-6?i>0?2:1:ip(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(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 c,l,u,h,d,f,p,g,y,m,v,b=o,_=Zg(),w={point:x,lineStart:function(){w.point=k,l&&l.push(u=[]);m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,d),f&&y&&_.rejoin(),c.push(_.result()));w.point=x,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;nr&&(d-a)*(r-o)>(f-o)*(t-a)&&++e:f<=r&&(d-a)*(r-o)<(f-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=to(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Jg(c,s,e,a,o),o.polygonEnd());b=o,c=l=u=null}};function x(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(l&&u.push([a,o]),m)h=a,d=o,f=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],_=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],l=0,u=1,h=e[0]-s,d=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>u)return;o>l&&(l=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>u)return;o>l&&(l=o)}if(o=a-c,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>l&&(l=o)}else if(d>0){if(o0&&(t[0]=s+l*h,t[1]=c+l*d),u<1&&(e[0]=s+u*h,e[1]=c+u*d),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return w}}var uy,hy,dy,fy=Gf(),py={sphere:bp,point:bp,lineStart:function(){py.point=yy,py.lineEnd=gy},lineEnd:bp,polygonStart:bp,polygonEnd:bp};function gy(){py.point=py.lineEnd=bp}function yy(t,e){uy=t*=rp,hy=dp(e*=rp),dy=sp(e),py.point=my}function my(t,e){t*=rp;var n=dp(e*=rp),r=sp(e),i=ip(t-uy),a=sp(i),o=r*dp(i),s=dy*n-hy*r*a,c=hy*n+dy*r*a;fy.add(op(pp(o*o+s*s),c)),uy=t,hy=n,dy=r}function vy(t){return fy.reset(),Cp(t,py),+fy}var by=[null,null],_y={type:"LineString",coordinates:by};function wy(t,e){return by[0]=t,by[1]=e,vy(_y)}var xy={Feature:function(t,e){return Ty(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=wy(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Sy(t,e){return!!ry(t.map(Oy),Ay(e))}function Oy(t){return(t=t.map(Ay)).pop(),t}function Ay(t){return[t[0]*rp,t[1]*rp]}function My(t,e,n){var r=Wa(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Dy(t,e,n){var r=Wa(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function jy(){var t,e,n,r,i,a,o,s,c,l,u,h,d=10,f=d,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return Wa(cp(r/p)*p,n,p).map(u).concat(Wa(cp(s/g)*g,o,g).map(h)).concat(Wa(cp(e/d)*d,t,d).filter((function(t){return ip(t%p)>1e-6})).map(c)).concat(Wa(cp(a/f)*f,i,f).filter((function(t){return ip(t%g)>1e-6})).map(l))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(o).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],m):[d,f]},m.precision=function(d){return arguments.length?(y=+d,c=My(a,i,90),l=Dy(e,t,y),u=My(s,o,90),h=Dy(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Ny(t){return t}var By,Ly,Ry,Iy,Fy=Gf(),Py=Gf(),Yy={point:bp,lineStart:bp,lineEnd:bp,polygonStart:function(){Yy.lineStart=zy,Yy.lineEnd=Wy},polygonEnd:function(){Yy.lineStart=Yy.lineEnd=Yy.point=bp,Fy.add(ip(Py)),Py.reset()},result:function(){var t=Fy/2;return Fy.reset(),t}};function zy(){Yy.point=Uy}function Uy(t,e){Yy.point=$y,By=Ry=t,Ly=Iy=e}function $y(t,e){Py.add(Iy*t-Ry*e),Ry=t,Iy=e}function Wy(){$y(By,Ly)}var qy=Yy,Hy=1/0,Vy=Hy,Gy=-Hy,Xy=Gy;var Zy,Qy,Ky,Jy,tm={point:function(t,e){tGy&&(Gy=t);eXy&&(Xy=e)},lineStart:bp,lineEnd:bp,polygonStart:bp,polygonEnd:bp,result:function(){var t=[[Hy,Vy],[Gy,Xy]];return Gy=Xy=-(Vy=Hy=1/0),t}},em=0,nm=0,rm=0,im=0,am=0,om=0,sm=0,cm=0,lm=0,um={point:hm,lineStart:dm,lineEnd:gm,polygonStart:function(){um.lineStart=ym,um.lineEnd=mm},polygonEnd:function(){um.point=hm,um.lineStart=dm,um.lineEnd=gm},result:function(){var t=lm?[sm/lm,cm/lm]:om?[im/om,am/om]:rm?[em/rm,nm/rm]:[NaN,NaN];return em=nm=rm=im=am=om=sm=cm=lm=0,t}};function hm(t,e){em+=t,nm+=e,++rm}function dm(){um.point=fm}function fm(t,e){um.point=pm,hm(Ky=t,Jy=e)}function pm(t,e){var n=t-Ky,r=e-Jy,i=pp(n*n+r*r);im+=i*(Ky+t)/2,am+=i*(Jy+e)/2,om+=i,hm(Ky=t,Jy=e)}function gm(){um.point=hm}function ym(){um.point=vm}function mm(){bm(Zy,Qy)}function vm(t,e){um.point=bm,hm(Zy=Ky=t,Qy=Jy=e)}function bm(t,e){var n=t-Ky,r=e-Jy,i=pp(n*n+r*r);im+=i*(Ky+t)/2,am+=i*(Jy+e)/2,om+=i,sm+=(i=Jy*t-Ky*e)*(Ky+t),cm+=i*(Jy+e),lm+=3*i,hm(Ky=t,Jy=e)}var _m=um;function wm(t){this._context=t}wm.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,ep)}},result:bp};var xm,km,Tm,Cm,Em,Sm=Gf(),Om={point:bp,lineStart:function(){Om.point=Am},lineEnd:function(){xm&&Mm(km,Tm),Om.point=bp},polygonStart:function(){xm=!0},polygonEnd:function(){xm=null},result:function(){var t=+Sm;return Sm.reset(),t}};function Am(t,e){Om.point=Mm,km=Cm=t,Tm=Em=e}function Mm(t,e){Cm-=t,Em-=e,Sm.add(pp(Cm*Cm+Em*Em)),Cm=t,Em=e}var Dm=Om;function jm(){this._string=[]}function Nm(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Bm(t){return function(e){var n=new Lm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Lm(){}function Rm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Cp(n,t.stream(tm)),e(tm.result()),null!=r&&t.clipExtent(r),t}function Im(t,e,n){return Rm(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Fm(t,e,n){return Im(t,[[0,0],e],n)}function Pm(t,e,n){return Rm(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Ym(t,e,n){return Rm(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}jm.prototype={_radius:4.5,_circle:Nm(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=Nm(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}},Lm.prototype={constructor:Lm,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 zm=sp(30*rp);function Um(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,l,u,h,d,f,p,g,y){var m=l-r,v=u-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+d,w=s+f,x=c+p,k=pp(_*_+w*w+x*x),T=mp(x/=k),C=ip(ip(x)-1)<1e-6||ip(a-h)<1e-6?(a+h)/2:op(w,_),E=t(C,T),S=E[0],O=E[1],A=S-r,M=O-i,D=v*A-m*M;(D*D/b>e||ip((m*A+v*M)/b-.5)>.3||o*d+s*f+c*p2?t[2]%360*rp:0,A()):[y*np,m*np,v*np]},S.angle=function(t){return arguments.length?(b=t%360*rp,A()):b*np},S.reflectX=function(t){return arguments.length?(_=t?-1:1,A()):_<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},S.precision=function(t){return arguments.length?(o=Um(s,E=t*t),M()):pp(E)},S.fitExtent=function(t,e){return Im(S,t,e)},S.fitSize=function(t,e){return Fm(S,t,e)},S.fitWidth=function(t,e){return Pm(S,t,e)},S.fitHeight=function(t,e){return Ym(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&O,A()}}function Gm(t){var e=0,n=Kf/3,r=Vm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*rp,n=t[1]*rp):[e*np,n*np]},i}function Xm(t,e){var n=dp(t),r=(n+dp(e))/2;if(ip(r)<1e-6)return function(t){var e=sp(t);function n(t,n){return[t*e,dp(n)/e]}return n.invert=function(t,n){return[t/e,mp(n*e)]},n}(t);var i=1+n*(2*r-n),a=pp(i)/r;function o(t,e){var n=pp(i-2*r*dp(e))/r;return[n*dp(t*=r),a-n*sp(t)]}return o.invert=function(t,e){var n=a-e,o=op(t,ip(n))*fp(n);return n*r<0&&(o-=Kf*fp(t)*fp(n)),[o/r,mp((i-(t*t+n*n)*r*r)/(2*r))]},o}function Zm(){return Gm(Xm).scale(155.424).center([0,33.6442])}function Qm(){return Zm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Km(t){return function(e,n){var r=sp(e),i=sp(n),a=t(r*i);return[a*i*dp(e),a*dp(n)]}}function Jm(t){return function(e,n){var r=pp(e*e+n*n),i=t(r),a=dp(i),o=sp(i);return[op(e*a,r*o),mp(r&&n*a/r)]}}var tv=Km((function(t){return pp(2/(1+t))}));tv.invert=Jm((function(t){return 2*mp(t/2)}));var ev=Km((function(t){return(t=yp(t))&&t/dp(t)}));function nv(t,e){return[t,up(gp((Jf+e)/2))]}function rv(t){var e,n,r,i=Hm(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var a=Kf*o(),s=i(Vg(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===nv?[[Math.max(s[0]-a,l),e],[Math.min(s[0]+a,n),r]]:[[l,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),u()):o()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(a(t),u()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function iv(t){return gp((Jf+t)/2)}function av(t,e){var n=sp(t),r=t===e?dp(t):up(n/sp(e))/up(iv(e)/iv(t)),i=n*hp(iv(t),r)/r;if(!r)return nv;function a(t,e){i>0?e<1e-6-Jf&&(e=1e-6-Jf):e>Jf-1e-6&&(e=Jf-1e-6);var n=i/hp(iv(e),r);return[n*dp(r*t),i-n*sp(r*t)]}return a.invert=function(t,e){var n=i-e,a=fp(r)*pp(t*t+n*n),o=op(t,ip(n))*fp(n);return n*r<0&&(o-=Kf*fp(t)*fp(n)),[o/r,2*ap(hp(i/a,1/r))-Jf]},a}function ov(t,e){return[t,e]}function sv(t,e){var n=sp(t),r=t===e?dp(t):(n-sp(e))/(e-t),i=n/r+t;if(ip(r)<1e-6)return ov;function a(t,e){var n=i-e,a=r*t;return[n*dp(a),i-n*sp(a)]}return a.invert=function(t,e){var n=i-e,a=op(t,ip(n))*fp(n);return n*r<0&&(a-=Kf*fp(t)*fp(n)),[a/r,i-fp(r)*pp(t*t+n*n)]},a}ev.invert=Jm((function(t){return t})),nv.invert=function(t,e){return[t,2*ap(lp(e))-Jf]},ov.invert=ov;var cv=1.340264,lv=-.081106,uv=893e-6,hv=.003796,dv=pp(3)/2;function fv(t,e){var n=mp(dv*dp(e)),r=n*n,i=r*r*r;return[t*sp(n)/(dv*(cv+3*lv*r+i*(7*uv+9*hv*r))),n*(cv+lv*r+i*(uv+hv*r))]}function pv(t,e){var n=sp(e),r=sp(t)*n;return[n*dp(t)/r,dp(e)/r]}function gv(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function yv(t,e){return[sp(e)*dp(t),dp(e)]}function mv(t,e){var n=sp(e),r=1+sp(t)*n;return[n*dp(t)/r,dp(e)/r]}function vv(t,e){return[up(gp((Jf+e)/2)),-t]}function bv(t,e){return t.parent===e.parent?1:2}function _v(t,e){return t+e.x}function wv(t,e){return Math.max(t,e.y)}function xv(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function kv(t,e){var n,r,i,a,o,s=new Sv(t),c=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Tv);n=l.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new Sv(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ev)}function Tv(t){return t.children}function Cv(t){t.data=t.data.data}function Ev(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Sv(t){this.data=t,this.depth=this.height=0,this.parent=null}fv.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(cv+lv*i+a*(uv+hv*i))-e)/(cv+3*lv*i+a*(7*uv+9*hv*i)))*r)*i*i,!(ip(n)<1e-12));++o);return[dv*t*(cv+3*lv*i+a*(7*uv+9*hv*i))/sp(r),mp(dp(r)/dv)]},pv.invert=Jm(ap),gv.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(ip(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},yv.invert=Jm(mp),mv.invert=Jm((function(t){return 2*ap(t)})),vv.invert=function(t,e){return[-e,2*ap(lp(t))-Jf]},Sv.prototype=kv.prototype={constructor:Sv,count:function(){return this.eachAfter(xv)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return kv(this).eachBefore(Cv)}};var Ov=Array.prototype.slice;function Av(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Ov.call(t))).length,a=[];r0&&n*n>r*r+i*i}function Nv(t,e){for(var n=0;n(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Fv(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Pv(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Yv(t){this._=t,this.next=null,this.previous=null}function zv(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,l,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Iv(n,e,r=t[2]),e=new Yv(e),n=new Yv(n),r=new Yv(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;sd&&(d=s),y=u*u*g,(f=Math.max(d/y,y/h))>p){u-=s;break}p=f}m.push(o={value:u,dice:c1?e:1)},n}(lb);var db=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,l,u,h=-1,d=o.length,f=t.value;++h1?e:1)},n}(lb);function fb(t,e){return t[0]-e[0]||t[1]-e[1]}function pb(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function gb(){return Math.random()}var yb=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(gb),mb=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(gb),vb=function t(e){function n(){var t=mb.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(gb),bb=function t(e){function n(t){return function(){for(var n=0,r=0;rr&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Rb(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?Ib:Rb,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),fl)))(n)))},h.domain=function(t){return arguments.length?(o=Cb.call(t,Db),l===Nb||(l=Lb(o)),u()):o.slice()},h.range=function(t){return arguments.length?(s=Eb.call(t),u()):s.slice()},h.rangeRound=function(t){return s=Eb.call(t),c=bl,u()},h.clamp=function(t){return arguments.length?(l=t?Lb(o):Nb,h):l!==Nb},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Yb(t,e){return Pb()(t,e)}function zb(t,e,n,r){var i,a=Za(t,e,n);switch((r=Nf(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Hf(a,o))||(r.precision=i),Yf(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Vf(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=qf(a))||(r.precision=i-2*("%"===r.type))}return Pf(r)}function Ub(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ga(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return zb(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c0?r=Xa(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=Xa(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function $b(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;dc)break;g.push(h)}}else for(;d=1;--u)if(!((h=l*u)c)break;g.push(h)}}else g=Ga(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Pf(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return a_.setTime(+e),o_.setTime(+r),t(a_),t(o_),Math.floor(n(a_,o_))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var c_=s_((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));c_.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s_((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):c_:null};var l_=c_,u_=c_.range,h_=s_((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),d_=h_,f_=h_.range,p_=s_((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),g_=p_,y_=p_.range,m_=s_((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),v_=m_,b_=m_.range,__=s_((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),w_=__,x_=__.range;function k_(t){return s_((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var T_=k_(0),C_=k_(1),E_=k_(2),S_=k_(3),O_=k_(4),A_=k_(5),M_=k_(6),D_=T_.range,j_=C_.range,N_=E_.range,B_=S_.range,L_=O_.range,R_=A_.range,I_=M_.range,F_=s_((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),P_=F_,Y_=F_.range,z_=s_((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));z_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?s_((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var U_=z_,$_=z_.range,W_=s_((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),q_=W_,H_=W_.range,V_=s_((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),G_=V_,X_=V_.range,Z_=s_((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Q_=Z_,K_=Z_.range;function J_(t){return s_((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var tw=J_(0),ew=J_(1),nw=J_(2),rw=J_(3),iw=J_(4),aw=J_(5),ow=J_(6),sw=tw.range,cw=ew.range,lw=nw.range,uw=rw.range,hw=iw.range,dw=aw.range,fw=ow.range,pw=s_((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),gw=pw,yw=pw.range,mw=s_((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));mw.every=function(t){return isFinite(t=Math.floor(t))&&t>0?s_((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var vw=mw,bw=mw.range;function _w(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ww(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xw(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function kw(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=Lw(i),u=Rw(i),h=Lw(a),d=Rw(a),f=Lw(o),p=Rw(o),g=Lw(s),y=Rw(s),m=Lw(c),v=Rw(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:rx,e:rx,f:cx,g:bx,G:wx,H:ix,I:ax,j:ox,L:sx,m:lx,M:ux,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Wx,s:qx,S:hx,u:dx,U:fx,V:gx,w:yx,W:mx,x:null,X:null,y:vx,Y:_x,Z:xx,"%":$x},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:kx,e:kx,f:Ox,g:Px,G:zx,H:Tx,I:Cx,j:Ex,L:Sx,m:Ax,M:Mx,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Wx,s:qx,S:Dx,u:jx,U:Nx,V:Lx,w:Rx,W:Ix,x:null,X:null,y:Fx,Y:Yx,Z:Ux,"%":$x},w={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Vw,e:Vw,f:Jw,g:$w,G:Uw,H:Xw,I:Xw,j:Gw,L:Kw,m:Hw,M:Zw,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:qw,Q:ex,s:nx,S:Qw,u:Fw,U:Pw,V:Yw,w:Iw,W:zw,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:$w,Y:Uw,Z:Ww,"%":tx};function x(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=ww(xw(a.y,0,1))).getUTCDay(),r=i>4||0===i?ew.ceil(r):ew(r),r=Q_.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=_w(xw(a.y,0,1))).getDay(),r=i>4||0===i?C_.ceil(r):C_(r),r=w_.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?ww(xw(a.y,0,1)).getUTCDay():_w(xw(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ww(a)):_w(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Aw?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var Tw,Cw,Ew,Sw,Ow,Aw={"-":"",_:" ",0:"0"},Mw=/^\s*\d+/,Dw=/^%/,jw=/[\\^$*+?|[\]().{}]/g;function Nw(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Ww(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function qw(t,e,n){var r=Mw.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Hw(t,e,n){var r=Mw.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Vw(t,e,n){var r=Mw.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Gw(t,e,n){var r=Mw.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Xw(t,e,n){var r=Mw.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Zw(t,e,n){var r=Mw.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Qw(t,e,n){var r=Mw.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Kw(t,e,n){var r=Mw.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Jw(t,e,n){var r=Mw.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tx(t,e,n){var r=Dw.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ex(t,e,n){var r=Mw.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function nx(t,e,n){var r=Mw.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function rx(t,e){return Nw(t.getDate(),e,2)}function ix(t,e){return Nw(t.getHours(),e,2)}function ax(t,e){return Nw(t.getHours()%12||12,e,2)}function ox(t,e){return Nw(1+w_.count(U_(t),t),e,3)}function sx(t,e){return Nw(t.getMilliseconds(),e,3)}function cx(t,e){return sx(t,e)+"000"}function lx(t,e){return Nw(t.getMonth()+1,e,2)}function ux(t,e){return Nw(t.getMinutes(),e,2)}function hx(t,e){return Nw(t.getSeconds(),e,2)}function dx(t){var e=t.getDay();return 0===e?7:e}function fx(t,e){return Nw(T_.count(U_(t)-1,t),e,2)}function px(t){var e=t.getDay();return e>=4||0===e?O_(t):O_.ceil(t)}function gx(t,e){return t=px(t),Nw(O_.count(U_(t),t)+(4===U_(t).getDay()),e,2)}function yx(t){return t.getDay()}function mx(t,e){return Nw(C_.count(U_(t)-1,t),e,2)}function vx(t,e){return Nw(t.getFullYear()%100,e,2)}function bx(t,e){return Nw((t=px(t)).getFullYear()%100,e,2)}function _x(t,e){return Nw(t.getFullYear()%1e4,e,4)}function wx(t,e){var n=t.getDay();return Nw((t=n>=4||0===n?O_(t):O_.ceil(t)).getFullYear()%1e4,e,4)}function xx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Nw(e/60|0,"0",2)+Nw(e%60,"0",2)}function kx(t,e){return Nw(t.getUTCDate(),e,2)}function Tx(t,e){return Nw(t.getUTCHours(),e,2)}function Cx(t,e){return Nw(t.getUTCHours()%12||12,e,2)}function Ex(t,e){return Nw(1+Q_.count(vw(t),t),e,3)}function Sx(t,e){return Nw(t.getUTCMilliseconds(),e,3)}function Ox(t,e){return Sx(t,e)+"000"}function Ax(t,e){return Nw(t.getUTCMonth()+1,e,2)}function Mx(t,e){return Nw(t.getUTCMinutes(),e,2)}function Dx(t,e){return Nw(t.getUTCSeconds(),e,2)}function jx(t){var e=t.getUTCDay();return 0===e?7:e}function Nx(t,e){return Nw(tw.count(vw(t)-1,t),e,2)}function Bx(t){var e=t.getUTCDay();return e>=4||0===e?iw(t):iw.ceil(t)}function Lx(t,e){return t=Bx(t),Nw(iw.count(vw(t),t)+(4===vw(t).getUTCDay()),e,2)}function Rx(t){return t.getUTCDay()}function Ix(t,e){return Nw(ew.count(vw(t)-1,t),e,2)}function Fx(t,e){return Nw(t.getUTCFullYear()%100,e,2)}function Px(t,e){return Nw((t=Bx(t)).getUTCFullYear()%100,e,2)}function Yx(t,e){return Nw(t.getUTCFullYear()%1e4,e,4)}function zx(t,e){var n=t.getUTCDay();return Nw((t=n>=4||0===n?iw(t):iw.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ux(){return"+0000"}function $x(){return"%"}function Wx(t){return+t}function qx(t){return Math.floor(+t/1e3)}function Hx(t){return Tw=kw(t),Cw=Tw.format,Ew=Tw.parse,Sw=Tw.utcFormat,Ow=Tw.utcParse,Tw}Hx({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Vx=Date.prototype.toISOString?function(t){return t.toISOString()}:Sw("%Y-%m-%dT%H:%M:%S.%LZ");var Gx=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ow("%Y-%m-%dT%H:%M:%S.%LZ");function Xx(t){return new Date(t)}function Zx(t){return t instanceof Date?+t:+new Date(+t)}function Qx(t,e,n,r,i,a,o,s,c){var l=Yb(Nb,Nb),u=l.invert,h=l.domain,d=c(".%L"),f=c(":%S"),p=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),m=c("%b %d"),v=c("%B"),b=c("%Y"),_=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(s){return(o(s)1?0:t<-1?LT:Math.acos(t)}function PT(t){return t>=1?RT:t<=-1?-RT:Math.asin(t)}function YT(t){return t.innerRadius}function zT(t){return t.outerRadius}function UT(t){return t.startAngle}function $T(t){return t.endAngle}function WT(t){return t&&t.padAngle}function qT(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,d=h*c-u*l;if(!(d*d<1e-12))return[t+(d=(u*(e-a)-h*(t-i))/d)*c,e+d*l]}function HT(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/BT(s*s+c*c),u=l*c,h=-l*s,d=t+u,f=e+h,p=n+u,g=r+h,y=(d+p)/2,m=(f+g)/2,v=p-d,b=g-f,_=v*v+b*b,w=i-a,x=d*g-p*f,k=(b<0?-1:1)*BT(DT(0,w*w*_-x*x)),T=(x*b-v*k)/_,C=(-x*v-b*k)/_,E=(x*b+v*k)/_,S=(-x*v+b*k)/_,O=T-y,A=C-m,M=E-y,D=S-m;return O*O+A*A>M*M+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-u,y01:-h,x11:T*(i/w-1),y11:C*(i/w-1)}}function VT(t){this._context=t}function GT(t){return new VT(t)}function XT(t){return t[0]}function ZT(t){return t[1]}function QT(){var t=XT,e=ZT,n=ST(!0),r=null,i=GT,a=null;function o(o){var s,c,l,u=o.length,h=!1;for(null==r&&(a=i(l=td())),s=0;s<=u;++s)!(s=u;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[l]=+t(d,l,c),m[l]=+n(d,l,c),s.point(e?+e(d,l,c):y[l],r?+r(d,l,c):m[l]))}if(f)return s=null,f+""||null}function l(){return QT().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:ST(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:ST(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:ST(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:ST(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:ST(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ST(+t),c):r},c.lineX0=c.lineY0=function(){return l().x(t).y(n)},c.lineY1=function(){return l().x(t).y(r)},c.lineX1=function(){return l().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:ST(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function JT(t,e){return et?1:e>=t?0:NaN}function tC(t){return t}VT.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 eC=rC(GT);function nC(t){this._curve=t}function rC(t){function e(e){return new nC(t(e))}return e._curve=t,e}function iC(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(rC(t)):e()._curve},t}function aC(){return iC(QT().curve(eC))}function oC(){var t=KT().curve(eC),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return iC(n())},delete t.lineX0,t.lineEndAngle=function(){return iC(r())},delete t.lineX1,t.lineInnerRadius=function(){return iC(i())},delete t.lineY0,t.lineOuterRadius=function(){return iC(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(rC(t)):e()._curve},t}function sC(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}nC.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var cC=Array.prototype.slice;function lC(t){return t.source}function uC(t){return t.target}function hC(t){var e=lC,n=uC,r=XT,i=ZT,a=null;function o(){var o,s=cC.call(arguments),c=e.apply(this,s),l=n.apply(this,s);if(a||(a=o=td()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:ST(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:ST(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function dC(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function fC(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function pC(t,e,n,r,i){var a=sC(e,n),o=sC(e,n=(n+i)/2),s=sC(r,n),c=sC(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}var gC={draw:function(t,e){var n=Math.sqrt(e/LT);t.moveTo(n,0),t.arc(0,0,n,0,IT)}},yC={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},mC=Math.sqrt(1/3),vC=2*mC,bC={draw:function(t,e){var n=Math.sqrt(e/vC),r=n*mC;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},_C=Math.sin(LT/10)/Math.sin(7*LT/10),wC=Math.sin(IT/10)*_C,xC=-Math.cos(IT/10)*_C,kC={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=wC*n,i=xC*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=IT*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},TC={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},CC=Math.sqrt(3),EC={draw:function(t,e){var n=-Math.sqrt(e/(3*CC));t.moveTo(0,2*n),t.lineTo(-CC*n,-n),t.lineTo(CC*n,-n),t.closePath()}},SC=-.5,OC=Math.sqrt(3)/2,AC=1/Math.sqrt(12),MC=3*(AC/2+1),DC={draw:function(t,e){var n=Math.sqrt(e/MC),r=n/2,i=n*AC,a=r,o=n*AC+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(SC*r-OC*i,OC*r+SC*i),t.lineTo(SC*a-OC*o,OC*a+SC*o),t.lineTo(SC*s-OC*c,OC*s+SC*c),t.lineTo(SC*r+OC*i,SC*i-OC*r),t.lineTo(SC*a+OC*o,SC*o-OC*a),t.lineTo(SC*s+OC*c,SC*c-OC*s),t.closePath()}},jC=[gC,yC,bC,TC,kC,EC,DC];function NC(){}function BC(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function LC(t){this._context=t}function RC(t){this._context=t}function IC(t){this._context=t}function FC(t,e){this._basis=new LC(t),this._beta=e}LC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},RC.prototype={areaStart:NC,areaEnd:NC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:BC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},IC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:BC(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},FC.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var PC=function t(e){function n(t){return 1===e?new LC(t):new FC(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function YC(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function zC(t,e){this._context=t,this._k=(1-e)/6}zC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:YC(this,this._x1,this._y1)}(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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:YC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var UC=function t(e){function n(t){return new zC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $C(t,e){this._context=t,this._k=(1-e)/6}$C.prototype={areaStart:NC,areaEnd:NC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:YC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var WC=function t(e){function n(t){return new $C(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qC(t,e){this._context=t,this._k=(1-e)/6}qC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:YC(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var HC=function t(e){function n(t){return new qC(t,e)}return n.tension=function(e){return t(+e)},n}(0);function VC(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function GC(t,e){this._context=t,this._alpha=e}GC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(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;break;case 2:this._point=3;default:VC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var XC=function t(e){function n(t){return e?new GC(t,e):new zC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ZC(t,e){this._context=t,this._alpha=e}ZC.prototype={areaStart:NC,areaEnd:NC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:VC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var QC=function t(e){function n(t){return e?new ZC(t,e):new $C(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function KC(t,e){this._context=t,this._alpha=e}KC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:VC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var JC=function t(e){function n(t){return e?new KC(t,e):new qC(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function tE(t){this._context=t}function eE(t){return t<0?-1:1}function nE(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(eE(a)+eE(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function rE(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function iE(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function aE(t){this._context=t}function oE(t){this._context=new sE(t)}function sE(t){this._context=t}function cE(t){this._context=t}function lE(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a=0;)n[e]=e;return n}function fE(t,e){return t[e]}function pE(t){var e=t.map(gE);return dE(t).sort((function(t,n){return e[t]-e[n]}))}function gE(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++na&&(a=e,r=n);return r}function yE(t){var e=t.map(mE);return dE(t).sort((function(t,n){return e[t]-e[n]}))}function mE(t){for(var e,n=0,r=-1,i=t.length;++r0)){if(a/=d,d<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-c,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>u&&(u=a)}else if(d>0){if(a0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=i-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0||h<1)||(u>0&&(t[0]=[c+u*d,l+u*f]),h<1&&(t[1]=[c+h*d,l+h*f]),!0)}}}}}function ME(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],l=t.left,u=t.right,h=l[0],d=l[1],f=u[0],p=u[1],g=(h+f)/2,y=(d+p)/2;if(p===d){if(g=r)return;if(h>f){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]1)if(h>f){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]=0&&(this._t=1-this._t,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:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},wE.prototype={constructor:wE,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=CE(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(kE(this,n),n=(t=n).U),n.C=!1,r.C=!0,TE(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(TE(this,n),n=(t=n).U),n.C=!1,r.C=!0,kE(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?CE(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,kE(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,TE(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,kE(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,TE(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,kE(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,TE(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var BE,LE=[];function RE(){xE(this),this.x=this.y=this.arc=this.site=this.cy=null}function IE(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,l=r[1]-s,u=a[0]-o,h=a[1]-s,d=2*(c*h-l*u);if(!(d>=-KE)){var f=c*c+l*l,p=u*u+h*h,g=(h*f-l*p)/d,y=(c*p-u*f)/d,m=LE.pop()||new RE;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=XE._;b;)if(m.yQE)s=s.L;else{if(!((i=a-HE(s,o))>QE)){r>-QE?(e=s.P,n=s):i>-QE?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){GE[t.index]={site:t,halfedges:[]}}(t);var c=zE(t);if(VE.insert(e,c),e||n){if(e===n)return FE(e),n=zE(e.site),VE.insert(c,n),c.edge=n.edge=EE(e.site,c.site),IE(e),void IE(n);if(n){FE(e),FE(n);var l=e.site,u=l[0],h=l[1],d=t[0]-u,f=t[1]-h,p=n.site,g=p[0]-u,y=p[1]-h,m=2*(d*y-f*g),v=d*d+f*f,b=g*g+y*y,_=[(y*v-f*b)/m+u,(d*b-g*v)/m+h];OE(n.edge,l,p,_),c.edge=EE(l,t,null,_),n.edge=EE(t,p,null,_),IE(e),IE(n)}else c.edge=EE(e.site,c.site)}}function qE(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],l=c-e;if(!l)return s;var u=s-r,h=1/a-1/l,d=u/l;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*l)-c+l/2+i-a/2)))/h+r:(r+s)/2}function HE(t,e){var n=t.N;if(n)return qE(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var VE,GE,XE,ZE,QE=1e-6,KE=1e-12;function JE(t,e){return e[1]-t[1]||e[0]-t[0]}function tS(t,e){var n,r,i,a=t.sort(JE).pop();for(ZE=[],GE=new Array(t.length),VE=new wE,XE=new wE;;)if(i=BE,a&&(!i||a[1]QE||Math.abs(i[0][1]-i[1][1])>QE)||delete ZE[a]}(o,s,c,l),function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y=GE.length,m=!0;for(i=0;iQE||Math.abs(g-d)>QE)&&(c.splice(s,0,ZE.push(SE(o,f,Math.abs(p-t)QE?[t,Math.abs(h-t)QE?[Math.abs(d-r)QE?[n,Math.abs(h-n)QE?[Math.abs(d-e)=s)return null;var c=t-i.site[0],l=e-i.site[1],u=c*c+l*l;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],l=e-s[1],h=c*c+l*l;hr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}aS.prototype=rS.prototype;var pS=wa(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:"5.16.0",bisect:ja,bisectRight:ja,bisectLeft:Na,ascending:Aa,bisector:Ma,cross:function(t,e,n){var r,i,a,o,s=t.length,c=e.length,l=new Array(s*c);for(null==n&&(n=Ba),r=a=0;rt?1:e>=t?0:NaN},deviation:Ia,extent:Fa,histogram:function(){var t=$a,e=Fa,n=Qa;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;iu;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:l,f.x1=i=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,l,u,h=-1,d=n.length,f=r[i++],p=sd(),g=o();++hr.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,cd,ld)},map:function(t){return a(t,0,ud,hd)},entries:function(t){return o(a(t,0,ud,hd),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}},set:pd,map:sd,keys:function(t){var e=[];for(var n in t)e.push(n);return e},values:function(t){var e=[];for(var n in t)e.push(t[n]);return e},entries:function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},color:uc,rgb:pc,hsl:wc,lab:Mc,hcl:Ic,lch:function(t,e,n,r){return 1===arguments.length?Rc(t):new Fc(n,e,t,null==r?1:r)},gray:function(t,e){return new Dc(t,0,0,null==e?1:e)},cubehelix:Xc,contours:kd,contourDensity:function(){var t=Ed,e=Sd,n=Od,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,l=i+2*s>>o,u=md(20);function h(r){var i=new Float32Array(c*l),h=new Float32Array(c*l);r.forEach((function(r,a,u){var h=+t(r,a,u)+s>>o,d=+e(r,a,u)+s>>o,f=+n(r,a,u);h>=0&&h=0&&d>o),Cd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),Td({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),Cd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),Td({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),Cd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o);var f=u(i);if(!Array.isArray(f)){var p=Ja(i);f=Za(0,p,f),(f=Wa(0,Math.floor(p/f)*f,f)).shift()}return kd().thresholds(f).size([c,l])(i).map(d)}function d(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(f),t}function f(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,l=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:md(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:md(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:md(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(u="function"==typeof t?t:Array.isArray(t)?md(gd.call(t)):md(t),h):u},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h},dispatch:po,drag:function(){var t,e,n,r,i=$s,a=Ws,o=qs,s=Hs,c={},l=po("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Ls,this,arguments);o&&(As(ys.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Ps(ys.view),Is(),n=!1,t=ys.clientX,e=ys.clientY,o("start"))}}function p(){if(Fs(),!n){var r=ys.clientX-t,i=ys.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){As(ys.view).on("mousemove.drag mouseup.drag",null),Ys(ys.view,n),Fs(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ys.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;tc+f||il+f||as.index){var p=c-o.x-o.vx,g=l-o.y-o.vy,y=p*p+g*g;yt.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r=o)){(t.data!==e||t.next)&&(0===u&&(f+=(u=ff())*u),0===h&&(f+=(h=ff())*h),f1?(null==n?s.remove(t):s.set(t,f(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(t,n),e):l.on(t)}}},forceX:function(t){var e,n,r,i=df(.1);function a(t){for(var i,a=0,o=e.length;aEg(r[0],r[1])&&(r[1]=i[1]),Eg(i[0],r[1])>Eg(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Eg(r[1],i[0]))>o&&(o=s,qp=i[0],Vp=r[1])}return Jp=tg=null,qp===1/0||Hp===1/0?[[NaN,NaN],[NaN,NaN]]:[[qp,Hp],[Vp,Gp]]},geoCentroid:function(t){eg=ng=rg=ig=ag=og=sg=cg=lg=ug=hg=0,Cp(t,Ag);var e=lg,n=ug,r=hg,i=e*e+n*n+r*r;return i<1e-12&&(e=og,n=sg,r=cg,ng<1e-6&&(e=rg,n=ig,r=ag),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[op(n,e)*np,mp(r/pp(i))*np]},geoCircle:function(){var t,e,n=Yg([0,0]),r=Yg(90),i=Yg(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=np,n[1]*=np}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*rp,c=i.apply(this,arguments)*rp;return t=[],e=$g(-o[0]*rp,-o[1]*rp,0).invert,Gg(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:Yg([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:Yg(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:Yg(+t),o):i},o},geoClipAntimeridian:sy,geoClipCircle:cy,geoClipExtent:function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=ly(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},geoClipRectangle:ly,geoContains:function(t,e){return(t&&xy.hasOwnProperty(t.type)?xy[t.type]:Ty)(t,e)},geoDistance:wy,geoGraticule:jy,geoGraticule10:function(){return jy()()},geoInterpolate:function(t,e){var n=t[0]*rp,r=t[1]*rp,i=e[0]*rp,a=e[1]*rp,o=sp(r),s=dp(r),c=sp(a),l=dp(a),u=o*sp(n),h=o*dp(n),d=c*sp(i),f=c*dp(i),p=2*mp(pp(vp(a-r)+o*c*vp(i-n))),g=dp(p),y=p?function(t){var e=dp(t*=p)/g,n=dp(p-t)/g,r=n*u+e*d,i=n*h+e*f,a=n*s+e*l;return[op(i,r)*np,op(a,pp(r*r+i*i))*np]}:function(){return[n*np,r*np]};return y.distance=p,y},geoLength:vy,geoPath:function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Cp(t,n(r))),r.result()}return a.area=function(t){return Cp(t,n(qy)),qy.result()},a.measure=function(t){return Cp(t,n(Dm)),Dm.result()},a.bounds=function(t){return Cp(t,n(tm)),tm.result()},a.centroid=function(t){return Cp(t,n(_m)),_m.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Ny):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new jm):new wm(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},geoAlbers:Qm,geoAlbersUsa:function(){var t,e,n,r,i,a,o=Qm(),s=Zm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Zm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e]}};function u(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,u}return u.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},u.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:vv,geoRotation:Vg,geoStream:Cp,geoTransform:function(t){return{stream:Bm(t)}},cluster:function(){var t=bv,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(_v,0)/t.length}(n),e.y=function(t){return 1+t.reduce(wv,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(u-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},hierarchy:kv,pack:function(){var t=null,e=1,n=1,r=Wv;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Vv(t)).eachAfter(Gv(r,.5)).eachBefore(Xv(1)):i.eachBefore(Vv(Hv)).eachAfter(Gv(Wv,1)).eachAfter(Gv(r,i.r/Math.min(e,n))).eachBefore(Xv(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Uv(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:qv(+t),i):r},i},packSiblings:function(t){return zv(t),t},packEnclose:Av,partition:function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Qv(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=$v(e),n):t},n.parentId=function(t){return arguments.length?(e=$v(t),n):e},n},tree:function(){var t=nb,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new sb(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new sb(r[i],i)),n.parent=e;return(o.parent=new sb(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var l=i,u=i,h=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)}));var d=l===u?1:t(l,u)/2,f=d-l.x,p=e/(u.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,d=c.m;s=ib(s),a=rb(a),s&&a;)c=rb(c),(o=ib(o)).a=e,(i=s.z+h-a.z-l+t(s._,a._))>0&&(ab(ob(s,e,r),e,i),l+=i,u+=i),h+=s.m,l+=a.m,d+=c.m,u+=o.m;s&&!ib(o)&&(o.t=s,o.m+=h-u),a&&!rb(c)&&(c.t=a,c.m+=l-d,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},treemap:function(){var t=hb,e=!1,n=1,r=1,i=[0],a=Wv,o=Wv,s=Wv,c=Wv,l=Wv;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Zv),t}function h(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,h=e.x1-n,d=e.y1-n;h=n-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=c)}var h=l[e],d=r/2+h,f=e+1,p=n-1;for(;f>>1;l[g]c-a){var v=(i*m+o*y)/r;t(e,f,y,i,a,v,c),t(f,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,f,y,i,a,o,b),t(f,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)},treemapDice:Qv,treemapSlice:cb,treemapSliceDice:function(t,e,n,r,i){(1&t.depth?cb:Qv)(t,e,n,r,i)},treemapSquarify:hb,treemapResquarify:db,interpolate:vl,interpolateArray:function(t,e){return(ul(e)?ll:hl)(t,e)},interpolateBasis:Kc,interpolateBasisClosed:Jc,interpolateDate:dl,interpolateDiscrete:function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},interpolateHue:function(t,e){var n=nl(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},interpolateNumber:fl,interpolateNumberArray:ll,interpolateObject:pl,interpolateRound:bl,interpolateString:ml,interpolateTransformCss:Ol,interpolateTransformSvg:Al,interpolateZoom:jl,interpolateRgb:al,interpolateRgbBasis:sl,interpolateRgbBasisClosed:cl,interpolateHsl:Bl,interpolateHslLong:Ll,interpolateLab:function(t,e){var n=il((t=Mc(t)).l,(e=Mc(e)).l),r=il(t.a,e.a),i=il(t.b,e.b),a=il(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}},interpolateHcl:Il,interpolateHclLong:Fl,interpolateCubehelix:Yl,interpolateCubehelixLong:zl,piecewise:function(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;es!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u},polygonLength:function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r0?i[e-1]:n[0],e=i?[a[i-1],r]:[a[e-1],a[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return t().domain([n,r]).range(o).unknown(e)},xb.apply(Ub(s),arguments)},scaleThreshold:function t(){var e,n=[.5],r=[0,1],i=1;function a(t){return t<=t?r[ja(n,t,0,i)]:e}return a.domain=function(t){return arguments.length?(n=Eb.call(t),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(t){return arguments.length?(r=Eb.call(t),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(n).range(r).unknown(e)},xb.apply(a,arguments)},scaleTime:function(){return xb.apply(Qx(U_,P_,T_,w_,v_,g_,d_,l_,Cw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return xb.apply(Qx(vw,gw,tw,Q_,G_,q_,d_,l_,Sw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function t(){var e=Ub(Kx()(Nb));return e.copy=function(){return Jx(e,t())},kb.apply(e,arguments)},scaleSequentialLog:function t(){var e=Zb(Kx()).domain([1,10]);return e.copy=function(){return Jx(e,t()).base(e.base())},kb.apply(e,arguments)},scaleSequentialPow:tk,scaleSequentialSqrt:function(){return tk.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var e=Jb(Kx());return e.copy=function(){return Jx(e,t()).constant(e.constant())},kb.apply(e,arguments)},scaleSequentialQuantile:function t(){var e=[],n=Nb;function r(t){if(!isNaN(t=+t))return n((ja(e,t)-1)/(e.length-1))}return r.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,a=t.length;i1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return vT.h=360*t-100,vT.s=1.5-1.5*e,vT.l=.8-.9*e,vT+""},interpolateWarm:yT,interpolateCool:mT,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,bT.r=255*(e=Math.sin(t))*e,bT.g=255*(e=Math.sin(t+_T))*e,bT.b=255*(e=Math.sin(t+wT))*e,bT+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:kT,interpolateMagma:TT,interpolateInferno:CT,interpolatePlasma:ET,create:function(t){return As(To(t).call(document.documentElement))},creator:To,local:Ds,matcher:Ao,mouse:Ls,namespace:wo,namespaces:_o,clientPoint:Bs,select:As,selectAll:function(t){return"string"==typeof t?new Ss([document.querySelectorAll(t)],[document.documentElement]):new Ss([null==t?[]:t],Es)},selection:Os,selector:Eo,selectorAll:Oo,style:qo,touch:Rs,touches:function(t,e){null==e&&(e=Ns().touches);for(var n=0,r=e?e.length:0,i=new Array(r);nd;if(s||(s=c=td()),h1e-12)if(p>IT-1e-12)s.moveTo(h*MT(d),h*NT(d)),s.arc(0,0,h,d,f,!g),u>1e-12&&(s.moveTo(u*MT(f),u*NT(f)),s.arc(0,0,u,f,d,g));else{var y,m,v=d,b=f,_=d,w=f,x=p,k=p,T=o.apply(this,arguments)/2,C=T>1e-12&&(r?+r.apply(this,arguments):BT(u*u+h*h)),E=jT(OT(h-u)/2,+n.apply(this,arguments)),S=E,O=E;if(C>1e-12){var A=PT(C/u*NT(T)),M=PT(C/h*NT(T));(x-=2*A)>1e-12?(_+=A*=g?1:-1,w-=A):(x=0,_=w=(d+f)/2),(k-=2*M)>1e-12?(v+=M*=g?1:-1,b-=M):(k=0,v=b=(d+f)/2)}var D=h*MT(v),j=h*NT(v),N=u*MT(w),B=u*NT(w);if(E>1e-12){var L,R=h*MT(b),I=h*NT(b),F=u*MT(_),P=u*NT(_);if(p1e-12?O>1e-12?(y=HT(F,P,D,j,h,O,g),m=HT(R,I,N,B,h,O,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),O1e-12&&x>1e-12?S>1e-12?(y=HT(N,B,R,I,u,-S,g),m=HT(D,j,F,P,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=f?(m-d*b)/f:0;s0?h*l:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:ST(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:ST(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ST(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ST(+t),o):a},o},areaRadial:oC,radialArea:oC,lineRadial:aC,radialLine:aC,pointRadial:sC,linkHorizontal:function(){return hC(dC)},linkVertical:function(){return hC(fC)},linkRadial:function(){var t=hC(pC);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},symbol:function(){var t=ST(gC),e=ST(64),n=null;function r(){var r;if(n||(n=r=td()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:ST(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:ST(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},symbols:jC,symbolCircle:gC,symbolCross:yC,symbolDiamond:bC,symbolSquare:TC,symbolStar:kC,symbolTriangle:EC,symbolWye:DC,curveBasisClosed:function(t){return new RC(t)},curveBasisOpen:function(t){return new IC(t)},curveBasis:function(t){return new LC(t)},curveBundle:PC,curveCardinalClosed:WC,curveCardinalOpen:HC,curveCardinal:UC,curveCatmullRomClosed:QC,curveCatmullRomOpen:JC,curveCatmullRom:XC,curveLinearClosed:function(t){return new tE(t)},curveLinear:GT,curveMonotoneX:function(t){return new aE(t)},curveMonotoneY:function(t){return new oE(t)},curveNatural:function(t){return new cE(t)},curveStep:function(t){return new uE(t,.5)},curveStepAfter:function(t){return new uE(t,1)},curveStepBefore:function(t){return new uE(t,0)},stack:function(){var t=ST([]),e=dE,n=hE,r=fE;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,l=s.length,u=new Array(l);for(a=0;a0){for(var n,r,i,a=0,o=t[0].length;a0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},stackOffsetNone:hE,stackOffsetSilhouette:function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o1&&n.name===e)return new zu([[t]],ph,e,+r);return null},interrupt:fu,voronoi:function(){var t=bE,e=_E,n=null;function r(r){return new tS(r.map((function(n,i){var a=[Math.round(t(n,i,r)/QE)*QE,Math.round(e(n,i,r)/QE)*QE];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:vE(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:vE(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},zoom:function(){var t,e,n=cS,r=lS,i=fS,a=hS,o=dS,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,u=jl,h=po("start","zoom","end"),d=500,f=0;function p(t){t.property("__zoom",uS).on("wheel.zoom",w).on("mousedown.zoom",x).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new rS(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new rS(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,d=u(l.invert(s).concat(c/l.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=c/e[2];t=new rS(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function w(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Ls(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],fu(this),t.start()}sS(),t.wheel=setTimeout(l,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function l(){t.wheel=null,t.end()}}function x(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=As(ys.view).on("mousemove.zoom",l,!0).on("mouseup.zoom",u,!0),a=Ls(this),o=ys.clientX,s=ys.clientY;Ps(ys.view),oS(),t.mouse=[a,this.__zoom.invert(a)],fu(this),t.start()}function l(){if(sS(),!t.moved){var e=ys.clientX-o,n=ys.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Ls(t.that),t.mouse[1]),t.extent,c))}function u(){r.on("mousemove.zoom mouseup.zoom",null),Ys(ys.view,t.moved),sS(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Ls(this),a=t.invert(e),o=t.k*(ys.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);sS(),l>0?As(this).transition().duration(l).call(v,s,e):As(this).call(p.transform,s)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=ys.touches,s=o.length,c=b(this,arguments,ys.changedTouches.length===s);for(oS(),r=0;r-1},OS=function(t,e){var n=this.__data__,r=kS(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function AS(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},PA=QS,YA=FA,zA=TA,UA={};UA["[object Float32Array]"]=UA["[object Float64Array]"]=UA["[object Int8Array]"]=UA["[object Int16Array]"]=UA["[object Int32Array]"]=UA["[object Uint8Array]"]=UA["[object Uint8ClampedArray]"]=UA["[object Uint16Array]"]=UA["[object Uint32Array]"]=!0,UA["[object Arguments]"]=UA["[object Array]"]=UA["[object ArrayBuffer]"]=UA["[object Boolean]"]=UA["[object DataView]"]=UA["[object Date]"]=UA["[object Error]"]=UA["[object Function]"]=UA["[object Map]"]=UA["[object Number]"]=UA["[object Object]"]=UA["[object RegExp]"]=UA["[object Set]"]=UA["[object String]"]=UA["[object WeakMap]"]=!1;var $A=function(t){return zA(t)&&YA(t.length)&&!!UA[PA(t)]};var WA=function(t){return function(e){return t(e)}},qA={exports:{}};!function(t,e){var n=RS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process,o=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=o}(qA,qA.exports);var HA=$A,VA=WA,GA=qA.exports,XA=GA&&GA.isTypedArray,ZA=XA?VA(XA):HA,QA=kA,KA=jA,JA=NA,tM=BA.exports,eM=IA,nM=ZA,rM=Object.prototype.hasOwnProperty;var iM=function(t,e){var n=JA(t),r=!n&&KA(t),i=!n&&!r&&tM(t),a=!n&&!r&&!i&&nM(t),o=n||r||i||a,s=o?QA(t.length,String):[],c=s.length;for(var l in t)!e&&!rM.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||eM(l,c))||s.push(l);return s},aM=Object.prototype;var oM=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||aM)};var sM=function(t,e){return function(n){return t(e(n))}},cM=sM(Object.keys,Object),lM=oM,uM=cM,hM=Object.prototype.hasOwnProperty;var dM=function(t){if(!lM(t))return uM(t);var e=[];for(var n in Object(t))hM.call(t,n)&&"constructor"!=n&&e.push(n);return e},fM=nO,pM=FA;var gM=function(t){return null!=t&&pM(t.length)&&!fM(t)},yM=iM,mM=dM,vM=gM;var bM=function(t){return vM(t)?yM(t):mM(t)},_M=xA,wM=bM;var xM=function(t,e){return t&&_M(e,wM(e),t)};var kM=KS,TM=oM,CM=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},EM=Object.prototype.hasOwnProperty;var SM=iM,OM=function(t){if(!kM(t))return CM(t);var e=TM(t),n=[];for(var r in t)("constructor"!=r||!e&&EM.call(t,r))&&n.push(r);return n},AM=gM;var MM=function(t){return AM(t)?SM(t,!0):OM(t)},DM=xA,jM=MM;var NM=function(t,e){return t&&DM(e,jM(e),t)},BM={exports:{}};!function(t,e){var n=PS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=o?o(n):new t.constructor(n);return t.copy(r),r}}(BM,BM.exports);var LM=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++ns))return!1;var l=a.get(t),u=a.get(e);if(l&&u)return l==e&&u==t;var h=-1,d=!0,f=2&n?new dN:void 0;for(a.set(t,e),a.set(e,t);++h0&&r(c)?n>1?t(c,n-1,r,i,a):TR(a,c):i||(a[a.length]=c)}return a};var SR=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},OR=Math.max;var AR=function(t,e,n){return e=OR(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=OR(r.length-e,0),o=Array(a);++i0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(jR),LR=Xj,RR=AR,IR=BR;var FR=function(t,e){return IR(RR(t,e,LR),t+"")};var PR=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a-1};var qR=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r=200){var l=e?null:JR(t);if(l)return tI(l);o=!1,i=KR,c=new XR}else c=e?[]:s;t:for(;++ra){var o=i;i=a,a=o}return i+""+a+""+(pI.isUndefined(r)?"\0":r)}function _I(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function wI(t,e){return bI(t,e.v,e.w,e.name)}yI.prototype._nodeCount=0,yI.prototype._edgeCount=0,yI.prototype.isDirected=function(){return this._isDirected},yI.prototype.isMultigraph=function(){return this._isMultigraph},yI.prototype.isCompound=function(){return this._isCompound},yI.prototype.setGraph=function(t){return this._label=t,this},yI.prototype.graph=function(){return this._label},yI.prototype.setDefaultNodeLabel=function(t){return pI.isFunction(t)||(t=pI.constant(t)),this._defaultNodeLabelFn=t,this},yI.prototype.nodeCount=function(){return this._nodeCount},yI.prototype.nodes=function(){return pI.keys(this._nodes)},yI.prototype.sources=function(){var t=this;return pI.filter(this.nodes(),(function(e){return pI.isEmpty(t._in[e])}))},yI.prototype.sinks=function(){var t=this;return pI.filter(this.nodes(),(function(e){return pI.isEmpty(t._out[e])}))},yI.prototype.setNodes=function(t,e){var n=arguments,r=this;return pI.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},yI.prototype.setNode=function(t,e){return pI.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},yI.prototype.node=function(t){return this._nodes[t]},yI.prototype.hasNode=function(t){return pI.has(this._nodes,t)},yI.prototype.removeNode=function(t){var e=this;if(pI.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],pI.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),pI.each(pI.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],pI.each(pI.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},yI.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(pI.isUndefined(e))e="\0";else{for(var n=e+="";!pI.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},yI.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},yI.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},yI.prototype.children=function(t){if(pI.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return pI.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},yI.prototype.predecessors=function(t){var e=this._preds[t];if(e)return pI.keys(e)},yI.prototype.successors=function(t){var e=this._sucs[t];if(e)return pI.keys(e)},yI.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return pI.union(e,this.successors(t))},yI.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},yI.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;pI.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),pI.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(r[t]=a,a):a in r?r[a]:i(a)}return this._isCompound&&pI.each(e.nodes(),(function(t){e.setParent(t,i(t))})),e},yI.prototype.setDefaultEdgeLabel=function(t){return pI.isFunction(t)||(t=pI.constant(t)),this._defaultEdgeLabelFn=t,this},yI.prototype.edgeCount=function(){return this._edgeCount},yI.prototype.edges=function(){return pI.values(this._edgeObjs)},yI.prototype.setPath=function(t,e){var n=this,r=arguments;return pI.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},yI.prototype.setEdge=function(){var t,e,n,r,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,pI.isUndefined(n)||(n=""+n);var o=bI(this._isDirected,t,e,n);if(pI.has(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!pI.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(t,e,n);var s=_I(this._isDirected,t,e,n);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[o]=s,mI(this._preds[e],t),mI(this._sucs[t],e),this._in[e][o]=s,this._out[t][o]=s,this._edgeCount++,this},yI.prototype.edge=function(t,e,n){var r=1===arguments.length?wI(this._isDirected,arguments[0]):bI(this._isDirected,t,e,n);return this._edgeLabels[r]},yI.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?wI(this._isDirected,arguments[0]):bI(this._isDirected,t,e,n);return pI.has(this._edgeLabels,r)},yI.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?wI(this._isDirected,arguments[0]):bI(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],vI(this._preds[e],t),vI(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},yI.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=pI.values(n);return e?pI.filter(r,(function(t){return t.v===e})):r}},yI.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=pI.values(n);return e?pI.filter(r,(function(t){return t.w===e})):r}},yI.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};var xI={Graph:gI,version:"2.1.8"},kI=fI,TI=gI,CI={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:EI(t),edges:SI(t)};kI.isUndefined(t.graph())||(e.value=kI.clone(t.graph()));return e},read:function(t){var e=new TI(t.options).setGraph(t.value);return kI.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),kI.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function EI(t){return kI.map(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),i={v:e};return kI.isUndefined(n)||(i.value=n),kI.isUndefined(r)||(i.parent=r),i}))}function SI(t){return kI.map(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return kI.isUndefined(e.name)||(r.name=e.name),kI.isUndefined(n)||(r.value=n),r}))}var OI=fI,AI=function(t){var e,n={},r=[];function i(r){OI.has(n,r)||(n[r]=!0,e.push(r),OI.each(t.successors(r),i),OI.each(t.predecessors(r),i))}return OI.each(t.nodes(),(function(t){e=[],i(t),e.length&&r.push(e)})),r};var MI=fI,DI=jI;function jI(){this._arr=[],this._keyIndices={}}jI.prototype.size=function(){return this._arr.length},jI.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},jI.prototype.has=function(t){return MI.has(this._keyIndices,t)},jI.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},jI.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},jI.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!MI.has(n,t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1},jI.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},jI.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},jI.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].priority0&&(i=s.removeMin(),(a=o[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return o}(t,String(e),n||LI,r||function(e){return t.outEdges(e)})},LI=fI.constant(1);var RI=BI,II=fI,FI=function(t,e,n){return II.transform(t.nodes(),(function(r,i){r[i]=RI(t,i,e,n)}),{})};var PI=fI,YI=function(t){var e=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:e,index:e++};if(n.push(o),t.successors(o).forEach((function(t){PI.has(r,t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(a(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var c,l=[];do{c=n.pop(),r[c].onStack=!1,l.push(c)}while(o!==c);i.push(l)}}return t.nodes().forEach((function(t){PI.has(r,t)||a(t)})),i};var zI=fI,UI=YI,$I=function(t){return zI.filter(UI(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var WI=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s0;){if(n=a.removeMin(),nF.has(i,n))r.setEdge(n,i[n]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(n).forEach(o)}return r},tarjan:YI,topsort:VI},version:xI.version};try{aF=oF}catch(oX){}aF||(aF=window.graphlib);var sF=aF,cF=Pj;var lF=function(t){return cF(t,5)},uF=yS,hF=gM,dF=IA,fF=KS;var pF=function(t,e,n){if(!fF(n))return!1;var r=typeof e;return!!("number"==r?hF(n)&&dF(e,n.length):"string"==r&&e in n)&&uF(n[e],t)},gF=FR,yF=yS,mF=pF,vF=MM,bF=Object.prototype,_F=bF.hasOwnProperty,wF=gF((function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&mF(e[0],e[1],i)&&(r=1);++n-1?i[a?e[o]:o]:void 0}},EF=/\s/;var SF=function(t){for(var e=t.length;e--&&EF.test(t.charAt(e)););return e},OF=/^\s+/;var AF=function(t){return t?t.slice(0,SF(t)+1).replace(OF,""):t},MF=KS,DF=KN,jF=/^[-+]0x[0-9a-f]+$/i,NF=/^0b[01]+$/i,BF=/^0o[0-7]+$/i,LF=parseInt;var RF=function(t){if("number"==typeof t)return t;if(DF(t))return NaN;if(MF(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=MF(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=AF(t);var n=NF.test(t);return n||BF.test(t)?LF(t.slice(2),n?2:8):jF.test(t)?NaN:+t};var IF=function(t){return t?Infinity===(t=RF(t))||-Infinity===t?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},FF=IF;var PF=PR,YF=rL,zF=function(t){var e=FF(t),n=e%1;return e==e?n?e-n:e:0},UF=Math.max;var $F=CF((function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:zF(n);return i<0&&(i=UF(r+i,0)),PF(t,YF(e),i)})),WF=ER;var qF=function(t){return(null==t?0:t.length)?WF(t,1):[]},HF=$j,VF=Qj,GF=MM;var XF=function(t,e){return null==t?t:HF(t,VF(e),GF)};var ZF=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},QF=gA,KF=Hj,JF=rL;var tP=function(t,e){var n={};return e=JF(e),KF(t,(function(t,r,i){QF(n,r,e(t,r,i))})),n},eP=KN;var nP=function(t,e,n){for(var r=-1,i=t.length;++re},aP=Xj;var oP=function(t){return t&&t.length?rP(t,aP,iP):void 0},sP=gA,cP=yS;var lP=function(t,e,n){(void 0!==n&&!cP(t[e],n)||void 0===n&&!(e in t))&&sP(t,e,n)},uP=QS,hP=VM,dP=TA,fP=Function.prototype,pP=Object.prototype,gP=fP.toString,yP=pP.hasOwnProperty,mP=gP.call(Object);var vP=function(t){if(!dP(t)||"[object Object]"!=uP(t))return!1;var e=hP(t);if(null===e)return!0;var n=yP.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&gP.call(n)==mP};var bP=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},_P=xA,wP=MM;var xP=lP,kP=BM.exports,TP=UD,CP=LM,EP=ej,SP=jA,OP=NA,AP=rI,MP=BA.exports,DP=nO,jP=KS,NP=vP,BP=ZA,LP=bP,RP=function(t){return _P(t,wP(t))};var IP=uA,FP=lP,PP=$j,YP=function(t,e,n,r,i,a,o){var s=LP(t,n),c=LP(e,n),l=o.get(c);if(l)xP(t,n,l);else{var u=a?a(s,c,n+"",t,e,o):void 0,h=void 0===u;if(h){var d=OP(c),f=!d&&MP(c),p=!d&&!f&&BP(c);u=c,d||f||p?OP(s)?u=s:AP(s)?u=CP(s):f?(h=!1,u=kP(c,!0)):p?(h=!1,u=TP(c,!0)):u=[]:NP(c)||SP(c)?(u=s,SP(s)?u=RP(s):jP(s)&&!DP(s)||(u=EP(c))):h=!1}h&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),xP(t,n,u)}},zP=KS,UP=MM,$P=bP;var WP=FR,qP=pF;var HP=function t(e,n,r,i,a){e!==n&&PP(n,(function(o,s){if(a||(a=new IP),zP(o))YP(e,n,s,r,t,i,a);else{var c=i?i($P(e,s),o,s+"",e,n,a):void 0;void 0===c&&(c=o),FP(e,s,c)}}),UP)},VP=function(t){return WP((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&qP(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++re||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t=s?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},LY=Xj,RY=NA;var IY=ER,FY=function(t,e,n){e=e.length?OY(e,(function(t){return RY(t)?function(e){return AY(e,1===t.length?t[0]:t)}:t})):[LY];var r=-1;e=OY(e,NY(MY));var i=DY(t,(function(t,n,i){return{criteria:OY(e,(function(e){return e(t)})),index:++r,value:t}}));return jY(i,(function(t,e){return BY(t,e,n)}))},PY=pF,YY=FR((function(t,e){if(null==t)return[];var n=e.length;return n>1&&PY(t,e[0],e[1])?e=[]:n>2&&PY(e[0],e[1],e[2])&&(e=[e[0]]),FY(t,IY(e,1),[])})),zY=mB,UY=0;var $Y=function(t){var e=++UY;return zY(t)+e};var WY=bA,qY=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r0;--s)if(r=e[s].dequeue()){i=i.concat(iz(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return JY.flatten(JY.map(r,(function(e){return t.outEdges(e.v,e.w)})),!0)},rz=JY.constant(1);function iz(t,e,n,r,i){var a=i?[]:void 0;return JY.forEach(t.inEdges(r.v),(function(r){var o=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,az(e,n,s)})),JY.forEach(t.outEdges(r.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,az(e,n,o)})),t.removeNode(r.v),a}function az(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var oz=GY,sz=nz,cz={run:function(t){var e="greedy"===t.graph().acyclicer?sz(t,(n=t,function(t){return n.edge(t).weight})):function(t){var e=[],n={},r={};function i(a){oz.has(r,a)||(r[a]=!0,n[a]=!0,oz.forEach(t.outEdges(a),(function(t){oz.has(n,t.w)?e.push(t):i(t.w)})),delete n[a])}return oz.forEach(t.nodes(),i),e}(t);var n;oz.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,oz.uniqueId("rev"))}))},undo:function(t){oz.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}};var lz=GY,uz=sF.Graph,hz={addDummyNode:dz,simplify:function(t){var e=(new uz).setGraph(t.graph());return lz.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),lz.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new uz({multigraph:t.isMultigraph()}).setGraph(t.graph());return lz.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),lz.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=lz.map(t.nodes(),(function(e){var n={};return lz.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return lz.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=lz.map(t.nodes(),(function(e){var n={};return lz.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return lz.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=lz.map(lz.range(fz(t)+1),(function(){return[]}));return lz.forEach(t.nodes(),(function(n){var r=t.node(n),i=r.rank;lz.isUndefined(i)||(e[i][r.order]=n)})),e},normalizeRanks:function(t){var e=lz.min(lz.map(t.nodes(),(function(e){return t.node(e).rank})));lz.forEach(t.nodes(),(function(n){var r=t.node(n);lz.has(r,"rank")&&(r.rank-=e)}))},removeEmptyRanks:function(t){var e=lz.min(lz.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];lz.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var r=0,i=t.graph().nodeRankFactor;lz.forEach(n,(function(e,n){lz.isUndefined(e)&&n%i!=0?--r:r&&lz.forEach(e,(function(e){t.node(e).rank+=r}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return dz(t,"border",i,e)},maxRank:fz,partition:function(t,e){var n={lhs:[],rhs:[]};return lz.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=lz.now();try{return e()}finally{console.log(t+" time: "+(lz.now()-n)+"ms")}},notime:function(t,e){return e()}};function dz(t,e,n,r){var i;do{i=lz.uniqueId(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function fz(t){return lz.max(lz.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!lz.isUndefined(n))return n})))}var pz=GY,gz=hz,yz={run:function(t){t.graph().dummyChains=[],pz.forEach(t.edges(),(function(e){!function(t,e){var n,r,i,a=e.v,o=t.node(a).rank,s=e.w,c=t.node(s).rank,l=e.name,u=t.edge(e),h=u.labelRank;if(c===o+1)return;for(t.removeEdge(e),i=0,++o;oo.lim&&(s=o,c=!0);var l=Ez.filter(e.edges(),(function(e){return c===Uz(t,t.node(e.v),s)&&c!==Uz(t,t.node(e.w),s)}));return Ez.minBy(l,(function(t){return Oz(e,t)}))}function zz(t,e,n,r){var i=n.v,a=n.w;t.removeEdge(i,a),t.setEdge(r.v,r.w,{}),Iz(t),Lz(t,e),function(t,e){var n=Ez.find(t.nodes(),(function(t){return!e.node(t).parent})),r=Mz(t,n);r=r.slice(1),Ez.forEach(r,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function Uz(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}Bz.initLowLimValues=Iz,Bz.initCutValues=Lz,Bz.calcCutValue=Rz,Bz.leaveEdge=Pz,Bz.enterEdge=Yz,Bz.exchangeEdges=zz;var $z=vz.longestPath,Wz=xz,qz=Nz,Hz=function(t){switch(t.graph().ranker){case"network-simplex":Gz(t);break;case"tight-tree":!function(t){$z(t),Wz(t)}(t);break;case"longest-path":Vz(t);break;default:Gz(t)}};var Vz=$z;function Gz(t){qz(t)}var Xz=GY,Zz=function(t){var e=function(t){var e={},n=0;function r(i){var a=n;Xz.forEach(t.children(i),r),e[i]={low:a,lim:n++}}return Xz.forEach(t.children(),r),e}(t);Xz.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank0;)e%2&&(n+=s[e+1]),s[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}var yU=GY;var mU=GY;var vU=GY,bU=hz;function _U(t,e,n){for(var r;e.length&&(r=vU.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}var wU=GY,xU=function(t,e){return yU.map(e,(function(e){var n=t.inEdges(e);if(n.length){var r=yU.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}}))},kU=function(t,e){var n={};return mU.forEach(t,(function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};mU.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)})),mU.forEach(e.edges(),(function(t){var e=n[t.v],r=n[t.w];mU.isUndefined(e)||mU.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(mU.isUndefined(e.barycenter)||mU.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var i=t.pop();e.push(i),mU.forEach(i.in.reverse(),n(i)),mU.forEach(i.out,r(i))}return mU.map(mU.filter(e,(function(t){return!t.merged})),(function(t){return mU.pick(t,["vs","i","barycenter","weight"])}))}(mU.filter(n,(function(t){return!t.indegree})))},TU=function(t,e){var n=bU.partition(t,(function(t){return vU.has(t,"barycenter")})),r=n.lhs,i=vU.sortBy(n.rhs,(function(t){return-t.i})),a=[],o=0,s=0,c=0;r.sort((l=!!e,function(t,e){return t.barycentere.barycenter?1:l?e.i-t.i:t.i-e.i})),c=_U(a,i,c),vU.forEach(r,(function(t){c+=t.vs.length,a.push(t.vs),o+=t.barycenter*t.weight,s+=t.weight,c=_U(a,i,c)}));var l;var u={vs:vU.flatten(a,!0)};s&&(u.barycenter=o/s,u.weight=s);return u},CU=function t(e,n,r,i){var a=e.children(n),o=e.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=wU.filter(a,(function(t){return t!==s&&t!==c})));var u=xU(e,a);wU.forEach(u,(function(n){if(e.children(n.v).length){var a=t(e,n.v,r,i);l[n.v]=a,wU.has(a,"barycenter")&&(o=n,s=a,wU.isUndefined(o.barycenter)?(o.barycenter=s.barycenter,o.weight=s.weight):(o.barycenter=(o.barycenter*o.weight+s.barycenter*s.weight)/(o.weight+s.weight),o.weight+=s.weight))}var o,s}));var h=kU(u,r);!function(t,e){wU.forEach(t,(function(t){t.vs=wU.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(h,l);var d=TU(h,i);if(s&&(d.vs=wU.flatten([s,d.vs,c],!0),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(c)[0]);wU.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d};var EU=GY,SU=sF.Graph;var OU=GY;var AU=GY,MU=dU,DU=pU,jU=CU,NU=function(t,e,n){var r=function(t){var e;for(;t.hasNode(e=EU.uniqueId("_root")););return e}(t),i=new SU({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(e){return t.node(e)}));return EU.forEach(t.nodes(),(function(a){var o=t.node(a),s=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),EU.forEach(t[n](a),(function(e){var n=e.v===a?e.w:e.v,r=i.edge(n,a),o=EU.isUndefined(r)?0:r.weight;i.setEdge(n,a,{weight:t.edge(e).weight+o})})),EU.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))})),i},BU=function(t,e,n){var r,i={};OU.forEach(n,(function(n){for(var a,o,s=t.parent(n);s;){if((a=t.parent(s))?(o=i[a],i[a]=s):(o=r,r=s),o&&o!==s)return void e.setEdge(o,s);s=a}}))},LU=sF.Graph,RU=hz,IU=function(t){var e=RU.maxRank(t),n=FU(t,AU.range(1,e+1),"inEdges"),r=FU(t,AU.range(e-1,-1,-1),"outEdges"),i=MU(t);YU(t,i);for(var a,o=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){PU(s%2?n:r,s%4>=2),i=RU.buildLayerMatrix(t);var l=DU(t,i);lo)&&VU(n,e,s)}))}))}return zU.reduce(e,(function(e,n){var i,a=-1,o=0;return zU.forEach(n,(function(s,c){if("border"===t.node(s).dummy){var l=t.predecessors(s);l.length&&(i=t.node(l[0]).order,r(n,o,c,a,i),o=c,a=i)}r(n,o,n.length,i,e.length)})),n})),n}function VU(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function GU(t,e,n){if(e>n){var r=e;e=n,n=r}return zU.has(t[e],n)}function XU(t,e,n,r){var i={},a={},o={};return zU.forEach(e,(function(t){zU.forEach(t,(function(t,e){i[t]=t,a[t]=t,o[t]=e}))})),zU.forEach(e,(function(t){var e=-1;zU.forEach(t,(function(t){var s=r(t);if(s.length)for(var c=((s=zU.sortBy(s,(function(t){return o[t]}))).length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var h=s[l];a[t]===t&&e0}var z$=function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,d=i*n.x+o*n.y+c,f=i*r.x+o*r.y+c,0!==d&&0!==f&&Y$(d,f))return;if(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*t.x+s*t.y+l,h=a*e.x+s*e.y+l,0!==u&&0!==h&&Y$(u,h))return;if(0===(p=i*s-a*o))return;return g=Math.abs(p/2),{x:(y=o*l-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*l)<0?(y-g)/p:(y+g)/p}},U$=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}));for(var c=r-t.width/2-o,l=i-t.height/2-s,u=0;u1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return aMath.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}};var W$,q$={node:R$,circle:P$,ellipse:I$,polygon:U$,rect:$$};try{W$={defaults:wF,each:rN,isFunction:nO,isPlainObject:vP,pick:bY,has:dL,range:CY,uniqueId:$Y}}catch(oX){}W$||(W$=window._);var H$,V$=W$;if(!H$)try{H$=pS}catch(oX){}H$||(H$=window.d3);var G$=V$,X$={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return Q$(t.v)+":"+Q$(t.w)+":"+Q$(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(G$.isPlainObject(n)){var r=n.transition;if(G$.isFunction(r))return r(t)}return t}};var Z$=/:/g;function Q$(t){return t?String(t).replace(Z$,"\\:"):""}var K$=X$;var J$=X$,tW=function(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":r.insert(i);break;case"object":r.insert((function(){return i}));break;default:r.html(i)}J$.applyStyle(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var a=r.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n};var eW=X$;var nW=function(t,e){for(var n=t.append("text"),r=function(t){for(var e,n="",r=!1,i=0;i1?n-1:0),i=1;i/gm),Iq=iq(/^data-[\-\w.\u00B7-\uFFFF]/),Fq=iq(/^aria-[\-\w]+$/),Pq=iq(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yq=iq(/^(?:\w+script|data):/i),zq=iq(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Uq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function $q(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:Wq(),n=function(e){return t(e)};if(n.version="2.3.1",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,h=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,d=e.Text,f=e.Comment,p=e.DOMParser,g=e.trustedTypes,y=c.prototype,m=kq(y,"cloneNode"),v=kq(y,"nextSibling"),b=kq(y,"childNodes"),_=kq(y,"parentNode");if("function"==typeof o){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var x=qq(g,r),k=x&&et?x.createHTML(""):"",T=i,C=T.implementation,E=T.createNodeIterator,S=T.createDocumentFragment,O=T.getElementsByTagName,A=r.importNode,M={};try{M=xq(i).documentMode?i.documentMode:{}}catch(Rt){}var D={};n.isSupported="function"==typeof _&&C&&void 0!==C.createHTMLDocument&&9!==M;var j=Lq,N=Rq,B=Iq,L=Fq,R=Yq,I=zq,F=Pq,P=null,Y=wq({},[].concat($q(Tq),$q(Cq),$q(Eq),$q(Oq),$q(Mq))),z=null,U=wq({},[].concat($q(Dq),$q(jq),$q(Nq),$q(Bq))),$=null,W=null,q=!0,H=!0,V=!1,G=!1,X=!1,Z=!1,Q=!1,K=!1,J=!1,tt=!0,et=!1,nt=!0,rt=!0,it=!1,at={},ot=null,st=wq({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ct=null,lt=wq({},["audio","video","img","source","image","track"]),ut=null,ht=wq({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",gt=pt,yt=!1,mt=null,vt=i.createElement("form"),bt=function(t){mt&&mt===t||(t&&"object"===(void 0===t?"undefined":Uq(t))||(t={}),t=xq(t),P="ALLOWED_TAGS"in t?wq({},t.ALLOWED_TAGS):Y,z="ALLOWED_ATTR"in t?wq({},t.ALLOWED_ATTR):U,ut="ADD_URI_SAFE_ATTR"in t?wq(xq(ht),t.ADD_URI_SAFE_ATTR):ht,ct="ADD_DATA_URI_TAGS"in t?wq(xq(lt),t.ADD_DATA_URI_TAGS):lt,ot="FORBID_CONTENTS"in t?wq({},t.FORBID_CONTENTS):st,$="FORBID_TAGS"in t?wq({},t.FORBID_TAGS):{},W="FORBID_ATTR"in t?wq({},t.FORBID_ATTR):{},at="USE_PROFILES"in t&&t.USE_PROFILES,q=!1!==t.ALLOW_ARIA_ATTR,H=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=t.SAFE_FOR_TEMPLATES||!1,X=t.WHOLE_DOCUMENT||!1,K=t.RETURN_DOM||!1,J=t.RETURN_DOM_FRAGMENT||!1,tt=!1!==t.RETURN_DOM_IMPORT,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,it=t.IN_PLACE||!1,F=t.ALLOWED_URI_REGEXP||F,gt=t.NAMESPACE||pt,G&&(H=!1),J&&(K=!0),at&&(P=wq({},[].concat($q(Mq))),z=[],!0===at.html&&(wq(P,Tq),wq(z,Dq)),!0===at.svg&&(wq(P,Cq),wq(z,jq),wq(z,Bq)),!0===at.svgFilters&&(wq(P,Eq),wq(z,jq),wq(z,Bq)),!0===at.mathMl&&(wq(P,Oq),wq(z,Nq),wq(z,Bq))),t.ADD_TAGS&&(P===Y&&(P=xq(P)),wq(P,t.ADD_TAGS)),t.ADD_ATTR&&(z===U&&(z=xq(z)),wq(z,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&wq(ut,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(ot===st&&(ot=xq(ot)),wq(ot,t.FORBID_CONTENTS)),rt&&(P["#text"]=!0),X&&wq(P,["html","head","body"]),P.table&&(wq(P,["tbody"]),delete $.tbody),rq&&rq(t),mt=t)},_t=wq({},["mi","mo","mn","ms","mtext"]),wt=wq({},["foreignobject","desc","title","annotation-xml"]),xt=wq({},Cq);wq(xt,Eq),wq(xt,Sq);var kt=wq({},Oq);wq(kt,Aq);var Tt=function(t){var e=_(t);e&&e.tagName||(e={namespaceURI:pt,tagName:"template"});var n=fq(t.tagName),r=fq(e.tagName);if(t.namespaceURI===ft)return e.namespaceURI===pt?"svg"===n:e.namespaceURI===dt?"svg"===n&&("annotation-xml"===r||_t[r]):Boolean(xt[n]);if(t.namespaceURI===dt)return e.namespaceURI===pt?"math"===n:e.namespaceURI===ft?"math"===n&&wt[r]:Boolean(kt[n]);if(t.namespaceURI===pt){if(e.namespaceURI===ft&&!wt[r])return!1;if(e.namespaceURI===dt&&!_t[r])return!1;var i=wq({},["title","style","font","a","script"]);return!kt[n]&&(i[n]||!xt[n])}return!1},Ct=function(t){dq(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Rt){try{t.outerHTML=k}catch(e){t.remove()}}},Et=function(t,e){try{dq(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(Rt){dq(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(K||J)try{Ct(e)}catch(Rt){}else try{e.setAttribute(t,"")}catch(Rt){}},St=function(t){var e=void 0,n=void 0;if(Q)t=""+t;else{var r=pq(t,/^[\r\n\t ]+/);n=r&&r[0]}var a=x?x.createHTML(t):t;if(gt===pt)try{e=(new p).parseFromString(a,"text/html")}catch(Rt){}if(!e||!e.documentElement){e=C.createDocument(gt,"template",null);try{e.documentElement.innerHTML=yt?"":a}catch(Rt){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),gt===pt?O.call(e,X?"html":"body")[0]:X?e.documentElement:o},Ot=function(t){return E.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},At=function(t){return!(t instanceof d||t instanceof f)&&!("string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof h&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore)},Mt=function(t){return"object"===(void 0===s?"undefined":Uq(s))?t instanceof s:t&&"object"===(void 0===t?"undefined":Uq(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Dt=function(t,e,r){D[t]&&uq(D[t],(function(t){t.call(n,e,r,mt)}))},jt=function(t){var e=void 0;if(Dt("beforeSanitizeElements",t,null),At(t))return Ct(t),!0;if(pq(t.nodeName,/[\u0080-\uFFFF]/))return Ct(t),!0;var r=fq(t.nodeName);if(Dt("uponSanitizeElement",t,{tagName:r,allowedTags:P}),!Mt(t.firstElementChild)&&(!Mt(t.content)||!Mt(t.content.firstElementChild))&&vq(/<[/\w]/g,t.innerHTML)&&vq(/<[/\w]/g,t.textContent))return Ct(t),!0;if("select"===r&&vq(/