1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1797],{67705:function(e,n,o){"use strict";o.r(n);var r=o(57135),t=o(15767),a=o(4637),i=o(59496),l=o(90851),c=o(29820),s=o(79594),u=o(79639),d=o.n(u),p=o(10062);c.v0.GlobalWorkerOptions.workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(c.v0.version,"/pdf.worker.js");var f=(0,i.forwardRef)(function(e,n){var o=e.pageNumber,r=e.pageWidth;return(0,a.jsx)("div",{className:d().flipbookPage,ref:n,children:(0,a.jsx)(c.T3,{pageNumber:o,width:r,renderTextLayer:!1,renderAnnotationLayer:!1,loading:(0,a.jsxs)("div",{className:d().pageLoading,children:["Cargando p\xe1gina ",o,"..."]})})})});f.displayName="PDFPage";var h=function(e){var n=e.pdfUrl,o=(0,i.useState)(null),u=o[0],h=o[1],b=(0,i.useState)(0),_=b[0],g=b[1],v=(0,i.useState)(!0),m=v[0],k=v[1],F=(0,i.useState)(null),w=F[0],P=F[1],x=(0,i.useState)(null),j=x[0],D=x[1],N=(0,i.useState)(null),C=N[0],L=N[1],R=(0,i.useState)(1),S=R[0],E=R[1],B=(0,i.useRef)(null),y=(0,i.useRef)(null),z=(0,i.useRef)(0),T=(0,p.a)("(max-width: 767px)"),A=C?Math.floor(C*S):null,M=A?Math.floor(1.414*A):null;(0,i.useEffect)(function(){if(B.current&&z.current>0){var e=setTimeout(function(){var e,n=null===(e=B.current)||void 0===e?void 0:e.pageFlip();n&&n.turnToPage(z.current)},100);return function(){return clearTimeout(e)}}},[S]),(0,i.useEffect)(function(){if(S>1&&y.current){var e=y.current,n=setTimeout(function(){var n=(e.scrollWidth-e.clientWidth)/2,o=(e.scrollHeight-e.clientHeight)/2;e.scrollTo({left:n,top:o,behavior:"smooth"})},150);return function(){return clearTimeout(n)}}},[S]),(0,i.useLayoutEffect)(function(){if(j){var e=T?.95*window.innerWidth:Math.min(.95*window.innerWidth,1400),n=T?.7*window.innerHeight:750,o=e/((T?1:2)*j.width),r=n/j.height;L(Math.floor(j.width*Math.min(o,r)))}},[j,T]),(0,i.useEffect)(function(){if(n){try{var e,o,r=new URL(n,window.location.origin);if(![window.location.origin,"https://eldiaapiv3.eleco.com.ar/api/v2",].filter(Boolean).some(function(e){try{return r.origin===new URL(e).origin}catch(n){return!1}})){console.error("Refusing to fetch PDF from a different origin:",r.href),k(!1);return}o=r.toString()}catch(t){console.error("Invalid PDF URL:",n,t),k(!1);return}var a=(0,s.zt)("token");return k(!0),fetch(o,{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)}}).then(function(e){if(!e.ok){var n=Error("Error al descargar PDF: ".concat(e.status));throw k(!1),n}return e.blob()}).then(function(n){P(e=URL.createObjectURL(new Blob([n],{type:"application/pdf"})))}).catch(function(e){console.error("Error fetching PDF:",e),k(!1)}),function(){e&&URL.revokeObjectURL(e)}}},[n]);var W,U=(0,i.useCallback)(function(){if(T){var e,n=null===(e=B.current)||void 0===e?void 0:e.pageFlip();n&&n.turnToPage(1)}},[T]),I=(0,i.useCallback)((W=(0,r.Z)(function(e){var n,o,r;return(0,t.__generator)(this,function(t){switch(t.label){case 0:n=e.numPages,o=e.getPage,h(n),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,o(1)];case 2:return D({width:(r=t.sent()).view[2],height:r.view[3]}),[3,4];case 3:return t.sent(),D({width:595,height:842}),[3,4];case 4:return k(!1),[2]}})}),function(e){return W.apply(this,arguments)}),[]),O=(0,i.useCallback)(function(e){g(e.data)},[]),Z=(0,i.useCallback)(function(){var e;null===(e=B.current)||void 0===e||e.pageFlip().flipPrev()},[]),H=(0,i.useCallback)(function(){var e;null===(e=B.current)||void 0===e||e.pageFlip().flipNext()},[]),J=(0,i.useCallback)(function(){z.current=_,E(function(e){return Math.min(e+.25,3)})},[_]),G=(0,i.useCallback)(function(){z.current=_,E(function(e){return Math.max(e-.25,1)})},[_]),K=(0,i.useCallback)(function(){z.current=_,E(1)},[_]);return n?w?(0,a.jsxs)("div",{className:d().flipbookWrapper,children:[(0,a.jsx)(c.BB,{file:w,onLoadSuccess:I,loading:(0,a.jsx)("div",{className:d().documentLoading,children:"Cargando documento..."}),error:(0,a.jsx)("div",{className:d().error,children:"Error al cargar el PDF. Por favor, intenta nuevamente."}),children:!m&&u&&A&&M&&(0,a.jsx)("div",{ref:y,className:"".concat(d().flipbookContainer," ").concat(S>1?d().zoomed:""),style:{touchAction:S>1&&T?"pan-x pan-y":"auto"},children:(0,a.jsxs)(l.Z,{ref:B,width:A,height:M,size:"fixed",drawShadow:!1,flippingTime:700,usePortrait:!!T,showCover:!1,showPageCorners:!1,onFlip:O,className:d().flipbook,useMouseEvents:!T&&1===S,onInit:U,mobileScrollSupport:!1,swipeDistance:T?99999:30,children:[(0,a.jsx)("div",{}),Array.from(Array(u),function(e,n){return(0,a.jsx)(f,{pageNumber:n+1,pageWidth:A},"page_".concat(n+1))})]},S)})}),u&&!m&&(0,a.jsxs)("div",{className:d().flipbookControls,children:[(0,a.jsx)("button",{onClick:Z,disabled:T?_<=1:0===_,className:d().navBtn,title:"Anterior","aria-label":"Anterior",children:"â¹"}),(0,a.jsx)("div",{className:d().sep}),(0,a.jsx)("span",{className:d().pageInfo,children:(T?_<=1:0===_)?"Portada":"".concat(_).concat(_<u?" â ".concat(Math.min(_+1,u+1)):""," de ").concat(u)}),(0,a.jsx)("div",{className:d().sep}),(0,a.jsx)("button",{onClick:H,disabled:T?_>=u-1:_>=u-2,className:d().navBtn,title:"Siguiente","aria-label":"Siguiente",children:"âº"}),(0,a.jsx)("div",{className:"".concat(d().sep," ").concat(d().groupSep)}),(0,a.jsx)("button",{onClick:G,disabled:S<=1,className:d().navBtn,title:"Alejar","aria-label":"Alejar",children:"â"}),(0,a.jsxs)("span",{className:d().zoomReadout,children:[Math.round(100*S),"%"]}),(0,a.jsx)("button",{onClick:J,disabled:S>=3,className:d().navBtn,title:"Acercar","aria-label":"Acercar",children:"+"}),(0,a.jsx)("div",{className:d().sep}),(0,a.jsx)("button",{onClick:K,disabled:1===S,className:"".concat(d().navBtn," ").concat(d().resetBtn),title:"Restablecer","aria-label":"Restablecer",children:"âº"})]})]}):(0,a.jsx)("div",{className:d().flipbookWrapper,children:(0,a.jsx)("div",{className:d().documentLoading,children:"Descargando edici\xf3n..."})}):(0,a.jsx)("div",{className:d().error,children:"No se proporcion\xf3 URL del PDF"})};n.default=h},10062:function(e,n,o){"use strict";o.d(n,{a:function(){return t}});var r=o(59496);function t(e){var n=(0,r.useState)(!1),o=n[0],t=n[1];return(0,r.useEffect)(function(){var n=window.matchMedia(e);n.matches!==o&&t(n.matches);var r=function(){return t(n.matches)};return window.addEventListener("resize",r),function(){return window.removeEventListener("resize",r)}},[o,e]),o}},79639:function(e){e.exports={"grid-notes":"FlipbookPDF_grid-notes__wzLeO",grid:"FlipbookPDF_grid__Z3Z7A",container:"FlipbookPDF_container__ULhwX",right:"FlipbookPDF_right__lKWpY",left:"FlipbookPDF_left__nTYLB",advertisement:"FlipbookPDF_advertisement__UtwK6","large-h150":"FlipbookPDF_large-h150__fbJ2H","large-h100":"FlipbookPDF_large-h100__NOFkr",flipbookWrapper:"FlipbookPDF_flipbookWrapper__bgvE9",flipbookContainer:"FlipbookPDF_flipbookContainer__6Gozw",zoomed:"FlipbookPDF_zoomed__bMRTE",flipbook:"FlipbookPDF_flipbook__3gbsv",flipbookPage:"FlipbookPDF_flipbookPage__iuuJP",flipbookControls:"FlipbookPDF_flipbookControls__ERoaH",sep:"FlipbookPDF_sep__Znxs4",groupSep:"FlipbookPDF_groupSep__lNtly",navBtn:"FlipbookPDF_navBtn__jcO9Z",resetBtn:"FlipbookPDF_resetBtn__nuEQj",pageInfo:"FlipbookPDF_pageInfo___jwoa",zoomReadout:"FlipbookPDF_zoomReadout__woSat",documentLoading:"FlipbookPDF_documentLoading__Iv4DJ",pageLoading:"FlipbookPDF_pageLoading__Jup7o",error:"FlipbookPDF_error__DN3pQ"}},42740:function(){},77665:function(){},85491:function(){},74622:function(){},69071:function(){}}]);
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.