(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,a){c||(c=window);if(!a||!a.fn.dataTable)a=require("datatables.net")(c,a).$;return b(a,c,c.document)}:b(jQuery,window,document)})(function(b,c,a){function f(c,a){var j=this,d=new k.Api(c),g=b('
').appendTo(a.container);d.columns(a.columns).eq(0).each(function(l){for(var e=d.column(l),c=b(""),
a=b(e.header()).hasClass("tags"),n=j._binData(e.data().flatten(),a),h=e.search(),h=h.length&&h[0]?h[0].substr(1,h[0].length-2).split("|"):[],a=a?d.ajax.json().tags:e.data().unique().sort().toArray(),i=0,m=a.length;i").html(''+a[i]+"").data("filter",a[i]).append(b('').html(n[a[i]]));-1!==b.inArray(a[i],h)&&f.addClass("selected");c.append(f)}b(g).append(b('').data("column",l).addClass(h.length?"filtering":
"").append('').append(b('').html(b(e.header()).text())).append(b('').append(c)))});b(g).on("click","li",function(){b(this).hasClass("selected")?b(this).removeClass("selected"):b(this).addClass("selected");var a=b(this).closest("div.pane"),c=a.find("li.selected");0===c.length?(a.removeClass("filtering"),d.column(a.data("column")).search("").draw()):(a.addClass("filtering"),d.column(a.data("column")).search(b.map(c,
function(a){return b(a).data("filter")}).join("|"),!0,!1).draw())});b(g).on("click","button.close",function(){var a=b(this).closest("div.pane");a.find("li.selected").removeClass("selected");a.removeClass("filtering");d.column(a.data("column")).search("").draw()})}var k=b.fn.dataTable;b.extend(f.prototype,{_binData:function(a,b){var c={};a.each(function(a){if(a)if(b)for(var a=a.split(","),g=0,f=a.length;g