1"use strict";(globalThis.webpackChunkNorden_Commerce=globalThis.webpackChunkNorden_Commerce||[]).push([[2568],{9216(t,o,e){e.d(o,{Print:()=>n});e(4423);var a=e(7164),r=e(3587);const n={init:function(t){a.fonts={Roboto:{normal:`${Hatraco.protocol}${Hatraco.domain}${Hatraco.staticUrl}fonts/pdf/Roboto/Roboto-Regular.ttf`,bold:`${Hatraco.protocol}${Hatraco.domain}${Hatraco.staticUrl}fonts/pdf/Roboto/Roboto-Medium.ttf`,italics:`${Hatraco.protocol}${Hatraco.domain}${Hatraco.staticUrl}fonts/pdf/Roboto/Roboto-Italic.ttf`,bolditalics:`${Hatraco.protocol}${Hatraco.domain}${Hatraco.staticUrl}fonts/pdf/Roboto/Roboto-MediumItalic.ttf`}};const o=t.target;if(o){const e={logo:"true"===o.getAttribute("data-print-page-logo"),slug:o.getAttribute("data-print-page"),title:o.getAttribute("data-page-title"),url:o.getAttribute("data-page-url")},i=document.querySelector(`[data-print-content="${e.slug}"]`)||o.closest("[data-content]");if(i){const o=i.cloneNode(!0);o.querySelectorAll("style,script,[data-print-page],[data-print-page-ignore]").forEach(t=>t.remove());const c=o.querySelectorAll("*[id]");for(const t of c)t.removeAttribute("id");const l=o.innerHTML,s=r(l,{imagesByReference:!0,defaultStyles:{a:{color:"blue"},h1:{fontSize:24,marginTop:20,marginBottom:0},h2:{fontSize:16,marginTop:20,marginBottom:0},h3:{fontSize:14,marginTop:20,marginBottom:0},h4:{fontSize:12,marginTop:20,marginBottom:0}}}),g=Array.isArray(s)?s:s.content;n.pruneDeep(g);for(const t of s.content)if("SCRIPT"===t.nodeName){const o=s.content.indexOf(t);s.content.splice(o,1)}const m=s.images,p={pageSize:"A4",pageMargins:[40,40,40,60],footer:(t,o)=>[{columns:[{text:`${e.url} | ${e.title}`,width:"60%",style:"footer",margin:[40,20,0,0]},{text:(new Date).toLocaleDateString(Hatraco.i18n.language,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"}),width:"25%",alignment:"right",style:"footer",margin:[0,20,0,0]},{text:`${t.toString()}/${o}`,width:"15%",alignment:"right",style:"footer",margin:[0,20,40,0]}]}],content:g,styles:{footer:{fontSize:8}},defaultStyle:{font:"Roboto",fontSize:11,lineHeight:1.2},images:m};e.logo&&(m.logo=`${Hatraco.protocol}${Hatraco.domain}${Hatraco.staticUrl}gfx/logo_pdf.jpg`,p.pageMargins=[40,100,40,60],p.header={image:"logo",width:100,margin:[40,40,0,0]}),a.createPdf(p).download(`${Hatraco.domain}_${e.slug}.pdf`,()=>{t.target.querySelector("img").remove()})}}},isRemovableBlockWhitespace:t=>{if(!t||"object"!=typeof t)return!1;if("string"!=typeof t.text)return!1;if(""!==t.text.trim())return!1;if(t.stack||t.table||t.ul||t.ol||t.columns)return!1;return(Array.isArray(t.style)?t.style:[]).includes("html-div")},pruneDeep:t=>{if(t)if(Array.isArray(t))for(let o=t.length-1;o>=0;o--){const e=t[o];n.isRemovableBlockWhitespace(e)?t.splice(o,1):n.pruneDeep(e)}else"object"==typeof t&&(t.stack&&n.pruneDeep(t.stack),t.content&&n.pruneDeep(t.content),t.columns&&n.pruneDeep(t.columns),t.table?.body&&n.pruneDeep(t.table.body))}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.