var y=Object.defineProperty;var s=Object.getOwnPropertySymbols;var a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var m=(e,o,r)=>o in e?y(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,i=(e,o)=>{for(var r in o||(o={}))a.call(o,r)&&m(e,r,o[r]);if(s)for(var r of s(o))f.call(o,r)&&m(e,r,o[r]);return e};var p=(e,o)=>{var r={};for(var n in e)a.call(e,n)&&o.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&s)for(var n of s(e))o.indexOf(n)<0&&f.call(e,n)&&(r[n]=e[n]);return r};import t from"react";import{pdfjs as g,Page as P,Document as S}from"react-pdf";g.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${g.version}/legacy/build/pdf.worker.min.js`;var D=r=>{var n=r,{file:e}=n,o=p(n,["file"]);let[l,d]=t.useState(null);function k({numPages:u}){d(u)}return t.createElement(S,i({file:e,onLoadSuccess:k},o),Array.from(new Array(l),(u,c)=>t.createElement(P,{key:`page_${c+1}`,pageNumber:c+1})))};export{D as Pdf};
