1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([["default-src_app_Story_NewsCardView_tsx"],{"437ede5b1fc073a5a1fe":(e,t,n)=>{n.d(t,{A:()=>r});var i=n("f29b77cd1c7382d8894a"),a=n("b0c70e1a33943c467e58"),o=n("b8d0ee998ea68c6abe46"),s=n("4164c86128581d2bd7f5");class l extends i.Component{constructor(){super(...arguments),this.trackOnNavigate=(e,t)=>{"click_url"===e?this.props.tracking&&this.props.tracking.trackEvent({name:e,card:o.sl.BODY_CONTENT,context:{object_card_type:void 0}}):this.props.tracking&&this.props.tracking.trackEvent({name:e,context:{user_click:t}})},this.render=()=>this.props.children({trackOnNavigate:this.trackOnNavigate})}}const r=(0,a.A)((e=>{let t;return e.noAdditionalInfo||(t=e.context&&e.context.additional_info?e.context.additional_info:e.story.publisher?e.story.publisher.id:void 0),{...e.card?{card:e.card}:{},context:{story_id:e.story.id,object_card_type:"regular",additional_info:t,story_type:(0,s.K2)(e.story),...e.context,..."number"==typeof e.index?{object_position:e.index+1}:{},..."Story"===e.story.__typename?{paid_story:e.story.productInfo?"yes":"no",private_post:e.story.isPrivate?"yes":"no",comment_count:e.story?.statistic?.commentCount||0,like_count:e.story?.statistic?.likeCount||0}:{}}}}))(i.memo(l))},"650b7c39a37344b3a862":(e,t,n)=>{n.d(t,{Z:()=>B,A:()=>K});var i=n("d518909bf6561866660f"),a=n("f29b77cd1c7382d8894a"),o=n("b28808af9c82de9713c4"),s=n("d93e1349b200fe96c835"),l=n("a53696844a884584383e"),r=n("33c81e25cf4fd82636d1"),d=n("fba30acf371e30c980ab"),c=n("ca38d88d8dd6478cd228"),u=n("aab7660251ee0163f01e"),p=n("b75869fa0ee55381231c"),m=n("6e9a29e0eb3112f51e68"),g=n("804fb1919e45878352c0"),f=n("b507e294b2fe7081df27"),b=n("b8d0ee998ea68c6abe46"),h=n("b0c70e1a33943c467e58"),y=n("a1ca5acfbf0478960314");const A=e=>{const t=(0,i.c)(17),{t:n}=a.useMemo((()=>({t:null})),[]),{story:o,closeModal:s,tracking:l,variant:r}=e;let d;e:{if("COMMENT PAGE"===r){let e;t[0]!==n?(e="Gunakan aplikasi kumparan untuk lanjut membaca komentar ini.",t[0]=n,t[1]=e):e=t[1];const i=`${o.publisher?o.publisher.slug:o.author.username}/response/${o.slug}`;let a;t[2]!==e||t[3]!==i?(a={desc:e,path:i},t[2]=e,t[3]=i,t[4]=a):a=t[4],d=a;break e}let e;t[5]!==n?(e="Gunakan aplikasi kumparan untuk lanjut membaca konten ini.",t[5]=n,t[6]=e):e=t[6];const i=`${o.publisher?o.publisher.slug:o.author.username}/${o.slug}`;let a;t[7]!==e||t[8]!==i?(a={desc:e,path:i},t[7]=e,t[8]=i,t[9]=a):a=t[9],d=a}const h=d;let A;return t[10]!==s||t[11]!==h.desc||t[12]!==h.path||t[13]!==o.id||t[14]!==n||t[15]!==l?(A=(0,y.jsx)(g.Ay,{children:e=>(0,y.jsx)(c.A,{title:"Konten Eksklusif",position:"center",onClose:s,children:(0,y.jsxs)(u.A,{flexDirection:"column",qaTag:"modal-in-app-guard",children:[(0,y.jsx)(u.A,{flexJustifyContent:"center",children:(0,y.jsx)(p.A,{textAlign:"center",children:h.desc})}),(0,y.jsx)(u.A,{marginTop:10,children:(0,y.jsx)(m.A,{variant:"primary",block:!0,onClick:()=>{l&&l.trackEvent({name:b.f7.CLICK_OPEN_APP,context:{story_id:o.id,story_type:b.Sp.APP_ONLY}})},to:e?"https://kumparan.com/page/app-install":`${f.A.firebase.dynamicLinkHost}/?link=https://kumparan.com/${h.path}&apn=${f.A.relatedApps.android.packageName}&ibi=${f.A.relatedApps.ios.bundleID}&isi=${f.A.relatedApps.ios.appStoreID}&ius=kumparan`,children:"Buka Aplikasi"})})]})})}),t[10]=s,t[11]=h.desc,t[12]=h.path,t[13]=o.id,t[14]=n,t[15]=l,t[16]=A):A=t[16],A},k=(0,h.A)()(a.memo(A)),v=(0,n("8dc49d92598adb3ab518").A)((e=>{const t=(0,i.c)(30),{story:n,variant:o,disableComment:l,disableLike:c}=e,u=(0,d.A)(),[p,m]=a.useState(null);let g,f;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],t[0]=g):g=t[0],t[1]!==l||t[2]!==c||t[3]!==n?(f=new Set(g),("statistic"in n&&n.statistic.likeCount>0||"isDisableLike"in n&&!n.isDisableLike)&&!c&&f.add("LIKE"),("statistic"in n&&n.statistic.commentCount>0||"isDisableComment"in n&&!n.isDisableComment)&&!l&&f.add("COMMENT"),t[1]=l,t[2]=c,t[3]=n,t[4]=f):f=t[4];const h=!n.isShowOnWeb&&n.isShowOnApp,A=n.publisher?n.publisher.slug:n.author.username,v=h?"":`/${A}/response/${n.slug}`;let _;t[5]!==v?(_=new Map([["COMMENT",v]]),t[5]=v,t[6]=_):_=t[6];const D=_;let I;t[7]!==n.createdAt||t[8]!==n.publishedAt?(I=(0,r.A)(new Date(n.publishedAt||n.createdAt),"d MMM yyyy"),t[7]=n.createdAt,t[8]=n.publishedAt,t[9]=I):I=t[9];const x=I;let C;t[10]!==h||t[11]!==n||t[12]!==u?(C=e=>{"COMMENT"===e&&"statistic"in n&&(h&&m("COMMENT PAGE"),u.trackEvent({name:b.f7.CLICK_COMMENT,context:{comment_count:n.statistic.commentCount}}))},t[10]=h,t[11]=n,t[12]=u,t[13]=C):C=t[13];const S=C;let L,N,E,T,j;return t[14]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,t[14]=L):L=t[14],t[15]!==n?(N="statistic"in n?new Map([["LIKE",n.statistic.likeCount],["COMMENT",n.statistic.commentCount]]):void 0,t[15]=n,t[16]=N):N=t[16],t[17]!==f||t[18]!==x||t[19]!==S||t[20]!==D||t[21]!==N||t[22]!==o?(E=(0,y.jsx)(s.A,{variant:o,action:f,config:L,handler:S,date:x,counts:N,paths:D}),t[17]=f,t[18]=x,t[19]=S,t[20]=D,t[21]=N,t[22]=o,t[23]=E):E=t[23],t[24]!==p||t[25]!==n?(T=p&&(0,y.jsx)(k,{closeModal:()=>{m(null)},story:n,variant:p}),t[24]=p,t[25]=n,t[26]=T):T=t[26],t[27]!==E||t[28]!==T?(j=(0,y.jsxs)(a.Fragment,{children:[E,T]}),t[27]=E,t[28]=T,t[29]=j):j=t[29],j}));var _=n("b278b0350969ad13d321"),D=n("44f99b0360b0e877facb"),I=n("58dbf53c3ec7157af3f2"),x=n("56288dbce7d24738cd57"),C=n("b32b265db26a9705fce2"),S=n("479e1cc766a50880426c");class L extends a.PureComponent{constructor(){super(...arguments),this.state={shouldLoadStory:!1},this.componentWillUnmount=()=>{this.timeoutID&&clearTimeout(this.timeoutID)},this.timeoutID=null,this.onChange=e=>{this.timeoutID&&clearTimeout(this.timeoutID),e&&(this.timeoutID=setTimeout((()=>{this.setState({shouldLoadStory:!0})}),this.props.delay))},this.render=()=>(0,y.jsx)(C.A,{query:C.A.query,ssr:!1,variables:{slug:this.props.slug},children:e=>{let{data:t}=e;const n=!!(t&&t.FindCompactStoryBySlug&&t.FindCompactStoryBySlug.productInfo);return(0,y.jsx)(S.J,{slug:this.props.slug,skip:!n,children:e=>{let{isEligible:t,loading:i}=e;return(0,y.jsx)(D.Y,{children:e=>{let a=this.state.shouldLoadStory;const o={slug:this.props.slug,...n&&t?{readEligibility:"ELIGIBLE"}:null};try{a=!!e.readQuery({query:x.A.query,variables:o})}catch(e){}return(0,y.jsxs)(I.A,{disabled:a,threshold:[0,1],onChange:this.onChange,style:{width:"100%"},children:[this.state.shouldLoadStory?(0,y.jsx)(x.A,{query:x.A.query,variables:o,context:{persistedQuery:!0},skip:i,children:()=>null}):null,this.props.children]})}})}})}})}}L.defaultProps={delay:1e3};var N=n("fe5e811fa0a3527ab570"),E=n("1b9c8e2d6b0546e10820"),T=n("437ede5b1fc073a5a1fe"),j=n("ea11a6f3602d91f2ce66"),V=n("5aaf9e396938f873ca86"),O=n("4164c86128581d2bd7f5");const q=(0,o.z)().addConfig("PLACEHOLDER"),P=(0,o.z)().addConfig("PLACEHOLDER").addConfig("FULL WIDTH"),M=new Set(["COMMENT","LIKE"]),w=new Set(["PLACEHOLDER"]),U=new Map([["LIKE",0],["COMMENT",0]]),R=new Map([["COMMENT","https://kumparan.com"]]),B=a.memo((e=>{const t=(0,i.c)(10),{variant:n,imageRatio:a,fullWidth:o,content:r,footer
1:d,containerStyle:c}=e,u=void 0===n?"REGULAR":n,p=void 0===a?"square":a;let m;t[0]!==p?(m={src:"",title:"",ratio:p,width:0,height:0},t[0]=p,t[1]=m):m=t[1];const g=r||(o?P:q);let f,b;return t[2]!==d?(f=d||(0,y.jsx)(s.A,{action:M,config:w,counts:U,paths:R,date:"01 April 2020",handler:H}),t[2]=d,t[3]=f):f=t[3],t[4]!==c||t[5]!==m||t[6]!==g||t[7]!==f||t[8]!==u?(b=(0,y.jsx)(l.A,{image:m,variant:u,content:g,onNavigate:W,containerStyle:c,footer:f}),t[4]=c,t[5]=m,t[6]=g,t[7]=f,t[8]=u,t[9]=b):b=t[9],b})),F=e=>{const t=(0,i.c)(34),{newsContent:n,story:o,image:d,content:c,onNavigate:u,variant:p,setTitleTagAs:m,qaTag:f,footer:h,disableAddOns:A,polling:k,trackOnNavigate:D,containerStyle:I}=e,x=c||n,{showLightBox:C}=(0,V.lP)();let S;t[0]===Symbol.for("react.memo_cache_sentinel")?(S=new Set([]),t[0]=S):S=t[0];const L=a.useRef(S),E=a.useContext(g.ob),T="VideoStory"!==o.__typename&&"productInfo"in o&&Boolean(o.productInfo);let j;t[1]!==x.path||t[2]!==C||t[3]!==o?(j=e=>{const t="Story"===o.__typename?o.storyAddOns.find(Y):null,n=t&&"Gallery"===t.object.__typename?t.object:null;if(n&&n.galleryMedias){const t=n.galleryMedias.map(Q);L.current=new Set(n.galleryMedias.filter(z).map(J)),C({index:e,path:x.path,image:t[e-1],images:t,title:o.title,blurImageIDs:L,content:{id:o.id,contentType:["VideoStory","QuickStory"].includes(o.__typename)?"":(0,O.wD)(o)||""}})}},t[1]=x.path,t[2]=C,t[3]=o,t[4]=j):j=t[4];const q=j;let P;t[5]!==q?(P=e=>{e:switch(e){case"CLICK GALLERY 1":q(1);break e;case"CLICK GALLERY 2":q(2);break e;case"CLICK GALLERY 3":q(3)}},t[5]=q,t[6]=P):P=t[6];const M=P;let w;t[7]!==d||t[8]!==u||t[9]!==o.__typename||t[10]!==D?(w=e=>{if(u&&u(),D){let t=b.f7.CLICK_READ_STORY;"Draft"===o.__typename?t=b.f7.CLICK_STORY_DRAFT:"thumbnail"===e&&d&&"VIDEO"===d.mediaType&&(t=b.f7.CLICK_VIDEO_PLAYER),D(t,e)}},t[7]=d,t[8]=u,t[9]=o.__typename,t[10]=D,t[11]=w):w=t[11];const U=w;let R;e:{if(T){R=null;break e}let e;t[12]!==h||t[13]!==M||t[14]!==o||t[15]!==p?(e=h||("Story"===o.__typename?(0,y.jsx)(v,{variant:p,story:o,disableComment:!0,disableLike:!0}):"QuickStory"===o.__typename?(0,y.jsx)(s.A,{variant:p,handler:M,date:(0,r.A)(new Date(o.createdAt),"d MMM yyyy")}):null),t[12]=h,t[13]=M,t[14]=o,t[15]=p,t[16]=e):e=t[16],R=e}const B=R,F=p||"REGULAR";let G,$;return t[17]!==A||t[18]!==E||t[19]!==k||t[20]!==p?(G=!A&&k&&"BIG"===p?(0,y.jsx)(N.A,{eventName:b.f7.SCROLL_VIEW_VOTE,context:{additional_info:k.id},children:(0,y.jsx)(_.default,{polling:k,hidePollingTitle:!0,isDesktop:E,scrollable:!0})}):void 0,t[17]=A,t[18]=E,t[19]=k,t[20]=p,t[21]=G):G=t[21],t[22]!==I||t[23]!==M||t[24]!==d||t[25]!==B||t[26]!==x||t[27]!==f||t[28]!==m||t[29]!==o.id||t[30]!==F||t[31]!==G||t[32]!==U?($=(0,y.jsx)(l.A,{variant:F,content:x,image:d,onNavigate:U,handler:M,footer:B,setTitleTagAs:m,containerStyle:I,qaTag:f,children:G},o.id),t[22]=I,t[23]=M,t[24]=d,t[25]=B,t[26]=x,t[27]=f,t[28]=m,t[29]=o.id,t[30]=F,t[31]=G,t[32]=U,t[33]=$):$=t[33],$},G=a.memo((e=>{const t=(0,i.c)(3);if("Story"===e.story.__typename){let n;return t[0]!==e.children||t[1]!==e.story.slug?(n=(0,y.jsx)(L,{slug:e.story.slug,children:e.children}),t[0]=e.children,t[1]=e.story.slug,t[2]=n):n=t[2],n}return e.children})),$=e=>{const t=(0,i.c)(48),{content:n,story:a,coverHeadlineMedia:o,config:s,variant:l,useHeadlineImage:r,setTitleTagAs:d,qaTag:c,onNavigate:u,imageRatio:p,footer:m,disableAddOns:g,isTrending:f,isLatest:h,noAdditionalTrackingInfo:A,trackData:k,isPinned:v,formatDateOptions:_,containerStyle:D}=e,I=void 0===l?"REGULAR":l,x=void 0!==r&&r,C=void 0===c?"news-item":c;let S;t[0]!==s?(S=s&&s.has("DISABLE NAVIGATION")||!1,t[0]=s,t[1]=S):S=t[1];const L=S;let j,V,O;if(t[2]!==s||t[3]!==_||t[4]!==h||t[5]!==v||t[6]!==f||t[7]!==a){if(j="Draft"===a.__typename?(0,E.iv)(a,{formatDateOptions:_}):"Story"===a.__typename?(0,E.s1)(a,{formatDateOptions:_}):"VideoStory"===a.__typename?(0,E.gW)(a,{formatDateOptions:_}):(0,E.su)(a,{formatDateOptions:_}),[...s||[]].forEach((e=>{j=j.addConfig(e)})),V=null,"Story"===a.__typename){let e;h&&(j=j.addLabel("LATEST")),f&&(j=j.addLabel("TRENDING")),v&&(j=j.addLabel("PINNED")),t[10]!==a.storyAddOns?(e=a.storyAddOns.find(Z),t[10]=a.storyAddOns,t[11]=e):e=t[11];const n=e;V=n&&"Polling"===n.object.__typename?n.object:null}else"Draft"===a.__typename&&(j=j.setPath(`/editor/${a.slug}`));t[2]=s,t[3]=_,t[4]=h,t[5]=v,t[6]=f,t[7]=a,t[8]=j,t[9]=V}else j=t[8],V=t[9];t[12]!==j||t[13]!==V?(O={newsContent:j,polling:V},t[12]=j,t[13]=V,t[14]=O):O=t[14];const{newsContent:q,polling:P}=O;let M;e:{if("Story"===a.__typename){let e;t[15]!==o||t[16]!==p||t[17]!==a||t[18]!==x?(e=(0,E.k9)(a,x,o,p),t[15]=o,t[16]=p,t[17]=a,t[18]=x,t[19]=e):e=t[19],M=e;break e}if("VideoStory"===a.__typename){let e;t[20]!==p||t[21]!==a?(e=(0,E.Ao)({story:a,imageRatio:p}),t[20]=p,t[21]=a,t[22]=e):e=t[22],M=e;break e}if("QuickStory"===a.__typename){let e;t[23]!==p||t[24]!==a?(e=(0,E.EE)({quickStory:a,imageRatio:p}
1)||void 0,t[23]=p,t[24]=a,t[25]=e):e=t[25],M=e;break e}let e;t[26]!==p||t[27]!==a?(e=(0,E.Or)({story:a,imageRatio:p}),t[26]=p,t[27]=a,t[28]=e):e=t[28],M=e}const w=M;let U;t[29]!==D||t[30]!==n||t[31]!==g||t[32]!==m||t[33]!==w||t[34]!==q||t[35]!==u||t[36]!==P||t[37]!==C||t[38]!==d||t[39]!==a||t[40]!==I?(U={newsContent:q,story:a,image:w,content:n,onNavigate:u,variant:I,setTitleTagAs:d,qaTag:C,disableAddOns:g,footer:m,polling:P,containerStyle:D},t[29]=D,t[30]=n,t[31]=g,t[32]=m,t[33]=w,t[34]=q,t[35]=u,t[36]=P,t[37]=C,t[38]=d,t[39]=a,t[40]=I,t[41]=U):U=t[41];const R=U;let B;return t[42]!==L||t[43]!==R||t[44]!==A||t[45]!==a||t[46]!==k?(B=L||!["Story","QuickStory"].includes(a.__typename)?(0,y.jsx)(F,{...R}):(0,y.jsx)(G,{story:a,children:(0,y.jsx)(T.A,{...k,story:a,noAdditionalInfo:A,children:e=>{const{trackOnNavigate:t}=e;return(0,y.jsx)(N.A,{eventName:b.f7.SCROLL_VIEW_STORY,children:(0,y.jsx)(F,{...R,trackOnNavigate:t})})}})}),t[42]=L,t[43]=R,t[44]=A,t[45]=a,t[46]=k,t[47]=B):B=t[47],B},K=a.memo($);function W(){}function H(){}function Y(e){return"Gallery"===e.object.__typename}function Q(e){const{media:t}=e;return{id:t.id,externalURL:t.externalURL,url:t.externalURL,title:t.title,description:t.description,width:t.width||void 0,height:t.height||void 0,photographer:t.photographer||void 0}}function z(e){const{media:t}=e;return t.internalTags.includes(j.NVm.IS_DISTURBING)}function J(e){const{media:t}=e;return t.id}function Z(e){return"Polling"===e.object.__typename}},"730f51fe50181c147568":(e,t,n)=>{n.d(t,{A:()=>l,G:()=>r});var i=n("657568e21c4ac254e368"),a=n("bd54685d61e0399e28c6"),o=n("3bc2a6883ae6a00cdfc5");const s=e=>{const t={};return e.filter((e=>{if("FragmentDefinition"!==e.kind)return!0;const n=e.name.value;return!t[n]&&(t[n]=!0,!0)}))};class l extends i.A{}l.mutation={kind:"Document",definitions:s([{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"VotePolling"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vote"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserVoteInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"VotePolling"},arguments:[{kind:"Argument",name:{kind:"Name",value:"vote"},value:{kind:"Variable",name:{kind:"Name",value:"vote"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Polling"},directives:[]}]}}]}}].concat(o.ym.definitions)),loc:{start:0,end:124,source:{body:"\n mutation VotePolling($vote: UserVoteInput!) {\n VotePolling(vote: $vote) {\n ...Polling\n }\n }\n \n ",name:"GraphQL request",locationOffset:{line:1,column:1}}}};const r=e=>(0,a.n)(l.mutation,e)},b278b0350969ad13d321:(e,t,n)=>{n.r(t),n.d(t,{default:()=>C});var i=n("d518909bf6561866660f"),a=n("f29b77cd1c7382d8894a"),o=n("9f94a4dae3f49947c92d"),s=n("b5040a162a4a4dde67e6"),l=n("d0406a7a1ffc6288e717"),r=n("914b5ce92ce2e8a8f65e"),d=n("8e3d778059c98c568e56"),c=n("8242b4394b0bfacfc5b8"),u=n("aab7660251ee0163f01e"),p=n("b75869fa0ee55381231c"),m=n("6e9a29e0eb3112f51e68"),g=n("82aa9fe1294c6f2a9955"),f=n("cc710c3175d755559397"),b=n("bd4bc37a5614402b45b9"),h=n("730f51fe50181c147568"),y=n("b36dd10eceececbf25c0"),A=n("b8d0ee998ea68c6abe46"),k=n("fba30acf371e30c980ab"),v=n("b0c70e1a33943c467e58"),_=n("5f45d096868bdb43893a"),D=n("a1ca5acfbf0478960314");const I=a.memo((e=>{const t=(0,i.c)(11),n=(0,s.DP)(),a=e.question.choices.reduce(S,
10);let o,l;if(t[0]!==e.question.choices||t[1]!==e.userChoice||t[2]!==n||t[3]!==a){let i;t[5]!==e.userChoice||t[6]!==n||t[7]!==a?(i=t=>{const i=a>0?t.stats/a*100:0,o=e.userChoice===t.id;return(0,D.jsxs)(u.A,{as:"li",qaTag:"polling-result",flex:1,marginBottom:8,children:[(0,D.jsxs)(u.A,{flex:3,verticalAlign:"middle",position:"relative",children:[(0,D.jsx)(u.A,{backgroundColor:o?n.story.polling.bar.activeBackground:n.story.polling.bar.inactiveBackground,width:`${i}%`,height:"40px",borderRadius:4,padding:8}),(0,D.jsx)(u.A,{flexDirection:"column",position:"absolute",marginLeft:8,style:{wordBreak:"break-word"},children:(0,D.jsx)(p.A,{fontWeight:o?"bold":void 0,numberOfLines:1,children:t.detail})})]}),(0,D.jsx)(u.A,{flex:1,verticalAlign:"middle",horizontalAlign:"right",children:(0,D.jsx)(p.A,{fontWeight:o?"bold":void 0,children:`${i.toFixed(2)}%`})})]},t.id)},t[5]=e.userChoice,t[6]=n,t[7]=a,t[8]=i):i=t[8],o=e.question.choices.map(i),t[0]=e.question.choices,t[1]=e.userChoice,t[2]=n,t[3]=a,t[4]=o}else o=t[4];return t[9]!==o?(l=(0,D.jsx)(_.B,{children:o}),t[9]=o,t[10]=l):l=t[10],l})),x=a.memo((e=>{const t=(0,i.c)(20),n=(0,o.m)(),{triggerAlert:a}=(0,f.MW)(),s=(0,k.A)(),[l]=(0,h.G)();let r;t[0]!==n||t[1]!==e.disableVote||t[2]!==e.question.id||t[3]!==e.userVoteVariables||t[4]!==s||t[5]!==a||t[6]!==l?(r=t=>()=>{if(e.disableVote)a({variant:"info",message:"Kamu tidak bisa vote karena polling belum dimulai"});else{const i={pollingID:e.userVoteVariables.pollingID,votes:[{questionID:e.question.id,choiceID:t}]};l({variables:{vote:i},update:(t,a)=>{if(a.data)try{n.writeQuery({query:b.A.query,variables:e.userVoteVariables,data:{FindAllUserVotesByUserIDAndPollingID:[{__typename:"UserVote",userID:e.userVoteVariables.userID,pollingID:e.userVoteVariables.pollingID,votes:i.votes.map(L)}]}})}catch{}}}),s?.trackEvent({name:A.f7.CLICK_VOTE,context:{additional_info:e.userVoteVariables.pollingID}})}},t[0]=n,t[1]=e.disableVote,t[2]=e.question.id,t[3]=e.userVoteVariables,t[4]=s,t[5]=a,t[6]=l,t[7]=r):r=t[7];const d=r;let c,g,y,v;if(t[8]!==e.question.detail?(c=(0,D.jsx)(p.A,{as:"legend",visuallyHidden:!0,children:e.question.detail}),t[8]=e.question.detail,t[9]=c):c=t[9],t[10]!==d||t[11]!==e.question.choices){let n;t[13]!==d?(n=e=>(0,D.jsx)(_.L,{qaTag:"polling-choice",marginBottom:8,children:(0,D.jsx)(m.A,{variant:"line",block:!0,onClick:d(e.id),children:e.detail})},e.id),t[13]=d,t[14]=n):n=t[14],g=e.question.choices.map(n),t[10]=d,t[11]=e.question.choices,t[12]=g}else g=t[12];return t[15]!==g?(y=(0,D.jsx)(_.B,{role:"presentation",children:g}),t[15]=g,t[16]=y):y=t[16],t[17]!==c||t[18]!==y?(v=(0,D.jsx)(u.A,{as:"form",onSubmit:N,padding:0,margin:0,borderWidth:0,children:(0,D.jsxs)(u.A,{as:"fieldset",padding:0,margin:0,borderWidth:0,children:[c,y]})}),t[17]=c,t[18]=y,t[19]=v):v=t[19],v})),C=a.memo((0,v.A)({context:{card_name:A.dU.EMBED_POLLING}})((e=>{const t=(0,i.c)(60),n=(0,l.A)(6e4),{data:o}=(0,y.F)(),s=o?.FindCurrentUser,m=s?.id||"";let f;t[0]!==e.polling.id||t[1]!==m?(f={userID:m,pollingID:e.polling.id},t[0]=e.polling.id,t[1]=m,t[2]=f):f=t[2];const h=f,A=!s?.id;let k;t[3]!==A||t[4]!==h?(k={variables:h,errorPolicy:"ignore",skip:A},t[3]=A,t[4]=h,t[5]=k):k=t[5];const{data:v}=(0,b.k)(k);let _;t[6]!==v?(_=new Map,v&&v.FindAllUserVotesByUserIDAndPollingID&&v.FindAllUserVotesByUserIDAndPollingID.forEach((e=>{e.votes.forEach((e=>{_.set(e.questionID,e.choiceID)}))})),t[6]=v,t[7]=_):_=t[7];const C=_;let S;t[8]!==C||t[9]!==s?(S=Array.from(C.keys()).length>0&&!!s,t[8]=C,t[9]=s,t[10]=S):S=t[10];const L=S;let N;t[11]!==n||t[12]!==e.polling.endsAt?(N=(0,r.d)(n,new Date(e.polling.endsAt)),t[11]=n,t[12]=e.polling.endsAt,t[13]=N):N=t[13];const T=N;let j;t[14]!==n||t[15]!==e.polling.startsAt?(j=(0,d.Y)(n,new Date(e.polling.startsAt)),t[14]=n,t[15]=e.polling.startsAt,t[16]=j):j=t[16];const V=j;let O;t[17]!==n||t[18]!==T||t[19]!==V||t[20]!==e.polling.endsAt||t[21]!==e.polling.startsAt?(O=T?"Polling telah berakhir":`${V?"Polling dimulai ":""}${(0,c.k)(new Date(V?e.polling.startsAt:e.polling.endsAt),n,{locale:g.A})}`,t[17]=n,t[18]=T,t[19]=V,t[20]=e.polling.endsAt,t[21]=e.polling.startsAt,t[22]=O):O=t[22];const q=O;let P,M,w;if(t[23]!==e.polling.questions?(P=0,e.polling.questions.forEach((e=>{P=e.choices.reduce(E,0)})),t[23]=e.polling.questions,t[24]=P):P=t[24],t[25]!==e.hidePollingTitle||t[26]!==e.polling.questions[0]?.detail?(M=e.hidePollingTitle?null:(0,D.jsx)(p.A,{fontWeight:"bold",as:"h2",qaTag:"polling-title",marginBottom:e.hidePollingTitle?0:8,visuallyHidden:e.hidePollingTitle,children:e.polling.questions[0]?.detail||""}),t[25]=e.hidePollingTitle,t[26]=e.polling.questions[0]?.detail,t[27]=M):M=t[27],t[28]!==C||t[29]!==s||t[30]!==T||t[31]!==L||t[32]!==V||t[33]!==e.polling.questions||t[34]!==h){let n;t[36]!==C||t[37]!==s||t[38]!==T||t[39]!==L||t[40]!==V||t[41]!==h?(n=e=>T||L?(0,D.jsx)(I,{question:e,userChoice:C.get(e.id)},e.id):(0,D.jsx)(x,{question:e,userVoteVariables:h,disableVote:V,currentUser:s},e.id),t[36]=C,t[37]=s,t[38]=T,t[39]=L,t[40]=V,t[41]=h,t[42]=n):n=t[42],w=e.polling.questions.map(n),t[28]=C,t[29]=s,t[30]=T,t[31]=L,t[32]=V,t[33]=e.polling.questions,t[34]=h,t[35]=w}else w=t[35];const U=`${P} Pemilih `;let R,B;t[43]!==q||t[44]!==U?(R=(0,D.jsxs)(p.A,{as:"p",colorScheme:"secondary",size:"micro",children:[U,"· ",q]}),t[43]=q,t[44]=U,t[45]=R):R=t[45],t[46]!==R||t[47]!==M||t[48]!==w?(B={title:M,pollingContent:w,info:R},t[46]=R,t[47]=M,t[48]=w,t[49]=B):B=t[49];const{title:F,pollingContent:G,info:$}=B;if(!e.isDesktop&&e.scrollable){let e,n;return t[50]!==G||t[51]!==F?(e=(0,D.jsxs)(u.A,{maxHeight:122,overflowY:"scroll",children:[F,G]}),t[50]=G,t[51]=F,t[52]=e):e=t[52],t[53]!==$||t[54]!==e?(n=(0,D.jsxs)(a.Fragment,{children:[e,$]}),t[53]=$,t[54]=e,t[55]=n):n=t[55],n}let K;return t[56]!==$||t[57]!==G||t[58]!==F?(K=(0,D.jsxs)(a.Fragment,{children:[F,G,$]}),t[56]=$,t[57]=G,t[58]=F,t[59]=K):K=t[59],K})));function S(e,t){return e+t.stats}function L(e){return{...e,__typename:"Vote"}}function N(e){e.preventDefault()}function E(e,t){return e+t.stats}}
1,bd4bc37a5614402b45b9:(e,t,n)=>{n.d(t,{A:()=>r,k:()=>d});var i=n("d518909bf6561866660f"),a=n("1a370ceb54eb2bfdaefd"),o=n("4181f7cb9ac8274a8700"),s=n("3bc2a6883ae6a00cdfc5");const l=e=>{const t={};return e.filter((e=>{if("FragmentDefinition"!==e.kind)return!0;const n=e.name.value;return!t[n]&&(t[n]=!0,!0)}))};class r extends a.A{}r.defaultProps={ssr:!1},r.query={kind:"Document",definitions:l([{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindAllUserVotesByUserIDAndPollingID"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pollingID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"FindAllUserVotesByUserIDAndPollingID"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userID"},value:{kind:"Variable",name:{kind:"Name",value:"userID"}}},{kind:"Argument",name:{kind:"Name",value:"pollingID"},value:{kind:"Variable",name:{kind:"Name",value:"pollingID"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserVote"},directives:[]}]}}]}}].concat(s.G7.definitions)),loc:{start:0,end:230,source:{body:"\n query FindAllUserVotesByUserIDAndPollingID($userID: ID!, $pollingID: ID!) {\n FindAllUserVotesByUserIDAndPollingID(\n userID: $userID\n pollingID: $pollingID\n ) {\n ...UserVote\n }\n }\n \n ",name:"GraphQL request",locationOffset:{line:1,column:1}}}};const d=e=>{const t=(0,i.c)(2);let n;return t[0]!==e?(n={...r.defaultProps,...e},t[0]=e,t[1]=n):n=t[1],(0,o.I)(r.query,n)}}}]);
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.