1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6dd2d5a6-9f9f-4488-8d4c-0f9cb033ffc8",e._sentryDebugIdIdentifier="sentry-dbid-6dd2d5a6-9f9f-4488-8d4c-0f9cb033ffc8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7259],{87259:function(e,t,o){o.r(t),o.d(t,{ArticlePollOptions:function(){return f}});var n=o(27573),l=o(7653),a=o(25230),r=o(98687),s=o(46778),i=o(71848),c=o(29228),d=o(63327);function f(e){let{poll:t}=e,{totalVotes:o,options:f,path:u,questionId:p}=t,{poll:g}=(0,a.u)(),[m,b]=(0,l.useState)(o),[x,w]=(0,l.useState)(!1),[h,y]=(0,l.useState)(f);(0,l.useEffect)(()=>{let e=(0,c.F)(new Date(t.endDate).toISOString(),new Date(Date.now()).toISOString(),"days");w(!!localStorage.getItem("pollVote-".concat(u))||e<0)},[]);let I=(0,l.useCallback)(async e=>{if(!x)try{await (0,r.A)({siteCode:s.V.siteCode,path:u,question:p,answer:e});let t=await (0,i.$)({siteCode:s.V.siteCode,path:u});y(t.options),b(t.totalVotes),w(!0),localStorage.setItem("pollVote-".concat(u),"true")}catch(e){d.Z.error("@ArticlePollOptions => ",e)}},[x]);return(0,n.jsxs)(n.Fragment,{children:[h.map(e=>(0,n.jsxs)("button",{className:"".concat(x?"bg-[#00000033] bg-articlePollOptionVoteBg cursor-default":"bg-pollOptionBtn"," w-full mb-[6px] relative flex items-center h-[40px] text-white font-secondary tracking-normal text-articlePollEmbedOptionMobile md:text-articlePollEmbedOption"),onClick:()=>I(e.optionId),children:[(0,n.jsx)("span",{className:"".concat(x?"text-left":"text-center"," basis-0 flex-grow-[1] pl-[15px] z-[1]"),children:e.optionValue}),(0,n.jsxs)("span",{className:"".concat(x?"":"hidden"," text-right basis-0 flex-grow-[1] pr-[15px] z-[1]"),children:[e.optionPercentInteger,"%"]}),(0,n.jsx)("span",{className:"bg-articlePollOptionVote absolute top-0 left-0 h-[40px] transition-[width] duration-300 font-secondary tracking-normal",style:{width:x?"".concat(e.optionPercentInteger,"%"):0}})]},e.optionId)),(0,n.jsx)("p",{className:"w-full text-right mt-[10px] md:mt-[20px] text-articlePollText text-articlePollEmbedVotesMobile md:text-articlePollEmbedVotes font-secondary",children:g.votes(m)})]})}},98687:function(e,t,o){o.d(t,{A:function(){return a}});var n=o(56450),l=o(16686);let a=async e=>{let{siteCode:t,path:o,answer:a,question:r}=e;await n.O.post({url:"/sites/".concat(t,"/polls/vote"),version:(0,l.vp)(t),body:{},params:{path:o,answer:a,question:r}})}},29228:function(e,t,o){o.d(t,{F:function(){return s}});var n=o(95330),l=o(46778);let a=(e,t)=>{let o=new Date(e),n=new Date(o.toLocaleString("en-US",{timeZone:t})),l=o.getTime()-n.getTime();return o.getTime()+l},r=()=>n.P[l.V.siteCode],s=(e,t,o)=>{let n=r(),l=a(e,n.timezone),s=a(t,n.timezone);switch(o){case"hours":return Math.floor((l-s)/36e5);case"days":return Math.floor((l-s)/864e5);default:throw Error('Invalid range specified. Use "hours" or "days".')}}}}]);
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.