/*! Buttons for DataTables 1.6.5 ©2016-2020 SpryMedia Ltd - datatables.net/license */ (function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(q){return e(q,window,document)}):"object"===typeof exports?module.exports=function(q,r){q||(q=window);if(!r||!r.fn.dataTable)r=require("datatables.net")(q,r).$;return e(r,q,q.document)}:e(jQuery,window,document)})(function(e,q,r,m){function w(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function x(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&& c.call(a))}function z(a,b){var c=new i.Api(a),d=b?b:c.init().buttons||i.defaults.buttons;return(new p(c,d)).container()}var i=e.fn.dataTable,C=0,D=0,l=i.ext.buttons,p=function(a,b){if(!(this instanceof p))return function(b){return(new p(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},p.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new i.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+C++};this.dom={container:e("<"+ this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(p.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===m)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.button.active,c=e(c.node);if(b===m)return c.hasClass(d);c.toggleClass(d,b===m?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var d=b.split("-"),e=this.s,c=0,f=d.length-1;c"),j.conf._collection=j.collection,this._expandButton(j.buttons,j.conf.buttons,!0,d)),n.init&&n.init.call(g.button(j.node),g,e(j.node),n),f++)}}},_buildButton:function(a,b){var c=this.c.dom.button,d=this.c.dom.buttonLiner, g=this.c.dom.collection,f=this.s.dt,h=function(b){return"function"===typeof b?b(f,j,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(d=g.buttonLiner);if(a.available&&!a.available(f,a))return!1;var k=function(a,b,c,d){d.action.call(b.button(c),a,b,c,d);e(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,d])},g=a.tag||c.tag,n=a.clickBlurs===m?!0:a.clickBlurs,j=e("<"+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();!j.hasClass(c.disabled)&&a.action&&k(b,f,j,a);n&&j.trigger("blur")}).on("keyup.dtb",function(b){b.keyCode===13&&!j.hasClass(c.disabled)&&a.action&&k(b,f,j,a)});"a"===g.toLowerCase()&&j.attr("href","#");"button"===g.toLowerCase()&&j.attr("type","button");d.tag?(g=e("<"+d.tag+"/>").html(h(a.text)).addClass(d.className),"a"===d.tag.toLowerCase()&&g.attr("href","#"),j.append(g)):j.html(h(a.text));!1===a.enabled&&j.addClass(c.disabled);a.className&&j.addClass(a.className); a.titleAttr&&j.attr("title",h(a.titleAttr));a.attr&&j.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+D++);d=(d=this.c.dom.buttonContainer)&&d.tag?e("<"+d.tag+"/>").addClass(d.className).append(j):j;this._addKey(a);this.c.buttonCreated&&(d=this.c.buttonCreated(a,d));return{conf:a,node:j.get(0),inserter:d,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c").addClass("dt-button-collection").addClass(g.collectionLayout).css("display", "none");a=e(a).addClass(g.contentClassName).attr("role","menu").appendTo(c);f.attr("aria-expanded","true");f.parents("body")[0]!==r.body&&(f=r.body.lastChild);g.collectionTitle&&c.prepend('
'+g.collectionTitle+"
");w(c.insertAfter(f),g.fade);var d=e(b.table().container()),k=c.css("position");"dt-container"===g.align&&(f=f.parent(),c.css("width",d.width()));if("absolute"===k&&(c.hasClass(g.rightAlignClassName)||c.hasClass(g.leftAlignClassName)||"dt-container"=== g.align)){var n=f.position();c.css({top:n.top+f.outerHeight(),left:n.left});var j=c.outerHeight(),i=d.offset().top+d.height(),t=n.top+f.outerHeight()+j,i=t-i,t=n.top-j,m=d.offset().top,l=n.top-j-5;(i>m-t||g.dropup)&&-lk+o&&(k=n-(k+o),d-=s+o,o=k>d?o+d:o+k)):(o=n-k,dd?o+d:o+k));c.css("left", c.position().left+o)}else"absolute"===k?(n=f.position(),c.css({top:n.top+f.outerHeight(),left:n.left}),j=c.outerHeight(),k=f.offset().top,o=0,o=f.offset().left,u=f.outerWidth(),u=o+u,k=c.offset().left,s=a.width(),s=k+s,l=n.top-j-5,i=d.offset().top+d.height(),t=n.top+f.outerHeight()+j,i=t-i,t=n.top-j,m=d.offset().top,(i>m-t||g.dropup)&&-le(q).height()/2&&(k=e(q).height()/2),c.css("marginTop", -1*k));g.background&&p.background(!0,g.backgroundClassName,g.fade,f);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection",function(b){var c=e.fn.addBack?"addBack":"andSelf",d=e(b.target).parent()[0];(!e(b.target).parents()[c]().filter(a).length&&!e(d).hasClass("dt-buttons")||e(b.target).hasClass("dt-button-background"))&&h()}).on("keyup.dtb-collection",function(a){a.keyCode===27&&h()});g.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal", function(a,b,c,d){d[0]!==f[0]&&h()})},0);e(c).trigger("buttons-popover.dt")}});p.background=function(a,b,c,d){c===m&&(c=400);d||(d=r.body);a?w(e("
").addClass(b).css("display","none").insertAfter(d),c):x(e("div."+b),c,function(){e(this).removeClass(b).remove()})};p.instanceSelector=function(a,b){if(a===m||null===a)return e.map(b,function(a){return a.inst});var c=[],d=e.map(b,function(a){return a.name}),g=function(a){if(Array.isArray(a))for(var h=0,k=a.length;h').html(a?"

"+a+"

":"").append(e("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==m&&0!==c&& (v=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});return this});i.Api.register("buttons.exportData()",function(a){if(this.context.length){var b=new i.Api(this.context[0]),c=e.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return d(a)},footer:function(a){return d(a)},body:function(a){return d(a)}},customizeData:null}, a),d=function(a){if("string"!==typeof a)return a;a=a.replace(/)<[^<]*)*<\/script>/gi,"");a=a.replace(//g,"");c.stripHtml&&(a=a.replace(/<([^>'"]*('[^']*'|"[^"]*")?)*>/g,""));c.trim&&(a=a.replace(/^\s+|\s+$/g,""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(A.innerHTML=a,a=A.value);return a},a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header();return c.format.header(d.innerHTML,a,d)}).toArray(),g=b.table().footer()? b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,f=e.extend({},c.modifier);b.select&&"function"===typeof b.select.info&&f.selected===m&&b.rows(c.rows,e.extend({selected:!0},f)).any()&&e.extend(f,{selected:!0});for(var f=b.rows(c.rows,f).indexes().toArray(),h=b.cells(f,c.columns),f=h.render(c.orthogonal).toArray(),h=h.nodes().toArray(),k=a.length,n=[],j=0,l=0,p=0 title").text()).trim()),b=b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(c=y(c.extension))||(c=""),b+= c);c=y(a.title);c=null===c?null:-1!==c.indexOf("*")?c.replace("*",e("head > title").text()||"Exported data"):c;return{filename:b,title:c,messageTop:B(this,a.message||a.messageTop,"top"),messageBottom:B(this,a.messageBottom,"bottom")}});var y=function(a){return null===a||a===m?null:"function"===typeof a?a():a},B=function(a,b,c){b=y(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},A=e("