1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6132],{14004:(e,t,a)=>{a.d(t,{CY:()=>n,N0:()=>u,Sy:()=>m,Vh:()=>l,dq:()=>d,rC:()=>p});var s=a(35317),o=a(44046);function r(e,t){let a=e.freeReport.trim(),s=(e.phenomena||[]).map(e=>{var t,a;return null!=(a=null==(t=o.EO.find(t=>t.id===e))?void 0:t.label)?a:e}).filter(Boolean),r=["\uD83E\uDDEA Experimento da Catalepsia Projetiva \xb7 realiza\xe7\xe3o #".concat(t),"".concat(e.tries," tentativa(s) \xb7 intensidade â
").concat(e.intensity)];return s.length&&r.push("Fen\xf4menos: ".concat(s.join(" \xb7 "))),a?r.push("",a):r.push("","Relato do formul\xe1rio enviado (sem texto livre adicional). Toque no tema para ver o experimento."),r.join("\n").slice(0,2e4)}let i="gva-exp-soremp-session";function l(e){try{sessionStorage.setItem(i,JSON.stringify(e))}catch(e){}}function n(){try{let e=sessionStorage.getItem(i);if(!e)return null;return JSON.parse(e)}catch(e){return null}}function c(e){let t={};for(let[a,s]of Object.entries(e))void 0!==s&&(t[a]=s);return t}class d extends Error{constructor(e){super(e),this.name="SorempReportError"}}async function m(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.bs;return(await (0,s.GG)((0,s.collection)(e,"users/".concat(t,"/experimentReports")))).docs.map(e=>({id:e.id,...e.data()})).filter(e=>e.experimentId===a).sort((e,t)=>{let a=e.createdAt&&"function"==typeof e.createdAt.toMillis?e.createdAt.toMillis():0;return(t.createdAt&&"function"==typeof t.createdAt.toMillis?t.createdAt.toMillis():0)-a})}async function u(e,t,l){try{var n,m,u,p,x,h,v,b,y,f,g,N,S,j,A;let d=(0,s.collection)(e,"users/".concat(t.uid,"/experimentReports")),w=(await (0,s.GG)(d)).docs.filter(e=>e.data().experimentId===o.bs).length+1,C="".concat(o.bs,"_").concat(t.uid,"_").concat(Date.now()),D=(0,s.doc)(e,"users/".concat(t.uid,"/experimentReports"),C),R=(0,s.doc)(e,"users/".concat(t.uid,"/experimentSummaries"),o.bs),T=(0,s.doc)(e,"experiments",o.bs),I=(0,s.doc)(e,"experiments",o.bs,"communityReports",C),k=await (0,s.getDoc)(R),M=k.exists()?k.data():null,P=(l.dateIso||new Date().toISOString()).slice(0,10),E=1,_=null!=(h=null==M?void 0:M.longestStreakDays)?h:0;if((null==M?void 0:M.lastAt)&&"function"==typeof M.lastAt.toDate)try{let e=M.lastAt.toDate().toISOString().slice(0,10),t=new Date(e+"T12:00:00"),a=new Date(P+"T12:00:00"),s=Math.round((a.getTime()-t.getTime())/864e5);0===s?E=M.currentStreakDays||1:1===s&&(E=(M.currentStreakDays||0)+1)}catch(e){E=1}_=Math.max(_,E);let O=!M||(null!=(v=M.timesCompleted)?v:0)===0,V=c({experimentId:o.bs,dateIso:P,startedAtIso:l.startedAtIso||new Date().toISOString(),bedtimeApprox:(null==(n=l.bedtimeApprox)?void 0:n.trim())||null,tries:l.tries,completedAll:l.completedAll,notCompletedReason:l.completedAll?null:(null==(m=l.notCompletedReason)?void 0:m.trim())||null,sleepQuality:l.sleepQuality,firstSleepTry:l.firstSleepTry,fellAsleepFast:l.fellAsleepFast,dreamRecall:l.dreamRecall,dreamsSoonAfterSleep:l.dreamsSoonAfterSleep,phenomena:Array.isArray(l.phenomena)?l.phenomena:[],intensity:l.intensity,sleepPlace:l.sleepPlace,sleepPosition:l.sleepPosition,environment:Array.isArray(l.environment)?l.environment:[],energyState:Array.isArray(l.energyState)?l.energyState:[],comfort:l.comfort,disruptions:Array.isArray(l.disruptions)?l.disruptions:[],freeReport:l.freeReport.trim(),shareMode:"named",estimatedMinutes:l.estimatedMinutes||20*l.tries,userId:t.uid,displayName:null!=(b=t.displayName)?b:null,photoURL:null!=(y=t.photoURL)?y:null,realizationNumber:w,createdAt:(0,s.serverTimestamp)()});await (0,s.setDoc)(D,V);let J=c({experimentId:o.bs,title:"Experimento da Catalepsia Projetiva (Paralisia do Sono)",timesCompleted:(null!=(f=null==M?void 0:M.timesCompleted)?f:0)+1,reportsSubmitted:(null!=(g=null==M?void 0:M.reportsSubmitted)?g:0)+1,firstAt:null!=(N=null==M?void 0:M.firstAt)?N:(0,s.serverTimestamp)(),lastAt:(0,s.serverTimestamp)(),totalMinutes:(null!=(S=null==M?void 0:M.totalMinutes)?S:0)+(l.estimatedMinutes||20*l.tries),lastNote:l.freeReport.trim().slice(0,280)||null,longestStreakDays:_,currentStreakDays:E});await (0,s.setDoc)(R,J,{merge:!0});
1let q=l.sleepPosition||"back",z=l.phenomena.includes("paralisia"),G=l.phenomena.includes("vibracao"),U=l.phenomena.includes("flutuacao"),L="yes"===l.dreamsSoonAfterSleep||"none"!==l.dreamRecall,F=l.estimatedMinutes||20*l.tries;await (0,s.setDoc)(T,{experimentId:o.bs,totalParticipants:(0,s.GV)(+!!O),totalRuns:(0,s.GV)(1),totalReports:(0,s.GV)(1),sumTries:(0,s.GV)(l.tries),countDreamsYes:(0,s.GV)(+!!L),countParalysis:(0,s.GV)(+!!z),countVibration:(0,s.GV)(+!!G),countFloat:(0,s.GV)(+!!U),["positionCounts.".concat(q)]:(0,s.GV)(1),totalMinutes:(0,s.GV)(F),updatedAt:(0,s.serverTimestamp)()},{merge:!0});let Q=(null==(u=t.displayName)?void 0:u.trim())||"Viajante",B=l.freeReport.trim().slice(0,2e4)||r(l,w).slice(0,2e4),Y=c({experimentId:o.bs,userId:t.uid,displayName:Q,isAnonymous:!1,createdAt:(0,s.serverTimestamp)(),realizationNumber:w,freeReport:B,phenomena:Array.isArray(l.phenomena)?l.phenomena:[],intensity:l.intensity,tries:l.tries,completedAll:l.completedAll,notCompletedReason:l.completedAll?null:(null==(p=l.notCompletedReason)?void 0:p.trim())||null,bedtimeApprox:(null==(x=l.bedtimeApprox)?void 0:x.trim())||null,sleepQuality:l.sleepQuality,firstSleepTry:l.firstSleepTry,fellAsleepFast:l.fellAsleepFast,dreamRecall:l.dreamRecall,dreamsSoonAfterSleep:l.dreamsSoonAfterSleep,sleepPlace:l.sleepPlace,sleepPosition:l.sleepPosition,environment:Array.isArray(l.environment)?l.environment:[],energyState:Array.isArray(l.energyState)?l.energyState:[],comfort:l.comfort,disruptions:Array.isArray(l.disruptions)?l.disruptions:[],estimatedMinutes:l.estimatedMinutes||20*l.tries});await (0,s.setDoc)(I,Y);try{let r={userId:t.uid,userName:Q,userAvatar:null!=(j=t.photoURL)?j:null,type:"COMMUNITY_POST_CREATED",timestamp:(0,s.serverTimestamp)(),lastCommentTimestamp:(0,s.serverTimestamp)(),details:{postText:B,postTopicKind:"experiment",postTopicId:o.bs,postTopicTitle:"Experimento da Catalepsia Projetiva (Paralisia do Sono)",postTopicSubtitle:"Realiza\xe7\xe3o #".concat(w," \xb7 ").concat(l.tries," tentativa(s)"),experimentId:o.bs,experimentReportId:C,realizationNumber:w,intensity:l.intensity,tries:l.tries,phenomena:Array.isArray(l.phenomena)?l.phenomena:[]},likes:0,likedBy:[],commentCount:0,hidden:!1},i=await (0,s.addDoc)((0,s.collection)(e,"activities"),r);try{await (0,s.setDoc)(D,{feedActivityId:i.id},{merge:!0})}catch(e){}try{await (0,s.setDoc)(I,{feedActivityId:i.id},{merge:!0})}catch(e){}window.dispatchEvent(new CustomEvent("activity-created"));try{let{getClientIdToken:e}=await a.e(8420).then(a.bind(a,78420)),{createActivitySupabase:s}=await a.e(65).then(a.bind(a,30065)),o=await e();o&&s(o,{firebaseUid:t.uid,userName:Q,userAvatar:null!=(A=t.photoURL)?A:null,type:"COMMUNITY_POST_CREATED",details:r.details})}catch(e){}try{let{notifyFollowersOfActivity:s}=await Promise.all([a.e(8010),a.e(3473),a.e(8592)]).then(a.bind(a,16211));s(e,{actor:{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL},activity:{...r,id:i.id},activityId:i.id})}catch(e){}}catch(e){console.warn("[submitSorempReport] feed activity:",e)}try{sessionStorage.removeItem(i)}catch(e){}return{reportId:C,realizationNumber:w}}catch(e){if(console.error("[submitSorempReport]",e),e instanceof d)throw e;throw new d(function(e){if(!e||"object"!=typeof e)return"N\xe3o foi poss\xedvel salvar. Tente de novo em instantes.";let t="code"in e?String(e.code):"",a="message"in e?String(e.message):"";return"permission-denied"===t?"Sem permiss\xe3o para salvar. Saia e entre de novo na conta, depois envie o relat\xf3rio.":"unavailable"===t||"deadline-exceeded"===t?"Rede inst\xe1vel. Verifique a internet e tente de novo.":a.includes("undefined")||a.includes("Unsupported field value")?"Dados incompletos no formul\xe1rio. Preencha os campos e tente de novo.":"unauthenticated"===t?"Sess\xe3o expirada. Fa\xe7a login novamente para enviar o relat\xf3rio.":"N\xe3o foi poss\xedvel salvar. Tente de novo em instantes."}(e))}}async function p(e,t){var a,i,l,n;let d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.bs,u=await m(e,t.uid,d);if(0===u.length)return 0;let p=new Set;try{for(let a of(await (0,s.GG)((0,s.P)((0,s.collection)(e,"activities"),(0,s._M)("userId","==",t.uid),(0,s._M)("type","==","COMMUNITY_POST_CREATED"),(0,s.AB)(200)))).docs){let e=null==(l=a.data())||null==(i=l.details)?void 0:i.experimentReportId;e&&p.add(e)}}catch(e){}let x=0,h=(null==(a=t.displayName)?void 0:a.trim())||"Viajante";for(let a of u){if(!a.id||a.feedActivityId||p.has(a.id))continue;let o=(a.freeReport||"").trim()||r(a,a.realizationNumber||1),i=function(e){let t=e.createdAt;if(t&&"function"==typeof t.toDate)try{return s.Dc.fromDate(t.toDate())}catch(e){}if(t instanceof Date&&!Number.isNaN(t.getTime()))return s.Dc.fromDate(t);if(t&&"object"==typeof t&&"number"==typeof t.seconds)return new s.Dc(t.seconds,0);if(e.startedAtIso){let t=new Date(e.startedAtIso);if(!Number.isNaN(t.getTime()))return s.Dc.fromDate(t)}if(e.dateIso){let t=new Date("".concat(e.dateIso,"T12:00:00.000Z"));if(!Number.isNaN(t.getTime()))return s.Dc.fromDate(t)}return(0,s.serverTimestamp)()}(a),l=(0,s.doc)(e,"experiments",d,"communityReports",a.id);try{(await (0,s.getDoc)(l)).exists()||await (0,s.setDoc)(l,c({experimentId:d,userId:t.uid,displayName:h,isAnonymous:!1,createdAt:i,realizationNumber:a.realizationNumber,freeReport:o.slice(0,2e4),phenomena:a.phenomena||[],intensity:a.intensity,tries:a.tries,completedAll:a.completedAll,sleepQuality:a.sleepQuality,dreamRecall:a.dreamRecall,sleepPlace:a.sleepPlace,sleepPosition:a.sleepPosition,comfort:a.comfort,estimatedMinutes:a.estimatedMinutes}))}catch(e){}try{let r={userId:t.uid,userName:h,userAvatar:null!=(n=t.photoURL)?n:null,type:"COMMUNITY_POST_CREATED",timestamp:i,lastCommentTimestamp:i,details:{postText:o.slice(0,2e4),postTopicKind:"experiment",postTopicId:d,postTopicTitle:"Experimento da Catalepsia Projetiva (Paralisia do Sono)",postTopicSubtitle:"Realiza\xe7\xe3o #".concat(a.realizationNumber," \xb7 ").concat(a.tries," tentativa(s)"),experimentId:d,experimentReportId:a.id,realizationNumber:a.realizationNumber,intensity:a.intensity,tries:a.tries,phenomena:a.phenomena||[]},likes:0,likedBy:[],commentCount:0,hidden:!1},l=await (0,s.addDoc)((0,s.collection)(e,"activities"),r);await (0,s.setDoc)((0,s.doc)(e,"users/".concat(t.uid,"/experimentReports"),a.id),{feedActivityId:l.id,shareMode:"named"},{merge:!0}),p.add(a.id),x+=1}catch(e){console.warn("[backfillExperimentFeedPosts]",a.id,e)}}return x>0&&window.dispatchEvent(new CustomEvent("activity-created")),x}},16132:(e,t,a)=>{a.d(t,{p:()=>b});var s=a(95155),o=a(12115),r=a(35695),i=a(50172),l=a(30285),n=a(66695),c=a(62523),d=a(85057),m=a(88539),u=a(59395),p=a(44046
1),x=a(14004),h=a(59434);function v(e){let{name:t,value:a,onChange:o,options:r}=e;return(0,s.jsx)("div",{className:"flex flex-col gap-2",children:r.map(e=>(0,s.jsxs)("label",{className:(0,h.cn)("flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-2 text-sm transition-colors",a===e.value?"border-mystic-gold/50 bg-mystic-gold/10 text-text-primary":"border-white/10 text-text-secondary hover:border-astral-violet/30"),children:[(0,s.jsx)("input",{type:"radio",name:t,className:"accent-mystic-gold",checked:a===e.value,onChange:()=>o(e.value)}),e.label]},e.value))})}function b(){let{user:e}=(0,u.useUser)(),t=(0,u.useFirestore)(),a=(0,r.useRouter)(),b=(0,o.useMemo)(()=>(0,x.CY)(),[]),[y,f]=(0,o.useState)(""),[g,N]=(0,o.useState)((null==b?void 0:b.tries)||3),[S,j]=(0,o.useState)(!0),[A,w]=(0,o.useState)(""),[C,D]=(0,o.useState)("some"),[R,T]=(0,o.useState)("unknown"),[I,k]=(0,o.useState)("unsure"),[M,P]=(0,o.useState)("none"),[E,_]=(0,o.useState)("unsure"),[O,V]=(0,o.useState)([]),[J,q]=(0,o.useState)(3),[z,G]=(0,o.useState)("bed"),[U,L]=(0,o.useState)("back"),[F,Q]=(0,o.useState)(["Escuro","Silencioso"]),[B,Y]=(0,o.useState)([]),[Z,$]=(0,o.useState)("comfy"),[H,K]=(0,o.useState)([]),[W,X]=(0,o.useState)(""),[ee,et]=(0,o.useState)(!1),[ea,es]=(0,o.useState)(null),[eo,er]=(0,o.useState)(!1),ei=async a=>{if(a.preventDefault(),!e||!t)return void es("Fa\xe7a login para enviar o relat\xf3rio.");if(!W.trim())return void es("Escreva um breve relato do que aconteceu (mesmo que ân\xe3o senti nadaâ).");et(!0),es(null);try{var s,o,r;let a=new Date,i={experimentId:"soremp",dateIso:(null==b||null==(s=b.startedAtIso)?void 0:s.slice(0,10))||a.toISOString().slice(0,10),startedAtIso:(null==b?void 0:b.startedAtIso)||a.toISOString(),bedtimeApprox:y.trim()||void 0,tries:g,completedAll:S,notCompletedReason:S?void 0:A.trim()||void 0,sleepQuality:C,firstSleepTry:R,fellAsleepFast:I,dreamRecall:M,dreamsSoonAfterSleep:E,phenomena:O,intensity:J,sleepPlace:z,sleepPosition:U,environment:F,energyState:B,comfort:Z,disruptions:H,freeReport:W.trim(),shareMode:"named",estimatedMinutes:(null==b?void 0:b.estimatedMinutes)||20*g};await (0,x.N0)(t,{uid:e.uid,displayName:null!=(o=e.displayName)?o:null,photoURL:null!=(r=e.photoURL)?r:null},i),er(!0)}catch(e){console.error("[SorempReportForm]",e),es(e instanceof x.dq?e.message:"N\xe3o foi poss\xedvel salvar. Tente de novo em instantes.")}finally{et(!1)}};return eo?(0,s.jsxs)(n.Zp,{className:"glass-card space-y-4 border-mystic-gold/40 p-6 text-center shadow-[0_0_28px_rgba(212,175,55,0.12)]",children:[(0,s.jsx)("p",{className:"font-cinzel text-xl font-bold text-mystic-gold",children:"Relat\xf3rio enviado"}),(0,s.jsxs)("p",{className:"text-sm text-text-secondary",children:["Obrigado. Seu relato foi salvo no hist\xf3rico, no"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"feed da p\xe1gina inicial"})," e no"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"seu perfil"})," â a comunidade pode curtir e comentar."]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-center",children:[(0,s.jsx)(l.$,{onClick:()=>a.push("/dashboard"),children:"Ver no feed"}),(0,s.jsx)(l.$,{variant:"secondary",onClick:()=>a.push("/dashboard/experimentos/soremp?tab=meus"),children:"Ver meu formul\xe1rio"})]})]}):(0,s.jsxs)("form",{onSubmit:ei,className:"space-y-6 rounded-2xl border border-mystic-gold/35 bg-gradient-to-b from-mystic-gold/10 via-night-primary/40 to-transparent p-4 shadow-[0_0_32px_rgba(212,175,55,0.1)] sm:p-6",children:[(0,s.jsxs)("div",{className:"space-y-2 border-b border-mystic-gold/25 pb-4",children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-[0.16em] text-mystic-gold",children:"Catalepsia \xb7 relat\xf3rio"}),(0,s.jsx)("h2",{className:"font-cinzel text-xl font-bold text-text-primary sm:text-2xl",children:"Formul\xe1rio do experimento"}),(0,s.jsx)("p",{className:"text-sm leading-relaxed text-text-secondary",children:"Depois da sess\xe3o (ou quando puder), preencha com honestidade. Leva cerca de dois minutos â seu relato entra no feed e no perfil."})]}),(0,s.jsxs)(n.Zp,{className:"glass-card space-y-3 border-astral-vi
1olet/30 p-5",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-primary",children:"Informa\xe7\xf5es b\xe1sicas"}),(0,s.jsxs)("p",{className:"text-xs text-text-secondary",children:["Data e hor\xe1rio de in\xedcio preenchidos automaticamente",b?" (".concat(new Date(b.startedAtIso).toLocaleString("pt-BR"),")"):"","."]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(d.J,{children:"Hor\xe1rio aproximado em que foi dormir"}),(0,s.jsx)(c.p,{type:"time",value:y,onChange:e=>f(e.target.value),className:"border-white/10 bg-white/5"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(d.J,{children:"Quantas tentativas realizou?"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:[1,2,3,4,5].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>N(e),className:(0,h.cn)("h-10 w-10 rounded-xl border text-sm font-bold",g===e?"border-mystic-gold bg-mystic-gold/20 text-mystic-gold":"border-white/10 text-text-secondary"),children:e},e))})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(d.J,{children:"Voc\xea concluiu todas as tentativas?"}),(0,s.jsx)(v,{name:"completed",value:S?"yes":"no",onChange:e=>j("yes"===e),options:[{value:"yes",label:"Sim"},{value:"no",label:"N\xe3o"}]}),!S&&(0,s.jsx)(m.T,{value:A,onChange:e=>w(e.target.value),placeholder:"Qual foi o motivo?",className:"mt-2 min-h-[60px] border-white/10 bg-white/5"})]})]}),(0,s.jsxs)(n.Zp,{className:"glass-card space-y-3 border-astral-violet/30 p-5",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-primary",children:"Sobre o sono"}),(0,s.jsx)(d.J,{children:"Voc\xea acredita que conseguiu dormir?"}),(0,s.jsx)(v,{name:"sleepQ",value:C,onChange:e=>D(e),options:[{value:"none",label:"N\xe3o consegui dormir"},{value:"little",label:"Dormi muito pouco"},{value:"some",label:"Dormi algumas vezes"},{value:"normal",label:"Dormi normalmente"}]}),(0,s.jsx)(d.J,{className:"mt-3 block",children:"Em qual tentativa adormeceu primeiro?"}),(0,s.jsx)(v,{name:"firstTry",value:R,onChange:e=>T(e),options:[{value:"1",label:"Primeira"},{value:"2",label:"Segunda"},{value:"3",label:"Terceira"},{value:"4",label:"Quarta"},{value:"5",label:"Quinta"},{value:"unknown",label:"N\xe3o sei"}]}),(0,s.jsx)(d.J,{className:"mt-3 block",children:"Voc\xea acha que adormeceu rapidamente?"}),(0,s.jsx)(v,{name:"fast",value:I,onChange:e=>k(e),options:[{value:"yes",label:"Sim"},{value:"no",label:"N\xe3o"},{value:"unsure",label:"N\xe3o tenho certeza"}]}),(0,s.jsx)(d.J,{className:"mt-3 block",children:"Voc\xea lembra de sonhos?"}),(0,s.jsx)(v,{name:"dreams",value:M,onChange:e=>P(e),options:[{value:"none",label:"Nenhum"},{value:"images",label:"Poucas imagens"},{value:"short",label:"Sonho curto"},{value:"long",label:"Sonho longo"},{value:"several",label:"V\xe1rios sonhos"}]}),(0,s.jsx)(d.J,{className:"mt-3 block",children:"Sonhos logo ap\xf3s adormecer?"}),(0,s.jsx)(v,{name:"dreamsSoon",value:E,onChange:e=>_(e),options:[{value:"yes",label:"Sim"},{value:"no",label:"N\xe3o"},{value:"unsure",label:"N\xe3o sei"}]})]}),(0,s.jsxs)(n.Zp,{className:"glass-card space-y-3 border-astral-violet/30 p-5",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-primary",children:"Sobre a consci\xeancia"}),(0,s.jsx)("p",{className:"text-xs text-text-secondary",children:"Marque o que ocorreu em algum momento:"}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:p.EO.map(e=>(0,s.jsxs)("label",{className:(0,h.cn)("flex cursor-pointer items-start gap-2 rounded-lg border px-3 py-2 text-sm",O.includes(e.id)?"border-mystic-gold/40 bg-mystic-gold/10":"border-white/10"),children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-0.5 accent-mystic-gold",checked:O.includes(e.id),onChange:()=>V(t=>((e,t,a)=>{if(a&&t===a)return e.includes(t)?[]:[t];let s=e.includes(t)?e.filter(e=>e!==t):[...e,t];return a&&(s=s.filter(e=>e!==a)),s})(t,e.id,"nenhuma"))}),(0,s.jsx)("span",{className:"text-text-secondary",children:e.label})]},e.id))}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"Intensidade da experi\xeancia (1â5)"}),(0,s.jsx)("div",{className:"flex gap-2",children:[1,2,3,4,5].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>q(e),className:(0,h.cn)("h-11 w-11 rounded-xl border text-sm font-bold",J===e?"border-mystic-gold bg-mystic-gold/25 text-mystic-gold":"border-white/10 text-text-secondary"),children:e},e))})]}),(0,s.jsxs)(n.Zp,{className:"glass-card space-y-3 border-astral-vi
1olet/30 p-5",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-primary",children:"Ambiente"}),(0,s.jsx)(d.J,{children:"Voc\xea dormiu:"}),(0,s.jsx)(v,{name:"place",value:z,onChange:e=>G(e),options:[{value:"bed",label:"Na cama"},{value:"sofa",label:"Sof\xe1"},{value:"chair",label:"Poltrona"},{value:"hammock",label:"Rede"},{value:"other",label:"Outro"}]}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"Posi\xe7\xe3o predominante"}),(0,s.jsx)(v,{name:"pos",value:U,onChange:e=>L(e),options:[{value:"back",label:"De costas"},{value:"right",label:"Lado direito"},{value:"left",label:"Lado esquerdo"},{value:"stomach",label:"Barriga para baixo"}]}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"O ambiente estava:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:["Escuro","Claro","Silencioso","Com televis\xe3o","Com m\xfasica","Com ventilador","Com ar-condicionado","Outro"].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>Q(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:(0,h.cn)("rounded-full border px-3 py-1 text-xs font-medium",F.includes(e)?"border-astral-violet bg-astral-violet/20 text-astral-violet":"border-white/10 text-text-secondary"),children:e},e))}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"Voc\xea estava:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:["Muito cansado","Pouco cansado","Descansado","Ap\xf3s almo\xe7o","Ap\xf3s trabalho","Ap\xf3s estudo","Ap\xf3s exerc\xedcio f\xedsico"].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>Y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:(0,h.cn)("rounded-full border px-3 py-1 text-xs font-medium",B.includes(e)?"border-mystic-gold bg-mystic-gold/15 text-mystic-gold":"border-white/10 text-text-secondary"),children:e},e))}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"O experimento foi confort\xe1vel?"}),(0,s.jsx)(v,{name:"comfort",value:Z,onChange:e=>$(e),options:[{value:"very_comfy",label:"Muito confort\xe1vel"},{value:"comfy",label:"Confort\xe1vel"},{value:"neutral",label:"Indiferente"},{value:"uncomfortable",label:"Desconfort\xe1vel"},{value:"very_uncomfortable",label:"Muito desconfort\xe1vel"}]}),(0,s.jsx)(d.J,{className:"mt-2 block",children:"Houve algo que atrapalhou?"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:["Barulho","Luz","Celular","Ansiedade","Dor","Coceira","Temperatura","Animal de estima\xe7\xe3o","Interrup\xe7\xe3o de outra pessoa","Outro"].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>K(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:(0,h.cn)("rounded-full border px-3 py-1 text-xs font-medium",H.includes(e)?"border-destructive/40 bg-destructive/10 text-destructive":"border-white/10 text-text-secondary"),children:e},e))})]}),(0,s.jsxs)(n.Zp,{className:"glass-card space-y-3 border-mystic-gold/30 p-5",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-primary",children:"Relato livre"}),(0,s.jsx)("p",{className:"text-xs text-text-secondary",children:"Conte com suas palavras. N\xe3o se preocupe em escrever bonito. Quanto mais detalhes, melhor."}),(0,s.jsx)(m.T,{required:!0,value:W,onChange:e=>X(e.target.value),placeholder:"Escreva exatamente como voc\xea percebeuâ¦",className:"min-h-[140px] border-white/10 bg-white/5"}),(0,s.jsxs)("div",{className:"rounded-xl border border-mystic-gold/25 bg-mystic-gold/10 px-3 py-3 text-sm text-text-secondary",children:[(0,s.jsx)("p",{className:"font-medium text-text-primary",children:"Experimento p\xfablico"}),(0,s.jsxs)("p",{className:"mt-1",children:["N\xe3o existe envio an\xf4nimo nem privado. Ao enviar, o resultado vai com o seu nome",(null==e?void 0:e.displayName)?" (".concat(e.displayName,")"):""," para a"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"lista de experimentos p\xfablicos"}),", a"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"p\xe1gina inicial"})," e o"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"seu perfil"}),". Outras pessoas podem"," ",(0,s.jsx)("strong",{className:"text-text-primary",children:"curtir e comentar"}),"."]})]})]}),ea&&(0,s.jsx)("p",{className:"text-center text-sm text-destructive",children:ea}),(0,s.jsx)(l.$,{type:"submit",size:"lg",className:"h-14 w-full text-base font-bold shadow-[0_0_20px_rgba(212,175,55,0.2)]",disabled:ee,children:ee?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Enviandoâ¦"]}):"Enviar relat\xf3rio do experimento"}),(0,s.jsx)("p",{className:"text-center text-xs text-text-secondary",children:"Quanto maior o n\xfamero de relatos, mais poderemos aprender juntos."})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.