{"version":3,"sources":["/source/pivot.coffee","pivot.min.js"],"names":["callWithJQuery","indexOf","item","i","l","this","length","slice","bind","fn","me","apply","arguments","hasProp","hasOwnProperty","pivotModule","exports","module","require","define","amd","jQuery","$","PivotData","addSeparators","aggregatorTemplates","aggregators","dayNamesEn","derivers","getSort","locales","mthNamesEn","naturalSort","numberFormat","pivotTableRenderer","rd","renderers","rx","rz","sortAs","usFmt","usFmtInt","usFmtPct","zeroPad","nStr","thousandsSep","decimalSep","rgx","x","x1","x2","split","test","replace","opts","defaults","digitsAfterDecimal","scaler","prefix","suffix","showZero","extend","result","isNaN","isFinite","toFixed","count","formatter","data","rowKey","colKey","push","value","format","uniques","arg","attr","uniq","record","ref","call","numInputs","sum","parseFloat","extremes","mode","val","sorter","sorters","ref1","ref2","Math","quantile","q","vals","sort","a","b","floor","ceil","runningStat","ddof","n","m","s","m_new","sqrt","sumOverSum","denom","num","sumNum","sumDenom","sumOverSumBound80","upper","sign","fractionOf","wrapped","type","selector","total","row","col","inner","getAggregator","countUnique","f","listUnique","join","max","min","first","last","median","average","stdev","tpl","Count","Count Unique Values","List Unique Values","Sum","Integer Sum","Average","Median","Sample Variance","Sample Standard Deviation","Minimum","Maximum","First","Last","Sum over Sum","80% Upper Bound","80% Lower Bound","Sum as Fraction of Total","Sum as Fraction of Rows","Sum as Fraction of Columns","Count as Fraction of Total","Count as Fraction of Rows","Count as Fraction of Columns","Table","Table Barchart","barchart","Heatmap","heatmap","Row Heatmap","Col Heatmap","en","localeStrings","renderError","computeError","uiRenderError","selectAll","selectNone","tooMany","filterResults","cancel","totals","vs","by","number","substr","bin","binWidth","dateFormat","formatString","utcOutput","mthNames","dayNames","utc","date","Date","parse","p","_this","as","bs","a1","b1","nas","nbs","String","match","shift","order","l_mapping","mapping","toLowerCase","isFunction","input","ref3","ref4","ref5","ref6","ref7","ref8","ref9","getRowKeys","getColKeys","sortKeys","arrSort","aggregator","aggregatorName","colAttrs","cols","rowAttrs","rows","valAttrs","rowOrder","colOrder","derivedAttributes","filter","tree","rowKeys","colKeys","rowTotals","colTotals","allTotal","sorted","forEachRecord","processRecord","addRecord","compactRecord","j","k","len1","results","results1","tblCols","isEmptyObject","v","isArray","each","text","Error","prototype","forEachMatchingRecord","criteria","callback","attrs","sortersArr","comparison","r","c","flatColKey","flatRowKey","len2","fromCharCode","agg","pivotUtilities","pivotData","getClickHandler","spanSize","tbody","td","th","thead","totalAggregator","tr","txt","table","clickCallback","rowValues","colValues","filters","e","document","createElement","className","arr","len","noDraw","stop","parseInt","setAttribute","appendChild","textContent","innerHTML","onclick","pivot","inputOpts","locale","localeDefaults","dataClass","renderer","rendererOptions","_error","console","error","stack","html","hasChildNodes","removeChild","lastChild","append","pivotUI","overwrite","attrLength","attrValues","colOrderArrow","existingOpts","fn1","initialRender","len3","materializedInput","o","ordering","pivotTable","recordsProcessed","refresh","refreshDelayed","rendererControl","rowOrderArrow","shownAttributes","tr1","tr2","uiTable","unused","unusedAttrsVerticalAutoCutoff","unusedAttrsVerticalAutoOverride","hiddenAttributes","menuLimit","exclusions","inclusions","unusedAttrsVertical","autoSortUnusedAttrs","onRefresh","base","class","addClass","appendTo","attrElem","checkContainer","closeFilterBox","controls","filterItem","filterItemExcluded","finalButtons","hasExcludedItem","placeholder","triangleLink","valueCount","valueList","values","hide","accept","accept_gen","trim","accepted","real_filter","substring","startsWith","find","parent","show","prop","toggleClass","removeClass","left","top","currentTarget","position","css","key_a_to_z","rowSymbol","colSymbol","next","value_a_to_z","value_z_to_a","role","prepend","inArray","rendererName","len4","newDropdown","numInputsToProcess","pivotUIOptions","pvtVals","subopts","t","u","unusedAttrsContainer","remove","not","excludedItems","inclusionsInfo","children","setTimeout","sortable","update","ui","sender","connectWith","items","scope","colorScaleGenerator","heatmapper","numCols","numRows","nonRed","round","colorScale","forEachCell","elem","barcharter","wrapper","height","bottom","right","background-color","padding-left","padding-right","padding","padding-top","text-align"],"mappings":"CAAA,WAAA,GAAAA,GAAAC,KAAAA,SAAA,SAAA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cesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery\n\ncallWithJQuery ($) ->\n\n ###\n Utilities\n ###\n\n addSeparators = (nStr, thousandsSep, decimalSep) ->\n nStr += ''\n x = nStr.split('.')\n x1 = x[0]\n x2 = if x.length > 1 then decimalSep + x[1] else ''\n rgx = /(\\d+)(\\d{3})/\n x1 = x1.replace(rgx, '$1' + thousandsSep + '$2') while rgx.test(x1)\n return x1 + x2\n\n numberFormat = (opts) ->\n defaults =\n digitsAfterDecimal: 2, scaler: 1,\n thousandsSep: \",\", decimalSep: \".\"\n prefix: \"\", suffix: \"\"\n showZero: false\n opts = $.extend({}, defaults, opts)\n (x) ->\n return \"\" if isNaN(x) or not isFinite(x)\n return \"\" if x == 0 and not opts.showZero\n result = addSeparators (opts.scaler*x).toFixed(opts.digitsAfterDecimal), opts.thousandsSep, opts.decimalSep\n return \"\"+opts.prefix+result+opts.suffix\n\n #aggregator templates default to US number formatting but this is overrideable\n usFmt = numberFormat()\n usFmtInt = numberFormat(digitsAfterDecimal: 0)\n usFmtPct = numberFormat(digitsAfterDecimal:1, scaler: 100, suffix: \"%\")\n\n aggregatorTemplates =\n count: (formatter=usFmtInt) -> () -> (data, rowKey, colKey) ->\n count: 0\n push: -> @count++\n value: -> @count\n format: formatter\n\n uniques: (fn, formatter=usFmtInt) -> ([attr]) -> (data, rowKey, colKey) ->\n uniq: []\n push: (record) -> @uniq.push(record[attr]) if record[attr] not in @uniq\n value: -> fn(@uniq)\n format: formatter\n numInputs: if attr? then 0 else 1\n\n sum: (formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n sum: 0\n push: (record) -> @sum += parseFloat(record[attr]) if not isNaN parseFloat(record[attr])\n value: -> @sum\n format: formatter\n numInputs: if attr? then 0 else 1\n\n extremes: (mode, formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n val: null\n sorter: getSort(data?.sorters, attr)\n push: (record) ->\n x = record[attr]\n if mode in [\"min\", \"max\"]\n x = parseFloat(x)\n if not isNaN x then @val = Math[mode](x, @val ? x)\n if mode == \"first\" then @val = x if @sorter(x, @val ? x) <= 0\n if mode == \"last\" then @val = x if @sorter(x, @val ? x) >= 0\n value: -> @val\n format: (x) -> if isNaN(x) then x else formatter(x)\n numInputs: if attr? then 0 else 1\n\n quantile: (q, formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n vals: []\n push: (record) ->\n x = parseFloat(record[attr])\n @vals.push(x) if not isNaN(x)\n value: ->\n return null if @vals.length == 0\n @vals.sort((a,b) -> a-b)\n i = (@vals.length-1)*q\n return (@vals[Math.floor(i)] + @vals[Math.ceil(i)])/2.0\n format: formatter\n numInputs: if attr? then 0 else 1\n\n runningStat: (mode=\"mean\", ddof=1, formatter=usFmt) -> ([attr]) -> (data, rowKey, colKey) ->\n n: 0.0, m: 0.0, s: 0.0\n push: (record) ->\n x = parseFloat(record[attr])\n return if isNaN(x)\n @n += 1.0\n if @n == 1.0\n @m = x\n else\n m_new = @m + (x - @m)/@n\n @s = @s + (x - @m)*(x - m_new)\n @m = m_new\n value: ->\n if mode == \"mean\"\n return if @n == 0 then 0/0 else @m\n return 0 if @n <= ddof\n switch mode\n when \"var\" then @s/(@n-ddof)\n when \"stdev\" then Math.sqrt(@s/(@n-ddof))\n format: formatter\n numInputs: if attr? then 0 else 1\n\n sumOverSum: (formatter=usFmt) -> ([num, denom]) -> (data, rowKey, colKey) ->\n sumNum: 0\n sumDenom: 0\n push: (record) ->\n @sumNum += parseFloat(record[num]) if not isNaN parseFloat(record[num])\n @sumDenom += parseFloat(record[denom]) if not isNaN parseFloat(record[denom])\n value: -> @sumNum/@sumDenom\n format: formatter\n numInputs: if num? and denom? then 0 else 2\n\n sumOverSumBound80: (upper=true, formatter=usFmt) -> ([num, denom]) -> (data, rowKey, colKey) ->\n sumNum: 0\n sumDenom: 0\n push: (record) ->\n @sumNum += parseFloat(record[num]) if not isNaN parseFloat(record[num])\n @sumDenom += parseFloat(record[denom]) if not isNaN parseFloat(record[denom])\n value: ->\n sign = if upper then 1 else -1\n (0.821187207574908/@sumDenom + @sumNum/@sumDenom + 1.2815515655446004*sign*\n Math.sqrt(0.410593603787454/ (@sumDenom*@sumDenom) + (@sumNum*(1 - @sumNum/ @sumDenom))/ (@sumDenom*@sumDenom)))/\n (1 + 1.642374415149816/@sumDenom)\n format: formatter\n numInputs: if num? and denom? then 0 else 2\n\n fractionOf: (wrapped, type=\"total\", formatter=usFmtPct) -> (x...) -> (data, rowKey, colKey) ->\n selector: {total:[[],[]],row:[rowKey,[]],col:[[],colKey]}[type]\n inner: wrapped(x...)(data, rowKey, colKey)\n push: (record) -> @inner.push record\n format: formatter\n value: -> @inner.value() / data.getAggregator(@selector...).inner.value()\n numInputs: wrapped(x...)().numInputs\n\n aggregatorTemplates.countUnique = (f) -> aggregatorTemplates.uniques(((x) -> x.length), f)\n aggregatorTemplates.listUnique = (s) -> aggregatorTemplates.uniques(((x) -> x.join(s)), ((x)->x))\n aggregatorTemplates.max = (f) -> aggregatorTemplates.extremes('max', f)\n aggregatorTemplates.min = (f) -> aggregatorTemplates.extremes('min', f)\n aggregatorTemplates.first = (f) -> aggregatorTemplates.extremes('first', f)\n aggregatorTemplates.last = (f) -> aggregatorTemplates.extremes('last', f)\n aggregatorTemplates.median = (f) -> aggregatorTemplates.quantile(0.5, f)\n aggregatorTemplates.average = (f) -> aggregatorTemplates.runningStat(\"mean\", 1, f)\n aggregatorTemplates.var = (ddof, f) -> aggregatorTemplates.runningStat(\"var\", ddof, f)\n aggregatorTemplates.stdev = (ddof, f) -> aggregatorTemplates.runningStat(\"stdev\", ddof, f)\n\n #default aggregators & renderers use US naming and number formatting\n aggregators = do (tpl = aggregatorTemplates) ->\n \"Count\": tpl.count(usFmtInt)\n \"Count Unique Values\": tpl.countUnique(usFmtInt)\n \"List Unique Values\": tpl.listUnique(\", \")\n \"Sum\": tpl.sum(usFmt)\n \"Integer Sum\": tpl.sum(usFmtInt)\n \"Average\": tpl.average(usFmt)\n \"Median\": tpl.median(usFmt)\n \"Sample Variance\": tpl.var(1, usFmt)\n \"Sample Standard Deviation\": tpl.stdev(1, usFmt)\n \"Minimum\": tpl.min(usFmt)\n \"Maximum\": tpl.max(usFmt)\n \"First\": tpl.first(usFmt)\n \"Last\": tpl.last(usFmt)\n \"Sum over Sum\": tpl.sumOverSum(usFmt)\n \"80% Upper Bound\": tpl.sumOverSumBound80(true, usFmt)\n \"80% Lower Bound\": tpl.sumOverSumBound80(false, usFmt)\n \"Sum as Fraction of Total\": tpl.fractionOf(tpl.sum(), \"total\", usFmtPct)\n \"Sum as Fraction of Rows\": tpl.fractionOf(tpl.sum(), \"row\", usFmtPct)\n \"Sum as Fraction of Columns\": tpl.fractionOf(tpl.sum(), \"col\", usFmtPct)\n \"Count as Fraction of Total\": tpl.fractionOf(tpl.count(), \"total\", usFmtPct)\n \"Count as Fraction of Rows\": tpl.fractionOf(tpl.count(), \"row\", usFmtPct)\n \"Count as Fraction of Columns\": tpl.fractionOf(tpl.count(), \"col\", usFmtPct)\n\n renderers =\n \"Table\": (data, opts) -> pivotTableRenderer(data, opts)\n \"Table Barchart\": (data, opts) -> $(pivotTableRenderer(data, opts)).barchart()\n \"Heatmap\": (data, opts) -> $(pivotTableRenderer(data, opts)).heatmap(\"heatmap\", opts)\n \"Row Heatmap\": (data, opts) -> $(pivotTableRenderer(data, opts)).heatmap(\"rowheatmap\", opts)\n \"Col Heatmap\": (data, opts) -> $(pivotTableRenderer(data, opts)).heatmap(\"colheatmap\", opts)\n\n locales =\n en:\n aggregators: aggregators\n renderers: renderers\n localeStrings:\n renderError: \"An error occurred rendering the PivotTable results.\"\n computeError: \"An error occurred computing the PivotTable results.\"\n uiRenderError: \"An error occurred rendering the PivotTable UI.\"\n selectAll: \"Select All\"\n selectNone: \"Select None\"\n tooMany: \"(too many to list)\"\n filterResults: \"Filter values\"\n apply: \"Apply\"\n cancel: \"Cancel\"\n totals: \"Totals\" #for table renderer\n vs: \"vs\" #for gchart renderer\n by: \"by\" #for gchart renderer\n\n #dateFormat deriver l10n requires month and day names to be passed in directly\n mthNamesEn = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]\n dayNamesEn = [\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"]\n zeroPad = (number) -> (\"0\"+number).substr(-2,2)\n\n derivers =\n bin: (col, binWidth) -> (record) -> record[col] - record[col] % binWidth\n dateFormat: (col, formatString, utcOutput=false, mthNames=mthNamesEn, dayNames=dayNamesEn) ->\n utc = if utcOutput then \"UTC\" else \"\"\n (record) -> #thanks http://stackoverflow.com/a/12213072/112871\n date = new Date(Date.parse(record[col]))\n if isNaN(date) then return \"\"\n formatString.replace /%(.)/g, (m, p) ->\n switch p\n when \"y\" then date[\"get#{utc}FullYear\"]()\n when \"m\" then zeroPad(date[\"get#{utc}Month\"]()+1)\n when \"n\" then mthNames[date[\"get#{utc}Month\"]()]\n when \"d\" then zeroPad(date[\"get#{utc}Date\"]())\n when \"w\" then dayNames[date[\"get#{utc}Day\"]()]\n when \"x\" then date[\"get#{utc}Day\"]()\n when \"H\" then zeroPad(date[\"get#{utc}Hours\"]())\n when \"M\" then zeroPad(date[\"get#{utc}Minutes\"]())\n when \"S\" then zeroPad(date[\"get#{utc}Seconds\"]())\n else \"%\" + p\n\n rx = /(\\d+)|(\\D+)/g\n rd = /\\d/\n rz = /^0/\n naturalSort = (as, bs) =>\n #nulls first\n return -1 if bs? and not as?\n return 1 if as? and not bs?\n\n #then raw NaNs\n return -1 if typeof as == \"number\" and isNaN(as)\n return 1 if typeof bs == \"number\" and isNaN(bs)\n\n #numbers and numbery strings group together\n nas = +as\n nbs = +bs\n return -1 if nas < nbs\n return 1 if nas > nbs\n\n #within that, true numbers before numbery strings\n return -1 if typeof as == \"number\" and typeof bs != \"number\"\n return 1 if typeof bs == \"number\" and typeof as != \"number\"\n return 0 if typeof as == \"number\" and typeof bs == \"number\"\n\n # 'Infinity' is a textual number, so less than 'A'\n return -1 if isNaN(nbs) and not isNaN(nas)\n return 1 if isNaN(nas) and not isNaN(nbs)\n\n #finally, \"smart\" string sorting per http://stackoverflow.com/a/4373421/112871\n a = String(as)\n b = String(bs)\n return 0 if a == b\n return (if a > b then 1 else -1) unless rd.test(a) and rd.test(b)\n\n #special treatment for strings containing digits\n a = a.match(rx) #create digits vs non-digit chunks and iterate through\n b = b.match(rx)\n while a.length and b.length\n a1 = a.shift()\n b1 = b.shift()\n if a1 != b1\n if rd.test(a1) and rd.test(b1) #both are digit chunks\n return a1.replace(rz, \".0\") - b1.replace(rz, \".0\")\n else\n return (if a1 > b1 then 1 else -1)\n return a.length - b.length\n\n sortAs = (order) ->\n mapping = {}\n l_mapping = {} # sort lowercased keys similarly\n for i, x of order\n mapping[x] = i\n l_mapping[x.toLowerCase()] = i if typeof x == \"string\"\n (a, b) ->\n if mapping[a]? and mapping[b]? then mapping[a] - mapping[b]\n else if mapping[a]? then -1\n else if mapping[b]? then 1\n else if l_mapping[a]? and l_mapping[b]? then l_mapping[a] - l_mapping[b]\n else if l_mapping[a]? then -1\n else if l_mapping[b]? then 1\n else naturalSort(a,b)\n\n getSort = (sorters, attr) ->\n if sorters?\n if $.isFunction(sorters)\n sort = sorters(attr)\n return sort if $.isFunction(sort)\n else if sorters[attr]?\n return sorters[attr]\n return naturalSort\n\n ###\n Data Model class\n ###\n\n class PivotData\n constructor: (input, opts = {}) ->\n @input = input\n @aggregator = opts.aggregator ? aggregatorTemplates.count()()\n @aggregatorName = opts.aggregatorName ? \"Count\"\n @colAttrs = opts.cols ? []\n @rowAttrs = opts.rows ? []\n @valAttrs = opts.vals ? []\n @sorters = opts.sorters ? {}\n @rowOrder = opts.rowOrder ? \"key_a_to_z\"\n @colOrder = opts.colOrder ? \"key_a_to_z\"\n @derivedAttributes = opts.derivedAttributes ? {}\n @filter = opts.filter ? (-> true)\n @tree = {}\n @rowKeys = []\n @colKeys = []\n @rowTotals = {}\n @colTotals = {}\n @allTotal = @aggregator(this, [], [])\n @sorted = false\n\n # iterate through input, accumulating data for cells\n PivotData.forEachRecord @input, @derivedAttributes, (record) =>\n @processRecord(record) if @filter(record)\n\n #can handle arrays or jQuery selections of tables\n @forEachRecord = (input, derivedAttributes, f) ->\n if $.isEmptyObject derivedAttributes\n addRecord = f\n else\n addRecord = (record) ->\n record[k] = v(record) ? record[k] for k, v of derivedAttributes\n f(record)\n\n #if it's a function, have it call us back\n if $.isFunction(input)\n input(addRecord)\n else if $.isArray(input)\n if $.isArray(input[0]) #array of arrays\n for own i, compactRecord of input when i > 0\n record = {}\n record[k] = compactRecord[j] for own j, k of input[0]\n addRecord(record)\n else #array of objects\n addRecord(record) for record in input\n else if input instanceof jQuery\n tblCols = []\n $(\"thead > tr > th\", input).each (i) -> tblCols.push $(this).text()\n $(\"tbody > tr\", input).each (i) ->\n record = {}\n $(\"td\", this).each (j) -> record[tblCols[j]] = $(this).text()\n addRecord(record)\n else\n throw new Error(\"unknown input format\")\n\n forEachMatchingRecord: (criteria, callback) ->\n PivotData.forEachRecord @input, @derivedAttributes, (record) =>\n return if not @filter(record)\n for k, v of criteria\n return if v != (record[k] ? \"null\")\n callback(record)\n\n arrSort: (attrs) =>\n sortersArr = (getSort(@sorters, a) for a in attrs)\n (a,b) ->\n for own i, sorter of sortersArr\n comparison = sorter(a[i], b[i])\n return comparison if comparison != 0\n return 0\n\n sortKeys: () =>\n if not @sorted\n @sorted = true\n v = (r,c) => @getAggregator(r,c).value()\n switch @rowOrder\n when \"value_a_to_z\" then @rowKeys.sort (a,b) => naturalSort v(a,[]), v(b,[])\n when \"value_z_to_a\" then @rowKeys.sort (a,b) => -naturalSort v(a,[]), v(b,[])\n else @rowKeys.sort @arrSort(@rowAttrs)\n switch @colOrder\n when \"value_a_to_z\" then @colKeys.sort (a,b) => naturalSort v([],a), v([],b)\n when \"value_z_to_a\" then @colKeys.sort (a,b) => -naturalSort v([],a), v([],b)\n else @colKeys.sort @arrSort(@colAttrs)\n\n getColKeys: () =>\n @sortKeys()\n return @colKeys\n\n getRowKeys: () =>\n @sortKeys()\n return @rowKeys\n\n processRecord: (record) -> #this code is called in a tight loop\n colKey = []\n rowKey = []\n colKey.push record[x] ? \"null\" for x in @colAttrs\n rowKey.push record[x] ? \"null\" for x in @rowAttrs\n flatRowKey = rowKey.join(String.fromCharCode(0))\n flatColKey = colKey.join(String.fromCharCode(0))\n\n @allTotal.push record\n\n if rowKey.length != 0\n if not @rowTotals[flatRowKey]\n @rowKeys.push rowKey\n @rowTotals[flatRowKey] = @aggregator(this, rowKey, [])\n @rowTotals[flatRowKey].push record\n\n if colKey.length != 0\n if not @colTotals[flatColKey]\n @colKeys.push colKey\n @colTotals[flatColKey] = @aggregator(this, [], colKey)\n @colTotals[flatColKey].push record\n\n if colKey.length != 0 and rowKey.length != 0\n if not @tree[flatRowKey]\n @tree[flatRowKey] = {}\n if not @tree[flatRowKey][flatColKey]\n @tree[flatRowKey][flatColKey] = @aggregator(this, rowKey, colKey)\n @tree[flatRowKey][flatColKey].push record\n\n getAggregator: (rowKey, colKey) =>\n flatRowKey = rowKey.join(String.fromCharCode(0))\n flatColKey = colKey.join(String.fromCharCode(0))\n if rowKey.length == 0 and colKey.length == 0\n agg = @allTotal\n else if rowKey.length == 0\n agg = @colTotals[flatColKey]\n else if colKey.length == 0\n agg = @rowTotals[flatRowKey]\n else\n agg = @tree[flatRowKey][flatColKey]\n return agg ? {value: (-> null), format: -> \"\"}\n\n #expose these to the outside world\n $.pivotUtilities = {aggregatorTemplates, aggregators, renderers, derivers, locales,\n naturalSort, numberFormat, sortAs, PivotData}\n\n ###\n Default Renderer for hierarchical table layout\n ###\n\n pivotTableRenderer = (pivotData, opts) ->\n\n defaults =\n table: clickCallback: null\n localeStrings: totals: \"Totals\"\n\n opts = $.extend(true, {}, defaults, opts)\n\n colAttrs = pivotData.colAttrs\n rowAttrs = pivotData.rowAttrs\n rowKeys = pivotData.getRowKeys()\n colKeys = pivotData.getColKeys()\n\n if opts.table.clickCallback\n getClickHandler = (value, rowValues, colValues) ->\n filters = {}\n filters[attr] = colValues[i] for own i, attr of colAttrs when colValues[i]?\n filters[attr] = rowValues[i] for own i, attr of rowAttrs when rowValues[i]?\n return (e) -> opts.table.clickCallback(e, value, filters, pivotData)\n\n #now actually build the output\n result = document.createElement(\"table\")\n result.className = \"pvtTable\"\n\n #helper function for setting row/col-span in pivotTableRenderer\n spanSize = (arr, i, j) ->\n if i != 0\n noDraw = true\n for x in [0..j]\n if arr[i-1][x] != arr[i][x]\n noDraw = false\n if noDraw\n return -1 #do not draw cell\n len = 0\n while i+len < arr.length\n stop = false\n for x in [0..j]\n stop = true if arr[i][x] != arr[i+len][x]\n break if stop\n len++\n return len\n\n #the first few rows are for col headers\n thead = document.createElement(\"thead\")\n for own j, c of colAttrs\n tr = document.createElement(\"tr\")\n if parseInt(j) == 0 and rowAttrs.length != 0\n th = document.createElement(\"th\")\n th.setAttribute(\"colspan\", rowAttrs.length)\n th.setAttribute(\"rowspan\", colAttrs.length)\n tr.appendChild th\n th = document.createElement(\"th\")\n th.className = \"pvtAxisLabel\"\n th.textContent = c\n tr.appendChild th\n for own i, colKey of colKeys\n x = spanSize(colKeys, parseInt(i), parseInt(j))\n if x != -1\n th = document.createElement(\"th\")\n th.className = \"pvtColLabel\"\n th.textContent = colKey[j]\n th.setAttribute(\"colspan\", x)\n if parseInt(j) == colAttrs.length-1 and rowAttrs.length != 0\n th.setAttribute(\"rowspan\", 2)\n tr.appendChild th\n if parseInt(j) == 0\n th = document.createElement(\"th\")\n th.className = \"pvtTotalLabel\"\n th.innerHTML = opts.localeStrings.totals\n th.setAttribute(\"rowspan\", colAttrs.length + (if rowAttrs.length ==0 then 0 else 1))\n tr.appendChild th\n thead.appendChild tr\n\n #then a row for row header headers\n if rowAttrs.length !=0\n tr = document.createElement(\"tr\")\n for own i, r of rowAttrs\n th = document.createElement(\"th\")\n th.className = \"pvtAxisLabel\"\n th.textContent = r\n tr.appendChild th\n th = document.createElement(\"th\")\n if colAttrs.length ==0\n th.className = \"pvtTotalLabel\"\n th.innerHTML = opts.localeStrings.totals\n tr.appendChild th\n thead.appendChild tr\n result.appendChild thead\n\n #now the actual data rows, with their row headers and totals\n tbody = document.createElement(\"tbody\")\n for own i, rowKey of rowKeys\n tr = document.createElement(\"tr\")\n for own j, txt of rowKey\n x = spanSize(rowKeys, parseInt(i), parseInt(j))\n if x != -1\n th = document.createElement(\"th\")\n th.className = \"pvtRowLabel\"\n th.textContent = txt\n th.setAttribute(\"rowspan\", x)\n if parseInt(j) == rowAttrs.length-1 and colAttrs.length !=0\n th.setAttribute(\"colspan\",2)\n tr.appendChild th\n for own j, colKey of colKeys #this is the tight loop\n aggregator = pivotData.getAggregator(rowKey, colKey)\n val = aggregator.value()\n td = document.createElement(\"td\")\n td.className = \"pvtVal row#{i} col#{j}\"\n td.textContent = aggregator.format(val)\n td.setAttribute(\"data-value\", val)\n if getClickHandler?\n td.onclick = getClickHandler(val, rowKey, colKey)\n tr.appendChild td\n\n totalAggregator = pivotData.getAggregator(rowKey, [])\n val = totalAggregator.value()\n td = document.createElement(\"td\")\n td.className = \"pvtTotal rowTotal\"\n td.textContent = totalAggregator.format(val)\n td.setAttribute(\"data-value\", val)\n if getClickHandler?\n td.onclick = getClickHandler(val, rowKey, [])\n td.setAttribute(\"data-for\", \"row\"+i)\n tr.appendChild td\n tbody.appendChild tr\n\n #finally, the row for col totals, and a grand total\n tr = document.createElement(\"tr\")\n th = document.createElement(\"th\")\n th.className = \"pvtTotalLabel\"\n th.innerHTML = opts.localeStrings.totals\n th.setAttribute(\"colspan\", rowAttrs.length + (if colAttrs.length == 0 then 0 else 1))\n tr.appendChild th\n for own j, colKey of colKeys\n totalAggregator = pivotData.getAggregator([], colKey)\n val = totalAggregator.value()\n td = document.createElement(\"td\")\n td.className = \"pvtTotal colTotal\"\n td.textContent = totalAggregator.format(val)\n td.setAttribute(\"data-value\", val)\n if getClickHandler?\n td.onclick = getClickHandler(val, [], colKey)\n td.setAttribute(\"data-for\", \"col\"+j)\n tr.appendChild td\n totalAggregator = pivotData.getAggregator([], [])\n val = totalAggregator.value()\n td = document.createElement(\"td\")\n td.className = \"pvtGrandTotal\"\n td.textContent = totalAggregator.format(val)\n td.setAttribute(\"data-value\", val)\n if getClickHandler?\n td.onclick = getClickHandler(val, [], [])\n tr.appendChild td\n tbody.appendChild tr\n result.appendChild tbody\n\n #squirrel this away for later\n result.setAttribute(\"data-numrows\", rowKeys.length)\n result.setAttribute(\"data-numcols\", colKeys.length)\n\n return result\n\n ###\n Pivot Table core: create PivotData object and call Renderer on it\n ###\n\n $.fn.pivot = (input, inputOpts, locale=\"en\") ->\n locale = \"en\" if not locales[locale]?\n defaults =\n cols : [], rows: [], vals: []\n rowOrder: \"key_a_to_z\", colOrder: \"key_a_to_z\"\n dataClass: PivotData\n filter: -> true\n aggregator: aggregatorTemplates.count()()\n aggregatorName: \"Count\"\n sorters: {}\n derivedAttributes: {}\n renderer: pivotTableRenderer\n\n localeStrings = $.extend(true, {}, locales.en.localeStrings, locales[locale].localeStrings)\n localeDefaults =\n rendererOptions: {localeStrings}\n localeStrings: localeStrings\n\n opts = $.extend(true, {}, localeDefaults, $.extend({}, defaults, inputOpts))\n\n result = null\n try\n pivotData = new opts.dataClass(input, opts)\n try\n result = opts.renderer(pivotData, opts.rendererOptions)\n catch e\n console.error(e.stack) if console?\n result = $(\"\").html opts.localeStrings.renderError\n catch e\n console.error(e.stack) if console?\n result = $(\"\").html opts.localeStrings.computeError\n\n x = this[0]\n x.removeChild(x.lastChild) while x.hasChildNodes()\n return @append result\n\n\n ###\n Pivot Table UI: calls Pivot Table core above with options set by user\n ###\n\n $.fn.pivotUI = (input, inputOpts, overwrite = false, locale=\"en\") ->\n locale = \"en\" if not locales[locale]?\n defaults =\n derivedAttributes: {}\n aggregators: locales[locale].aggregators\n renderers: locales[locale].renderers\n hiddenAttributes: []\n menuLimit: 500\n cols: [], rows: [], vals: []\n rowOrder: \"key_a_to_z\", colOrder: \"key_a_to_z\"\n dataClass: PivotData\n exclusions: {}\n inclusions: {}\n unusedAttrsVertical: 85\n autoSortUnusedAttrs: false\n onRefresh: null\n filter: -> true\n sorters: {}\n\n localeStrings = $.extend(true, {}, locales.en.localeStrings, locales[locale].localeStrings)\n localeDefaults =\n rendererOptions: {localeStrings}\n localeStrings: localeStrings\n\n existingOpts = @data \"pivotUIOptions\"\n if not existingOpts? or overwrite\n opts = $.extend(true, {}, localeDefaults, $.extend({}, defaults, inputOpts))\n else\n opts = existingOpts\n\n try\n # do a first pass on the data to cache a materialized copy of any\n # function-valued inputs and to compute dimension cardinalities\n attrValues = {}\n materializedInput = []\n recordsProcessed = 0\n PivotData.forEachRecord input, opts.derivedAttributes, (record) ->\n return unless opts.filter(record)\n materializedInput.push(record)\n for own attr of record\n if not attrValues[attr]?\n attrValues[attr] = {}\n if recordsProcessed > 0\n attrValues[attr][\"null\"] = recordsProcessed\n for attr of attrValues\n value = record[attr] ? \"null\"\n attrValues[attr][value] ?= 0\n attrValues[attr][value]++\n recordsProcessed++\n\n #start building the output\n uiTable = $(\"\", \"class\": \"pvtUi\").attr(\"cellpadding\", 5)\n\n #renderer control\n rendererControl = $(\"\").appendTo(uiTable)\n\n #aggregator menu and value area\n\n aggregator = $(\"\").appendTo(uiTable)\n\n #row axes\n tr2.append $(\"\").append(rendererControl).append(unused)\n\n #render the UI in its default state\n @html uiTable\n\n #set up the UI initial state as requested by moving elements around\n\n for x in opts.cols\n @find(\".pvtCols\").append @find(\".axis_#{$.inArray(x, shownAttributes)}\")\n for x in opts.rows\n @find(\".pvtRows\").append @find(\".axis_#{$.inArray(x, shownAttributes)}\")\n if opts.aggregatorName?\n @find(\".pvtAggregator\").val opts.aggregatorName\n if opts.rendererName?\n @find(\".pvtRenderer\").val opts.rendererName\n\n initialRender = true\n\n #set up for refreshing\n refreshDelayed = =>\n subopts =\n derivedAttributes: opts.derivedAttributes\n localeStrings: opts.localeStrings\n rendererOptions: opts.rendererOptions\n sorters: opts.sorters\n cols: [], rows: []\n dataClass: opts.dataClass\n\n numInputsToProcess = opts.aggregators[aggregator.val()]([])().numInputs ? 0\n vals = []\n @find(\".pvtRows li span.pvtAttr\").each -> subopts.rows.push $(this).data(\"attrName\")\n @find(\".pvtCols li span.pvtAttr\").each -> subopts.cols.push $(this).data(\"attrName\")\n @find(\".pvtVals select.pvtAttrDropdown\").each ->\n if numInputsToProcess == 0\n $(this).remove()\n else\n numInputsToProcess--\n vals.push $(this).val() if $(this).val() != \"\"\n\n if numInputsToProcess != 0\n pvtVals = @find(\".pvtVals\")\n for x in [0...numInputsToProcess]\n newDropdown = $(\"
\")\n\n renderer = $(\"\").addClass('pvtAxisContainer pvtUnused')\n shownAttributes = (a for a of attrValues when a not in opts.hiddenAttributes)\n\n unusedAttrsVerticalAutoOverride = false\n if opts.unusedAttrsVertical == \"auto\"\n unusedAttrsVerticalAutoCutoff = 120 # legacy support\n else\n unusedAttrsVerticalAutoCutoff = parseInt opts.unusedAttrsVertical\n\n if not isNaN(unusedAttrsVerticalAutoCutoff)\n attrLength = 0\n attrLength += a.length for a in shownAttributes\n unusedAttrsVerticalAutoOverride = attrLength > unusedAttrsVerticalAutoCutoff\n\n if opts.unusedAttrsVertical == true or unusedAttrsVerticalAutoOverride\n unused.addClass('pvtVertList')\n else\n unused.addClass('pvtHorizList')\n\n for own i, attr of shownAttributes\n do (attr) ->\n values = (v for v of attrValues[attr])\n hasExcludedItem = false\n valueList = $(\"
\").addClass('pvtFilterBox').hide()\n\n valueList.append $(\"

\").append(\n $(\"\").text(attr),\n $(\"\").addClass(\"count\").text(\"(#{values.length})\"),\n )\n if values.length > opts.menuLimit\n valueList.append $(\"

\").html(opts.localeStrings.tooMany)\n else\n if values.length > 5\n controls = $(\"

\").appendTo(valueList)\n sorter = getSort(opts.sorters, attr)\n placeholder = opts.localeStrings.filterResults\n $(\"\", {type: \"text\"}).appendTo(controls)\n .attr({placeholder: placeholder, class: \"pvtSearch\"})\n .bind \"keyup\", ->\n filter = $(this).val().toLowerCase().trim()\n accept_gen = (prefix, accepted) -> (v) ->\n real_filter = filter.substring(prefix.length).trim()\n return true if real_filter.length == 0\n return Math.sign(sorter(v.toLowerCase(), real_filter)) in accepted\n accept =\n if filter.startsWith(\">=\") then accept_gen(\">=\", [1,0])\n else if filter.startsWith(\"<=\") then accept_gen(\"<=\", [-1,0])\n else if filter.startsWith(\">\") then accept_gen(\">\", [1])\n else if filter.startsWith(\"<\") then accept_gen(\"<\", [-1])\n else if filter.startsWith(\"~\") then (v) ->\n return true if filter.substring(1).trim().length == 0\n v.toLowerCase().match(filter.substring(1))\n else (v) -> v.toLowerCase().indexOf(filter) != -1\n\n valueList.find('.pvtCheckContainer p label span.value').each ->\n if accept($(this).text())\n $(this).parent().parent().show()\n else\n $(this).parent().parent().hide()\n controls.append $(\"
\")\n $(\"

\").addClass('pvtVals')\n .appendTo(tr1)\n .append(aggregator)\n .append(rowOrderArrow)\n .append(colOrderArrow)\n .append($(\"
\"))\n\n #column axes\n $(\"
\").addClass('pvtAxisContainer pvtHorizList pvtCols').appendTo(tr1)\n\n tr2 = $(\"
\").addClass('pvtAxisContainer pvtRows').attr(\"valign\", \"top\")\n\n #the actual pivot table container\n pivotTable = $(\"\")\n .attr(\"valign\", \"top\")\n .addClass('pvtRendererArea')\n .appendTo(tr2)\n\n #finally the renderer dropdown and unused attribs are inserted at the requested location\n if opts.unusedAttrsVertical == true or unusedAttrsVerticalAutoOverride\n uiTable.find('tr:nth-child(1)').prepend rendererControl\n uiTable.find('tr:nth-child(2)').prepend unused\n else\n uiTable.prepend $(\"
\",{\"class\":\"pvtUi\"}).attr(\"cellpadding\",5),H=t(\"\").appendTo(G),u=t(\"\").appendTo(G),J.append(t(\"\").append(H).append(Q)),this.html(G),q=D.cols,F=0,N=q.length;N>F;F++)Y=q[F],this.find(\".pvtCols\").append(this.find(\".axis_\"+t.inArray(Y,W)));for(z=D.rows,E=0,T=z.length;T>E;E++)Y=z[E],this.find(\".pvtRows\").append(this.find(\".axis_\"+t.inArray(Y,W)));null!=D.aggregatorName&&this.find(\".pvtAggregator\").val(D.aggregatorName),null!=D.rendererName&&this.find(\".pvtRenderer\").val(D.rendererName),A=!0,V=function(n){return function(){var r,a,o,i,s,l,h,d,p,m,v,b,C,y;if(m={derivedAttributes:D.derivedAttributes,localeStrings:D.localeStrings,rendererOptions:D.rendererOptions,sorters:D.sorters,cols:[],rows:[],dataClass:D.dataClass},s=null!=(d=D.aggregators[u.val()]([])().numInputs)?d:0,y=[],n.find(\".pvtRows li span.pvtAttr\").each(function(){return m.rows.push(t(this).data(\"attrName\"))}),n.find(\".pvtCols li span.pvtAttr\").each(function(){return m.cols.push(t(this).data(\"attrName\"))}),n.find(\".pvtVals select.pvtAttrDropdown\").each(function(){return 0===s?t(this).remove():(s--,\"\"!==t(this).val()?y.push(t(this).val()):void 0)}),0!==s)for(h=n.find(\".pvtVals\"),Y=v=0,p=s;p>=0?p>v:v>p;Y=p>=0?++v:--v){for(i=t(\"
\"),j=t(\"\").addClass(\"pvtAxisContainer pvtUnused\"),W=function(){var t;t=[];for(l in m)e.call(D.hiddenAttributes,l)<0&&t.push(l);return t}(),$=!1,Z=\"auto\"===D.unusedAttrsVertical?120:parseInt(D.unusedAttrsVertical),!isNaN(Z)){for(p=0,x=0,S=W.length;S>x;x++)l=W[x],p+=l.length;$=p>Z}Q.addClass(D.unusedAttrsVertical===!0||$?\"pvtVertList\":\"pvtHorizList\"),y=function(n){var r,a,o,i,s,l,u,c,d,p,f,g,v,b,C,y,A,x,S;if(S=function(){var t;t=[];for(C in m[n])t.push(C);return t}(),c=!1,x=t(\"
\").addClass(\"pvtFilterBox\").hide(),x.append(t(\"

\").append(t(\"\").text(n),t(\"\").addClass(\"count\").text(\"(\"+S.length+\")\"))),S.length>D.menuLimit)x.append(t(\"

\").html(D.localeStrings.tooMany));else for(S.length>5&&(i=t(\"

\").appendTo(x),v=h(D.sorters,n),f=D.localeStrings.filterResults,t(\"\",{type:\"text\"}).appendTo(i).attr({placeholder:f,\"class\":\"pvtSearch\"}).bind(\"keyup\",function(){var n,r,a;return a=t(this).val().toLowerCase().trim(),r=function(t,n){return function(r){var o,i;return o=a.substring(t.length).trim(),0===o.length?!0:(i=Math.sign(v(r.toLowerCase(),o)),e.call(n,i)>=0)}},n=a.startsWith(\">=\")?r(\">=\",[1,0]):a.startsWith(\"<=\")?r(\"<=\",[-1,0]):a.startsWith(\">\")?r(\">\",[1]):a.startsWith(\"<\")?r(\"<\",[-1]):a.startsWith(\"~\")?function(t){return 0===a.substring(1).trim().length?!0:t.toLowerCase().match(a.substring(1))}:function(t){return-1!==t.toLowerCase().indexOf(a)},x.find(\".pvtCheckContainer p label span.value\").each(function(){return n(t(this).text())?t(this).parent().parent().show():t(this).parent().parent().hide()})}),i.append(t(\"
\")),t(\"

\").addClass(\"pvtVals\").appendTo(P).append(u).append(B).append(g).append(t(\"
\")),t(\"
\").addClass(\"pvtAxisContainer pvtHorizList pvtCols\").appendTo(P),J=t(\"
\").addClass(\"pvtAxisContainer pvtRows\").attr(\"valign\",\"top\")),R=t(\"\").attr(\"valign\",\"top\").addClass(\"pvtRendererArea\").appendTo(J),D.unusedAttrsVertical===!0||$?(G.find(\"tr:nth-child(1)\").prepend(H),G.find(\"tr:nth-child(2)\").prepend(Q)):G.prepend(t(\"