| 2 |
(globalThis.webpackChunkb_blocks=globalThis.webpackChunkb_blocks||[]).push([[897],{897(t,e,o){var n,r;n=[o(428),o(5668),o(7837)],void 0===(r=function(t){return function(t,e,o){"use strict";var n=t.fn.dataTable,r=o.createElement("a"),i=function(t){r.href=t;var e=r.host;return-1===e.indexOf("/")&&0!==r.pathname.indexOf("/")&&(e+="/"),r.protocol+"//"+e+r.pathname+r.search};return n.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(o,n,r,a,s){var c=n.buttons.exportData(t.extend({decodeEntities:!1},a.exportOptions)),u=n.buttons.exportInfo(a),l=n.columns(a.exportOptions.columns).nodes().map((function(t){return t.className})).toArray(),p=function(t,e){for(var o="<tr>",n=0,r=t.length;n<r;n++){var i=null===t[n]||void 0===t[n]?"":t[n];o+="<"+e+" "+(l[n]?'class="'+l[n]+'"':"")+">"+i+"</"+e+">"}return o+"</tr>"},d='<table class="'+n.table().node().className+'">';a.header&&(d+="<thead>"+c.headerStructure.map((function(t){return"<tr>"+t.map((function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""})).join("")+"</tr>"})).join("")+"</thead>"),d+="<tbody>";for(var m=0,h=c.body.length;m<h;m++)d+=p(c.body[m],"td");d+="</tbody>",a.footer&&c.footer&&(d+="<tfoot>"+c.footerStructure.map((function(t){return"<tr>"+t.map((function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""})).join("")+"</tr>"})).join("")+"</tfoot>"),d+="</table>";var f=e.open("","");if(f){f.document.close(),f.document.title=u.title,t('style, link[rel="stylesheet"]').each((function(){let t=this.cloneNode(!0);"link"===t.tagName.toLowerCase()&&(t.href=i(t.href)),f.document.head.appendChild(t)})),a.customScripts&&a.customScripts.forEach((function(t){var e=f.document.createElement("script");e.src=t,f.document.getElementsByTagName("head")[0].appendChild(e)})),f.document.body.innerHTML="<h1>"+u.title+"</h1><div>"+(u.messageTop||"")+"</div>"+d+"<div>"+(u.messageBottom||"")+"</div>",t(f.document.body).addClass("dt-print-view"),t("img",f.document.body).each((function(t,e){e.setAttribute("src",i(e.getAttribute("src")))})),a.customize&&a.customize(f,a,n);f.setTimeout((function(){a.autoPrint&&(f.print(),f.close())}),1e3),s()}else n.buttons.info(n.i18n("buttons.printErrorTitle","Unable to open print view"),n.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},async:100,title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!0,autoPrint:!0,customize:null},n}(t,window,document)}.apply(e,n))||(t.exports=r)}}]); |