/*! Buttons for DataTables 1.6.2 ©2016-2020 SpryMedia Ltd - datatables.net/license */ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(v){return d(v,window,document)}):"object"===typeof exports?module.exports=function(v,u){v||(v=window);u&&u.fn.dataTable||(u=require("datatables.net")(v,u).$);return d(u,v,v.document)}:d(jQuery,window,document)})(function(d,v,u,n){function y(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function z(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} function B(a,b){a=new m.Api(a);b=b?b:a.init().buttons||m.defaults.buttons;return(new r(a,b)).container()}var m=d.fn.dataTable,E=0,F=0,q=m.ext.buttons,r=function(a,b){if(!(this instanceof r))return function(b){return(new r(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});d.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},r.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new m.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+E++};this.dom={container:d("<"+this.c.dom.container.tag+ "/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(r.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===n)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=d(c.node);if(b===n)return c.hasClass(a);c.toggleClass(a,b===n?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){b=b.split("-");var e=this.s;c=0;for(var d=b.length-1;c"),l.conf._collection=l.collection,this._expandButton(l.buttons,l.conf.buttons,!0,e)),t.init&&t.init.call(g.button(l.node),g,d(l.node),t),f++)}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner, g=this.c.dom.collection,f=this.s.dt,k=function(b){return"function"===typeof b?b(f,l,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(e=g.buttonLiner);if(a.available&&!a.available(f,a))return!1;var h=function(a,b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,e])};g=a.tag||c.tag;var t=a.clickBlurs===n?!0:a.clickBlurs,l=d("<"+g+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb", function(b){b.preventDefault();!l.hasClass(c.disabled)&&a.action&&h(b,f,l,a);t&&l.trigger("blur")}).on("keyup.dtb",function(b){13===b.keyCode&&!l.hasClass(c.disabled)&&a.action&&h(b,f,l,a)});"a"===g.toLowerCase()&&l.attr("href","#");"button"===g.toLowerCase()&&l.attr("type","button");e.tag?(g=d("<"+e.tag+"/>").html(k(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&g.attr("href","#"),l.append(g)):l.html(k(a.text));!1===a.enabled&&l.addClass(c.disabled);a.className&&l.addClass(a.className); a.titleAttr&&l.attr("title",k(a.titleAttr));a.attr&&l.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+F++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(l):l;this._addKey(a);this.c.buttonCreated&&(e=this.c.buttonCreated(a,e));return{conf:a,node:l.get(0),inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass("dt-button-collection").addClass(g.collectionLayout).css("display","none");a=d(a).addClass(g.contentClassName).attr("role", "menu").appendTo(c);f.attr("aria-expanded","true");f.parents("body")[0]!==u.body&&(f=u.body.lastChild);g.collectionTitle&&c.prepend('
'+g.collectionTitle+"
");y(c.insertAfter(f));var h=d(b.table().container());e=c.css("position");"dt-container"===g.align&&(f=f.parent(),c.css("width",h.width()));if("absolute"===e){e=f.position();c.css({top:e.top+f.outerHeight(),left:e.left});var t=c.outerHeight();c.outerWidth();var l=h.offset().top+h.height();l=e.top+f.outerHeight()+ t-l;var p=e.top-t,w=h.offset().top;e=e.top-t-5;(l>w-p||g.dropup)&&-et+p&&(e-=t+p,h-=l+p,p=e>h?p+h:p+e)):(p=e-t,hh?p+h:p+e));c.css("left",c.position().left+p)}else e=c.height()/2,e>d(v).height()/2&&(e=d(v).height()/2),c.css("marginTop",-1*e);g.background&&r.background(!0, g.backgroundClassName,g.fade,f);d("div.dt-button-background").on("click.dtb-collection",function(){});d("body").on("click.dtb-collection",function(b){var c=d.fn.addBack?"addBack":"andSelf";d(b.target).parents()[c]().filter(a).length||k()}).on("keyup.dtb-collection",function(a){27===a.keyCode&&k()});g.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(a,b,c,e){e[0]!==f[0]&&k()})},0);d(c).trigger("buttons-popover.dt")}});r.background=function(a,b,c,e){c===n&&(c=400);e||(e=u.body); a?y(d("
").addClass(b).css("display","none").insertAfter(e),c):z(d("div."+b),c,function(){d(this).removeClass(b).remove()})};r.instanceSelector=function(a,b){if(a===n||null===a)return d.map(b,function(a){return a.inst});var c=[],e=d.map(b,function(a){return a.name}),g=function(a){if(d.isArray(a))for(var f=0,h=a.length;f"+a+"":"";y(d('
').html(a).append(d("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==n&&0!==c&&(x=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)}); return this});m.Api.register("buttons.exportData()",function(a){if(this.context.length)return G(new m.Api(this.context[0]),a)});m.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==n&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===n||null===c?c=null:(-1!==c.indexOf("*")&&(c=d.trim(c.replace("*",d("head > title").text()))),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=A(b.extension))|| (b=""),c+=b);b=A(a.title);b=null===b?null:-1!==b.indexOf("*")?b.replace("*",d("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:C(this,a.message||a.messageTop,"top"),messageBottom:C(this,a.messageBottom,"bottom")}});var A=function(a){return null===a||a===n?null:"function"===typeof a?a():a},C=function(a,b,c){b=A(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},D=d("