taar/analysis/TAARV2.html

3145 строки
2.4 MiB
HTML
Исходник Постоянная ссылка Обычный вид История

2018-04-24 17:43:27 +03:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="author" content="Ben Miroglio, Martin Lopatka" />
<title>TAAR V2 Experiment Analysis</title>
2018-04-24 20:32:31 +03:00
<script>/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function A
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNum
marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expa
padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
</script>
2018-04-24 17:43:27 +03:00
<meta name="viewport" content="width=device-width, initial-scale=1" />
2018-04-24 20:32:31 +03:00
<style type="text/css">@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: url(data:application/x-font-truetype;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG+kAAAAQEdQT1PXveeXAABv5AAAGWRHU1VC8WfWVwAAiUgAAADgT1MvMlpQkwsAAGZkAAAAYGNtYXDzMPm1AABmxAAAAeZjdnQgDXMAuAAAamwAAAAoZnBnbQZZnDcAAGisAAABc2dhc3D//wADAABvnAAAAAhnbHlm4G/pBAAAARwAAF8kaGVhZP4Fs/YAAGJEAAAANmhoZWEHlAOiAABmQAAAACRobXR4l6Yq6AAAYnwAAAPEbG9jYV5idvoAAGBgAAAB5G1heHADCwJJAABgQAAAACBuYW1lIvc8kwAAapQAAAHKcG9z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TFLMnsCkxMsRjNhX/7lAUJIUSo3Ig7+1gAAAgA3/2UCWAKfABMANABLALgAAEVYuAAkLxu5ACQAED5ZuAAARVi4ABovG7kAGgAEPlm7ADEAAQAXAAQruAAaELkABQAB9LgAJBC5AA8AAfS4ABoQuAAu0DAxExQeAjMyPgI1NC4CIyIOAgEOASMiJicuAzU0PgIzMh4CFRQOAgceATMyNjdnIDpTMjJSOyAgO1IyMlM6IAHxDSsZU28ZNlpBJChIZDs8ZEgoJEFbNxdXPhcfDQFMRXFPLCxPcUVEbk0qKk1u/eAEB1I+BTVZekpOfVkvL1l9Tkp6WTUFMjQFBAAAAgBhAAACAwKTAAgAGABUALgAAEVYuAAOLxu5AA4AED5ZuAAARVi4AAwvG7kADAAEPlm4AABFWLgACS8buQ
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: url(data:application/x-font-truetype;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG5oAAAAQEdQT1PUveN5AABuqAAAGXBHU1VC8WfWVwAAiBgAAADgT1MvMlq0lFsAAGUsAAAAYGNtYXDzMPm1AABljAAAAeZjdnQgDZkA+gAAaTQAAAAoZnBnbQZZnDcAAGd0AAABc2dhc3D//wADAABuYAAAAAhnbHlmIymUiAAAARwAAF3saGVhZP4Us+IAAGEMAAAANmhoZWEHowOhAABlCAAAACRobXR4pqgmOgAAYUQAAAPEbG9jYTiIUNQAAF8oAAAB5G1heHADCwJAAABfCAAAACBuYW1lIro8MAAAaVwAAAHGcG9zdGxQSG8AAGskAAADOXByZXCWBPrrAABo6AAAAEsABQBZAAACNQKUAAMABgAJAA8AFQBnALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AAIvG7kAAgAEPlm6AAUAAgAAERI5ugAGAAIAABESOboABwACAAAREjm6AAgAAgAAERI5uQAKAAH0ugANAAIAABESObgAABC5ABIAAfQwMRMhESETJxEhEQcTLwEjDwETPwEjHwFZAdz+JMB/AVh+Ukk0BDZKhDFC60IyApT9bAFU6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h3SE99Vy4vV31OR3VXNwksKgYEAAACAFoAAAIgApAACAAYAFQAuAAARVi4AA4vG7kADgAQPlm4AABFWLgADC8buQAMAAQ+WbgAAEVYuAAJLxu5AAkABD5ZuwABAAEACgAEK7gADhC5AAgAAfS6AB
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: url(data:application/x-font-truetype;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG3kAAAAQEdQT1Pl+8B5AABuJAAAGVZHU1VC8WfWVwAAh3wAAADgT1MvMlvgllUAAGSUAAAAYGNtYXDzMPm1AABk9AAAAeZjdnQgDdkBaQAAaJwAAAAoZnBnbQZZnDcAAGbcAAABc2dhc3D//wADAABt3AAAAAhnbHlm8iwszwAAARwAAF1UaGVhZP4ts7AAAGB0AAAANmhoZWEHuwObAABkcAAAACRobXR4wFMeHQAAYKwAAAPEbG9jYRMoKywAAF6QAAAB5G1heHADCwJCAABecAAAACBuYW1lJBs+oAAAaMQAAAHccG9zdGxQSG8AAGqgAAADOXByZXBFzLadAABoUAAAAEsABQBQAAACYgKUAAMABgAJAA8AFQBnALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AAIvG7kAAgAEPlm6AAUAAgAAERI5ugAGAAIAABESOboABwACAAAREjm6AAgAAgAAERI5uQAKAAH0ugANAAIAABESObgAABC5ABIAAfQwMRMhESETJxEhEQcXLwEjDwETPwEjHwFQAhL97sFfAU1eCicpBCknVCogmB8rApT9bAFUuv6NAXO6+U1iYk0BQ187O18AAv/6AAACQwKMAAkAEQBUALgAAEVYuAAOLxu5AA4AED5ZuAAARVi4AAwvG7kADAAEPlm4AABFWLgAES8buQARAAQ+WboABQAMAA4REjm6AAsADAAOERI5uAALL7kACQAB9DAxAScuAScjDgEPARcjByMTMxMjAWEPDhoNBAwZDhCpxyiWzLHMnAEOPDFuMzRtMTxzmwKM/XQAAAAAAwBNAAACPAKMABUAHgAmAFsAuAAARVi4AAAvG7kAAAAQPlm4AABFWLgAFS8buQ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AARVi4AAsvG7kACwAEPlm6AAQACwAIERI5ugAOAAAAExESOTAxEzMTFzMuAT0BMxEjAycjHgEdASNNl6pABAUNjJeqQAQFDYwCjP68kDSAOub9dAFFjjZ8OucAAAACAC7/9AJ+ApgAEwAfADUAuAAARVi4AAovG7kACgAQPlm4AABFWLgAAC8buQAAAAQ+WbkAFAAB9LgAChC5ABoAAfQwMQUiLgI1ND4CMzIeAhUUDgInMjY1NCYjIgYVFBYBVkJtTisrTm1CQm1OKytObUJDTk5DQ05ODC9YflBQfVUtLVZ9T1B+WC9/c2Nibm5iY3MAAgBNAAACOgKMAA4AFgBDALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AA4vG7kADgAEPlm6AAwAAAAOERI5uAAML7kADwAB9LgAABC5ABUAAfQwMRMzMh4CFRQOAisBFSMTMjU0JisBFU3uNV1FKClGXDRbk+V4PTtSAowVMVE7OVQ2Gt0BUmgzKsUAAAACAC7/TgKgApgACwAqAEsAuAAARVi4ABwvG7kAHAAQPlm4AABFWLgAEi8buQASAAQ+WbsAJwABAA8ABCu4ABIQuQADAAH0uAAcELkACQAB9LgAEhC4ACTQMDETFBYzMjY1NCYjIgYBDgEjIiYnLgM1ND4CMzIeAhUUBgceATMyNjfFTkNDTk5DQ04B2xI7JmiPIzRVPCArTm1CQm1OK3BfF04qFSUOAUlpdHRpYm5u/bgJDGBNCzdWcUVQfVUtLVZ9T4SqGyIbBwUAAAACAE0AAAJTAowACAAYAFQAuAAARVi4AA4vG7kADgAQPlm4AABFWLgADC8buQAMAAQ+WbgAAEVYuAAJLxu5AAkABD5ZuwABAAEACgAEK7gADhC5AAgAAfS6ABcAAQAKERI5MDETMzI2NTQmKwETJyMVIxEzMh4CFRQGBxPgTD
}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url(data:application/vnd.ms-fontobject;base64,n04AAEFNAAACAAIABAAAAAAABQAAAAAAAAABAJABAAAEAExQAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAJxJ/LAAAAAAAAAAAAAAAAAAAAAAAACgARwBMAFkAUABIAEkAQwBPAE4AUwAgAEgAYQBsAGYAbABpAG4AZwBzAAAADgBSAGUAZwB1AGwAYQByAAAAeABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAA5ADsAUABTACAAMAAwADEALgAwADAAOQA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADcAMAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADUAOAAzADIAOQAAADgARwBMAFkAUABIAEkAQwBPAE4AUwAgAEgAYQBsAGYAbABpAG4AZwBzACAAUgBlAGcAdQBsAGEAcgAAAAAAQlNHUAAAAAAAAAAAAAAAAAAAAAADAKncAE0TAE0ZAEbuFM3pjM/SEdmjKHUbyow8ATBE40IvWA3vTu8LiABDQ+pexwUMcm1SMnNryctQSiI1K5ZnbOlXKmnVV5YvRe6RnNMFNCOs1KNVpn6yZhCJkRtVRNzEufeIq7HgSrcx4S8h/v4vnrrKc6oCNxmSk2uKlZQHBii6iKFoH0746ThvkO1kJHlxjrkxs+LWORaDQBEtiYJIR5IB9Bi1UyL4Rmr0BNigNkMzlKQmnofBHviqVzUxwdMb3NdCn69hy+pRYVKGVS/1tnsqv4LL7wCCPZZAZPT4aCShHjHJVNuXbmMrY5LeQaGnvAkXlVrJgKRAUdFjrWEah9XebPeQMj7KS7DIBAFt8ycgC5PLGUOHSE3ErGZCiViNLL5ZARfywnCoZaKQCu6NuFX42AEeKtKUGnr/Cm2Cy8tpFhBPMW5Fxi4Qm4TkDWh4IWFDClhU2hRWosUWqcKLlgyXB+lSHaWaHiWlBAR8SeSgSPCQxdVQgzUixWKSTrIQEbU94viDctkvX+VSjJuUmV8L4CXShI11esnp0pjWNZIyxKHS4wVQ2ime1P4RnhvGw0aDN1OLAXGERsB7buFpFGGBAre4QEQR0HOIO5oYH305G+KspT/FupEGGa
</style>
<script>/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==type
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affi
<script>/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
};
</script>
<script>/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmVal
};
</script>
<script>
/**
* jQuery Plugin: Sticky Tabs
*
* @author Aidan Lister <aidan@php.net>
* adapted by Ruben Arslan to activate parent tabs too
* http://www.aidanlister.com/2014/03/persisting-the-tab-state-in-bootstrap/
*/
(function($) {
"use strict";
$.fn.rmarkdownStickyTabs = function() {
var context = this;
// Show the tab corresponding with the hash in the URL, or the first tab
var showStuffFromHash = function() {
var hash = window.location.hash;
var selector = hash ? 'a[href="' + hash + '"]' : 'li.active > a';
var $selector = $(selector, context);
if($selector.data('toggle') === "tab") {
$selector.tab('show');
// walk up the ancestors of this element, show any hidden tabs
$selector.parents('.section.tabset').each(function(i, elm) {
var link = $('a[href="#' + $(elm).attr('id') + '"]');
if(link.data('toggle') === "tab") {
link.tab("show");
}
});
}
};
// Set the correct tab when the page loads
showStuffFromHash(context);
// Set the correct tab when a user uses their back/forward button
$(window).on('hashchange', function() {
showStuffFromHash(context);
});
// Change the URL when tabs are clicked
$('a', context).on('click', function(e) {
history.pushState(null, null, this.href);
showStuffFromHash(context);
});
return this;
};
}(jQuery));
window.buildTabsets = function(tocID) {
// build a tabset from a section div with the .tabset class
function buildTabset(tabset) {
// check for fade and pills options
var fade = tabset.hasClass("tabset-fade");
var pills = tabset.hasClass("tabset-pills");
var navClass = pills ? "nav-pills" : "nav-tabs";
// determine the heading level of the tabset and tabs
var match = tabset.attr('class').match(/level(\d) /);
if (match === null)
return;
var tabsetLevel = Number(match[1]);
var tabLevel = tabsetLevel + 1;
// find all subheadings immediately below
var tabs = tabset.find("div.section.level" + tabLevel);
if (!tabs.length)
return;
// create tablist and tab-content elements
var tabList = $('<ul class="nav ' + navClass + '" role="tablist"></ul>');
$(tabs[0]).before(tabList);
var tabContent = $('<div class="tab-content"></div>');
$(tabs[0]).before(tabContent);
// build the tabset
var activeTab = 0;
tabs.each(function(i) {
// get the tab div
var tab = $(tabs[i]);
// get the id then sanitize it for use with bootstrap tabs
var id = tab.attr('id');
// see if this is marked as the active tab
if (tab.hasClass('active'))
activeTab = i;
// remove any table of contents entries associated with
// this ID (since we'll be removing the heading element)
$("div#" + tocID + " li a[href='#" + id + "']").parent().remove();
// sanitize the id for use with bootstrap tabs
id = id.replace(/[.\/?&!#<>]/g, '').replace(/\s/g, '_');
tab.attr('id', id);
// get the heading element within it, grab it's text, then remove it
var heading = tab.find('h' + tabLevel + ':first');
var headingText = heading.html();
heading.remove();
// build and append the tab list item
var a = $('<a role="tab" data-toggle="tab">' + headingText + '</a>');
a.attr('href', '#' + id);
a.attr('aria-controls', id);
var li = $('<li role="presentation"></li>');
li.append(a);
tabList.append(li);
// set it's attributes
tab.attr('role', 'tabpanel');
tab.addClass('tab-pane');
tab.addClass('tabbed-pane');
if (fade)
tab.addClass('fade');
// move it into the tab content div
tab.detach().appendTo(tabContent);
});
// set active tab
$(tabList.children('li')[activeTab]).addClass('active');
var active = $(tabContent.children('div.section')[activeTab]);
active.addClass('active');
if (fade)
active.addClass('in');
if (tabset.hasClass("tabset-sticky"))
tabset.rmarkdownStickyTabs();
}
// convert section divs with the .tabset class to tabsets
var tabsets = $("div.section.tabset");
tabsets.each(function(i) {
buildTabset($(tabsets[i]));
});
};
</script>
<script>
window.initializeCodeFolding = function(show) {
// handlers for show-all and hide all
$("#rmd-show-all-code").click(function() {
$('div.r-code-collapse').each(function() {
$(this).collapse('show');
});
});
$("#rmd-hide-all-code").click(function() {
$('div.r-code-collapse').each(function() {
$(this).collapse('hide');
});
});
// index for unique code element ids
var currentIndex = 1;
// select all R code blocks
var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan');
rCodeBlocks.each(function() {
// create a collapsable div to wrap the code in
var div = $('<div class="collapse r-code-collapse"></div>');
if (show)
div.addClass('in');
var id = 'rcode-643E0F36' + currentIndex++;
div.attr('id', id);
$(this).before(div);
$(this).detach().appendTo(div);
// add a show code button right above
var showCodeText = $('<span>' + (show ? 'Hide' : 'Code') + '</span>');
var showCodeButton = $('<button type="button" class="btn btn-default btn-xs code-folding-btn pull-right"></button>');
showCodeButton.append(showCodeText);
showCodeButton
.attr('data-toggle', 'collapse')
.attr('data-target', '#' + id)
.attr('aria-expanded', show)
.attr('aria-controls', id);
var buttonRow = $('<div class="row"></div>');
var buttonCol = $('<div class="col-md-12"></div>');
buttonCol.append(showCodeButton);
buttonRow.append(buttonCol);
div.before(buttonRow);
// update state of button on show/hide
div.on('hidden.bs.collapse', function () {
showCodeText.text('Code');
});
div.on('show.bs.collapse', function () {
showCodeText.text('Hide');
});
});
}
</script>
<style type="text/css">.hljs-literal {
color: #990073;
}
.hljs-number {
color: #099;
}
.hljs-comment {
color: #998;
font-style: italic;
}
.hljs-keyword {
color: #900;
font-weight: bold;
}
.hljs-string {
color: #d14;
}
</style>
<script src="data:application/javascript;base64,LyohIGhpZ2hsaWdodC5qcyB2OS4xMi4wIHwgQlNEMyBMaWNlbnNlIHwgZ2l0LmlvL2hsanNsaWNlbnNlICovCiFmdW5jdGlvbihlKXt2YXIgbj0ib2JqZWN0Ij09dHlwZW9mIHdpbmRvdyYmd2luZG93fHwib2JqZWN0Ij09dHlwZW9mIHNlbGYmJnNlbGY7InVuZGVmaW5lZCIhPXR5cGVvZiBleHBvcnRzP2UoZXhwb3J0cyk6biYmKG4uaGxqcz1lKHt9KSwiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kJiZkZWZpbmUoW10sZnVuY3Rpb24oKXtyZXR1cm4gbi5obGpzfSkpfShmdW5jdGlvbihlKXtmdW5jdGlvbiBuKGUpe3JldHVybiBlLnJlcGxhY2UoLyYvZywiJmFtcDsiKS5yZXBsYWNlKC88L2csIiZsdDsiKS5yZXBsYWNl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Sl9KSxhLnN0YXJ0cyYmcihhLnN0YXJ0cyxpKTt2YXIgYz1hLmMubWFwKGZ1bmN0aW9uKGUpe3JldHVybiBlLmJLPyJcXC4/KCIrZS5iKyIpXFwuPyI6ZS5ifSkuY29uY2F0KFthLnRFLGEuaV0pLm1hcChuKS5maWx0ZXIoQm9vbGVhbik7YS50PWMubGVuZ3RoP3QoYy5qb2luKCJ8IiksITApOntleGVjOmZ1bmN0aW9uKCl7cmV0dXJuIG51bGx9fX19cihlKX1mdW5jdGlvbiBmKGUsdCxhLGkpe2Z1bmN0aW9uIG8oZSxuKXt2YXIgdCxhO2Zvcih0PTAsYT1uLmMubGVuZ3RoO2E+dDt0Kys
<script>(function() {
// If window.HTMLWidgets is already defined, then use it; otherwise create a
// new object. This allows preceding code to set options that affect the
// initialization process (though none currently exist).
window.HTMLWidgets = window.HTMLWidgets || {};
// See if we're running in a viewer pane. If not, we're in a web browser.
var viewerMode = window.HTMLWidgets.viewerMode =
/\bviewer_pane=1\b/.test(window.location);
// See if we're running in Shiny mode. If not, it's a static document.
// Note that static widgets can appear in both Shiny and static modes, but
// obviously, Shiny widgets can only appear in Shiny apps/documents.
var shinyMode = window.HTMLWidgets.shinyMode =
typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings;
// We can't count on jQuery being available, so we implement our own
// version if necessary.
function querySelectorAll(scope, selector) {
if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) {
return scope.find(selector);
}
if (scope.querySelectorAll) {
return scope.querySelectorAll(selector);
}
}
function asArray(value) {
if (value === null)
return [];
if ($.isArray(value))
return value;
return [value];
}
// Implement jQuery's extend
function extend(target /*, ... */) {
if (arguments.length == 1) {
return target;
}
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var prop in source) {
if (source.hasOwnProperty(prop)) {
target[prop] = source[prop];
}
}
}
return target;
}
// IE8 doesn't support Array.forEach.
function forEach(values, callback, thisArg) {
if (values.forEach) {
values.forEach(callback, thisArg);
} else {
for (var i = 0; i < values.length; i++) {
callback.call(thisArg, values[i], i, values);
}
}
}
// Replaces the specified method with the return value of funcSource.
//
// Note that funcSource should not BE the new method, it should be a function
// that RETURNS the new method. funcSource receives a single argument that is
// the overridden method, it can be called from the new method. The overridden
// method can be called like a regular function, it has the target permanently
// bound to it so "this" will work correctly.
function overrideMethod(target, methodName, funcSource) {
var superFunc = target[methodName] || function() {};
var superFuncBound = function() {
return superFunc.apply(target, arguments);
};
target[methodName] = funcSource(superFuncBound);
}
// Add a method to delegator that, when invoked, calls
// delegatee.methodName. If there is no such method on
// the delegatee, but there was one on delegator before
// delegateMethod was called, then the original version
// is invoked instead.
// For example:
//
// var a = {
// method1: function() { console.log('a1'); }
// method2: function() { console.log('a2'); }
// };
// var b = {
// method1: function() { console.log('b1'); }
// };
// delegateMethod(a, b, "method1");
// delegateMethod(a, b, "method2");
// a.method1();
// a.method2();
//
// The output would be "b1", "a2".
function delegateMethod(delegator, delegatee, methodName) {
var inherited = delegator[methodName];
delegator[methodName] = function() {
var target = delegatee;
var method = delegatee[methodName];
// The method doesn't exist on the delegatee. Instead,
// call the method on the delegator, if it exists.
if (!method) {
target = delegator;
method = inherited;
}
if (method) {
return method.apply(target, arguments);
}
};
}
// Implement a vague facsimilie of jQuery's data method
function elementData(el, name, value) {
if (arguments.length == 2) {
return el["htmlwidget_data_" + name];
} else if (arguments.length == 3) {
el["htmlwidget_data_" + name] = value;
return el;
} else {
throw new Error("Wrong number of arguments for elementData: " +
arguments.length);
}
}
// http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
function hasClass(el, className) {
var re = new RegExp("\\b" + escapeRegExp(className) + "\\b");
return re.test(el.className);
}
// elements - array (or array-like object) of HTML elements
// className - class name to test for
// include - if true, only return elements with given className;
// if false, only return elements *without* given className
function filterByClass(elements, className, include) {
var results = [];
for (var i = 0; i < elements.length; i++) {
if (hasClass(elements[i], className) == include)
results.push(elements[i]);
}
return results;
}
function on(obj, eventName, func) {
if (obj.addEventListener) {
obj.addEventListener(eventName, func, false);
} else if (obj.attachEvent) {
obj.attachEvent(eventName, func);
}
}
function off(obj, eventName, func) {
if (obj.removeEventListener)
obj.removeEventListener(eventName, func, false);
else if (obj.detachEvent) {
obj.detachEvent(eventName, func);
}
}
// Translate array of values to top/right/bottom/left, as usual with
// the "padding" CSS property
// https://developer.mozilla.org/en-US/docs/Web/CSS/padding
function unpackPadding(value) {
if (typeof(value) === "number")
value = [value];
if (value.length === 1) {
return {top: value[0], right: value[0], bottom: value[0], left: value[0]};
}
if (value.length === 2) {
return {top: value[0], right: value[1], bottom: value[0], left: value[1]};
}
if (value.length === 3) {
return {top: value[0], right: value[1], bottom: value[2], left: value[1]};
}
if (value.length === 4) {
return {top: value[0], right: value[1], bottom: value[2], left: value[3]};
}
}
// Convert an unpacked padding object to a CSS value
function paddingToCss(paddingObj) {
return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px";
}
// Makes a number suitable for CSS
function px(x) {
if (typeof(x) === "number")
return x + "px";
else
return x;
}
// Retrieves runtime widget sizing information for an element.
// The return value is either null, or an object with fill, padding,
// defaultWidth, defaultHeight fields.
function sizingPolicy(el) {
var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']");
if (!sizingEl)
return null;
var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}");
if (viewerMode) {
return sp.viewer;
} else {
return sp.browser;
}
}
// @param tasks Array of strings (or falsy value, in which case no-op).
// Each element must be a valid JavaScript expression that yields a
// function. Or, can be an array of objects with "code" and "data"
// properties; in this case, the "code" property should be a string
// of JS that's an expr that yields a function, and "data" should be
// an object that will be added as an additional argument when that
// function is called.
// @param target The object that will be "this" for each function
// execution.
// @param args Array of arguments to be passed to the functions. (The
// same arguments will be passed to all functions.)
function evalAndRun(tasks, target, args) {
if (tasks) {
forEach(tasks, function(task) {
var theseArgs = args;
if (typeof(task) === "object") {
theseArgs = theseArgs.concat([task.data]);
task = task.code;
}
var taskFunc = eval("(" + task + ")");
if (typeof(taskFunc) !== "function") {
throw new Error("Task must be a function! Source:\n" + task);
}
taskFunc.apply(target, theseArgs);
});
}
}
function initSizing(el) {
var sizing = sizingPolicy(el);
if (!sizing)
return;
var cel = document.getElementById("htmlwidget_container");
if (!cel)
return;
if (typeof(sizing.padding) !== "undefined") {
document.body.style.margin = "0";
document.body.style.padding = paddingToCss(unpackPadding(sizing.padding));
}
if (sizing.fill) {
document.body.style.overflow = "hidden";
document.body.style.width = "100%";
document.body.style.height = "100%";
document.documentElement.style.width = "100%";
document.documentElement.style.height = "100%";
if (cel) {
cel.style.position = "absolute";
var pad = unpackPadding(sizing.padding);
cel.style.top = pad.top + "px";
cel.style.right = pad.right + "px";
cel.style.bottom = pad.bottom + "px";
cel.style.left = pad.left + "px";
el.style.width = "100%";
el.style.height = "100%";
}
return {
getWidth: function() { return cel.offsetWidth; },
getHeight: function() { return cel.offsetHeight; }
};
} else {
el.style.width = px(sizing.width);
el.style.height = px(sizing.height);
return {
getWidth: function() { return el.offsetWidth; },
getHeight: function() { return el.offsetHeight; }
};
}
}
// Default implementations for methods
var defaults = {
find: function(scope) {
return querySelectorAll(scope, "." + this.name);
},
renderError: function(el, err) {
var $el = $(el);
this.clearError(el);
// Add all these error classes, as Shiny does
var errClass = "shiny-output-error";
if (err.type !== null) {
// use the classes of the error condition as CSS class names
errClass = errClass + " " + $.map(asArray(err.type), function(type) {
return errClass + "-" + type;
}).join(" ");
}
errClass = errClass + " htmlwidgets-error";
// Is el inline or block? If inline or inline-block, just display:none it
// and add an inline error.
var display = $el.css("display");
$el.data("restore-display-mode", display);
if (display === "inline" || display === "inline-block") {
$el.hide();
if (err.message !== "") {
var errorSpan = $("<span>").addClass(errClass);
errorSpan.text(err.message);
$el.after(errorSpan);
}
} else if (display === "block") {
// If block, add an error just after the el, set visibility:none on the
// el, and position the error to be on top of the el.
// Mark it with a unique ID and CSS class so we can remove it later.
$el.css("visibility", "hidden");
if (err.message !== "") {
var errorDiv = $("<div>").addClass(errClass).css("position", "absolute")
.css("top", el.offsetTop)
.css("left", el.offsetLeft)
// setting width can push out the page size, forcing otherwise
// unnecessary scrollbars to appear and making it impossible for
// the element to shrink; so use max-width instead
.css("maxWidth", el.offsetWidth)
.css("height", el.offsetHeight);
errorDiv.text(err.message);
$el.after(errorDiv);
// Really dumb way to keep the size/position of the error in sync with
// the parent element as the window is resized or whatever.
var intId = setInterval(function() {
if (!errorDiv[0].parentElement) {
clearInterval(intId);
return;
}
errorDiv
.css("top", el.offsetTop)
.css("left", el.offsetLeft)
.css("maxWidth", el.offsetWidth)
.css("height", el.offsetHeight);
}, 500);
}
}
},
clearError: function(el) {
var $el = $(el);
var display = $el.data("restore-display-mode");
$el.data("restore-display-mode", null);
if (display === "inline" || display === "inline-block") {
if (display)
$el.css("display", display);
$(el.nextSibling).filter(".htmlwidgets-error").remove();
} else if (display === "block"){
$el.css("visibility", "inherit");
$(el.nextSibling).filter(".htmlwidgets-error").remove();
}
},
sizing: {}
};
// Called by widget bindings to register a new type of widget. The definition
// object can contain the following properties:
// - name (required) - A string indicating the binding name, which will be
// used by default as the CSS classname to look for.
// - initialize (optional) - A function(el) that will be called once per
// widget element; if a value is returned, it will be passed as the third
// value to renderValue.
// - renderValue (required) - A function(el, data, initValue) that will be
// called with data. Static contexts will cause this to be called once per
// element; Shiny apps will cause this to be called multiple times per
// element, as the data changes.
window.HTMLWidgets.widget = function(definition) {
if (!definition.name) {
throw new Error("Widget must have a name");
}
if (!definition.type) {
throw new Error("Widget must have a type");
}
// Currently we only support output widgets
if (definition.type !== "output") {
throw new Error("Unrecognized widget type '" + definition.type + "'");
}
// TODO: Verify that .name is a valid CSS classname
// Support new-style instance-bound definitions. Old-style class-bound
// definitions have one widget "object" per widget per type/class of
// widget; the renderValue and resize methods on such widget objects
// take el and instance arguments, because the widget object can't
// store them. New-style instance-bound definitions have one widget
// object per widget instance; the definition that's passed in doesn't
// provide renderValue or resize methods at all, just the single method
// factory(el, width, height)
// which returns an object that has renderValue(x) and resize(w, h).
// This enables a far more natural programming style for the widget
// author, who can store per-instance state using either OO-style
// instance fields or functional-style closure variables (I guess this
// is in contrast to what can only be called C-style pseudo-OO which is
// what we required before).
if (definition.factory) {
definition = createLegacyDefinitionAdapter(definition);
}
if (!definition.renderValue) {
throw new Error("Widget must have a renderValue function");
}
// For static rendering (non-Shiny), use a simple widget registration
// scheme. We also use this scheme for Shiny apps/documents that also
// contain static widgets.
window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || [];
// Merge defaults into the definition; don't mutate the original definition.
var staticBinding = extend({}, defaults, definition);
overrideMethod(staticBinding, "find", function(superfunc) {
return function(scope) {
var results = superfunc(scope);
// Filter out Shiny outputs, we only want the static kind
return filterByClass(results, "html-widget-output", false);
};
});
window.HTMLWidgets.widgets.push(staticBinding);
if (shinyMode) {
// Shiny is running. Register the definition with an output binding.
// The definition itself will not be the output binding, instead
// we will make an output binding object that delegates to the
// definition. This is because we foolishly used the same method
// name (renderValue) for htmlwidgets definition and Shiny bindings
// but they actually have quite different semantics (the Shiny
// bindings receive data that includes lots of metadata that it
// strips off before calling htmlwidgets renderValue). We can't
// just ignore the difference because in some widgets it's helpful
// to call this.renderValue() from inside of resize(), and if
// we're not delegating, then that call will go to the Shiny
// version instead of the htmlwidgets version.
// Merge defaults with definition, without mutating either.
var bindingDef = extend({}, defaults, definition);
// This object will be our actual Shiny binding.
var shinyBinding = new Shiny.OutputBinding();
// With a few exceptions, we'll want to simply use the bindingDef's
// version of methods if they are available, otherwise fall back to
// Shiny's defaults. NOTE: If Shiny's output bindings gain additional
// methods in the future, and we want them to be overrideable by
// HTMLWidget binding definitions, then we'll need to add them to this
// list.
delegateMethod(shinyBinding, bindingDef, "getId");
delegateMethod(shinyBinding, bindingDef, "onValueChange");
delegateMethod(shinyBinding, bindingDef, "onValueError");
delegateMethod(shinyBinding, bindingDef, "renderError");
delegateMethod(shinyBinding, bindingDef, "clearError");
delegateMethod(shinyBinding, bindingDef, "showProgress");
// The find, renderValue, and resize are handled differently, because we
// want to actually decorate the behavior of the bindingDef methods.
shinyBinding.find = function(scope) {
var results = bindingDef.find(scope);
// Only return elements that are Shiny outputs, not static ones
var dynamicResults = results.filter(".html-widget-output");
// It's possible that whatever caused Shiny to think there might be
// new dynamic outputs, also caused there to be new static outputs.
// Since there might be lots of different htmlwidgets bindings, we
// schedule execution for later--no need to staticRender multiple
// times.
if (results.length !== dynamicResults.length)
scheduleStaticRender();
return dynamicResults;
};
// Wrap renderValue to handle initialization, which unfortunately isn't
// supported natively by Shiny at the time of this writing.
shinyBinding.renderValue = function(el, data) {
Shiny.renderDependencies(data.deps);
// Resolve strings marked as javascript literals to objects
if (!(data.evals instanceof Array)) data.evals = [data.evals];
for (var i = 0; data.evals && i < data.evals.length; i++) {
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]);
}
if (!bindingDef.renderOnNullValue) {
if (data.x === null) {
el.style.visibility = "hidden";
return;
} else {
el.style.visibility = "inherit";
}
}
if (!elementData(el, "initialized")) {
initSizing(el);
elementData(el, "initialized", true);
if (bindingDef.initialize) {
var result = bindingDef.initialize(el, el.offsetWidth,
el.offsetHeight);
elementData(el, "init_result", result);
}
}
bindingDef.renderValue(el, data.x, elementData(el, "init_result"));
evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]);
};
// Only override resize if bindingDef implements it
if (bindingDef.resize) {
shinyBinding.resize = function(el, width, height) {
// Shiny can call resize before initialize/renderValue have been
// called, which doesn't make sense for widgets.
if (elementData(el, "initialized")) {
bindingDef.resize(el, width, height, elementData(el, "init_result"));
}
};
}
Shiny.outputBindings.register(shinyBinding, bindingDef.name);
}
};
var scheduleStaticRenderTimerId = null;
function scheduleStaticRender() {
if (!scheduleStaticRenderTimerId) {
scheduleStaticRenderTimerId = setTimeout(function() {
scheduleStaticRenderTimerId = null;
window.HTMLWidgets.staticRender();
}, 1);
}
}
// Render static widgets after the document finishes loading
// Statically render all elements that are of this widget's class
window.HTMLWidgets.staticRender = function() {
var bindings = window.HTMLWidgets.widgets || [];
forEach(bindings, function(binding) {
var matches = binding.find(document.documentElement);
forEach(matches, function(el) {
var sizeObj = initSizing(el, binding);
if (hasClass(el, "html-widget-static-bound"))
return;
el.className = el.className + " html-widget-static-bound";
var initResult;
if (binding.initialize) {
initResult = binding.initialize(el,
sizeObj ? sizeObj.getWidth() : el.offsetWidth,
sizeObj ? sizeObj.getHeight() : el.offsetHeight
);
elementData(el, "init_result", initResult);
}
if (binding.resize) {
var lastSize = {};
var resizeHandler = function(e) {
var size = {
w: sizeObj ? sizeObj.getWidth() : el.offsetWidth,
h: sizeObj ? sizeObj.getHeight() : el.offsetHeight
};
if (size.w === 0 && size.h === 0)
return;
if (size.w === lastSize.w && size.h === lastSize.h)
return;
lastSize = size;
binding.resize(el, size.w, size.h, initResult);
};
on(window, "resize", resizeHandler);
// This is needed for cases where we're running in a Shiny
// app, but the widget itself is not a Shiny output, but
// rather a simple static widget. One example of this is
// an rmarkdown document that has runtime:shiny and widget
// that isn't in a render function. Shiny only knows to
// call resize handlers for Shiny outputs, not for static
// widgets, so we do it ourselves.
if (window.jQuery) {
window.jQuery(document).on(
"shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets",
resizeHandler
);
window.jQuery(document).on(
"hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets",
resizeHandler
);
}
// This is needed for the specific case of ioslides, which
// flips slides between display:none and display:block.
// Ideally we would not have to have ioslide-specific code
// here, but rather have ioslides raise a generic event,
// but the rmarkdown package just went to CRAN so the
// window to getting that fixed may be long.
if (window.addEventListener) {
// It's OK to limit this to window.addEventListener
// browsers because ioslides itself only supports
// such browsers.
on(document, "slideenter", resizeHandler);
on(document, "slideleave", resizeHandler);
}
}
var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']");
if (scriptData) {
var data = JSON.parse(scriptData.textContent || scriptData.text);
// Resolve strings marked as javascript literals to objects
if (!(data.evals instanceof Array)) data.evals = [data.evals];
for (var k = 0; data.evals && k < data.evals.length; k++) {
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]);
}
binding.renderValue(el, data.x, initResult);
evalAndRun(data.jsHooks.render, initResult, [el, data.x]);
}
});
});
invokePostRenderHandlers();
}
// Wait until after the document has loaded to render the widgets.
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", function() {
document.removeEventListener("DOMContentLoaded", arguments.callee, false);
window.HTMLWidgets.staticRender();
}, false);
} else if (document.attachEvent) {
document.attachEvent("onreadystatechange", function() {
if (document.readyState === "complete") {
document.detachEvent("onreadystatechange", arguments.callee);
window.HTMLWidgets.staticRender();
}
});
}
window.HTMLWidgets.getAttachmentUrl = function(depname, key) {
// If no key, default to the first item
if (typeof(key) === "undefined")
key = 1;
var link = document.getElementById(depname + "-" + key + "-attachment");
if (!link) {
throw new Error("Attachment " + depname + "/" + key + " not found in document");
}
return link.getAttribute("href");
};
window.HTMLWidgets.dataframeToD3 = function(df) {
var names = [];
var length;
for (var name in df) {
if (df.hasOwnProperty(name))
names.push(name);
if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") {
throw new Error("All fields must be arrays");
} else if (typeof(length) !== "undefined" && length !== df[name].length) {
throw new Error("All fields must be arrays of the same length");
}
length = df[name].length;
}
var results = [];
var item;
for (var row = 0; row < length; row++) {
item = {};
for (var col = 0; col < names.length; col++) {
item[names[col]] = df[names[col]][row];
}
results.push(item);
}
return results;
};
window.HTMLWidgets.transposeArray2D = function(array) {
if (array.length === 0) return array;
var newArray = array[0].map(function(col, i) {
return array.map(function(row) {
return row[i]
})
});
return newArray;
};
// Split value at splitChar, but allow splitChar to be escaped
// using escapeChar. Any other characters escaped by escapeChar
// will be included as usual (including escapeChar itself).
function splitWithEscape(value, splitChar, escapeChar) {
var results = [];
var escapeMode = false;
var currentResult = "";
for (var pos = 0; pos < value.length; pos++) {
if (!escapeMode) {
if (value[pos] === splitChar) {
results.push(currentResult);
currentResult = "";
} else if (value[pos] === escapeChar) {
escapeMode = true;
} else {
currentResult += value[pos];
}
} else {
currentResult += value[pos];
escapeMode = false;
}
}
if (currentResult !== "") {
results.push(currentResult);
}
return results;
}
// Function authored by Yihui/JJ Allaire
window.HTMLWidgets.evaluateStringMember = function(o, member) {
var parts = splitWithEscape(member, '.', '\\');
for (var i = 0, l = parts.length; i < l; i++) {
var part = parts[i];
// part may be a character or 'numeric' member name
if (o !== null && typeof o === "object" && part in o) {
if (i == (l - 1)) { // if we are at the end of the line then evalulate
if (typeof o[part] === "string")
o[part] = eval("(" + o[part] + ")");
} else { // otherwise continue to next embedded object
o = o[part];
}
}
}
};
// Retrieve the HTMLWidget instance (i.e. the return value of an
// HTMLWidget binding's initialize() or factory() function)
// associated with an element, or null if none.
window.HTMLWidgets.getInstance = function(el) {
return elementData(el, "init_result");
};
// Finds the first element in the scope that matches the selector,
// and returns the HTMLWidget instance (i.e. the return value of
// an HTMLWidget binding's initialize() or factory() function)
// associated with that element, if any. If no element matches the
// selector, or the first matching element has no HTMLWidget
// instance associated with it, then null is returned.
//
// The scope argument is optional, and defaults to window.document.
window.HTMLWidgets.find = function(scope, selector) {
if (arguments.length == 1) {
selector = scope;
scope = document;
}
var el = scope.querySelector(selector);
if (el === null) {
return null;
} else {
return window.HTMLWidgets.getInstance(el);
}
};
// Finds all elements in the scope that match the selector, and
// returns the HTMLWidget instances (i.e. the return values of
// an HTMLWidget binding's initialize() or factory() function)
// associated with the elements, in an array. If elements that
// match the selector don't have an associated HTMLWidget
// instance, the returned array will contain nulls.
//
// The scope argument is optional, and defaults to window.document.
window.HTMLWidgets.findAll = function(scope, selector) {
if (arguments.length == 1) {
selector = scope;
scope = document;
}
var nodes = scope.querySelectorAll(selector);
var results = [];
for (var i = 0; i < nodes.length; i++) {
results.push(window.HTMLWidgets.getInstance(nodes[i]));
}
return results;
};
var postRenderHandlers = [];
function invokePostRenderHandlers() {
while (postRenderHandlers.length) {
var handler = postRenderHandlers.shift();
if (handler) {
handler();
}
}
}
// Register the given callback function to be invoked after the
// next time static widgets are rendered.
window.HTMLWidgets.addPostRenderHandler = function(callback) {
postRenderHandlers.push(callback);
};
// Takes a new-style instance-bound definition, and returns an
// old-style class-bound definition. This saves us from having
// to rewrite all the logic in this file to accomodate both
// types of definitions.
function createLegacyDefinitionAdapter(defn) {
var result = {
name: defn.name,
type: defn.type,
initialize: function(el, width, height) {
return defn.factory(el, width, height);
},
renderValue: function(el, x, instance) {
return instance.renderValue(x);
},
resize: function(el, width, height, instance) {
return instance.resize(width, height);
}
};
if (defn.find)
result.find = defn.find;
if (defn.renderError)
result.renderError = defn.renderError;
if (defn.clearError)
result.clearError = defn.clearError;
return result;
}
})();
</script>
<style type="text/css">.dt-crosstalk-fade {
opacity: 0.2;
}
html body div.DTS div.dataTables_scrollBody {
background: none;
}
</style>
<script>(function() {
// some helper functions: using a global object DTWidget so that it can be used
// in JS() code, e.g. datatable(options = list(foo = JS('code'))); unlike R's
// dynamic scoping, when 'code' is eval()'ed, JavaScript does not know objects
// from the "parent frame", e.g. JS('DTWidget') will not work unless it was made
// a global object
var DTWidget = {};
// 123456666.7890 -> 123,456,666.7890
var markInterval = function(d, digits, interval, mark, decMark, precision) {
x = precision ? d.toPrecision(digits) : d.toFixed(digits);
if (!/^-?[\d.]+$/.test(x)) return x;
var xv = x.split('.');
if (xv.length > 2) return x; // should have at most one decimal point
xv[0] = xv[0].replace(new RegExp('\\B(?=(\\d{' + interval + '})+(?!\\d))', 'g'), mark);
return xv.join(decMark);
};
DTWidget.formatCurrency = function(thiz, row, data, col, currency, digits, interval, mark, decMark, before) {
var d = parseFloat(data[col]);
if (isNaN(d)) return;
var res = markInterval(d, digits, interval, mark, decMark);
res = before ? (/^-/.test(res) ? '-' + currency + res.replace(/^-/, '') : currency + res) :
res + currency;
$(thiz.api().cell(row, col).node()).html(res);
};
DTWidget.formatString = function(thiz, row, data, col, prefix, suffix) {
var d = data[col];
if (d === null) return;
$(thiz.api().cell(row, col).node()).html(prefix + d + suffix);
};
DTWidget.formatPercentage = function(thiz, row, data, col, digits, interval, mark, decMark) {
var d = parseFloat(data[col]);
if (isNaN(d)) return;
$(thiz.api().cell(row, col).node())
.html(markInterval(d * 100, digits, interval, mark, decMark) + '%');
};
DTWidget.formatRound = function(thiz, row, data, col, digits, interval, mark, decMark) {
var d = parseFloat(data[col]);
if (isNaN(d)) return;
$(thiz.api().cell(row, col).node()).html(markInterval(d, digits, interval, mark, decMark));
};
DTWidget.formatSignif = function(thiz, row, data, col, digits, interval, mark, decMark) {
var d = parseFloat(data[col]);
if (isNaN(d)) return;
$(thiz.api().cell(row, col).node())
.html(markInterval(d, digits, interval, mark, decMark, true));
};
DTWidget.formatDate = function(thiz, row, data, col, method, params) {
var d = data[col];
if (d === null) return;
// (new Date('2015-10-28')).toDateString() may return 2015-10-27 because the
// actual time created could be like 'Tue Oct 27 2015 19:00:00 GMT-0500 (CDT)',
// i.e. the date-only string is treated as UTC time instead of local time
if (method === 'toDateString' && /^\d{4,}\D\d{2}\D\d{2}$/.test(d)) {
d = d.split(/\D/);
d = new Date(d[0], d[1] - 1, d[2]);
} else {
d = new Date(d);
}
$(thiz.api().cell(row, col).node()).html(d[method].apply(d, params));
};
window.DTWidget = DTWidget;
var transposeArray2D = function(a) {
return a.length === 0 ? a : HTMLWidgets.transposeArray2D(a);
};
var crosstalkPluginsInstalled = false;
function maybeInstallCrosstalkPlugins() {
if (crosstalkPluginsInstalled)
return;
crosstalkPluginsInstalled = true;
$.fn.dataTable.ext.afnFiltering.push(
function(oSettings, aData, iDataIndex) {
var ctfilter = oSettings.nTable.ctfilter;
if (ctfilter && !ctfilter[iDataIndex])
return false;
var ctselect = oSettings.nTable.ctselect;
if (ctselect && !ctselect[iDataIndex])
return false;
return true;
}
);
}
HTMLWidgets.widget({
name: "datatables",
type: "output",
renderOnNullValue: true,
initialize: function(el, width, height) {
$(el).html('&nbsp;');
return {
data: null,
ctfilterHandle: new crosstalk.FilterHandle(),
ctfilterSubscription: null,
ctselectHandle: new crosstalk.SelectionHandle(),
ctselectSubscription: null
};
},
renderValue: function(el, data, instance) {
if (el.offsetWidth === 0 || el.offsetHeight === 0) {
instance.data = data;
return;
}
instance.data = null;
var $el = $(el);
$el.empty();
if (data === null) {
$el.append('&nbsp;');
// clear previous Shiny inputs (if any)
for (var i in instance.clearInputs) instance.clearInputs[i]();
instance.clearInputs = {};
return;
}
var crosstalkOptions = data.crosstalkOptions;
if (!crosstalkOptions) crosstalkOptions = {
'key': null, 'group': null
};
if (crosstalkOptions.group) {
maybeInstallCrosstalkPlugins();
instance.ctfilterHandle.setGroup(crosstalkOptions.group);
instance.ctselectHandle.setGroup(crosstalkOptions.group);
}
// If we are in a flexdashboard scroll layout then we:
// (a) Always want to use pagination (otherwise we'll have
// a "double scroll bar" effect on the phone); and
// (b) Never want to fill the container (we want the pagination
// level to determine the size of the container)
if (window.FlexDashboard && !window.FlexDashboard.isFillPage()) {
data.options.bPaginate = true;
data.fillContainer = false;
}
// if we are in the viewer then we always want to fillContainer and
// and autoHideNavigation (unless the user has explicitly set these)
if (window.HTMLWidgets.viewerMode) {
if (!data.hasOwnProperty("fillContainer"))
data.fillContainer = true;
if (!data.hasOwnProperty("autoHideNavigation"))
data.autoHideNavigation = true;
}
// propagate fillContainer to instance (so we have it in resize)
instance.fillContainer = data.fillContainer;
var cells = data.data;
if (cells instanceof Array) cells = transposeArray2D(cells);
$el.append(data.container);
var $table = $el.find('table');
if (data.class) $table.addClass(data.class);
if (data.caption) $table.prepend(data.caption);
if (HTMLWidgets.shinyMode && data.selection.mode !== 'none' &&
data.selection.target === 'row+column') {
if ($table.children('tfoot').length === 0) {
$table.append($('<tfoot>'));
$table.find('thead tr').clone().appendTo($table.find('tfoot'));
}
}
// column filters
var filterRow;
switch (data.filter) {
case 'top':
$table.children('thead').append(data.filterHTML);
filterRow = $table.find('thead tr:last td');
break;
case 'bottom':
if ($table.children('tfoot').length === 0) {
$table.append($('<tfoot>'));
}
$table.children('tfoot').prepend(data.filterHTML);
filterRow = $table.find('tfoot tr:first td');
break;
}
var options = { searchDelay: 1000 };
if (cells !== null) $.extend(options, {
data: cells
});
// options for fillContainer
var bootstrapActive = typeof($.fn.popover) != 'undefined';
if (instance.fillContainer) {
// force scrollX/scrollY and turn off autoWidth
options.scrollX = true;
options.scrollY = "100px"; // can be any value, we'll adjust below
// if we aren't paginating then move around the info/filter controls
// to save space at the bottom and rephrase the info callback
if (data.options.bPaginate === false) {
// we know how to do this cleanly for bootstrap, not so much
// for other themes/layouts
if (bootstrapActive) {
options.dom = "<'row'<'col-sm-4'i><'col-sm-8'f>>" +
"<'row'<'col-sm-12'tr>>";
}
options.fnInfoCallback = function(oSettings, iStart, iEnd,
iMax, iTotal, sPre) {
return Number(iTotal).toLocaleString() + " records";
};
}
}
// auto hide navigation if requested
if (data.autoHideNavigation === true) {
if (bootstrapActive && data.options.bPaginate !== false) {
// strip all nav if length >= cells
if ((cells instanceof Array) && data.options.iDisplayLength >= cells.length)
options.dom = "<'row'<'col-sm-12'tr>>";
// alternatively lean things out for flexdashboard mobile portrait
else if (window.FlexDashboard && window.FlexDashboard.isMobilePhone())
options.dom = "<'row'<'col-sm-12'f>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-12'p>>";
}
}
$.extend(true, options, data.options || {});
var searchCols = options.searchCols;
if (searchCols) {
searchCols = searchCols.map(function(x) {
return x === null ? '' : x.search;
});
// FIXME: this means I don't respect the escapeRegex setting
delete options.searchCols;
}
// server-side processing?
var server = options.serverSide === true;
// use the dataSrc function to pre-process JSON data returned from R
var DT_rows_all = [], DT_rows_current = [];
if (server && HTMLWidgets.shinyMode && typeof options.ajax === 'object' &&
/^session\/[\da-z]+\/dataobj/.test(options.ajax.url) && !options.ajax.dataSrc) {
options.ajax.dataSrc = function(json) {
DT_rows_all = $.makeArray(json.DT_rows_all);
DT_rows_current = $.makeArray(json.DT_rows_current);
return json.data;
};
}
var thiz = this;
if (instance.fillContainer) $table.on('init.dt', function(e) {
thiz.fillAvailableHeight(el, $(el).innerHeight());
});
var table = $table.DataTable(options);
$el.data('datatable', table);
// Unregister previous Crosstalk event subscriptions, if they exist
if (instance.ctfilterSubscription) {
instance.ctfilterHandle.off("change", instance.ctfilterSubscription);
instance.ctfilterSubscription = null;
}
if (instance.ctselectSubscription) {
instance.ctselectHandle.off("change", instance.ctselectSubscription);
instance.ctselectSubscription = null;
}
if (!crosstalkOptions.group) {
$table[0].ctfilter = null;
$table[0].ctselect = null;
} else {
var key = crosstalkOptions.key;
function keysToMatches(keys) {
if (!keys) {
return null;
} else {
var selectedKeys = {};
for (var i = 0; i < keys.length; i++) {
selectedKeys[keys[i]] = true;
}
var matches = {};
for (var j = 0; j < key.length; j++) {
if (selectedKeys[key[j]])
matches[j] = true;
}
return matches;
}
}
function applyCrosstalkFilter(e) {
$table[0].ctfilter = keysToMatches(e.value);
table.draw();
}
instance.ctfilterSubscription = instance.ctfilterHandle.on("change", applyCrosstalkFilter);
applyCrosstalkFilter({value: instance.ctfilterHandle.filteredKeys});
function applyCrosstalkSelection(e) {
if (e.sender !== instance.ctselectHandle) {
table
.rows('.' + selClass, {search: 'applied'})
.nodes()
.to$()
.removeClass(selClass);
if (selectedRows)
changeInput('rows_selected', selectedRows(), void 0, true);
}
if (e.sender !== instance.ctselectHandle && e.value && e.value.length) {
$table[0].ctselect = keysToMatches(e.value);
table.draw();
} else {
if ($table[0].ctselect) {
$table[0].ctselect = null;
table.draw();
}
}
}
instance.ctselectSubscription = instance.ctselectHandle.on("change", applyCrosstalkSelection);
// TODO: This next line doesn't seem to work when renderDataTable is used
applyCrosstalkSelection({value: instance.ctselectHandle.value});
}
var inArray = function(val, array) {
return $.inArray(val, $.makeArray(array)) > -1;
};
// encode + to %2B when searching in the table on server side, because
// shiny::parseQueryString() treats + as spaces, and DataTables does not
// encode + to %2B (or % to %25) when sending the request
var encode_plus = function(x) {
return server ? x.replace(/%/g, '%25').replace(/\+/g, '%2B') : x;
};
// search the i-th column
var searchColumn = function(i, value) {
var regex = false, ci = true;
if (options.search) {
regex = options.search.regex,
ci = options.search.caseInsensitive !== false;
}
return table.column(i).search(encode_plus(value), regex, !regex, ci);
};
if (data.filter !== 'none') {
filterRow.each(function(i, td) {
var $td = $(td), type = $td.data('type'), filter;
var $input = $td.children('div').first().children('input');
$input.prop('disabled', !table.settings()[0].aoColumns[i].bSearchable || type === 'disabled');
$input.on('input blur', function() {
$input.next('span').toggle(Boolean($input.val()));
});
// Bootstrap sets pointer-events to none and we won't be able to click
// the clear button
$input.next('span').css('pointer-events', 'auto').hide().click(function() {
$(this).hide().prev('input').val('').trigger('input').focus();
});
var searchCol; // search string for this column
if (searchCols && searchCols[i]) {
searchCol = searchCols[i];
$input.val(searchCol).trigger('input');
}
var $x = $td.children('div').last();
// remove the overflow: hidden attribute of the scrollHead
// (otherwise the scrolling table body obscures the filters)
var scrollHead = $(el).find('.dataTables_scrollHead,.dataTables_scrollFoot');
var cssOverflow = scrollHead.css('overflow');
if (cssOverflow === 'hidden') {
$x.on('show hide', function(e) {
scrollHead.css('overflow', e.type === 'show' ? '' : cssOverflow);
});
$x.css('z-index', 25);
}
if (inArray(type, ['factor', 'logical'])) {
$input.on({
click: function() {
$input.parent().hide(); $x.show().trigger('show'); filter[0].selectize.focus();
},
input: function() {
if ($input.val() === '') filter[0].selectize.setValue([]);
}
});
var $input2 = $x.children('select');
filter = $input2.selectize({
options: $input2.data('options').map(function(v, i) {
return ({text: v, value: v});
}),
plugins: ['remove_button'],
hideSelected: true,
onChange: function(value) {
if (value === null) value = []; // compatibility with jQuery 3.0
$input.val(value.length ? JSON.stringify(value) : '');
if (value.length) $input.trigger('input');
$input.attr('title', $input.val());
if (server) {
table.column(i).search(value.length ? encode_plus(JSON.stringify(value)) : '').draw();
return;
}
// turn off filter if nothing selected
$td.data('filter', value.length > 0);
table.draw(); // redraw table, and filters will be applied
}
});
if (searchCol) filter[0].selectize.setValue(JSON.parse(searchCol));
// an ugly hack to deal with shiny: for some reason, the onBlur event
// of selectize does not work in shiny
$x.find('div > div.selectize-input > input').on('blur', function() {
$x.hide().trigger('hide'); $input.parent().show(); $input.trigger('blur');
});
filter.next('div').css('margin-bottom', 'auto');
} else if (type === 'character') {
var fun = function() {
searchColumn(i, $input.val()).draw();
};
if (server) {
fun = $.fn.dataTable.util.throttle(fun, options.searchDelay);
}
$input.on('input', fun);
} else if (inArray(type, ['number', 'integer', 'date', 'time'])) {
var $x0 = $x;
$x = $x0.children('div').first();
$x0.css({
'background-color': '#fff',
'border': '1px #ddd solid',
'border-radius': '4px',
'padding': '20px 20px 10px 20px'
});
var $spans = $x0.children('span').css({
'margin-top': '10px',
'white-space': 'nowrap'
});
var $span1 = $spans.first(), $span2 = $spans.last();
var r1 = +$x.data('min'), r2 = +$x.data('max');
// when the numbers are too small or have many decimal places, the
// slider may have numeric precision problems (#150)
var scale = Math.pow(10, Math.max(0, +$x.data('scale') || 0));
r1 = Math.round(r1 * scale); r2 = Math.round(r2 * scale);
var scaleBack = function(x, scale) {
if (scale === 1) return x;
var d = Math.round(Math.log(scale) / Math.log(10));
// to avoid problems like 3.423/100 -> 0.034230000000000003
return (x / scale).toFixed(d);
};
$input.on({
focus: function() {
$x0.show().trigger('show');
// first, make sure the slider div leaves at least 20px between
// the two (slider value) span's
$x0.width(Math.max(160, $span1.outerWidth() + $span2.outerWidth() + 20));
// then, if the input is really wide, make the slider the same
// width as the input
if ($x0.outerWidth() < $input.outerWidth()) {
$x0.outerWidth($input.outerWidth());
}
// make sure the slider div does not reach beyond the right margin
if ($(window).width() < $x0.offset().left + $x0.width()) {
$x0.offset({
'left': $input.offset().left + $input.outerWidth() - $x0.outerWidth()
});
}
},
blur: function() {
$x0.hide().trigger('hide');
},
input: function() {
if ($input.val() === '') filter.val([r1, r2]);
},
change: function() {
var v = $input.val().replace(/\s/g, '');
if (v === '') return;
v = v.split('...');
if (v.length !== 2) {
$input.parent().addClass('has-error');
return;
}
if (v[0] === '') v[0] = r1;
if (v[1] === '') v[1] = r2;
$input.parent().removeClass('has-error');
// treat date as UTC time at midnight
var strTime = function(x) {
var s = type === 'date' ? 'T00:00:00Z' : '';
var t = new Date(x + s).getTime();
// add 10 minutes to date since it does not hurt the date, and
// it helps avoid the tricky floating point arithmetic problems,
// e.g. sometimes the date may be a few milliseconds earlier
// than the midnight due to precision problems in noUiSlider
return type === 'date' ? t + 3600000 : t;
};
if (inArray(type, ['date', 'time'])) {
v[0] = strTime(v[0]);
v[1] = strTime(v[1]);
}
if (v[0] != r1) v[0] *= scale;
if (v[1] != r2) v[1] *= scale;
filter.val(v);
}
});
var formatDate = function(d) {
d = scaleBack(d, scale);
if (type === 'number') return d;
if (type === 'integer') return parseInt(d);
var x = new Date(+d);
if (type === 'date') {
var pad0 = function(x) {
return ('0' + x).substr(-2, 2);
};
return x.getUTCFullYear() + '-' + pad0(1 + x.getUTCMonth())
+ '-' + pad0(x.getUTCDate());
} else {
return x.toISOString();
}
};
var opts = type === 'date' ? { step: 60 * 60 * 1000 } :
type === 'integer' ? { step: 1 } : {};
filter = $x.noUiSlider($.extend({
start: [r1, r2],
range: {min: r1, max: r2},
connect: true
}, opts));
if (scale > 1) (function() {
var t1 = r1, t2 = r2;
var val = filter.val();
while (val[0] > r1 || val[1] < r2) {
if (val[0] > r1) {
t1 -= val[0] - r1;
}
if (val[1] < r2) {
t2 += r2 - val[1];
}
filter = $x.noUiSlider($.extend({
start: [t1, t2],
range: {min: t1, max: t2},
connect: true
}, opts), true);
val = filter.val();
}
r1 = t1; r2 = t2;
})();
$span1.text(formatDate(r1)); $span2.text(formatDate(r2));
var updateSlider = function(e) {
var val = filter.val();
// turn off filter if in full range
$td.data('filter', val[0] > r1 || val[1] < r2);
var v1 = formatDate(val[0]), v2 = formatDate(val[1]), ival;
if ($td.data('filter')) {
ival = v1 + ' ... ' + v2;
$input.attr('title', ival).val(ival).trigger('input');
} else {
$input.attr('title', '').val('');
}
$span1.text(v1); $span2.text(v2);
if (e.type === 'slide') return; // no searching when sliding only
if (server) {
table.column(i).search($td.data('filter') ? ival : '').draw();
return;
}
table.draw();
};
filter.on({
set: updateSlider,
slide: updateSlider
});
}
// server-side processing will be handled by R (or whatever server
// language you use); the following code is only needed for client-side
// processing
if (server) {
// if a search string has been pre-set, search now
if (searchCol) searchColumn(i, searchCol).draw();
return;
}
var customFilter = function(settings, data, dataIndex) {
// there is no way to attach a search function to a specific table,
// and we need to make sure a global search function is not applied to
// all tables (i.e. a range filter in a previous table should not be
// applied to the current table); we use the settings object to
// determine if we want to perform searching on the current table,
// since settings.sTableId will be different to different tables
if (table.settings()[0] !== settings) return true;
// no filter on this column or no need to filter this column
if (typeof filter === 'undefined' || !$td.data('filter')) return true;
var r = filter.val(), v, r0, r1;
if (type === 'number' || type === 'integer') {
v = parseFloat(data[i]);
// how to handle NaN? currently exclude these rows
if (isNaN(v)) return(false);
r0 = parseFloat(scaleBack(r[0], scale))
r1 = parseFloat(scaleBack(r[1], scale));
if (v >= r0 && v <= r1) return true;
} else if (type === 'date' || type === 'time') {
v = new Date(data[i]);
r0 = new Date(r[0] / scale); r1 = new Date(r[1] / scale);
if (v >= r0 && v <= r1) return true;
} else if (type === 'factor') {
if (r.length === 0 || inArray(data[i], r)) return true;
} else if (type === 'logical') {
if (r.length === 0) return true;
if (inArray(data[i] === '' ? 'na' : data[i], r)) return true;
}
return false;
};
$.fn.dataTable.ext.search.push(customFilter);
// search for the preset search strings if it is non-empty
if (searchCol) {
if (inArray(type, ['factor', 'logical'])) {
filter[0].selectize.setValue(JSON.parse(searchCol));
} else if (type === 'character') {
$input.trigger('input');
} else if (inArray(type, ['number', 'integer', 'date', 'time'])) {
$input.trigger('change');
}
}
});
}
// highlight search keywords
var highlight = function() {
var body = $(table.table().body());
// removing the old highlighting first
body.unhighlight();
// don't highlight the "not found" row, so we get the rows using the api
if (table.rows({ filter: 'applied' }).data().length === 0) return;
// highlight gloal search keywords
body.highlight($.trim(table.search()).split(/\s+/));
// then highlight keywords from individual column filters
if (filterRow) filterRow.each(function(i, td) {
var $td = $(td), type = $td.data('type');
if (type !== 'character') return;
var $input = $td.children('div').first().children('input');
var column = table.column(i).nodes().to$(),
val = $.trim($input.val());
if (type !== 'character' || val === '') return;
column.highlight(val.split(/\s+/));
});
};
if (options.searchHighlight) {
table
.on('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth', highlight)
.on('destroy', function() {
// remove event handler
table.off('draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth');
});
// initial highlight for state saved conditions and initial states
highlight();
}
// run the callback function on the table instance
if (typeof data.callback === 'function') data.callback(table);
// double click to edit the cell
if (data.editable) table.on('dblclick.dt', 'tbody td', function() {
var $input = $('<input type="text">');
var $this = $(this), value = table.cell(this).data(), html = $this.html();
var changed = false;
$input.val(value);
$this.empty().append($input);
$input.css('width', '100%').focus().on('change', function() {
changed = true;
var valueNew = $input.val();
if (valueNew != value) {
table.cell($this).data(valueNew);
if (HTMLWidgets.shinyMode) changeInput('cell_edit', cellInfo($this));
// for server-side processing, users have to call replaceData() to update the table
if (!server) table.draw(false);
} else {
$this.html(html);
}
$input.remove();
}).on('blur', function() {
if (!changed) $input.trigger('change');
});
});
// interaction with shiny
if (!HTMLWidgets.shinyMode && !crosstalkOptions.group) return;
var methods = {};
var shinyData = {};
methods.updateCaption = function(caption) {
if (!caption) return;
$table.children('caption').replaceWith(caption);
}
// register clear functions to remove input values when the table is removed
instance.clearInputs = {};
var changeInput = function(id, value, type, noCrosstalk) {
var event = id;
id = el.id + '_' + id;
if (type) id = id + ':' + type;
// do not update if the new value is the same as old value
if (shinyData.hasOwnProperty(id) && shinyData[id] === JSON.stringify(value))
return;
shinyData[id] = JSON.stringify(value);
if (HTMLWidgets.shinyMode) {
Shiny.onInputChange(id, value);
if (!instance.clearInputs[id]) instance.clearInputs[id] = function() {
Shiny.onInputChange(id, null);
}
}
// HACK
if (event === "rows_selected" && !noCrosstalk) {
if (crosstalkOptions.group) {
var keys = crosstalkOptions.key;
var selectedKeys = null;
if (value) {
selectedKeys = [];
for (var i = 0; i < value.length; i++) {
// The value array's contents use 1-based row numbers, so we must
// convert to 0-based before indexing into the keys array.
selectedKeys.push(keys[value[i] - 1]);
}
}
instance.ctselectHandle.set(selectedKeys);
}
}
};
var addOne = function(x) {
return x.map(function(i) { return 1 + i; });
};
var unique = function(x) {
var ux = [];
$.each(x, function(i, el){
if ($.inArray(el, ux) === -1) ux.push(el);
});
return ux;
}
// change the row index of a cell
var tweakCellIndex = function(cell) {
var info = cell.index();
if (server) {
info.row = DT_rows_current[info.row];
} else {
info.row += 1;
}
return {row: info.row, col: info.column};
}
var selMode = data.selection.mode, selTarget = data.selection.target;
if (inArray(selMode, ['single', 'multiple'])) {
var selClass = data.style === 'bootstrap' ? 'active' : 'selected';
var selected = data.selection.selected, selected1, selected2;
// selected1: row indices; selected2: column indices
if (selected === null) {
selected1 = selected2 = [];
} else if (selTarget === 'row') {
selected1 = $.makeArray(selected);
} else if (selTarget === 'column') {
selected2 = $.makeArray(selected);
} else if (selTarget === 'row+column') {
selected1 = $.makeArray(selected.rows);
selected2 = $.makeArray(selected.cols);
}
// After users reorder the rows or filter the table, we cannot use the table index
// directly. Instead, we need this function to find out the rows between the two clicks.
// If user filter the table again between the start click and the end click, the behavior
// would be undefined, but it should not be a problem.
var shiftSelRowsIndex = function(start, end) {
var indexes = server ? DT_rows_all : table.rows({ search: 'applied' }).indexes().toArray();
start = indexes.indexOf(start); end = indexes.indexOf(end);
// if start is larger than end, we need to swap
if (start > end) {
var tmp = end; end = start; start = tmp;
}
return indexes.slice(start, end + 1);
}
var serverRowIndex = function(clientRowIndex) {
return server ? DT_rows_current[clientRowIndex] : clientRowIndex + 1;
}
// row, column, or cell selection
var lastClickedRow;
if (inArray(selTarget, ['row', 'row+column'])) {
var selectedRows = function() {
var rows = table.rows('.' + selClass);
var idx = rows.indexes().toArray();
if (!server) return addOne(idx);
idx = idx.map(function(i) {
return DT_rows_current[i];
});
selected1 = selMode === 'multiple' ? unique(selected1.concat(idx)) : idx;
return selected1;
}
table.on('mousedown.dt', 'tbody tr', function(e) {
var $this = $(this), thisRow = table.row(this);
if (selMode === 'multiple') {
if (e.shiftKey && lastClickedRow !== undefined) {
// select or de-select depends on the last clicked row's status
var flagSel = !$this.hasClass(selClass);
var crtClickedRow = serverRowIndex(thisRow.index());
if (server) {
var rowsIndex = shiftSelRowsIndex(lastClickedRow, crtClickedRow);
// update current page's selClass
rowsIndex.map(function(i) {
var rowIndex = DT_rows_current.indexOf(i);
if (rowIndex >= 0) {
var row = table.row(rowIndex).nodes().to$();
var flagRowSel = !row.hasClass(selClass);
if (flagSel === flagRowSel) row.toggleClass(selClass);
}
});
// update selected1
if (flagSel) {
selected1 = unique(selected1.concat(rowsIndex));
} else {
selected1 = selected1.filter(function(index) {
return !inArray(index, rowsIndex);
});
}
} else {
// js starts from 0
shiftSelRowsIndex(lastClickedRow - 1, crtClickedRow - 1).map(function(value) {
var row = table.row(value).nodes().to$();
var flagRowSel = !row.hasClass(selClass);
if (flagSel === flagRowSel) row.toggleClass(selClass);
});
}
e.preventDefault();
} else {
$this.toggleClass(selClass);
}
} else {
if ($this.hasClass(selClass)) {
$this.removeClass(selClass);
} else {
table.$('tr.' + selClass).removeClass(selClass);
$this.addClass(selClass);
}
}
if (server && !$this.hasClass(selClass)) {
var id = DT_rows_current[thisRow.index()];
// remove id from selected1 since its class .selected has been removed
if (inArray(id, selected1)) selected1.splice($.inArray(id, selected1), 1);
}
changeInput('rows_selected', selectedRows());
changeInput('row_last_clicked', serverRowIndex(thisRow.index()));
lastClickedRow = serverRowIndex(thisRow.index());
});
changeInput('rows_selected', selected1);
var selectRows = function() {
table.$('tr.' + selClass).removeClass(selClass);
if (selected1.length === 0) return;
if (server) {
table.rows({page: 'current'}).every(function() {
if (inArray(DT_rows_current[this.index()], selected1)) {
$(this.node()).addClass(selClass);
}
});
} else {
var selected0 = selected1.map(function(i) { return i - 1; });
$(table.rows(selected0).nodes()).addClass(selClass);
}
}
selectRows(); // in case users have specified pre-selected rows
// restore selected rows after the table is redrawn (e.g. sort/search/page);
// client-side tables will preserve the selections automatically; for
// server-side tables, we have to *real* row indices are in `selected1`
if (server) table.on('draw.dt', selectRows);
methods.selectRows = function(selected) {
selected1 = selected ? selected : [];
selectRows();
changeInput('rows_selected', selected1);
}
}
if (inArray(selTarget, ['column', 'row+column'])) {
if (selTarget === 'row+column') {
$(table.columns().footer()).css('cursor', 'pointer');
}
table.on('click.dt', selTarget === 'column' ? 'tbody td' : 'tfoot tr th', function() {
var colIdx = selTarget === 'column' ? table.cell(this).index().column :
$.inArray(this, table.columns().footer()),
thisCol = $(table.column(colIdx).nodes());
if (colIdx === -1) return;
if (thisCol.hasClass(selClass)) {
thisCol.removeClass(selClass);
selected2.splice($.inArray(colIdx, selected2), 1);
} else {
if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass);
thisCol.addClass(selClass);
selected2 = selMode === 'single' ? [colIdx] : unique(selected2.concat([colIdx]));
}
changeInput('columns_selected', selected2);
});
changeInput('columns_selected', selected2);
var selectCols = function() {
table.columns().nodes().flatten().to$().removeClass(selClass);
if (selected2.length > 0)
table.columns(selected2).nodes().flatten().to$().addClass(selClass);
}
selectCols(); // in case users have specified pre-selected columns
if (server) table.on('draw.dt', selectCols);
methods.selectColumns = function(selected) {
selected2 = selected ? selected : [];
selectCols();
changeInput('columns_selected', selected2);
}
}
if (selTarget === 'cell') {
var selected3;
if (selected === null) {
selected3 = [];
} else {
selected3 = selected;
}
var findIndex = function(ij) {
for (var i = 0; i < selected3.length; i++) {
if (ij[0] === selected3[i][0] && ij[1] === selected3[i][1]) return i;
}
return -1;
}
table.on('click.dt', 'tbody td', function() {
var $this = $(this), info = tweakCellIndex(table.cell(this));
if ($this.hasClass(selClass)) {
$this.removeClass(selClass);
selected3.splice(findIndex([info.row, info.col]), 1);
} else {
if (selMode === 'single') $(table.cells().nodes()).removeClass(selClass);
$this.addClass(selClass);
selected3 = selMode === 'single' ? [[info.row, info.col]] :
unique(selected3.concat([[info.row, info.col]]));
}
changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix');
});
changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix');
var selectCells = function() {
table.$('td.' + selClass).removeClass(selClass);
if (selected3.length === 0) return;
if (server) {
table.cells({page: 'current'}).every(function() {
var info = tweakCellIndex(this);
if (findIndex([info.row, info.col], selected3) > -1)
$(this.node()).addClass(selClass);
});
} else {
selected3.map(function(ij) {
$(table.cell(ij[0] - 1, ij[1]).node()).addClass(selClass);
});
}
};
selectCells(); // in case users have specified pre-selected columns
if (server) table.on('draw.dt', selectCells);
methods.selectCells = function(selected) {
selected3 = selected ? selected : [];
selectCells();
changeInput('cells_selected', transposeArray2D(selected3), 'shiny.matrix');
}
}
}
// expose some table info to Shiny
var updateTableInfo = function(e, settings) {
// TODO: is anyone interested in the page info?
// changeInput('page_info', table.page.info());
var updateRowInfo = function(id, modifier) {
var idx;
if (server) {
idx = modifier.page === 'current' ? DT_rows_current : DT_rows_all;
} else {
var rows = table.rows($.extend({
search: 'applied',
page: 'all'
}, modifier));
idx = addOne(rows.indexes().toArray());
}
changeInput('rows' + '_' + id, idx);
};
updateRowInfo('current', {page: 'current'});
updateRowInfo('all', {});
}
table.on('draw.dt', updateTableInfo);
updateTableInfo();
// state info
table.on('draw.dt column-visibility.dt', function() {
changeInput('state', table.state());
});
changeInput('state', table.state());
// search info
var updateSearchInfo = function() {
changeInput('search', table.search());
if (filterRow) changeInput('search_columns', filterRow.toArray().map(function(td) {
return $(td).find('input').first().val();
}));
}
table.on('draw.dt', updateSearchInfo);
updateSearchInfo();
var cellInfo = function(thiz) {
var info = tweakCellIndex(table.cell(thiz));
info.value = table.cell(thiz).data();
return info;
}
// the current cell clicked on
table.on('click.dt', 'tbody td', function() {
changeInput('cell_clicked', cellInfo(this));
})
changeInput('cell_clicked', {});
// do not trigger table selection when clicking on links unless they have classes
table.on('click.dt', 'tbody td a', function(e) {
if (this.className === '') e.stopPropagation();
});
methods.addRow = function(data, rowname) {
var data0 = table.row(0).data(), n = data0.length, d = n - data.length;
if (d === 1) {
data = rowname.concat(data)
} else if (d !== 0) {
console.log(data);
console.log(data0);
throw 'New data must be of the same length as current data (' + n + ')';
};
table.row.add(data).draw();
}
methods.updateSearch = function(keywords) {
if (keywords.global !== null)
$(table.table().container()).find('input[type=search]').first()
.val(keywords.global).trigger('input');
var columns = keywords.columns;
if (!filterRow || columns === null) return;
filterRow.toArray().map(function(td, i) {
var v = typeof columns === 'string' ? columns : columns[i];
if (typeof v === 'undefined') {
console.log('The search keyword for column ' + i + ' is undefined')
return;
}
$(td).find('input').first().val(v);
searchColumn(i, v);
});
table.draw();
}
methods.selectPage = function(page) {
if (table.page.info().pages < page || page < 1) {
throw 'Selected page is out of range';
};
table.page(page - 1).draw(false);
}
methods.reloadData = function(resetPaging, clearSelection) {
// empty selections first if necessary
if (methods.selectRows && inArray('row', clearSelection)) methods.selectRows([]);
if (methods.selectColumns && inArray('column', clearSelection)) methods.selectColumns([]);
if (methods.selectCells && inArray('cell', clearSelection)) methods.selectCells([]);
table.ajax.reload(null, resetPaging);
}
table.shinyMethods = methods;
},
resize: function(el, width, height, instance) {
if (instance.data) this.renderValue(el, instance.data, instance);
// dynamically adjust height if fillContainer = TRUE
if (instance.fillContainer)
this.fillAvailableHeight(el, height);
this.adjustWidth(el);
},
// dynamically set the scroll body to fill available height
// (used with fillContainer = TRUE)
fillAvailableHeight: function(el, availableHeight) {
// see how much of the table is occupied by header/footer elements
// and use that to compute a target scroll body height
var dtWrapper = $(el).find('div.dataTables_wrapper');
var dtScrollBody = $(el).find($('div.dataTables_scrollBody'));
var framingHeight = dtWrapper.innerHeight() - dtScrollBody.innerHeight();
var scrollBodyHeight = availableHeight - framingHeight;
// set the height
dtScrollBody.height(scrollBodyHeight + 'px');
},
// adjust the width of columns; remove the hard-coded widths on table and the
// scroll header when scrollX/Y are enabled
adjustWidth: function(el) {
var $el = $(el), table = $el.data('datatable');
if (table) table.columns.adjust();
$el.find('.dataTables_scrollHeadInner').css('width', '')
.children('table').css('margin-left', '');
}
});
if (!HTMLWidgets.shinyMode) return;
Shiny.addCustomMessageHandler('datatable-calls', function(data) {
var id = data.id;
var el = document.getElementById(id);
var table = el ? $(el).data('datatable') : null;
if (!table) {
console.log("Couldn't find table with id " + id);
return;
}
var methods = table.shinyMethods, call = data.call;
if (methods[call.method]) {
methods[call.method].apply(table, call.args);
} else {
console.log("Unknown method " + call.method);
}
});
})();
</script>
<style type="text/css">table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,t
</style>
<style type="text/css">
table.dataTable tr.selected td, table.dataTable td.selected {
background-color: #b0bed9 !important;
}
.dataTables_scrollBody .dataTables_sizing {
visibility: hidden;
}
</style>
<script>/*!
DataTables 1.10.16
©2008-2017 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,G){E||(E=window);G||(G="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(G,E,E.document)}:h(jQuery,window,document)})(function(h,E,G,k){function X(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
d[c]=e,"o"===b[1]&&X(a[e])});a._hungarianMap=d}function I(a,b,c){a._hungarianMap||X(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),I(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords");
a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&cb(a)}function db(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&I(m.models.oSearch,a[b])}function eb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function fb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",
top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function gb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==
e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Da(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:G.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=
e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(eb(c),I(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===
typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function Y(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ea(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);r(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=
la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function aa(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Fa(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===
k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function hb(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Da(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<
i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function M(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ga(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ha(a,e);return M(a,
c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(J(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,
d,{settings:a,row:b,col:c})}function Ia(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,
b,f){var g,j;if(""!==f){j=Ia(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=j[i].match(U);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(U,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);
if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ia(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(U);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(U,
""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(U))a[f.replace(U,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ja(a){return D(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ha(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Ka(a,e)}}function Ha(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},m=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)m(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)m(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
function Ga(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||G.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Ka(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:G.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Ka(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function jb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),La(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Ma(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function N(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ga(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}r(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ja(a),g,n,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ja(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function S(a,b){var c=a.oFeatures,d=c.bFilter;
c.bSort&&lb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;N(a);a._drawHold=!1}function mb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];
n=f[k+1];if("'"==n||'"'==n){l="";for(q=2;f[k+q]!=n;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=nb(a);else if("f"==j&&d.bFilter)g=ob(a);else if("r"==j&&d.bProcessing)g=pb(a);else if("t"==j)g=qb(a);else if("i"==j&&d.bInfo)g=rb(a);else if("p"==
j&&d.bPaginate)g=sb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&J(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",
[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?J(a,0,"Invalid JSON response",1):4===b.readyState&&J(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function kb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
!0),sa(a,tb(a),function(b){ub(a,b)}),!1):!0}function tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,k=V(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",i);var pa={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
l=f[g],i="function"==typeof n.mData?"function":n.mData,pa.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,n.bSearchable)),d.bSort&&t("bSortable_"+g,n.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",e.bRegex));d.bSort&&(h.each(k,function(a,b){pa.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+
a,b.dir)}),t("iSortingCols",k.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:pa:b?j:pa}function ub(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)M(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;N(a);a._bInitComplete||
ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,N(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Na(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==G.activeElement&&i.val(e.sSearch)}catch(d){}});
return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Fa(a);if("ssp"!=y(a)){vb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)wb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);xb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function xb(a){for(var b=
m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function wb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Oa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function vb(a,b,c,d,e,f){var d=Oa(b,d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==m.ext.search.length&&(c=!0);j=yb(a);if(0>=b.length)a.aiDisplay=
g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Oa(a,b,c,d){a=b?a:Pa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function yb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=m.ext.type.search;c=!1;
d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,
caseInsensitive:a.bCaseInsensitive}}function Ab(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Bb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Bb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+
1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Cb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Cb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,
f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){mb(a);jb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ea(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);S(a);e=y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)M(a,f[b]);a.iInitDisplayStart=
d;S(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ga(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&Y(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Qa(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Ra(a);r(a,null,"length",[a,c])}function nb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=
new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Qa(a,h(this).val());N(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function sb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){N(a)},
b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Ma(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Sa(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===
e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:J(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&N(a));return b}function pb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",
b?"block":"none");r(a,null,"processing",[a,b])}function qb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",
0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"),
j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),m=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,T=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),O,K,P,w,Ta=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};K=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==K&&a.scrollBarVis!==k)a.scrollBarVis=K,Y(a);else{a.scrollBarVis=K;p.children("thead, tfoot").remove();
u&&(P=u.clone().prependTo(p),O=u.find("tr"),P=P.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");K=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=Z(a,b);c.style.width=a.aoColumns[B].sWidth});u&&H(function(a){a.style.width=""},P);f=p.outerWidth();if(""===c){r.width="100%";if(T&&(p.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=
v(d),f=p.outerWidth());H(C,K);H(function(a){z.push(a.innerHTML);Ta.push(v(h(a).css("width")))},K);H(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ta[b]},o);h(K).height(0);u&&(H(C,P),H(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},P),H(function(a,b){a.style.width=y[b]},O),h(P).height(0));H(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+z[b]+"</div>";a.style.width=Ta[b]},K);u&&H(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+
A[b]+"</div>";a.style.width=y[b]},P);if(p.outerWidth()<f){O=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(T&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(O-b);(""===c||""!==d)&&J(a,1,"Possible column misalignment",6)}else O="100%";q.width=v(O);g.width=v(O);u&&(a.nScrollFoot.style.width=v(O));!e&&T&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();n[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+
(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function H(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ea(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,
e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=la(a,"bVisible"),n=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,m,o,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)o=c[i[m]],null!==o.sWidth&&(o.sWidth=Db(o.sWidthOrig,k),t=!0);if(d||!t&&!f&&!e&&j==aa(a)&&j==n.length)for(m=0;m<j;m++)i=Z(a,m),null!==i&&(c[i].sWidth=v(n.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));
j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=ra(a,j.find("thead")[0]);for(m=0;m<i.length;m++)o=c[i[m]],n[m].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig):"",o.sWidthOrig&&f&&h(n[m]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)t=i[m],o=c[t],h(Eb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",
j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(n[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(n[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=
v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Na(function(){Y(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Db(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||G.body),d=c[0].offsetWidth;c.remove();return d}function Eb(a,b){var c=Fb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Fb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,
""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function V(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||
"string",n[a]._idx===k&&(n[a]._idx=h.inArray(n[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:n[a][1],index:n[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function lb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Fa(a);h=V(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Gb(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=
0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Hb(a){for(var b,c,d=a.aoColumns,e=V(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,
"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Ua(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,
D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);S(a);"function"==typeof d&&d(a)}function La(a,b,c,d){var e=a.aoColumns[c];Va(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Ua(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Ua(a,c,b.shiftKey,d))})}
function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=V(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Gb(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Jb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
[ya(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=
function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};
this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();
return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};
this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in m.ext.internal)e&&(this[e]=Lb(e));this.each(function(){var e={},g=1<d?Jb(e,a,!0):
a,j=0,i,e=this.getAttribute("id"),n=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())J(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{db(l);eb(l.column);I(l,l,!0);I(l.column,l.column,!0);I(l,h.extend(g,q.data()));var t=m.settings,j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();
break}else{J(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+m.ext._unique++;var p=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();db(g);g.oLanguage&&Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);
g=Jb(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],
["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",
g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback",g.fnPreDrawCallback,"user");p.rowIdFn=Q(g.rowId);fb(p);var u=p.oClasses;h.extend(u,m.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=
!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a);I(l.oLanguage,a);h.extend(true,v,a);ga(p)},error:function(){ga(p)}}),n=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&
(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(da(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t=g.aoColumns;j=0;for(i=t.length;j<i;j++)Da(p,e?e[j]:null);hb(p,g.aoColumnDefs,t,function(a,b){ja(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===
a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ja(p,a)}}})}var T=p.oFeatures,e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);T.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=V(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Hb(p)}});
z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||T.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q));p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);
else if(b.length>0){p.nTFoot=b[0];da(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)M(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&ma(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();p.bInitialised=true;n===false&&ga(p)};g.bStateSave?(T.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Ib(p,g,e)):e()}});b=null;return this},x,s,o,u,Xa={},Mb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)",
"g"),Wa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,L=function(a){return!a||!0===a||"-"===a?!0:!1},Nb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Ob=function(a,b){Xa[b]||(Xa[b]=RegExp(Pa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Xa[b],"."):a},Ya=function(a,b,c){var d="string"===typeof a;if(L(a))return!0;b&&d&&(a=Ob(a,b));c&&d&&(a=a.replace(Wa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Pb=function(a,b,c){return L(a)?!0:!(L(a)||"string"===
typeof a)?null:Ya(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ia=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},W=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Qb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);
return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};m.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,
"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,U=/\(\)$/,Pa=m.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb=/<.*?>/g,Na=m.util.throttle,Rb=[],w=Array.prototype,ac=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof
h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Rb)};m.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},
each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,
d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,n,l=this.context,m,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(m=Ba(l[g],u.opts));h=0;for(n=o.length;h<n;h++)f=o[h],f=
"cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,m),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},
pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return gb(this,a,b,0,this.length,1)},reduceRight:w.reduceRight||function(a,b){return gb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,
b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Rb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==
e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===
typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()",
"table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?N(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),S(b,!1===a))})});o("page()",function(a){return a===
k?this.page.info().page:this.iterator("table",function(b){Sa(b,a)})});o("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:
k:this.iterator("table",function(b){Qa(b,a)})});var Sb=function(a,b,c){if(c){var d=new s(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))S(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){na(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)M(a,c[d]);S(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,
b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});o("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});var Za=function(a,b,c,d,e){var f=[],g,j,i,n,l,m;i=typeof b;if(!b||"string"===i||"function"===
i||b.length===k)b=[b];i=0;for(n=b.length;i<n;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(n=a.length;i<n;i++)f=a[i](d,e,f)}return qa(f)},$a=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},ab=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=
a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:W(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<
d;c++)"none"==j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var e=b,f;return Za("row",a,function(a){var b=Nb(a);if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var e=c.aoData[b];return a(b,e._aData,e.nTr)?b:null});
b=Qb(ia(c.aoData,f,"nTr"));if(a.nodeName){if(a._DT_RowIndex!==k)return[a._DT_RowIndex];if(a._DT_CellIndex)return[a._DT_CellIndex.row];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){var i=c.aIds[a.replace(/^#/,"")];if(i!==k)return[i.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row",function(a,
b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ia(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,
b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,n,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(n=l.length;i<
n;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Ra(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(M(b,c));return h},1),c=this.rows(-1);
c.pop();h.merge(c,b);return c});o("row()",function(a,b){return ab(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&
"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:M(b,a)});return this.row(b[0])});var bb=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Tb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<D(g,
"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&bb(f,c)}))}}};o("row().child()",function(a,b){var c=this.context;
if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)bb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);c._detailsShow&&
c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Tb(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Tb(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){bb(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Ub=function(a,b,c,d,e){for(var c=
[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return Za("column",e,function(a){var b=Nb(a);if(a==="")return W(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Ub(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=
parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()",
"column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Ub,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});u("columns().cache()","column().cache()",
function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ia(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ia(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,i,n,l;if(a!==k&&g.bVisible!==a){if(a){var m=
h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(n=j.length;i<n;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[m]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;ea(b,b.aoHeader);ea(b,b.aoFooter);xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});o("columns.adjust()",
function(){return this.iterator("table",function(a){Y(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});o("column()",function(a,b){return ab(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=$a(c),f=
b.aoData,g=Ba(b,e),j=Qb(ia(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,o,u,s,r,v;return Za("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){m=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<n;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&m.push(r)}else m.push(r)}}return m}if(h.isPlainObject(a))return[a];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||
!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&
a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,
b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){ca(b,c,a,d)})});o("cell()",function(a,b,c){return ab(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;ib(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==
c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){La(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()",
"column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&fa(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,
b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),fa(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState:null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?
this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof m.Api)return!0;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?
h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};m.camelToHungarian=I;o("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);
a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){na(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||
!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));
b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,
1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.16";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow=
{nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,
sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+
"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};
X(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};X(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,
bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],
aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,
aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,
b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=x={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},
order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Kb=m.ext.pager;h.extend(Kb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ha(a,
b)]},simple_numbers:function(a,b){return["previous",ha(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ha(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ha(a,b),"last"]},_numbers:ha,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},n,l,m=0,o=function(b,d){var k,s,u,r,v=function(b){Sa(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=
h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{n=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":n=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":n=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":n=j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":n=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:n=r+1;l=e===r?g.sPageButtonActive:""}if(n!==null){u=h("<a>",{"class":g.sPageButton+
" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(n).appendTo(b);Va(u,{action:r},v);m++}}}},s;try{s=h(b).find(G.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+s+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Ya(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);
return null!==b&&!isNaN(b)||L(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Ya(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c,!0)?"html-num-fmt"+c:null},function(a){return L(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return L(a)?a:"string"===typeof a?a.replace(Mb," ").replace(Aa,""):""},string:function(a){return L(a)?
a:"string"===typeof a?a.replace(Mb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Ob(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){return Date.parse(a)||-Infinity},"html-pre":function(a){return L(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return L(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<
b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});cb("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);
h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Vb=function(a){return"string"===typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;"):a};m.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Vb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Vb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Lb,_fnBuildAjax:sa,_fnAjaxUpdate:kb,_fnAjaxParameters:tb,_fnAjaxUpdateDraw:ub,
_fnAjaxDataSrc:ta,_fnAddColumn:Da,_fnColumnOptions:ja,_fnAdjustColumnSizing:Y,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Fa,_fnApplyColumnDefs:hb,_fnHungarianMap:X,_fnCamelToHungarian:I,_fnLanguageCompat:Ca,_fnBrowserDetect:fb,_fnAddData:M,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:ib,
_fnSplitObjNotation:Ia,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,_fnGetDataMaster:Ja,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ha,_fnCreateTr:Ga,_fnBuildHead:jb,_fnDrawHead:ea,_fnDraw:N,_fnReDraw:S,_fnAddOptionsHtml:mb,_fnDetectHeader:da,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:ob,_fnFilterComplete:fa,_fnFilterCustom:xb,_fnFilterColumn:wb,_fnFilter:vb,_fnFilterCreateSearch:Oa,_fnEscapeRegex:Pa,_fnFilterData:yb,_fnFeatureHtmlInfo:rb,_fnUpdateInfo:Bb,_fnInfoMacros:Cb,_fnInitialise:ga,
_fnInitComplete:ua,_fnLengthChange:Qa,_fnFeatureHtmlLength:nb,_fnFeatureHtmlPaginate:sb,_fnPageChange:Sa,_fnFeatureHtmlProcessing:pb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:qb,_fnScrollDraw:ka,_fnApplyToChildren:H,_fnCalculateColumnWidths:Ea,_fnThrottle:Na,_fnConvertToWidth:Db,_fnGetWidestNode:Eb,_fnGetMaxLenString:Fb,_fnStringToCss:v,_fnSortFlatten:V,_fnSort:lb,_fnSortAria:Hb,_fnSortListener:Ua,_fnSortAttachListener:La,_fnSortingClasses:wa,_fnSortData:Gb,_fnSaveState:xa,_fnLoadState:Ib,_fnSettingsFromNode:ya,
_fnLog:J,_fnMap:F,_fnBindAction:Va,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Ra,_fnRenderer:Ma,_fnDataSource:y,_fnRowAttributes:Ka,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
</script>
<style type="text/css">
.container-fluid.crosstalk-bscols {
margin-left: -30px;
margin-right: -30px;
white-space: normal;
}
body > .container-fluid.crosstalk-bscols {
margin-left: auto;
margin-right: auto;
}
.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
display: inline-block;
padding-right: 12px;
vertical-align: top;
}
@media only screen and (max-width:480px) {
.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column {
display: block;
padding-right: inherit;
}
}
</style>
<script>!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this._types={},this._seq=0}return e(a,[{key:"on",value:function(a,b){var c=this._types[a];c||(c=this._types[a]={});var d="sub"+this._seq++;return c[d]=b,d}},{key:"off",value:function(a,b){var c=this._types[a];if("function"==typeof b){for(var d in c)if(c.hasOwnProperty(d)&&c[d]===b)return delete c[d],d;return!1}if("string"==typeof b)return!(!c||!c[b])&&(delete c[b],b);throw new Error("Unexpected type for listener")}},{key:"trigger",value:function(a,b,c){var d=this._types[a];for(var e in d)d.hasOwnProperty(e)&&d[e].call(c,b)}}]),a}();c.default=f},{}],2:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b.default=a,b}function e(a){return a&&a.__esModule?a:{default:a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a){var b=a.var("filterset"),c=b.get();return c||(c=new m.default,b.set(c)),c}function h(){return r++}Object.defineProperty(c,"__esModule",{value:!0}),c.FilterHandle=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=a("./events"),k=e(j),l=a("./filterset"),m=e(l),n=a("./group"),o=e(n),p=a("./util"),q=d(p),r=1;c.FilterHandle=function(){function a(b,c){f(this,a),this._eventRelay=new k.default,this._emitter=new q.SubscriptionTracker(this._eventRelay),this._group=null,this._filterSet=null,this._filterVar=null,this._varOnChangeSub=null,this._extraInfo=q.extend({sender:this},c),this._id="filter"+h(),this.setGroup(b)}return i(a,[{key:"setGroup",value:function(a){var b=this;if(this._group!==a&&(this._group||a)&&(this._filterVar&&(this._filterVar.off("change",this._varOnChangeSub),this.clear(),this._varOnChangeSub=null,this._filterVar=null,this._filterSet=null),this._group=a,a)){a=(0,o.default)(a),this._filterSet=g(a),this._filterVar=(0,o.default)(a).var("filter");var c=this._filterVar.on("change",function(a){b._eventRelay.trigger("change",a,b)});this._varOnChangeSub=c}}},{key:"_mergeExtraInfo",value:function(a){return q.extend({},this._extraInfo?this._extraInfo:null,a?a:null)}},{key:"close",value:function(){this._emitter.removeAllListeners(),this.clear(),this.setGroup(null)}},{key:"clear",value:function(a){this._filterSet&&(this._filterSet.clear(this._id),this._onChange(a))}},{key:"set",value:function(a,b){this._filterSet&&(this._filterSet.update(this._id,a),this._onChange(b))}},{key:"on",value:function(a,b){return this._emitter.on(a,b)}},{key:"off",value:function(a,b){return this._emitter.off(a,b)}},{key:"_onChange",value:function(a){this._filterSet&&this._filterVar.set(this._filterSet.value,this._mergeExtraInfo(a))}},{key:"filteredKeys",get:function(){return this._filterSet?this._filterSet.value:null}}]),a}()},{"./events":1,"./filterset":3,"./group":4,"./util":11}],3:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){return a===b?0:a<b?-1:a>b?1:void 0}Object.defineProp
//# sourceMappingURL=crosstalk.min.js.map</script>
2018-04-24 17:43:27 +03:00
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
2018-04-24 20:32:31 +03:00
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
2018-04-24 17:43:27 +03:00
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
</head>
<body>
<style type="text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
button.code-folding-btn:focus {
outline: none;
}
</style>
<div class="container-fluid main-container">
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
</script>
<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<script>
$(document).ready(function () {
window.initializeCodeFolding("hide" === "show");
});
</script>
<div class="fluid-row" id="header">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul>
</div>
<h1 class="title toc-ignore">TAAR V2 Experiment Analysis</h1>
<h4 class="author"><em>Ben Miroglio, Martin Lopatka</em></h4>
2018-04-24 20:32:31 +03:00
<h4 class="date"><em>4/18/2018</em></h4>
2018-04-24 17:43:27 +03:00
</div>
<style>
ul.nav.nav-pills {
list-style:none;
position:relative;
left: 20%;
}
ul.nav.nav-pills li {
width: 20%;
text-align: center;
}
</style>
<div id="section" class="section level1 tabset">
<h1></h1>
<div id="study-details" class="section level2">
<h2>Study Details</h2>
<div id="about" class="section level3">
<h3>About</h3>
2018-04-24 20:32:31 +03:00
<p>This report outlines the results of the <strong>2nd</strong> shield experiment that exposes the Telemetry Aware Addon Recommendations (TAAR) service, which serves personalized recommendations to Firefox users via the discovery pane (<a href="about:addons" class="uri">about:addons</a>). The experiment launched on March 12th, 2018 and ended on April 23th, 2018.</p>
2018-04-24 17:43:27 +03:00
</div>
<div id="links" class="section level3">
<h3>Links</h3>
<ul>
<li><a href="https://sql.telemetry.mozilla.org/dashboard/taar-experiment_1">Dashboard of TAAR Experiment V1</a></li>
<li><a href="https://docs.google.com/presentation/d/1B6CcyGfLvIiweBgGchWEZU_7QsF0M8w07_2UG1oZW1g/edit#slide=id.g2830b63ec5_0_45">TAAR Experiment V1 Results</a></li>
<li><a href="https://medium.com/firefox-context-graph/add-on-recommendations-for-firefox-users-7774cc5a5117">TAAR Medium Post</a></li>
</ul>
</div>
<div id="experiment-design" class="section level3">
<h3>Experiment Design</h3>
<p>The Experiment has three cohorts:</p>
<ul>
<li><code>control</code> (no change to <a href="about:addons" class="uri">about:addons</a>)</li>
<li><code>linear-taar</code> (previous iteration of TAAR)</li>
<li><code>ensemble-taar</code> (current iteration of TAAR)</li>
</ul>
<p>Users in all cohorts are exposed to a pop-up that “nudges” them to <a href="about:addons" class="uri">about:addons</a>. When a user lands on the page, we can track the add-ons they install/uninstall/enable/disable, and how long they stayed on the page.</p>
</div>
<div id="questions" class="section level3">
<h3>Questions?</h3>
<p>Questions or requests for these data can be directed to Ben Miroglio (:bmiroglio).</p>
</div>
</div>
<div id="results" class="section level2 tabset tabset-pills tabset-fade">
<h2>Results</h2>
<pre class="r"><code>library(data.table)
library(DT)
library(gridExtra)
library(ggplot2)
options(DT.options = list(
searching=F,
paging=F,
info=F)
)
# util functions
# Performs a two-sided proportion test
# on a dataframe d, containing the
# number of successes as a column &lt;c1&gt;
# and the number of trials as a column &lt;c2&gt;
prop.test.by.branch &lt;- function(d, c1, c2) {
2018-04-24 20:32:31 +03:00
d[,branch:=factor(branch, levels=c(&quot;ensemble-taar&quot;, &quot;linear-taar&quot;, &quot;control&quot;))]
d &lt;- d[order(branch)]
2018-04-24 17:43:27 +03:00
ensem_linear &lt;- d[branch!='control']
ensem_control &lt;- d[branch!='linear-taar']
2018-04-24 20:32:31 +03:00
2018-04-24 17:43:27 +03:00
tovec &lt;- function(dt) as.matrix(dt)[,1]
v1 &lt;- tovec(ensem_linear[,c1, with=F])
v2 &lt;- tovec(ensem_linear[,c2, with=F])
v3 &lt;- tovec(ensem_control[,c1, with=F])
v4 &lt;- tovec(ensem_control[,c2, with=F])
tel &lt;- prop.test(v1, v2)
tec &lt;- prop.test(v3, v4)
tel.low &lt;- tel$conf.int[1]
tel.upper &lt;- tel$conf.int[2]
tec.low &lt;- tec$conf.int[1]
tec.upper &lt;- tec$conf.int[2]
return(list(el.low=tel.low,
el.high=tel.upper,
ec.low=tec.low,
ec.high=tec.upper,
el.p=tel$p.val,
ec.p=tec$p.val,
el.true=(v1/v2)[1] - (v1/v2)[2],
ec.true=(v3/v4)[1] - (v3/v4)[2]))
}
# unpacks the results of a proportion test
# and arranges the effect, CIs, and p-value
# into a formatted table.
spec_results &lt;- function(spec, group, p) {
r &lt;- data.table(names(p), unlist(p))
s &lt;- data.table(t(r[grepl(spec, V1)]))
colnames(s) &lt;- as.character(s[1,])
s &lt;- s[-1,]
r &lt;- function(x, n=6) round(as.numeric(x), n)
s$Test &lt;- group
colnames(s) &lt;- c('lower95', 'upper95', 'Pvalue', 'Effect', 'Test')
return(s[,.(Test, Effect=r(Effect),
lower95=r(lower95),
upper95=r(upper95),
Pvalue=r(Pvalue))])
}
# Performs a proportion test
# for ensemble vs. linear
# and ensemble vs. control
# and organizes results into a table
get_results_table &lt;- function(p) {
funion(spec_results('ec', &quot;Ensemble vs. Control&quot;, p),
spec_results('el', &quot;Ensemble vs. Linear&quot;, p))
}
format_results &lt;- function(d, cap, extra=c()) {
# Round floating point numbers
d$prob_at_least_one_install &lt;- round(d$prob_at_least_one_install, 4)
d$avg_num_installs_per_client &lt;- round(d$avg_num_installs_per_client, 4)
2018-04-24 20:32:31 +03:00
setcolorder(d, c(&quot;branch&quot;, extra, &quot;distinct_clients_that_installed&quot;, &quot;total_distinct_clients&quot;, &quot;avg_num_installs_per_client&quot;,
2018-04-24 17:43:27 +03:00
&quot;prob_at_least_one_install&quot;, &quot;src&quot;))
# prettify column names
dis &lt;- d[order(src, branch)]
if (length(extra) &gt; 0) {
if (extra[1] == 'is_en_US') {
extra &lt;- c(&quot;en-US&quot;)
}
}
cols &lt;- c('Branch', extra, 'Clients that Installed', 'Total Clients',
'Avg Installs Per Client', 'Probability of Install', &quot;Install Source&quot;)
colnames(dis) &lt;- cols
dis
}
# pull files living in s3
# and load into R
2018-04-24 20:32:31 +03:00
PULL &lt;- F
2018-04-24 17:43:27 +03:00
files &lt;- c('ctr', 'ctr-en-us', &quot;taar-installs&quot;, 'taar-en-us-installs',
'taar-locale-installs', 'taar-visits', 'taar-en-us-visits', 'taar-locale-visits',
'daily_installs', 'enrollment', 'addon-retention', 'addon-en-us-retention',
'addon-locale-retention', 'daily_installs_en_us', 'daily_installs_locale',
'ctr-locale')
head_cmd &lt;- 'aws s3 cp s3://net-mozaws-prod-us-west-2-pipeline-analysis/taarv2/'
for (x in files) {
csv &lt;- paste(x, '.csv', sep='')
cmd &lt;- paste(paste(head_cmd, csv, sep=''), '.')
if(PULL) system(cmd)
assign(gsub('-', '_', x), fread(csv))
}</code></pre>
<div id="overall" class="section level3">
<h3>Overall</h3>
<hr />
<div id="installs" class="section level4">
<h4>Installs</h4>
<pre class="r"><code>datatable(format_results(taar_installs),
cap=&quot;Installation Statistics per Branch, Install Source&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-d309fa670c8fdbe1298e" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-d309fa670c8fdbe1298e">{"x":{"filter":"none","caption":"<caption>Installation Statistics per Branch, Install Source<\/caption>","data":[["1","2","3","4","5","6"],["control","ensemble-taar","linear-taar","control","ensemble-taar","linear-taar"],[44164,34194,34020,22191,18066,15403],[139913,108381,108071,139913,108381,108071],[1.7034,1.6963,1.705,1.4106,1.3429,1.4237],[0.3157,0.3155,0.3148,0.1586,0.1667,0.1425],["AMO","AMO","AMO","about:addons","about:addons","about:addons"]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>Clients that Installed<\/th>\n <th>Total Clients<\/th>\n <th>Avg Installs Per Client<\/th>\n <th>Probability of Install<\/th>\n <th>Install Source<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[2,3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<pre class="r"><code>disco = taar_installs[src == 'about:addons']
disco_results &lt;- get_results_table(p = prop.test.by.branch(disco,
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;):=(&quot;about:addons&quot;)]
amo = taar_installs[src == 'AMO']
amo_results &lt;- get_results_table(p = prop.test.by.branch(amo,
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;):=(&quot;AMO&quot;)]
comb_results &lt;- funion(disco_results, amo_results)
setcolorder(comb_results, c(&quot;Test&quot;, &quot;Install Source&quot;,
&quot;Effect&quot;, &quot;lower95&quot;, &quot;upper95&quot;,
&quot;Pvalue&quot;))
datatable(comb_results,
caption='Signifiance Test Results for Probability of Install per Branch, Install Source')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-e770ec13787220e84883" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-e770ec13787220e84883">{"x":{"filter":"none","caption":"<caption>Signifiance Test Results for Probability of Install per Branch, Install Source<\/caption>","data":[["1","2","3","4"],["Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear"],["about:addons","about:addons","AMO","AMO"],[0.008084,0.024163,-0.000155,0.000705],[0.005145,0.02111,-0.003849,-0.003218],[0.011023,0.027217,0.003539,0.004629],[0,0,0.937692,0.727535]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Test<\/th>\n <th>Install Source<\/th>\n <th>Effect<\/th>\n <th>lower95<\/th>\n <th>upper95<\/th>\n <th>Pvalue<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5,6]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
<center>
<pre class="r"><code>ggplot(taar_installs) +
geom_col(aes(x=branch,y=prob_at_least_one_install, fill=branch),
position = 'dodge', alpha=.8) +
facet_grid(src ~ .) +
theme_bw() +
labs(title=&quot;Probability of Install per Branch, Locale&quot;,
y=&quot;Probility of Install&quot;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxK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IECAAAECBAgQIECAAAECBAgQaBIBAeAmaUinQYAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQFg1wABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgSaREAAuEka0mkQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAANg1QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgSYREABukoZ0GgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEBAAdg0QIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgSQQEgJukIZ0GAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEBIBdAwQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEGgSAQHgJmlIp0GAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEBYNcAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEmkRAALhJGtJpECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAYBiCxhZ444030uOPP95tJeeZZ540cuTINN9886UlllgijRgxott9BjrDE088kWbMmJFXY9lll00LL7zwQFepePx61+2pp55Kr732Wl7+0ksvnRZZZJHisWLhscceSzNnzszXLbfccmncuHHF7d3tW8zYIgvTp09PU6dOTU8//XSaM2dOWnLJJdMyyyyTdtttt6oF4p6KeytSXHdx/UmVBbq6PmOv7rZXLrm1t/zrX/9KcT13l+add978Ol1ooYXSsGH+bHfnVWn7k08+mV5//fV8czwzxo8fXylrv68vvRaGDx+eJk+e3O91GEwH9MwZTK2lrgQIECBAgAABAgQIECBAgAABAgMhMKQtSwNxYMesTuDKK69M2267bXWZ/5tryJAh6UMf+lDac8890y677JLGjh3bo/37K/P222+fLr300vxwv/rVr9I+++zTX4fu9jj1rtvOO++czj///Py4J598cjrwwAPb1WGzzTZL119/fb7u3HPPzdutkKG7fQv54v3CCy9Mn/3sZ0tXNdVy2Oy+++5p7ty57c5rhRVWyIOQ7VZ28SHuqbi3Iu21117pjDPO6CJ3Y27qz7bu6voMne62N6bgwNfqtNNOS1//+terrkgEfzfYYIP0yU9+Mn3ta1/Lf/BT9c4y5s/GP//5z7nEz3/+87Tffvs1jErptbDooouml156qWHq1ogV8cxpxFZRJwIECBAgQIAAAQIECBAgQIAAgUYSMAR0I7VGneoSMf3bb789/3I7egOfeeaZdSpZMY0q8NBDD6XNN988D442ah17W6+77747ffnLX+4U/I1yV1999d4WP2j2b4W2HjSN0c8Vfe+999KNN96Yvv3tb+fX/N///vd+roHDESBAgAABAgQIECBAgAABAgQIECBAgMBgEDCW5GBopZI6rrfeemno0KEla/6zGEHf2bNnpzfffDMfGvfdd9/NN7zzzjvpq1/9alp++eXTpptu2mk/Kwa/QPQUW3PNNfPhkGOo2GZNhx12WHr77bfz04shtA8//PB8mNS33nqroYZy7Uv/VmnrvjRs1LJj2N911123U/XiWR7X/SuvvNKuV2gMDb/ddtvlP/YxhHknNisIECBAgAABAgQIECBAgAABAgQIECDQ0gICwIOs+f/2t7+lMWPGdFnrmNv0gAMOSGeffXaeL+ZJjWGB77///rT44ot3ua+NfSMQw7zGsK2RYnjunqTu9o32jVezpwcffLB4iscee2zae++9i59bZaFV2rpV2rP0PGPe71tuuaV0VaflF198MR8yOob/jvTyyy+n73znO+lPf/pTp7xWECBAgAABAgQIECBAgAABAgQIECBAgEDrCggAN2HbL7DAAumss85KH/7wh/N5IuMUo/fYX//617THHns04Rk3/iltvPHGKV61pN7sW8vxGnWf+GFDIa2zzjqFRe8EWkYgfsAzderUPAgcc8ZGis8RGPbjnpa5DJwoAQIECBAgQIAAAQIECBAgQIAAAQIEuhUwB3C3RIM3w1577ZXmm2++4gnceuutxWULBAabQMx/WkgLLrhgYdE7gZYTKP0hz9y5c9M//vGPljNwwgQIECBAgAABAgQIECBAgAABAgQIECBQWUAP4Mo2g37LqFGj0pZbbpkuueSS/FzKBYAjcPDqq6/m2z/ykY+kYcOGpXvuuSdddNFF+XyTMbfs5z//+RS9ijumF154If39739PMTTvo48+mhZbbLG0xhpr5K9Jkyaleebp+e8LYq7LO+64I0VdH3/88XyO
</center>
<pre class="r"><code>ggplot(daily_installs) +
geom_density(aes(prob_at_least_one_install, fill=branch), alpha=.6) +
facet_grid(src ~ .) +
theme_bw() +
labs(title='Installs per Day Distribution',
x='Density Plot of Number of Installs per Day by Branch, Source')</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPX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9uzZ5roNGzbIKaecIlOnTpXGjRuXe29tOBEKn+uvv17OPPNMw3PssceGjCkU73+42h4KlKp6xHIfQ+FGmQgggAACCCCAAAIIIIAAAggggAACCCCAAALBEyAAHDxLSkIAgWoKaHBYg7269u8tt9wijzzyiClp2bJlcvPNN8srr7xSzZJrx23V8Rk0aJDoVyymWG57Vb3joY9VteA6BBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAgeAKsAZwcD0pDQEEaiCg00Q/9NBDduSqFvWf//xHvv/++xqUWntuxaf2PEt6ggACCCCAAAIIIIAAAggggAACCCCAAAIIIIBAqAQYARwq2RCU+91338mmTZtMyccdd5ykpqaa/IoVK8w0udOmTZOUlBTp1auX9O7dWwoLC6vciq+++kr0a+nSpbJ161Zp3769dOrUyXy1adNGEhISypS1bt06WbBggehUvW7SdVwnT57s7srxxx8vycllP2arVq0y9+r9CxculB07dkj9+vWlVatWcuKJJ0rPnj1tGaHOVKfvgbTJ+9x0Xdv09HTZt2+ffP311+a56fmmTZtKx44d5bzzzpOMjIxAijdr6H777beiX3PmzDGOPXr0EP3q0KGDJCaW/3ceev2WLVtMfe6z+uabb+Tdd98Vdy3TSy+9VLKysgJqU00u1s/a888/LwUFBcbp0KFD8uijj8ozzzxTYbHV/Uy5n2MtXAOsVR01O2PGDNmzZ49pk35es7OzK2xfsE5W1UeD5u67qesoq2d5qTrvgOvm1qFlV/T+B/JZC6Ttbp/0WWg/9PvgkiVLpGvXrmYdaX0P6tSp417md6uf+W3btplz+n0vPz/f73V6UD+Pn332mT2vnxf93ATqEWgf165dKzNnzjR/DLFo0SJp1KiRdOvWzXzp9/qK3nNtrPf7ULB/flgMMggggAACCCCA
<pre class="r"><code>daily_installs$submission_date_s3 &lt;- as.Date(as.character(daily_installs$submission_date_s3),
'%Y%m%d')
ggplot(daily_installs) +
geom_smooth(aes(x=submission_date_s3, y=prob_at_least_one_install, color=branch),
se=F, method='loess') +
facet_grid(src ~ .) + theme_bw() +
labs(title=&quot;Proportion of clients that Installed 1+ Add-ons by Day&quot;, x='Date', y='Count')</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPXrCwOtoYjyyn7BV29/MZfsVzpLDdRtuIZnbpXzvlf+ev8MvYr/Gqk4H/kV/G3csdazLuyTMPsbFhzd1UabQbjFvDRmcWJxR3zcfHkVw9GfpbJmeev9F08WW8uDkaslwX6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AAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQICwI4BAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI9IiAAHCPNKRqECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoB9BZwg89dRTcccddwxZmEmTJsW0adNi5syZscoqq8TUqVOHXEeGsRW4++674/HHHy/vdI011oiVVlppbAvQ5Xu7//7745xzzol77703FixYEKuttlqsueaasfPOO49pzf7xj3/E008/Xd7nC17wglhuueUG7V87D+IYszd33XVXPPHEE+X9peNixRVXHLN9j/WO0ndC+m5I0worrBDPf/7zx7oIXbW/Rp/ZRmnjXcnFixfHX/7yl0oxNtxww+jr66u8b9VMqVSK3/zmN5H296Y3vSmmT5/eqk2P2XYeffTRuO+++yr7e9GLXhRLL7105X2rZ1rZNq3cVqvr2e3bu/POO+PJJ58sVyOdJ9P5slumZn7/p9/+6fM6Y8aMWHnllcuv3VI/5SRAgAABAgQIECBAgAABAgTGUSC7IGjqAIHsomwpOwyG9ZddIC695jWvKX3rW98qZQHHDqjFxCpCFqSsWeH3vve9lXY8/vjja+axsLbAmWeeWZo8eXLFL/9MrLPOOrVXaOPSLbbYolKOs846a4k99Uo71zuOl6jwGC5oVKZ3v/vdlXY56aSTxrBUw9tVozo0u6VtttmmUtddd9212dU6Kl8rHJqtUKPPbKO0ZrffrnzPPPNMpZ3TOW/u3Llt2VX6rZCfU7Mgalv20e6NfuADH6jUIdXl4IMPbusuW9k2rdxWWyvdhRvfbrvtKsfFKaec0lU1GO7v//Tbf/XVVy999KMfLV1yySVdVVeFJUCAAAECBAgQIECAAAECBMZWwBDQ2RXEbp2yQyWuu+662HPPPcu9gb/73e92a1W6qty33nprbLXVVvGhD32oq8rd6YW98cYbY7fddotFixYtUdT1119/iWUWjE6gE4/jTizTcJV7oQ7DrXOt/BxqqYzfsv/93/+N/ffff/wK0II9p57/55577qAtnXrqqbFw4cJBy7wh0MsC6bf/Aw88EKeffnq8+c1vLv/dc889vVxldSNAgAABAgQIECBAgAABAgRGKGAI6BHCtXu1rGdvZD0hl9hNuvAzMDAQWU+S8hC58+fPL+eZN29efOxjH4sXvvCFsfnmmy+xngWtEZg9e3a84hWvKA9NnIbiM7VO4MADD4ys51t5g2nY7KxnV2ywwQbx7LPP9vQwv60TbH5LnXgcd2KZmhf9T85eqMNw61wrP4daKuO3LAXj05DP+ZD241eS0e05G4kh0m+dND33uc+NdJz985//jF/84heRjQwwuo1bm0CHCNT6/Z9ujEu/+9NnOB3zxRvlLr300viv//qvuOqqqyINiW4iQIAAAQIECBAgQIAAAQIECOQCAsC5RIe9XnbZZbHUUks1LFV6bthee+0VZ5xxRjlfel7qe97znrj55pvjec97XsN1JY5MIBmnv0bTJz7xiciGIyxn2XjjjRtllVYQuOWWWyrvvvSlL8Xuu+9eed+JM93czs0cx2Nt3ollGq5BL9RhuHWulZ9DLZXxWfaDH/wgPvWpT8Vjjz02PgVo4V5PO+208tb6+/sjfUekESPSlA1tLQBclvC/XhAY6vd/CgT/4Q9/iM9//vORRk5J0yOPPBJvectb4o9//KPf/71wEKgDAQIECBAgQIAAAQIECBBokYAhoFsEOR6bWWaZZeL73/9+nHjiiZXd//vf/46LLrqo8t7M2AtsuummsfPOO5f/XvKSl4x9Abp0j+mGhnx61atelc927Kt27timUTACE17g/vvvj2233TZ22WWXlgd/77rrrth6663Lf5/97GfHxDoNYf3nP/+5
<hr />
</div>
<div id="disopane-visits-exposure-to-treatment" class="section level4">
<h4>Disopane Visits (exposure to treatment)</h4>
<pre class="r"><code>taar_visits$prob_visit &lt;- round(as.numeric(taar_visits$prob_visit), 6)
taar_visits$visits_per_client &lt;- round(as.numeric(taar_visits$visits_per_client), 6)
dis &lt;- taar_visits[,.(branch, total_visits, total_distinct_clients, visits_per_client)]
colnames(dis) &lt;- c(&quot;Branch&quot;, &quot;Total Visits&quot;, &quot;Total Clients&quot;, &quot;Vistits per Client&quot;)
datatable(dis[order(Branch)], caption=&quot;Discopane Visit Statistics per Branch&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-02dc214c05396e9f5a1d" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-02dc214c05396e9f5a1d">{"x":{"filter":"none","caption":"<caption>Discopane Visit Statistics per Branch<\/caption>","data":[["1","2","3"],["control","ensemble-taar","linear-taar"],[148664,132066,128991],[139913,108381,108071],[1.062546,1.218535,1.193576]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>Total Visits<\/th>\n <th>Total Clients<\/th>\n <th>Vistits per Client<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[2,3,4]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="pop-up-click-through-rate" class="section level4">
<h4>Pop-up Click Through Rate</h4>
<pre class="r"><code>ctr$prob_click &lt;- round(ctr$prob_click, 4)
cols &lt;- c(&quot;UI&quot;, &quot;Clients that clicked&quot;, &quot;Total Clients&quot;, &quot;Click Through Rate&quot;)
dis &lt;- ctr[,.(branch, n_clicked, n_total, prob_click)]
colnames(dis) &lt;- cols
dis$UI &lt;- c(&quot;Old UI&quot;, &quot;New UI&quot;)
datatable(dis, caption='Popup Click Through Rates by Branch')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-92d7a902b7d6cb4b3721" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-92d7a902b7d6cb4b3721">{"x":{"filter":"none","caption":"<caption>Popup Click Through Rates by Branch<\/caption>","data":[["1","2"],["Old UI","New UI"],[53001,115258],[1705341,3493614],[0.0311,0.033]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>UI<\/th>\n <th>Clients that clicked<\/th>\n <th>Total Clients<\/th>\n <th>Click Through Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[2,3,4]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="add-on-retention" class="section level4">
<h4>Add-on Retention</h4>
<pre class="r"><code>setcolorder(addon_retention, c('branch', 'n_installed', 'n_total',
'n_retained', 'addon_retention_rate'))
dis &lt;- addon_retention[,.(branch, n_retained, n_total, addon_retention_rate)]
cols &lt;- c(&quot;Branch&quot;, &quot;Retained&quot;, &quot;Total&quot;, &quot;Retention Rate&quot;)
colnames(dis) &lt;- cols
datatable(dis, caption = &quot;Add-on Retention Rate by Branch&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-c0717c794e6520a1129f" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-c0717c794e6520a1129f">{"x":{"filter":"none","caption":"<caption>Add-on Retention Rate by Branch<\/caption>","data":[["1","2","3"],["ensemble-taar","control","linear-taar"],[22208,28914,19862],[23942,30956,21640],[0.927574972851,0.934035405091,0.917837338262]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>Retained<\/th>\n <th>Total<\/th>\n <th>Retention Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[2,3,4]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<pre class="r"><code>datatable(get_results_table(p = prop.test.by.branch(addon_retention,
'n_retained',
'n_total')),
caption='Significance Test Results For Add-on Retention Rate')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-9caf769d822abb33a1eb" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-9caf769d822abb33a1eb">{"x":{"filter":"none","caption":"<caption>Significance Test Results For Add-on Retention Rate<\/caption>","data":[["1","2"],["Ensemble vs. Control","Ensemble vs. Linear"],[-0.00646,0.009738],[-0.01079,0.004778],[-0.002131,0.014697],[0.003188,0.000106]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Test<\/th>\n <th>Effect<\/th>\n <th>lower95<\/th>\n <th>upper95<\/th>\n <th>Pvalue<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[2,3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<p><br><br><br> <br><br><br> <br><br><br></p>
</div>
</div>
<div id="en-us-vs.non-en-us" class="section level3">
<h3>en-US vs. non en-US</h3>
<hr />
<div id="installs-1" class="section level4">
<h4>Installs</h4>
<pre class="r"><code>datatable(format_results(taar_en_us_installs, extra=c(&quot;is_en_US&quot;)))</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-4b35ec0c8aa4e0526c69" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-4b35ec0c8aa4e0526c69">{"x":{"filter":"none","data":[["1","2","3","4","5","6","7","8","9","10","11","12"],["control","control","ensemble-taar","ensemble-taar","linear-taar","linear-taar","control","control","ensemble-taar","ensemble-taar","linear-taar","linear-taar"],[false,true,true,false,true,false,false,true,true,false,true,false],[22286,21981,17330,16944,16775,17343,11945,10280,8099,10001,7270,8167],[74197,68486,52855,57764,52534,57831,72687,68058,52522,56583,52196,56587],[1.65,1.7499,1.7367,1.6474,1.7437,1.6585,1.3929,1.4285,1.3586,1.327,1.4451,1.401],[0.3004,0.321,0.3279,0.2933,0.3193,0.2999,0.1643,0.151,0.1542,0.1767,0.1393,0.1443],["AMO","AMO","AMO","AMO","AMO","AMO","about:addons","about:addons","about:addons","about:addons","about:addons","about:addons"]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>en-US<\/th>\n <th>Clients that Installed<\/th>\n <th>Total Clients<\/th>\n <th>Avg Installs Per Client<\/th>\n <th>Probability of Install<\/th>\n <th>Install Source<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5,6]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<pre class="r"><code>disco = taar_en_us_installs[src == 'about:addons']
amo = taar_en_us_installs[src == 'AMO']
result &lt;- NULL
for (i in c(T, F)) {
disco_results &lt;- get_results_table(p = prop.test.by.branch(disco[is_en_US == i],
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;, &quot;en-US&quot;):=list(&quot;about:addons&quot;, i)]
amo_results &lt;- get_results_table(p = prop.test.by.branch(amo[is_en_US == i],
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;, &quot;en-US&quot;):=list(&quot;AMO&quot;, i)]
comb_results &lt;- funion(disco_results, amo_results)
setcolorder(comb_results, c(&quot;Test&quot;, &quot;Install Source&quot;,&quot;en-US&quot;,
&quot;Effect&quot;, &quot;lower95&quot;, &quot;upper95&quot;,
&quot;Pvalue&quot;))
if (is.null(result)) {
result &lt;- comb_results
} else {
result &lt;- funion(result, comb_results)
}
}
datatable(result,
caption='Signifiance Test Results for Probability of Install per Branch, Install Source, en-US')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-a73e7f4bfa8ea0ae7927" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-a73e7f4bfa8ea0ae7927">{"x":{"filter":"none","caption":"<caption>Signifiance Test Results for Probability of Install per Branch, Install Source, en-US<\/caption>","data":[["1","2","3","4","5","6","7","8"],["Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear"],["about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO"],[true,true,true,true,false,false,false,false],[0.003154,0.014919,0.006922,0.008561,0.012414,0.032423,-0.007031,-0.00656],[-0.000958,0.010615,0.001591,0.002893,0.008259,0.028132,-0.012013,-0.011843],[0.007267,0.019224,0.012253,0.014229,0.01657,0.036714,-0.002049,-0.001276],[0.132848,0,0.010818,0.00304,0,0,0.00567,0.014897]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Test<\/th>\n <th>Install Source<\/th>\n <th>en-US<\/th>\n <th>Effect<\/th>\n <th>lower95<\/th>\n <th>upper95<\/th>\n <th>Pvalue<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[4,5,6,7]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<center>
2018-04-24 20:32:31 +03:00
<pre class="r"><code>taar_en_us_installs$Locale &lt;- ifelse(taar_en_us_installs$is_en_US, 'en-US', 'not en-US')
2018-04-24 17:43:27 +03:00
ggplot(taar_en_us_installs) +
2018-04-24 20:32:31 +03:00
geom_col(aes(x=Locale,y=prob_at_least_one_install, fill=branch),
2018-04-24 17:43:27 +03:00
position = 'dodge', alpha=.8) +
facet_grid(src ~ .) +
theme_bw() +
labs(title=&quot;Probability of Install per Branch, Locale&quot;,
y=&quot;Probility of Install&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ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E4wkQ2SMlDZU97hX86EilU/lUmkQUztTE6mx1EEPh7OmdqBtAvv8HdWpbrJS6tJj3n0CWdM6busNzRV3S9KTYhqvNiqWmuroiKgYhshMjmhTh9ptWhsF7970j/SbMrsPE1suR5z7DMC+P/Hs+y7ijrQAlhyAgccjbhjPygfeBTjzhNqy28EdkUh8C+DU9+z2v/oyeH791OncxHOs5y2AtTc7nb/f73TWPkD/qwBnjX8BoJ98VVBg/m8AAEAASURBVHgB7N0JmBxVuTDgEzIkQMISCDuRHcISVEAEEZFNUBQ3oqCiF0RBlEUFL/4uIJssigKiooKCIsriRVBERNGLoMEFUFYVEMIWNOxLQiDz11fXrqdnpnum0tMzUz3znudpurrq1KlT76mqCf31OWdcd5aSRIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIdL7BYx5+BEyBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBXEAA2IVAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBUSIgADxKGtJpECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQADYNUCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFRIiAAPEoa0mkQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAANg1QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgVEiIAA8ShrSaRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA2DVAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBUSIgADxKGtJpECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQADYNUCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFRIiAAPEoa0mkQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAANg1QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgVEiIAA8ShrSaRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKALQbUFnnzyyfSPf/xjwEoutthiaeLEiWmppZZKq666apowYcKA+4x0hrvuuis98cQTeTXWXHPNtMIKK4x0lYrjt7tu99xzT3rsscfy8qdNm5ZWXHHF4lix8Pe//z099dRT+bq11147TZkypdg+0L5FxjGyMHv27HTxxRene++9Ny1YsCCtvvrq6SUveUl6z3veU1og7qm4tyLFdRfXn9RcoL/rM/YaaHvzksf2ln/9618prueB0pJLLplfp8svv3zq6vJneyCvZtvvvvvu9Pjjj+eb45kxderUZlmHfX39tbD44ounGTNmDHsdOumAnjmd1FrqSoAAAQIECBAgQIAAAQIECBAgMBIC47qzNBIHdsxyAldeeWV6/etfXy7zf3KNGzcuveIVr0j77rtv2muvvdJyyy23SPsPV+Y99tgjXX755fnhvvGNb6QPfOADw3XoAY/T7rq9853vTBdeeGF+3NNOOy0dcsghPeqwww47pF//+tf5ugsuuCBvt1qGgfat5Yv3Sy65JL397W+vXzWqlsNmn332SS+++GKP81pvvfXyIGSPlf18iHsq7q1I++23Xzr77LP7yV3NTcPZ1v1dn6Ez0PZqCo58rc4888z0kY98pHRFIvi7zTbbpDe96U3pwx/+cP6Dn9I7y5g/G3/0ox/lEl/96lfThz70ocqo1F8LK620UpozZ05l6lbFinjmVLFV1IkAAQIECBAgQIAAAQIECBAgQKBKAoaArlJrtKkuEdO/4YYb8i+3ozfwOeec06aSFVNVgdtvvz3tuOOOeXC0qnUcbL1uvPHG9P73v79P8DfK3XTTTQdbfMfsPxbaumMaY5gr+sILL6Rrr702feITn8iv+T/+8Y/DXAOHI0CAAAECBAgQIECAAAECBAgQIECAAIFOEDCWZCe0Ul0dt9pqqzR+/Pi6Nf+3GEHf+fPnp6effjofGvf555/PN8ybNy8deOCBad11103bb799n/2s6HyB6Cn20pe+NB8OOYaKHa3pM5/5THruuefy04shtI866qh8mNRnn322UkO5DqX/WGnroTSsatkx7O+WW27Zp3rxLI/rfu7cuT16hcbQ8Lvvvnv+Yx9DmPdhs4IAAQIECBAgQIAAAQIECBAgQIAAAQJjWkAAuMOa/5e//GWaPHlyv7WOuU0PPvjgdN555+X5Yp7UGBb4lltuSausskq/+9o4NAIxzGsM2xophudelDTQvtG+8Rrt6bbbbitO8YQTTkj7779/8XmsLIyVth4r7Vl/njHv9/XXX1+/qs/yww8/nA8ZHcN/R3rkkUfSf//3f6cf/OAHffJaQYAAAQIECBAgQIAAAQIECBAgQIAAAQJjV0AAeBS2/TLLLJPOPffc9MpXvjKfJzJOMXqP/fznP0/ve9/7RuEZV/+UtttuuxSvVtJg9m3leFXdJ37YUEtbbLFFbdE7gTEjED/gufjii/MgcMwZGyk+R2DYj3vGzGXgRAkQIECAAAECBAgQIECAAAECBAgQIDCggDmAByTq3Az77bdfWmqppYoT+N3vflcsWyDQaQIx/2ktLbvssrVF7wTGnED9D3lefPHF9Je//GXMGThhAgQIECBAgAABAgQIECBAgAABAgQIEGguoAdwc5uO37LEEkuknXfeOV122WX5uTQKAEfg4NFHH823v/rVr05dXV3ppptuSpdeemk+32TMLfuud70rRa/i3umhhx5Kf/zjH1MMzfu3v/0trbzyymmzzTbLX9OnT0+LLbbovy+IuS7/8Ic/
2018-04-24 17:43:27 +03:00
</center>
<pre class="r"><code>daily_installs_en_us$Locale &lt;- ifelse(daily_installs_en_us$is_en_US, 'en-US', 'non en-US')
ggplot(daily_installs_en_us) +
geom_density(aes(prob_at_least_one_install, fill=branch), alpha=.6) +
facet_grid(src ~ Locale) +
theme_bw() +
labs(title='Installs per Day Distribution',
x='Installs per Day')</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+t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8C+DU9+z2v/oyeH791OncxHOs5y2AtTc7nb/f73TWPkD/qwBnjX8BoJ98VVBg/m8AAEAASURBVHgB7N0JmFxVmTD+01k7+x4CgSzsEPZVUJRVRAVlc/sPLnwqMw46iMqnfi44KOOuzLiMKDojgiOCIjsohFVgQPYlC4FA2BKWJCQhISTpf70X76W600t1d/VW/TvP012n7j333HN+t6q7qt4659Q1lFKSCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKDPCwzo8z3QAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBDIBASAPRAIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBQIwICwDVyIXWDAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECAsAeAwQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEKgRAQHgGrmQukGAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEBYI8BAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI1IiAAHCNXEjdIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAgACwxwABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgRqREAAuEYupG4QIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAANhjgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAjUiIABcIxdSNwgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQICAA7DFAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBGhEQAK6RC6kbBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQGISg9wg88sgj6aWXXsoaNGHChDR9+vTe07he1pL58+enFStWZK2aOXNmGjduXKMWtrW/UWF3qi4Qj+N4PLeWBgwYkOrr69OwYcPS5MmTs9vWytfSvu7weeyxx9LSpUszti222CJNmjSpzxC21fYFCxak5cuXZ/2Jv5Px97Kvpbb62Nf6o70ECBAgQIAAAQIECBAgQIAAAQIECBAg0HsE6hpKqfc0p3+35IgjjkhXXXVVhnDiiSemc845p8+BXHTRRenYY4/t8nYfdNBB6frrr8/O89vf/ja9733va3TOtvY3KuxO1QXicRyP50pTXV1dmjp1ajrssMPSBz7wgXTooYdWemifLNcdPu9973vTBRdckPmcddZZ6VOf+lSXW1Xr+d9W24866qh06aWXZv05++yz08c+9rEu71tHTtCaR1t97Mj5HEOAAAECBAgQIECAAAECBAgQIECAAAECBELAFNAeB1URePjhh9PBBx+cTjjhhKrUp5L+JRDfQ3nyySfTr371qywIHIHghQsX9i+EVnrb2308/xtfPB6NPdwjQIAAAQIECBAgQIAAAQIECBAgQIAAge4VMAV093rX5NkWL16cdt111/Tqq6/2q2l8a/JidlGn9tlnnzRw4MBGta9fvz6tXLkym8r76aefTnE/T3/5y1/Svvvum26++ea0zTbb5Jtr9rYv+3j+N35Y8mjs4R4BAgQIECBAgAABAgQIECBAgAABAgQIdL+AAHD3m9fcGSPwGz8SgZYErr322jRy5MiWdmeB4FtuuSV94QtfSHfffXdWbsmSJenwww9Pf/3rX9OUKVNaPLYWdnSFz8knn5yOPPLIjGfvvffuMqaueP53V9u7AqVSj77cx65wUycBAgQIECBAgAABAgQIECBAgAABAgQIVE9AALh6lmoiQKCDAhEcjmBvrP172mmnpe9///tZTY899lj63Oc+l84999wO1lwbh3XE54ADDkjx0xdTX257pd79oY+VWihHgAABAgQIECBAgAABAgQIECBAgAABAtUVsAZwdT3VRoBAJwRimujvfve7xcjVqOr8889PDz30UCdqrZ1D+dTOtdQTAgQIECBAgAABAgQIECBAgAABAgQIECDQVQJGAHeVbBfU+8ADD6Tnn38+q3n//fdPQ4YMyfKPP/54Nk3urbfemgYPHpz22GOPtOeee6btt9++4lbccccdKX4WLFiQli5dmrbddtu04447Zj9bbbVVqqur26iuZ599Ns2ZMyfFVL15inVcr7/++vxuetOb3pQGDdr4YbZo0aLs2Dh+7ty56aWXXkpjx45NM2fOTAceeGDafffdizq6OtORvrenTeXXLda1HTZsWFq7dm3629/+ll232L/ZZpulHXbYIR1zzDFp+PDh7ak+W0P33nvvTfFz3333ZY677bZbip/tttsuDRjQ8vc8ovyLL76YnS+/Vvfcc0+6+OKLU76W6Qc+8IE0evTodrWpM4XjsfbLX/4yTZ06NXPasGFD+sEPfpB+/vOft1ptRx9T+eM4Ko8Aa6WjZm+//fa0evXqrE3xeB0zZkyr7avWzkp9ImiePzdjHeXwbCl15DmQu+XniLpbe/6357HWnrbnfYprEf2Iv4OPPPJI2nnnnbN1pON5MHTo0LxYs7fxmF+2bFm2L/7uTZ48udlysTEejzfeeGOxPx4v8bhpr0d7+/jMM8+kO++8M/syxLx589Imm2ySdtlll+wn/ta39jyPxpb/Har2/48CQ4YAAQIECBAgQIAAAQIE
<pre class="r"><code>daily_installs_en_us$submission_date_s3 &lt;- as.Date(as.character(daily_installs_en_us$submission_date_s3),
'%Y%m%d')
ggplot(daily_installs_en_us) +
geom_smooth(aes(x=submission_date_s3, y=prob_at_least_one_install, color=branch),
se=F, method='loess') +
facet_grid(src ~ Locale) + theme_bw() +
labs(title=&quot;Proportion of clients that Installed 1+ Add-ons by Day&quot;, x='Date', y='Count')</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvph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bffbvdWX18v+huhPUZoMl1bEwC2EvxTCQLZrv81EPyvf/1LfvOb34j2nKJp/vz5MnToUHn99de5/q+Ek4AyIIAAAggggAACCCCAAAIIIBCRAF1ARwRZjN2svfbacvfdd8sNN9zgH37BggUyZswY/z0ThRfYfffd5dhjj7V/m222WeEzUKZH1AcaXNphhx3cZMm+Us8lWzVkDIGqF5g1a5YccMABcvzxx0ce/J0+fbrst99+9u9Xv/pVQay1C+t3
<hr />
</div>
<div id="disopane-visits-exposure-to-treatment-1" class="section level4">
<h4>Disopane Visits (exposure to treatment)</h4>
<pre class="r"><code>taar_en_us_visits$prob_visit &lt;- round(
as.numeric(taar_en_us_visits$prob_visit), 6)
taar_en_us_visits$visits_per_client &lt;- round(
as.numeric(taar_en_us_visits$visits_per_client), 6)
dis &lt;- taar_en_us_visits[,.(branch, is_en_US, total_visits, total_distinct_clients, visits_per_client)]
colnames(dis) &lt;- c(&quot;Branch&quot;, &quot;is en-US&quot;, &quot;Total Visits&quot;, &quot;Total Clients&quot;, &quot;Vistits per Client&quot;)
datatable(dis[order(Branch)], caption=&quot;Discopane Visit Statistics per Branch&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-e3a05d259fdc50dd0717" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-e3a05d259fdc50dd0717">{"x":{"filter":"none","caption":"<caption>Discopane Visit Statistics per Branch<\/caption>","data":[["1","2","3","4","5","6"],["control","control","ensemble-taar","ensemble-taar","linear-taar","linear-taar"],[false,true,true,false,true,false],[77861,70803,63356,68710,60953,68038],[72687,68058,52522,56583,52196,56587],[1.071182,1.040333,1.206275,1.214322,1.167771,1.202361]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>is en-US<\/th>\n <th>Total Visits<\/th>\n <th>Total Clients<\/th>\n <th>Vistits per Client<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="pop-up-click-through-rate-1" class="section level4">
<h4>Pop-up Click Through Rate</h4>
<pre class="r"><code>ctr_en_us$prob_click &lt;- round(ctr_en_us$prob_click, 4)
cols &lt;- c(&quot;UI&quot;, 'is en-US', &quot;Clients that clicked&quot;, &quot;Total Clients&quot;, &quot;Click Through Rate&quot;)
dis &lt;- ctr_en_us[,.(branch, is_en_US, n_clicked, n_total, prob_click)]
colnames(dis) &lt;- cols
dis$UI &lt;- ifelse(dis$UI == 'old', 'Old UI', 'New UI')
datatable(dis, caption='Popup Click Through Rates by Branch')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-003e5553cee5c90bc6be" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-003e5553cee5c90bc6be">{"x":{"filter":"none","caption":"<caption>Popup Click Through Rates by Branch<\/caption>","data":[["1","2","3","4"],["Old UI","Old UI","New UI","New UI"],[true,false,true,false],[25259,27855,58070,58044],[817055,890253,1709745,1803092],[0.0309,0.0313,0.034,0.0322]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>UI<\/th>\n <th>is en-US<\/th>\n <th>Clients that clicked<\/th>\n <th>Total Clients<\/th>\n <th>Click Through Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="add-on-retention-1" class="section level4">
<h4>Add-on Retention</h4>
<pre class="r"><code>setcolorder(addon_en_us_retention, c('branch', 'is_en_US', 'n_installed', 'n_total',
'n_retained', 'addon_retention_rate'))
dis &lt;- addon_en_us_retention[,.(branch, is_en_US, n_retained, n_total, addon_retention_rate)]
cols &lt;- c(&quot;Branch&quot;, &quot;is en-US&quot;, &quot;Retained&quot;, &quot;Total&quot;, &quot;Retention Rate&quot;)
colnames(dis) &lt;- cols
datatable(dis, caption = &quot;Add-on Retention Rate by Branch, en-US locale&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-631388171670436415db" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-631388171670436415db">{"x":{"filter":"none","caption":"<caption>Add-on Retention Rate by Branch, en-US locale<\/caption>","data":[["1","2","3","4","5","6"],["ensemble-taar","linear-taar","control","control","ensemble-taar","linear-taar"],[true,true,false,true,false,false],[10094,9504,15419,13510,12127,10376],[10863,10368,16461,14515,13092,11290],[0.929209242382,0.916666666667,0.936698863982,0.930761281433,0.92629086465,0.91904340124]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>is en-US<\/th>\n <th>Retained<\/th>\n <th>Total<\/th>\n <th>Retention Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<pre class="r"><code>result &lt;- NULL
for (i in c(T, F)) {
r &lt;- get_results_table(p = prop.test.by.branch(addon_en_us_retention[is_en_US == i],
'n_retained',
'n_total'))[,c('is en-US'):=(i)]
if (is.null(result)) {
result &lt;- r
} else {
result &lt;- funion(result, r)
}
}
setcolorder(result, c(&quot;Test&quot;, &quot;is en-US&quot;, &quot;Effect&quot;, &quot;lower95&quot;, &quot;upper95&quot;, &quot;Pvalue&quot;))
datatable(result, caption='Significance Test Results For Add-on Retention Rate')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-c18b0d71667d25ccf156" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-c18b0d71667d25ccf156">{"x":{"filter":"none","caption":"<caption>Significance Test Results For Add-on Retention Rate<\/caption>","data":[["1","2","3","4"],["Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear"],[true,true,false,false],[-0.001552,0.012543,-0.010408,0.007247],[-0.007982,0.005267,-0.016296,0.000431],[0.004878,0.019818,-0.00452,0.014064],[0.649177,0.000667,0.000449,0.036458]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Test<\/th>\n <th>is en-US<\/th>\n <th>Effect<\/th>\n <th>lower95<\/th>\n <th>upper95<\/th>\n <th>Pvalue<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":false,"paging":false,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5,6]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<p><br><br><br> <br><br><br> <br><br><br></p>
</div>
</div>
<div id="by-locale" class="section level3">
<h3>By Locale</h3>
<hr />
<div id="installs-2" class="section level4">
<h4>Installs</h4>
<pre class="r"><code>options(DT.options = list(
searching=T,
paging=T,
info=F)
)
datatable(format_results(taar_locale_installs[order(total_distinct_clients)],
cap=&quot;Installation Statistics per Branch, Install Source, Locale&quot;,
extra=c(&quot;locale&quot;)))</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-15d9914f341a26b9aff6" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-15d9914f341a26b9aff6">{"x":{"filter":"none","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213"],["control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","control","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","ensemble-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","linear-taar","li
2018-04-24 17:43:27 +03:00
<pre class="r"><code>disco = taar_locale_installs[src == 'about:addons']
amo = taar_locale_installs[src == 'AMO']
taar_locale_installs &lt;- taar_locale_installs[total_distinct_clients &gt; 500]
result &lt;- NULL
for (i in unique(taar_locale_installs$locale)) {
disco_results &lt;- get_results_table(p = prop.test.by.branch(disco[locale == i],
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;, &quot;Locale&quot;):=list(&quot;about:addons&quot;, i)]
amo_results &lt;- get_results_table(p = prop.test.by.branch(amo[locale == i],
'distinct_clients_that_installed',
'total_distinct_clients'))[,c(&quot;Install Source&quot;, &quot;Locale&quot;):=list(&quot;AMO&quot;, i)]
comb_results &lt;- funion(disco_results, amo_results)
setcolorder(comb_results, c(&quot;Test&quot;, &quot;Install Source&quot;,&quot;Locale&quot;,
&quot;Effect&quot;, &quot;lower95&quot;, &quot;upper95&quot;,
&quot;Pvalue&quot;))
if (is.null(result)) {
result &lt;- comb_results
} else {
result &lt;- funion(result, comb_results)
}
}
datatable(result[order(Locale)],
caption='Signifiance Test Results for Probability of Install per Branch, Install Source, en-US')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-69016f7f71e53f6363e8" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-69016f7f71e53f6363e8">{"x":{"filter":"none","caption":"<caption>Signifiance Test Results for Probability of Install per Branch, Install Source, en-US<\/caption>","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68"],["Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear"],["about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO","about:addons","about:addons","AMO","AMO"],["ar","ar","ar","ar","cs","cs","cs","cs","de","de","de","de","en-GB","en-GB","en-GB","en-GB","en-US","en-US","en-US","en-US","es-ES","es-ES","es-ES","es-ES","fr","fr","fr","fr","hu","hu","hu","hu","id","id","id","id","it","it","it","it","ja","ja","ja","ja","nl","nl","nl","nl","pl","pl","pl","pl","pt-BR","pt-BR","pt-BR","pt-BR","ru","ru","ru","ru","tr","tr","tr","tr","zh-TW","zh-TW","zh-TW","zh-TW"],[0.040803,0.093493,0.012839,-0.021001,0.063544,0.105138,-0.022058,-0.035603,0.021676,0.03554,-0.004879,-0.007016,0.015142,-0.008551,-0.004843,0.003874,0.003154,0.014919,0.006922,0.008561,-0.05723,-0.011459,0.003106,0.007549,0.005636,0.033208,-0.019442,-0.005548,0.060382,0.097887,-0.047951,-0.056907,0.064425,0.072321,-0.005244,-0.025506,0.033082,0.072585,-0.016051,-0.014027,-0.008155,0.026635,0.023775,0.03699,0.007224,0.009674,-0.002617,-0.009493,0.09345,0.095452,-0.031905,-0.033695,-0.00101,0.03947,-0.005593,-0.009687,-0.00391,-0.012268,0.001268,-0.000196,0.061327,0.080162,-0.013311,-0.023466,-0.027404,0.021126,0.016762,0.020452],[0.006017,0.05797,-0.020287,-0.058316,0.021491,0.06365,-0.068749,-0.084495,0.011928,0.025497,-0.01704,-0.019833,-0.004214,-0.029688,-0.029749,-0.022494,-0.000958,0.010615,0.001591,0.002893,-0.069727,-0.024018,-0.011656,-0.007969,-0.005731,0.021465,-0.
2018-04-24 17:43:27 +03:00
<center>
<pre class="r"><code>ggplot(taar_locale_installs[total_distinct_clients &gt; 500]) +
geom_col(aes(x=locale,y=prob_at_least_one_install, fill=branch),
position = 'dodge', alpha=.8) +
facet_grid(src ~ .) +
theme_bw() +
labs(title=&quot;Probability of Install per Branch, Locale (n distinct clients &gt; 500)&quot;,
y=&quot;Probility of Install&quot;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAASACAYAAAAeSlBbAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6s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AAAQIECBAgQIAAAQIECBAgQIDAjAgIAM/IhrQaBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQEAC2DxAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQGBGBASAZ2RDWg0CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgIANsHCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgMCMCAsAzsiGtBgECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBASA7QMECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBCYEQEB4BnZkFaDAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECKxBMtsCNN96Y/ud//qdvJddff/20atWqtMkmm6R73/veaeXKlX3nWeoMP//5z9MNN9xQVGPnnXdOW2+99VJXqVp+03W7+OKL03XXXVeUv9NOO6Vtt922WlYM/Pd//3e66aabinG77LJLWrNmTTW937xVxmUycNlll6XTTjstXXLJJenOO+9MO+64Y7rvfe+bDj300IEF4piKYytS7Hex/0ndBXrtnzFXv+ndS17eU66++uoU+3O/tPHGGxf76VZbbZVWrPC13c+r2/SLLrooXX/99cXkOGdss8023bIu+vj6vrDhhhumvffee9HrME0LnJZzTnxHHXHEEemWW25Jr3nNa9Kee+45TczpnnvuST/4wQ+qOv/e7/1eWm+99arPk3R9Mkl1qYCmcKDfscV5CjfqElU5zh+XXnppiu/eTTfdNMXvm/bfPwup2ijlHX/88emCCy5IBx10UDrkkEMWslh5CRAgQIAAAQIECBAgMN0CLWmiBT7/+c+38h62oH/55lzrYQ97WOv9739/KwcdJ3b9/viP/7harw9+8IMTVc+m6/bMZz6zWtd8E2Leuj760Y+upn/iE5+YM73fvPXMOTBa/zhzw6eeemprgw02qKzKY2O33XZb0LrmG0BVGYcffviC5p2UzIu5rXvtn+HRb/qkmE1aPd773vdW+2G5L/f6m4O/rT/4gz9ovetd72rlgNKkrc7E1+dpT3ta5X3iiSdOVH3r+8K97nWviarbJFZmWs45Rx11VLHP5cBp6+67755Eyp51uvnmm6tjJs5Nt91225z8C7k+mTPjCB+6ffctRV1GWI15s3Zbr3kZxzyi37E17c4l36R4l/VZyr+vfe1rW/e///0H/rfHHnv0rO5VV13VesUrXtHaaKON5pw/4vfpfvvt1/ra177Wc/72iU2U981vfrOoy+rVq1v5IYb2RfhMgAABAgQIECBAgACBmRXQBXS+ozVrKe+t6Xvf+1566UtfWrQG/ud//udZW0Xr0yZw4YUXpgMPPDA95znPaZsyOx/jyf3nP//5Kd9En7dSe+2117xxszpiOWzrWd12o67XXXfdlfJNzJRv1qbY5//93/991CLNT4DAmAR++MMfpmOOOaYo/dhjj03RU4s0vMCsfvfN6noNv6XHOyfv+b7nnntu0ZNLtP4e9N/8Un4zJn5/5ocy0wknnJDWrVs3J1v8Pv3GN76RHv/4x6fPfOYzc6Z1+9BUeb//+7+fnv70pxe9MbzoRS/qtjjjCRAgQIAAAQIECBAgMHMC+pKcsk2aW/am3AJyXq3jR/Xtt9+ecmuNomvcO+64o8gTP75f8pKXpPvd735p//33nzefEdMvcOWVV6bf+Z3fKbpDjq5iZzW96U1vSrn1UbF60YXcW97ylqKb1FtvvXWiunIdp/9y2dbjNJzUsqPb34c85CHzqhfn8tjv165dm2L7lym64XziE59YPOyjC/NSxV8CkyEQDyrFA0vRBXTuUSTlVpWTUbEprcWsfvfN6npN6m7Ge/6WiXNUPKzSRIrXqzzpSU+qXrGy6667ptxivLi2+clPfpLOOuus9N3vfrf4vXrwwQenD33oQ+mwww7ruuimy3vnO9+ZPvvZz6YvfelL6eSTT07Pe97zui7bBAIECBAgQIAAAQIECMyKgADwlG3JL3/5y8V7lHpVO95tmrveSqecckqRLX7cx1PP8QN/++237zWraWMSePnLX17cBI7iH/rQhy5oKf3mje0b/2Y9/fjHP65W8W1ve1t6
</center>
<hr />
</div>
<div id="disopane-visits-exposure-to-treatment-2" class="section level4">
<h4>Disopane Visits (exposure to treatment)</h4>
<pre class="r"><code>taar_locale_visits$prob_visit &lt;- round(
as.numeric(taar_locale_visits$prob_visit), 6)
taar_locale_visits$visits_per_client &lt;- round(
as.numeric(taar_locale_visits$visits_per_client), 6)
dis &lt;- taar_locale_visits[,.(branch, locale, total_visits, total_distinct_clients, visits_per_client)]
colnames(dis) &lt;- c(&quot;Branch&quot;, &quot;Locale&quot;, &quot;Total Visits&quot;, &quot;Total Clients&quot;, &quot;Vistits per Client&quot;)
datatable(dis[order(Locale)], caption=&quot;Discopane Visit Statistics per Branch, Locale&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-37370e7116890cbfffff" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-37370e7116890cbfffff">{"x":{"filter":"none","caption":"<caption>Discopane Visit Statistics per Branch, Locale<\/caption>","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123"],["control","control","linear-taar","ensemble-taar","linear-taar","ensemble-taar","control","control","linear-taar","ensemble-taar","ensemble-taar","linear-taar","control","control","ensemble-taar","linear-taar","linear-taar","control","ensemble-taar","linear-taar","ensemble-taar","control","ensemble-taar","linear-taar","control","control","linear-taar","ensemble-taar","linear-taar","ensemble-taar","control","control","ensemble-taar","linear-taar","linear-taar","ensemble-taar","control","ensemble-taar","linear-taar","control","ensemble-taar","ensemble-taar","control","ensemble-taar","linear-taar","control","linear-taar","ensemble-taar","ensemble-taar","linear-taar","control","linear-taar","linear-taar","control","ensemble-taar","ensemble-taar","control","linear-taar","linear-taar","ensemble-taar","control","linear-taar","control","ensemble-taar","control","control","control","linear-taar","ensemble-taar","control","control","ensemble-taar","linear-taar","control","ensemble-taar","linear-taar","linear-taar","ensemble-taar","control","ensemble-taar","control","linear-taar","ensemble-taar","linear-taar","control","linear-taar","control","ensemble-taar","linear-taar","ensemble-taar","control","control","ensemble-taar","linear-taar","linear-taar","ensemble-taar","control","linear-taar","control","control","ensemble-taar","linear-taar","linear-taar","ensemble-taar","control","control","ensemble-taar","linear-taar","ensemble-taar","linear-taar","control","control","ensemble-taar","linear-taar","linear-taar","control","ensemble-taar","ensemble-taar","control","linear-taar","ensemble-taar","linear-taar","control"],["ach","ar","ar","ar","bg","bg","bg","ca","ca","ca","cs","cs","cs","da","da","da","de","de","de","el","el","el","en-GB","en-GB","en-GB","en-US","en-US","en-US","es-AR","es-AR","es-AR","es-CL","es-CL","es-CL","es-ES","es-ES","es-ES","es-MX","es-MX","es-MX","et","eu","fa","fa","fa","fi","fi","fi","fr","fr","fr","he","hu","hu","hu","id","id","id","it","it","it","ja","ja","ja","ja-JP-mac","km","ko","ko","ko","lt","ms","ms","ms","nb-NO","nb-NO","nb-NO","nl","nl","nl","pl","pl","pl","pt-BR","pt-BR","pt-BR","pt-PT","pt-PT","pt-PT","ro","ro","ro","ru","ru","ru","sk","sk","sk","sl","sl","sr","sr","sr","sv-SE","sv-SE","sv-SE","th","th","th","tr","tr","tr","uk","uk","uk","vi","vi","vi","zh-CN","zh-CN","zh-CN","zh-TW","zh-TW","zh-TW"],[1,1184,999,1105,312,271,336,3,4,3,805,809,890,323,303,240,12177,13555,12108,304,360,383,2870,2933,3338,70803,60953,63356,6,16,14,1,5,6,8412,8242,10057,16,11,18,1,1,4,6,3,316,361,332,9074,8763,9966,4,1035,1167,1101,2123,1787,1522,2830,2843,2981,2298,2686,2224,1,1,9,7,3,6,1,2,2,2,1,1,1322,1271,1529,4026,4894,4089,5810,5887,6671,6,4,3,361,372,389,11356,9901,9890,297,318,367,2,1,195,156,175,7,1,1,10,1,5,1409,1298,1552,379,307,262,184,235,162,26,54,36,1132,1178,1194],[1,1276,881,934,271,240,284,4,4,3,675,691,808,241,246,199,10012,12424,10013,247,267,300,2402,2435,3138,68058,52196,52522,6,12,11,4,5,3,6247,6158,7813,17,10,18,1,1,3,5,3,322,287,276,7890,7652,10115,1,842,1011,853,1420,1966,1362,2353,2212,2902,1570,2113,1564,1,1,3,5,3,4,1,2,2,2,1,3,1092,1074,1368,3451,4458,3519,5296,5423,6943,6,6,5,339,347,390,11078,8381,8366,235,249,326,1,1,146,104,125,4,3,1,10,3,3,1199,1101,1601,335,271,236,158,204,143,30,52,2
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="pop-up-click-through-rate-2" class="section level4">
<h4>Pop-up Click Through Rate</h4>
<pre class="r"><code>ctr_locale$prob_click &lt;- round(ctr_locale$prob_click, 4)
cols &lt;- c(&quot;UI&quot;, 'locale', &quot;Clients that clicked&quot;, &quot;Total Clients&quot;, &quot;Click Through Rate&quot;)
dis &lt;- ctr_locale[,.(branch, locale, n_clicked, n_total, prob_click)]
colnames(dis) &lt;- cols
dis$UI &lt;- ifelse(dis$UI == 'old', 'Old UI', 'New UI')
datatable(dis, caption='Popup Click Through Rates by Branch')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-5964ab14e3d6e6f02c3f" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-5964ab14e3d6e6f02c3f">{"x":{"filter":"none","caption":"<caption>Popup Click Through Rates by Branch<\/caption>","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84"],["Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","Old UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI","New UI"],["vi","ro","sl","es-ES","lv","pl","sk","ko","ms","uk","cs","sr","es-MX","tr","de","hr","eu","el","it","ar","nl","zh-CN","hu","en-GB","ru","th","fa","bg","pt-PT","pt-BR","fr","ja","en-US","id","zh-TW","da","fi","nb-NO","vi","ro","es-ES","lv","pl","sk","ko","ms","uk","es-AR","cs","es-CL","bn-BD","sr","es-MX","tr","de","hi-IN","el","it","ar","nl","sv-SE","zh-CN","km","hu","ca","en-GB","ast","ru","th","bn-IN","lt","fa","bg","pt-PT","pt-BR","fr","ja","en-US","id","zh-TW","da","fi","he","nb-NO"],[133,224,1,3860,1,1492,170,279,2,92,385,82,3,622,4285,1,1,161,1260,637,514,4,456,1132,3957,3,1,177,1,1904,3697,725,25259,617,659,170,152,1,230,485,9401,1,3050,338,2,8,195,4,707,3,1,166,11,1251,8289,1,295,2460,1519,964,2,13,1,850,2,2317,1,7973,3,1,1,2,437,4,4299,7945,1439,58070,1580,1240,307,284,1,1],[2356,5895,3,103745,1,61235,3845,6580,42,3458,11597,1878,51,14734,177708,3,1,3534,40374,7876,17284,65,13425,37295,92472,12,9,3341,20,104785,120441,21341,817055,16301,9852,3666,5155,3,4182,11350,227186,3,118388,7847,23,91,6395,66,23039,37,1,3871,144,29046,354731,4,6744,83633,19060,34500,28,238,2,24959,26,75917,1,189188,32,1,10,20,7207,51,215791,250222,40303,1709745,33968,17890,6788,10631,6,11],[0.0565,0.038,0.3333,0.0372,1,0.0244,0.0442,0.0424,0.0476,0.0266,0.0332,0.0437,0.0588,0.0422,0.0241,0.3333,1,0.0456,0.0312,0.0809,0.0297,0.0615,0.034,0.0304,0.0428,0.25,0.1111,0.053,0.05,0.0182,0.0307,0.034,0.0309,0.0379,0.0669,0.0464,0.0295,0.3333,0.055,0.0427,0.0414,0.3333,0.0258,0.0431,0.087,0.0879,0.0305,0.0606,0.0307,0.0811,1,0.0429,0.0764,0.0431,0.0234,0.25,0.0437,0.0294,0.0797,0.0279,0.0714,0.0546,0.5,0.0341,0.0769,0.0305,1,0.0421,0.0938,1,0.1,0.1,0.0606,0.0784,0.0199,0.0318,0.0357,0.034,0.0465,0.0693,0.0452,0.0267,0.1667,0.0909]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>UI<\/th>\n <th>locale<\/th>\n <th>Clients that clicked<\/th>\n <th>Total Clients<\/th>\n <th>Click Through Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"searching":true,"paging":true,"info":false,"columnDefs":[{"className":"dt-right","targets":[3,4,5]},{"orderable":false,"targets":0}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
2018-04-24 17:43:27 +03:00
<hr />
</div>
<div id="add-on-retention-2" class="section level4">
<h4>Add-on Retention</h4>
<pre class="r"><code>setcolorder(addon_locale_retention, c('branch', 'locale', 'n_installed', 'n_total',
'n_retained', 'addon_retention_rate'))
dis &lt;- addon_locale_retention[,.(branch, locale, n_retained, n_total, addon_retention_rate)]
cols &lt;- c(&quot;Branch&quot;, &quot;Locale&quot;, &quot;Retained&quot;, &quot;Total&quot;, &quot;Retention Rate&quot;)
colnames(dis) &lt;- cols
datatable(dis, caption = &quot;Add-on Retention Rate by Branch, en-US locale&quot;)</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-a67422f197f41d71d5b6" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-a67422f197f41d71d5b6">{"x":{"filter":"none","caption":"<caption>Add-on Retention Rate by Branch, en-US locale<\/caption>","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80"],["linear-taar","control","linear-taar","control","ensemble-taar","ensemble-taar","linear-taar","ensemble-taar","linear-taar","ensemble-taar","control","linear-taar","ensemble-taar","linear-taar","control","linear-taar","control","linear-taar","control","ensemble-taar","ensemble-taar","linear-taar","control","control","ensemble-taar","linear-taar","linear-taar","ensemble-taar","ensemble-taar","linear-taar","ensemble-taar","linear-taar","ensemble-taar","control","control","linear-taar","linear-taar","control","linear-taar","control","ensemble-taar","linear-taar","ensemble-taar","linear-taar","control","control","ensemble-taar","ensemble-taar","control","linear-taar","linear-taar","ensemble-taar","ensemble-taar","control","linear-taar","control","ensemble-taar","ensemble-taar","ensemble-taar","control","control","ensemble-taar","control","linear-taar","ensemble-taar","linear-taar","control","linear-taar","ensemble-taar","ensemble-taar","linear-taar","control","linear-taar","ensemble-taar","ensemble-taar","control","control","control","linear-taar","control"],["it","ru","de","sr","fr","tr","el","id","es-ES","cs","uk","fr","da","hu","en-US","ro","de","ja","ja","zh-TW","pt-BR","bg","ar","fr","es-CL","vi","cs","ru","it","pt-BR","es-ES","nl","ja","id","th","ru","fi","vi","tr","pt-BR","pl","zh-CN","vi","en-US","cs","es-ES","uk","el","pl","zh-TW","da","nl","bg","nl","sk","it","de","ro","en-US","hu","tr","hu","bg","id","fi","pl","zh-TW","ar","en-GB","sr","en-GB","ro","uk","sk","ar","en-GB","el","sk","sr","es-AR"],[385,2501,1648,36,1690,347,51,369,1276,189,88,1447,89,157,13510,92,2229,217,353,153,976,53,334,2435,0,25,99,1743,582,809,1023,178,274,340,2,1998,20,44,180,1472,938,3,18,9504,150,2101,75,90,662,156,32,186,55,238,41,626,2067,99,10094,215,334,252,62,241,57,539,250,136,472,32,531,128,37,73,266,576,68,64,19,3],[437,2694,1768,48,1829,375,56,400,1351,197,104,1591,91,173,14515,99,2364,250,390,163,1053,56,358,2551,2,32,109,1950,624,865,1098,203,297,378,3,2172,21,45,206,1550,985,4,19,10368,157,2236,84,104,710,169,35,203,58,249,45,668,2212,100,10863,236,372,266,71,264,58,581,260,150,514,34,580,136,43,81,283,630,73,66,24,4],[0.881006864989,0.928359317001,0.932126696833,0.75,0.924002186987,0.925333333333,0.910714285714,0.9225,0.944485566247,0.959390862944,0.846153846154,0.909490886235,0.978021978022,0.907514450867,0.930761281433,0.929292929293,0.942893401015,0.868,0.905128205128,0.938650306748,0.926875593542,0.946428571429,0.932960893855,0.954527636221,0,0.78125,0.908256880734,0.893846153846,0.932692307692,0.935260115607,0.931693989071,0.87684729064,0.922558922559,0.899470899471,0.666666666667,0.919889502762,0.952380952381,0.977777777778,0.873786407767,0.949677419355,0.952284263959,0.75,0.947368421053,0.916666666667,0.955414012739,0.939624329159,0.892857142857,0.865384615385,0.932394366197,0.923076923077,0.914285714286,0.916256157635,0.948275862069,0.955823293173,0.911111111111,0.937125748503,0.934448462929,0.99,0.929209242382,0.911016949153,0.897849462366,0.947368421053,0.87323943662,0.912878787879,0.98275862069,0.927710843373,0.961538461538,0.906666666667,0.918287937743,0.941176470588,0.915517241379,0.941176470588,0.860465116279,0.901234567901,0.939929328622,0.914285714286,0.931506849315,0.969696969697,0.791666666667,0.75]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Branch<\/th>\n <th>Locale<\/th>\n <th>Retained<\/th>\n <th>Total<\/th>\n <th>Retention Rate<\/th>\n <\/tr>\n <\/thead>\n<\/table>","op
2018-04-24 17:43:27 +03:00
<pre class="r"><code>result &lt;- NULL
for (i in unique(addon_locale_retention$locale)) {
r &lt;- tryCatch({
get_results_table(p = prop.test.by.branch(addon_locale_retention[locale == i],
'n_retained',
'n_total'))[,c('Locale'):=(i)]
}, error = function(e) {
NULL
})
if(is.null(r)) next
if (is.null(result)) {
result &lt;- r
} else {
result &lt;- funion(result, r)
}
}
setcolorder(result, c(&quot;Test&quot;, &quot;Locale&quot;, &quot;Effect&quot;, &quot;lower95&quot;, &quot;upper95&quot;, &quot;Pvalue&quot;))
datatable(result, caption='Significance Test Results For Add-on Retention Rate')</code></pre>
2018-04-24 20:32:31 +03:00
<div id="htmlwidget-e762638983be9ef7eaad" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-e762638983be9ef7eaad">{"x":{"filter":"none","caption":"<caption>Significance Test Results For Add-on Retention Rate<\/caption>","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54"],["Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear","Ensemble vs. Control","Ensemble vs. Linear"],["it","it","ru","ru","de","de","sr","sr","fr","fr","tr","tr","el","el","id","id","es-ES","es-ES","cs","cs","uk","uk","da","da","hu","hu","en-US","en-US","ro","ro","ja","ja","zh-TW","zh-TW","pt-BR","pt-BR","bg","bg","ar","ar","es-CL","es-CL","vi","vi","nl","nl","fi","fi","pl","pl","sk","sk","en-GB","en-GB"],[-0.004433,0.051685,-0.034513,-0.026043,-0.008445,0.002322,0.191176,0.14951,-0.030525,0.014511,0.027484,0.051547,-0.066122,-0.04533,0.023029,0.009621,-0.00793,-0.012792,0.003977,0.051134,0.046703,0.032392,null,0.063736,0.036351,0.039854,-0.001552,0.012543,0.048824,0.060707,0.017431,0.054559,-0.022888,0.015573,-0.022802,-0.008385,0.075036,0.001847,0.006968,0.033263,null,null,-0.030409,0.166118,-0.039567,0.039409,null,0.030378,0.01989,0.024573,-0.068462,-0.009877,0.004002,0.002771],[-0.032915,0.013574,-0.051741,-0.044342,-0.022806,-0.013802,0.020243,-0.066734,-0.045584,-0.004684,-0.015874,-0.00479,-0.165303,-0.158469,-0.019613,-0.036463,-0.026501,-0.032898,-0.04245,-0.016789,-0.059886,-0.108074,0.915329,-0.053556,-0.012809,-0.015747,-0.007982,0.005267,-0.003945,-0.003472,-0.027605,-0.000938,-0.071508,-0.044961,-0.042723,-0.032156,-0.036739,-0.082016,-0.03411,-0.026,0,0,-0.170071,-0.050742,-0.089902,-0.02464,0.895366,-0.097048,-0.004087,-0.001707,-0.159228,-0.125275,-0.029992,-0.031822],[0.024048,0.089797,-0.017286,-0.007745,0.005917,0.018446,0.36211,0.365753,-0.015467,0.033707,0.070841,0.107884,0.033058,0.067809,0.065671,0.055705,0.01064,0.007314,0.050404,0.119057,0.153292,0.172858,0.996184,0.181029,0.085512,0.095455,0.004878,0.019818,0.101592,0.124886,0.062466,0.110056,0.025732,0.076108,-0.002881,0.015387,0.186812,0.08571,0.048047,0.092525,0.802132,0.802132,0.109252,0.382978,0.010767,0.103458,0.999099,0.157803,0.043867,0.050854,0.022304,0.105522,0.037997,0.037363],[0.833606,0.005013,4.4e-05,0.004677,0.258738,0.81968,0.048978,0.189435,2.8e-05,0.140426,0.232304,0.057729,0.249183,0.555711,0.31581,0.765058,0.417952,0.21938,1,0.117161,0.470549,0.806648,0,0.257597,0.155432,0.154566,0.649177,0.000667,0.111548,0.068921,0.505873,0.050547,0.398631,0.731984,0.019892,0.529394,0.248129,1,0.845,0.279437,0.4795,0.4795,1,0.238412,0.123653,0.253979,0,1,0.099053,0.055361,0.190055,1,0.892082,0.955387]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>Test<\/th>\n <th>Locale<\/th>\n <th>Effect<\/th>\n <th>lower95<\/th>\n <th>upper95<\/th>\n
2018-04-24 17:43:27 +03:00
<p><br><br><br> <br><br><br> <br><br><br></p>
</div>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>