PageSourceSearch

https://bigjpg.ai/_next/static/chunks/510-d42b98f6cc059411.js

js bigjpg.ai collected 2026-10-01 16:08:28 UTC 17,216 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[510],{7510:(e,t,a)=>{a.r(t),a.d(t,{default:()=>f});var l=a(5155),n=a(2115),r=a(9806),i=a(23),o=a(6133),s=a(3840);let c=()=>{let e=(0,r.createClientComponentClient)(),[t,a]=(0,n.useState)(!1),[c,d]=(0,n.useState)(null);(0,n.useEffect)(()=>{(async()=>{let{data:t}=await e.auth.getUser();d(t.user)})()},[e]);let m=async()=>{await e.auth.signOut(),window.location.href="/"},u=async()=>{a(!0);try{let{url:e}=await s.A.post("/creem/create-portal",{returnUrl:window.location.href});window.location.href=e}catch(e){console.error(e)}a(!1)};return(0,l.jsx)(i.A,{className:"relative z-10",children:e=>{var a,n,r,s,d;let{open:h}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.A.Button,{className:"btn",children:[(null==c?void 0:null===(a=c.user_metadata)||void 0===a?void 0:a.avatar_url)?(0,l.jsx)("img",{src:null==c?void 0:null===(n=c.user_metadata)||void 0===n?void 0:n.avatar_url,alt:"Profile picture",className:"w-6 h-6 rounded-full shrink-0",referrerPolicy:"no-referrer",width:24,height:24}):(0,l.jsx)("span",{className:"w-8 h-8 bg-base-100 flex justify-center items-center rounded-full shrink-0 capitalize",children:null==c?void 0:null===(r=c.email)||void 0===r?void 0:r.charAt(0)}),(null==c?void 0:null===(s=c.user_metadata)||void 0===s?void 0:s.name)||(null==c?void 0:null===(d=c.email)||void 0===d?void 0:d.split("@")[0])||"Account",t?(0,l.jsx)("span",{className:"loading loading-spinner loading-xs"}):(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 duration-200 opacity-50 ".concat(h?"transform rotate-180 ":""),children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]}),(0,l.jsx)(o.e,{enter:"transition duration-100 ease-out",enterFrom:"transform scale-95 opacity-0",enterTo:"transform scale-100 opacity-100",leave:"transition duration-75 ease-out",leaveFrom:"transform scale-100 opacity-100",leaveTo:"transform scale-95 opacity-0",children:(0,l.jsx)(i.A.Panel,{className:"absolute left-0 z-10 mt-3 w-screen max-w-[16rem] transform",children:(0,l.jsx)("div",{className:"overflow-hidden rounded-xl shadow-xl ring-1 ring-base-content ring-opacity-5 bg-base-100 p-1",children:(0,l.jsxs)("div",{className:"space-y-0.5 text-sm",children:[(0,l.jsxs)("button",{className:"flex items-center gap-2 hover:bg-base-300 duration-200 py-1.5 px-4 w-full rounded-lg font-medium",onClick:u,children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M2.5 4A1.5 1.5 0 001 5.5V6h18v-.5A1.5 1.5 0 0017.5 4h-15zM19 8.5H1v6A1.5 1.5 0 002.5 16h15a1.5 1.5 0 001.5-1.5v-6zM3 13.25a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5a.75.75 0 01-.75-.75zm4.75-.75a.75.75 0 000 1.5h3.5a.75.75 0 000-1.5h-3.5z",clipRule:"evenodd"})}),"Billing"]}),(0,l.jsxs)("button",{className:"flex items-center gap-2 hover:bg-error/20 hover:text-error duration-200 py-1.5 px-4 w-full rounded-lg font-medium",onClick:m,children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M3 4.25A2.25 2.25 0 015.25 2h5.5A2.25 2.25 0 0113 4.25v2a.75.75 0 01-1.5 0v-2a.75.75 0 00-.75-.75h-5.5a.75.75 0 00-.75.75v11.5c0 .414.336.75.75.75h5.5a.75.75 0 00.75-.75v-2a.75.75 0 011.5 0v2A2.25 2.25 0 0110.75 18h-5.5A2.25 2.25 0 013 15.75V4.25z",clipRule:"evenodd"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M6 10a.75.75 0 01.75-.75h9.546l-1.048-.943a.75.75 0 111.004-1.114l2.5 2.25a.75.75 0 010 1.114l-2.5 2.25a.75.75 0 11-1.004-1.114l1.048-.943H6.75A.75.75 0 016 10z",clipRule:"evenodd"})]}),"Logout"]})]})})})})]})}})};var d=a(290),m=a(6046);let u=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"bigjpg.ai";return new Promise((a,l)=>{let n=new window.Image;n.onload=()=>{let e,r;let i=document.createElement("canvas"),o=i.getContext("2d");
1i.width=n.width,i.height=n.height,o.drawImage(n,0,0);let s=Math.max(16,Math.min(48,Math.floor(.03*n.width))),c=Math.floor(.02*Math.min(n.width,n.height));o.font="bold ".concat(s,"px Arial, sans-serif"),o.globalAlpha=.4;let d=o.measureText(t).width;switch(["top-left","top-right","bottom-left","bottom-right"][Math.floor(4*Math.random())]){case"top-left":e=c,r=c+s;break;case"top-right":e=n.width-d-c,r=c+s;break;case"bottom-left":e=c,r=n.height-c;break;case"bottom-right":e=n.width-d-c,r=n.height-c}o.fillStyle="rgba(0, 0, 0, 0.5)",o.fillText(t,e+2,r+2),o.fillStyle="rgba(255, 255, 255, 0.9)",o.fillText(t,e,r),o.globalAlpha=1,i.toBlob(e=>{e?a(e):l(Error("Failed to create watermarked image"))},"image/png")},n.onerror=()=>{l(Error("Failed to load image for watermarking"))},n.src=URL.createObjectURL(e)})};function h(){if("undefined"==typeof document)return 0;let e=document.cookie.match(/(?:^|; )bigjpg_uses=(\d+)/);return e?parseInt(e[1],10):0}let g=void 0!==window.Worker&&void 0!==window.OffscreenCanvas&&void 0!==window.createImageBitmap;async function p(e,t){let{w:a,h:l,actualZoom:n}=function(e,t,a){let l=Math.round(e*a),n=Math.round(t*a),r=a,i=Math.max(l,n);if(i>16384){let e=16384/i;l=Math.round(l*e),n=Math.round(n*e),r=Math.round(a*e*100)/100}return{w:l,h:n,actualZoom:r}}(e.width,e.height,t),r=document.createElement("canvas");r.width=a,r.height=l;let i=r.getContext("2d");return i.imageSmoothingEnabled=!0,i.imageSmoothingQuality="high",i.drawImage(e,0,0,a,l),"function"==typeof e.close&&e.close(),{blob:await new Promise(e=>r.toBlob(e,"image/png")),width:a,height:l,actualZoom:n}}async function x(e){if("function"==typeof window.createImageBitmap)return window.createImageBitmap(e);let t=URL.createObjectURL(e);try{let e=new window.Image;return e.src=t,e.decode?await e.decode():await new Promise((t,a)=>{e.onload=t,e.onerror=a}),e}finally{setTimeout(()=>URL.revokeObjectURL(t),0)}}function f(){let[e,t]=(0,n.useState)(2),[a,i]=(0,n.useState)([]),[o,s]=(0,n.useState)([]),[f,w]=(0,n.useState)(!1),[v,b]=(0,n.useState)([]),[j,y]=(0,n.useState)(null),[N,C]=(0,n.useState)(0),[k,A]=(0,n.use
1State)(!1),[R,M]=(0,n.useState)(!1),I=(0,m.useRouter)(),_=(0,r.createClientComponentClient)();(0,n.useEffect)(()=>{(async()=>{let{data:{session:e}}=await _.auth.getSession();y(e),e&&P(e.user.id)})();let e=new URLSearchParams(window.location.search).get("session_id");if(e&&window.gtag_report_conversion){window.gtag_report_conversion(void 0,e);let t=window.location.pathname;window.history.replaceState({},document.title,t)}},[_,I]);let P=async e=>{try{let{data:t,error:a}=await _.from("profiles").select("has_starter_access").eq("id",e).single();if(a)throw a;A(!!t.has_starter_access)}catch(e){console.error("Error checking premium status:",e)}},E=(e,t)=>{let a=parseFloat(t.target.value),l=2*Math.pow(2,a/10);i(t=>{let l=[...t];return l[e]=a,l}),s(t=>{let a=[...t];return a[e]=Math.round(100*l)/100,a})},S=(0,n.useRef)(null),F=()=>g?(S.current||(S.current=new Worker("/workers/image-resize.worker.js")),S.current):null;(0,n.useEffect)(()=>()=>{S.current&&(S.current.terminate(),S.current=null)},[]);let L=async()=>{if(0===v.length)return;if(!j&&(h()>=3||e>=8)){M(!0);return}w(!0),C(0);let t=F();for(let a=0;a<v.length;a++){let l=v[a],n=k?o[a]:e;try{let e=await x(l),{blob:a,actualZoom:r}=t?await function(e,t,a){return new Promise((l,n)=>{let r=Math.random().toString(36).slice(2),i=t=>{t.data.id===r&&(e.removeEventListener("message",i),t.data.error?n(Error(t.data.error)):l(t.data))};e.addEventListener("message",i),e.postMessage({id:r,bitmap:t,zoom:a},[t])})}(t,e,n):await p(e,n),i=k?a:await u(a),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download="enhanced-image-".concat(r,"x.png"),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(o.href)}catch(e){console.error("Image processing error:",e)}C(Math.round((a+1)/v.length*100))}j||function(){let e=h()+1,t=new Date(Date.now()+2592e6).toUTCString();document.cookie="bigjpg_uses=".concat(e,"; expires=").concat(t,"; path=/")}(),w(!1)};return(0,l.jsxs)("main",{id:"upload-tool",className:"p-8 pb-24",children:[(0,l.jsx)("section",{className:"max-w-xl mx-auto space-y-8",children:(0,l.jsx)(c,{})}),(0,l.jsx)("section",{className:"max-w-7xl mx-auto bg-base-100 flex flex-col lg:flex-row items-center justify-center gap-16 lg:gap-20 px-8 py-8 lg:py-20",children:(0,l.jsxs)("div",{className:"p-8 bg-white rounded-lg shadow-xl max-w-2xl",children:[(0,l.jsx)("h1",{className:"text-3xl font-semibold mb-4 text-center",children:"BigJpg AI - When You Need to Supersize Your Images"}),(0,l.jsx)("p",{className:"mb-4",children:"Are you looking to blow up those small images into high-res wall-hangers? Bigjpg is what you need."}),(0,l.jsxs)("div",{className:"p-8 bg-white rounded-lg shadow-xl",children:[(0,l.jsx)("input",{type:"file",id:"imageInput",className:"block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",accept:"image/*",multiple:k,onChange:e=>{let t=Array.from(e.target.files);b(t),i(Array(t.length).fill(0)),s(Array(t.length).fill(2))}}),k?v.length>0&&v.map((e,t)=>(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:e.name}),(0,l.jsx)("input",{type:"range",min:"0",max:"30",step:"0.1",value:a[t],onChange:e=>E(t,e),className:"w-full"}),(0,l.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,l.jsx)("span",{children:"2x"}),(0,l.jsx)("span",{children:"4x"}),(0,l.jsx)("span",{children:"8x"}),(0,l.jsx)("span",{children:"16x"})]}),(0,l.jsxs)("p",{className:"text-center mt-2",children:["Zoom Factor: ",o[t],"x"]})]},t)):(0,l.jsxs)("select",{id:"zoomFactor",className:"mt-4 block w-full border bg-white rounded px-3 py-2 outline-none",value:e,onChange:e=>{parseFloat(e.target.value);let a=parseFloat(e.target.value);if(a>=8&&!j){M(!0);return}t(a)},children:[(0,l.jsx)("option",{value:"2",children:"2x"}),(0,l.jsx)("option",{value:"4",children:"4x"}),(0,l.jsx)("option",{value:"8",children:"8x"}),(0,l.jsx)("option",{value:"16",children:"16x"})]}),(0,l.jsx)("button",{id:"processButton",className:"mt-4 py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600",onClick:L,disabled:f||0===v.length,children:f?"Processing...":"Enhance and Download Images"}),f&&(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700",children:(0,l.jsx)("div",{className:"bg-blue-600 h-2.5 rounded-full transition-all duration-300",style:{width:"".concat(N,"%")}})}),(0,l.jsxs)("p",{className:"text-center mt-2",children:[N,"%"]})]})]}),(0,l.jsxs)("a",{href:"https://pollo.ai?ref=m2y0ntd",target:"_blank",rel:"noopener noreferrer",className:"mt-3 w-full py-1 px-3 bg-yellow-400 text-black rounded hover:bg-yellow-500 transition-all duration-300 flex items-center justify-center gap-1 text-xs font-medium shadow-xs",children:[(0,l.jsx)("span",{className:"leading-tight",children:"\uD83C\uDF4C AI Generate \xb7 Retouch \xb7 Video — All-in-One. No limits. IYKYK"}),(0,l.jsx)("span",{className:"text-sm",children:"→"})]})]})}),(0,l.jsx)(d.A,{isOpen:R,onClose:()=>M(!1)})]})}},290:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(5155),n=a(6133),r=a(1260),i=a(2115),o=a(9806);a(7153);let s=e=>{let{isOpen:t,onClose:a}=e,s=(0,o.createClientComponentClient)(),[c,d]=(0,i.useState)(!1),m=async()=>{d(!0);try{let e=window.location.origin+"/api/auth/callback";await s.auth.signInWithOAuth({provider:"google",options:{redirectTo:e}})}catch(e){console.error("Login error:",e)}finally{d(!1)}};return(0,l.jsx)(n.e,{appear:!0,show:t,as:i.Fragment,children:(0,l.jsxs)(r.l,{as:"div",className:"relative z-50",onClose:a,children:[(0,l.jsx)(n.e.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,l.jsx)("div",{className:"fixed inset-0 bg-black/50"})}),(0,l.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,l.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,l.jsx)(n.e.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,l.jsxs)(r.l.Panel,{className:"w-full max-w-md transform rounded-2xl bg-base-100 p-8 text-center shadow-xl transition-all",children:[(0,l.jsx)("button",{className:"btn btn-square btn-ghost btn-sm absolute top-4 right-4",onClick:a,children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5",children:(0,l.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)("div",{className:"text-4xl mb-3",children:"\uD83D\uDE80"}),(0,l.jsx)(r.l.Title,{as:"h3",className:"text-xl font-bold",children:"Sign up free to continue"}),(0,l.jsx)("p",{className:"text-base-content/60 mt-2",children:"Get unlimited image upscaling — no credit card required"})]}),(0,l.jsxs)("button",{className:"btn btn-block btn-lg",onClick:m,disabled:c,
1children:[c?(0,l.jsx)("span",{className:"loading loading-spinner loading-xs"}):(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",viewBox:"0 0 48 48",children:[(0,l.jsx)("path",{fill:"#FFC107",d:"M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z"}),(0,l.jsx)("path",{fill:"#FF3D00",d:"m6.306 14.691 6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z"}),(0,l.jsx)("path",{fill:"#4CAF50",d:"M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z"}),(0,l.jsx)("path",{fill:"#1976D2",d:"M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z"})]}),"Continue with Google"]}),(0,l.jsx)("button",{className:"btn btn-ghost btn-sm mt-4 text-base-content/50",onClick:a,children:"Maybe later"})]})})})})]})})}},7153:(e,t,a)=>{a.d(t,{A:()=>i});var l=a(3106),n=a.n(l),r=a(2818);let i={appName:"BigJpg AI",appDescription:"BigJPG AI: The nice image upscaler. It enlarges photos beyond limits, delivering crystal-clear results. Easy-to-use BigJPG creates print-quality enlargements.",domainName:"bigjpg.ai",crisp:{id:"",onlyShowOnRoutes:["/"]},creem:{plans:[{isFeatured:!0,productId:r.env.PRO_MONTHLY_PRODUCT_ID||"",name:"Pro",description:"$14.99/month — most popular, billed monthly",price:14.99,priceAnchor:21.99,features:[{name:"Max 16x image enlargement"},{name:"No watermark"},{name:"Commercial license included"},{name:"Unlimited usage"},{name:"Batch image upscaling"},{name:"24/7 priority email support"}]},{productId:r.env.PRO_YEARLY_PRODUCT_ID||"",name:"Pro Yearly",description:"$79/year — pay once, save $100 vs monthly",price:79,priceAnchor:179,features:[{name:"Everything in Pro"},{name:"Equivalent to $6.58/month (-56%)"},{name:"12 months of unlimited 16x upscaling"},{name:"Commercial license included"}]},{productId:r.env.LIFETIME_PRODUCT_ID||"",name:"Lifetime",description:"$99 one-time — pay once, use forever",price:99,priceAnchor:299,features:[{name:"Everything in Pro, forever"},{name:"One-time payment, no subscription"},{name:"All future updates included"},{name:"Commercial license included"},{name:"Priority email support"}]}]},aws:{bucket:"bucket-name",bucketUrl:"https://bucket-name.s3.amazonaws.com/",cdn:"https://cdn-id.cloudfront.net/"},mailgun:{subdomain:"mg",fromNoReply:"BigJPG.AI <[email protected]>",fromAdmin:"Elke at BigJPG.AI <[email protected]>",supportEmail:"[email protected]",forwardRepliesTo:"[email protected]"},colors:{theme:"light",main:n()["[data-theme=light]"].primary},auth:{loginUrl:"/signin",callbackUrl:"/dashboard"}}},3840:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(2651),n=a(5037),r=a(6046),i=a(7153);let o=l.A.create({baseURL:"/api"});o.interceptors.response.use(function(e){return e.data},function(e){var t,a,l,o;let s="";return(null===(t=e.response)||void 0===t?void 0:t.status)===401?(n.oR.error("Please login"),(0,r.redirect)(i.A.auth.loginUrl)):s=(null===(a=e.response)||void 0===a?void 0:a.status)===403?"Pick a plan to use this feature":(null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(l=o.data)||void 0===l?void 0:l.error)||e.message||e.toString(),e.message="string"==typeof s?s:JSON.stringify(s),console.error(e.message),e.message?n.oR.error(e.message):n.oR.error("something went wrong..."),Promise.reject(e)});let s=o}}]);

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.