PageSourceSearch

https://www.mypicnow.com/_next/static/chunks/8888-1dd3e0a2559f1cfb.js

js mypicnow.com collected 2026-10-07 11:14:08 UTC 22,831 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ed202dcc-2470-41e1-828d-a3bf2bfa02af",e._sentryDebugIdIdentifier="sentry-dbid-ed202dcc-2470-41e1-828d-a3bf2bfa02af")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8888],{88888:(e,t,a)=>{a.r(t),a.d(t,{default:()=>N});var r=a(95155),s=a(88661),o=a.n(s),l=a(12115),n=a(47650),i=a(6132),d=a(5917),c=a(89559),m=a(21786),x=a(65229),g=a(31322),h=a(15239),u=a(36489),b=a(20063),f=a(17530),p=a(94258);let y=(0,l.lazy)(()=>Promise.all([a.e(4029),a.e(4633),a.e(3092),a.e(5549),a.e(1274),a.e(5848),a.e(8861),a.e(5624),a.e(1826),a.e(5147),a.e(4961),a.e(4468)]).then(a.bind(a,24468))),j=e=>{let{onUpload:t,onDrop:a,darkMode:s=!1,compactWidth:n=!1}=e,i=(0,l.useRef)(null),d=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.add(s?"bg-gray-800/50":"bg-gray-100")},[s]),c=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.remove(s?"bg-gray-800/50":"bg-gray-100")},[s]),x=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.remove(s?"bg-gray-800/50":"bg-gray-100"),e.dataTransfer.files&&e.dataTransfer.files.length>0&&a(e.dataTransfer.files)},[a,s]),g=s?"rounded-xl bg-black/30 border border-gray-700/40 shadow-lg overflow-hidden backdrop-blur-sm":"rounded-3xl bg-white border border-gray-200 shadow-lg overflow-hidden",h=s?"p-4 text-center":"p-6 bg-gradient-to-b from-gray-50 to-white text-center",u=s?"text-xl font-semibold text-white mb-1":"text-2xl font-semibold text-gray-800 mb-1",b=s?"text-gray-300 mb-4 text-sm":"text-gray-600 mb-6",f=s?"bg-gray-900/50 border-2 border-dashed border-gray-600 rounded-lg p-4 mb-4 cursor-pointer transition-colors duration-200 hover:bg-gray-800/70 hover:border-gray-500":"bg-gray-50 border-2 border-dashed border-gray-300 rounded-xl p-10 mb-4 cursor-pointer transition-colors duration-200 hover:bg-gray-100 hover:border-gray-400",p=s?"bg-white text-gray-900 font-medium py-2 px-5 rounded-lg mb-2 hover:bg-gray-100 transition-colors":"bg-gray-900 text-white font-medium py-3 px-6 rounded-lg mb-2 hover:bg-gray-800 transition-colors",y=s?"flex items-center justify-center text-xs text-gray-400":"flex items-center justify-center text-sm text-gray-500",j=n?"p-3":s?"p-4":"p-6",w=n?"p-3":s?"p-4":"p-10",v=n?"text-lg":s?"text-xl":"text-2xl",N=n?"py-2 px-4":s?"py-2 px-5":"py-3 px-6";return(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 "+(g||""),children:[(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 "+"".concat(h," ").concat(j),children:[(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 flex items-center justify-center mb-2",children:[(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"".concat(s?"text-white":"text-gray-900"," mr-2"),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jsx-9e21a3595dc11ad0 "+"".concat(n?"h-5 w-5":"h-6 w-6"),children:(0,r.jsx)("path",{d:"M13 2L3 14H12L11 22L21 10H12L13 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"currentColor",fillOpacity:"0.2",className:"jsx-9e21a3595dc11ad0"})})}),(0,r.jsx)("h2",{className:"jsx-9e21a3595dc11ad0 "+"".concat(u," ").concat(v),children:n?"Create Your AI Photos":"Get stunning AI headshots in seconds"})]}),(0,r.jsxs)("p",{className:"jsx-9e21a3595dc11ad0 "+(b||""),children:["Upload your selfie and transform it into"," ",(0,r.jsx)("span",{className:"jsx-9e21a3595dc11ad0 "+"font-medium ".concat(s?"text-white":"text-gray-900"),children:"professional headshots"})," ","instantly"]}),(0,r.jsxs)("div",{onClick:()=>{i.current&&i.current.click()},onDragOver:d,onDragLeave:c,onDrop:x,className:"jsx-9e21a3595dc11ad0 "+"".concat(f," ").concat(w," group"),children:[(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 flex flex-col items-center",children:[(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"".concat(n?"h-10 w-10 mb-2":"h-14 w-14 mb-3"," rounded-full ").concat(s?"bg-gray-800/70":"bg-white"," flex items-center justify-center transition-transform group-hover:scale-110 duration-300"),children:(0,r.jsx)(m.A,{className:"".concat(n?"h-5 w-5":"h-6 w-6"," ").concat(s?"text-white":"text-gray-900")})}),(0,r.jsxs)("button",{className:"jsx-9e21a3595dc11ad0 "+"".concat(p," ").concat(N," transform transition-all duration-300 group-hover:scale-105 group-hover:shadow-md flex items-center"),children:[(0,r.jsx)(m.A,{className:"".concat(n?"h-4 w-4 mr-1":"h-5 w-5 mr-2")}),(0,r.jsx)("span",{className:"jsx-9e21a3595dc11ad0",children:"Upload your photo"}),(0,r.jsx)("span",{className:"jsx-9e21a3595dc11ad0 "+"".concat(n?"text-xs ml-1":"text-sm ml-2"),children:"⚡️"})]}),(0,r.jsx)("p",{className:"jsx-9e21a3595dc11ad0 "+"".concat(s?"text-gray-400":"text-gray-500"," ").concat(n?"text-xs":"text-sm"," mt-2"),children:"or drag & drop your photo here"})]}),(0,r.jsx)("input",{type:"file",accept:"image/*",ref:i,onChange:t,className:"jsx-9e21a3595dc11ad0 hidden"})]}),(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 flex justify-center items-center mt-3 mb-1",children:[(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"h-1.5 w-1.5 rounded-full ".concat(s?"bg-white":"bg-gray-900"," mr-1")}),(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"h-1.5 w-1.5 rounded-full ".concat(s?"bg-gray-700":"bg-gray-300"," mr-1")}),(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"h-1.5 w-1.5 rounded-full ".concat(s?"bg-gray-700":"bg-gray-300")})]}),(0,r.jsx)("div",{className:"jsx-9e21a3595dc11ad0 "+"".concat(y," mt-2"),children:(0,r.jsxs)("div",{className:"jsx-9e21a3595dc11ad0 "+"flex items-center ".concat(s?"bg-gray-800/50":"bg-white"," px-3 py-1 rounded-full shadow-sm"),children:[(0,r.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jsx-9e21a3595dc11ad0 "+"".concat(n?"h-3 w-3 mr-1":"h-4 w-4 mr-2"," ").concat(s?"text-white":"text-gray-900"),children:[(0,r.jsx)("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-9e21a3595dc11ad0"}),(0,r.jsx)("path",{d:"M12 16V12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-9e21a3595dc11ad0"}),(0,r.jsx)("path",{d:"M12 8H12.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-9e21a3595dc11ad0"})]}),(0,r.jsxs)("span",{className:"jsx-9e21a3595dc11ad0 "+((n?"text-xs":"")||""),children:["100% privacy-first & made in Europe",!n&&". Delete your photo after use"]})]})})]}),(0,r.jsx)(o(),{id:"9e21a3595dc11ad0",children:"@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}"})]})},w=e=>{let{progress:t,darkMode:a=!1,compactWidth:s=!1}
1=e,o=Math.min(t,95),l=t>0&&t<100,n=t>5;return(0,r.jsx)("div",{className:a?"rounded-xl bg-black/30 border border-gray-700/40 shadow-lg overflow-hidden backdrop-blur-sm":"rounded-3xl bg-white border border-gray-200 shadow-lg overflow-hidden",children:(0,r.jsxs)("div",{className:"".concat(s?"p-4":"p-8"," text-center"),children:[(0,r.jsx)("h3",{className:"".concat(s?"text-lg":"text-xl"," font-semibold ").concat(a?"text-white":"text-gray-800"," mb-2"),children:t>=100?"Photo Uploaded!":"Uploading & Processing Photo"}),(0,r.jsx)("p",{className:"text-sm mb-6 ".concat(a?"text-gray-300":"text-gray-600"),children:t>=100?"Moving to validation...":"Our AI workers are getting your photo ready"}),(0,r.jsxs)("div",{className:"relative h-20 mb-6 overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute bottom-0 w-full h-4 bg-gradient-to-r from-amber-200 via-amber-300 to-amber-200 rounded-sm",children:(0,r.jsx)("div",{className:"flex h-full",children:Array.from({length:10},(e,a)=>(0,r.jsx)("div",{className:"flex-1 mx-0.5 transition-all duration-500 ".concat(t>(a+1)*10?"bg-gray-700 border border-gray-600":"bg-transparent border border-dashed border-gray-400"),style:{transitionDelay:"".concat(100*a,"ms"),height:t>(a+1)*10?"100%":"40%"}},a))})}),(0,r.jsxs)("div",{className:"absolute bottom-3 transition-all duration-500 ease-out",style:{left:"".concat(o,"%"),transform:"translateX(-50%)"},children:[(0,r.jsxs)("div",{className:"relative w-8 h-12 ".concat(n?"animate-bounce":""),children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-6 h-3 bg-yellow-400 rounded-t-full border-2 border-yellow-500"}),(0,r.jsx)("div",{className:"absolute top-2 left-1/2 transform -translate-x-1/2 w-4 h-4 bg-amber-100 rounded-full border border-amber-200"}),(0,r.jsx)("div",{className:"absolute top-5 left-1/2 transform -translate-x-1/2 w-5 h-6 bg-blue-500 rounded-sm border border-blue-600"}),(0,r.jsx)("div",{className:"absolute top-6 left-0 w-2 h-3 bg-amber-100 rounded-sm border border-amber-200 origin-top ".concat(l?"animate-pulse":"")}),(0,r.jsx)("div",{className:"absolute top-6 right-0 w-2 h-3 bg-amber-100 rounded-sm border border-amber-200 origin-top ".concat(l?"animate-pulse":"")}),(0,r.jsx)("div",{className:"absolute bottom-0 left-1 w-1.5 h-3 bg-blue-600 rounded-sm ".concat(n?"animate-pulse":"")}),(0,r.jsx)("div",{className:"absolute bottom-0 right-1 w-1.5 h-3 bg-blue-600 rounded-sm ".concat(n?"animate-pulse":"")}),l&&(0,r.jsx)("div",{className:"absolute top-4 -right-1 w-3 h-1 bg-amber-700 rounded-sm animate-bounce"})]}),l&&(0,r.jsx)("div",{className:"absolute -top-2 left-1/2 transform -translate-x-1/2",children:Array.from({length:3},(e,t)=>(0,r.jsx)("div",{className:"absolute w-1 h-1 bg-yellow-400 rounded-full animate-ping",style:{left:"".concat((t-1)*8,"px"),animationDelay:"".concat(200*t,"ms")}},t))})]}),(0,r.jsxs)("div",{className:"absolute top-0 right-4 w-6 h-16 opacity-30",children:[(0,r.jsx)("div",{className:"w-1 h-12 bg-gray-600 mx-auto"}),(0,r.jsx)("div",{className:"w-6 h-1 bg-gray-600"}),(0,r.jsx)("div",{className:"w-2 h-2 bg-yellow-500 transition-all duration-500",style:{transform:"translateY(".concat(12-t/100*8,"px)")}})]})]}),(0,r.jsxs)("div",{className:"text-center mb-4",children:[(0,r.jsxs)("div",{className:"text-2xl font-bold mb-1 ".concat(a?"text-white":"text-gray-800"),children:[Math.round(t),"%"]}),(0,r.jsxs)("div",{className:"text-xs ".concat(a?"text-gray-400":"text-gray-500"),children:[t<30&&"Compressing images...",t>=30&&t<70&&"Uploading to secure servers...",t>=70&&t<95&&"Preparing for AI analysis...",t>=95&&t<100&&"Almost done!",t>=100&&"Upload complete! \uD83C\uDF89"]})]}),l&&(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)("span",{className:"text-xs animate-pulse ".concat(a?"text-yellow-400":"text-yellow-600"),children:"\uD83D\uDD28 *building sounds* \uD83C\uDFD7️"})}),(0,r.jsx)("div",{className:"w-full ".concat(a?"bg-gray-700":"bg-gray-200"," rounded-full h-2 opacity-50"),children:(0,r.jsx)("div",{className:"bg-gradient-to-r from-blue-500 to-white h-2 rounded-full transition-all duration-300",style:{width:"".concat(t,"%")}})})]})})},v=e=>{let{photos:t,onRemovePhoto:a,onAddMore:s,isDetecting:o,darkMode:l=!1,compactWidth:n=!1,onGenerateClick:g}
1=e,u=l?"border-gray-700":"border-gray-200",b=l?"text-gray-400":"text-gray-500",f=n?"h-28":"h-40",p=n?"px-4 py-2 text-sm":"px-6 py-3";return(0,r.jsx)("div",{className:l?"rounded-xl bg-black/30 border border-gray-700/40 shadow-lg overflow-hidden backdrop-blur-sm":"rounded-3xl bg-white border border-gray-200 shadow-lg overflow-hidden",children:(0,r.jsxs)("div",{className:n?"p-4":"p-6",children:[(0,r.jsx)("h2",{className:"".concat(l?"text-xl font-semibold text-white mb-4":"text-2xl font-semibold text-gray-800 mb-4"," ").concat(n?"text-lg":l?"text-xl":"text-2xl"),children:"Your photo"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 ".concat(n?"grid-cols-2":"sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"," gap-4 mb-6"),children:[t.map(e=>(0,r.jsxs)("div",{className:"relative rounded-lg overflow-hidden border ".concat(u),children:[(0,r.jsx)("div",{className:"relative w-full ".concat(f),children:(0,r.jsx)(h.default,{src:e.preview||"/placeholder.svg",alt:"Uploaded",className:"object-cover",fill:!0,sizes:"(max-width: 768px) 100vw, 300px"})}),(0,r.jsx)("button",{className:"absolute top-2 right-2 bg-black/50 rounded-full p-1 text-white hover:bg-black/70",onClick:()=>a(e.id),children:(0,r.jsx)(x.A,{className:"h-4 w-4"})}),"validating"===e.status&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-blue-500 text-white text-xs p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(c.A,{className:"h-4 w-4 mr-1 animate-spin"}),(0,r.jsx)("span",{children:"Detecting faces..."})]})}),"invalid"===e.status&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-red-500 text-white text-xs p-2",children:(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)(i.A,{className:"h-4 w-4 mr-1 flex-shrink-0 mt-0.5"}),(0,r.jsx)("span",{children:e.message})]})}),"warning"===e.status&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-yellow-500 text-white text-xs p-2",children:(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)(i.A,{className:"h-4 w-4 mr-1 flex-shrink-0 mt-0.5"}),(0,r.jsx)("span",{children:e.message})]})}),"valid"===e.status&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-green-500 text-white text-xs p-2",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(d.A,{className:"h-4 w-4 mr-1"}),(0,r.jsx)("span",{children:"Photo looks good!"})]})})]},e.id)),0===t.length&&(0,r.jsxs)("div",{className:"border-2 border-dashed ".concat(l?"border-gray-600":"border-gray-300"," rounded-lg flex flex-col items-center justify-center p-4 cursor-pointer ").concat(l?"hover:bg-gray-800/50":"hover:bg-gray-50"," transition-colors ").concat(f),onClick:s,children:[(0,r.jsx)("div",{className:"".concat(n?"h-8 w-8":"h-10 w-10"," rounded-full ").concat(l?"bg-gray-800":"bg-gray-100"," flex items-center justify-center mb-2"),children:(0,r.jsx)(m.A,{className:"".concat(n?"h-4 w-4":"h-5 w-5"," ").concat(b)})}),(0,r.jsx)("span",{className:"".concat(b," ").concat(n?"text-xs":"text-sm"," text-center"),children:"Choose a different photo"})]})]}),(0,r.jsxs)("div",{className:"text-center",children:[o?(0,r.jsxs)("p",{className:"text-blue-".concat(l?"400":"600"," mb-2 flex items-center justify-center ").concat(n?"text-sm":""),children:[(0,r.jsx)(c.A,{className:"".concat(n?"h-3 w-3 mr-1":"h-4 w-4 mr-2"," animate-spin")}),"Analyzing your photo for optimal quality..."]}):(0,r.jsx)("p",{className:"".concat(l?"text-gray-300":"text-gray-600"," mb-2 ").concat(n?"text-sm":""),children:0===t.filter(e=>"valid"===e.status||"validating"===e.status).length?"Please upload a valid photo to continue":"Almost there! Get your headshots in one click"}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row justify-center gap-4",children:[!n&&(0,r.jsx)("button",{className:"".concat(l?"border border-gray-600 bg-gray-800/50 text-gray-300 px-6 py-3 rounded-full hover:bg-gray-700/50 transition-colors":"border border-gray-300 bg-white text-gray-700 px-6 py-3 rounded-full hover:bg-gray-50 transition-colors"," ").concat(p),children:"Guide to choosing your photo"}),(0,r.jsx)("button",{className:"".concat((e=>l?"px-8 py-3 rounded-full font-medium ".concat(e?"bg-white text-gray-900 hover:bg-gray-100":"bg-gray-700/50 text-gray-400 cursor-not-allowed"," transition-colors"):"px-8 py-3 rounded-full font-medium ".concat(e?"bg-red-500 text-white hover:bg-red-600":"bg-gray-300 text-gray-500 cursor-not-allowed"," transition-colors"))(t.filter(e=>"valid"===e.status||"validating"===e.status).length>0&&!o)," ").concat(p),disabled:0===t.filter(e=>"valid"===e.status||"validating"===e.status).length||o,onClick:g,children:"Generate Headsh
1ots"})]})]})]})})},N=e=>{let{darkMode:t=!1,compactWidth:a=!1}=e,{data:s,status:o}=(0,u.useSession)();(0,b.useRouter)();let{token:d}=(0,f.G)(),[c,m]=(0,l.useState)("initial"),[x,h]=(0,l.useState)([]),[N,k]=(0,l.useState)(0),[C,P]=(0,l.useState)({}),[S,D]=(0,l.useState)("pro"),[A,L]=(0,l.useState)(!1),[_,I]=(0,l.useState)(!1),[U,R]=(0,l.useState)(""),[E]=(0,l.useState)(()=>"guest_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9))),M=async e=>{let t=Array.from(e).slice(0,1),a=[],r=(await Promise.all(t.map(async(e,t)=>{try{if(e.name.toLowerCase().endsWith(".heic")||"image/heic"===e.type||"image/heif"===e.type)return P(t=>({...t,[e.name]:"HEIC files are not supported. Please convert to JPG or PNG format and try again."})),null;return{file:await T(e),originalFile:e,index:t}}catch(t){return P(t=>({...t,[e.name]:"Failed to process image. Please try again."})),null}}))).filter(Boolean);if(0===r.length)return void m("initial");r.forEach(e=>{let{originalFile:t,index:r}=e;a.push({id:Math.random().toString(36).substring(2),file:t,preview:URL.createObjectURL(t),status:"validating"})}),m("validation"),h([...a]),L(!0),setTimeout(()=>{h(e=>e.map(e=>({...e,status:"valid",message:"Photo looks great!"}))),L(!1)},3e3);let s=r.length,o=0;for(let e=0;e<r.length;e+=3){let t=r.slice(e,e+3).map(async(t,a)=>{let{file:r,originalFile:l}=t,n=e+a;try{let e=new FormData;e.append("file",r);let t=new AbortController,a=setTimeout(()=>t.abort(),3e4),l=await fetch("/api/upload",{method:"POST",body:e,signal:t.signal});if(clearTimeout(a),!l.ok)throw Error("Upload failed with status ".concat(l.status));let i=await l.json();o++;let d=Math.round(o/s*100);k(d),h(e=>{let t=[...e];return t[n]&&(t[n]={...t[n],s3Url:i.url,status:"validating"}),t})}catch(e){console.error("Upload error:",e),k(Math.round(++o/s*100)),P(t=>({...t,[l.name]:e instanceof Error?e.message:"Upload failed"})),h(e=>{let t=[...e];return t[n]&&(t[n]={...t[n],status:"invalid",message:"Upload failed"}),t})}});await Promise.all(t)}},T=async e=>new Promise(t=>{if(e.size<512e3)return void t(e);let a=document.createElement("canvas"),r=a.getContext("2d");if(!r)return void t(e);let s=document.createElement("img"),o=URL.createObjectURL(e);s.onload=()=>{try{let l=s.width,n=s.height;(l>1920||n>1920)&&(l>n?(n=1920*n/l,l=1920):(l=1920*l/n,n=1920)),a.width=l,a.height=n,r.drawImage(s,0,0,l,n),URL.revokeObjectURL(o),a.toBlob(a=>{if(a&&a.size<e.size){let r=new File([a],e.name,{type:"image/jpeg",lastModified:Date.now()});t(r)}else t(e)},"image/jpeg",.85)}catch(a){console.error("Compression error:",a),URL.revokeObjectURL(o),t(e)}},s.onerror=()=>{URL.revokeObjectURL(o),t(e)},s.src=o}),O=async()=>{try{if(!d)return void alert("Security token missing. Please refresh the page and try again.");let e={plan:S,isAnnual:!1,affiliateRef:(0,p.getAffiliateRef)()||""};if("authenticated"!==o){if(!U)return void alert("Please enter your email address");e.email=U,e.guestSessionId=E}let t=await fetch("/api/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":d},body:JSON.stringify(e)});if(!t.ok)throw Error("Failed to create checkout session");let{url:a}=await t.json();a&&(window.location.href=a)}catch(e){console.error("Error creating checkout session:",e),alert("Failed to start checkout process. Please try again.")}},F="w-full ".concat(a?"max-w-sm":"max-w-4xl"," mx-auto ").concat(t?"":"bg-gradient-to-b from-blue-50 to-white py-12");return(0,r.jsxs)("div",{className:F,children:[(0,r.jsxs)(g.Ny,{mode:"wait",children:["initial"===c&&(0,r.jsx)(g.PY.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"w-full",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{onUpload:e=>{let t=e.target.files;t&&t.length&&(P({}),k(0),m("uploading"),M(t))},onDrop:e=>{P({}),k(0),m("uploading"),M(e)},darkMode:t,compactWidth:a}),Object.keys(C).length>0&&(0,r.jsx)("div",{className:"mt-4 p-3 rounded-lg ".concat(t?"bg-red-900/20":"bg-red-50"," ").concat(t?"border border-red-800/30":"border border-red-200"),children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(i.A,{className:"h-5 w-5 ".concat(t?"text-red-400":"text-red-500"," mr-2 flex-shrink-0")}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium ".concat(t?"text-red-300":"text-red-800"),children:1===Object.keys(C).length?"1 file couldn't be uploaded":"".concat(Object.keys(C).length," files couldn't be uploaded")}),(0,r.jsx)("div",{className:"mt-1 text-xs ".concat(t?"text-red-300/80":"text-red-700"),children:(0,r.jsx)("ul",{className:"list-disc list-inside",children:Object.entries(C).map(e=>{let[t,a]=e;return(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:"font-medium",children:t.length>25?t.substring(0,22)+"...":t}),": ",a]},t)})})})]})]})})]})},"upload"),"uploading"===c&&(0,r.jsx)(g.PY.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"w-full",children:(0,r.jsx)(w,{progress:N,darkMode:t,compactWidth:a})},"uploading"),"validation"===c&&(0,r.jsx)(g.PY.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:(0,r.jsx)(v,{photos:x,onRemovePhoto:e=>h(t=>t.filter(t=>t.id!==e)),onAddMore:()=>m("initial"),isDetecting:A,darkMode:t,compactWidth:a,onGenerateClick:()=>{I(!0),"undefined"!=typeof document&&(document.body.style.overflow="hidden")}})},"validation")]}),_&&"undefined"!=typeof document&&(0,n.createPortal)((0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center",children:(0,r.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-white border-t-transparent rounded-full"})}),children:(0,r.jsx)(y,{photos:x.filter(e=>"valid"===e.status),selectedPlan:S,onSelectPlan:D,onGenerate:O,onClose:()=>{I(!1),"undefined"!=typeof document&&(document.body.style.overflow="")},customerExamples:["/phone-example.webp","/phone-example1.webp"],isAuthenticated:"authenticated"===o,guestEmail:U,onEmailChange:R,canProceed:"authenticated"===o||!!U,_csrfToken:d})}),document.body)]})}},94258:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o,getAffiliateRef:()=>l,getAffiliateReferrer:()=>n});var r=a(12115),s=a(20063);function o(){let e=(0,s.useSearchParams)();return(0,r.useEffect)(()=>{if(!e)return;let t=e.get("ref");if(t){let e=localStorage.getItem("affiliate_ref"),a=localStorage.getItem("affiliate_ref_expiry"),r=a&&Date.now()>parseInt(a,10);if(!e||r){let e=Date.now()+7776e6;localStorage.setItem("affiliate_ref",t),localStorage.setItem("affiliate_ref_expiry",String(e)),localStorage.setItem("affiliate_referrer",document.referrer||"direct")}}},[e]),null}function l(){let e=localStorage.getItem("affiliate_ref"),t=localStorage.getItem("affiliate_ref_expiry");return e&&t?Date.now()>parseInt(t,10)?(localStorage.removeItem("affiliate_ref"),localStorage.removeItem("affiliate_ref_expiry"),null):e:null}function n(){return localStorage.getItem("affiliate_referrer")}}}]);

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.