PageSourceSearch

https://assets.greatist.com/_next/chunks/st-ab-tests-5748efe0.js

js greatist.com collected 2026-09-24 08:34:42 UTC 5,758 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[1523],{60137(e,t,r){r.d(t,{V:()=>l});const l={liveRampECST:{k1s:["abdominalpain","adhd","agingandlongevity","allergies","alzheimers","ankylosingspondylitis","anxiety","arthritis","asthma","backpain","bipolar","birthcontrol","blackhealthsystems","breastcancer","bronchitis","chemotherapy","childrenshealth","cholesterol","constipation","copd","crohnsdisease","dementia","depression","diabetesmellitustype2","diarrhea","dryeyes","eczema","emphysema","gasbloating","gonorrhea","hairloss","headache","hippain","hivaids","hpv","hyperglycemia","hypertension","hypothyroid","irritablebowelsyndrome","maculardegeneration","migraine","ms","nauseaandvomiting","neckpain","nicotineaddiction","obesity","otherautoimmunedisorders","otherbloodcelldisorders","otherbreastdisorders","otherdigestiveproblems","otherfemalesexualhealth","otherjointpain","otherlungcancer","othermalesexualhealth","othermentalhealth","othermusculoskeletaldisorders","otherneurologicaldisorders","otherrespiratory","otherspinalproblems","otherweightrelated","otherwomenshealth","psoriasis","psoriaticarthritis","reconstructivesurgeries","rheumatoidarthritis","schizophrenia","sinusinfections","smoking","ulcer","ulcerativecolitis","weightgain","weightloss"]}}},18534(e,t,r){r.r(t),r.d(t,{default:()=>w});var l=r(96540),i=r(77066),o=r(99912),s=r(49752),a=r(20949).h;const n=e=>{let{currentAbTests:t,selectedTest:r,setSelectedTest:l,className:o}=e;const n=Object.keys(t);return a("div",{className:(0,i.cx)(o,(0,i.AH)({display:"flex",flexDirection:"column"}))},a("ul",{className:(0,i.AH)({listStyle:"none",margin:0,padding:0,maxHeight:"100%",overflowY:"auto",flex:1})},n.map(e=>a("li",{key:e,className:(0,i.AH)({margin:0})},a(s.A,{id:e,text:`${e} (${t[e]})`,isSelected:r===e,setSelected:l})))))};var d=r(60137),c=r(12770),u=r(45331),h=r(85325),p=r(20949).h;const m=i.Ay.div({overflow:"auto",borderTopWidth:[1,0],borderTopStyle:"solid",borderColor:"white",padding:"0 10px",backgroundColor:"dimgray"}),y=i.Ay.div({display:"flex",flexDirection:"row",alignItems:"center"}),g=i.Ay.div({display:"flex",flexDirection:"row",marginTop:12,marginLeft:12,padding:2,paddingRight:8,backgroundColor:"#272822"}),b=i.Ay.div({display:"flex",flexDirection:"row",marginLeft:8,position:"relative"}),f=i.Ay.div({height:15,width:15,position:"absolute",left:-2,bottom:6,borderRadius:17,pointerEvents:"none"}),v=e=>{let{value:t,selectedTest:r}=e;const[i,o]=(0,l.useState)();(0,l.useEffect)(()=>{(async()=>{const e=await fetch("/api/ab-config/raw",{method:"GET"});if(200===e.status){const t=await e.json();o(t)}})()},[]);const s=(0,l.useMemo)(()=>!!i&&i[r],[i,r]),a=(0,l.useMemo)(()=>{var e,t,l,o;return i?{owner:null==(e=i.$meta)||null==(e=e.owners)?void 0:e[r],description:null==(t=i.$meta)||null==(t=t.descriptions)?void 0:t[r],testURLs:null==(l=i.$meta)||null==(l=l.testByUrl)?void 0:l[r],k1s:null==d.V||null==(o=d.V[r])?void 0:o.k1s}:{}},[i,r]),n=(0,l.useMemo)(()=>{var e,t,r;let l=s;if(null!=(e=l)&&null!=(e=e.$filter)&&e.includes("testByUrl")){var i;if(null==a||null==(i=a.testURLs)||!i.includes(window.location.pathname))return{testByUrl:'navigate to a url in "testURLs" to activate'};l=l.true}const o=null==(t=l)||null==(t=t.$range)?void 0:t.map(e=>({[e.limit]:e.value})).reduce((e,t)=>Object.assign(e,t),{});let n=0;return o&&Object.keys(o).forEach(e=>{(0,c.Ro)(e)>n&&(n=(0,c.Ro)(e)+1)}),{...o,...n<=100?{[n]:null==(r=l)?void 0:r.$default}:{}}},[s,a]);return p(m,null,s?p(l.Fragment,null,p(y,null,p("h3",null,r),p(()=>p(g,null,Object.keys(n).map((e,r)=>{var i;return p(b,{key:r},"testByUrl"!==e&&p(l.Fragment,null,p("input",{id:`testState_${n[e]}`,type:"checkbox",checked:n[e]===t,onChange:()=>{if(n[e]!==t){const t=window.location.search.split("&").map(e=>({[e.split("=")[0].replace("?","")]:e.split("=")[1]})).reduce((e,t)=>Object.assign(e,t),{}),r=null!=s&&s.$filter.includes("testByUrl")?s.true:s;t[null==r?void 0:r.$filter]=e;const l=Object.keys(t).map(e=>`${e}=${t[e]}`).join("&");window.location.search=l}},style:{opacity:0,cursor:"pointer"}}),p(f,{style:{backgroundColor:n[e]===t?"#fd971f":"white"}})),p("label",{htmlFor:`testState_${n[e]}`,style:{marginLeft:4,cursor:"pointer"}},null==(i=n[e])?void 0:i.toString()))}
1)),null)),p(u.A,{name:r,src:{...s,$meta:a}})):p(h.gL,null,"Select a test to see more details"))};var k=r(20949).h;const w=()=>{const[e,t]=(0,l.useState)(void 0),r=HL.ab;return k(o.Ay,{render:l=>{let{currentBreakpoint:o}=l;return k(h.iX,{currentBreakpoint:o},k(n,{className:(0,i.AH)({maxWidth:"500px"}),currentAbTests:r,selectedTest:e,setSelectedTest:t}),k(v,{selectedTest:e,value:r[e]}))}})}},49752(e,t,r){r.d(t,{A:()=>n});r(96540);var l=r(69064),i=r(99912),o=r(42682),s=r(77066),a=r(20949).h;const n=e=>{let{id:t,text:r=t,isSelected:n,setSelected:d}=e;return a("button",{type:"button",onClick:()=>d(t),className:(0,s.AH)([{...l.UH,color:"white",padding:"10px",width:"100%",textAlign:"left",fontSize:"16px",border:"2px solid transparent",display:"flex",justifyContent:"space-between","&:hover":{cursor:"pointer",backgroundColor:"dimgray",borderColor:"white"}},n&&{backgroundColor:"dimgray",borderStyle:"dotted",borderColor:"white"}])},a("span",null,r),n&&a(i.Ay,{render:e=>{let{currentBreakpoint:t}=e;return a(0===t?o.zKo:o.ngD,{title:"Selected item"})}}))}},45331(e,t,r){r.d(t,{A:()=>n});r(96540);var l=r(8785),i=r.n(l),o=r(77066),s=r(20949).h;const a=i(),n=e=>{let{data:t,name:r,className:l,...i}=e;return s(a,{name:r,src:t,className:(0,o.AH)({flex:1}),theme:"monokai",displayObjectSize:!1,enableClipboard:!0,indentWidth:4,displayDataTypes:!1,iconStyle:"triangle",shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!1,groupArraysAfterLength:100,onSelect:!1,...i})}}}]);
2//# sourceMappingURL=st-ab-tests-5748efe0.js.map

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.