(()=>{var e={};e.id=6534,e.ids=[6534],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},96649:(e,s,t)=>{"use strict";t.r(s),t.d(s,{GlobalError:()=>o.a,__next_app__:()=>m,originalPathname:()=>p,pages:()=>c,routeModule:()=>x,tree:()=>d}),t(65133),t(84500),t(49356),t(91884),t(90996);var r=t(30170),a=t(45002),l=t(83876),o=t.n(l),n=t(66299),i={};for(let e in n)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(i[e]=()=>n[e]);t.d(s,i);let d=["",{children:["test-upload",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.bind(t,65133)),"c:\\xampp\\htdocs\\propmaster.io\\src\\app\\test-upload\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,84500)),"c:\\xampp\\htdocs\\propmaster.io\\src\\app\\layout.tsx"],error:[()=>Promise.resolve().then(t.bind(t,49356)),"c:\\xampp\\htdocs\\propmaster.io\\src\\app\\error.tsx"],loading:[()=>Promise.resolve().then(t.bind(t,91884)),"c:\\xampp\\htdocs\\propmaster.io\\src\\app\\loading.tsx"],"not-found":[()=>Promise.resolve().then(t.t.bind(t,90996,23)),"next/dist/client/components/not-found-error"]}],c=["c:\\xampp\\htdocs\\propmaster.io\\src\\app\\test-upload\\page.tsx"],p="/test-upload/page",m={require:t,loadChunk:()=>Promise.resolve()},x=new r.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/test-upload/page",pathname:"/test-upload",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},52841:(e,s,t)=>{Promise.resolve().then(t.bind(t,54079))},54079:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>l});var r=t(97247),a=t(28964);function l(){let[e,s]=(0,a.useState)(null),[t,l]=(0,a.useState)(null),[o,n]=(0,a.useState)(!1),i=async()=>{if(e){n(!0);try{let s=new FormData;s.append("file",e);let t=await fetch("/api/test-upload",{method:"POST",body:s}),r=await t.json();l(r),r.success?alert("File uploaded successfully! Check the result below."):alert("Upload failed: "+r.error)}catch(e){console.error("Upload error:",e),alert("Upload failed")}finally{n(!1)}}};return r.jsx("div",{className:"min-h-screen bg-gradient-bg-light p-8",children:(0,r.jsxs)("div",{className:"max-w-2xl mx-auto",children:[r.jsx("h1",{className:"text-3xl font-bold mb-8 text-center",children:"File Upload Test"}),(0,r.jsxs)("div",{className:"card-primary mb-8",children:[r.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Upload Agreement Document"}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[r.jsx("label",{className:"block text-sm font-medium mb-2",children:"Select File"}),r.jsx("input",{type:"file",onChange:e=>{let t=e.target.files?.[0];t&&s(t)},accept:".pdf,.doc,.docx,.txt",className:"w-full p-2 border border-gray-300 rounded-lg"})]}),e&&(0,r.jsxs)("div",{className:"text-sm text-gray-600",children:["Selected: ",e.name," (",(e.size/1024).toFixed(1)," KB)"]}),r.jsx("button",{onClick:i,disabled:!e||o,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Uploading...":"Upload File"})]})]}),t&&(0,r.jsxs)("div",{className:"card-primary",children:[r.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Upload Result"}),r.jsx("pre",{className:"bg-gray-100 p-4 rounded-lg text-sm overflow-auto",children:JSON.stringify(t,null,2)}),t.success&&t.file&&(0,r.jsxs)("div",{className:"mt-4",children:[r.jsx("p",{className:"text-green-600 font-medium mb-2",children:"✅ File uploaded successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-gray-600 mb-2",children:["File URL: ",t.file.url]}),r.jsx("a",{href:t.file.url,target:"_blank",rel:"noopener noreferrer",className:"btn-secondary text-sm",children:"View Uploaded File"})]})]}),(0,r.jsxs)("div",{className:"card-primary mt-8",children:[r.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Test Existing Agreement Documents"}),(0,r.jsxs)("div",{className:"space-y-2",children:[r.jsx("a",{href:"/uploads/agreements/sample-john-smith-agreement.txt",target:"_blank",rel:"noopener noreferrer",className:"block btn-secondary text-sm",children:"View John Smith's Agreement"}),r.jsx("a",{href:"/uploads/agreements/sample-sarah-johnson-agreement.txt",target:"_blank",rel:"noopener noreferrer",className:"block btn-secondary text-sm",children:"View Sarah Johnson's Agreement"})]})]})]})})}},65133:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>r});let r=(0,t(45347).createProxy)(String.raw`c:\xampp\htdocs\propmaster.io\src\app\test-upload\page.tsx#default`)}};var s=require("../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),r=s.X(0,[7787,7549,125],()=>t(96649));module.exports=r})();