UNPKG

earthjs

Version:

D3 Earth JS using SVG, Canvas & THREE js, build with some plugins.

1 lines 22.6 kB
!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.crossfilter=r()}}(function(){return function r(t,e,n){function o(u,f){if(!e[u]){if(!t[u]){var a="function"==typeof require&&require;if(!f&&a)return a(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[u]={exports:{}};t[u][0].call(c.exports,function(r){var e=t[u][1][r];return o(e?e:r)},c,c.exports,r,t,e,n)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}({1:[function(r,t){t.exports=r("./src/crossfilter").crossfilter},{"./src/crossfilter":6}],2:[function(r,t){(function(r){function e(r,t){return null==r?void 0:r[t]}function n(r){var t=!1;if(null!=r&&"function"!=typeof r.toString)try{t=!!(r+"")}catch(e){}return t}function o(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}function i(){this.__data__=dt?dt(null):{}}function u(r){return this.has(r)&&delete this.__data__[r]}function f(r){var t=this.__data__;if(dt){var e=t[r];return e===T?void 0:e}return st.call(t,r)?t[r]:void 0}function a(r){var t=this.__data__;return dt?void 0!==t[r]:st.call(t,r)}function s(r,t){var e=this.__data__;return e[r]=dt&&void 0===t?T:t,this}function c(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}function l(){this.__data__=[]}function h(r){var t=this.__data__,e=w(t,r);if(0>e)return!1;var n=t.length-1;return e==n?t.pop():pt.call(t,e,1),!0}function p(r){var t=this.__data__,e=w(t,r);return 0>e?void 0:t[e][1]}function v(r){return w(this.__data__,r)>-1}function d(r,t){var e=this.__data__,n=w(e,r);return 0>n?e.push([r,t]):e[n][1]=t,this}function y(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var n=r[t];this.set(n[0],n[1])}}function g(){this.__data__={hash:new o,map:new(vt||c),string:new o}}function b(r){return k(this,r).delete(r)}function _(r){return k(this,r).get(r)}function x(r){return k(this,r).has(r)}function m(r,t){return k(this,r).set(r,t),this}function w(r,t){for(var e=r.length;e--;)if(q(r[e][0],t))return e;return-1}function E(r){if(!R(r)||M(r))return!1;var t=N(r)||n(r)?lt:Z;return t.test(C(r))}function A(r){if("string"==typeof r)return r;if(D(r))return gt?gt.call(r):"";var t=r+"";return"0"==t&&1/r==-W?"-0":t}function O(r){return _t(r)?r:bt(r)}function k(r,t){var e=r.__data__;return S(t)?e["string"==typeof t?"string":"hash"]:e.map}function z(r,t){var n=e(r,t);return E(n)?n:void 0}function j(r,t){if(_t(r))return!1;var e=typeof r;return"number"==e||"symbol"==e||"boolean"==e||null==r||D(r)?!0:K.test(r)||!H.test(r)||null!=t&&r in Object(t)}function S(r){var t=typeof r;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==r:null===r}function M(r){return!!ft&&ft in r}function $(r){if("string"==typeof r||D(r))return r;var t=r+"";return"0"==t&&1/r==-W?"-0":t}function C(r){if(null!=r){try{return at.call(r)}catch(t){}try{return r+""}catch(t){}}return""}function F(r,t){if("function"!=typeof r||t&&"function"!=typeof t)throw new TypeError(P);var e=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=e.cache;if(i.has(o))return i.get(o);var u=r.apply(this,n);return e.cache=i.set(o,u),u};return e.cache=new(F.Cache||y),e}function q(r,t){return r===t||r!==r&&t!==t}function N(r){var t=R(r)?ct.call(r):"";return t==J||t==G}function R(r){var t=typeof r;return!!r&&("object"==t||"function"==t)}function U(r){return!!r&&"object"==typeof r}function D(r){return"symbol"==typeof r||U(r)&&ct.call(r)==B}function I(r){return null==r?"":A(r)}function L(r,t,e){t=j(t,r)?[t]:O(t);var n=-1,o=t.length;for(o||(r=void 0,o=1);++n<o;){var i=null==r?void 0:r[$(t[n])];void 0===i&&(n=o,i=e),r=N(i)?i.call(r):i}return r}var P="Expected a function",T="__lodash_hash_undefined__",W=1/0,J="[object Function]",G="[object GeneratorFunction]",B="[object Symbol]",H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Q=/^\./,V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,Y=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,rt="object"==typeof r&&r&&r.Object===Object&&r,tt="object"==typeof self&&self&&self.Object===Object&&self,et=rt||tt||Function("return this")(),nt=Array.prototype,ot=Function.prototype,it=Object.prototype,ut=et["__core-js_shared__"],ft=function(){var r=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),at=ot.toString,st=it.hasOwnProperty,ct=it.toString,lt=RegExp("^"+at.call(st).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=et.Symbol,pt=nt.splice,vt=z(et,"Map"),dt=z(Object,"create"),yt=ht?ht.prototype:void 0,gt=yt?yt.toString:void 0;o.prototype.clear=i,o.prototype.delete=u,o.prototype.get=f,o.prototype.has=a,o.prototype.set=s,c.prototype.clear=l,c.prototype.delete=h,c.prototype.get=p,c.prototype.has=v,c.prototype.set=d,y.prototype.clear=g,y.prototype.delete=b,y.prototype.get=_,y.prototype.has=x,y.prototype.set=m;var bt=F(function(r){r=I(r);var t=[];return Q.test(r)&&t.push(""),r.replace(V,function(r,e,n,o){t.push(n?o.replace(Y,"$1"):e||r)}),t});F.Cache=y;var _t=Array.isArray;t.exports=L}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(r,t){t.exports={version:"1.4.3"}},{}],4:[function(r,t){function e(r){for(var t=new Array(r),e=-1;++e<r;)t[e]=0;return t}function n(r,t){for(var e=r.length;t>e;)r[e++]=0;return r}function o(r,t){if(t>32)throw new Error("invalid array width!");return r}function i(r){this.length=r,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=u(r)}if("undefined"!=typeof Uint8Array)var u=function(r){return new Uint8Array(r)},f=function(r){return new Uint16Array(r)},a=function(r){return new Uint32Array(r)},s=function(r,t){if(r.length>=t)return r;var e=new r.constructor(t);return e.set(r),e},c=function(r,t){var e;switch(t){case 16:e=f(r.length);break;case 32:e=a(r.length);break;default:throw new Error("invalid array width!")}return e.set(r),e};i.prototype.lengthen=function(r){var t,e;for(t=0,e=this.subarrays;e>t;++t)this[t]=s(this[t],r);this.length=r},i.prototype.add=function(){var r,t,e,n,o;for(n=0,o=this.subarrays;o>n;++n)if(r=this.masks[n],t=this.width-32*n,e=~r&-~r,!(t>=32)||e)return 32>t&&e&1<<t&&(this[n]=c(this[n],t<<=1),this.width=32*n+t),this.masks[n]|=e,{offset:n,one:e};return this[this.subarrays]=u(this.length),this.masks[this.subarrays]=1,this.width+=8,{offset:this.subarrays++,one:1}},i.prototype.copy=function(r,t){var e,n;for(e=0,n=this.subarrays;n>e;++e)this[e][r]=this[e][t]},i.prototype.truncate=function(r){var t,e;for(t=0,e=this.subarrays;e>t;++t){for(var n=this.length-1;n>=r;n--)this[t][n]=0;this[t].length=r}this.length=r},i.prototype.zero=function(r){var t,e;for(t=0,e=this.subarrays;e>t;++t)if(this[t][r])return!1;return!0},i.prototype.zeroExcept=function(r,t,e){var n,o;for(n=0,o=this.subarrays;o>n;++n)if(n===t?this[n][r]&e:this[n][r])return!1;return!0},i.prototype.zeroExceptMask=function(r,t){var e,n;for(e=0,n=this.subarrays;n>e;++e)if(this[e][r]&t[e])return!1;return!0},i.prototype.only=function(r,t,e){var n,o;for(n=0,o=this.subarrays;o>n;++n)if(this[n][r]!=(n===t?e:0))return!1;return!0},i.prototype.onlyExcept=function(r,t,e,n,o){var i,u,f;for(u=0,f=this.subarrays;f>u;++u)if(i=this[u][r],u===t&&(i&=e),i!=(u===n?o:0))return!1;return!0},t.exports={array8:e,array16:e,array32:e,arrayLengthen:n,arrayWiden:o,bitarray:i}},{}],5:[function(r,t){"use strict";function e(r){function t(t,e,n,o){for(;o>n;){var i=n+o>>>1;r(t[i])<e?n=i+1:o=i}return n}function e(t,e,n,o){for(;o>n;){var i=n+o>>>1;e<r(t[i])?o=i:n=i+1}return n}return e.right=e,e.left=t,e}var n=r("./identity");t.exports=e(n),t.exports.by=e},{"./identity":10}],6:[function(r,t,e){"use strict";function n(){function r(r){var t=S,e=r.length;return e&&(j=j.concat(r),k.lengthen(S+=e),$.forEach(function(n){n(r,t,e)}),O("dataAdded")),z}function t(r){for(var t=o(S,S),e=[],n="function"==typeof r,i=function(t){return n?r(j[t],t):k.zero(t)},u=0,f=0;S>u;++u)i(u)?(e.push(u),t[u]=m):t[u]=f++;M.forEach(function(r){r(-1,-1,[],e,!0)}),C.forEach(function(r){r(t)});for(var a=0,s=0;S>a;++a)t[a]!==m&&(a!==s&&(k.copy(s,a),j[s]=j[a]),++s);j.length=S=s,k.truncate(s),O("dataRemoved")}function e(r,t){var e,n,o,i,u=Array(k.subarrays);for(e=0;e<k.subarrays;e++)u[e]=-1;if(t)for(n=0,i=t.length;i>n;n++)o=t[n].id(),u[o>>7]&=~(1<<(63&o));return k.zeroExceptMask(r,u)}function n(r,t){function e(e,n,u){if(t){st=0,z=0,rt=[];for(var a=0;a<e.length;a++)for(z=0,rt=r(e[a]);z<rt.length;z++)st++;H=[],V=i(e.length),Y=o(st,1);for(var s=i(st),c=0,l=0;l<e.length;l++)if(rt=r(e[l]),rt.length)for(V[l]=rt.length,z=0;z<rt.length;z++)H.push(rt[z]),s[c]=l,c++;else V[l]=0,et.push(l+n);var h=nt(i(st),0,st);H=y(H,h),K=y(s,h)}else H=e.map(r),K=nt(i(u),0,u),H=y(H,K);t&&(u=st);var p=ot(H),v=p[0],d=p[1];if(Z)for(var g=0;u>g;++g)Z(H[g],g)||(k[W][K[g]+n]|=P,t&&(Y[g]=1));else{for(var b=0;v>b;++b)k[W][K[b]+n]|=P,t&&(Y[b]=1);for(var _=d;u>_;++_)k[W][K[_]+n]|=P,t&&(Y[_]=1)}if(!n)return G=H,B=K,Q=V,X=Y,ft=v,at=d,void 0;var x,m=G,w=B,E=X,A=0;if(a=0,t&&(x=n,n=m.length,u=st),G=t?new Array(n+u):new Array(S),B=t?new Array(n+u):o(S,S),t&&(X=o(n+u,1)),t){var O=Q.length;Q=f.arrayLengthen(Q,S);for(var z=0;S>z+O;z++)Q[z+O]=V[z]}for(var j=0;n>a&&u>A;++j)m[a]<H[A]?(G[j]=m[a],t&&(X[j]=E[a]),B[j]=w[a++]):(G[j]=H[A],t&&(X[j]=Y[A]),B[j]=K[A++]+(t?x:n));for(;n>a;++a,++j)G[j]=m[a],t&&(X[j]=E[a]),B[j]=w[a];for(;u>A;++A,++j)G[j]=H[A],t&&(X[j]=Y[A]),B[j]=K[A]+(t?x:n);p=ot(G),ft=p[0],at=p[1]}function n(r,t,e){it.forEach(function(r){r(H,K,t,e)}),H=K=null}function d(r){if(t){for(var e=0,n=0;e<et.length;e++)r[et[e]]!==m&&(et[n]=r[et[e]],n++);for(et.length=n,e=0,n=0;S>e;e++)r[e]!==m&&(n!==e&&(Q[n]=Q[e]),n++);Q.length=n}for(var o,i=G.length,u=0,f=0;i>u;++u)o=B[u],r[o]!==m&&(u!==f&&(G[f]=G[u]),B[f]=r[o],t&&(X[f]=X[u]),++f);for(G.length=f,t&&(X.length=f);i>f;)B[f++]=0;var a=ot(G);ft=a[0],at=a[1]}function _(r){var e=r[0],n=r[1];if(Z)return Z=null,q(function(r,t){return t>=e&&n>t},0===r[0]&&r[1]===G.length),ft=e,at=n,tt;var o,i,u,f=[],a=[],s=[],c=[];if(ft>e)for(o=e,i=Math.min(ft,n);i>o;++o)f.push(B[o]),s.push(o);else if(e>ft)for(o=ft,i=Math.min(e,at);i>o;++o)a.push(B[o]),c.push(o);if(n>at)for(o=Math.max(e,at),i=n;i>o;++o)f.push(B[o]),s.push(o);else if(at>n)for(o=Math.max(ft,n),i=at;i>o;++o)a.push(B[o]),c.push(o);if(t){var l=[],h=[];for(o=0;o<f.length;o++)Q[f[o]]++,X[s[o]]=0,1===Q[f[o]]&&(k[W][f[o]]^=P,l.push(f[o]));for(o=0;o<a.length;o++)Q[a[o]]--,X[c[o]]=1,0===Q[a[o]]&&(k[W][a[o]]^=P,h.push(a[o]));if(f=l,a=h,0===r[0]&&r[1]===G.length)for(o=0;o<et.length;o++)k[W][u=et[o]]&P&&(k[W][u]^=P,f.push(u));else for(o=0;o<et.length;o++)k[W][u=et[o]]&P||(k[W][u]^=P,a.push(u))}else{for(o=0;o<f.length;o++)k[W][f[o]]^=P;for(o=0;o<a.length;o++)k[W][a[o]]^=P}return ft=e,at=n,M.forEach(function(r){r(P,W,f,a)}),O("filtered"),tt}function w(r){return null==r?z():Array.isArray(r)?A(r):"function"==typeof r?F(r):E(r)}function E(r){return _((ot=a.filterExact(v,r))(G))}function A(r){return _((ot=a.filterRange(v,r))(G))}function z(){return _((ot=a.filterAll)(G))}function F(r){Z=r,ot=a.filterAll,q(r,!1);var t=ot(G);return ft=t[0],at=t[1],tt}function q(r,e){var n,o,i,u=[],f=[],a=[],s=[],c=G.length;if(!t)for(n=0;c>n;++n)!(k[W][o=B[n]]&P)^!!(i=r(G[n],n))&&(i?u.push(o):f.push(o));if(t)for(n=0;c>n;++n)r(G[n],n)?(u.push(B[n]),a.push(n)):(f.push(B[n]),s.push(n));if(t){var l=[],h=[];for(n=0;n<u.length;n++)1===X[a[n]]&&(Q[u[n]]++,X[a[n]]=0,1===Q[u[n]]&&(k[W][u[n]]^=P,l.push(u[n])));for(n=0;n<f.length;n++)0===X[s[n]]&&(Q[f[n]]--,X[s[n]]=1,0===Q[f[n]]&&(k[W][f[n]]^=P,h.push(f[n])));if(u=l,f=h,e)for(n=0;n<et.length;n++)k[W][o=et[n]]&P&&(k[W][o]^=P,u.push(o));else for(n=0;n<et.length;n++)k[W][o=et[n]]&P||(k[W][o]^=P,f.push(o))}else{for(n=0;n<u.length;n++)k[W][u[n]]&P&&(k[W][u[n]]&=T);for(n=0;n<f.length;n++)k[W][f[n]]&P||(k[W][f[n]]|=P)}M.forEach(function(r){r(P,W,u,f)}),O("filtered")}function N(r,e){var n,o=[],i=at,u=0;for(e&&e>0&&(u=e);--i>=ft&&r>0;)k.zero(n=B[i])&&(u>0?--u:(o.push(j[n]),--r));if(t)for(i=0;i<et.length&&r>0;i++)k.zero(n=et[i])&&(u>0?--u:(o.push(j[n]),--r));return o}function R(r,e){var n,o,i=[],u=0;if(e&&e>0&&(u=e),t)for(n=0;n<et.length&&r>0;n++)k.zero(o=et[n])&&(u>0?--u:(i.push(j[o]),--r));for(n=ft;at>n&&r>0;)k.zero(o=B[n])&&(u>0?--u:(i.push(j[o]),--r)),n++;return i}function U(r){function e(e,n,s,l){function h(){return t?(K++,void 0):(++K===H&&(w=f.arrayWiden(w,J<<=1),q=f.arrayWiden(q,J),H=u(J)),void 0)}t&&(L=s,s=G.length-e.length,l=e.length);var p,y,g,b,_,x,m=F,w=t?[]:o(K,H),E=U,A=D,O=I,z=K,$=0,C=0;for(X&&(E=O=c),X&&(A=O=c),F=new Array(K),K=0,q=t?z?q:[]:z>1?f.arrayLengthen(q,S):o(S,H),z&&(g=(y=m[0]).key);l>C&&!((b=r(e[C]))>=b);)++C;for(;l>C;){for(y&&b>=g?(_=y,x=g,w[$]=K,y=m[++$],y&&(g=y.key)):(_={key:b,value:O()},x=b),F[K]=_;x>=b&&(p=n[C]+(t?L:s),t?q[p]?q[p].push(K):q[p]=[K]:q[p]=K,_.value=E(_.value,j[p],!0),k.zeroExcept(p,W,T)||(_.value=A(_.value,j[p],!1)),!(++C>=l));)b=r(e[C]);h()}for(;z>$;)F[w[$]=K]=m[$++],h();if(t)for(var N=0;S>N;N++)q[N]||(q[N]=[]);if(K>$)if(t)for($=0;L>$;++$)for(N=0;N<q[$].length;N++)q[$][N]=w[q[$][N]];else for($=0;s>$;++$)q[$]=w[q[$]];p=M.indexOf(Q),K>1||t?(Q=i,V=v):(!K&&Y&&(K=1,F=[{key:null,value:O()}]),1===K?(Q=a,V=d):(Q=c,V=c),q=null),M[p]=Q}function n(r){if(K>1||t){var e,n,u,f=K,s=F,l=o(f,f);if(t){for(e=0,u=0;S>e;++e)if(r[e]!==m){for(q[u]=q[e],n=0;n<q[u].length;n++)l[q[u][n]]=1;++u}}else for(e=0,u=0;S>e;++e)r[e]!==m&&(l[q[u]=q[e]]=1,++u);for(F=[],K=0,e=0;f>e;++e)l[e]&&(l[e]=K++,F.push(s[e]));if(K>1||t)if(t)for(e=0;u>e;++e)for(n=0;n<q[e].length;++n)q[e][n]=l[q[e][n]];else for(e=0;u>e;++e)q[e]=l[q[e]];else q=null;M[M.indexOf(Q)]=K>1||t?(V=v,Q=i):1===K?(V=d,Q=a):V=Q=c}else if(1===K){if(Y)return;for(var h=0;S>h;++h)if(r[h]!==m)return;F=[],K=0,M[M.indexOf(Q)]=Q=V=c}}function i(r,e,n,o,i){if(!(r===P&&e===W||X)){var u,f,a,s,c;if(t){for(u=0,s=n.length;s>u;++u)if(k.zeroExcept(a=n[u],W,T))for(f=0;f<q[a].length;f++)c=F[q[a][f]],c.value=U(c.value,j[a],!1,f);for(u=0,s=o.length;s>u;++u)if(k.onlyExcept(a=o[u],W,T,e,r))for(f=0;f<q[a].length;f++)c=F[q[a][f]],c.value=D(c.value,j[a],i,f)}else{for(u=0,s=n.length;s>u;++u)k.zeroExcept(a=n[u],W,T)&&(c=F[q[a]],c.value=U(c.value,j[a],!1));for(u=0,s=o.length;s>u;++u)k.onlyExcept(a=o[u],W,T,e,r)&&(c=F[q[a]],c.value=D(c.value,j[a],i))}}}function a(r,t,e,n,o){if(!(r===P&&t===W||X)){var i,u,f,a=F[0];for(i=0,f=e.length;f>i;++i)k.zeroExcept(u=e[i],W,T)&&(a.value=U(a.value,j[u],!1));for(i=0,f=n.length;f>i;++i)k.onlyExcept(u=n[i],W,T,t,r)&&(a.value=D(a.value,j[u],o))}}function v(){var r,e,n;for(r=0;K>r;++r)F[r].value=I();if(t){for(r=0;S>r;++r)for(e=0;e<q[r].length;e++)n=F[q[r][e]],n.value=U(n.value,j[r],!0,e);for(r=0;S>r;++r)if(!k.zeroExcept(r,W,T))for(e=0;e<q[r].length;e++)n=F[q[r][e]],n.value=D(n.value,j[r],!1,e)}else{for(r=0;S>r;++r)n=F[q[r]],n.value=U(n.value,j[r],!0);for(r=0;S>r;++r)k.zeroExcept(r,W,T)||(n=F[q[r]],n.value=D(n.value,j[r],!1))}}function d(){var r,t=F[0];for(t.value=I(),r=0;S>r;++r)t.value=U(t.value,j[r],!0);for(r=0;S>r;++r)k.zeroExcept(r,W,T)||(t.value=D(t.value,j[r],!1))}function y(){return X&&(V(),X=!1),F}function g(r){var t=N(y(),0,F.length,r);return R.sort(t,0,t.length)}function _(r,t,e){return U=r,D=t,I=e,X=!0,$}function x(){return _(b.reduceIncrement,b.reduceDecrement,l)}function w(r){return _(b.reduceAdd(r),b.reduceSubtract(r),l)}function E(r){function t(t){return r(t.value)}return N=h.by(t),R=p.by(t),$}function A(){return E(s)}function O(){return K}function z(){var r=M.indexOf(Q);return r>=0&&M.splice(r,1),r=it.indexOf(e),r>=0&&it.splice(r,1),r=C.indexOf(n),r>=0&&C.splice(r,1),$}var $={top:g,all:y,reduce:_,reduceCount:x,reduceSum:w,order:E,orderNatural:A,size:O,dispose:z,remove:z};ut.push($);var F,q,N,R,U,D,I,L,J=8,H=u(J),K=0,Q=c,V=c,X=!0,Y=r===c;return arguments.length<1&&(r=s),M.push(Q),it.push(e),C.push(n),e(G,B,0,S),x().orderNatural()}function D(){var r=U(c),t=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return t()[0].value},r}function I(){ut.forEach(function(r){r.dispose()});var r=$.indexOf(e);return r>=0&&$.splice(r,1),r=$.indexOf(n),r>=0&&$.splice(r,1),r=C.indexOf(d),r>=0&&C.splice(r,1),k.masks[W]&=T,z()}if("string"==typeof r){var L=r;r=function(r){return x(r,L)}}var P,T,W,J,G,B,H,K,Q,V,X,Y,Z,rt,tt={filter:w,filterExact:E,filterRange:A,filterFunction:F,filterAll:z,top:N,bottom:R,group:U,groupAll:D,dispose:I,remove:I,accessor:r,id:function(){return J}},et=[],nt=g.by(function(r){return H[r]}),ot=a.filterAll,it=[],ut=[],ft=0,at=0,st=0;$.unshift(e),$.push(n),C.push(d);var ct=k.add();return W=ct.offset,P=ct.one,T=~P,J=W<<7|Math.log(P)/Math.log(2),e(j,0,S),n(j,0,S),tt}function d(){function r(r,t){var e;if(!v)for(e=t;S>e;++e)a=s(a,j[e],!0),k.zero(e)||(a=c(a,j[e],!1))}function t(r,t,e,n,o){var i,u,f;if(!v){for(i=0,f=e.length;f>i;++i)k.zero(u=e[i])&&(a=s(a,j[u],o));for(i=0,f=n.length;f>i;++i)k.only(u=n[i],t,r)&&(a=c(a,j[u],o))}}function e(){var r;for(a=h(),r=0;S>r;++r)a=s(a,j[r],!0),k.zero(r)||(a=c(a,j[r],!1))}function n(r,t,e){return s=r,c=t,h=e,v=!0,p}function o(){return n(b.reduceIncrement,b.reduceDecrement,l)}function i(r){return n(b.reduceAdd(r),b.reduceSubtract(r),l)}function u(){return v&&(e(),v=!1),a}function f(){var e=M.indexOf(t);return e>=0&&M.splice(e,1),e=$.indexOf(r),e>=0&&$.splice(e,1),p}var a,s,c,h,p={reduce:n,reduceCount:o,reduceSum:i,value:u,dispose:f,remove:f},v=!0;return M.push(t),$.push(r),r(j,0,S),o()}function _(){return S}function w(){return j}function E(){var r=[],t=0;for(t=0;S>t;t++)k.zero(t)&&r.push(j[t]);return r}function A(r){return"function"!=typeof r?(console.warn("onChange callback parameter must be a function!"),void 0):(F.push(r),function(){F.splice(F.indexOf(r),1)})}function O(r){for(var t=0;t<F.length;t++)F[t](r)}var k,z={add:r,remove:t,dimension:n,groupAll:d,size:_,all:w,allFiltered:E,onChange:A,isElementFiltered:e},j=[],S=0,M=[],$=[],C=[],F=[];return k=new f.bitarray(0),arguments.length?r(arguments[0]):z}function o(r,t){return(257>t?f.array8:65537>t?f.array16:f.array32)(r)}function i(r){for(var t=o(r,r),e=-1;++e<r;)t[e]=e;return t}function u(r){return 8===r?256:16===r?65536:4294967296}var f=r("./array"),a=r("./filter"),s=r("./identity"),c=r("./null"),l=r("./zero"),h=r("./heapselect"),p=r("./heap"),v=r("./bisect"),d=r("./insertionsort"),y=r("./permute"),g=r("./quicksort"),b=r("./reduce"),_=r("./../package.json"),x=r("lodash.result"),m=-1;e.crossfilter=n,e.crossfilter.heap=p,e.crossfilter.heapselect=h,e.crossfilter.bisect=v,e.crossfilter.insertionsort=d,e.crossfilter.permute=y,e.crossfilter.quicksort=g,e.crossfilter.version=_.version},{"./../package.json":3,"./array":4,"./bisect":5,"./filter":7,"./heap":8,"./heapselect":9,"./identity":10,"./insertionsort":11,"./null":12,"./permute":13,"./quicksort":14,"./reduce":15,"./zero":16,"lodash.result":2}],7:[function(r,t){"use strict";function e(r,t){return function(e){var n=e.length;return[r.left(e,t,0,n),r.right(e,t,0,n)]}}function n(r,t){var e=t[0],n=t[1];return function(t){var o=t.length;return[r.left(t,e,0,o),r.left(t,n,0,o)]}}function o(r){return[0,r.length]}t.exports={filterExact:e,filterRange:n,filterAll:o}},{}],8:[function(r,t){"use strict";function e(r){function t(r,t,e){for(var o=e-t,i=(o>>>1)+1;--i>0;)n(r,i,o,t);return r}function e(r,t,e){for(var o,i=e-t;--i>0;)o=r[t],r[t]=r[t+i],r[t+i]=o,n(r,1,i,t);return r}function n(t,e,n,o){for(var i,u=t[--o+e],f=r(u);(i=e<<1)<=n&&(n>i&&r(t[o+i])>r(t[o+i+1])&&i++,!(f<=r(t[o+i])));)t[o+e]=t[o+i],e=i;t[o+e]=u}return t.sort=e,t}var n=r("./identity");t.exports=e(n),t.exports.by=e},{"./identity":10}],9:[function(r,t){"use strict";function e(r){function t(t,n,o,i){var u,f,a,s=new Array(i=Math.min(o-n,i));for(f=0;i>f;++f)s[f]=t[n++];if(e(s,0,i),o>n){u=r(s[0]);do r(a=t[n])>u&&(s[0]=a,u=r(e(s,0,i)[0]));while(++n<o)}return s}var e=o.by(r);return t}var n=r("./identity"),o=r("./heap");t.exports=e(n),t.exports.by=e},{"./heap":8,"./identity":10}],10:[function(r,t){"use strict";function e(r){return r}t.exports=e},{}],11:[function(r,t){"use strict";function e(r){function t(t,e,n){for(var o=e+1;n>o;++o){for(var i=o,u=t[o],f=r(u);i>e&&r(t[i-1])>f;--i)t[i]=t[i-1];t[i]=u}return t}return t}var n=r("./identity");t.exports=e(n),t.exports.by=e},{"./identity":10}],12:[function(r,t){"use strict";function e(){return null}t.exports=e},{}],13:[function(r,t){"use strict";function e(r,t,e){for(var n=0,o=t.length,i=e?JSON.parse(JSON.stringify(r)):new Array(o);o>n;++n)i[n]=r[t[n]];return i}t.exports=e},{}],14:[function(r,t){function e(r){function t(r,t,o){return(i>o-t?n:e)(r,t,o)}function e(e,n,o){var i,u=0|(o-n)/6,f=n+u,a=o-1-u,s=n+o-1>>1,c=s-u,l=s+u,h=e[f],p=r(h),v=e[c],d=r(v),y=e[s],g=r(y),b=e[l],_=r(b),x=e[a],m=r(x);p>d&&(i=h,h=v,v=i,i=p,p=d,d=i),_>m&&(i=b,b=x,x=i,i=_,_=m,m=i),p>g&&(i=h,h=y,y=i,i=p,p=g,g=i),d>g&&(i=v,v=y,y=i,i=d,d=g,g=i),p>_&&(i=h,h=b,b=i,i=p,p=_,_=i),g>_&&(i=y,y=b,b=i,i=g,g=_,_=i),d>m&&(i=v,v=x,x=i,i=d,d=m,m=i),d>g&&(i=v,v=y,y=i,i=d,d=g,g=i),_>m&&(i=b,b=x,x=i,i=_,_=m,m=i);var w=v,E=d,A=b,O=_;e[f]=h,e[c]=e[n],e[s]=y,e[l]=e[o-1],e[a]=x;var k=n+1,z=o-2,j=O>=E&&E>=O;if(j)for(var S=k;z>=S;++S){var M=e[S],$=r(M);if(E>$)S!==k&&(e[S]=e[k],e[k]=M),++k;else if($>E)for(;;){var C=r(e[z]);{if(!(C>E)){if(E>C){e[S]=e[k],e[k++]=e[z],e[z--]=M;break}e[S]=e[z],e[z--]=M;break}z--}}}else!function(){for(var t=k;z>=t;t++){var n=e[t],o=r(n);if(E>o)t!==k&&(e[t]=e[k],e[k]=n),++k;else if(o>O)for(;;){var i=r(e[z]);{if(!(i>O)){E>i?(e[t]=e[k],e[k++]=e[z],e[z--]=n):(e[t]=e[z],e[z--]=n);break}if(z--,t>z)break}}}}();return e[n]=e[k-1],e[k-1]=w,e[o-1]=e[z+1],e[z+1]=A,t(e,n,k-1),t(e,z+2,o),j?e:(f>k&&z>a&&!function(){for(var t,n;(t=r(e[k]))<=E&&t>=E;)++k;for(;(n=r(e[z]))<=O&&n>=O;)--z;for(var o=k;z>=o;o++){var i=e[o],u=r(i);if(E>=u&&u>=E)o!==k&&(e[o]=e[k],e[k]=i),k++;else if(O>=u&&u>=O)for(;;){n=r(e[z]);{if(!(O>=n&&n>=O)){E>n?(e[o]=e[k],e[k++]=e[z],e[z--]=i):(e[o]=e[z],e[z--]=i);break}if(z--,o>z)break}}}}(),t(e,k,z+1))}var n=o.by(r);return t}var n=r("./identity"),o=r("./insertionsort"),i=32;t.exports=e(n),t.exports.by=e},{"./identity":10,"./insertionsort":11}],15:[function(r,t){"use strict";function e(r){return r+1}function n(r){return r-1}function o(r){return function(t,e){return t+ +r(e)}}function i(r){return function(t,e){return t-r(e)}}t.exports={reduceIncrement:e,reduceDecrement:n,reduceAdd:o,reduceSubtract:i}},{}],16:[function(r,t){"use strict";function e(){return 0}t.exports=e},{}]},{},[1])(1)});