PageSourceSearch

https://anyserv.eu/_astro/InvoicePdfButton.CwxKkW3v.js

js anyserv.eu collected 2026-10-02 01:02:31 UTC 1,706 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/react-pdf.browser.oChrVxVZ.js","_astro/index.uFOh2Gdi.js","_astro/jsx-runtime.u17CrQMm.js","_astro/InvoicePdf.18EKqdZK.js","_astro/InvoiceApp.DnplZP1s.js","_astro/currencies.DWJvZczP.js","_astro/preload-helper.CVfkMyKi.js","_astro/InvoiceSelect.hvrwXG0W.js","_astro/InvoiceDatePicker.Bh5_xinU.js"])))=>i.map(i=>d[i]);
2import{_ as m}from"./preload-helper.CVfkMyKi.js";import{j as t}from"./jsx-runtime.u17CrQMm.js";import{r as n}from"./index.uFOh2Gdi.js";function x({data:s,fileName:r,lang:a="en",labelDownload:f,labelGenerating:b}){const[e,c]=n.useState(!1),[l,d]=n.useState(null),P=f??"Download PDF",_=b??"Generating…",p=r.toLowerCase().endsWith(".pdf")?r:`${r}.pdf`,h=n.useCallback(async()=>{if(!e){c(!0),d(null);try{const[{pdf:i},{InvoicePdf:E}]=await Promise.all([m(()=>import("./react-pdf.browser.oChrVxVZ.js"),__vite__mapDeps([0,1,2])),m(()=>import("./InvoicePdf.18EKqdZK.js"),__vite__mapDeps([3,2,0,1,4,5,6,7,8]))]),L=n.createElement(E,{data:s,lang:a}),y=await i(L).toBlob(),u=URL.createObjectURL(y),o=document.createElement("a");o.href=u,o.download=p,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(u),6e4)}catch(i){console.error("[InvoicePdfButton] PDF generation failed:",i),d(a==="pl"?"Generowanie PDF nie powiodło się. Spróbuj ponownie.":"PDF generation failed. Please try again.")}finally{c(!1)}}},[s,a,p,e]);return t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:"btn-print",onClick:h,disabled:e,"aria-busy":e,children:e?_:P}),l&&t.jsx("p",{style:{color:"#ef4444",fontSize:"0.78rem",marginTop:"6px"},children:l})]})}export{x as InvoicePdfButton};

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.