var document={createElementNS:function(){return{}}},window=this;importScripts("/static/js/workers/pdf-worker-libs.js"),pdfMake.fonts={PdfFont:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};var replacePlaceholder=function(t){for(var e=0;e<t.length;e++)if("object"==typeof t[e]){if("{{motion-placeholder-to-insert-functions-here}}"===t[e].layout)return t[e].layout={hLineWidth:function(t,e){return 0===t||t===e.table.body.length?0:.5},vLineWidth:function(){return 0},hLineColor:function(){return"white"}},!0;if("{{ballot-placeholder-to-insert-functions-here}}"===t[e].layout)return t[e].layout={hLineWidth:function(t,e){return 0===t?0:t===e.table.body.length?e.rowsperpage&&e.rowsperpage>t?.5:0:.5},vLineWidth:function(t,e){return 0===t||t===e.table.widths.length?0:.5},hLineColor:function(){return"gray"},vLineColor:function(){return"gray"}},!0;replacePlaceholder(t[e])}};self.addEventListener("message",function(t){var e=JSON.parse(t.data);e.footerTpl&&(e.footer=function(t,o){var r=e.footerTpl.text.replace("{{currentPage}}",t).replace("{{pageCount}}",o);return{text:r,alignment:e.footerTpl.alignment,margin:e.footerTpl.margin,fontSize:e.footerTpl.fontSize,color:e.footerTpl.color}}),replacePlaceholder(e.content);var o=pdfMake.createPdf(e);o.getBase64(function(t){self.postMessage(t)})},!1);