import{InternMap as J,InternSet as M}from"/-/internmap@v2.0.3-GWZlRrRMFcDlELwTQEZq/dist=es2020,mode=imports,min/optimized/internmap.js";export{InternMap,InternSet}from"/-/internmap@v2.0.3-GWZlRrRMFcDlELwTQEZq/dist=es2020,mode=imports,min/optimized/internmap.js";function a(n,e){return n==null||e==null?NaN:ne?1:n>=e?0:NaN}function K(n,e){return n==null||e==null?NaN:en?1:e>=n?0:NaN}function G(n){let e,t,i;n.length!==2?(e=a,t=(u,c)=>a(n(u),c),i=(u,c)=>n(u)-c):(e=n===a||n===K?n:xn,t=n,i=n);function r(u,c,l=0,s=u.length){if(l>>1;t(u[d],c)<0?l=d+1:s=d}while(l>>1;t(u[d],c)<=0?l=d+1:s=d}while(ll&&i(u[d-1],c)>-i(u[d],c)?d-1:d}return{left:r,center:o,right:f}}function xn(){return 0}function z(n){return n===null?NaN:+n}function*bn(n,e){if(e===void 0)for(let t of n)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let i of n)(i=e(i,++t,n))!=null&&(i=+i)>=i&&(yield i)}}const P=G(a),U=P.right,An=P.left,pn=G(z).center;function En(n,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let t=n.length;if(!((t=Math.floor(t))>=0))throw new RangeError("invalid length");if(!t||!e)return n;const i=B(e),r=n.slice();return i(n,r,0,t,1),i(r,n,0,t,1),i(n,r,0,t,1),n}const Nn=X(B),In=X(Rn);function X(n){return function(e,t,i=t){if(!((t=+t)>=0))throw new RangeError("invalid rx");if(!((i=+i)>=0))throw new RangeError("invalid ry");let{data:r,width:f,height:o}=e;if(!((f=Math.floor(f))>=0))throw new RangeError("invalid width");if(!((o=Math.floor(o!==void 0?o:r.length/f))>=0))throw new RangeError("invalid height");if(!f||!o||!t&&!i)return e;const u=t&&n(t),c=i&&n(i),l=r.slice();return u&&c?(y(u,l,r,f,o),y(u,r,l,f,o),y(u,l,r,f,o),x(c,r,l,f,o),x(c,l,r,f,o),x(c,r,l,f,o)):u?(y(u,r,l,f,o),y(u,l,r,f,o),y(u,r,l,f,o)):c&&(x(c,r,l,f,o),x(c,l,r,f,o),x(c,r,l,f,o)),e}}function y(n,e,t,i,r){for(let f=0,o=i*r;f{r<<=2,f<<=2,o<<=2,e(t,i,r+0,f+0,o),e(t,i,r+1,f+1,o),e(t,i,r+2,f+2,o),e(t,i,r+3,f+3,o)}}function B(n){const e=Math.floor(n);if(e===n)return qn(n);const t=n-e,i=2*n+1;return(r,f,o,u,c)=>{if(!((u-=c)>=o))return;let l=e*f[o];const s=c*e,d=s+c;for(let h=o,m=o+s;h{if(!((f-=o)>=r))return;let u=n*i[r];const c=o*n;for(let l=r,s=r+c;l=i&&++t;else{let i=-1;for(let r of n)(r=e(r,++i,n))!=null&&(r=+r)>=r&&++t}return t}function jn(n){return n.length|0}function Tn(n){return!(n>0)}function zn(n){return typeof n!="object"||"length"in n?n:Array.from(n)}function Fn(n){return e=>n(...e)}function Vn(...n){const e=typeof n[n.length-1]=="function"&&Fn(n.pop());n=n.map(zn);const t=n.map(jn),i=n.length-1,r=new Array(i+1).fill(0),f=[];if(i<0||t.some(Tn))return f;for(;;){f.push(r.map((u,c)=>n[c][u]));let o=i;for(;++r[o]===t[o];){if(o===0)return e?f.map(e):f;r[o--]=0}}}function Dn(n,e){var t=0,i=0;return Float64Array.from(n,e===void 0?r=>t+=+r||0:r=>t+=+e(r,i++,n)||0)}function Y(n,e){let t=0,i,r=0,f=0;if(e===void 0)for(let o of n)o!=null&&(o=+o)>=o&&(i=o-r,r+=i/++t,f+=i*(o-r));else{let o=-1;for(let u of n)(u=e(u,++o,n))!=null&&(u=+u)>=u&&(i=u-r,r+=i/++t,f+=i*(u-r))}if(t>1)return f/(t-1)}function v(n,e){const t=Y(n,e);return t&&Math.sqrt(t)}function V(n,e){let t,i;if(e===void 0)for(const r of n)r!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i=f&&(t=i=f):(t>f&&(t=f),i0){for(o=e[--t];t>0&&!(i=o,r=e[--t],o=i+r,f=r-(o-i),f););t>0&&(f<0&&e[t-1]<0||f>0&&e[t-1]>0)&&(r=f*2,i=o+r,r==i-o&&(o=i))}return o}}function Ln(n,e){const t=new C;if(e===void 0)for(let i of n)(i=+i)&&t.add(i);else{let i=-1;for(let r of n)(r=+e(r,++i,n))&&t.add(r)}return+t}function Sn(n,e){const t=new C;let i=-1;return Float64Array.from(n,e===void 0?r=>t.add(+r||0):r=>t.add(+e(r,++i,n)||0))}function b(n){return n}function nn(n,...e){return A(n,b,b,e)}function en(n,...e){return A(n,Array.from,b,e)}function tn(n,e){for(let t=1,i=e.length;tr.pop().map(([f,o])=>[...r,f,o]));return n}function On(n,...e){return tn(en(n,...e),e)}function Zn(n,e,...t){return tn(fn(n,e,...t),t)}function rn(n,e,...t){return A(n,b,e,t)}function fn(n,e,...t){return A(n,Array.from,e,t)}function Gn(n,...e){return A(n,b,on,e)}function Un(n,...e){return A(n,Array.from,on,e)}function on(n){if(n.length!==1)throw new Error("duplicate key");return n[0]}function A(n,e,t,i){return function r(f,o){if(o>=i.length)return t(f);const u=new J,c=i[o++];let l=-1;for(const s of f){const d=c(s,++l,f),h=u.get(d);h?h.push(s):u.set(d,[s])}for(const[s,d]of u)u.set(s,r(d,o));return e(u)}(n,0)}function un(n,e){return Array.from(e,t=>n[t])}function Q(n,...e){if(typeof n[Symbol.iterator]!="function")throw new TypeError("values is not iterable");n=Array.from(n);let[t]=e;if(t&&t.length!==2||e.length>1){const i=Uint32Array.from(n,(r,f)=>f);return e.length>1?(e=e.map(r=>n.map(r)),i.sort((r,f)=>{for(const o of e){const u=p(o[r],o[f]);if(u)return u}})):(t=n.map(t),i.sort((r,f)=>p(t[r],t[f]))),un(n,i)}return n.sort(W(t))}function W(n=a){if(n===a)return p;if(typeof n!="function")throw new TypeError("compare is not a function");return(e,t)=>{const i=n(e,t);return i||i===0?i:(n(t,t)===0)-(n(e,e)===0)}}function p(n,e){return(n==null||!(n>=n))-(e==null||!(e>=e))||(ne?1:0)}function Bn(n,e,t){return(e.length!==2?Q(rn(n,e,t),([i,r],[f,o])=>a(r,o)||a(i,f)):Q(nn(n,t),([i,r],[f,o])=>e(r,o)||a(i,f))).map(([i])=>i)}var Cn=Array.prototype,Qn=Cn.slice;function $(n){return()=>n}const Wn=Math.sqrt(50),$n=Math.sqrt(10),_n=Math.sqrt(2);function D(n,e,t){const i=(e-n)/Math.max(0,t),r=Math.floor(Math.log10(i)),f=i/Math.pow(10,r),o=f>=Wn?10:f>=$n?5:f>=_n?2:1;let u,c,l;return r<0?(l=Math.pow(10,-r)/o,u=Math.round(n*l),c=Math.round(e*l),u/le&&--c,l=-l):(l=Math.pow(10,r)*o,u=Math.round(n/l),c=Math.round(e/l),u*le&&--c),c0))return[];if(n===e)return[n];const i=e=r))return[];const u=f-r+1,c=new Array(u);if(i)if(o<0)for(let l=0;l0?(n=Math.floor(n/r)*r,e=Math.ceil(e/r)*r):r<0&&(n=Math.ceil(n*r)/r,e=Math.floor(e*r)/r),i=r}}function dn(n){return Math.max(1,Math.ceil(Math.log(F(n))/Math.LN2)+1)}function hn(){var n=b,e=V,t=dn;function i(r){Array.isArray(r)||(r=Array.from(r));var f,o=r.length,u,c,l=new Array(o);for(f=0;f=h)if(j>=h&&e===V){const g=E(d,h,T);isFinite(g)&&(g>0?h=(Math.floor(h/g)+1)*g:g<0&&(h=(Math.ceil(h*-g)+1)/-g))}else m.pop()}for(var w=m.length,N=0,I=w;m[N]<=d;)++N;for(;m[I-1]>h;)--I;(N||I0?m[f-1]:d,Z.x1=f0)for(f=0;f=i)&&(t=i);else{let i=-1;for(let r of n)(r=e(r,++i,n))!=null&&(t=r)&&(t=r)}return t}function k(n,e){let t,i=-1,r=-1;if(e===void 0)for(const f of n)++r,f!=null&&(t=f)&&(t=f,i=r);else for(let f of n)(f=e(f,++r,n))!=null&&(t=f)&&(t=f,i=r);return i}function L(n,e){let t;if(e===void 0)for(const i of n)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let r of n)(r=e(r,++i,n))!=null&&(t>r||t===void 0&&r>=r)&&(t=r)}return t}function H(n,e){let t,i=-1,r=-1;if(e===void 0)for(const f of n)++r,f!=null&&(t>f||t===void 0&&f>=f)&&(t=f,i=r);else for(let f of n)(f=e(f,++r,n))!=null&&(t>f||t===void 0&&f>=f)&&(t=f,i=r);return i}function S(n,e,t=0,i=Infinity,r){if(e=Math.floor(e),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(n.length-1,i)),!(t<=e&&e<=i))return n;for(r=r===void 0?p:W(r);i>t;){if(i-t>600){const c=i-t+1,l=e-t+1,s=Math.log(c),d=.5*Math.exp(2*s/3),h=.5*Math.sqrt(s*d*(c-d)/c)*(l-c/2<0?-1:1),m=Math.max(t,Math.floor(e-l*d/c+h)),w=Math.min(i,Math.floor(e+(c-l)*d/c+h));S(n,e,m,w,r)}const f=n[e];let o=t,u=i;for(q(n,t,e),r(n[i],f)>0&&q(n,t,i);o0;)--u}r(n[t],f)===0?q(n,t,u):(++u,q(n,u,i)),u<=e&&(t=u+1),e<=u&&(i=u-1)}return n}function q(n,e,t){const i=n[e];n[e]=n[t],n[t]=i}function sn(n,e=a){let t,i=!1;if(e.length===1){let r;for(const f of n){const o=e(f);(i?a(o,r)>0:a(o,o)===0)&&(t=f,r=o,i=!0)}}else for(const r of n)(i?e(r,t)>0:e(r,r)===0)&&(t=r,i=!0);return t}function O(n,e,t){if(n=Float64Array.from(bn(n,t)),!(i=n.length)||isNaN(e=+e))return;if(e<=0||i<2)return L(n);if(e>=1)return _(n);var i,r=(i-1)*e,f=Math.floor(r),o=_(S(n,f).subarray(0,f+1)),u=L(n.subarray(f+1));return o+(u-o)*(r-f)}function Hn(n,e,t=z){if(!(i=n.length)||isNaN(e=+e))return;if(e<=0||i<2)return+t(n[0],0,n);if(e>=1)return+t(n[i-1],i-1,n);var i,r=(i-1)*e,f=Math.floor(r),o=+t(n[f],f,n),u=+t(n[f+1],f+1,n);return o+(u-o)*(r-f)}function mn(n,e,t=z){if(isNaN(e=+e))return;if(i=Float64Array.from(n,(u,c)=>z(t(n[c],c,n))),e<=0)return H(i);if(e>=1)return k(i);var i,r=Uint32Array.from(n,(u,c)=>c),f=i.length-1,o=Math.floor(f*e);return S(r,o,0,f,(u,c)=>p(i[u],i[c])),o=sn(r.subarray(0,o+1),u=>i[u]),o>=0?o:-1}function Jn(n,e,t){const i=F(n),r=O(n,.75)-O(n,.25);return i&&r?Math.ceil((t-e)/(2*r*Math.pow(i,-1/3))):1}function Kn(n,e,t){const i=F(n),r=v(n);return i&&r?Math.ceil((t-e)*Math.cbrt(i)/(3.49*r)):1}function Pn(n,e){let t=0,i=0;if(e===void 0)for(let r of n)r!=null&&(r=+r)>=r&&(++t,i+=r);else{let r=-1;for(let f of n)(f=e(f,++r,n))!=null&&(f=+f)>=f&&(++t,i+=f)}if(t)return i/t}function Xn(n,e){return O(n,.5,e)}function Yn(n,e){return mn(n,.5,e)}function*vn(n){for(const e of n)yield*e}function ne(n){return Array.from(vn(n))}function ee(n,e){const t=new J;if(e===void 0)for(let f of n)f!=null&&f>=f&&t.set(f,(t.get(f)||0)+1);else{let f=-1;for(let o of n)(o=e(o,++f,n))!=null&&o>=o&&t.set(o,(t.get(o)||0)+1)}let i,r=0;for(const[f,o]of t)o>r&&(r=o,i=f);return i}function te(n,e=re){const t=[];let i,r=!1;for(const f of n)r&&t.push(e(i,f)),i=f,r=!0;return t}function re(n,e){return[n,e]}function ie(n,e,t){n=+n,e=+e,t=(r=arguments.length)<2?(e=n,n=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((e-n)/t))|0,f=new Array(r);++ie(t[u],t[c]);let f,o;return n=Uint32Array.from(t,(u,c)=>c),n.sort(e===a?(u,c)=>p(t[u],t[c]):W(r)),n.forEach((u,c)=>{const l=r(u,f===void 0?u:f);l>=0?((f===void 0||l>0)&&(f=u,o=c),i[u]=o):i[u]=NaN}),i}function oe(n,e=a){let t,i=!1;if(e.length===1){let r;for(const f of n){const o=e(f);(i?a(o,r)<0:a(o,o)===0)&&(t=f,r=o,i=!0)}}else for(const r of n)(i?e(r,t)<0:e(r,r)===0)&&(t=r,i=!0);return t}function an(n,e=a){if(e.length===1)return H(n,e);let t,i=-1,r=-1;for(const f of n)++r,(i<0?e(f,f)===0:e(f,t)<0)&&(t=f,i=r);return i}function ue(n,e=a){if(e.length===1)return k(n,e);let t,i=-1,r=-1;for(const f of n)++r,(i<0?e(f,f)===0:e(f,t)>0)&&(t=f,i=r);return i}function le(n,e){const t=an(n,e);return t<0?void 0:t}var ce=wn(Math.random);function wn(n){return function(t,i=0,r=t.length){let f=r-(i=+i);for(;f;){const o=n()*f--|0,u=t[f+i];t[f+i]=t[o+i],t[o+i]=u}return t}}function de(n,e){let t=0;if(e===void 0)for(let i of n)(i=+i)&&(t+=i);else{let i=-1;for(let r of n)(r=+e(r,++i,n))&&(t+=r)}return t}function gn(n){if(!(f=n.length))return[];for(var e=-1,t=L(n,he),i=new Array(t);++ee(t,i,n))}function Me(n,e,t){if(typeof e!="function")throw new TypeError("reducer is not a function");const i=n[Symbol.iterator]();let r,f,o=-1;if(arguments.length<3){if({done:r,value:t}=i.next(),r)return;++o}for(;{done:r,value:f}=i.next(),!r;)t=e(t,f,++o,n);return t}function ye(n){if(typeof n[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(n).reverse()}function xe(n,...e){n=new M(n);for(const t of e)for(const i of t)n.delete(i);return n}function be(n,e){const t=e[Symbol.iterator](),i=new M;for(const r of n){if(i.has(r))return!1;let f,o;for(;({value:f,done:o}=t.next())&&!o;){if(Object.is(r,f))return!1;i.add(f)}}return!0}function Ae(n,...e){n=new M(n),e=e.map(pe);n:for(const t of n)for(const i of e)if(!i.has(t)){n.delete(t);continue n}return n}function pe(n){return n instanceof M?n:new M(n)}function Mn(n,e){const t=n[Symbol.iterator](),i=new Set;for(const r of e){const f=yn(r);if(i.has(f))continue;let o,u;for(;{value:o,done:u}=t.next();){if(u)return!1;const c=yn(o);if(i.add(c),Object.is(f,c))break}}return!0}function yn(n){return n!==null&&typeof n=="object"?n.valueOf():n}function Ee(n,e){return Mn(e,n)}function Ne(...n){const e=new M;for(const t of n)for(const i of t)e.add(i);return e}export{C as Adder,a as ascending,hn as bin,U as bisect,pn as bisectCenter,An as bisectLeft,U as bisectRight,G as bisector,En as blur,Nn as blur2,In as blurImage,F as count,Vn as cross,Dn as cumsum,K as descending,v as deviation,xe as difference,be as disjoint,me as every,V as extent,Sn as fcumsum,we as filter,On as flatGroup,Zn as flatRollup,Ln as fsum,sn as greatest,ue as greatestIndex,nn as group,Bn as groupSort,en as groups,hn as histogram,Gn as index,Un as indexes,Ae as intersection,oe as least,an as leastIndex,ge as map,_ as max,k as maxIndex,Pn as mean,Xn as median,Yn as medianIndex,ne as merge,L as min,H as minIndex,ee as mode,cn as nice,te as pairs,un as permute,O as quantile,mn as quantileIndex,Hn as quantileSorted,S as quickselect,ie as range,fe as rank,Me as reduce,ye as reverse,rn as rollup,fn as rollups,le as scan,ce as shuffle,wn as shuffler,ae as some,Q as sort,Ee as subset,de as sum,Mn as superset,Jn as thresholdFreedmanDiaconis,Kn as thresholdScott,dn as thresholdSturges,E as tickIncrement,kn as tickStep,ln as ticks,gn as transpose,Ne as union,Y as variance,se as zip};export default null;