PageSourceSearch

https://quiz.mool.health/_next/static/chunks/957.72e7f12f4b87c646.js

js mool.health collected 2026-10-04 03:05:56 UTC 13,099 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[957],{8957:function(e,t,o){o.r(t);var n=o(7437),l=o(2265),i=o(2711),s=o(9113),a=o(1294),r=o(9376),d=o(3834),c=o(3735),u=o.n(c),m=o(2978),h=o(4131),f=o(467),p=o(2652),x=o(956),g=o(1897),_=o(3486),w=o(3331),v=o(2084),y=o(8184),I=o(2018);let b=["0","1","2","3"],j=e=>"string"==typeof e&&b.includes(e[0]);t.default=e=>{let{block:t}=e,[o,c]=(0,l.useState)([]),[b,A]=(0,l.useState)(""),{apiResponse:C,nextQuestion:L,addToPreviousQuestion:k,saveReply:D,setAllQuestionsFilled:V,basic:F,byId:G,setIsSubmitting:E}=(0,l.useContext)(i.L),T=(0,r.useRouter)(),q=(0,y.v)(),[P,Z]=(0,l.useState)("opacity-0");(0,l.useEffect)(()=>{t.reply&&c(t.reply),setTimeout(()=>Z("opacity-100 translate-x-0"),100)},[]),(0,l.useEffect)(()=>{o.includes("others")||A("")},[o]);let J=["constipation","diarrhea","alternate_bowel"],U=["unable_to_gain_weight","unable_to_lose_weight"];function O(e){"others"===e?"medical-history"===t.id?c(e=>e.includes("others")?e.filter(e=>"others"!==e):[...e.filter(e=>"none"!==e),"others"]):c(["others"]):"none"===e?c(["none"]):"homemade_food"===e||"even_homemade_food"===e?c([e]):U.includes(e)?c(t=>t.includes(e)?t.filter(t=>t!==e):[...t.filter(e=>![...U,"none","others","homemade_food","even_homemade_food"].includes(e)),e]):J.includes(e)?c(t=>t.includes(e)?t.filter(t=>t!==e):[...t.filter(e=>![...J,"none","others","homemade_food","even_homemade_food"].includes(e)),e]):c(o=>
1{if(o.includes(e))return o.filter(t=>t!==e);{let n="medical-history"===t.id?["none","homemade_food","even_homemade_food"]:["none","others","homemade_food","even_homemade_food"];return[...o.filter(e=>!n.includes(e)),e]}})}async function M(){try{var e,n,l,i,r,c,u;let y=o.includes("others")?[...o.filter(e=>"others"!==e),...b]:o,I=y;I="SINGLE"===t.type?[I]:I;let j="gut-symptom-check"===t.id&&o.includes("none"),S="medical-history"==t.id||j?f.$_.FILLED:f.$_.DRAFT,N={status:S,location_path:window.location.pathname+window.location.search,question_text:t.question,question_id:t.id,response:I,source:"website",response_type:null!==(e=t.type)&&void 0!==e?e:"SINGLE",field_key:null!==(n=t.fieldKey)&&void 0!==n?n:t.id};if((await (0,s.t)((0,a.qF)(C.transactionId),{method:"POST",body:JSON.stringify(N)})).hasError)return;if(k(t.id),D(t.id,y),j){window.localStorage.setItem("isGoodGut","true"),(0,w.d8)("isGoodGut","true"),window.localStorage.setItem("form_status",S),(0,w.d8)("form_status",S),h.Z.set("form_status",S,{domain:".mool.health"}),V(!0),q({result_type:"good_gut"}),d.DV.add_user_attribute("form_status",S),(0,_.d)("form_completed",{syntheticId:C.syntheticId,uniqueId:C.syntheticId,testUrl:window.location.href,variant:(0,v.V)(),result_type:"good_gut"}),setTimeout(()=>{localStorage.removeItem("state"),(0,w.nJ)("state")},2e3);let e=(0,m.oU)(),t=(0,m.lo)(e),o=(0,v.V)(),n=[t,o?"variant=".concat(o):""].filter(Boolean).join("&"),l="".concat("https://mool.health/","good-gut").concat(n?"?".concat(n):"");T.push(l);return}if("medical-history"==t.id){let e=["cancer","liver_cirrhosis"];if(o.some(t=>e.includes(t))){window.localStorage.setItem("isVisitDoc","true"),(0,w.d8)("isVisitDoc","true"),window.localStorage.setItem("form_status",S),(0,w.d8)("form_status",S),h.Z.set("form_status",S,{domain:".mool.health"}),V(!0),q({result_type:"visit_doctor",medical_condition:y}),d.DV.add_user_attribute("form_status",S),(0,_.d)("form_completed",{syntheticId:C.syntheticId,uniqueId:C.syntheticId,testUrl:window.location.href,variant:(0,v.V)(),result_type:"visit_doctor",medical_condition:y}),setTimeout(()=>{localStorage.removeItem("state"),(0,w.nJ)("state")},2e3),T.push("/visit-doctor");return}if((null===(i=G["acidity-signs"])||void 0===i?void 0:null===(l=i.reply)||void 0===l?void 0:l[0])==="none"&&(null===(c=G["gas-bloating-sign"])||void 0===c?void 0:null===(r=c.reply)||void 0===r?void 0:r[0])==="none"&&(null===(u=G.constipation_diarrhea)||void 0===u?void 0:u.reply)==="none"){window.localStorage.setItem("isGoodGut","true"),(0,w.d8)("isGoodGut","true"),window.localStorage.setItem("form_status",S),(0,w.d8)("form_status",S),h.Z.set("form_status",S,{domain:".mool.health"}),V(!0),q({result_type:"good_gut",medical_condition:y}),d.DV.add_user_attribute("form_status",S),(0,_.d)("form_completed",{syntheticId:C.syntheticId,uniqueId:C.syntheticId,testUrl:window.location.href,variant:(0,v.V)(),result_type:"good_gut",medical_condition:y}),setTimeout(()=>{localStorage.removeItem("state"),localStorage.removeItem("state"),(0,w.nJ)("state")},2e3),localStorage.removeItem("state"),(0,w.nJ)("state");let e=(0,m.oU)(),t=(0,m.lo)(e),o=(0,v.V)(),n=[t,o?"variant=".concat(o):""].filter(Boolean).join("&"),l="".concat("https://mool.health/","good-gut").concat(n?"?".concat(n):"");T.push(l);return}window.localStorage.removeItem("isGoodGut"),(0,w.nJ)("isGoodGut"),window.localStorage.removeItem("isVisitDoc"),(0,w.nJ)("isVisitDoc"),localStorage.setItem("resultPageId",C.syntheticId),(0,w.d8)("resultPageId",C.syntheticId),window.localStorage.setItem("form_status",S),(0,w.d8)("form_status",S),localStorage.setItem("syntheticFilled",C.syntheticId),(0,w.d8)("syntheticFilled",C.syntheticId),h.Z.set("syntheticFilled",C.syntheticId,{domain:".mool.health"}),h.Z.set("resultPageId",C.syntheticId,{domain:".mool.health"}),h.Z.set("form_status",S,{domain:".mool.health"}),V(!0),setTimeout(()=>{localStorage.removeItem("state"),localStorage.removeItem("state"),(0,w.nJ)("state"),q({result_type:"report",medical_condition:y}),d.DV.add_user_attribute("form_status",S),(0,_.d)("form_completed",{syntheticId:C.syntheticId,uniqueId:C.syntheticId,testUrl:window.location.href,variant:(0,v.V)(),result_type:"report",medical_condition:y});let e=document.cookie.split(";"),t="+91".concat(F.phone),o=(0,x.Sw)({eventName:"Subscribe",phone:t}),n={email:"".concat(F.phone,"[email protected]"),phone:t,fbc:(0,p.D)("_fbc",e),fbp:(0,p.D)("_fbp",e),url:window.location.href,gender:F.gender,name:F.name,event_id:o};(0,x.py)(n,"Subscribe"),(0,g.iF)({event:"ReportGenerated",case_id:C.caseId,variant:(0,v.V)(),event_id:o,fb_external_id:(0,x.vp)(t)})},2e3);try{window.dataLayer=window.dataLayer||[],(0,g.KP)()||window.dataLayer.push({event:"gut_issue_question_completed",gender:F.gender,age:F.age,phone:F.phone,case_id:C.case_id,form_status:"completed",variant:(0,v.V)(),event_id:(0,x.Sw)({eventName:"gut_issue_question_completed",phone:"+91".concat(F.phone)}),fb_external_id:(0,x.vp)("+91".concat(F.phone))})}catch(e){console.error(e)}E(!0),setTimeout(()=>{let e=(0,v.V)();window.location.href=(0,m.Vi)(C.syntheticId,"quiz".concat(e?"&variant=".concat(e):""))},6e3)}else L(t.id)}catch(e){console.log(e)}}let z=u()(b,"0",""),B=o.includes("others")?z.length>=5:o.length>0,H=e=>Array.isArray(e.hideIfSelected)&&e.hideIfSelected.some(e=>{var t;let{questionId:o,value:n}=e,l=null==G?void 0:null===(t=G[o])||void 0===t?void 0:t.reply;return Array.isArray(l)?l.includes(n):l===n}),R=(t.optionMap||[]).filter(e=>(!e.femaleOnly||(null==F?void 0:F.gender)==="F")&&!H(e)),K=Array.isArray(t.sections)&&j(null==C?void 0:C.caseId);return(0,n.jsxs)("div",{className:"bg-[#f8f5f0] px-4 pb-32",children:[K?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-left mt-6 mb-4 text-[22px] sm:my-8",children:t.question}),(0,n.jsxs)("div",{className:"flex flex-col gap-6 transition-opacity duration-[1000ms] ".concat(P),children:[t.sections.map((e,t)=>(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)("p",{className:"text-[16px] font-[400] text-[#8A8A8A]",children:e.label}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e.options.map((e,t)=>(0,n.jsx)("button",{onClick:()=>O(e.value),className:"text-left p-4 h-full bg-white rounded-[12px] border ".concat(o.includes(e.value)?"border-[#76611F] bg-yellow-50":"border-[#
1EDE7DF]"),children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"mt-[2px] shrink-0",children:o.includes(e.value)?(0,n.jsx)(N,{}):(0,n.jsx)(S,{})}),(0,n.jsx)("p",{className:"text-[16px] leading-[20px] ".concat(o.includes(e.value)?"text-[#76611F]":"text-[#3C3C3C]"),children:e.name})]})},t))})]},t)),(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)("p",{className:"text-[16px] font-[400] text-[#8A8A8A]",children:"Others"}),(0,n.jsx)("textarea",{value:z,onChange:function(e){let t=e.target.value;t?(A([t]),c(e=>e.includes("others")?e:[...e,"others"])):(A(""),c(e=>e.filter(e=>"others"!==e)))},placeholder:"Write your concerns here",rows:3,maxLength:250,className:"bg-white rounded-[12px] border border-[#EDE7DF] p-4 w-full text-[16px] text-[#3C3C3C] placeholder:text-[#9C9C9C] resize-none outline-none focus:border-[#76611F]"}),o.includes("others")&&z.length<5&&(0,n.jsx)("p",{className:"text-yellow-900 font-modernity font-[400] tracking-[1px] text-[12px]",children:"Please enter at least 5 characters"})]})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-left text-[22px] ".concat("gut-symptom-check"===t.id?"mt-0":"mt-6 sm:mt-8"," ").concat(t.selectAllText?"mb-2 sm:mb-2":"mb-4 sm:mb-8"),children:[" ",t.question]}),t.selectAllText&&(0,n.jsx)("div",{className:"flex flex-row items-center gap-1 mb-4 font-skModernistMono uppercase text-[10px] leading-3 text-grey-600 ",children:t.selectAllText}),t.note&&(0,n.jsx)("p",{className:"text-left mb-2 text-[14px] italic text-red-600",children:t.note}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 transition-opacity duration-[1000ms] ".concat(P),children:[R.map((e,t)=>(0,n.jsx)("button",{onClick:()=>O(e.value),className:" text-left p-4  w-full bg-white rounded-[10px] ".concat(o.includes(e.value)?"outline outline-1 outline-[#76611F] text-[#76611F] bg-yellow-50 ":""," "),children:(0,n.jsxs)("div",{className:"flex whitespace-pre-line items-center gap-4",children:[(0,n.jsxs)("div",{children:[" ",o.includes(e.value)?(0,n.jsx)(N,{}):(0,n.jsx)(S,{})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[17px] ".concat((null==e?void 0:e.bold)?"font-bold":""," ").concat((null==e?void 0:e.underline)?"underline":""),children:e.name}),(null==e?void 0:e.description)&&(0,n.jsx)("p",{className:"mt-1 whitespace-pre-line ".concat((0,I.zG)(null==C?void 0:C.caseId)?"font-modernist text-[12px] leading-4 text-grey-700":"text-[14px] text-[#8A8A8A]"),children:e.description})]})]})},t)),o.includes("others")&&(0,n.jsxs)("div",{children:[(0,n.jsx)("input",{type:"text",value:b,onChange:function(e){A([e.target.value])},placeholder:"Please Enter Other Medical conditions.",maxLength:250,className:"bg-white rounded-[10px] p-4 w-full"}),z.length<5&&(0,n.jsx)("p",{className:"text-yellow-900 font-modernity font-[400] tracking-[1px] text-[12px] my-2",children:"Please enter at least 5 characters"})]})]})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center xs:bg-white md:bg-transparent lg:bg-transparent xl:bg-transparent outline-none fixed bottom-0 left-0 w-full transform transition-transform duration-700 ease-in-out ".concat(B?"translate-y-0":"translate-y-full"),children:[!(0,I.zG)(null==C?void 0:C.caseId)&&(0,n.jsx)("p",{className:"text-yellow-900 font-modernity font-[400] tracking-[1px] text-[12px] my-2",children:"SELECT ALL THAT APPLY"}),(0,n.jsx)("button",{className:"".concat((o.length,"bg-[#4A2E1A]")," text-white text-[17px] font-modernity font-[400] rounded-full p-4 mb-4 xs:w-[95%] md:w-[33%]"),disabled:!B,onClick:()=>{M()},children:"Next"})]})]})};let S=()=>(0,n.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:.25,y:.25,width:15.5,height:15.5,rx:3.75,fill:"white"}),(0,n.jsx)("rect",{x:.25,y:.25,width:15.5,height:15.5,rx:3.75,stroke:"#C9C9C9",strokeWidth:.5})]}),N=()=>(0,n.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:16,height:16,rx:4,fill:"#76611F"}),(0,n.jsx)("path",{d:"M6.8334 9.8497L12.1956 4.48747L13.0206 5.31243L6.8334 11.4996L3.12109 7.78732L3.94606 6.96237L6.8334 9.8497Z",fill:"white"})]})},8184:function(e,t,o){o.d(t,{v:function(){return u}});var n=o(2265),l=o(9376),i=o(4131),s=o(2711),a=o(2978),r=o(3834),d=o(3331),c=o(2084);function u(){let{basic:e}=(0,n.useContext)(s.L),t=(0,l.useSearchParams)().get("type")||"",o="image_carousel"===t&&{page_type:"image_carousel"},u="bg_image"===t&&{page_type:"bg_image"};return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={gender:e.gender,age:e.age,phone:e.phone},l=new Date().toISOString(),s=window.localStorage.getItem("last_form_filled")||i.Z.get("last_form_filled"),m=parseInt(window.localStorage.getItem("form_filled_count")||i.Z.get("form_filled_count")||"0")+1,h=0;if(s){let e=new Date(s),t=new Date(l);e.setHours(0,0,0,0),t.setHours(0,0,0,0),h=(t-e)/864e5}window.localStorage.setItem("last_form_filled",l),(0,d.d8)("last_form_filled",l),window.localStorage.setItem("form_filled_count",m.toString()),(0,d.d8)("form_filled_count",m.toString()),r.ZP.track_event("guttest_completed",{...(0,a.oU)(),...o,...u,...n,form_filled_count:m,days_since_last_form_filled:h,testUrl:window.location.href,variant:(0,c.V)(),...t})}}}}]);

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.