T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/3525-c206b1478e254e5a.js
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3525],{6916:(e,a,l)=>{l.d(a,{A:()=>d});var t=l(37876),s=l(14232);l(74750),l(95532);let n=["text/plain","text/markdown","text/csv","application/json","text/x-log","text/x-yaml","text/yaml","text/xml","application/xml","text/html","text/css","text/javascript","application/javascript","application/typescript","text/typescript"],r=[".txt",".md",".csv",".log",".json",".ts",".js",".css",".html",".xml",".yaml",".yml"],i=e=>{let{url:a,type:l,name:i,status:d,onApprove:o,onReject:c,onDelete:m,isAdmin:u}=e,[x,h]=(0,s.useState)(null),[b,v]=(0,s.useState)(!1),[p,g]=(0,s.useState)(null),f=()=>{let e=i?i.slice(i.lastIndexOf(".")).toLowerCase():"";return n.includes(l)||r.includes(e)};return((0,s.useEffect)(()=>{f()&&(v(!0),g(null),fetch(a).then(e=>{if(!e.ok)throw Error("Failed to fetch file");return e.text()}).then(h).catch(e=>g(e.message)).finally(()=>v(!1)))},[a,l,i]),f())?b?(0,t.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Loading preview..."}):p?(0,t.jsxs)("div",{className:"p-8 text-center text-red-600",children:["Failed to load file: ",p]}):(0,t.jsx)("div",{className:"p-4 max-h-[70vh] overflow-auto bg-gray-900 text-gray-100 rounded-lg shadow-inner border border-gray-300 text-left",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm font-mono",children:x})}):(0,t.jsxs)("div",{className:"p-8 text-center text-red-600 font-bold",children:["PDF viewing is temporarily disabled for stability. Please contact the admin if you need this feature re-enabled.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"block mt-2 text-gray-500",children:"Preview not available for this file type."}),u&&(0,t.jsxs)("div",{className:"mt-4 text-sm",children:["Admin mode: ",i]})]})},d=e=>(0,t.jsx)(i,{...e})},83525:(e,a,l)=>{l.d(a,{A:()=>u});var t=l(37876),s=l(14232),n=l(89099),r=l(10553),i=l(6916),d=l(39149),o=l.n(d),c=l(70186),m=l.n(c);let u=e=>{let{onSuccess:a,initialData:l,isEditing:d=!1,onSave:c,isAdmin:u=!1,mode:x="user",initialValues:h,isFrench:b=!1,initialLocale:v,isMobile:p=!1,preSelectedCaseId:g,selectedCase:f}=e,y=(0,n.useRouter)(),{data:N}=(0,r.useSession)(),[j,w]=(0,s.useState)(""),[C,k]=(0,s.useState)(()=>{let e={firstName:"",lastName:"",email:"",phone:"",birthDate:"",detaineeInfo:{name:"",facility:"",inmateId:""},relationship:"",preferredLanguage:v||"en",preferredContactMethod:"email",gender:"",address:{street:"",city:"",state:"",postalCode:"",country:"CA"},detaineeIncarcerationDates:"",detaineeExpectedReleaseDates:"",previousLegalActions:"",reasonForJoining:"",howDidYouHearAboutUs:"",representation:"",urgentNeeds:"",additionalNotes:"",lawyerName:"",lawyerEmail:"",lawyerPhone:"",lawFirm:"",status:"PENDING",caseId:g||""};if(l){var a,t,s;let n={...l,birthDate:l.birthDate?new Date(l.birthDate).toISOString().split("T")[0]:"",detaineeIncarcerationDates:(null==(a=l.detaineeInfo)?void 0:a.incarcerationDate)?new Date(l.detaineeInfo.incarcerationDate).toISOString().split("T")[0]:"",detaineeExpectedReleaseDates:(null==(t=l.detaineeInfo)?void 0:t.expectedReleaseDate)?new Date(l.detaineeInfo.expectedReleaseDate).toISOString().split("T")[0]:""},r=null==(s=n.address)?void 0:s.country;return"Canada"===r&&(r="CA"),"United States"===r&&(r="US"),r||(r="CA"),{...e,...n,address:{...e.address,...n.address||{},country:r},detaineeInfo:{...e.detaineeInfo,...n.detaineeInfo||{}}}}return e}),[S,I]=(0,s.useState)(!1),[D,A]=(0,s.useState)(""),[L,E]=(0,s.useState)(p);(0,s.useEffect)(()=>{let e=()=>{E(p||window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[p]);let[R,P]=(0,s.useState)("CA"),M=(0,s.useMemo)(()=>[{value:"",label:"S\xe9lectionner"},{value:"amos",label:"\xc9tablissement de d\xe9tention d'Amos"},{value:"baie-comeau",label:"\xc9tablissement de d\xe9tention de Baie-Comeau"},{value:"bordeaux",label:"\xc9tablissement de d\xe9tention de Montr\xe9al (Bordeaux)"},{value:"cowansville",label:"\xc9tablissement de d\xe9tention de Cowansville"},{value:"drummondville",label:"\xc9tablissement de d\xe9tention de Drummondville"},{value:"hull",label:"\xc9tablissement de d\xe9tention de Hull"},{value:"leclerc",label:"\xc9tablissement de d\xe9tention de Laval (Leclerc)"},{value:"new-carlisle",label:"\xc9tablissement de d\xe9tention de New Carlisle"},{value:"perce",label:"\xc9tablissement de d\xe9tention de Perc\xe9"},{value:"quebec",label:"\xc9tablissement de d\xe9tention de Qu\xe9bec"},{value:"rimouski",label:"\xc9tablissement de d\xe9tention de Rimouski"},{value:"roberval",label:"\xc9tablissement de d\xe9tention de Roberval"},{value:"saint-jerome",label:"\xc9tablissement de d\xe9tention de Saint-J\xe9r\xf4me"},{value:"sept-iles",label:"\xc9tablissement de d\xe9tention de Sept-\xceles"},{value:"sherbrooke",label:"\xc9tablissement de d\xe9tention de Sherbrooke"},{value:"sorel-tracy",label:"\xc9tablissement de d\xe9tention de Sorel-Tracy"},{value:"trois-rivieres",label:"\xc9tablissement de d\xe9tention de Trois-Rivi\xe8res"},{value:"other",label:"Autre \xe9tablissement"}],[]),[T,U]=(0,s.useState)([]),[F,O]=(0,s.useState)([]),[q,H]=(0,s.useState)(null),Y=(0,s.useRef)(null),[J,B]=(0,s.useState)(!1),[W,_]=(0,s.useState)(!1),V=!!(h&&h.id),K=o()(async e=>{if(V){B(!0),_(!1);try{let a=u?"/api/admin/registrations/".concat(h.id):"/api/user/registrations/".concat(h.id);await fetch(a,{method:u?"PATCH":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),_(!0),H(new Date)}catch(e){}finally{B(!1)}}},1e3);(0,s.useEffect)(()=>{let e=T.map(e=>({file:e,url:URL.createObjectURL(e)}));return O(e),()=>{e.forEach(e=>URL.revokeObjectURL(e.url))}},[T]),(0,s.useEffect)(()=>{(async()=>{let e=await (0,r.getCsrfToken)();e&&w(e)})()},[]),(0,s.useEffect)(()=>{if(h&&h.id&&!S)return Y.current&&clearTimeout(Y.current),Y.current=setTimeout(async()=>{try{I(!0);let e={firstName:C.firstName,lastName:C.lastName,email:C.email,phone:C.phone,birthDate:new Date(C.birthDate).toISOString(),gender:C.gender,relationship:C.relationship,preferredLanguage:C.preferredLanguage,preferredContactMethod:C.preferredContactMethod,message:C.additionalNotes,additionalNotes:C.additionalNotes,previousLegalActions:C.previousLegalActions,reasonForJoining:C.reasonForJoining,howDidYouHearAboutUs:C.howDidYouHearAboutUs,representation:C.representation,urgentNeeds:C.urgentNeeds,address:{street:C.address.street||"",city:C.address.city||"",state:C.address.state||"",postalCode:C.address.postalCode||"",country:C.address.country||""},detaineeInfo:{name:C.detaineeInfo.name||"",facility:C.detaineeInfo.facility||"",inmateId:C.detaineeInfo.inmateId||"",incarcerationDate:C.detaineeIncarcerationDates?new Date(C.detaineeIncarcerationDates).toISOString():void 0,expectedReleaseDate:C.detaineeExpectedReleaseDates?new Date(C.detaineeExpectedReleaseDates).toISOString():null},lawyerName:C.lawyerName,lawyerEmail:C.lawyerEmail,lawyerPhone:C.lawyerPhone,lawFirm:C.lawFirm},a=u?"/api/admin/registrations/".concat(h.id):"/api/user/registrations/".concat(h.id);await fetch(a,{method:u?"PATCH":"PUT",headers:{"Content-Type":"application/json","X-CSRF-Token":j||""},body:JSON.stringify(e)}),H(new Date)}catch(e){}finally{I(!1)}},1e3),()=>{Y.current&&clearTimeout(Y.current)}},[C]),(0,s.useEffect)(()=>{g&&k(e=>({...e,caseId:g}))},[g]);let z=()=>{let e=[];return u||C.caseId||e.push("Legal Case Selection"),C.firstName||e.push("First Name"),C.lastName||e.push("Last Name"),C.email||e.push("Email"),C.phone||e.push("Phone"),C.birthDate||e.push("Birth Date"),C.gender||e.push("Gender"),C.address.street||e.push("Street Address"),C.address.city||e.push("City"),C.address.state||e.push("State/Province"),C.address.postalCode||e.push("Postal Code"),C.address.country||e.push("Country"),C.detaineeInfo.name||e.push("Detainee Name"),C.detaineeInfo.facility||e.push("Facility"),C.detaineeInfo.inmateId||e.push("Inmate ID"),C.relationship||e.push("Relationship to Detainee"),C.preferredLanguage||e.push("Preferred Language"),C.preferredContactMethod||e.push("Preferred Contact Method"),C.representation||e.push("Legal Representation"),C.howDidYouHearAboutUs||e.push("How did you hear about us"),C.detaineeIncarcerationDates||e.push("Incarceration Date"),!(e.length>0)||(A("Please fill in all required fields. Missing fields: "+e.join(", ")),!1)},G=async e=>{if(e.preventDefault(),I(!0),A(""),!z())return void I(!1);try{let e={...C,detaineeInfo:{name:C.detaineeInfo.name,facility:C.detaineeInfo.facility,inmateId:C.detaineeInfo.inmateId,incarcerationDate:C.detaineeIncarcerationDates?new Date(C.detaineeIncarcerationDates).toISOString():void 0,expectedReleaseDate:C.detaineeExpectedReleaseDates?new Date(C.detaineeExpectedReleaseDates).toISOString():null}};delete e.detaineeIncarcerationDates,delete e.detaineeExpectedReleaseDates;let l=await fetch(u?"/api/register":"/api/user/registrations",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":j},body:JSON.stringify(e)}),t=await l.json();if(!l.ok){A(t.message||"Registration error"),alert(t.message||"Registration error"),I(!1);return}alert("Application submitted successfully!"),a?a():y.push("/success")}catch(e){A(e instanceof Error?e.message:"Unknown error"),alert(e instanceof Error?e.message:"Unknown error"),console.error("Form submission error:",e)}finally{I(!1)}},Q=e=>{let{name:a,value:l,type:t}=e.target;if(a.includes(".")){let[e,t]=a.split(".");k(a=>({...a,[e]:{...a[e]||{},[t]:l}}))}else k(s=>({...s,[a]:"checkbox"===t?e.target.checked:l}));V&&K(C)};(0,s.useEffect)(()=>{var e;if(null==h||null==(e=h.address)?void 0:e.country){let e=h.address.country;"Canada"===e&&(e="CA"),"United States"===e&&(e="US"),P(e),k(a=>({...a,address:{...a.address,country:e}}))}},[h]);let[X,Z]=(0,s.useState)([]),$=e=>{Z(a=>a.filter(a=>a.id!==e))},[ee,ea]=(0,s.useState)(null);return(0,t.jsxs)("div",{className:"min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8",children:[(0,t.jsx)("div",{className:"max-w-3xl mx-auto",children:(0,t.jsx)("div",{className:"bg-white shadow sm:rounded-lg",children:(0,t.jsx)("div",{className:"px-4 py-5 sm:p-6",children:(0,t.jsxs)("form",{onSubmit:G,className:"space-y-10",children:[V&&q&&(0,t.jsxs)("div",{className:"mb-4 text-sm text-gray-500",children:["Last saved: ",q.toLocaleString()]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Personal Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["First Name ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"firstName",value:C.firstName,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Last Name ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"lastName",value:C.lastName,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Email ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"email",name:"email",value:C.email,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Phone ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"tel",name:"phone",value:C.phone,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Birth Date ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"date",name:"birthDate",value:C.birthDate,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Gender ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{name:"gender",value:C.gender,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[{value:"",label:"Select"},{value:"male",label:"Male"},{value:"female",label:"Female"},{value:"non_binary",label:"Non-binary"},{value:"prefer_not_to_say",label:"Prefer not to say"}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Address"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Street Address ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"address.street",value:C.address.street,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["City ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"address.city",value:C.address.city,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Country ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{value:R,onChange:e=>{let{value:a}=e.target;P(a),k(e=>({...e,address:{...e.address,country:a,state:""}}))},required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[{value:"CA",label:"Canada"},{value:"US",label:"United States"}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["State/Province ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsxs)("select",{name:"address.state",value:C.address.state,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[(0,t.jsx)("option",{value:"",children:"Select"}),("CA"===R||"US"===R)&&({CA:[{value:"AB",label:"Alberta"},{value:"BC",label:"British Columbia"},{value:"MB",label:"Manitoba"},{value:"NB",label:"New Brunswick"},{value:"NL",label:"Newfoundland and Labrador"},{value:"NS",label:"Nova Scotia"},{value:"NT",label:"Northwest Territories"},{value:"NU",label:"Nunavut"},{value:"ON",label:"Ontario"},{value:"PE",label:"Prince Edward Island"},{value:"QC",label:"Quebec"},{value:"SK",label:"Saskatchewan"},{value:"YT",label:"Yukon"}],US:[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}]})[R].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Postal Code ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"address.postalCode",value:C.address.postalCode,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Detainee Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Detainee Name ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"detaineeInfo.name",value:C.detaineeInfo.name,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Facility ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{name:"detaineeInfo.facility",value:C.detaineeInfo.facility,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:M.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Select the facility where the detainee is currently held."})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Inmate ID ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"detaineeInfo.inmateId",value:C.detaineeInfo.inmateId,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"As provided by the facility."})]}),(0,t.jsx)("div",{className:"md:col-span-2",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row gap-6",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Incarceration Date ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"date",name:"detaineeIncarcerationDates",value:C.detaineeIncarcerationDates,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Expected Release Date ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("input",{type:"date",name:"detaineeExpectedReleaseDates",value:C.detaineeExpectedReleaseDates,onChange:Q,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]})]})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Relationship to Detainee ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{name:"relationship",value:C.relationship,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[{value:"",label:"Select"},{value:"self",label:"I am the Detainee"},{value:"spouse",label:"Spouse"},{value:"parent",label:"Parent"},{value:"child",label:"Child"},{value:"sibling",label:"Sibling"},{value:"friend",label:"Friend"},{value:"lawyer",label:"Lawyer"},{value:"other",label:"Other"}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Contact Preferences"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Preferred Language ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{name:"preferredLanguage",value:C.preferredLanguage,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[{value:"en",label:"English"},{value:"fr",label:"French"}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Preferred Contact Method ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsxs)("select",{name:"preferredContactMethod",value:C.preferredContactMethod,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[(0,t.jsx)("option",{value:"email",children:"Email"}),(0,t.jsx)("option",{value:"phone",children:"Phone"}),(0,t.jsx)("option",{value:"mail",children:"Mail"})]})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Legal Representation"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Legal Representation ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsxs)("select",{name:"representation",value:C.representation,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[(0,t.jsx)("option",{value:"",children:"Select"}),(0,t.jsx)("option",{value:"yes",children:"Yes"}),(0,t.jsx)("option",{value:"no",children:"No"})]})]})}),"yes"===C.representation&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Lawyer Name ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("input",{type:"text",name:"lawyerName",value:C.lawyerName,onChange:Q,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Law Firm ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("input",{type:"text",name:"lawFirm",value:C.lawFirm,onChange:Q,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Lawyer Email ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("input",{type:"email",name:"lawyerEmail",value:C.lawyerEmail,onChange:Q,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Lawyer Phone ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("input",{type:"tel",name:"lawyerPhone",value:C.lawyerPhone,onChange:Q,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Additional Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Previous Legal Actions ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("textarea",{name:"previousLegalActions",value:C.previousLegalActions,onChange:Q,rows:2,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Reason for Joining ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("textarea",{name:"reasonForJoining",value:C.reasonForJoining,onChange:Q,rows:2,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["How did you hear about us? ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("select",{name:"howDidYouHearAboutUs",value:C.howDidYouHearAboutUs,onChange:Q,required:!0,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm",children:[{value:"",label:"Select"},{value:"social_media",label:"Social Media"},{value:"friend",label:"Friend or Family"},{value:"lawyer",label:"Lawyer"},{value:"news",label:"News"},{value:"search",label:"Search Engine"},{value:"other",label:"Other"}].map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Urgent Needs ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("textarea",{name:"urgentNeeds",value:C.urgentNeeds,onChange:Q,rows:2,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Additional Notes ",(0,t.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,t.jsx)("textarea",{name:"additionalNotes",value:C.additionalNotes,onChange:Q,rows:2,className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm"})]})]})]}),u&&(null==l?void 0:l.documents)&&l.documents.length>0&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-xl font-bold mb-2",children:"Uploaded Documents"}),(0,t.jsx)("ul",{className:"space-y-2",children:l.documents.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate flex-1",children:e.name||e.title||e.url}),(0,t.jsx)("button",{type:"button",className:"px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700",onClick:()=>ea({url:e.url,type:e.type,name:e.name||e.title||e.url}),children:"View"})]},e.id))})]}),D&&(0,t.jsx)("div",{className:"text-red-600 text-sm mt-2",children:D}),J&&(0,t.jsx)("div",{className:"text-sm text-blue-500",children:"Saving..."}),W&&!J&&(0,t.jsx)("div",{className:"text-sm text-green-500",children:"Saved"}),!V&&(0,t.jsx)("button",{type:"submit",disabled:S,className:"w-full py-3 px-4 bg-indigo-600 text-white rounded-md text-lg font-semibold hover:bg-indigo-700 disabled:opacity-50 mt-8",children:S?"Submitting...":"Submit"})]})})})}),X.map(e=>{let{id:a,file:l}=e;return(0,t.jsx)(m(),{handle:".modal-header",children:(0,t.jsxs)("div",{className:"fixed z-50 top-20 left-20 bg-white shadow-lg rounded-lg border border-gray-300 w-[90vw] max-w-2xl h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"modal-header flex items-center justify-between bg-indigo-600 text-white px-4 py-2 cursor-move rounded-t-lg",children:[(0,t.jsx)("span",{children:l.name}),(0,t.jsx)("div",{children:(0,t.jsx)("button",{onClick:()=>$(a),className:"ml-2 px-2 py-1 bg-red-500 rounded text-white",children:"Close"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(i.A,{url:URL.createObjectURL(l),type:l.type,name:l.name})})]})},a)}),ee&&(0,t.jsx)("div",{className:"fixed z-50 inset-0 flex items-center justify-center bg-black bg-opacity-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-lg max-w-2xl w-full h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-indigo-600 text-white rounded-t-lg",children:[(0,t.jsx)("span",{children:ee.name}),(0,t.jsx)("button",{onClick:()=>ea(null),className:"ml-2 px-2 py-1 bg-red-500 rounded text-white",children:"Close"})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(i.A,{url:ee.url,type:ee.type,name:ee.name})})]})})]})}}}]);

CasperSecurity Mini