/
opt
/
canhelp
/
apps
/
web
/
.next
/
server
/
app
/
specialist-setup
/
/opt/canhelp/apps/web/.next/server/app/specialist-setup
mkdir
upload
Name
Size
Mode
Actions
page.js
33848
0644
edit
dl
rm
page.js.nft.json
7950
0644
edit
dl
rm
page_client-reference-manifest.js
19707
0644
edit
dl
rm
Edit:
/opt/canhelp/apps/web/.next/server/app/specialist-setup/page.js
(33848B)
(()=>{var a={};a.id=442,a.ids=[442],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2069:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(25459).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/specialist-setup/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.")},"/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx","default")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},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")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28527:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>s});var d=c(78157),e=c(31768),f=c(71159),g=c(13260),h=c(96484),i=c(91864),j=c(44972);function k({current:a,total:b}){return(0,d.jsx)("div",{className:"flex items-center justify-center gap-2 mb-8",children:Array.from({length:b},(a,b)=>b+1).map(c=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold transition-colors ${c<a?"bg-green-500 text-white":c===a?"bg-green-600 text-white ring-4 ring-blue-200":"bg-gray-200 text-gray-400"}`,children:c<a?(0,d.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,d.jsx)("path",{d:"M2 7l4 4 6-6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):c}),c<b&&(0,d.jsx)("div",{className:`w-8 h-0.5 ${c<a?"bg-green-500":"bg-gray-200"}`})]},c))})}function l({t:a,onNext:b}){return(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,d.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"#2563eb",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,d.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,d.jsx)("circle",{cx:"12",cy:"7",r:"4"})]})}),(0,d.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:a("specialist_setup.step1.title")}),(0,d.jsx)("p",{className:"text-green-600 font-medium mb-4",children:a("specialist_setup.step1.subtitle")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm leading-relaxed mb-8 max-w-sm mx-auto",children:a("specialist_setup.step1.desc")}),(0,d.jsxs)("div",{className:"bg-gray-50 rounded-xl p-5 text-left mb-8 max-w-sm mx-auto",children:[(0,d.jsx)("p",{className:"text-sm font-semibold text-gray-700 mb-3",children:a("specialist_setup.step1.what_next")}),(0,d.jsx)("ul",{className:"space-y-2",children:[a("specialist_setup.step1.item1"),a("specialist_setup.step1.item2"),a("specialist_setup.step1.item3"),a("specialist_setup.step1.item4"),a("specialist_setup.step1.item5")].map((a,b)=>(0,d.jsxs)("li",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,d.jsx)("span",{className:"w-5 h-5 bg-green-100 text-green-600 rounded-full flex items-center justify-center text-xs font-bold shrink-0",children:b+1}),a]},b))})]}),(0,d.jsxs)("button",{onClick:b,className:"w-full max-w-xs bg-green-600 text-white py-3 rounded-xl font-semibold hover:bg-green-700 transition",children:[a("specialist_setup.next")," →"]})]})}function m({t:a,onNext:b,onBack:c}){let[f,g]=(0,e.useState)(""),[h,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),q=(0,e.useRef)(null);async function s(a){let b=a.target.files?.[0];if(b){p(!0);try{let a=new FormData;a.append("file",b);let c=await fetch("https://api.canhelp.gr/api/uploads",{method:"POST",credentials:"include",body:a});if(!c.ok)throw Error("Upload failed");let{url:d}=await c.json(),e=`https://api.canhelp.gr${d}`;await i.Em("/users/me",{method:"PATCH",body:JSON.stringify({image:e})}),n(e)}catch{}finally{p(!1),q.current&&(q.current.value="")}}}async function t(){l(!0);try{await i.Em("/users/me",{method:"PATCH",body:JSON.stringify({bio:f||void 0,phone:h||void 0})}),b()}catch{}finally{l(!1)}}return(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:a("specialist_setup.step2.title")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm mb-6",children:a("specialist_setup.step2.subtitle")}),(0,d.jsxs)("div",{className:"mb-5",children:[(0,d.jsx)("p",{className:"text-sm font-medium text-gray-700 mb-2",children:a("specialist_setup.step2.photo_label")}),(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"w-16 h-16 rounded-full bg-gray-100 border-2 border-gray-200 overflow-hidden shrink-0 flex items-center justify-center",children:m?(0,d.jsx)("img",{src:m,alt:"",className:"w-full h-full object-cover"}):(0,d.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:[(0,d.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,d.jsx)("circle",{cx:"12",cy:"7",r:"4"})]})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("button",{type:"button",onClick:()=>q.current?.click(),disabled:o,className:"px-4 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium text-gray-700 disabled:opacity-50 transition",children:a(o?"specialist_setup.step2.photo_uploading":"specialist_setup.step2.photo_btn")}),(0,d.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:a("specialist_setup.step2.photo_hint")})]}),(0,d.jsx)("input",{ref:q,type:"file",accept:"image/jpeg,image/png,image/webp",className:"hidden",onChange:s})]})]}),(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a("specialist_setup.step2.bio_label")}),(0,d.jsx)("textarea",{value:f,onChange:a=>g(a.target.value),rows:4,maxLength:1e3,placeholder:a("specialist_setup.step2.bio_placeholder"),className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none"})]}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a("specialist_setup.step2.phone_label")}),(0,d.jsx)("input",{type:"tel",value:h,onChange:a=>j(a.target.value),placeholder:a("specialist_setup.step2.phone_placeholder"),className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"})]}),(0,d.jsx)(r,{t:a,onBack:c,onNext:t,loading:k})]})}function n({t:a,onNext:b,onBack:c,onCardCreated:f}){let[g,h]=(0,e.useState)(""),[j,k]=(0,e.useState)(""),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)("");async function p(){if(!g.trim())return void o(a("specialist_setup.step3.title_required"));o(""),m(!0);try{let a=await i.eR({title:g.trim(),description:j||void 0});f(a),b()}catch{}finally{m(!1)}}return(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:a("specialist_setup.step3.title")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm mb-6",children:a("specialist_setup.step3.subtitle")}),(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a("specialist_setup.step3.title_label")}),(0,d.jsx)("input",{value:g,onChange:a=>{h(a.target.value),n&&o("")},maxLength:200,placeholder:a("specialist_setup.step3.title_placeholder"),className:`w-full border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 ${n?"border-red-400":"border-gray-300"}`}),n&&(0,d.jsx)("p",{className:"text-red-500 text-xs mt-1",children:n})]}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a("specialist_setup.step3.desc_label")}),(0,d.jsx)("textarea",{value:j,onChange:a=>k(a.target.value),rows:5,maxLength:1e3,placeholder:a("specialist_setup.step3.desc_placeholder"),className:"w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400 resize-none"})]}),(0,d.jsx)(r,{t:a,onBack:c,onNext:p,loading:l})]})}function o({t:a,onNext:b,onBack:c,card:f,catLocale:g}){let[h,k]=(0,e.useState)(f?.skills??[]),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(f?.categories??[]),[p,q]=(0,e.useState)([]),[s,t]=(0,e.useState)([]),[u,v]=(0,e.useState)(!1);function w(a){let b=a.trim();b&&!h.includes(b)&&k([...h,b]),m("")}function x(a,b=[]){n.includes(a)?o(n.filter(c=>c!==a&&!b.includes(c))):o([...new Set([...n,a,...b])])}async function y(){if(!f)return void b();v(!0);try{await i.zc(f.id,{skills:h,categories:n}),b()}catch{}finally{v(!1)}}return(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:a("specialist_setup.step4.title")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm mb-6",children:a("specialist_setup.step4.subtitle")}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:a("specialist_setup.step4.skills_label")}),h.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:h.map(a=>(0,d.jsxs)("span",{className:"flex items-center gap-1.5 bg-green-50 text-green-700 text-sm px-3 py-1 rounded-full",children:[a,(0,d.jsx)("button",{type:"button",onClick:()=>k(h.filter(b=>b!==a)),className:"text-gray-400 hover:text-green-700 leading-none text-base",children:"\xd7"})]},a))}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{value:l,onChange:a=>m(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),w(l))},placeholder:a("specialist_setup.step4.skills_placeholder"),className:"flex-1 border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-400"}),(0,d.jsx)("button",{type:"button",onClick:()=>w(l),className:"px-4 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium",children:a("specialist_setup.step4.skills_add")})]}),s.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:s.map(a=>a.names[g]??a.names.el).filter((a,b,c)=>c.indexOf(a)===b&&!h.includes(a)).slice(0,12).map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>w(a),className:"text-xs px-2.5 py-1 border border-gray-200 rounded-full text-gray-500 hover:border-green-400 hover:text-green-600 transition",children:["+ ",a]},a))})]}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:a("specialist_setup.step4.categories_label")}),(0,d.jsx)("div",{className:"space-y-2 max-h-64 overflow-y-auto border border-gray-200 rounded-xl p-3",children:p.map(a=>{let b=a.names?.[g]??a.names?.el??a.slug,c=a.children??[],e=c.map(a=>a.slug);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:n.includes(a.slug),onChange:()=>x(a.slug,e),className:"w-4 h-4 rounded border-gray-300 text-green-600 focus:ring-blue-400"}),(0,d.jsxs)("span",{className:"text-sm font-medium text-gray-800 inline-flex items-center gap-1",children:[a.icon&&(0,d.jsx)(j.Ez,{icon:a.icon,alt:b,className:(0,j.V)(a.icon)?"h-4 w-4 object-contain":"text-sm leading-none",fallback:"\uD83D\uDCE6"}),b]})]}),c.length>0&&(0,d.jsx)("div",{className:"ml-6 mt-1.5 space-y-1.5",children:c.map(a=>{let b=a.names?.[g]??a.names?.el??a.slug;return(0,d.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:n.includes(a.slug),onChange:()=>x(a.slug),className:"w-4 h-4 rounded border-gray-300 text-green-600 focus:ring-blue-400"}),(0,d.jsx)("span",{className:"text-sm text-gray-600",children:b})]},a.id)})})]},a.id)})})]}),(0,d.jsx)(r,{t:a,onBack:c,onNext:y,loading:u})]})}function p({t:a,onNext:b,onBack:c,card:f,catLocale:g}){let[h,j]=(0,e.useState)(f?.locations??[]),[k,l]=(0,e.useState)([]),[m,n]=(0,e.useState)(!1);function o(a,b=[]){h.includes(a)?j(h.filter(c=>c!==a&&!b.includes(c))):j([...new Set([...h,a,...b])])}async function p(){if(!f)return void b();n(!0);try{await i.zc(f.id,{locations:h}),b()}catch{}finally{n(!1)}}return(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:a("specialist_setup.step5.title")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm mb-2",children:a("specialist_setup.step5.subtitle")}),(0,d.jsx)("p",{className:"text-xs text-gray-400 mb-5",children:a("specialist_setup.step5.hint")}),(0,d.jsx)("div",{className:"space-y-3 max-h-72 overflow-y-auto border border-gray-200 rounded-xl p-3 mb-6",children:k.map(a=>{let b=a.names?.[g]??a.names?.el??a.slug,c=a.children??[],e=c.map(a=>a.slug);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:h.includes(a.slug),onChange:()=>o(a.slug,e),className:"w-4 h-4 rounded border-gray-300 text-green-600 focus:ring-blue-400"}),(0,d.jsx)("span",{className:"text-sm font-medium text-gray-800",children:b})]}),c.length>0&&(0,d.jsx)("div",{className:"ml-6 mt-1.5 space-y-1.5",children:c.map(a=>{let b=a.names?.[g]??a.names?.el??a.slug;return(0,d.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:h.includes(a.slug),onChange:()=>o(a.slug),className:"w-4 h-4 rounded border-gray-300 text-green-600 focus:ring-blue-400"}),(0,d.jsx)("span",{className:"text-sm text-gray-600",children:b})]},a.id)})})]},a.id)})}),(0,d.jsx)(r,{t:a,onBack:c,onNext:p,loading:m,isLast:!0})]})}function q({t:a}){return(0,d.jsxs)("div",{className:"text-center py-4",children:[(0,d.jsx)("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,d.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,d.jsx)("path",{d:"M20 6L9 17l-5-5"})})}),(0,d.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:a("specialist_setup.done.title")}),(0,d.jsx)("p",{className:"text-green-600 font-medium mb-4",children:a("specialist_setup.done.subtitle")}),(0,d.jsx)("p",{className:"text-gray-500 text-sm leading-relaxed mb-8 max-w-sm mx-auto",children:a("specialist_setup.done.desc")}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[(0,d.jsx)("a",{href:"/profile",className:"px-6 py-3 bg-green-600 text-white rounded-xl font-semibold hover:bg-green-700 transition text-center",children:a("specialist_setup.go_to_profile")}),(0,d.jsx)("a",{href:"/tasks",className:"px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition text-center",children:a("specialist_setup.browse_tasks")})]})]})}function r({t:a,onBack:b,onNext:c,loading:e,isLast:f}){return(0,d.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"flex-1 px-4 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition",children:["← ",a("specialist_setup.back")]}),(0,d.jsx)("button",{type:"button",onClick:c,disabled:e,className:"flex-[2] px-4 py-3 bg-green-600 text-white rounded-xl font-semibold hover:bg-green-700 disabled:opacity-50 transition",children:e?"...":f?a("specialist_setup.finish"):`${a("specialist_setup.next")} →`})]})}function s(){let{data:a,isPending:b}=(0,g.wV)();(0,f.useRouter)();let{t:c,locale:i}=(0,h.Y)(),[j,r]=(0,e.useState)(1),[s,t]=(0,e.useState)(null),u="ru"===i?"ru":"uk"===i?"uk":"en"===i?"en":"el";if(b||!a)return(0,d.jsx)("div",{className:"text-center py-20 text-white",children:c("common.loading")});let v=j>5;return(0,d.jsx)("div",{className:"min-h-screen py-10 px-4",children:(0,d.jsxs)("div",{className:"max-w-lg mx-auto",children:[(0,d.jsxs)("div",{className:"text-center mb-6",children:[(0,d.jsx)("h1",{className:"text-lg font-semibold text-white/90",children:c("specialist_setup.page_title")}),!v&&(0,d.jsx)("p",{className:"text-sm text-white/50 mt-0.5",children:c("specialist_setup.step_of").replace("{current}",String(j)).replace("{total}",String(5))})]}),!v&&(0,d.jsx)(k,{current:j,total:5}),(0,d.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-200 p-6 shadow-sm",children:[v&&(0,d.jsx)(q,{t:c}),1===j&&(0,d.jsx)(l,{t:c,onNext:()=>r(2)}),2===j&&(0,d.jsx)(m,{t:c,onNext:()=>r(3),onBack:()=>r(1)}),3===j&&(0,d.jsx)(n,{t:c,onNext:()=>r(4),onBack:()=>r(2),onCardCreated:t}),4===j&&(0,d.jsx)(o,{t:c,onNext:()=>r(5),onBack:()=>r(3),card:s,catLocale:u}),5===j&&(0,d.jsx)(p,{t:c,onNext:()=>r(6),onBack:()=>r(4),card:s,catLocale:u})]}),j>=2&&j<=5&&(0,d.jsx)("div",{className:"text-center mt-4",children:(0,d.jsx)("button",{type:"button",onClick:()=>r(j+1),className:"text-sm text-white/50 hover:text-white/80 transition",children:c("specialist_setup.skip")})})]})})}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},44972:(a,b,c)=>{"use strict";c.d(b,{Ez:()=>g,V:()=>f});var d=c(78157),e=c(31768);function f(a){if(!a)return!1;let b=a.trim();return b.startsWith("http://")||b.startsWith("https://")||b.startsWith("/")}function g({icon:a,alt:b="",className:c,fallback:g="\uD83D\uDCE6"}){let h=(a||"").trim(),[i,j]=(0,e.useState)(!1),k=(0,e.useMemo)(()=>f(h)?h.startsWith("/api/")?`https://api.canhelp.gr${h}`:h:"",[h]),l="/category-icons/package.svg";return f(h)?i&&h!==l?(0,d.jsx)("img",{src:l,alt:b,className:c,loading:"lazy",onError:()=>j(!0)}):i&&h===l?(0,d.jsx)("span",{className:c,children:g}):(0,d.jsx)("img",{src:k,alt:b,className:c,loading:"lazy",onError:()=>j(!0)}):(0,d.jsx)("span",{className:c,children:h||g})}},46767:(a,b,c)=>{Promise.resolve().then(c.bind(c,28527))},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{"use strict";a.exports=require("zlib")},79428:a=>{"use strict";a.exports=require("buffer")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},83997:a=>{"use strict";a.exports=require("tty")},84113:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>J,handler:()=>L,pages:()=>I,routeModule:()=>K,tree:()=>H});var d=c(73653),e=c(97714),f=c(85250),g=c(37587),h=c(22369),i=c(1889),j=c(96232),k=c(22841),l=c(46537),m=c(46027),n=c(78559),o=c(75928),p=c(19374),q=c(65971),r=c(261),s=c(79898),t=c(32967),u=c(26713),v=c(40139),w=c(14248),x=c(59580),y=c(57749),z=c(53123),A=c(89745),B=c(86439),C=c(58671),D=c.n(C),E=c(18283),F=c(39818),G={};for(let a in E)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(G[a]=()=>E[a]);c.d(b,G);let H={children:["",{children:["specialist-setup",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,2069)),"/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"]}]},{metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,2645))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,45639))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,47570)),"/opt/canhelp/apps/web/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,58671,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.bind(c,33506)),"/opt/canhelp/apps/web/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,15034,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,54693,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,2645))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,45639))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]}.children,I=["/opt/canhelp/apps/web/src/app/specialist-setup/page.tsx"],J={require:c,loadChunk:()=>Promise.resolve()},K=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/specialist-setup/page",pathname:"/specialist-setup",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:H},distDir:".next",relativeProjectDir:""});async function L(a,b,d){var C;let G="/specialist-setup/page";"/index"===G&&(G="/");let M=(0,h.getRequestMeta)(a,"postponed"),N=(0,h.getRequestMeta)(a,"minimalMode"),O=await K.prepare(a,b,{srcPage:G,multiZoneDraftMode:!1});if(!O)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:P,query:Q,params:R,parsedUrl:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,interceptionRoutePatterns:ae}=O,af=S.pathname||"/",ag=(0,r.normalizeAppPath)(G),{isOnDemandRevalidate:ah}=O,ai=K.match(af,$),aj=!!$.routes[aa],ak=!!(ai||aj||$.routes[ag]),al=a.headers["user-agent"]||"",am=(0,u.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[t.RSC_HEADER],aq=(0,s.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr)&&(null==(C=$.routes[ag]??$.dynamicRoutes[ag])?void 0:C.renderingMode)==="PARTIALLY_STATIC",as=!1,at=!1,au=ar?M:void 0,av=ar&&ap&&!ao,aw=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ax=!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots);an&&ar&&(ak=!1,ax=!1);let ay=!0===K.isDev||!ak||"string"==typeof M||av,az=an&&ar,aA=null;_||!ak||ay||aq||au||av||(aA=aa);let aB=aA;!aB&&K.isDev&&(aB=aa),K.isDev||_||!ak||!ap||av||(0,k.d)(a.headers);let aC={...E,tree:H,pages:I,GlobalError:D(),handler:L,routeModule:K,__next_app__:J};X&&Y&&(0,o.setReferenceManifestsSingleton)({page:G,clientReferenceManifest:Y,serverActionsManifest:X,serverModuleMap:(0,q.createServerModuleMap)({serverActionsManifest:X})});let aD=a.method||"GET",aE=(0,g.getTracer)(),aF=aE.getActiveScopeSpan();try{let f=K.getVaryHeader(aa,ae);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return K.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aE.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=`${aD} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aD} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:Q,params:R,page:ag,sharedContext:{buildId:P},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aC,Component:(0,j.T)(aC),params:R,routeModule:K,page:G,postponed:f,shouldWaitOnAllReady:az,serveStreamingMetadata:ax,supportsDynamicResponse:"string"==typeof f||ay,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,serverActionsManifest:X,clientReferenceManifest:Y,setIsrStatus:null==ac?void 0:ac.setIsrStatus,dir:c(33873).join(process.cwd(),K.relativeProjectDir),isDraftMode:_,isRevalidate:ak&&!f&&!av,botType:am,isOnDemandRevalidate:ah,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,previewProps:$.preview,deploymentId:ad.deploymentId,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,devtoolSegmentExplorer:ad.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ad.experimental.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...as?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:as}:{},experimental:{isRoutePPREnabled:ar,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,cacheComponents:!!ad.experimental.cacheComponents,clientSegmentCache:!!ad.experimental.clientSegmentCache,clientParamParsing:!!ad.experimental.clientParamParsing,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>K.onRequestError(a,b,d,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:K.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[y.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,ak&&(null==n?void 0:n.revalidate)===0&&!K.isDev&&!ar){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(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:v.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},o=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===K.isDev,l=c||b.writableEnded;if(ah&&ab&&!f&&!N)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ai&&(j=(0,w.parseFallbackField)(ai.fallback)),j===w.FallbackMode.PRERENDER&&(0,u.isBot)(al)&&(!ar||an)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ah=!0),ah&&(j!==w.FallbackMode.NOT_FOUND||f)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),!N&&j!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aB&&!l&&!_&&T&&(k||!aj)){let b;if((k||ai)&&j===w.FallbackMode.NOT_FOUND)throw new B.NoFallbackError;if(ar&&!ap){let c="string"==typeof(null==ai?void 0:ai.fallback)?ai.fallback:k?ag:null;if(b=await K.handleResponse({cacheKey:c,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:ar,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||at?(0,n.u)(ag):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let o=ah||g||!au?void 0:au;if(as&&void 0!==o)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=T&&ar&&((0,h.getRequestMeta)(a,"renderFallbackShell")||at)?(0,n.u)(af):null;return m({span:i,postponed:o,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,n=await K.handleResponse({cacheKey:aA,responseGenerator:a=>o({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ah,isRoutePPREnabled:ar,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),K.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!n){if(aA)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof n.value.postponed;ak&&!av&&(!p||ao)&&(N||b.setHeader("x-nextjs-cache",ah?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=n;if(au)l={revalidate:0,expire:void 0};else if(N&&ap&&!ao&&ar)l={revalidate:0,expire:void 0};else if(!K.isDev)if(_)l={revalidate:0,expire:void 0};else if(ak){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:y.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(n.cacheControl=l,"string"==typeof aw&&(null==q?void 0:q.kind)===v.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];N&&ak&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(aw);return void 0!==d?(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...n,value:{...n.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&au)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(N&&ak||delete a[y.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 s=null==(g=q.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(N&&ak&&s&&"string"==typeof s&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,s),!q.status||ap&&ar||(b.statusCode=q.status),!N&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),p&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){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,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:av?{revalidate:0,expire:void 0}:n.cacheControl})}return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(q.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let u=q.html;if(!p||N||ap)return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:n.cacheControl});if(as)return u.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}});let w=new TransformStream;return u.push(w.readable),m({span:c,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)!==v.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(w.writable)}).catch(a=>{w.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}})};if(!aF)return await aE.withPropagatedContext(a.headers,()=>aE.trace(i.BaseServerSpan.handleRequest,{spanName:`${aD} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aD,"http.target":a.url}},p));await p(aF)}catch(b){throw b instanceof B.NoFallbackError||await K.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:ak,isOnDemandRevalidate:ah})},ac),b}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{"use strict";a.exports=require("net")},93623:(a,b,c)=>{Promise.resolve().then(c.bind(c,2069))},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[901,652,809],()=>b(b.s=84113));module.exports=c})();
Save
cmd:
run