PageSourceSearch

https://www.itbrew.com/_next/static/chunks/pages/poll/[id]-a39dfc0a65e29424.js

js itbrew.com collected 2026-10-02 04:28:47 UTC 8,037 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[955],{73643:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/poll/[id]",function(){return t(44206)}])},38194:function(e,n,t){"use strict";t.r(n);var i=t(44212);n.default=i.Z},44206:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var i=t(52322);t(2784);var o=t(73307),r=t(91310),l=t(77386),a=t(47122),s=t(15579),d=t(8947),c=t(89171),p=t(10143),x=t(12966),u=t(38421),m=t.n(u),h=t(39097),f=t.n(h),y=t(35505);let v=y.ZP.div.withConfig({displayName:"TagInlineAd__AdContent",componentId:"sc-b128c37d-0"})(["display:flex;flex-direction:column;justify-content:center;padding:20px 40px;flex:1 1 60%;width:100%;[data-ad-copy='true'] p{font-family:var(--font-sohne);font-size:var(--font-scale-0);color:#1a202c;line-height:1.75;letter-spacing:0.8px;margin-bottom:0px;}[data-ad-copy] a{text-decoration:underline;}","{flex:0 0 auto;}"],o.Mq),g=y.ZP.div.withConfig({displayName:"TagInlineAd__ImageContainer",componentId:"sc-b128c37d-1"})(["min-height:100%;aspect-ratio:3 / 2;width:auto;position:relative;","{min-width:100%;height:auto;}"],o.m7),j=y.ZP.div.withConfig({displayName:"TagInlineAd__AspectRatioContainer",componentId:"sc-b128c37d-2"})(["display:flex;width:auto;max-width:400px;flex:1 0 40%;aspect-ratio:3 / 2;","{flex:1 1 100%;width:100%;max-width:100%;min-width:100%;height:auto;}"],o.Mq),w="ott-inline-click",C={IMAGE:"image",LOGO:"partnerLogo",COPY:"linkText"},b=e=>{let{content:n,logoText:t,adImageLink:o,adImageUrl:l,partnerLogoUrl:u,partnerLogoSize:h,link:y,partnerName:b,heapEventName:k,_id:I}=e,{track:_}=(0,a.z)(),{ltTablet:A,ltePhone:F}=(0,c.Z)(),T=l&&o,N=l&&!o,E=l&&"".concat(l,"?w=600&auto=format&q=90"),Z=(0,x.Z)(n),B=e=>{let n=e.target;("A"===n.tagName||"EM"===n.tagName||"B"===n.tagName)&&_(null!=k?k:w,{location:C.COPY,sponsoredBy:b,adText:Z,linkText:n.innerText,adId:I})},O=(0,i.jsxs)("div",{style:{display:"flex",borderRadius:"var(--radius-sm)",backgroundColor:"#FCFCFF",border:"1px solid var(--colors-grey-500)",flexDirection:A?"column":"row",maxWidth:"100%",alignItems:"center",overflow:"hidden"},className:"tag-inline-ad",children:[(0,i.jsxs)(j,{children:[E&&N&&(0,i.jsx)(g,{children:(0,i.jsx)(m(),{layout:"fill",objectFit:"cover",src:E,alt:"",quality:90})}),E&&T&&(0,i.jsx)(f(),{href:o,passHref:!0,legacyBehavior:!0,children:(0,i.jsx)("a",{target:"_blank",rel:(0,p.zl)("noreferrer",(0,p.xf)(o)&&"sponsored"),role:"button",tabIndex:0,style:{cursor:"pointer",width:"100%"},onClick:()=>{_(null!=k?k:w,{location:C.IMAGE,sponsoredBy:b,adText:Z,adId:I})},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&_(null!=k?k:w,{location:C.IMAGE,sponsoredBy:b,adText:Z,adId:I})},children:(0,i.jsx)(g,{children:(0,i.jsx)(m(),{layout:"fill",objectFit:"cover",src:E,quality:90,alt:""})})})})]}),(0,i.jsxs)(v,{children:[(0,i.jsx)("div",{style:{display:"flex",flexDirection:F?"column":"row",justifyContent:A?"center":"start",alignItems:"center",gap:"4px"},children:u&&(0,i.jsx)(r.Z,{href:y,sponsorLabel:t,logoSrc:u,logoWidth:h,onClick:()=>{_(null!=k?k:w,{location:C.LOGO,sponsoredBy:b,adText:Z,adId:I})}})}),(0,i.jsx)("div",{"data-ad-copy":!0,style:{marginTop:F?"20px":"12px"},children:(0,i.jsx)(s.Z,{blocks:n,blockWrapper:e=>{let{children:n}=e;return(0,i.jsx)("span",{role:"button",tabIndex:0,onClick:e=>B(e),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&B(e)},children:n})},linkOptions:{forceNewTab:!0}})})]})]});return(0,i.jsx)(d.iM,{children:O})};var k=t(1978),I=t(5632),_=t(38194),A=t(30446);let F=e=>{let{name:n,percentage:t,isWinner:o}=e,r=(0,y.Fg)(),l=o?r.colors.diamond:r.colors.periwinkleGray,a=o?"700":"400";return(0,i.jsx)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",marginBottom:"15px",alignItems:"center",marginTop:"25px"},children:(0,i.jsxs)("div",{style:{width:"100%",fontSize:"16px"},children:[(0,i.jsx)("div",{style:{display:"inline-block"},children:(0,i.jsxs)("p",{style:{fontWeight:a,fontFamily:"var(--font-sohne)",marginBottom:"0px"},children:[n," ",o&&" \uD83C\uDFC6"]})}),(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("div",{style:{display:"flex",justifyContent:"space-between",width:t,minHeight:"18px",backgroundColor:l,borderRadius:"8px",alignItems:"center"}}),(0,i.jsx)("p",{style:{marginLeft:"5px",fontWeight:a,fontFamily:"var(--font-sohne)"},children:t})]})]})})},T=e=>{let{name:n,percentage:t,isWinner:o}=e,r=(0,y.Fg)(),l=r.colors.periwinkleGray,a="400";return o&&(l=r.colors.diamond,a="700"),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",margin:"15px 0",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("div",{style:{width:"100%",fontSize:"16px"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:t,minHeight:"50px",backgroundColor:l,borderRadius:"8px",alignItems:"center"},children:[(0,i.jsx)("p",{style:{flexShrink:0,marginLeft:"18px",fontFamily:"var(--font-sohne)",marginBottom:"0px",fontSize:"var(--font-scale-1)",fontWeight:a},children:n}),o&&(0,i.jsx)("p",{style:{marginRight:"18px",marginBottom:"0px"},children:"\uD83C\uDFC6"})]})}),(0,i.jsx)("p",{style:{margin:"0px",fontWeight:a,fontFamily:"var(--font-sohne)"},children:t})]})},N=y.ZP.div.withConfig({displayName:"styles__WrappedPortableText",componentId:"sc-35a4d62d-0"})(["",""],e=>{let{theme:n}=e;return(0,y.iv)(["p{margin:10px 0px;font-size:var(--font-scale-6);font-weight:600;font-family:var(--font-sohne);line-height:1;@media (max-width:","){}}"],n.breakpoints.sm)});var E=t(12897);let Z=e=>void 0===e?"":"string"==typeof e?e:e[0],B=e=>e.length?Math.max(...e.map(e=>e.percent)):0,O=e=>(null!=e?e:[]).map(e=>({answer:(null==e?void 0:e.answer)||"",percent:(null==e?void 0:e.percent)||0,isWinner:!1})),P=(e,n)=>
1{0!==n&&e.forEach(e=>{e.percent===n&&(e.isWinner=!0)})};var W=function(){var e,n,t,a,s,d;let{ltTablet:p}=(0,c.Z)(),x=(0,y.Fg)(),{id:u}=(0,I.useRouter)().query,m=Z(u),{data:h,error:f}=(0,A.ZP)(m?"/api/sanity/poll?id=".concat(encodeURIComponent(m)):null,{revalidateOnFocus:!1,revalidateOnReconnect:!1});if(!u)return(0,i.jsx)(l.Z,{});if(f)return(0,i.jsx)(_.default,{statusCode:404,err:f});if(!h)return(0,i.jsx)(l.Z,{});if(!h._id)return(0,i.jsx)(_.default,{statusCode:404,err:Error("Poll not found")});let v=O((null==h?void 0:null===(e=h.results)||void 0===e?void 0:e.answers)||[]),g=B(v);P(v,g);let j=v.map(e=>p?(0,i.jsx)(F,{name:e.answer,isWinner:e.isWinner,percentage:"".concat(e.percent,"%")},e.answer):(0,i.jsx)(T,{name:e.answer,isWinner:e.isWinner,percentage:"".concat(e.percent,"%")},e.answer)),w=(null==h?void 0:null===(n=h.results)||void 0===n?void 0:n.total)||0,C=null===(d=null==h?void 0:h.showVotes)||void 0===d||d;return(0,i.jsxs)(i.Fragment,{children:[(null==h?void 0:h.meteorAdContent)&&(null==h?void 0:null===(t=h.meteorAdContent)||void 0===t?void 0:t.partnerLogoUrl)&&(0,i.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",marginTop:"25px"},children:(0,i.jsx)(r.Z,{logoSrc:null==h?void 0:h.meteorAdContent.partnerLogoUrl,...h.meteorAdContent})}),(0,i.jsx)(N,{children:(0,i.jsx)(k.YI,{blocks:null==h?void 0:h.question})}),(0,i.jsxs)("div",{style:{padding:"0 15px",border:"1px solid ".concat(x.colors.lightGray),borderRadius:"4px",marginBottom:"25px"},children:[(0,i.jsx)("div",{style:{borderBottom:C?"1px solid ".concat(x.colors.lightGray):void 0},children:j}),C&&(0,i.jsxs)("p",{style:{fontFamily:"var(--font-sohne)",fontWeight:"400",color:"var(--colors-charcoal)",margin:"15px 0"},children:[w," votes"]})]}),(null==h?void 0:null===(a=h.meteorAdContent)||void 0===a?void 0:a.meteorAdvertisement)&&(0,i.jsx)("div",{style:{marginBottom:"50px"},children:(0,i.jsx)(b,{...h.meteorAdContent,heapEventName:"inline-ad-click"})}),(null==h?void 0:h.meteorAdContent)&&(null==h?void 0:null===(s=h.meteorAdContent)||void 0===s?void 0:s.disclaimer)&&(0,i.jsx)(E.zO,{children:(0,i.jsx)(o.xv,{variant:"body2",component:"div",children:(0,i.jsx)(k.YI,{blocks:h.meteorAdContent.disclaimer})})})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=73643)}),_N_E=e.O()}]);

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.