forked from crossfilter/reductio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreductio.min.js
1 lines (1 loc) · 20.3 KB
/
reductio.min.js
1
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.reductio=e()}}(function(){return function e(n,t,r){function u(o,c){if(!t[o]){if(!n[o]){var s="function"==typeof require&&require;if(!c&&s)return s(o,!0);if(i)return i(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var d=t[o]={exports:{}};n[o][0].call(d.exports,function(e){var t=n[o][1][e];return u(t?t:e)},d,d.exports,e,n,t,r)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)u(r[o]);return u}({1:[function(e,n,t){(function(t){function r(){function e(e){if(t={reduceAdd:function(e){return e},reduceRemove:function(e){return e},reduceInitial:function(){return{}}},u.build(n,t),n.groupAll)if(e.top)console.warn("'groupAll' is defined but attempting to run on a standard dimension.group(). Must run on dimension.groupAll().");else{var r,i,o,a,d,l=s.bisect.by(function(e){return e.key}).left;e.reduce(function(e,u,c){for(o=n.groupAll(u),a=o.length,i=0;i<a;i++)d=o[i],r=l(e,d,0,e.length),e[r]&&e[r].key===d||e.splice(r,0,{key:d,value:t.reduceInitial()}),t.reduceAdd(e[r].value,u,c);return e},function(e,u,c){for(o=n.groupAll(u),a=o.length,i=0;i<a;i++)r=l(e,o[i],0,e.length),t.reduceRemove(e[r].value,u,c);return e},function(){return[]}),e.all||(e.all=function(){return this.value()})}else e.reduce(t.reduceAdd,t.reduceRemove,t.reduceInitial);return c(e,n,t),e}var n=o(),t={};return i.build(e,n),e}var u=e("./build.js"),i=e("./accessors.js"),o=e("./parameters.js"),c=e("./postprocess"),s="undefined"!=typeof window?window.crossfilter:"undefined"!=typeof t?t.crossfilter:null;e("./postprocessors")(r),c=c(r),n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessors.js":2,"./build.js":6,"./parameters.js":19,"./postprocess":20,"./postprocessors":21}],2:[function(e,n,t){function r(e,n){function t(e){if("string"==typeof e){var n=e,t=function(e){return e[n]};return t}return e}function i(e){if("string"==typeof e){var n=e,t=function(e){return+e[n]};return t}return e}e.fromObject=function(t){return arguments.length?(_assign(n,t),e):n},e.toObject=function(){return n},e.count=function(t,r){return arguments.length?(r||(r="count"),n.count=r,e):n.count},e.sum=function(t){return arguments.length?(t=i(t),n.sum=t,e):n.sum},e.avg=function(t){return arguments.length?(t=i(t),"function"==typeof t?(n.sum&&n.sum!==t&&console.warn("SUM aggregation is being overwritten by AVG aggregation"),n.sum=t,n.avg=!0,n.count="count"):n.avg=t,e):n.avg},e.exception=function(r){return arguments.length?(r=t(r),n.exceptionAccessor=r,e):n.exceptionAccessor},e.filter=function(t){return arguments.length?(n.filter=t,e):n.filter},e.valueList=function(r){return arguments.length?(r=t(r),n.valueList=r,e):n.valueList},e.median=function(t){return arguments.length?(t=i(t),"function"==typeof t&&(n.valueList&&n.valueList!==t&&console.warn("VALUELIST accessor is being overwritten by median aggregation"),n.valueList=t),n.median=t,e):n.median},e.min=function(t){return arguments.length?(t=i(t),"function"==typeof t&&(n.valueList&&n.valueList!==t&&console.warn("VALUELIST accessor is being overwritten by min aggregation"),n.valueList=t),n.min=t,e):n.min},e.max=function(t){return arguments.length?(t=i(t),"function"==typeof t&&(n.valueList&&n.valueList!==t&&console.warn("VALUELIST accessor is being overwritten by max aggregation"),n.valueList=t),n.max=t,e):n.max},e.exceptionCount=function(r){return arguments.length?(r=t(r),"function"==typeof r?(n.exceptionAccessor&&n.exceptionAccessor!==r&&console.warn("EXCEPTION accessor is being overwritten by exception count aggregation"),n.exceptionAccessor=r,n.exceptionCount=!0):n.exceptionCount=r,e):n.exceptionCount},e.exceptionSum=function(t){return arguments.length?(t=i(t),n.exceptionSum=t,e):n.exceptionSum},e.histogramValue=function(t){return arguments.length?(t=i(t),n.histogramValue=t,e):n.histogramValue},e.histogramBins=function(t){return arguments.length?(n.histogramThresholds=t,e):n.histogramThresholds},e.std=function(t){return arguments.length?(t=i(t),"function"==typeof t?(n.sumOfSquares=t,n.sum=t,n.count="count",n.std=!0):n.std=t,e):n.std},e.sumOfSq=function(t){return arguments.length?(t=i(t),n.sumOfSquares=t,e):n.sumOfSquares},e.value=function(e,t){return arguments.length&&"string"==typeof e?(n.values||(n.values={}),n.values[e]={},n.values[e].parameters=u(),r(n.values[e],n.values[e].parameters),t&&(n.values[e].accessor=t),n.values[e]):void console.error("'value' requires a string argument.")},e.nest=function(r){return arguments.length?(r.map(t),n.nestKeys=r,e):n.nestKeys},e.alias=function(t){return arguments.length?(n.aliasKeys=t,e):n.aliasKeys},e.aliasProp=function(t){return arguments.length?(n.aliasPropKeys=t,e):n.aliasPropKeys},e.groupAll=function(t){return arguments.length?(n.groupAll=t,e):n.groupAll},e.dataList=function(t){return arguments.length?(n.dataList=t,e):n.dataList},e.custom=function(t){return arguments.length?(n.custom=t,e):n.custom}}var u=e("./parameters.js");_assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),t=1;t<arguments.length;++t){var r=arguments[t];if(null!=r)for(var u in r)r.hasOwnProperty(u)&&(n[u]=r[u])}return n};var i={build:r};n.exports=i},{"./parameters.js":19}],3:[function(e,n,t){var r={initial:function(e,n,t){return function(r){function u(e){return function(){return t[e](n(r))}}e&&(r=e(r));for(var i in t)n(r)[i]=u(i);return r}}};n.exports=r},{}],4:[function(e,n,t){var r={add:function(e,n,t){return function(r,u,i){n&&n(r,u,i);for(var o in e)t(r)[o]=e[o](t(r),u);return r}}};n.exports=r},{}],5:[function(e,n,t){var r={add:function(e,n,t){return function(e,r,u){return n&&n(e,r,u),t(e).count>0?t(e).avg=t(e).sum/t(e).count:t(e).avg=0,e}},remove:function(e,n,t){return function(e,r,u){return n&&n(e,r,u),t(e).count>0?t(e).avg=t(e).sum/t(e).count:t(e).avg=0,e}},initial:function(e,n){return function(t){return t=e(t),n(t).avg=0,t}}};n.exports=r},{}],6:[function(e,n,t){function r(e,n,t){t||(t=function(e){return e});var b={reduceAdd:n.reduceAdd,reduceRemove:n.reduceRemove,reduceInitial:n.reduceInitial};(e.count||e.std)&&(n.reduceAdd=i.add(n.reduceAdd,t,e.count),n.reduceRemove=i.remove(n.reduceRemove,t,e.count),n.reduceInitial=i.initial(n.reduceInitial,t,e.count)),e.sum&&(n.reduceAdd=o.add(e.sum,n.reduceAdd,t),n.reduceRemove=o.remove(e.sum,n.reduceRemove,t),n.reduceInitial=o.initial(n.reduceInitial,t)),e.avg&&(e.count&&e.sum?(n.reduceAdd=c.add(e.sum,n.reduceAdd,t),n.reduceRemove=c.remove(e.sum,n.reduceRemove,t),n.reduceInitial=c.initial(n.reduceInitial,t)):console.error("You must set .count(true) and define a .sum(accessor) to use .avg(true).")),e.exceptionCount&&(e.exceptionAccessor?(n.reduceAdd=v.add(e.exceptionAccessor,n.reduceAdd,t),n.reduceRemove=v.remove(e.exceptionAccessor,n.reduceRemove,t),n.reduceInitial=v.initial(n.reduceInitial,t)):console.error("You must define an .exception(accessor) to use .exceptionCount(true).")),e.exceptionSum&&(e.exceptionAccessor?(n.reduceAdd=m.add(e.exceptionAccessor,e.exceptionSum,n.reduceAdd,t),n.reduceRemove=m.remove(e.exceptionAccessor,e.exceptionSum,n.reduceRemove,t),n.reduceInitial=m.initial(n.reduceInitial,t)):console.error("You must define an .exception(accessor) to use .exceptionSum(accessor).")),(e.valueList||e.median||e.min||e.max)&&(n.reduceAdd=f.add(e.valueList,n.reduceAdd,t),n.reduceRemove=f.remove(e.valueList,n.reduceRemove,t),n.reduceInitial=f.initial(n.reduceInitial,t)),e.dataList&&(n.reduceAdd=w.add(e.dataList,n.reduceAdd,t),n.reduceRemove=w.remove(e.dataList,n.reduceRemove,t),n.reduceInitial=w.initial(n.reduceInitial,t)),e.median&&(n.reduceAdd=s.add(n.reduceAdd,t),n.reduceRemove=s.remove(n.reduceRemove,t),n.reduceInitial=s.initial(n.reduceInitial,t)),e.min&&(n.reduceAdd=a.add(n.reduceAdd,t),n.reduceRemove=a.remove(n.reduceRemove,t),n.reduceInitial=a.initial(n.reduceInitial,t)),e.max&&(n.reduceAdd=d.add(n.reduceAdd,t),n.reduceRemove=d.remove(n.reduceRemove,t),n.reduceInitial=d.initial(n.reduceInitial,t)),e.exceptionAccessor&&(n.reduceAdd=l.add(e.exceptionAccessor,n.reduceAdd,t),n.reduceRemove=l.remove(e.exceptionAccessor,n.reduceRemove,t),n.reduceInitial=l.initial(n.reduceInitial,t)),e.histogramValue&&e.histogramThresholds&&(n.reduceAdd=p.add(e.histogramValue,n.reduceAdd,t),n.reduceRemove=p.remove(e.histogramValue,n.reduceRemove,t),n.reduceInitial=p.initial(e.histogramThresholds,n.reduceInitial,t)),e.sumOfSquares&&(n.reduceAdd=g.add(e.sumOfSquares,n.reduceAdd,t),n.reduceRemove=g.remove(e.sumOfSquares,n.reduceRemove,t),n.reduceInitial=g.initial(n.reduceInitial,t)),e.std&&(e.sumOfSquares&&e.sum?(n.reduceAdd=h.add(n.reduceAdd,t),n.reduceRemove=h.remove(n.reduceRemove,t),n.reduceInitial=h.initial(n.reduceInitial,t)):console.error("You must set .sumOfSq(accessor) and define a .sum(accessor) to use .std(true). Or use .std(accessor).")),e.custom&&(n.reduceAdd=L.add(n.reduceAdd,t,e.custom.add),n.reduceRemove=L.remove(n.reduceRemove,t,e.custom.remove),n.reduceInitial=L.initial(n.reduceInitial,t,e.custom.initial)),e.nestKeys&&(n.reduceAdd=x.add(e.nestKeys,n.reduceAdd,t),n.reduceRemove=x.remove(e.nestKeys,n.reduceRemove,t),n.reduceInitial=x.initial(n.reduceInitial,t)),e.aliasKeys&&(n.reduceInitial=y.initial(n.reduceInitial,t,e.aliasKeys)),e.aliasPropKeys&&(n.reduceAdd=A.add(e.aliasPropKeys,n.reduceAdd,t),n.reduceRemove=A.add(e.aliasPropKeys,n.reduceRemove,t)),e.filter&&(n.reduceAdd=u.add(e.filter,n.reduceAdd,b.reduceAdd,t),n.reduceRemove=u.remove(e.filter,n.reduceRemove,b.reduceRemove,t)),e.values&&Object.getOwnPropertyNames(e.values).forEach(function(u){var i=function(e){return function(n){return n=e(n),t(n)[u]={},n}};n.reduceInitial=i(n.reduceInitial),r(e.values[u].parameters,n,function(e){return e[u]})})}var u=e("./filter.js"),i=e("./count.js"),o=e("./sum.js"),c=e("./avg.js"),s=e("./median.js"),a=e("./min.js"),d=e("./max.js"),l=e("./value-count.js"),f=e("./value-list.js"),v=e("./exception-count.js"),m=e("./exception-sum.js"),p=e("./histogram.js"),g=e("./sum-of-squares.js"),h=e("./std.js"),x=e("./nest.js"),y=e("./alias.js"),A=e("./aliasProp.js"),w=e("./data-list.js"),L=e("./custom.js"),b={build:r};n.exports=b},{"./alias.js":3,"./aliasProp.js":4,"./avg.js":5,"./count.js":8,"./custom.js":9,"./data-list.js":10,"./exception-count.js":11,"./exception-sum.js":12,"./filter.js":13,"./histogram.js":14,"./max.js":15,"./median.js":16,"./min.js":17,"./nest.js":18,"./std.js":23,"./sum-of-squares.js":24,"./sum.js":25,"./value-count.js":26,"./value-list.js":27}],7:[function(e,n,t){var r=function(e){return function(n){return n[e]}};_grouper=function(e,n){return e||(e=function(e){return e}),function(t,r){n&&n(t,r);var u=e(t),i=e(r);return"undefined"!=typeof i.count&&(u.count+=i.count),"undefined"!=typeof i.sum&&(u.sum+=i.sum),"undefined"!=typeof i.avg&&(u.avg=u.sum/u.count),t}},reductio_cap=function(e,n,t){var u=(n.reduceInitial(),t.values?Object.keys(t.values):[]),i=_grouper();if(u.length)for(var o=0;o<u.length;++o)i=_grouper(r(u[o]),i);return function(t,r){if(!arguments.length)return e();if(t===1/0||!t)return e();var u=e(),o=t-1;if(u.length<=t)return u;var c=u.slice(0,o),s={key:r||"Others"};s.value=n.reduceInitial();for(var a=o;a<u.length;++a)i(s.value,u[a].value);return c.push(s),c}},n.exports=reductio_cap},{}],8:[function(e,n,t){var r={add:function(e,n,t){return function(r,u,i){return e&&e(r,u,i),n(r)[t]++,r}},remove:function(e,n,t){return function(r,u,i){return e&&e(r,u,i),n(r)[t]--,r}},initial:function(e,n,t){return function(r){return e&&(r=e(r)),n(r)[t]=0,r}}};n.exports=r},{}],9:[function(e,n,t){var r={add:function(e,n,t){return function(n,r,u){return e&&e(n,r,u),t(n,r)}},remove:function(e,n,t){return function(n,r,u){return e&&e(n,r,u),t(n,r)}},initial:function(e,n,t){return function(n){return e&&(n=e(n)),t(n)}}};n.exports=r},{}],10:[function(e,n,t){var r={add:function(e,n,t){return function(e,r,u){return n&&n(e,r,u),t(e).dataList.push(r),e}},remove:function(e,n,t){return function(e,r,u){return n&&n(e,r,u),t(e).dataList.splice(t(e).dataList.indexOf(r),1),e}},initial:function(e,n){return function(t){return e&&(t=e(t)),n(t).dataList=[],t}}};n.exports=r},{}],11:[function(e,n,t){var r={add:function(e,n,t){var r,u;return function(i,o,c){return n&&n(i,o,c),r=t(i).bisect(t(i).values,e(o),0,t(i).values.length),u=t(i).values[r],u&&u[0]===e(o)&&0!==u[1]||t(i).exceptionCount++,i}},remove:function(e,n,t){var r,u;return function(i,o,c){return n&&n(i,o,c),r=t(i).bisect(t(i).values,e(o),0,t(i).values.length),u=t(i).values[r],u&&u[0]===e(o)&&1===u[1]&&t(i).exceptionCount--,i}},initial:function(e,n){return function(t){return t=e(t),n(t).exceptionCount=0,t}}};n.exports=r},{}],12:[function(e,n,t){var r={add:function(e,n,t,r){var u,i;return function(o,c,s){return t&&t(o,c,s),u=r(o).bisect(r(o).values,e(c),0,r(o).values.length),i=r(o).values[u],i&&i[0]===e(c)&&0!==i[1]||(r(o).exceptionSum=r(o).exceptionSum+n(c)),o}},remove:function(e,n,t,r){var u,i;return function(o,c,s){return t&&t(o,c,s),u=r(o).bisect(r(o).values,e(c),0,r(o).values.length),i=r(o).values[u],i&&i[0]===e(c)&&1===i[1]&&(r(o).exceptionSum=r(o).exceptionSum-n(c)),o}},initial:function(e,n){return function(t){return t=e(t),n(t).exceptionSum=0,t}}};n.exports=r},{}],13:[function(e,n,t){var r={add:function(e,n,t){return function(r,u,i){return e(u,i)?n&&n(r,u,i):t&&t(r,u,i),r}},remove:function(e,n,t){return function(r,u,i){return e(u,i)?n&&n(r,u,i):t&&t(r,u,i),r}}};n.exports=r},{}],14:[function(e,n,t){(function(e){var t="undefined"!=typeof window?window.crossfilter:"undefined"!=typeof e?e.crossfilter:null,r={add:function(e,n,r){var u,i=t.bisect.by(function(e){return e}).left,o=t.bisect.by(function(e){return e.x}).right;return function(t,c,s){return n&&n(t,c,s),u=r(t).histogram[o(r(t).histogram,e(c),0,r(t).histogram.length)-1],u.y++,u.splice(i(u,e(c),0,u.length),0,e(c)),t}},remove:function(e,n,r){var u,i=t.bisect.by(function(e){return e}).left,o=t.bisect.by(function(e){return e.x}).right;return function(t,c,s){return n&&n(t,c,s),u=r(t).histogram[o(r(t).histogram,e(c),0,r(t).histogram.length)-1],u.y--,u.splice(i(u,e(c),0,u.length),1),t}},initial:function(e,n,t){return function(r){r=n(r),t(r).histogram=[];for(var u=[],i=1;i<e.length;i++)u=[],u.x=e[i-1],u.dx=e[i]-e[i-1],u.y=0,t(r).histogram.push(u);return r}}};n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(e,n,t){var r={add:function(e,n){return function(t,r,u){return e&&e(t,r,u),n(t).max=n(t).valueList[n(t).valueList.length-1],t}},remove:function(e,n){return function(t,r,u){return e&&e(t,r,u),0===n(t).valueList.length?(n(t).max=void 0,t):(n(t).max=n(t).valueList[n(t).valueList.length-1],t)}},initial:function(e,n){return function(t){return t=e(t),n(t).max=void 0,t}}};n.exports=r},{}],16:[function(e,n,t){var r={add:function(e,n){var t;return function(r,u,i){return e&&e(r,u,i),t=Math.floor(n(r).valueList.length/2),n(r).valueList.length%2?n(r).median=n(r).valueList[t]:n(r).median=(n(r).valueList[t-1]+n(r).valueList[t])/2,r}},remove:function(e,n){var t;return function(r,u,i){return e&&e(r,u,i),t=Math.floor(n(r).valueList.length/2),0===n(r).valueList.length?(n(r).median=void 0,r):(1===n(r).valueList.length||n(r).valueList.length%2?n(r).median=n(r).valueList[t]:n(r).median=(n(r).valueList[t-1]+n(r).valueList[t])/2,r)}},initial:function(e,n){return function(t){return t=e(t),n(t).median=void 0,t}}};n.exports=r},{}],17:[function(e,n,t){var r={add:function(e,n){return function(t,r,u){return e&&e(t,r,u),n(t).min=n(t).valueList[0],t}},remove:function(e,n){return function(t,r,u){return e&&e(t,r,u),0===n(t).valueList.length?(n(t).min=void 0,t):(n(t).min=n(t).valueList[0],t)}},initial:function(e,n){return function(t){return t=e(t),n(t).min=void 0,t}}};n.exports=r},{}],18:[function(e,n,t){(function(e){var t=("undefined"!=typeof window?window.crossfilter:"undefined"!=typeof e?e.crossfilter:null,{add:function(e,n,t){var r,u;return function(i,o,c){return n&&n(i,o,c),r=t(i).nest,e.forEach(function(e){u=r.filter(function(n){return n.key===e(o)})[0],u?r=u.values:(u=[],r.push({key:e(o),values:u}),r=u)}),r.push(o),i}},remove:function(e,n,t){var r;return function(u,i,o){return n&&n(u,i,o),r=t(u).nest,e.forEach(function(e){r=r.filter(function(n){return n.key===e(i)})[0].values}),r.splice(r.indexOf(i),1),u}},initial:function(e,n){return function(t){return t=e(t),n(t).nest=[],t}}});n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,n,t){var r=function(){return{order:!1,avg:!1,count:!1,sum:!1,exceptionAccessor:!1,exceptionCount:!1,exceptionSum:!1,filter:!1,valueList:!1,median:!1,histogramValue:!1,min:!1,max:!1,histogramThresholds:!1,std:!1,sumOfSquares:!1,values:!1,nestKeys:!1,aliasKeys:!1,aliasPropKeys:!1,groupAll:!1,dataList:!1,custom:!1}};n.exports=r},{}],20:[function(e,n,t){function r(e){return function(n,t,r){n.post=function(){var u=function(){return u.all()};u.all=function(){return n.all()};var i=e.postprocessors;return Object.keys(i).forEach(function(e){u[e]=function(){var n=u.all,o=[].slice.call(arguments);return u.all=function(){return i[e](n,r,t).apply(null,o)},u}}),u}}}n.exports=r},{}],21:[function(e,n,t){n.exports=function(n){n.postprocessors={},n.registerPostProcessor=function(e,t){n.postprocessors[e]=t},n.registerPostProcessor("cap",e("./cap")),n.registerPostProcessor("sortBy",e("./sortBy"))}},{"./cap":7,"./sortBy":22}],22:[function(e,n,t){function r(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}var u=function(e){if("function"==typeof e)return e;if(~e.indexOf(".")){var n=e.split(".");return function(e){return n.reduce(function(e,n){return e[n]},e)}}return function(n){return n[e]}},i=function(e,n){return function(t,r){return n(e(t),e(r))}};({}).toString;n.exports=function(e){return function(n,t){return 1===arguments.length&&(t=r),e().sort(i(u(n),t))}}},{}],23:[function(e,n,t){var r={add:function(e,n){return function(t,r,u){if(e&&e(t,r,u),n(t).count>0){n(t).std=0;var i=n(t).sumOfSq-n(t).sum*n(t).sum/n(t).count;i>0&&(n(t).std=Math.sqrt(i/(n(t).count-1)))}else n(t).std=0;return t}},remove:function(e,n){return function(t,r,u){if(e&&e(t,r,u),n(t).count>0){n(t).std=0;var i=n(t).sumOfSq-n(t).sum*n(t).sum/n(t).count;i>0&&(n(t).std=Math.sqrt(i/(n(t).count-1)))}else n(t).std=0;return t}},initial:function(e,n){return function(t){return t=e(t),n(t).std=0,t}}};n.exports=r},{}],24:[function(e,n,t){var r={add:function(e,n,t){return function(r,u,i){return n&&n(r,u,i),t(r).sumOfSq=t(r).sumOfSq+e(u)*e(u),r}},remove:function(e,n,t){return function(r,u,i){return n&&n(r,u,i),t(r).sumOfSq=t(r).sumOfSq-e(u)*e(u),r}},initial:function(e,n){return function(t){return t=e(t),n(t).sumOfSq=0,t}}};n.exports=r},{}],25:[function(e,n,t){var r={add:function(e,n,t){return function(r,u,i){return n&&n(r,u,i),t(r).sum=t(r).sum+e(u),r}},remove:function(e,n,t){return function(r,u,i){return n&&n(r,u,i),t(r).sum=t(r).sum-e(u),r}},initial:function(e,n){return function(t){return t=e(t),n(t).sum=0,t}}};n.exports=r},{}],26:[function(e,n,t){(function(e){var t="undefined"!=typeof window?window.crossfilter:"undefined"!=typeof e?e.crossfilter:null,r={add:function(e,n,t){var r,u;return function(i,o,c){return n&&n(i,o,c),r=t(i).bisect(t(i).values,e(o),0,t(i).values.length),u=t(i).values[r],u&&u[0]===e(o)?u[1]++:t(i).values.splice(r,0,[e(o),1]),i}},remove:function(e,n,t){var r;return function(u,i,o){return n&&n(u,i,o),r=t(u).bisect(t(u).values,e(i),0,t(u).values.length),t(u).values[r][1]--,u}},initial:function(e,n){return function(r){return r=e(r),n(r).values=[],n(r).bisect=t.bisect.by(function(e){return e[0]}).left,r}}};n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,n,t){(function(e){var t="undefined"!=typeof window?window.crossfilter:"undefined"!=typeof e?e.crossfilter:null,r={add:function(e,n,r){var u,i=t.bisect.by(function(e){return e}).left;return function(t,o,c){return n&&n(t,o,c),u=i(r(t).valueList,e(o),0,r(t).valueList.length),r(t).valueList.splice(u,0,e(o)),t}},remove:function(e,n,r){var u,i=t.bisect.by(function(e){return e}).left;return function(t,o,c){return n&&n(t,o,c),u=i(r(t).valueList,e(o),0,r(t).valueList.length),r(t).valueList.splice(u,1),t}},initial:function(e,n){return function(t){return t=e(t),n(t).valueList=[],t}}};n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});