@ -12,15 +12,18 @@
SearchPane 0.0 . 2
2018 SpryMedia Ltd - datatables . net / license
* /
var $jscomp = $jscomp || { } ; $jscomp . scope = { } ; $jscomp . findInternal = function ( a , c , d ) { a instanceof String && ( a = String ( a ) ) ; for ( var f = a . length , e = 0 ; e < f ; e ++ ) { var m = a [ e ] ; if ( c . call ( d , m , e , a ) ) return { i : e , v : m } } return { i : - 1 , v : void 0 } } ; $jscomp . ASSUME _ES5 = ! 1 ; $jscomp . ASSUME _NO _NATIVE _MAP = ! 1 ; $jscomp . ASSUME _NO _NATIVE _SET = ! 1 ; $jscomp . SIMPLE _FROUND _POLYFILL = ! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME _ES5 || "function" == typeof Object . defineProperties ? Object . defineProperty : function ( a , c , d ) { a != Array . prototype && a != Object . prototype && ( a [ c ] = d . value ) } ; $jscomp . getGlobal = function ( a ) { return "undefined" != typeof window && window === a ? a : "undefined" != typeof global && null != global ? global : a } ; $jscomp . global = $jscomp . getGlobal ( this ) ;
$jscomp . polyfill = function ( a , c , d , f ) { if ( c ) { d = $jscomp . global ; a = a . split ( "." ) ; for ( f = 0 ; f < a . length - 1 ; f ++ ) { var e = a [ f ] ; e in d || ( d [ e ] = { } ) ; d = d [ e ] } a = a [ a . length - 1 ] ; f = d [ a ] ; c = c ( f ) ; c != f && null != c && $jscomp . defineProperty ( d , a , { configurable : ! 0 , writable : ! 0 , value : c } ) } } ; $jscomp . polyfill ( "Array.prototype.find" , function ( a ) { return a ? a : function ( a , d ) { return $jscomp . findInternal ( this , a , d ) . v } } , "es6" , "es3" ) ;
( function ( a ) { "function" === typeof define && define . amd ? define ( [ "jquery" , "datatables.net" ] , function ( c ) { return a ( c , window , document ) } ) : "object" === typeof exports ? module . exports = function ( c , d ) { c || ( c = window ) ; d && d . fn . dataTable || ( d = require ( "datatables.net" ) ( c , d ) . $ ) ; return a ( d , c , c . document ) } : a ( jQuery , window , document ) } ) ( function ( a , c , d , f ) { function e ( b , h ) { var g = this ; b = new m . Api ( b ) ; this . classes = a . extend ( ! 0 , { } , e . classes ) ; this . dom = { container : a ( "<div/>" ) . addClass ( this . classes . container ) } ; this . c = a . extend ( ! 0 , { } , e . defaults ,
h ) ; this . s = { dt : b } ; b . settings ( ) [ 0 ] . searchPane = this ; b . columns ( this . c . columns ) . eq ( 0 ) . each ( function ( a ) { g . _pane ( a ) } ) ; a ( this . dom . container ) . on ( "click" , "li" , function ( ) { g . _toggle ( this ) } ) . on ( "click" , "button." + this . classes . clear , function ( ) { g . _clear ( a ( this ) . closest ( "div." + g . classes . pane . container ) ) } ) ; this . _attach ( ) } var m = a . fn . dataTable ; a . extend ( e . prototype , { rebuild : function ( ) { var a = this ; this . dom . container . empty ( ) ; this . s . dt . columns ( this . c . columns ) . eq ( 0 ) . each ( function ( b ) { a . _pane ( b ) } ) } , _attach : function ( ) { var b =
this . c . container ; b = "function" === typeof b ? b ( this . s . dt ) : b ; "prepend" === this . c . insert ? a ( this . dom . container ) . prependTo ( b ) : a ( this . dom . container ) . appendTo ( b ) } , _binData : function ( a ) { for ( var b = { } , g = 0 , d = a . length ; g < d ; g ++ ) { var k = a [ g ] ; k && ( b [ k ] ? b [ k ] ++ : b [ k ] = 1 ) } return b } , _clear : function ( a ) { var b = this . classes , g = b . item . selected ; a . find ( "li." + g ) . removeClass ( g ) ; a . removeClass ( b . pane . active ) ; this . s . dt . column ( a . data ( "column" ) ) . search ( "" ) . draw ( ) } , _pane : function ( b ) { var h = this . classes , g = h . item ; h = h . pane ; var d = this . s . dt , k = d . column ( b ) ,
c = this . _getOptions ( b ) , e = a ( "<ul/>" ) , l = "function" === typeof c . options ? c . options ( d , b ) : c . options ? new m . Api ( null , c . options ) : k . data ( ) ; d = this . _binData ( l . flatten ( ) ) ; if ( ! ( this . _variance ( d ) < this . c . threshold ) ) { c = ( c = k . search ( ) ) ? c . substr ( 1 , c . length - 2 ) . split ( "|" ) : [ ] ; l = l . unique ( ) . sort ( ) . toArray ( ) ; for ( var f = 0 , p = l . length ; f < p ; f ++ ) if ( l [ f ] ) { var n = a ( "<li/>" ) . html ( '<span class="' + g . label + '">' + l [ f ] + "</span>" ) . data ( "filter" , l [ f ] ) . append ( a ( "<span/>" ) . addClass ( g . count ) . html ( d [ l [ f ] ] ) ) ; if ( c . length ) { var q = l [ f ] . replace ? a . fn . dataTable . util . escapeRegex ( l [ f ] ) :
l [ f ] ; - 1 !== a . inArray ( q , c ) && n . addClass ( g . selected ) } e . append ( n ) } g = a ( "<div/>" ) . data ( "column" , b ) . addClass ( h . container ) . addClass ( c . length ? h . active : "" ) . append ( a ( '<button type="button">×</button>' ) . addClass ( this . classes . clear ) ) . append ( a ( "<div/>" ) . addClass ( h . title ) . html ( a ( k . header ( ) ) . text ( ) ) ) . append ( a ( "<div/>" ) . addClass ( h . scroller ) . append ( e ) ) ; h = this . dom . container ; k = h . children ( ) . map ( function ( ) { if ( a ( this ) . data ( "column" ) == b ) return this } ) ; k . length ? k . replaceWith ( g ) : a ( h ) . append ( g ) } } , _getOptions : function ( a ) { return this . s . dt . settings ( ) [ 0 ] . aoColumns [ a ] . searchPane ||
{ } } , _toggle : function ( b ) { var c = this . classes , g = c . item . selected , d = this . s . dt ; b = a ( b ) ; var e = b . closest ( "div." + c . pane . container ) , f = e . data ( "column" ) , m = this . _getOptions ( f ) ; b . toggleClass ( g , ! b . hasClass ( g ) ) ; b = e . find ( "li." + g ) ; 0 === b . length ? ( e . removeClass ( c . pane . active ) , d . column ( f ) . search ( "" ) . draw ( ) ) : "any" === m . match ? ( e . addClass ( c . pane . active ) , d . column ( f ) . search ( "(" + a . map ( b , function ( b ) { b = a ( b ) . data ( "filter" ) . toString ( ) ; b = a ( "<div/>" ) . html ( b ) . text ( ) ; return a . fn . dataTable . util . escapeRegex ( b ) } ) . join ( "|" ) + ")" , ! 0 , ! 1 ) . draw ( ) ) :
( e . addClass ( c . pane . active ) , d . column ( f ) . search ( "^(" + a . map ( b , function ( b ) { b = a ( b ) . data ( "filter" ) . toString ( ) ; b = a ( "<div/>" ) . html ( b ) . text ( ) ; return a . fn . dataTable . util . escapeRegex ( b ) } ) . join ( "|" ) + ")$" , ! 0 , ! 1 ) . draw ( ) ) } , _variance : function ( b ) { b = a . map ( b , function ( a , b ) { return a } ) ; for ( var c = b . length , g = 0 , d = 0 , e = c ; d < e ; d ++ ) g += b [ d ] ; g /= c ; var f = 0 ; d = 0 ; for ( e = c ; d < e ; d ++ ) f += Math . pow ( g - b [ d ] , 2 ) ; return f / ( c - 1 ) } } ) ; e . classes = { container : "dt-searchPanes" , clear : "clear" , pane : { active : "filtering" , container : "pane" , title : "title" , scroller : "scroller" } ,
item : { selected : "selected" , label : "label" , count : "count" } } ; e . defaults = { container : function ( a ) { return a . table ( ) . container ( ) } , columns : f , insert : "prepend" , threshold : . 5 } ; e . version = "0.0.2" ; a . fn . dataTable . SearchPanes = e ; a . fn . DataTable . SearchPanes = e ; m . Api . register ( "searchPanes.rebuild()" , function ( ) { return this . iterator ( "table" , function ( a ) { a . searchPane && a . searchPane . rebuild ( ) } ) } ) ; m . Api . register ( "column().paneOptions()" , function ( a ) { return this . iterator ( "column" , function ( b , c ) { c = b . aoColumns [ c ] ; c . searchPane || ( c . searchPane =
{ } ) ; c . searchPane . values = a ; b . searchPane && b . searchPane . rebuild ( ) } ) } ) ; a ( d ) . on ( "init.dt" , function ( b , c , d ) { "dt" === b . namespace && ( b = c . oInit . searchPane , d = m . defaults . searchPane , b || d ) && ( d = a . extend ( { } , b , d ) , ! 1 !== b && new e ( c , d ) ) } ) } ) ;
var $jscomp = $jscomp || { } ; $jscomp . scope = { } ; $jscomp . findInternal = function ( a , d , e ) { a instanceof String && ( a = String ( a ) ) ; for ( var k = a . length , g = 0 ; g < k ; g ++ ) { var p = a [ g ] ; if ( d . call ( e , p , g , a ) ) return { i : g , v : p } } return { i : - 1 , v : void 0 } } ; $jscomp . ASSUME _ES5 = ! 1 ; $jscomp . ASSUME _NO _NATIVE _MAP = ! 1 ; $jscomp . ASSUME _NO _NATIVE _SET = ! 1 ; $jscomp . SIMPLE _FROUND _POLYFILL = ! 1 ; $jscomp . ISOLATE _POLYFILLS = ! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME _ES5 || "function" == typeof Object . defineProperties ? Object . defineProperty : function ( a , d , e ) { if ( a == Array . prototype || a == Object . prototype ) return a ; a [ d ] = e . value ; return a } ; $jscomp . getGlobal = function ( a ) { a = [ "object" == typeof globalThis && globalThis , a , "object" == typeof window && window , "object" == typeof self && self , "object" == typeof global && global ] ; for ( var d = 0 ; d < a . length ; ++ d ) { var e = a [ d ] ; if ( e && e . Math == Math ) return e } throw Error ( "Cannot find global object" ) ; } ; $jscomp . global = $jscomp . getGlobal ( this ) ;
$jscomp . IS _SYMBOL _NATIVE = "function" === typeof Symbol && "symbol" === typeof Symbol ( "x" ) ; $jscomp . TRUST _ES6 _POLYFILLS = ! $jscomp . ISOLATE _POLYFILLS || $jscomp . IS _SYMBOL _NATIVE ; $jscomp . polyfills = { } ; $jscomp . propertyToPolyfillSymbol = { } ; $jscomp . POLYFILL _PREFIX = "$jscp$" ; var $jscomp$lookupPolyfilledValue = function ( a , d ) { var e = $jscomp . propertyToPolyfillSymbol [ d ] ; if ( null == e ) return a [ d ] ; e = a [ e ] ; return void 0 !== e ? e : a [ d ] } ;
$jscomp . polyfill = function ( a , d , e , k ) { d && ( $jscomp . ISOLATE _POLYFILLS ? $jscomp . polyfillIsolated ( a , d , e , k ) : $jscomp . polyfillUnisolated ( a , d , e , k ) ) } ; $jscomp . polyfillUnisolated = function ( a , d , e , k ) { e = $jscomp . global ; a = a . split ( "." ) ; for ( k = 0 ; k < a . length - 1 ; k ++ ) { var g = a [ k ] ; if ( ! ( g in e ) ) return ; e = e [ g ] } a = a [ a . length - 1 ] ; k = e [ a ] ; d = d ( k ) ; d != k && null != d && $jscomp . defineProperty ( e , a , { configurable : ! 0 , writable : ! 0 , value : d } ) } ;
$jscomp . polyfillIsolated = function ( a , d , e , k ) { var g = a . split ( "." ) ; a = 1 === g . length ; k = g [ 0 ] ; k = ! a && k in $jscomp . polyfills ? $jscomp . polyfills : $jscomp . global ; for ( var p = 0 ; p < g . length - 1 ; p ++ ) { var b = g [ p ] ; if ( ! ( b in k ) ) return ; k = k [ b ] } g = g [ g . length - 1 ] ; e = $jscomp . IS _SYMBOL _NATIVE && "es6" === e ? k [ g ] : null ; d = d ( e ) ; null != d && ( a ? $jscomp . defineProperty ( $jscomp . polyfills , g , { configurable : ! 0 , writable : ! 0 , value : d } ) : d !== e && ( $jscomp . propertyToPolyfillSymbol [ g ] = $jscomp . IS _SYMBOL _NATIVE ? $jscomp . global . Symbol ( g ) : $jscomp . POLYFILL _PREFIX + g , g =
$jscomp . propertyToPolyfillSymbol [ g ] , $jscomp . defineProperty ( k , g , { configurable : ! 0 , writable : ! 0 , value : d } ) ) ) } ; $jscomp . polyfill ( "Array.prototype.find" , function ( a ) { return a ? a : function ( d , e ) { return $jscomp . findInternal ( this , d , e ) . v } } , "es6" , "es3" ) ;
( function ( a ) { "function" === typeof define && define . amd ? define ( [ "jquery" , "datatables.net" ] , function ( d ) { return a ( d , window , document ) } ) : "object" === typeof exports ? module . exports = function ( d , e ) { d || ( d = window ) ; e && e . fn . dataTable || ( e = require ( "datatables.net" ) ( d , e ) . $ ) ; return a ( e , d , d . document ) } : a ( jQuery , window , document ) } ) ( function ( a , d , e , k ) { function g ( b , c ) { var f = this ; b = new p . Api ( b ) ; this . classes = a . extend ( ! 0 , { } , g . classes ) ; this . dom = { container : a ( "<div/>" ) . addClass ( this . classes . container ) } ; this . c = a . extend ( ! 0 , { } , g . defaults ,
c ) ; this . s = { dt : b } ; b . settings ( ) [ 0 ] . searchPane = this ; b . columns ( this . c . columns ) . eq ( 0 ) . each ( function ( l ) { f . _pane ( l ) } ) ; a ( this . dom . container ) . on ( "click" , "li" , function ( ) { f . _toggle ( this ) } ) . on ( "click" , "button." + this . classes . clear , function ( ) { f . _clear ( a ( this ) . closest ( "div." + f . classes . pane . container ) ) } ) ; this . _attach ( ) } var p = a . fn . dataTable ; a . extend ( g . prototype , { rebuild : function ( ) { var b = this ; this . dom . container . empty ( ) ; this . s . dt . columns ( this . c . columns ) . eq ( 0 ) . each ( function ( c ) { b . _pane ( c ) } ) } , _attach : function ( ) { var b =
this . c . container ; b = "function" === typeof b ? b ( this . s . dt ) : b ; "prepend" === this . c . insert ? a ( this . dom . container ) . prependTo ( b ) : a ( this . dom . container ) . appendTo ( b ) } , _binData : function ( b ) { for ( var c = { } , f = 0 , l = b . length ; f < l ; f ++ ) { var m = b [ f ] ; m && ( c [ m ] ? c [ m ] ++ : c [ m ] = 1 ) } return c } , _clear : function ( b ) { var c = this . classes , f = c . item . selected ; b . find ( "li." + f ) . removeClass ( f ) ; b . removeClass ( c . pane . active ) ; this . s . dt . column ( b . data ( "column" ) ) . search ( "" ) . draw ( ) } , _pane : function ( b ) { var c = this . classes , f = c . item ; c = c . pane ; var l = this . s . dt , m = l . column ( b ) ,
n = this . _getOptions ( b ) , r = a ( "<ul/>" ) , h = "function" === typeof n . options ? n . options ( l , b ) : n . options ? new p . Api ( null , n . options ) : m . data ( ) ; l = this . _binData ( h . flatten ( ) ) ; if ( ! ( this . _variance ( l ) < this . c . threshold ) ) { n = ( n = m . search ( ) ) ? n . substr ( 1 , n . length - 2 ) . split ( "|" ) : [ ] ; h = h . unique ( ) . sort ( ) . toArray ( ) ; for ( var q = 0 , u = h . length ; q < u ; q ++ ) if ( h [ q ] ) { var t = a ( "<li/>" ) . html ( '<span class="' + f . label + '">' + h [ q ] + "</span>" ) . data ( "filter" , h [ q ] ) . append ( a ( "<span/>" ) . addClass ( f . count ) . html ( l [ h [ q ] ] ) ) ; if ( n . length ) { var v = h [ q ] . replace ? a . fn . dataTable . util . escapeRegex ( h [ q ] ) :
h [ q ] ; - 1 !== a . inArray ( v , n ) && t . addClass ( f . selected ) } r . append ( t ) } f = a ( "<div/>" ) . data ( "column" , b ) . addClass ( c . container ) . addClass ( n . length ? c . active : "" ) . append ( a ( '<button type="button">×</button>' ) . addClass ( this . classes . clear ) ) . append ( a ( "<div/>" ) . addClass ( c . title ) . html ( a ( m . header ( ) ) . text ( ) ) ) . append ( a ( "<div/>" ) . addClass ( c . scroller ) . append ( r ) ) ; c = this . dom . container ; m = c . children ( ) . map ( function ( ) { if ( a ( this ) . data ( "column" ) == b ) return this } ) ; m . length ? m . replaceWith ( f ) : a ( c ) . append ( f ) } } , _getOptions : function ( b ) { return this . s . dt . settings ( ) [ 0 ] . aoColumns [ b ] . searchPane ||
{ } } , _toggle : function ( b ) { var c = this . classes , f = c . item . selected , l = this . s . dt ; b = a ( b ) ; var m = b . closest ( "div." + c . pane . container ) , n = m . data ( "column" ) , r = this . _getOptions ( n ) ; b . toggleClass ( f , ! b . hasClass ( f ) ) ; b = m . find ( "li." + f ) ; 0 === b . length ? ( m . removeClass ( c . pane . active ) , l . column ( n ) . search ( "" ) . draw ( ) ) : "any" === r . match ? ( m . addClass ( c . pane . active ) , l . column ( n ) . search ( "(" + a . map ( b , function ( h ) { h = a ( h ) . data ( "filter" ) . toString ( ) ; h = a ( "<div/>" ) . html ( h ) . text ( ) ; return a . fn . dataTable . util . escapeRegex ( h ) } ) . join ( "|" ) + ")" , ! 0 , ! 1 ) . draw ( ) ) :
( m . addClass ( c . pane . active ) , l . column ( n ) . search ( "^(" + a . map ( b , function ( h ) { h = a ( h ) . data ( "filter" ) . toString ( ) ; h = a ( "<div/>" ) . html ( h ) . text ( ) ; return a . fn . dataTable . util . escapeRegex ( h ) } ) . join ( "|" ) + ")$" , ! 0 , ! 1 ) . draw ( ) ) } , _variance : function ( b ) { b = a . map ( b , function ( r , h ) { return r } ) ; for ( var c = b . length , f = 0 , l = 0 , m = c ; l < m ; l ++ ) f += b [ l ] ; f /= c ; var n = 0 ; l = 0 ; for ( m = c ; l < m ; l ++ ) n += Math . pow ( f - b [ l ] , 2 ) ; return n / ( c - 1 ) } } ) ; g . classes = { container : "dt-searchPanes" , clear : "clear" , pane : { active : "filtering" , container : "pane" , title : "title" , scroller : "scroller" } ,
item : { selected : "selected" , label : "label" , count : "count" } } ; g . defaults = { container : function ( b ) { return b . table ( ) . container ( ) } , columns : k , insert : "prepend" , threshold : . 5 } ; g . version = "0.0.2" ; a . fn . dataTable . SearchPanes = g ; a . fn . DataTable . SearchPanes = g ; p . Api . register ( "searchPanes.rebuild()" , function ( ) { return this . iterator ( "table" , function ( b ) { b . searchPane && b . searchPane . rebuild ( ) } ) } ) ; p . Api . register ( "column().paneOptions()" , function ( b ) { return this . iterator ( "column" , function ( c , f ) { f = c . aoColumns [ f ] ; f . searchPane || ( f . searchPane =
{ } ) ; f . searchPane . values = b ; c . searchPane && c . searchPane . rebuild ( ) } ) } ) ; a ( e ) . on ( "init.dt" , function ( b , c , f ) { "dt" === b . namespace && ( b = c . oInit . searchPane , f = p . defaults . searchPane , b || f ) && ( f = a . extend ( { } , b , f ) , ! 1 !== b && new g ( c , f ) ) } ) } ) ;