0x1bb76db0…7c83sent to0x1353fd9d…e4e8·#17,118,222·view on Etherscan
/*! For license information please see bundle.js.LICENSE.txt */
(()=>{"use strict";var e={187:e=>{function i(e,i,n){n=n||2;var t,r,w,s,h,c,$,C=i&&i.length,y=C?i[0]*n:e.length,p=o(e,0,y,n,!0),u=[];if(!p||p.next===p.prev)return u;if(C&&(p=function(e,i,n,l){var t,r,w,s=[];for(t=0,r=i.length;t<r;t++)(w=o(e,i[t]*l,t<r-1?i[t+1]*l:e.length,l,!1))===w.next&&(w.steiner=!0),s.push(g(w));for(s.sort(a),t=0;t<s.length;t++)n=d(s[t],n);return n}(e,i,p,n)),e.length>80*n){t=w=e[0],r=s=e[1];for(var f=n;f<y;f+=n)(h=e[f])<t&&(t=h),(c=e[f+1])<r&&(r=c),h>w&&(w=h),c>s&&(s=c);$=0!==($=Math.max(w-t,s-r))?32767/$:0}return l(p,u,n,t,r,$,0),u}function o(e,i,o,n,l){var t,r;if(l===T(e,i,o,n)>0)for(t=i;t<o;t+=n)r=m(t,e[t],e[t+1],r);else for(t=o-n;t>=i;t-=n)r=m(t,e[t],e[t+1],r);return r&&p(r,r.next)&&(B(r),r=r.next),r}function n(e,i){if(!e)return e;i||(i=e);var o,n=e;do{if(o=!1,n.steiner||!p(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(B(n),(n=i=n.prev)===n.next)break;o=!0}}while(o||n!==i);return i}function l(e,i,o,a,d,h,g){if(e){!g&&h&&function(e,i,o,n){var l=e;do{0===l.z&&(l.z=c(l.x,l.y,i,o,n)),l.prevZ=l.prev,l.nextZ=l.next,l=l.next}while(l!==e);l.prevZ.nextZ=null,l.prevZ=null,function(e){var i,o,n,l,t,r,w,s,a=1;do{for(o=e,e=null,t=null,r=0;o;){for(r++,n=o,w=0,i=0;i<a&&(w++,n=n.nextZ);i++);for(s=a;w>0||s>0&&n;)0!==w&&(0===s||!n||o.z<=n.z)?(l=o,o=o.nextZ,w--):(l=n,n=n.nextZ,s--),t?t.nextZ=l:e=l,l.prevZ=t,t=l;o=n}t.nextZ=null,a*=2}while(r>1)}(l)}(e,a,d,h);for(var $,C,y=e;e.prev!==e.next;)if($=e.prev,C=e.next,h?r(e,a,d,h):t(e))i.push($.i/o|0),i.push(e.i/o|0),i.push(C.i/o|0),B(e),e=C.next,y=C.next;else if((e=C)===y){g?1===g?l(e=w(n(e),i,o),i,o,a,d,h,2):2===g&&s(e,i,o,a,d,h):l(n(e),i,o,a,d,h,1);break}}}function t(e){var i=e.prev,o=e,n=e.next;if(y(i,o,n)>=0)return!1;for(var l=i.x,t=o.x,r=n.x,w=i.y,s=o.y,a=n.y,d=l<t?l<r?l:r:t<r?t:r,h=w<s?w<a?w:a:s<a?s:a,c=l>t?l>r?l:r:t>r?t:r,g=w>s?w>a?w:a:s>a?s:a,C=n.next;C!==i;){if(C.x>=d&&C.x<=c&&C.y>=h&&C.y<=g&&$(l,w,t,s,r,a,C.x,C.y)&&y(C.prev,C,C.next)>=0)return!1;C=C.next}return!0}function r(e,i,o,n){var l=e.prev,t=e,r=e.next;if(y(l,t,r)>=0)return!1;for(var w=l.x,s=t.x,a=r.x,d=l.y,h=t.y,g=r.y,C=w<s?w<a?w:a:s<a?s:a,p=d<h?d<g?d:g:h<g?h:g,u=w>s?w>a?w:a:s>a?s:a,f=d>h?d>g?d:g:h>g?h:g,S=c(C,p,i,o,n),k=c(u,f,i,o,n),F=e.prevZ,m=e.nextZ;F&&F.z>=S&&m&&m.z<=k;){if(F.x>=C&&F.x<=u&&F.y>=p&&F.y<=f&&F!==l&&F!==r&&$(w,d,s,h,a,g,F.x,F.y)&&y(F.prev,F,F.next)>=0)return!1;if(F=F.prevZ,m.x>=C&&m.x<=u&&m.y>=p&&m.y<=f&&m!==l&&m!==r&&$(w,d,s,h,a,g,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;F&&F.z>=S;){if(F.x>=C&&F.x<=u&&F.y>=p&&F.y<=f&&F!==l&&F!==r&&$(w,d,s,h,a,g,F.x,F.y)&&y(F.prev,F,F.next)>=0)return!1;F=F.prevZ}for(;m&&m.z<=k;){if(m.x>=C&&m.x<=u&&m.y>=p&&m.y<=f&&m!==l&&m!==r&&$(w,d,s,h,a,g,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function w(e,i,o){var l=e;do{var t=l.prev,r=l.next.next;!p(t,r)&&u(t,l,l.next,r)&&k(t,r)&&k(r,t)&&(i.push(t.i/o|0),i.push(l.i/o|0),i.push(r.i/o|0),B(l),B(l.next),l=e=r),l=l.next}while(l!==e);return n(l)}function s(e,i,o,t,r,w){var s=e;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&C(s,a)){var d=F(s,a);return s=n(s,s.next),d=n(d,d.next),l(s,i,o,t,r,w,0),void l(d,i,o,t,r,w,0)}a=a.next}s=s.next}while(s!==e)}function a(e,i){return e.x-i.x}function d(e,i){var o=function(e,i){var o,n=i,l=e.x,t=e.y,r=-1/0;do{if(t<=n.y&&t>=n.next.y&&n.next.y!==n.y){var w=n.x+(t-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(w<=l&&w>r&&(r=w,o=n.x<n.next.x?n:n.next,w===l))return o}n=n.next}while(n!==i);if(!o)return null;var s,a=o,d=o.x,c=o.y,g=1/0;n=o;do{l>=n.x&&n.x>=d&&l!==n.x&&$(t<c?l:r,t,d,c,t<c?r:l,t,n.x,n.y)&&(s=Math.abs(t-n.y)/(l-n.x),k(n,e)&&(s<g||s===g&&(n.x>o.x||n.x===o.x&&h(o,n)))&&(o=n,g=s)),n=n.next}while(n!==a);return o}(e,i);if(!o)return i;var l=F(o,e);return n(l,l.next),n(o,o.next)}function h(e,i){return y(e.prev,e,i.prev)<0&&y(i.next,e,e.next)<0}function c(e,i,o,n,l){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-o)*l|0)|e<<8))|e<<4))|e<<2))|e<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-n)*l|0)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function g(e){var i=e,o=e;do{(i.x<o.x||i.x===o.x&&i.y<o.y)&&(o=i),i=i.next}while(i!==e);return o}function $(e,i,o,n,l,t,r,w){return(l-r)*(i-w)>=(e-r)*(t-w)&&(e-r)*(n-w)>=(o-r)*(i-w)&&(o-r)*(t-w)>=(l-r)*(n-w)}function C(e,i){return e.next.i!==i.i&&e.prev.i!==i.i&&!function(e,i){var o=e;do{if(o.i!==e.i&&o.next.i!==e.i&&o.i!==i.i&&o.next.i!==i.i&&u(o,o.next,e,i))return!0;o=o.next}while(o!==e);return!1}(e,i)&&(k(e,i)&&k(i,e)&&function(e,i){var o=e,n=!1,l=(e.x+i.x)/2,t=(e.y+i.y)/2;do{o.y>t!=o.next.y>t&&o.next.y!==o.y&&l<(o.next.x-o.x)*(t-o.y)/(o.next.y-o.y)+o.x&&(n=!n),o=o.next}while(o!==e);return n}(e,i)&&(y(e.prev,e,i.prev)||y(e,i.prev,i))||p(e,i)&&y(e.prev,e,e.next)>0&&y(i.prev,i,i.next)>0)}function y(e,i,o){return(i.y-e.y)*(o.x-i.x)-(i.x-e.x)*(o.y-i.y)}function p(e,i){return e.x===i.x&&e.y===i.y}function u(e,i,o,n){var l=S(y(e,i,o)),t=S(y(e,i,n)),r=S(y(o,n,e)),w=S(y(o,n,i));return l!==t&&r!==w||!(0!==l||!f(e,o,i))||!(0!==t||!f(e,n,i))||!(0!==r||!f(o,e,n))||!(0!==w||!f(o,i,n))}function f(e,i,o){return i.x<=Math.max(e.x,o.x)&&i.x>=Math.min(e.x,o.x)&&i.y<=Math.max(e.y,o.y)&&i.y>=Math.min(e.y,o.y)}function S(e){return e>0?1:e<0?-1:0}function k(e,i){return y(e.prev,e,e.next)<0?y(e,i,e.next)>=0&&y(e,e.prev,i)>=0:y(e,i,e.prev)<0||y(e,e.next,i)<0}function F(e,i){var o=new x(e.i,e.x,e.y),n=new x(i.i,i.x,i.y),l=e.next,t=i.prev;return e.next=i,i.prev=e,o.next=l,l.prev=o,n.next=o,o.prev=n,t.next=n,n.prev=t,n}function m(e,i,o,n){var l=new x(e,i,o);return n?(l.next=n.next,l.prev=n,n.next.prev=l,n.next=l):(l.prev=l,l.next=l),l}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function x(e,i,o){this.i=e,this.x=i,this.y=o,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(e,i,o,n){for(var l=0,t=i,r=o-n;t<o;t+=n)l+=(e[r]-e[t])*(e[t+1]+e[r+1]),r=t;return l}e.exports=i,e.exports.default=i,i.deviation=function(e,i,o,n){var l=i&&i.length,t=l?i[0]*o:e.length,r=Math.abs(T(e,0,t,o));if(l)for(var w=0,s=i.length;w<s;w++){var a=i[w]*o,d=w<s-1?i[w+1]*o:e.length;r-=Math.abs(T(e,a,d,o))}var h=0;for(w=0;w<n.length;w+=3){var c=n[w]*o,g=n[w+1]*o,$=n[w+2]*o;h+=Math.abs((e[c]-e[$])*(e[g+1]-e[c+1])-(e[c]-e[g])*(e[$+1]-e[c+1]))}return 0===r&&0===h?0:Math.abs((h-r)/r)},i.flatten=function(e){for(var i=e[0][0].length,o={vertices:[],holes:[],dimensions:i},n=0,l=0;l<e.length;l++){for(var t=0;t<e[l].length;t++)for(var r=0;r<i;r++)o.vertices.push(e[l][t][r]);l>0&&(n+=e[l-1].length,o.holes.push(n))}return o}}},i={};function o(n){var l=i[n];if(void 0!==l)return l.exports;var t=i[n]={exports:{}};return e[n](t,t.exports,o),t.exports}o.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return o.d(i,{a:i}),i},o.d=(e,i)=>{for(var n in i)o.o(i,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{Math.sqrt(3),Math.sqrt(3);const e=1/6,i=(Math.sqrt(5),Math.sqrt(5),e=>0|Math.floor(e)),n=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);class l{constructor(e,i,o,n,l){this.bounds={x:e,y:i,width:o,height:n},this.halfWidth=o/2,this.halfHeight=n/2,this.points=[],this.capacity=l,this.divided=!1}insert(e){return!!this.contains(e)&&(this.points.length<this.capacity?(this.points.push(e),!0):(this.divided||this.subdivide(),this.northeast.insert(e)||this.northwest.insert(e)||this.southeast.insert(e)||this.southwest.insert(e)))}subdivide(){const e=this.bounds.x,i=this.bounds.y;this.northeast=new l(e+this.halfWidth,i,this.halfWidth,this.halfHeight,this.capacity),this.northwest=new l(e,i,this.halfWidth,this.halfHeight,this.capacity),this.southeast=new l(e+this.halfWidth,i+this.halfHeight,this.halfWidth,this.halfHeight,this.capacity),this.southwest=new l(e,i+this.halfHeight,this.halfWidth,this.halfHeight,this.capacity),this.divided=!0}contains(e){const i=this.bounds.x,o=this.bounds.y,n=this.bounds.width,l=this.bounds.height;return e.x>=i&&e.x<i+n&&e.y>=o&&e.y<o+l}query(e,i=[]){if(!this.intersects(e))return i;for(let o of this.points)o.x>=e.x&&o.x<e.x+e.width&&o.y>=e.y&&o.y<e.y+e.height&&i.push(o);return this.divided&&(this.northeast.query(e,i),this.northwest.query(e,i),this.southeast.query(e,i),this.southwest.query(e,i)),i}intersects(e){const i=this.bounds.x,o=this.bounds.y,n=this.bounds.width,l=this.bounds.height;return!(e.x+e.width<i||e.x>i+n||e.y+e.height<o||e.y>o+l)}remove(e){if(!this.contains(e))return!1;const i=this.points.findIndex((i=>i.x===e.x&&i.y===e.y));return-1!==i?(this.points.splice(i,1),!0):!!this.divided&&(this.northeast.remove(e)||this.northwest.remove(e)||this.southeast.remove(e)||this.southwest.remove(e))}visit(e){const i=o=>{o.divided&&(i(o.northeast),i(o.northwest),i(o.southeast),i(o.southwest)),e(o)};i(this)}clear(){if(this.points=[],this.divided)for(const e of[this.northwest,this.northeast,this.southwest,this.southeast])e.clear();this.divided=!1}}class t{constructor(){this.useA=!1;let e=function(e){let i=parseInt(e.substr(0,8),16),o=parseInt(e.substr(8,8),16),n=parseInt(e.substr(16,8),16),l=parseInt(e.substr(24,8),16);return function(){i|=0,o|=0,n|=0,l|=0;let e=(i+o|0)+l|0;return l=l+1|0,i=o^o>>>9,o=n+(n<<3)|0,n=n<<21|n>>>11,n=n+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(e,i){return e+(i-e)*this.random_dec()}random_int(e,i){return Math.floor(this.random_num(e,i+1))}random_bool(e){return this.random_dec()<e}random_choice(e){return e[this.random_int(0,e.length-1)]}}const r=134217729;function w(e,i,o,n,l){let t,r,w,s,a=i[0],d=n[0],h=0,c=0;d>a==d>-a?(t=a,a=i[++h]):(t=d,d=n[++c]);let g=0;if(h<e&&c<o)for(d>a==d>-a?(r=a+t,w=t-(r-a),a=i[++h]):(r=d+t,w=t-(r-d),d=n[++c]),t=r,0!==w&&(l[g++]=w);h<e&&c<o;)d>a==d>-a?(r=t+a,s=r-t,w=t-(r-s)+(a-s),a=i[++h]):(r=t+d,s=r-t,w=t-(r-s)+(d-s),d=n[++c]),t=r,0!==w&&(l[g++]=w);for(;h<e;)r=t+a,s=r-t,w=t-(r-s)+(a-s),a=i[++h],t=r,0!==w&&(l[g++]=w);for(;c<o;)r=t+d,s=r-t,w=t-(r-s)+(d-s),d=n[++c],t=r,0!==w&&(l[g++]=w);return 0===t&&0!==g||(l[g++]=t),g}function s(e){return new Float64Array(e)}const a=s(4),d=s(8),h=s(12),c=s(16),g=s(4);function $(e,i,o,n,l,t){const s=(i-t)*(o-l),$=(e-l)*(n-t),C=s-$;if(0===s||0===$||s>0!=$>0)return C;const y=Math.abs(s+$);return Math.abs(C)>=33306690738754716e-32*y?C:-function(e,i,o,n,l,t,s){let $,C,y,p,u,f,S,k,F,m,B,x,T,M,G,H,v,L;const _=e-l,A=o-l,R=i-t,b=n-t;M=_*b,f=r*_,S=f-(f-_),k=_-S,f=r*b,F=f-(f-b),m=b-F,G=k*m-(M-S*F-k*F-S*m),H=R*A,f=r*R,S=f-(f-R),k=R-S,f=r*A,F=f-(f-A),m=A-F,v=k*m-(H-S*F-k*F-S*m),B=G-v,u=G-B,a[0]=G-(B+u)+(u-v),x=M+B,u=x-M,T=M-(x-u)+(B-u),B=T-H,u=T-B,a[1]=T-(B+u)+(u-H),L=x+B,u=L-x,a[2]=x-(L-u)+(B-u),a[3]=L;let O=function(e,i){let o=i[0];for(let e=1;e<4;e++)o+=i[e];return o}(0,a),z=22204460492503146e-32*s;if(O>=z||-O>=z)return O;if(u=e-_,$=e-(_+u)+(u-l),u=o-A,y=o-(A+u)+(u-l),u=i-R,C=i-(R+u)+(u-t),u=n-b,p=n-(b+u)+(u-t),0===$&&0===C&&0===y&&0===p)return O;if(z=11093356479670487e-47*s+33306690738754706e-32*Math.abs(O),O+=_*p+b*$-(R*y+A*C),O>=z||-O>=z)return O;M=$*b,f=r*$,S=f-(f-$),k=$-S,f=r*b,F=f-(f-b),m=b-F,G=k*m-(M-S*F-k*F-S*m),H=C*A,f=r*C,S=f-(f-C),k=C-S,f=r*A,F=f-(f-A),m=A-F,v=k*m-(H-S*F-k*F-S*m),B=G-v,u=G-B,g[0]=G-(B+u)+(u-v),x=M+B,u=x-M,T=M-(x-u)+(B-u),B=T-H,u=T-B,g[1]=T-(B+u)+(u-H),L=x+B,u=L-x,g[2]=x-(L-u)+(B-u),g[3]=L;const P=w(4,a,4,g,d);M=_*p,f=r*_,S=f-(f-_),k=_-S,f=r*p,F=f-(f-p),m=p-F,G=k*m-(M-S*F-k*F-S*m),H=R*y,f=r*R,S=f-(f-R),k=R-S,f=r*y,F=f-(f-y),m=y-F,v=k*m-(H-S*F-k*F-S*m),B=G-v,u=G-B,g[0]=G-(B+u)+(u-v),x=M+B,u=x-M,T=M-(x-u)+(B-u),B=T-H,u=T-B,g[1]=T-(B+u)+(u-H),L=x+B,u=L-x,g[2]=x-(L-u)+(B-u),g[3]=L;const W=w(P,d,4,g,h);M=$*p,f=r*$,S=f-(f-$),k=$-S,f=r*p,F=f-(f-p),m=p-F,G=k*m-(M-S*F-k*F-S*m),H=C*y,f=r*C,S=f-(f-C),k=C-S,f=r*y,F=f-(f-y),m=y-F,v=k*m-(H-S*F-k*F-S*m),B=G-v,u=G-B,g[0]=G-(B+u)+(u-v),x=M+B,u=x-M,T=M-(x-u)+(B-u),B=T-H,u=T-B,g[1]=T-(B+u)+(u-H),L=x+B,u=L-x,g[2]=x-(L-u)+(B-u),g[3]=L;const U=w(W,h,4,g,c);return c[U-1]}(e,i,o,n,l,t,y)}s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(8),s(8),s(8),s(4),s(8),s(8),s(8),s(12),s(192),s(192),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(8),s(8),s(8),s(8),s(8),s(8),s(8),s(8),s(8),s(4),s(4),s(4),s(8),s(16),s(16),s(16),s(32),s(32),s(48),s(64),s(1152),s(1152),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(4),s(24),s(24),s(24),s(24),s(24),s(24),s(24),s(24),s(24),s(24),s(1152),s(1152),s(1152),s(1152),s(1152),s(2304),s(2304),s(3456),s(5760),s(8),s(8),s(8),s(16),s(24),s(48),s(48),s(96),s(192),s(384),s(384),s(384),s(768),s(96),s(96),s(96),s(1152);const C=Math.pow(2,-52),y=new Uint32Array(512);class p{static from(e,i=m,o=B){const n=e.length,l=new Float64Array(2*n);for(let t=0;t<n;t++){const n=e[t];l[2*t]=i(n),l[2*t+1]=o(n)}return new p(l)}constructor(e){const i=e.length>>1;if(i>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const o=Math.max(2*i-5,0);this._triangles=new Uint32Array(3*o),this._halfedges=new Int32Array(3*o),this._hashSize=Math.ceil(Math.sqrt(i)),this._hullPrev=new Uint32Array(i),this._hullNext=new Uint32Array(i),this._hullTri=new Uint32Array(i),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(i),this._dists=new Float64Array(i),this.update()}update(){const{coords:e,_hullPrev:i,_hullNext:o,_hullTri:n,_hullHash:l}=this,t=e.length>>1;let r=1/0,w=1/0,s=-1/0,a=-1/0;for(let i=0;i<t;i++){const o=e[2*i],n=e[2*i+1];o<r&&(r=o),n<w&&(w=n),o>s&&(s=o),n>a&&(a=n),this._ids[i]=i}const d=(r+s)/2,h=(w+a)/2;let c,g,y,p=1/0;for(let i=0;i<t;i++){const o=u(d,h,e[2*i],e[2*i+1]);o<p&&(c=i,p=o)}const f=e[2*c],F=e[2*c+1];p=1/0;for(let i=0;i<t;i++){if(i===c)continue;const o=u(f,F,e[2*i],e[2*i+1]);o<p&&o>0&&(g=i,p=o)}let m=e[2*g],B=e[2*g+1],x=1/0;for(let i=0;i<t;i++){if(i===c||i===g)continue;const o=S(f,F,m,B,e[2*i],e[2*i+1]);o<x&&(y=i,x=o)}let T=e[2*y],M=e[2*y+1];if(x===1/0){for(let i=0;i<t;i++)this._dists[i]=e[2*i]-e[0]||e[2*i+1]-e[1];k(this._ids,this._dists,0,t-1);const i=new Uint32Array(t);let o=0;for(let e=0,n=-1/0;e<t;e++){const l=this._ids[e];this._dists[l]>n&&(i[o++]=l,n=this._dists[l])}return this.hull=i.subarray(0,o),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if($(f,F,m,B,T,M)<0){const e=g,i=m,o=B;g=y,m=T,B=M,y=e,T=i,M=o}const G=function(e,i,o,n,l,t){const r=o-e,w=n-i,s=l-e,a=t-i,d=r*r+w*w,h=s*s+a*a,c=.5/(r*a-w*s);return{x:e+(a*d-w*h)*c,y:i+(r*h-s*d)*c}}(f,F,m,B,T,M);this._cx=G.x,this._cy=G.y;for(let i=0;i<t;i++)this._dists[i]=u(e[2*i],e[2*i+1],G.x,G.y);k(this._ids,this._dists,0,t-1),this._hullStart=c;let H=3;o[c]=i[y]=g,o[g]=i[c]=y,o[y]=i[g]=c,n[c]=0,n[g]=1,n[y]=2,l.fill(-1),l[this._hashKey(f,F)]=c,l[this._hashKey(m,B)]=g,l[this._hashKey(T,M)]=y,this.trianglesLen=0,this._addTriangle(c,g,y,-1,-1,-1);for(let t,r,w=0;w<this._ids.length;w++){const s=this._ids[w],a=e[2*s],d=e[2*s+1];if(w>0&&Math.abs(a-t)<=C&&Math.abs(d-r)<=C)continue;if(t=a,r=d,s===c||s===g||s===y)continue;let h=0;for(let e=0,i=this._hashKey(a,d);e<this._hashSize&&(h=l[(i+e)%this._hashSize],-1===h||h===o[h]);e++);h=i[h];let p,u=h;for(;p=o[u],$(a,d,e[2*u],e[2*u+1],e[2*p],e[2*p+1])>=0;)if(u=p,u===h){u=-1;break}if(-1===u)continue;let f=this._addTriangle(u,s,o[u],-1,-1,n[u]);n[s]=this._legalize(f+2),n[u]=f,H++;let S=o[u];for(;p=o[S],$(a,d,e[2*S],e[2*S+1],e[2*p],e[2*p+1])<0;)f=this._addTriangle(S,s,p,n[s],-1,n[S]),n[s]=this._legalize(f+2),o[S]=S,H--,S=p;if(u===h)for(;p=i[u],$(a,d,e[2*p],e[2*p+1],e[2*u],e[2*u+1])<0;)f=this._addTriangle(p,s,u,-1,n[u],n[p]),this._legalize(f+2),n[p]=f,o[u]=u,H--,u=p;this._hullStart=i[s]=u,o[u]=i[S]=s,o[s]=S,l[this._hashKey(a,d)]=s,l[this._hashKey(e[2*u],e[2*u+1])]=u}this.hull=new Uint32Array(H);for(let e=0,i=this._hullStart;e<H;e++)this.hull[e]=i,i=o[i];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,i){return Math.floor(function(e,i){const o=e/(Math.abs(e)+Math.abs(i));return(i>0?3-o:1+o)/4}(e-this._cx,i-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:i,_halfedges:o,coords:n}=this;let l=0,t=0;for(;;){const r=o[e],w=e-e%3;if(t=w+(e+2)%3,-1===r){if(0===l)break;e=y[--l];continue}const s=r-r%3,a=w+(e+1)%3,d=s+(r+2)%3,h=i[t],c=i[e],g=i[a],$=i[d];if(f(n[2*h],n[2*h+1],n[2*c],n[2*c+1],n[2*g],n[2*g+1],n[2*$],n[2*$+1])){i[e]=$,i[r]=h;const n=o[d];if(-1===n){let i=this._hullStart;do{if(this._hullTri[i]===d){this._hullTri[i]=e;break}i=this._hullPrev[i]}while(i!==this._hullStart)}this._link(e,n),this._link(r,o[t]),this._link(t,d);const w=s+(r+1)%3;l<y.length&&(y[l++]=w)}else{if(0===l)break;e=y[--l]}}return t}_link(e,i){this._halfedges[e]=i,-1!==i&&(this._halfedges[i]=e)}_addTriangle(e,i,o,n,l,t){const r=this.trianglesLen;return this._triangles[r]=e,this._triangles[r+1]=i,this._triangles[r+2]=o,this._link(r,n),this._link(r+1,l),this._link(r+2,t),this.trianglesLen+=3,r}}function u(e,i,o,n){const l=e-o,t=i-n;return l*l+t*t}function f(e,i,o,n,l,t,r,w){const s=e-r,a=i-w,d=o-r,h=n-w,c=l-r,g=t-w,$=d*d+h*h,C=c*c+g*g;return s*(h*C-$*g)-a*(d*C-$*c)+(s*s+a*a)*(d*g-h*c)<0}function S(e,i,o,n,l,t){const r=o-e,w=n-i,s=l-e,a=t-i,d=r*r+w*w,h=s*s+a*a,c=.5/(r*a-w*s),g=(a*d-w*h)*c,$=(r*h-s*d)*c;return g*g+$*$}function k(e,i,o,n){if(n-o<=20)for(let l=o+1;l<=n;l++){const n=e[l],t=i[n];let r=l-1;for(;r>=o&&i[e[r]]>t;)e[r+1]=e[r--];e[r+1]=n}else{let l=o+1,t=n;F(e,o+n>>1,l),i[e[o]]>i[e[n]]&&F(e,o,n),i[e[l]]>i[e[n]]&&F(e,l,n),i[e[o]]>i[e[l]]&&F(e,o,l);const r=e[l],w=i[r];for(;;){do{l++}while(i[e[l]]<w);do{t--}while(i[e[t]]>w);if(t<l)break;F(e,l,t)}e[o+1]=e[t],e[t]=r,n-l+1>=t-o?(k(e,i,l,n),k(e,i,o,t-1)):(k(e,i,o,t-1),k(e,i,l,n))}}function F(e,i,o){const n=e[i];e[i]=e[o],e[o]=n}function m(e){return e[0]}function B(e){return e[1]}const x=1e-6;class T{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,i){this._+=`L${this._x1=+e},${this._y1=+i}`}arc(e,i,o){const n=(e=+e)+(o=+o),l=i=+i;if(o<0)throw new Error("negative radius");null===this._x1?this._+=`M${n},${l}`:(Math.abs(this._x1-n)>x||Math.abs(this._y1-l)>x)&&(this._+="L"+n+","+l),o&&(this._+=`A${o},${o},0,1,1,${e-o},${i}A${o},${o},0,1,1,${this._x1=n},${this._y1=l}`)}rect(e,i,o,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}h${+o}v${+n}h${-o}Z`}value(){return this._||null}}class M{constructor(){this._=[]}moveTo(e,i){this._.push([e,i])}closePath(){this._.push(this._[0].slice())}lineTo(e,i){this._.push([e,i])}value(){return this._.length?this._:null}}class G{constructor(e,[i,o,n,l]=[0,0,960,500]){if(!((n=+n)>=(i=+i)&&(l=+l)>=(o=+o)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=n,this.xmin=i,this.ymax=l,this.ymin=o,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:i,triangles:o},vectors:n}=this;let l,t;const r=this.circumcenters=this._circumcenters.subarray(0,o.length/3*2);for(let n,w,s=0,a=0,d=o.length;s<d;s+=3,a+=2){const d=2*o[s],h=2*o[s+1],c=2*o[s+2],g=e[d],$=e[d+1],C=e[h],y=e[h+1],p=e[c],u=e[c+1],f=C-g,S=y-$,k=p-g,F=u-$,m=2*(f*F-S*k);if(Math.abs(m)<1e-9){if(void 0===l){l=t=0;for(const o of i)l+=e[2*o],t+=e[2*o+1];l/=i.length,t/=i.length}const o=1e9*Math.sign((l-g)*F-(t-$)*k);n=(g+p)/2-o*F,w=($+u)/2+o*k}else{const e=1/m,i=f*f+S*S,o=k*k+F*F;n=g+(F*i-S*o)*e,w=$+(f*o-k*i)*e}r[a]=n,r[a+1]=w}let w,s,a,d=i[i.length-1],h=4*d,c=e[2*d],g=e[2*d+1];n.fill(0);for(let o=0;o<i.length;++o)d=i[o],w=h,s=c,a=g,h=4*d,c=e[2*d],g=e[2*d+1],n[w+2]=n[h]=a-g,n[w+3]=n[h+1]=c-s}render(e){const i=null==e?e=new T:void 0,{delaunay:{halfedges:o,inedges:n,hull:l},circumcenters:t,vectors:r}=this;if(l.length<=1)return null;for(let i=0,n=o.length;i<n;++i){const n=o[i];if(n<i)continue;const l=2*Math.floor(i/3),r=2*Math.floor(n/3),w=t[l],s=t[l+1],a=t[r],d=t[r+1];this._renderSegment(w,s,a,d,e)}let w,s=l[l.length-1];for(let i=0;i<l.length;++i){w=s,s=l[i];const o=2*Math.floor(n[s]/3),a=t[o],d=t[o+1],h=4*w,c=this._project(a,d,r[h+2],r[h+3]);c&&this._renderSegment(a,d,c[0],c[1],e)}return i&&i.value()}renderBounds(e){const i=null==e?e=new T:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),i&&i.value()}renderCell(e,i){const o=null==i?