1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[460],{924:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/detect-watermark",function(){return a(3090)}])},3090:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>v});var r=a(7876),s=a(4232),l=a(7328),n=a.n(l),i=a(8230),c=a.n(i);let d=["image/jpeg","image/png","image/webp"];function o(){return(0,r.jsx)("svg",{className:"mx-auto h-16 w-16 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function m(e){let{onFile:t,error:a}=e,[l,n]=(0,s.useState)(!1),i=(0,s.useCallback)(e=>{e.preventDefault(),n(!1);let a=e.dataTransfer.files[0];a&&t(a)},[t]),c=(0,s.useCallback)(e=>{e.preventDefault(),n(!0)},[]),m=(0,s.useCallback)(()=>{n(!1)},[]),x=(0,s.useCallback)(e=>{var a;let r=null==(a=e.target.files)?void 0:a[0];r&&t(r)},[t]);return(0,r.jsxs)("label",{htmlFor:"image-upload",onDrop:i,onDragOver:c,onDragLeave:m,className:"\n block cursor-pointer rounded-20 border-2 border-dashed p-12 text-center\n transition-all duration-200\n ".concat(l?"border-accent bg-accent/10":"border-gray-400 hover:border-accent hover:bg-gray-450/50","\n "),children:[(0,r.jsx)("input",{id:"image-upload",type:"file",accept:d.join(","),onChange:x,className:"hidden"}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(o,{})}),(0,r.jsx)("p",{className:"mb-2 text-xl font-medium",children:l?"Drop your image here":"Upload an image"}),(0,r.jsxs)("p",{className:"text-sm text-gray-400",children:["Drag & drop or click to browse (max ",30,"MB)"]}),a&&(0,r.jsx)("p",{className:"mt-4 text-sm text-accent",children:a})]})}function x(e){let{className:t}=e;return(0,r.jsx)("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}function u(){return(0,r.jsx)("svg",{className:"h-8 w-8 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}function h(e){let{result:t}=e;return t.isAiGenerated?(0,r.jsxs)("div",{className:"mb-8 rounded-20 border border-accent/30 bg-gradient-to-br from-accent/20 to-purple/20 p-8",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-accent/20",children:(0,r.jsx)(x,{className:"h-8 w-8 text-accent"})})}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-accent",children:"⨠AI Generated"})]}):t.visibleWatermarkDetected?(0,r.jsxs)("div",{className:"border-blue-500/30 from-blue-500/20 to-blue-700/20 mb-8 rounded-20 border bg-gradient-to-br p-8",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)("div",{className:"bg-blue-500/20 mx-auto flex h-16 w-16 items-center justify-center rounded-full",children:(0,r.jsx)(x,{className:"text-blue-400 h-8 w-8"})})}),(0,r.jsx)("h2",{className:"text-blue-400 text-2xl font-bold",children:"⨠AI Generated (Visible Watermark)"})]}):(0,r.jsxs)("div",{className:"mb-8 rounded-20 border border-gray-400 bg-gray-450 p-8",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-gray-400/20",children:(0,r.jsx)(u,{})})}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-white",children:"Not AI Generated"})]})}function b(){return(0,r.jsx)("div",{className:"border-3 mx-auto mb-3 h-10 w-10 animate-spin rounded-full border-accent border-t-transparent"})}function g(e){let{previewUrl:t,state:a}=e;
1return(0,r.jsxs)("div",{className:"relative mb-8 inline-block",children:[(0,r.jsx)("img",{src:t,alt:"Uploaded preview",className:"max-h-64 rounded-20 shadow-lg"}),("uploading"===a||"detecting"===a)&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-20 bg-black/60",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)(b,{}),(0,r.jsx)("p",{className:"text-sm",children:"uploading"===a?"Uploading...":"Analyzing..."})]})})]})}let j=["Upload any image you want to verify","Our AI scans for invisible watermarks","Get instant results on AI origin"];function p(){return(0,r.jsxs)("div",{className:"mx-auto mt-16 max-w-2xl",children:[(0,r.jsx)("h3",{className:"mb-4 text-center text-xl font-bold",children:"How it works"}),(0,r.jsx)("div",{className:"grid gap-6 text-center md:grid-cols-3",children:j.map((e,t)=>{let a=t+1;return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-purple/20 font-bold text-purple",children:a}),(0,r.jsx)("p",{className:"text-sm text-gray-300",children:e})]},a)})})]})}let f=["image/jpeg","image/png","image/webp"];function v(){let[e,t]=(0,s.useState)("idle"),[a,l]=(0,s.useState)(null),[i,d]=(0,s.useState)(null),[o,x]=(0,s.useState)(null);(0,s.useEffect)(()=>()=>{o&&URL.revokeObjectURL(o)},[o]);let u=(0,s.useCallback)(async e=>{if(!f.includes(e.type))return void d("Please upload a JPEG, PNG, or WebP image");if(e.size>0x1e00000)return void d("File size exceeds ".concat(30,"MB limit"));x(URL.createObjectURL(e)),t("uploading"),d(null),l(null);try{let a=await new Promise((t,a)=>{let r=new FileReader;r.onload=e=>{var a;return t(null==(a=e.target)?void 0:a.result)},r.onerror=a,r.readAsDataURL(e)});t("detecting");let r=await fetch("/api/detect-watermark",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageBase64:a})}),s=await r.json();if(!r.ok)throw Error(s.error||"Detection failed");l(s),t("success")}catch(e){d(e instanceof Error?e.message:"Something went wrong"),t("error")}},[]),b=(0,s.useCallback)(()=>{o&&URL.revokeObjectURL(o),t("idle"),l(null),d(null),x(null)},[o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:"Detect AI Watermark | Remini"}),(0,r.jsx)("meta",{name:"description",content:"Check if an image was generated by Remini AI"})]}),(0,r.jsxs)("div",{className:"min-h-screen bg-black font-Euclid text-white",children:[(0,r.jsx)("header",{className:"border-b border-gray-450 py-4",children:(0,r.jsxs)("div",{className:"mx-auto flex max-w-6xl items-center justify-between px-6",children:[(0,r.jsx)(c(),{href:"/",className:"text-2xl font-bold tracking-tight",children:"Remini"}),(0,r.jsx)("span",{className:"text-sm text-gray-300",children:"AI Watermark Detection"})]})}),(0,r.jsxs)("main",{className:"mx-auto max-w-4xl px-6 py-16",children:[(0,r.jsxs)("div",{className:"mb-12 text-center",children:[(0,r.jsxs)("h1",{className:"mb-4 text-4xl font-bold tracking-tight md:text-5xl",children:["Detect AI ",(0,r.jsx)("span",{className:"text-accent",children:"Watermark"})]}),(0,r.jsx)("p",{className:"mx-auto max-w-2xl text-lg text-gray-300",children:"Upload an image to check if it contains a Remini AI invisible watermark."})]}),(0,r.jsx)("div",{className:"mx-auto max-w-xl",children:"idle"===e||"error"===e?(0,r.jsx)(m,{onFile:u,error:i}):(0,r.jsxs)("div",{className:"text-center",children:[o&&(0,r.jsx)(g,{previewUrl:o,state:e}),"success"===e&&a&&(0,r.jsx)(h,{result:a}),"success"===e&&(0,r.jsx)("button",{type:"button",onClick:b,className:"rounded-full bg-accent px-8 py-3 font-medium text-white transition-colors hover:bg-accent/90",children:"Check Another Image"})]})}),(0,r.jsx)(p,{})]}),(0,r.jsx)("footer",{className:"mt-16 border-t border-gray-450 py-6",children:(0,r.jsxs)("div",{className:"mx-auto max-w-6xl px-6 text-center text-sm text-gray-400",children:["\xa9 ",new Date().getFullYear()," AI Creativity S.r.l. All rights reserved."]})})]})]})}},7328:(e,t,a)=>{e.exports=a(9269)}},e=>{e.O(0,[636,593,792],()=>e(e.s=924)),_N_E=e.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.