/*! © SpryMedia Ltd - datatables.net/license */ !function(a){var n,i;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return a(t,window,document)}):"object"==typeof exports?(n=require("jquery"),i=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||n(t),i(t,e),a(e,0,t.document)}:(i(window,n),module.exports=a(n,window,window.document))):a(jQuery,window,document)}(function(o,t,e,i){"use strict";var r=o.fn.dataTable;function c(t,e,a){e.empty(),e.append("Search: ");var t=t.column(a.column).data(),n=function(t,e){for(var a,n={},i=0,r=t.length;i/g,"").charAt(0):t[i].toString().replace(/<.*?>/g,"").charAt(0).toUpperCase()]?n[a]++:n[a]=1;return n}(t,a);if(o('').data("letter","").data("match-count",t.length).html("None").appendTo(e),a.numbers)for(var i=0;i<10;i++){var r=String.fromCharCode(48+i);o("").data("letter",r).data("match-count",n[r]||0).addClass(n[r]?"":"empty").html(r).appendTo(e)}for(i=0;i<26;i++){r=String.fromCharCode(65+i);o("").data("letter",r).data("match-count",n[r]||0).addClass(n[r]?"":"empty").html(r).appendTo(e)}if(a.caseSensitive)for(i=0;i<26;i++){r=String.fromCharCode(97+i);o("").data("letter",r).data("match-count",n[r]||0).addClass(n[r]?"":"empty").html(r).appendTo(e)}o('
').appendTo(e)}return r.Api.register("alphabetSearch()",function(e){return this.iterator("table",function(t){t.alphabetSearch=e}),this}),r.Api.register("alphabetSearch.recalc()",function(){return this.iterator("table",function(t){c(new r.Api(t),t._alphabet,t._alphabetOptions)}),this}),r.Api.register("alphabetSearch.node()",function(){return this._context.length?this._context._alphabet:null}),r.ext.search.push(function(t,e){if(!t.alphabetSearch)return!0;var a=0,n=!1;if(t.oInit.alphabet!==i&&(a=t.oInit.alphabet.column!==i?t.oInit.alphabet.column:0,n=t.oInit.alphabet.caseSensitive!==i&&t.oInit.alphabet.caseSensitive),n){if(e[a].charAt(0)===t.alphabetSearch)return!0}else if(e[a].charAt(0).toUpperCase()===t.alphabetSearch)return!0;return!1}),r.AlphabetSearch=function(t){var e=new r.Api(t),a=o('
'),n=o.extend({column:0,caseSensitive:!1,numbers:!1},e.init().alphabet);c(e,a,n),t._alphabet=a,t._alphabetOptions=n,a.on("click","span",function(){a.find(".active").removeClass("active"),o(this).addClass("active"),e.alphabetSearch(o(this).data("letter")).draw()}),a.on("mouseenter","span",function(){a.find("div.alphabetInfo").css({opacity:1,left:o(this).position().left,width:o(this).width()}).html(o(this).data("match-count"))}).on("mouseleave","span",function(){a.find("div.alphabetInfo").css("opacity",0)}),this.node=function(){return a}},r.ext.feature.push({fnInit:function(t){return new r.AlphabetSearch(t).node()},cFeature:"A"}),r});