(()=>{var a={};a.id=5976,a.ids=[5976],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9357:(a,b,c)=>{Promise.resolve().then(c.bind(c,59720))},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20903:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>o});var d=c(60687),e=c(43210),f=c(27605),g=c(63442),h=c(37566),i=c(16189),j=c(82136);c(30474);var k=c(95817),l=c(60213);function m({value:a,onChange:b,placeholder:c="Enter text...",disabled:f=!1,className:g="",minHeight:h="120px",rows:i=6}){let j=(0,e.useRef)(null),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)("14"),[q,r]=(0,e.useState)({bold:!1,italic:!1,underline:!1,strikeThrough:!1,justifyLeft:!1,justifyCenter:!1,justifyRight:!1,justifyFull:!1,insertUnorderedList:!1,insertOrderedList:!1}),s=()=>{j.current&&(b(j.current.innerHTML),t())},t=()=>{if(j.current)try{let a=document.queryCommandState("justifyLeft"),b=document.queryCommandState("justifyCenter"),c=document.queryCommandState("justifyRight"),d=document.queryCommandState("justifyFull");r({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikeThrough:document.queryCommandState("strikeThrough"),justifyLeft:a||!b&&!c&&!d,justifyCenter:b,justifyRight:c,justifyFull:d,insertUnorderedList:document.queryCommandState("insertUnorderedList"),insertOrderedList:document.queryCommandState("insertOrderedList")})}catch(a){console.warn("queryCommandState not supported:",a)}},u=(a,b)=>{!f&&(document.execCommand(a,!1,b),j.current&&(j.current.focus(),s(),setTimeout(t,10)))},v={display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",border:"1px solid transparent",background:"#ffffff",borderRadius:"4px",cursor:"pointer",fontSize:"14px",fontWeight:"600",color:"#564B43",transition:"all 0.2s ease",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"},w={height:"28px",minHeight:"28px",border:"1px solid #E6E6E6",borderRadius:"4px",background:"#ffffff",fontSize:"12px",padding:"0 8px",color:"#564B43",cursor:"pointer",minWidth:"85px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",transition:"all 0.2s ease"},x={width:"28px",height:"28px",minHeight:"28px",border:"1px solid #E6E6E6",borderRadius:"4px",cursor:"pointer",background:"#ffffff",padding:0,boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",transition:"all 0.2s ease",overflow:"hidden"},y=a=>({...v,background:a?"#EF7310":"#ffffff",color:a?"#ffffff":"#564B43",borderColor:a?"#EF7310":"transparent",opacity:f?.5:1,cursor:f?"not-allowed":"pointer"}),z=(a,b,c)=>{!f&&(b&&!c?(a.currentTarget.style.background="#EF7310",a.currentTarget.style.color="#ffffff",a.currentTarget.style.borderColor="#EF7310",a.currentTarget.style.transform="translateY(-1px)",a.currentTarget.style.boxShadow="0 2px 4px rgba(0, 0, 0, 0.1)"):b||c||(a.currentTarget.style.background="#ffffff",a.currentTarget.style.color="#564B43",a.currentTarget.style.borderColor="transparent",a.currentTarget.style.transform="translateY(0)",a.currentTarget.style.boxShadow="0 1px 2px rgba(0, 0, 0, 0.05)"))};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{children:`
        .rich-textarea-wrapper:focus-within {
          border-color: #EF7310 !important;
          box-shadow: 0 0 0 0.2rem rgba(239, 115, 16, 0.25) !important;
        }
        .rich-editor[contenteditable]:empty:before {
          content: attr(data-placeholder);
          color: #999;
          opacity: 0.7;
          pointer-events: none;
        }
        .rich-editor p {
          margin: 0 0 12px 0;
        }
        .rich-editor p:last-child {
          margin-bottom: 0;
        }
        .rich-editor ul, .rich-editor ol {
          margin: 0 0 12px 0;
          padding-left: 24px;
        }
        .rich-editor li {
          margin-bottom: 4px;
        }
        .rich-editor strong {
          font-weight: 700;
        }
        .rich-editor em {
          font-style: italic;
        }
        .rich-editor u {
          text-decoration: underline;
        }
        .rich-editor s {
          text-decoration: line-through;
        }
        .rich-editor h1, .rich-editor h2, .rich-editor h3 {
          margin: 16px 0 8px 0;
          font-weight: bold;
        }
        .rich-editor h1 {
          font-size: 2em;
        }
        .rich-editor h2 {
          font-size: 1.5em;
        }
        .rich-editor h3 {
          font-size: 1.25em;
        }
        .rich-editor a {
          color: #EF7310;
          text-decoration: underline;
        }
        .rich-editor a:hover {
          text-decoration: none;
        }
      `}),(0,d.jsxs)("div",{className:`rich-textarea-wrapper ${g}`,style:{border:"1px solid #E6E6E6",borderRadius:"6px",background:"#ffffff",overflow:"hidden",transition:"border-color 0.3s ease",padding:"0px"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"12px 16px",background:"#F8F9FA",borderBottom:"1px solid #E6E6E6",gap:"8px",flexWrap:"wrap"},children:[(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("bold"),title:"Bold (Ctrl+B)",disabled:f,style:y(q.bold),onMouseEnter:a=>z(a,!0,q.bold),onMouseLeave:a=>z(a,!1,q.bold),children:(0,d.jsx)("strong",{children:"B"})}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("italic"),title:"Italic (Ctrl+I)",disabled:f,style:y(q.italic),onMouseEnter:a=>z(a,!0,q.italic),onMouseLeave:a=>z(a,!1,q.italic),children:(0,d.jsx)("em",{children:"I"})}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("underline"),title:"Underline (Ctrl+U)",disabled:f,style:y(q.underline),onMouseEnter:a=>z(a,!0,q.underline),onMouseLeave:a=>z(a,!1,q.underline),children:(0,d.jsx)("u",{children:"U"})}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("strikeThrough"),title:"Strikethrough",disabled:f,style:y(q.strikeThrough),onMouseEnter:a=>z(a,!0,q.strikeThrough),onMouseLeave:a=>z(a,!1,q.strikeThrough),children:(0,d.jsx)("s",{children:"S"})}),(0,d.jsx)("div",{style:{width:"1px",height:"24px",background:"#E6E6E6",margin:"0 8px"}}),(0,d.jsxs)("select",{onChange:a=>u("formatBlock",a.target.value),disabled:f,defaultValue:"",style:{...w,maxWidth:"90px",opacity:f?.5:1,cursor:f?"not-allowed":"pointer"},children:[(0,d.jsx)("option",{value:"",children:"Format"}),(0,d.jsx)("option",{value:"h1",children:"Heading 1"}),(0,d.jsx)("option",{value:"h2",children:"Heading 2"}),(0,d.jsx)("option",{value:"h3",children:"Heading 3"}),(0,d.jsx)("option",{value:"p",children:"Paragraph"})]}),(0,d.jsxs)("select",{onChange:a=>(a=>{if(f)return;p(a),document.execCommand("fontSize",!1,"7");let b=j.current?.querySelectorAll('font[size="7"]');b?.forEach(b=>{b.removeAttribute("size"),b.style.fontSize=a+"px"}),j.current&&(j.current.focus(),s())})(a.target.value),disabled:f,value:o,style:{...w,maxWidth:"30px",opacity:f?.5:1,cursor:f?"not-allowed":"pointer"},children:[(0,d.jsx)("option",{value:"12",children:"12px"}),(0,d.jsx)("option",{value:"14",children:"14px"}),(0,d.jsx)("option",{value:"16",children:"16px"}),(0,d.jsx)("option",{value:"18",children:"18px"}),(0,d.jsx)("option",{value:"20",children:"20px"}),(0,d.jsx)("option",{value:"24",children:"24px"})]}),(0,d.jsx)("div",{style:{width:"1px",height:"24px",background:"#E6E6E6",margin:"0 8px"}}),(0,d.jsx)("input",{type:"color",onChange:a=>u("foreColor",a.target.value),title:"Text Color",disabled:f,style:{...x,opacity:f?.5:1,cursor:f?"not-allowed":"pointer"}}),(0,d.jsx)("input",{type:"color",onChange:a=>u("backColor",a.target.value),title:"Background Color",disabled:f,defaultValue:"#ffffff",style:{...x,opacity:f?.5:1,cursor:f?"not-allowed":"pointer"}}),(0,d.jsx)("div",{style:{width:"1px",height:"24px",background:"#E6E6E6",margin:"0 8px"}}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("justifyLeft"),title:"Align Left",disabled:f,style:y(q.justifyLeft),onMouseEnter:a=>z(a,!0,q.justifyLeft),onMouseLeave:a=>z(a,!1,q.justifyLeft),children:"⬅"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("justifyCenter"),title:"Center",disabled:f,style:y(q.justifyCenter),onMouseEnter:a=>z(a,!0,q.justifyCenter),onMouseLeave:a=>z(a,!1,q.justifyCenter),children:"↔"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("justifyRight"),title:"Align Right",disabled:f,style:y(q.justifyRight),onMouseEnter:a=>z(a,!0,q.justifyRight),onMouseLeave:a=>z(a,!1,q.justifyRight),children:"➡"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("justifyFull"),title:"Justify",disabled:f,style:y(q.justifyFull),onMouseEnter:a=>z(a,!0,q.justifyFull),onMouseLeave:a=>z(a,!1,q.justifyFull),children:"⬌"}),(0,d.jsx)("div",{style:{width:"1px",height:"24px",background:"#E6E6E6",margin:"0 8px"}}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("insertUnorderedList"),title:"Bullet List",disabled:f,style:y(q.insertUnorderedList),onMouseEnter:a=>z(a,!0,q.insertUnorderedList),onMouseLeave:a=>z(a,!1,q.insertUnorderedList),children:"•"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("insertOrderedList"),title:"Numbered List",disabled:f,style:y(q.insertOrderedList),onMouseEnter:a=>z(a,!0,q.insertOrderedList),onMouseLeave:a=>z(a,!1,q.insertOrderedList),children:"1."}),(0,d.jsx)("div",{style:{width:"1px",height:"24px",background:"#E6E6E6",margin:"0 8px"}}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>{if(f)return;let a=window.getSelection();if(a&&a.toString())l(!0);else{let a=prompt("Enter URL:");if(a){let b=prompt("Enter link text:")||a;document.execCommand("insertHTML",!1,`<a href="${a}" target="_blank">${b}</a>`),j.current&&(j.current.focus(),s())}}},title:"Insert Link",disabled:f,style:{...v,opacity:f?.5:1,cursor:f?"not-allowed":"pointer"},onMouseEnter:a=>z(a,!0,!1),onMouseLeave:a=>z(a,!1,!1),children:"\uD83D\uDD17"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("undo"),title:"Undo (Ctrl+Z)",disabled:f,style:{...v,opacity:f?.5:1,cursor:f?"not-allowed":"pointer"},onMouseEnter:a=>z(a,!0,!1),onMouseLeave:a=>z(a,!1,!1),children:"↶"}),(0,d.jsx)("button",{type:"button",onMouseDown:a=>a.preventDefault(),onClick:()=>u("redo"),title:"Redo (Ctrl+Shift+Z)",disabled:f,style:{...v,opacity:f?.5:1,cursor:f?"not-allowed":"pointer"},onMouseEnter:a=>z(a,!0,!1),onMouseLeave:a=>z(a,!1,!1),children:"↷"})]}),(0,d.jsx)("div",{ref:j,contentEditable:!f,className:"rich-editor",style:{minHeight:h,padding:"12px",outline:"none",fontSize:"16px",lineHeight:"1.6",color:"#564B43",fontFamily:'"Manrope", sans-serif',overflowY:"auto",maxHeight:"400px"},onInput:s,onKeyDown:a=>{if(!f){if(a.ctrlKey||a.metaKey)switch(a.key){case"b":a.preventDefault(),document.execCommand("bold",!1);break;case"i":a.preventDefault(),document.execCommand("italic",!1);break;case"u":a.preventDefault(),document.execCommand("underline",!1);break;case"z":a.preventDefault(),a.shiftKey?document.execCommand("redo",!1):document.execCommand("undo",!1)}if("Enter"===a.key&&!a.shiftKey&&!a.ctrlKey&&!a.metaKey){let a=window.getSelection();if(a&&a.rangeCount>0){let b=a.getRangeAt(0).commonAncestorContainer,c=b.nodeType===Node.TEXT_NODE?b.parentElement:b;for(;c&&c!==j.current;){if("LI"===c.tagName)return;c=c.parentElement}}}}},"data-placeholder":c,suppressContentEditableWarning:!0}),(0,d.jsx)("input",{type:"hidden",value:j.current&&j.current.textContent||"",readOnly:!0}),k&&(0,d.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,d.jsxs)("div",{style:{background:"#ffffff",padding:"24px",borderRadius:"8px",boxShadow:"0 10px 30px rgba(0, 0, 0, 0.3)",minWidth:"320px",maxWidth:"400px"},children:[(0,d.jsx)("h3",{style:{margin:"0 0 16px 0",fontSize:"18px",fontWeight:"600",color:"#564B43"},children:"Insert Link"}),(0,d.jsx)("input",{type:"url",value:m,onChange:a=>n(a.target.value),placeholder:"Enter URL",style:{width:"100%",padding:"12px",border:"1px solid #E6E6E6",borderRadius:"6px",fontSize:"14px",marginBottom:"16px",outline:"none"},autoFocus:!0}),(0,d.jsxs)("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[(0,d.jsx)("button",{onClick:()=>{m&&(document.execCommand("createLink",!1,m),l(!1),n(""),j.current&&(j.current.focus(),s()))},style:{padding:"8px 16px",border:"none",borderRadius:"4px",fontSize:"14px",cursor:"pointer",transition:"all 0.2s ease",background:"#EF7310",color:"white"},children:"Apply"}),(0,d.jsx)("button",{onClick:()=>{l(!1),n("")},style:{padding:"8px 16px",border:"none",borderRadius:"4px",fontSize:"14px",cursor:"pointer",transition:"all 0.2s ease",background:"#F1F5F9",color:"#564B43"},children:"Cancel"})]})]})})]})]})}c(33363),c(32109);let n=h.Ik({title:h.Yj().min(10,"Title must be at least 10 characters"),categoryId:h.Yj().min(1,"Please select a category"),budget:h.ai().min(1,"Budget must be at least 1"),duration:h.ai().min(1,"Duration must be at least 1 day"),city:h.Yj().optional(),zipCode:h.Yj().optional(),description:h.Yj().min(50,"Description must be at least 50 characters"),attachments:h.bz().optional()});function o({params:a}){let{locale:b}=(0,e.use)(a),c=(0,i.useRouter)(),{data:h,status:o}=(0,j.useSession)(),{showError:p,showSuccess:q}=(0,l.d)(),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)([]),[x,y]=(0,e.useState)([]),[z,A]=(0,e.useState)([]),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(""),{register:H,handleSubmit:I,formState:{errors:J},setValue:K}=(0,f.mN)({resolver:(0,g.u)(n)});(0,e.useCallback)(async()=>{if(0===v.length&&0===x.length&&!t){u(!0);try{let[a,b]=await Promise.all([fetch("/api/categories").then(a=>a.json()),fetch("/api/profile/update").then(a=>a.json())]);w(a||[]),G(b||""),K("city",b?.user?.profile?.city||""),K("zipCode",b?.user?.profile?.zipCode||"")}catch(a){console.error("Error fetching data:",a),p("Failed to load data. Please refresh the page.")}finally{u(!1)}}},[v.length,x.length,t,K,p]);let L=async a=>{if(s(!0),!F?.user?.profile?.countryId)return p("Country is required","Validation Error"),!1;try{let d=new FormData;Object.keys(a).forEach(b=>{if("attachments"!==b){let c="description"===b?D:a[b];d.append(b,c.toString())}}),d.append("countryId",F?.user?.profile?.countryId),z.forEach(a=>{d.append("attachments",a)});let e=await fetch("/api/projects",{method:"POST",body:d});if(!e.ok){let a=await e.json();throw Error(a.message||"Failed to create project")}await e.json(),q("Project posted successfully!","Success"),c.push(`/${b}/client/my-projects`)}catch(a){p(a instanceof Error?a.message:"Something went wrong","Error")}finally{s(!1)}},M=a=>{if(!a)return;let b=["image/png","image/jpeg","image/jpg","image/gif","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/csv","application/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","video/mp4"],c=[],d=[];Array.from(a).forEach(a=>{if(b.includes(a.type)){let b=a.type.startsWith("video/");a.size>(b?0x1900000:0xa00000)?d.push(`${a.name} - File too large (max ${b?"25MB":"10MB"})`):c.push(a)}else d.push(`${a.name} - Invalid file type`)}),d.length>0&&p(`Some files were not uploaded: ${d.join(", ")}`,"Upload Warning"),c.length>0&&(A(a=>[...a,...c]),q(`${c.length} file(s) uploaded successfully`,"Upload Success"))},N=a=>{a.preventDefault(),a.stopPropagation(),"dragenter"===a.type||"dragover"===a.type?C(!0):"dragleave"===a.type&&C(!1)};return"loading"===o?(0,d.jsx)("div",{className:"loading-container",children:(0,d.jsx)("div",{className:"spinner-border text-primary",role:"status",children:(0,d.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}):(0,d.jsx)("section",{className:"profile-wrapper create-project-wrapper py-60",children:(0,d.jsx)("div",{className:"container",children:(0,d.jsxs)("div",{className:"row",children:[(0,d.jsx)("div",{className:"col-12 col-md-4 col-xl-3",children:(0,d.jsx)(k.A,{locale:b})}),(0,d.jsx)("div",{className:"col-12 col-md-8 col-xl-9",children:(0,d.jsxs)("div",{className:"content-box",children:[(0,d.jsx)("div",{className:"tab-title",children:(0,d.jsx)("h5",{children:"Post A Project"})}),(0,d.jsx)("div",{className:"form-wrap mt-0",children:(0,d.jsxs)("form",{onSubmit:I(L),children:[(0,d.jsx)("div",{className:"form-group",children:(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsxs)("label",{htmlFor:"title",className:"form-label",children:["Project Title ",(0,d.jsx)("span",{className:"text-danger",children:"*"})]}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("input",{type:"text",className:`form-control ${J.title?"is-invalid":""}`,id:"title",placeholder:"Enter Project Title",...H("title"),disabled:r||t})}),J.title&&(0,d.jsx)("div",{className:"form-text error-text",children:J.title.message})]})}),(0,d.jsxs)("div",{className:"form-group",children:[(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsxs)("label",{htmlFor:"category",className:"form-label",children:["Category ",(0,d.jsx)("span",{className:"text-danger",children:"*"})]}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("div",{className:"custom-sub-select",children:(0,d.jsxs)("select",{id:"category",className:`form-control ${J.categoryId?"is-invalid":""}`,...H("categoryId"),disabled:r||t,onChange:a=>{K("categoryId",a.target.value)},children:[(0,d.jsx)("option",{value:"",children:"Select Category"}),v.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]})})}),J.categoryId&&(0,d.jsx)("div",{className:"form-text error-text",children:J.categoryId.message})]}),(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsxs)("label",{htmlFor:"budget",className:"form-label",children:["Your Budget ",(0,d.jsx)("span",{className:"text-danger",children:"*"})]}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("input",{type:"text",className:`form-control ${J.budget?"is-invalid":""}`,id:"budget",placeholder:"Enter Budget",...H("budget",{valueAsNumber:!0,setValueAs:a=>parseFloat(a)||0}),disabled:r||t})}),J.budget&&(0,d.jsx)("div",{className:"form-text error-text",children:J.budget.message})]}),(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsxs)("label",{htmlFor:"duration",className:"form-label",children:["Days needed to complete the work ",(0,d.jsx)("span",{className:"text-danger",children:"*"})]}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("input",{type:"text",className:`form-control ${J.duration?"is-invalid":""}`,id:"duration",placeholder:"Enter Days",...H("duration",{valueAsNumber:!0,setValueAs:a=>parseInt(a)||0}),disabled:r||t})}),J.duration&&(0,d.jsx)("div",{className:"form-text error-text",children:J.duration.message})]})]}),(0,d.jsxs)("div",{className:"form-group no-icon-box",children:[(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsx)("label",{htmlFor:"city",className:"form-label",children:"City"}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("input",{type:"text",className:"form-control",id:"city",placeholder:"Enter City",...H("city"),disabled:r||t})})]}),(0,d.jsxs)("div",{className:"mb-20 no-icon-box",children:[(0,d.jsx)("label",{htmlFor:"zipCode",className:"form-label",children:"Zip Code"}),(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)("input",{type:"number",className:"form-control",id:"zipCode",placeholder:"Enter Zip Code",...H("zipCode"),disabled:r||t})})]})]}),(0,d.jsx)("div",{className:"form-group",children:(0,d.jsx)("div",{className:"mb-20",children:(0,d.jsx)("label",{htmlFor:"description",className:"form-label",children:"Description"})})}),(0,d.jsx)("div",{className:"form-group",children:(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsx)("div",{className:"input-icon",children:(0,d.jsx)(m,{value:D,onChange:a=>{E(a),K("description",a,{shouldValidate:!0})},placeholder:"Describe your project in detail, including requirements, goals, timeline, and any specific details that will help freelancers understand your needs...",disabled:r||t,minHeight:"160px",className:`form-control ${J.description?"is-invalid":""}`,rows:6})}),J.description&&(0,d.jsx)("div",{className:"form-text error-text",children:J.description.message})]})}),(0,d.jsx)("div",{className:"form-group",children:(0,d.jsxs)("div",{className:"mb-20",children:[(0,d.jsxs)("div",{className:"upload-outer",children:[(0,d.jsx)("label",{className:"form-label fw-semibold",children:"Upload Documents"}),(0,d.jsxs)("div",{className:`upload-area position-relative ${B?"drag-active":""}`,id:"uploadArea",onDragEnter:N,onDragLeave:N,onDragOver:N,onDrop:a=>{a.preventDefault(),a.stopPropagation(),C(!1),M(a.dataTransfer.files)},onClick:()=>document.getElementById("fileInput")?.click(),children:[(0,d.jsxs)("div",{id:"placeholder",className:"upload-placeholder",children:[(0,d.jsxs)("svg",{width:"69",height:"60",viewBox:"0 0 69 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M46.208 5.70117C46.6948 5.70117 47.0897 6.09627 47.0898 6.58301C47.0898 7.06987 46.6949 7.46484 46.208 7.46484C42.0957 7.46495 38.405 10.2157 37.2334 14.1523C37.1047 14.5864 36.6701 14.848 36.2324 14.7686L36.2285 14.7734L36.1367 14.7461C35.6703 14.607 35.4039 14.1162 35.543 13.6494C36.9067 9.06679 41.154 5.70127 46.208 5.70117Z",fill:"#0E9493",stroke:"#787676",strokeWidth:"0.3"}),(0,d.jsx)("path",{d:"M56.4522 42.4384H52.0618C51.6578 42.4384 51.3301 42.1107 51.3301 41.7067C51.3301 41.3027 51.6578 40.9749 52.0618 40.9749H56.4522C62.504 40.9749 67.4281 36.0509 67.4281 29.999C67.4281 23.9471 62.504 19.023 56.4522 19.023H56.3466C56.1344 19.023 55.9326 18.9311 55.7936 18.7706C55.6546 18.6101 55.5918 18.3974 55.6222 18.1873C55.6875 17.7315 55.7204 17.2737 55.7204 16.8279C55.7204 11.5829 51.4528 7.31531 46.2079 7.31531C44.1674 7.31531 42.2215 7.95296 40.5803 9.15978C40.2196 9.42478 39.7074 9.30718 39.4989 8.91047C34.8509 0.0596993 22.7107 -1.12887 16.4166 6.57053C13.7652 9.81417 12.7234 14.0336 13.5582 18.146C13.6502 18.6002 13.3026 19.0236 12.8411 19.0236H12.5479C6.496 19.0236 1.57193 23.9477 1.57193 29.9996C1.57193 36.0514 6.496 40.9755 12.5479 40.9755H16.9382C17.3422 40.9755 17.6699 41.3032 17.6699 41.7072C17.6699 42.1113 17.3422 42.439 16.9382 42.439H12.5479C5.6889 42.439 0.108398 36.8585 0.108398 29.9995C0.108398 23.3329 5.37995 17.8742 11.9735 17.5731C11.3541 13.3066 12.5385 9.00295 15.2835 5.64437C22.0222 -2.5996 34.9364 -1.67556 40.3955 7.51707C42.1371 6.42522 44.1299 5.85244 46.2076 5.85244C52.5622 5.85244 57.5976 11.261 57.157 17.58C63.6897 17.9463 68.8913 23.3763 68.8913 29.999C68.8913 36.8585 63.3108 42.4384 56.4518 42.4384L56.4522 42.4384Z",fill:"#0E9493"}),(0,d.jsx)("path",{d:"M34.4023 22.8496C44.5721 22.8499 52.8457 31.1242 52.8457 41.2939C52.8454 51.4634 44.5719 59.7371 34.4023 59.7373C24.2327 59.7373 15.9583 51.4637 15.958 41.2939C15.958 31.1241 24.2324 22.8496 34.4023 22.8496ZM34.4023 24.6143C25.2053 24.6143 17.7227 32.097 17.7227 41.2939C17.7229 50.4908 25.2056 57.9736 34.4023 57.9736C43.5989 57.9734 51.0818 50.4905 51.082 41.2939C51.082 32.0971 43.599 24.6145 34.4023 24.6143Z",fill:"#0E9493",stroke:"#787676",strokeWidth:"0.3"}),(0,d.jsx)("path",{d:"M34.7368 34.043C35.1153 34.0432 35.4224 34.351 35.4224 34.7295V48.6572C35.4224 49.0362 35.1152 49.3435 34.7368 49.3438C34.3582 49.3438 34.0503 49.0359 34.0503 48.6572V34.7295C34.0503 34.3509 34.3582 34.043 34.7368 34.043Z",fill:"#0E9493",stroke:"#0E9493",strokeWidth:"0.3"}),(0,d.jsx)("path",{d:"M34.252 34.2461C34.5196 33.9784 34.954 33.9784 35.2217 34.2461L39.5068 38.5322C39.7746 38.8001 39.7747 39.2341 39.5068 39.502L39.5059 39.501C39.372 39.6351 39.197 39.7021 39.0225 39.7021C38.8474 39.7021 38.6708 39.6356 38.5371 39.502L34.7363 35.7002L30.9355 39.502C30.668 39.7696 30.2335 39.7696 29.9658 39.502C29.698 39.2342 29.6982 38.8001 29.9658 38.5322L34.252 34.2461Z",fill:"#0E9493",stroke:"#0E9493",strokeWidth:"0.3"})]}),(0,d.jsxs)("p",{children:["Drag & drop files or ",(0,d.jsx)("a",{href:"#",className:"text-decoration-none",children:"Browse"})]}),(0,d.jsx)("small",{className:"text-muted",children:"Supported formats: .jpg, .jpeg, .png, .gif, .pdf, .doc, .docx, .csv, .xls, .xlsx, .mp4 (max 10MB, videos 25MB)"})]}),(0,d.jsx)("input",{type:"file",className:"d-none",id:"fileInput",accept:"image/png, image/jpeg, image/jpg, image/gif, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/csv, application/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, video/mp4",multiple:!0,onChange:a=>M(a.target.files)})]})]}),z.length>0&&(0,d.jsxs)("div",{className:"uploaded-files mt-3",children:[(0,d.jsxs)("h6",{className:"mb-2",children:["Additional Files (",z.length,")"]}),z.map((a,b)=>{let c=a.type.toLowerCase(),e=(a.size/1048576).toFixed(1),f="#0E9493",g="";return"application/pdf"===c?(g="PDF",f="#d32f2f"):c.includes("word")||c.includes("document")?(g="DOC",f="#1976d2"):c.includes("spreadsheet")||c.includes("excel")||c.includes("csv")?(g="XLS",f="#388e3c"):c.startsWith("video/")?(g="MP4",f="#f57c00"):c.startsWith("image/")?(g="IMG",f="#9c27b0"):g=a.name.split(".").pop()?.toUpperCase()||"FILE",(0,d.jsxs)("div",{className:"file-item d-flex align-items-center justify-content-between p-2 mb-2 border rounded",children:[(0,d.jsxs)("div",{className:"d-flex align-items-center",children:[(0,d.jsx)("div",{className:"file-type-icon me-3",style:{width:"40px",height:"40px",backgroundColor:f,borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:"12px",fontWeight:"bold"},children:g}),(0,d.jsxs)("div",{className:"file-details",children:[(0,d.jsx)("div",{className:"file-name fw-medium",style:{fontSize:"14px"},children:a.name}),(0,d.jsxs)("small",{className:"text-muted",children:[e," MB"]})]})]}),(0,d.jsxs)("div",{className:"file-actions d-flex align-items-center",children:[(0,d.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-primary me-2",onClick:b=>{b.preventDefault(),b.stopPropagation();let c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=a.name,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(c)},title:"Download",children:"↓"}),(0,d.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-danger",onClick:a=>{var c;a.preventDefault(),a.stopPropagation(),c=b+1,A(a=>a.filter((a,b)=>b!==c))},title:"Remove",children:"\xd7"})]})]},b+1)})]})]})}),(0,d.jsx)("button",{type:"submit",className:"w-100 custom-btn secondary-btn",disabled:r||t,children:r?"Creating Project...":t?"Loading...":"Create Project"})]})})]})})]})})})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32109:()=>{},33363:()=>{},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},59720:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(61369).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\node_project\\\\smile24\\\\smile24-nextjs-be-code\\\\src\\\\app\\\\[locale]\\\\(dashboard)\\\\client\\\\post-project\\\\page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\(dashboard)\\client\\post-project\\page.tsx","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88640:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>C.a,__next_app__:()=>I,handler:()=>K,pages:()=>H,routeModule:()=>J,tree:()=>G});var d=c(65239),e=c(48088),f=c(47220),g=c(81289),h=c(26191),i=c(14823),j=c(71998),k=c(92603),l=c(54649),m=c(32781),n=c(82602),o=c(61268),p=c(4853),q=c(261),r=c(5052),s=c(9977),t=c(26713),u=c(43365),v=c(71454),w=c(67778),x=c(46143),y=c(39105),z=c(38171),A=c(86439),B=c(16133),C=c.n(B),D=c(30893),E=c(52836),F={};for(let a in D)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(F[a]=()=>D[a]);c.d(b,F);let G={children:["",{children:["[locale]",{children:["(dashboard)",{children:["client",{children:["post-project",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,59720)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\(dashboard)\\client\\post-project\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,76852)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\(dashboard)\\client\\layout.tsx"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,55338)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\(dashboard)\\layout.tsx"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,11434)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\layout.tsx"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,94431)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\layout.tsx"],error:[()=>Promise.resolve().then(c.bind(c,54431)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\error.tsx"],"not-found":[()=>Promise.resolve().then(c.bind(c,54413)),"D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\not-found.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,16133,23)),"next/dist/client/components/builtin/global-error.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,29868,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,79615,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,H=["D:\\node_project\\smile24\\smile24-nextjs-be-code\\src\\app\\[locale]\\(dashboard)\\client\\post-project\\page.tsx"],I={require:c,loadChunk:()=>Promise.resolve()},J=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/[locale]/(dashboard)/client/post-project/page",pathname:"/[locale]/client/post-project",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:G},distDir:".next",projectDir:""});async function K(a,b,c){var d;let B="/[locale]/(dashboard)/client/post-project/page";"/index"===B&&(B="/");let F="false",L=(0,h.getRequestMeta)(a,"postponed"),M=(0,h.getRequestMeta)(a,"minimalMode"),N=await J.prepare(a,b,{srcPage:B,multiZoneDraftMode:F});if(!N)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:O,query:P,params:Q,parsedUrl:R,pageIsDynamic:S,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,serverActionsManifest:W,clientReferenceManifest:X,subresourceIntegrityManifest:Y,prerenderManifest:Z,isDraftMode:$,resolvedPathname:_,revalidateOnlyGenerated:aa,routerServerContext:ab,nextConfig:ac}=N,ad=R.pathname||"/",ae=(0,q.normalizeAppPath)(B),{isOnDemandRevalidate:af}=N,ag=Z.dynamicRoutes[ae],ah=Z.routes[_],ai=!!(ag||ah||Z.routes[ae]),aj=a.headers["user-agent"]||"",ak=(0,t.getBotType)(aj),al=(0,o.isHtmlBotRequest)(a),am=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??!!a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],an=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],ao=(0,r.getIsPossibleServerAction)(a),ap=(0,l.checkIsAppPPREnabled)(ac.experimental.ppr)&&(null==(d=Z.routes[ae]??Z.dynamicRoutes[ae])?void 0:d.renderingMode)==="PARTIALLY_STATIC",aq=!1,ar=!1,as=ap?L:void 0,at=ap&&an&&!am,au=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),av=!aj||(0,o.shouldServeStreamingMetadata)(aj,ac.htmlLimitedBots);al&&ap&&(ai=!1,av=!1);let aw=!0===J.isDev||!ai||"string"==typeof L||at,ax=al&&ap,ay=null;$||!ai||aw||ao||as||at||(ay=_);let az=ay;!az&&J.isDev&&(az=_);let aA={...D,tree:G,pages:H,GlobalError:C(),handler:K,routeModule:J,__next_app__:I};W&&X&&(0,n.setReferenceManifestsSingleton)({page:B,clientReferenceManifest:X,serverActionsManifest:W,serverModuleMap:(0,p.createServerModuleMap)({serverActionsManifest:W})});let aB=a.method||"GET",aC=(0,g.getTracer)(),aD=aC.getActiveScopeSpan();try{let d=async(c,d)=>{let e=new k.NodeNextRequest(a),f=new k.NodeNextResponse(b);return J.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aC.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aB} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aB} ${a.url}`)})},f=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:P,params:Q,page:ae,sharedContext:{buildId:O},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aA,Component:(0,j.T)(aA),params:Q,routeModule:J,page:B,postponed:f,shouldWaitOnAllReady:ax,serveStreamingMetadata:av,supportsDynamicResponse:"string"==typeof f||aw,buildManifest:T,nextFontManifest:U,reactLoadableManifest:V,subresourceIntegrityManifest:Y,serverActionsManifest:W,clientReferenceManifest:X,setIsrStatus:null==ab?void 0:ab.setIsrStatus,dir:J.projectDir,isDraftMode:$,isRevalidate:ai&&!f&&!at,botType:ak,isOnDemandRevalidate:af,isPossibleServerAction:ao,assetPrefix:ac.assetPrefix,nextConfigOutput:ac.output,crossOrigin:ac.crossOrigin,trailingSlash:ac.trailingSlash,previewProps:Z.preview,deploymentId:ac.deploymentId,enableTainting:ac.experimental.taint,htmlLimitedBots:ac.htmlLimitedBots,devtoolSegmentExplorer:ac.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ac.reactMaxHeadersLength,multiZoneDraftMode:F,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ac.experimental.cacheLife,basePath:ac.basePath,serverActions:ac.experimental.serverActions,...aq?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:aq}:{},experimental:{isRoutePPREnabled:ap,expireTime:ac.expireTime,staleTimes:ac.experimental.staleTimes,dynamicIO:!!ac.experimental.dynamicIO,clientSegmentCache:!!ac.experimental.clientSegmentCache,dynamicOnHover:!!ac.experimental.dynamicOnHover,inlineCss:!!ac.experimental.inlineCss,authInterrupts:!!ac.experimental.authInterrupts,clientTraceMetadata:ac.experimental.clientTraceMetadata||[]},waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>J.onRequestError(a,b,d,ab),err:(0,h.getRequestMeta)(a,"invokeError"),dev:J.isDev}},k=await d(e,i),{metadata:l}=k,{cacheControl:m,headers:n={},fetchTags:o}=l;if(o&&(n[x.NEXT_CACHE_TAGS_HEADER]=o),a.fetchMetrics=l.fetchMetrics,ai&&(null==m?void 0:m.revalidate)===0&&!J.isDev&&!ap){let a=l.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${_}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:k,headers:n,rscData:l.flightData,postponed:l.postponed,status:l.statusCode,segmentData:l.segmentData},cacheControl:m}},l=async({hasResolved:d,previousCacheEntry:g,isRevalidating:i,span:j})=>{let k,l=!1===J.isDev,n=d||b.writableEnded;if(af&&aa&&!g&&!M)return(null==ab?void 0:ab.render404)?await ab.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ag&&(k=(0,v.parseFallbackField)(ag.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(aj)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(af=!0),af&&(k!==v.FallbackMode.NOT_FOUND||g)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!M&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&az&&!n&&!$&&S&&(l||!ah)){let b;if((l||ag)&&k===v.FallbackMode.NOT_FOUND)throw new A.NoFallbackError;if(ap&&!an){if(b=await J.handleResponse({cacheKey:l?ae:null,req:a,nextConfig:ac,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:Z,isRoutePPREnabled:ap,responseGenerator:async()=>f({span:j,postponed:void 0,fallbackRouteParams:l||ar?(0,m.u)(ae):null}),waitUntil:c.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let o=af||i||!as?void 0:as;if(aq&&void 0!==o)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.fromStatic(""),pageData:{},headers:void 0,status:void 0}};let p=S&&ap&&((0,h.getRequestMeta)(a,"renderFallbackShell")||ar)?(0,m.u)(ad):null;return f({span:j,postponed:o,fallbackRouteParams:p})},n=async d=>{var g,i,j,k,m;let n,o=await J.handleResponse({cacheKey:ay,responseGenerator:a=>l({span:d,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:af,isRoutePPREnabled:ap,req:a,nextConfig:ac,prerenderManifest:Z,waitUntil:c.waitUntil});if($&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),J.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(ay)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(g=o.value)?void 0:g.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(j=o.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;ai&&!at&&(!p||am)&&(M||b.setHeader("x-nextjs-cache",af?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(as)n={revalidate:0,expire:void 0};else if(M&&an&&!am&&ap)n={revalidate:0,expire:void 0};else if(!J.isDev)if($)n={revalidate:0,expire:void 0};else if(ai){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});n={revalidate:o.cacheControl.revalidate,expire:(null==(k=o.cacheControl)?void 0:k.expire)??ac.expireTime}}else n={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(n={revalidate:0,expire:void 0});if(o.cacheControl=n,"string"==typeof au&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(m=q.headers)?void 0:m[x.NEXT_CACHE_TAGS_HEADER];M&&ai&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(au);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(d),cacheControl:o.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(""),cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&as)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(M&&ai||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(i=q.headers)?void 0:i[x.NEXT_CACHE_TAGS_HEADER];if(M&&ai&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||an&&ap||(b.statusCode=q.status),!M&&q.status&&E.RedirectStatusCode[q.status]&&an&&(b.statusCode=200),p&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),an&&!$){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:q.html,cacheControl:at?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,type:"rsc",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:w.default.fromStatic(q.rscData),cacheControl:o.cacheControl})}let v=q.html;if(!p||M)return(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:o.cacheControl});if(aq)return v.chain(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.chain(A.readable),f({span:d,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,type:"html",generateEtags:ac.generateEtags,poweredByHeader:ac.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aD)return await aC.withPropagatedContext(a.headers,()=>aC.trace(i.BaseServerSpan.handleRequest,{spanName:`${aB} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aB,"http.target":a.url}},n));await n(aD)}catch(b){throw aD||b instanceof A.NoFallbackError||await J.onRequestError(a,b,{routerKind:"App Router",routePath:B,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:ai,isOnDemandRevalidate:af})},ab),b}}},90797:(a,b,c)=>{Promise.resolve().then(c.bind(c,20903))}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[431,4999,5136,4013,4252,1498,1317,9755],()=>b(b.s=88640));module.exports=c})();