PageSourceSearch

https://genie9.com/_next/static/chunks/7781.d08afbc9f9194063.js

js genie9.com collected 2026-09-24 10:27:20 UTC 2,617 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7781,30162],{30162:(e,t,i)=>{i.d(t,{generateOptimizedImage:()=>s,generateOptimizedPDF:()=>a});var o=i(55172),l=i(54264),r=i.n(l);async function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{filename:i="document.pdf",title:l="",orientation:a="portrait",format:s="a4",quality:n=.92,scale:g=1.8,imageFormat:h="jpeg",compress:d=!0,maxWidth:c=2480,maxHeight:m=3508}=t;try{let t=e.style.cssText;e.style.width,e.style.minWidth,(!e.style.width||e.offsetWidth<600)&&(e.style.minWidth="900px",e.style.width="auto"),await new Promise(e=>setTimeout(e,100));let w=e.scrollWidth,y=e.scrollHeight,p=g;w*g>c&&(p=c/w),y*g>m&&(p=Math.min(p,m/y)),p=Math.max(.5,Math.min(2,p));let f=await r()(e,{scale:p,useCORS:!0,logging:!1,backgroundColor:"jpeg"===h?"#ffffff":null,removeContainer:!0,imageTimeout:15e3,windowWidth:e.scrollWidth,windowHeight:e.scrollHeight,width:e.scrollWidth,height:e.scrollHeight}),u=f.toDataURL("jpeg"===h?"image/jpeg":"image/png",n),W=f.width/f.height,T=200,j=200/W;j>287&&(T=(j=287)*W),T>200&&(j=(T=200)/W);let v=(210-T)/2,x=new o.jsPDF({orientation:a,unit:"mm",format:s,compress:d,putOnlyUsedFonts:!0,floatPrecision:2});l&&x.setProperties({title:l,creator:"Genie9 Tools",keywords:"optimized,compressed"}),x.addImage(u,h.toUpperCase(),v,5,T,j,void 0,"FAST"),x.save(i),e.style.cssText=t}catch(t){throw console.error("PDF generation error:",t),e&&void 0!==originalStyle&&(e.style.cssText=originalStyle),Error("Failed to generate PDF. Please try again.")}}async function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{filename:i="image.png",format:o="png",quality:l=.95,scale:a=1.8,maxWidth:s=2480,maxHeight:n=3508}=t;try{let t=e.style.cssText;e.style.width,e.style.minWidth,(!e.style.width||e.offsetWidth<600)&&(e.style.minWidth="900px",e.style.width="auto"),await new Promise(e=>setTimeout(e,100));let g=e.scrollWidth,h=e.scrollHeight,d=a;g*a>s&&(d=s/g),h*a>n&&(d=Math.min(d,n/h)),d=Math.max(.5,Math.min(2,d)),(await r()(e,{scale:d,useCORS:!0,logging:!1,backgroundColor:"jpeg"===o?"#ffffff":null,removeContainer:!0,imageTimeout:15e3,windowWidth:e.scrollWidth,windowHeight:e.scrollHeight,width:e.scrollWidth,height:e.scrollHeight})).toBlob(o=>{if(o){let e=URL.createObjectURL(o),t=document.createElement("a");t.download=i,t.href=e,t.click(),URL.revokeObjectURL(e)}e.style.cssText=t},"jpeg"===o?"image/jpeg":"image/png",l)}catch(t){throw console.error("Image generation error:",t),e&&void 0!==originalStyle&&(e.style.cssText=originalStyle),Error("Failed to generate image. Please try again.")}}}}]);

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.