1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26831],{6189:(e,t,r)=>{r.d(t,{u:()=>U});var n=r(4930),a=r(65162),o=r(94161),i=r(76650),l=r(73831),s=r(85871),d=r(23334),c=r(32875),u=r(49612),h=r(3537),m=r(63851),p=r(4841),g=r(57744),x=r(86902),f=r(97406),j=r(72202),k=r(54991),w=r(94981),v=r(22712),S=r(24419),b=r(27919),C=r(13248),M=r(43204),y=r(13466),R=r(16615),G=r(13521),O=r(61044),P=r(18729),I=r(42316),z=r(76694),A=r(65168),N=r(15531),$=r(61358),T=r(60982),V=r(89982),E=r(37902),_=r(72731),D=r(14910),L=r(7049),B=r(26821),W=r(23237),H=r(24801),F=r(50848),Y=r(4874);let J=["rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0.2)","rgba(0, 0, 0, 1)"],Z=e=>{var t,r,o,i,l,s,d,c,u,h,m;let{data:p}=e,{getUrl:g}=(0,E.h)(),{trackEvent:j}=(0,_.j)(),{mode:w}=(0,W.Rk)(),C="dark"===w?"https://cdn.class101.net/images/e97e05aa-d14c-45b1-83dd-3895a7ff676c":"https://cdn.class101.net/images/1df3da22-8582-46de-9fe7-b8e74bbc47dd",M=null!=(d=null==(t=p.chapters)?void 0:t.reduce((e,t)=>{var r,n;return e+(null!=(n=null==t||null==(r=t.lessons)?void 0:r.length)?n:0)},0))?d:0,y=M>0?Math.min(100,Math.round(p.completedLessonCount/M*100)):0,G=(0,a.useMemo)(()=>{var e,t;return g("/[lang]/classes/[klassId]",{klassId:p.id,lectureId:null!=(t=null==(e=p.lastLesson)?void 0:e.id)?t:""})},[p.id,null==(r=p.lastLesson)?void 0:r.id,g]);return(0,n.jsx)(x.I,{name:"Playing Class Card Impressed",properties:{title:p.title,creatorNickName:null==(o=p.creator)?void 0:o.nickName,progressPercent:y},children:(0,n.jsx)(A.a,{width:"100%",children:(0,n.jsx)(Y.V,{coverImage:null!=(c=p.coverImageURL)?c:C,title:p.title,creatorNickName:null==(i=p.creator)?void 0:i.nickName,progress:y,streakPage:"/[lang]/subscription/streak",continueUrl:G,onContinueClick:()=>{var e;return j({name:"Playing Class Card Clicked",properties:{title:p.title,creatorNickName:null==(e=p.creator)?void 0:e.nickName,progressPercent:y}})},children:(0,n.jsx)(H.NP,{theme:{mode:"dark"},children:(0,n.jsxs)(A.a,{position:"relative",width:"100%",height:["auto","auto",219],rounded:"lg",elevationLevel:1,overflow:"hidden",zIndex:0,children:[(0,n.jsxs)(v.z,{height:"100%",width:"100%",children:[(0,n.jsx)(A.a,{height:"100%",width:"100%",maxHeight:[280,280,"auto"],children:(0,n.jsx)(N._,{src:null!=(u=p.coverImageURL)?u:C,alt:p.title,width:"100%",height:"100%",objectFit:"cover"})}),(0,n.jsx)(A.a,{height:"100%",width:"100%",display:["none","flex"],transform:{scaleX:-1},children:(0,n.jsx)(N._,{src:null!=(h=p.coverImageURL)?h:C,width:"100%",height:"100%",objectFit:"cover"})})]}),(0,n.jsx)(A.a,{position:"absolute",height:[160,"100%"],width:["100%","65%","65%"],top:["auto",0],left:[0,"auto"],right:0,bottom:0,backdropBlurRadius:2,zIndex:1,linearGradient:[{colors:J,degree:180,locations:[0,30,80]},{colors:J,degree:90,locations:[0,8.51,34.31]}],p:16,children:(0,n.jsxs)(D.B,{direction:["horizontal","vertical"],alignVertical:["end","center"],flex:1,alignHorizontal:["space-between","end"],spacing:[18,24],children:[(0,n.jsxs)(b.T,{maxWidth:"65%",children:[(0,n.jsx)(R.h,{level:6,weight:"bold",lineLimit:2,children:p.title}),(0,n.jsx)(S.$,{height:4}),(0,n.jsx)(O.n,{level:3,weight:"medium",color:"onView2",children:(0,n.jsx)(k.V,{defaultMessage:"{nickName} \xb7 {chapterCount}%",id:"MT9mTOZJJ1fq",values:{nickName:null!=(m=null==(l=p.creator)?void 0:l.nickName)?m:"í¬ë¦¬ìì´í°",chapterCount:y}})}),(0,n.jsx)(S.$,{height:8}),(0,n.jsx)(L.z,{progress:y,durationMs:0})]}),(0,n.jsx)(A.a,{width:"100%",maxWidth:"65%",children:(0,n.jsx)(f.W,{name:"Playing Class Card Clicked",properties:{title:p.title,creatorNickName:null==(s=p.creator)?void 0:s.nickName,progressPercent:y},children:(0,n.jsx)(B.W,{"data-class101-target-id":"23553672592f",IconComponent:F.S,kind:"secondary",size:"lg",full:[!1,!0],href:G,testId:"HomeClassPlayBtn",children:(0,n.jsx)(k.V,{defaultMessage:"í´ëì¤ ì´ì´ë³´ê¸°",id:"53fCJYYbclHU"})})})})]})})]})})})})})},U=()=>{let{getResponsiveValue:e}=(0,I.tv)(),t=e([!1,!1,!0]),r=(0,z.e)(),{isLoggedIn:o}=(0,p.h)(),{streakCount:i,streakGoal:m,rewardStreakGoal:j,isMeAndmyAttendanceLoading:P}=(0,l.G)({skip:!o}),N=(0,a.useCallback)(()=>{r.open(e=>{var t;let{isOpen:a,close:o}=e;return(0,n.jsx)(Q,{isOpen:a,currentStreak:i,properties:{streakCount:i,streakGoal:null!=(t=null==j?void 0:j.targetDays)?t:null},onClose:()=>{o(),r.unmount()}})})},[r,null==j?void 0:j.targetDays,i]),{showPaybackChallengeStreakProgressCard:V,isShowPaybackChallengeStreakProgressCardLoading:E}=(0,s.S)(),_=(0,w.n)(j)&&(null==j?void 0:j.status)!=="FAILED";return(0,n.jsx)(g.b,{properties:{pageName:"subscription_member_home",streakGoal:m,streakCount:i},children:(0,n.jsxs)(v.z,{py:[20,20,40],children:[(0,n.jsx)(q,{}),t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.$,{width:20}),(0,n.jsx)(x.I,{name:"Subs Streak Goal Section Impressed",children:(0,n.jsx)(b.T,{width:[365,365,"35%"],height:219,flexShrink:0,children:(0,n.jsx)(C.t,{backgroundColor:"surface2",rounded:"lg",width:"100%",height:"100%",borderColor:"outline2",p:24,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(v.z,{alignVertical:"center",children:[(0,n.jsx)(d.l,{alignHorizontal:"start"}),(0,n.jsx)(c.i,{alignHorizontal:"start"})]}),(0,n.jsx)(S.$,{height:20}),(0,n.jsx)(M.c,{direction:"horizontal"}),(0,n.jsx)(S.$,{height:20}),P||E?(0,n.jsx)(y.E,{width:"100%",height:"100%",rounded:"md"}):V?(0,n.jsx)(u.A,{viewMode:"content"}):_?(0,n.jsx)(h.a,{}):(0,n.jsxs)(A.a,{p:16,rounded:"md",background:"surface1",gap:8,justifyContent:"center",display:"flex",height:"100%",children:[(0,n.jsx)(R.h,{level:7,weight:"medium",color:"onView2",textAlign:"center",children:(0,n.jsx)(k.
1V,{id:"cBQXMzjrav5r",defaultMessage:"ì°ì ìê° ëª©í ë¬ì±íë©´ ì¶ê° í¬ì¸í¸ë¥¼ ë°ìì"})}),(0,n.jsx)(v.z,{alignVertical:"center",alignHorizontal:"center",children:i>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.W,{name:"Subs Streak Goal Section Goal Setting Clicked",children:(0,n.jsx)(G.a,{"data-class101-target-id":"9fed678ec66f",size:"md",onClick:N,children:(0,n.jsx)(O.n,{level:4,weight:"semiBold",color:"onView1",children:(0,n.jsx)(k.V,{id:"nSCu6LwocJFT",defaultMessage:"목í ì¸ì°ê¸°"})})})}),(0,n.jsx)($.L,{pt:2,size:14})]}):(0,n.jsxs)(v.z,{gap:4,alignVertical:"center",children:[(0,n.jsx)(T.Y,{size:15,fill:"onView2"}),(0,n.jsx)(O.n,{level:3,color:"onView2",children:(0,n.jsx)(k.V,{id:"Rhg5+ZMtxWuF",defaultMessage:"1ì¼ ì´ì íìµíë©´ 목í를 ì¸ì¸ ì ìì´ì"})})]})})]})]})})})})]}):null]})})},q=()=>{let{state:e}=(0,m.u)();return"loading"===e.type?(0,n.jsx)(V.w,{children:(0,n.jsx)(A.a,{width:"100%",height:[280,219],children:(0,n.jsx)(A.a,{backgroundColor:"overlay",width:"100%",height:"100%",rounded:"md"})})}):"empty"===e.type?(0,n.jsx)(A.a,{position:"relative",width:"100%",height:219,rounded:"lg",borderColor:"outline2",overflow:"hidden",children:(0,n.jsxs)(b.T,{flex:1,alignVertical:"center",alignHorizontal:"center",gap:16,children:[(0,n.jsx)(N._,{src:"https://cdn.class101.net/images/ea8e3ce3-a379-42db-bc05-397b9db7ecee",width:56,height:56,alt:"empty-class"}),(0,n.jsx)(O.n,{level:1,color:"onView2",textAlign:"center",weight:"medium",children:(0,n.jsx)(k.V,{id:"t3ZJ598BqY46",defaultMessage:"ìì§ ìê°ì¤ì¸ í´ëì¤ê° ìì´ì"})})]})}):(0,n.jsx)(Z,{data:e.data})},Q=e=>{let{isOpen:t,onClose:r,properties:l,currentStreak:s}=e,[d,c]=(0,a.useState)("SET_STREAK_GOAL");return(0,n.jsx)(g.b,{properties:l,children:(0,n.jsx)(x.I,{name:"Subs Streak Extended Impressed",children:(0,n.jsx)(b.T,{minHeight:610,minWidth:"100%",height:"100%",children:(0,n.jsx)(P.Yb,{open:t,onClose:r,showCloseButton:!1,size:"md",renderContents:()=>"SET_STREAK_GOAL"===d?(0,n.jsx)(o.q,{onComplete:()=>c("ALARM"),currentStreak:s}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.a,{name:"Subs Streak Goal Notification"}),(0,n.jsx)(i.R,{onClose:r,isModalView:!0})]})})})})})}},35452:(e,t,r)=>{r.d(t,{TQ:()=>j,V8:()=>p,sR:()=>x});var n=r(86739),a=r(56392),o=r(12467),i=r(93952),l=r(7283),s=r(78975),d=r(65162);function c(){let e=(0,n._)(["\n fragment MixedRecommendedProductOnRecommendedProductsGridSection on MixedRecommendedProduct {\n id\n recommendationId\n mixedProduct {\n ...ProductV3OnProductItem\n ...Live101OnLive101ProductItem\n }\n}\n ","\n",""]);return c=function(){return e},e}function u(){let e=(0,n._)(["\n query RecommendedProductsV2OnRecommendedProductsGridSection($first: Int, $after: String, $campaignArn: String, $userId: String, $isLoggedIn: Boolean!, $filter: [RecommendFilterOption!], $filterExclude: [RecommendFilterOption!], $rankingPurchaseOptions: [CategoryRankingPurchaseOption!]) {\n recommendedProductsV2(\n first: $first\n after: $after\n campaignArn: $campaignArn\n userId: $userId\n filter: $filter\n filterExclude: $filterExclude\n ) {\n pageInfo {\n hasNextPage\n endCursor\n __typename\n }\n edges {\n cursor\n node {\n ...RecommendedProductOnRecommendedProductsGridSectionList\n }\n }\n }\n}\n ",""]);return u=function(){return e},e}function h(){let e=(0,n._)(["\n query MixedRecommendedProductsOnRecommendedProductsGridSection($first: Int, $after: String, $campaignArn: String, $userId: String, $isLoggedIn: Boolean!, $filter: [RecommendFilterOption!], $filterExclude: [RecommendFilterOption!], $rankingPurchaseOptions: [CategoryRankingPurchaseOption!]) {\n mixedRecommendedProducts(\n first: $first\n after: $after\n campaignArn: $campaignArn\n userId: $userId\n filter: $filter\n filterExclude: $filterExclude\n ) {\n pageInfo {\n hasNextPage\n endCursor\n __typename\n }\n totalCount\n edges {\n cursor\n node {\n ...MixedRecommendedProductOnRecommendedProductsGridSection\n }\n }\n }\n}\n ",""]);return h=function(){return e},e}let m={},p=(0,a.J1)(c(),i.a,l.aG),g=(0,a.J1)(u(),o.s);function x(e){let t={...m,...e},r=s.I(g,t);return d.useMemo(()=>{let{data:e,loading:t,error:n,called:a,refetch:o,fetchMore:i,...l}=r;return{recommendedProductsV2Data:null==e?void 0:e.recommendedProductsV2,isRecommendedProductsV2Loading:t,recommendedProductsV2Error:n,isRecommendedProductsV2Called:a,refetchRecommendedProductsV2:o,fetchMoreRecommendedProductsV2:i,...l}},[r])}let f=(0,a.J1)(h(),p);function j(e){let t={...m,...e},r=s.I(f,t);return d.useMemo(()=>{let{data:e,loading:t,error:n,called:a,refetch:o,fetchMore:i,...l}=r;return{mixedRecommendedProductsData:null==e?void 0:e.mixedRecommendedProducts,isMixedRecommendedProductsLoading:t,mixedRecommendedProductsError:n,isMixedRecommendedProductsCalled:a,refetchMixedRecommendedProducts:o,fetchMoreMixedRecommendedProducts:i,...l}},[r])}},38377:(e,t,r)=>{r.d(t,{s:()=>n});let n=r(86656).vT?"arn:aws:personalize:ap-northeast-2:212011163676:campaign/home-product-recommendation-prod-user-personalization-campaign":"arn:aws:personalize:ap-northeast-2:736255089418:campaign/home-product-recommendation-dev-user-personalization-campaign"},52623:(e,t,r)=>{r.d(t,{A:()=>O});
1var n=r(4930),a=r(65162),o=r(82759),i=r(65168),l=r(17396),s=r(23237),d=r(42316),c=r(44160),u=r(46432),h=r(43561),m=r(30003),p=r(13727),g=r(61044),x=r(22712),f=r(48621),j=r(13248),k=r(52371);let w=(0,r(68596)._)("PopoverOpene")()(e=>{let{popoverId:t="",openInteraction:r,isOpen:a,open:o,close:i,children:s}=e,{isOpen:d,open:c,close:u}=(0,l.f)({id:t});return(0,n.jsx)(k.d,{"data-class101-target-id":"58759137fe05",cursor:"click"===r?"pointer":"default",onClick:()=>"click"===r&&(t?d?null==u?void 0:u():null==c?void 0:c():a?null==i?void 0:i():null==o?void 0:o()),onHoverIn:()=>"hover"===r&&(t?null==c?void 0:c():null==o?void 0:o()),onHoverOut:()=>"hover"===r&&(t?null==u?void 0:u():null==i?void 0:i()),as:"label",children:s})});var v=r(24419),S=r(27919),b=r(95639),C=r(34135),M=r(37501),y=r(39593);let R=Math.sqrt(50)/2,G=(0,a.memo)(e=>{let{title:t,renderContent:r,showCloseButton:l,backgroundColor:s,maxWidth:d,onClose:c,popoverRef:p,popoverWidth:k,showArrow:w,arrowPosition:b,isOpen:C=!1,popoverPosition:M,onLayout:y,containerZIndex:R}=e,G=(0,a.useMemo)(()=>(0,m.O)(t)?(0,n.jsx)(x.z,{overflow:o.i?"visible":"hidden",children:(0,n.jsx)(g.n,{level:2,weight:"regular",...d?{wordBreak:"keep-all",wordWrap:"break-word",...!o.i?{maxWidth:"-webkit-fill-available"}:{}}:{whiteSpace:"nowrap"},children:t})}):null,[t,d]),O=(0,a.useMemo)(()=>l?(0,n.jsx)(S.T,{alignVertical:"center",children:(0,n.jsx)(f.K,{"data-class101-target-id":"220956849d7b",IconComponent:u.Y,size:"sm",color:"onColor",onClick:c})}):null,[l,c]),P=(0,a.useMemo)(()=>w?(0,n.jsx)(i.a,{position:"absolute",borderColor:s,borderWidth:5,borderStyle:"solid",transform:{rotate:"45deg"},...b}):null,[w,s,b]);return(0,n.jsx)(S.T,{position:"absolute",zIndex:R,...M,children:(0,n.jsx)(h.e,{animation:{opacity:C&&(0!==M.left||0!==M.top)?1:0},duration:200,easing:"easeOutQuad",children:(0,n.jsxs)(S.T,{zIndex:R,width:k,onLayout:y,children:[(0,n.jsx)(j.t,{backgroundColor:s,rounded:"md",children:(0,n.jsxs)(S.T,{px:12,py:8,ref:p,width:"100%",height:"100%",children:[(0,n.jsxs)(x.z,{flex:1,alignHorizontal:"space-between",children:[G,(0,m.O)(t)&&l&&(0,n.jsx)(v.$,{width:6}),O]}),((0,m.O)(t)||l)&&(0,m.O)(r)&&(0,n.jsx)(v.$,{width:4}),null==r?void 0:r()]})}),P]})})})});G.displayName="PopoverContent";let O=(0,a.memo)(e=>{let{popoverId:t,title:r,renderContent:o,position:i,showCloseButton:u=!0,backgroundColor:h="informative",maxWidth:m,offset:g=8,open:x,showArrow:f=!0,arrowOffset:j=8,children:k,zIndex:w,onClose:v,onOpen:O}=e,P="".concat((0,a.useId)()+"_"+(null!=t?t:"")),{isOpen:I,open:z,close:A}=(0,l.f)({id:P,value:x}),{theme:{zIndex:N}}=(0,s.Am)(),{getResponsiveValue:$}=(0,d.tv)(),{width:T}=(0,c.Y)(),V=$(g),E=$(m),{popoverPosition:_,arrowPosition:D,popoverRef:L,childRef:B,calculatePositionValue:W,setPopoverPosition:H}=((e,t,r)=>
1{let[n,o]=(0,a.useState)({left:0,top:0}),[i,l]=(0,a.useState)({left:0,top:0}),s=(0,a.useRef)(null),d=(0,a.useRef)(null),u=(0,a.useCallback)(async()=>{if(!s.current||!d.current)return;let{width:n=0,height:a=0}=await (0,y.x)(s.current),{width:i,height:u,x:h,y:m}=await (0,y.x)(d.current),{x:p,y:g,finalPosition:x}=((e,t,r,n)=>{let[a,o]=r.split("-"),{x:i,y:l}=(0,b.m)({referenceRect:e,targetRect:t,position:r,spacing:n}),s=(0,c.Y)(),d=(0,C._)({viewport:s,targetRect:{...t,x:e.x+i,y:e.y+l}});if(Object.values(d).every(e=>e<=0))return{x:i,y:l,finalPosition:r};let u=a;d[a]>0&&(u=(0,M.J)(a));let h=[o];(e=>"top"===e||"bottom"===e?["left","right"]:["top","bottom"])(a).some(e=>d[e]>0)&&(h=["start",void 0,"end"].filter(e=>e!==o));let m=h.map(r=>({position:void 0!==r?"".concat(u,"-").concat(r):u,...(0,b.m)({referenceRect:e,targetRect:t,position:void 0!==r?"".concat(u,"-").concat(r):u,spacing:n})})).find(r=>{let{x:n,y:a}=r;return Object.values((0,C._)({viewport:s,targetRect:{...t,x:e.x+n,y:e.y+a}})).every(e=>e<=0)});if(m)return{x:m.x,y:m.y,finalPosition:m.position};let p=i;return("top"===a||"bottom"===a)&&(e.x+i<0?p=-e.x:e.x+i+t.width>s.width&&(p=s.width-e.x-t.width)),{x:p,y:l,finalPosition:r}})({x:h,y:m,width:i,height:u},{x:0,y:0,width:n,height:a},e,r),{arrow:f}=((e,t,r,n,a,o,i)=>{let l=t/2,s=r/2,d=n/2,c=a/2,u=Math.max(o,0),{leftMax:h,rightMax:m,topMax:p,bottomMax:g}={leftMax:R,rightMax:t-3*R-3,topMax:R,bottomMax:r-3*R-3};return({top:{popover:{left:d-l,top:-r-R-i},arrow:{left:l-R,top:r-R-2}},"top-start":{popover:{left:0,top:-r-R-i},arrow:{left:Math.min(h+u,m),top:r-R-2}},"top-end":{popover:{left:-t+n,top:-r-R-i},arrow:{left:Math.max(m-u,h),top:r-R-2}},bottom:{popover:{left:d-l,top:a+R+i},arrow:{left:l-R,top:-R}},"bottom-start":{popover:{left:0,top:a+R+i},arrow:{left:Math.min(h+u,m),top:-R}},"bottom-end":{popover:{left:-t+n,top:a+R+i},arrow:{left:Math.max(m-u,h),top:-R}},left:{popover:{left:-t-R-i,top:c-s},arrow:{left:t-R-2,top:s-R-2}},"left-start":{popover:{left:-t-R-i,top:0},arrow:{left:t-R-2,top:Math.min(p+u,g)}},"left-end":{popover:{left:-t-R-i,top:-r+a},arrow:{left:t-R-2,top:Math.max(g-u,p)}},right:{popover:{left:n+R+i,top:c-s},arrow:{left:-R-1,top:s-R-2}},"right-start":{popover:{left:n+R+i,top:0},arrow:{left:-R-1,top:Math.min(p+u,g)}},"right-end":{popover:{left:n+R+i,top:-r+a},arrow:{left:-R-1,top:Math.max(g-u,p)}}})[e]})(x,n,a,i,u,t,r);o({left:p,top:g}),l(f)},[e,t,r]);return{popoverPosition:n,arrowPosition:i,popoverRef:s,childRef:d,calculatePositionValue:u,setPopoverPosition:o}})(i,j,V),[F,Y]=(0,a.useState)(!1),J=(0,p.c)(O),Z=(0,p.c)(v),U=(0,a.useMemo)(()=>E?"number"==typeof E?Math.min(T,E):E:"100%",[E,T]),q=(0,a.useCallback)(()=>{if(I){Y(!0),null==J||J();return}{null==Z||Z();let e=setTimeout(()=>{H({left:0,top:0}),Y(!1)},200);return()=>clearTimeout(e)}},[I,J,Z,H]);(0,a.useEffect)(()=>{q()},[q]),(0,a.useEffect)(()=>{I&&W()},[I,W]);let Q=(0,a.useMemo)(()=>I?null!=w?w:N.popover:0,[I,w,N.popover]),K=(0,a.useMemo)(()=>k?(0,a.cloneElement)(k,{isOpen:I,open:z,close:A}):null,[k,I,z,A]);return(0,n.jsxs)(S.T,{zIndex:Q,children:[F&&(0,n.jsx)(G,{title:r,renderContent:o,showCloseButton:u,backgroundColor:h,maxWidth:m,onClose:A,popoverRef:L,popoverWidth:U,showArrow:f,arrowPosition:D,isOpen:I,popoverPosition:_,onLayout:W,containerZIndex:Q}),(0,n.jsx)(S.T,{ref:B,children:K})]})});O.Opener=w,O.displayName="Popover"},63851:(e,t,r)=>{r.d(t,{u:()=>s});var n=r(65162),a=r(4841),o=r(21683),i=r(94981),l=r(11442);let s=()=>{let{isLoggedIn:e,isAuthenticationInProgress:t}=(0,a.h)(),{lastClassData:r,isLastClassLoading:s,refetchLastClass:d}=(0,l.wJ)({skip:!e,fetchPolicy:"network-only"}),c=s||t;return(0,o.F)("visible",()=>{d()}),{state:(0,n.useMemo)(()=>{switch(!0){case c:return{type:"loading"};case(0,i.n)(r):return{type:"class",data:r};default:return{type:"empty"}}},[c,r])}}},73682:(e,t,r)=>{r.d(t,{h:()=>n});function n(e,t){if(!t||0===t.length)return[e];let r=t.map(e=>e.afterProductCount),n=[],a=[],o=0,i=r[0];for(let t=0;t<e.length;t++)a.push(e[t]),a.length===i&&(n.push(a),a=[],i=r[++o]);return a.length>0&&n.push(a),n}},76650:(e,t,r)=>{r.d(t,{R:()=>R});var n=r(4930),a=r(78810),o=r(57744),i=r(72202),l=r(86902),s=r(97406),d=r(54991),c=r(71188),u=r(95632),h=r(27919),m=r(24419),p=r(16615),g=r(26821),x=r(13521),f=r(65162),j=r(6259),k=r(71646),w=r(35545),v=r(86739),S=r(56392),b=r(23725);function C(){let e=(0,v._)(["\n mutation SetMyCustomNotificationOnStreakAlarmNudge($days: [Day!]!, $time: String!, $campaignOption: CampaignOption!, $agreement: Boolean) {\n setMyCustomNotification(\n campaignOption: $campaignOption\n days: $days\n time: $time\n agreement: $agreement\n ) {\n success\n notification {\n id\n days\n time\n agreement\n }\n }\n}\n "]);return C=function(){return e},e}let M={},y=(0,S.J1)(C()),R=(0,c.o)(e=>{let{onClose:t,...r}=e,[n,{isSetMyCustomNotificationLoading:a}]=function(e){let t={...M,...void 0},r=b.n(y,t);return f.useMemo(()=>{let{data:e,loading:t,error:n,called:a,...o}=r[1];return[r[0],{setMyCustomNotificationData:null==e?void 0:e.setMyCustomNotification,isSetMyCustomNotificationLoading:t,setMyCustomNotificationError:n,isSetMyCustomNotificationCalled:a,...o}]},[r])}(),{showToast:o}=(0,w.hs)(),{localizeText:i}=(0,k.B)();return{isLoading:a,handleAgreeButtonClick:(0,f.useCallback)(()=>{n({variables:{campaignOption:j.EAz.STREAK,agreement:!0,days:["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],time:"22:00:00"},onCompleted:()=>{o({title:i({defaultMessage:"ì림 ì ì²ì´ ìë£ëìì´ì",id:"StreakAlarmNudgeAgreeSuccessToast"}),kind:"success"}),t()},onError:()=>{o({title:i({defaultMessage:"ì림 ì ì²ì ì¤í¨íì´ì",id:"StreakAlarmNudgeAgreeErrorToast"}),kind:"error"})}})},[i,t,n,o]),onClose:t,...r}},e=>{let{isLoading:t,handleAgreeButtonClick:r,onClose:c,isModalView:f}=e;return(0,n.jsx)(u.Q,{height:"100%",children:(0,n.jsx)(h.T,{height:"100%",alignVertical:"space-between",children:(0,n.jsxs)(o.b,{properties:{pageName:"subs_streak_goal_notification"},children:[(0,n.jsx)(i.a,{name:"Subs Streak Goal Notification"}),f?(0,n.jsx)(m.$,{height:80}):null,(0,n.jsxs)(h.T,{flex:1,spacing:32,alignHorizontal:"center",alignVertical:"center",children:[(0,n.jsx)(a.n,{source:"https://cdn.class101.net/attachment/ff17d13c-0da5-4c79-bffc-743fa09672a3",autoplay:!0,width:120,height:120}),(0,n.jsxs)(h.T,{spacing:8,children:[(0,n.jsx)(p.h,{level:3,textAlign:"center",children:(0,n.jsx)(d.V,{id:"StreakAlarmNudgeTitle",defaultMessage:"ì°ì ìê° ê¸°ë¡ì´\\n깨ì§ì§ ìëë¡ ìë ¤ë릴ê¹ì?"})}),(0,n.jsx)(p.h,{level:5,textAlign:"center",weight:"regular",color:"onView2",children:(0,n.jsx)(d.V,{id:"StreakAlarmNudgeSubtitle",defaultMessage:"ì¸ì ë ì림ì í´ì í ì ìì´ì"})})]})]}),f?(0,n.jsx)(m.$,{height:143}):null,(0,n.jsxs)(h.T,{px:20,alignHorizontal:"center",spacing:12,mb:20,children:[(0,n.jsx)(l.I,{name:"Subs Streak Goal Notification Agree Button Impressed",children:(0,n.jsx)(s.W,{name:"Subs Streak Goal Notification Agree Button Clicked",children:(0,n.jsx)(g.W,{"data-class101-target-id":"928ee40acae0",loading:t,kind:"primary",size:"xl",full:!0,onClick:r,children:(0,n.jsx)(d.V,{id:"StreakAlarmNudgeAgreeButton",defaultMessage:"ìë ¤ì£¼ì
1¸ì"})})})}),(0,n.jsx)(l.I,{name:"Subs Streak Goal Notification Disagree Button Impressed",children:(0,n.jsx)(s.W,{name:"Subs Streak Goal Notification Disagree Button Clicked",children:(0,n.jsx)(x.a,{"data-class101-target-id":"0ebdaec29adc",size:"md",onClick:c,children:(0,n.jsx)(d.V,{id:"StreakAlarmNudgeDisagreeButton",defaultMessage:"ê´ì°®ìì"})})})})]})]})})})})},94161:(e,t,r)=>{r.d(t,{q:()=>D});var n=r(4930),a=r(54991),o=r(71188),i=r(59845),l=r(52623),s=r(61044),d=r(22712),c=r(13248),u=r(27919),h=r(89358),m=r(43561),p=r(65162);let g=(0,o.o)(e=>{let{current:t,currentStreak:r,options:n,popoverText:a}=e,[o,i]=(0,p.useState)(0),l=(0,p.useCallback)(e=>{i(e.width)},[]),[s,d]=(0,p.useState)(!0),c=(0,p.useMemo)(()=>0===n.length,[n.length]),u=(0,p.useMemo)(()=>c?[]:[{targetGoal:r-1,reward:0,check:!0},{targetGoal:r,reward:0,check:!s},...n.map(e=>({...e,check:!1}))],[r,s,c,n]),{innerWidth:h,spacing:m,px:g}=(0,p.useMemo)(()=>{if(!o)return{innerWidth:0,spacing:0,px:0};let e=o/4+30;return{innerWidth:e,spacing:e-36,px:o+e-18}},[o,36]),x=(0,p.useMemo)(()=>{if(s)return 0;let e=u.findIndex(e=>e.targetGoal===(null==t?void 0:t.targetGoal));return -1===e?1:e},[null==t?void 0:t.targetGoal,u,s]);return{isLoading:c,icons:u,spacing:m,progressWidth:(0,p.useMemo)(()=>o+2*h,[h,o]),px:g,currentIndex:x,width:o,options:n,handleLayoutChange:l,iconSize:28,offsetX:0===x?0:o/2-(x+1)*h,setAnimated:d,popoverText:a}},e=>{let{width:t,currentIndex:r,offsetX:o,progressWidth:p,spacing:g,px:x,icons:f,handleLayoutChange:j,iconSize:k,setAnimated:w,popoverText:v}=e;return(0,n.jsx)(l.A,{backgroundColor:"inverseSurface",open:(0,i.O)(v),position:"top",maxWidth:170,offset:18,showCloseButton:!1,renderContent:()=>(0,n.jsx)(s.n,{level:2,alignSelf:"center",textAlign:"center",children:v}),children:(0,n.jsx)(d.z,{onLayout:j,width:"100%",children:(0,n.jsx)(m.e,{animation:{x:o},style:{left:-t},duration:800,children:(0,n.jsxs)(d.z,{width:5*t,flexShrink:0,children:[(0,n.jsx)(c.t,{backgroundColor:"disable",position:"absolute",top:10,height:16,width:5*t}),(0,n.jsx)(m.e,{animation:{width:p},duration:800,onEnd:()=>w(!1),children:(0,n.jsx)(c.t,{backgroundColor:"primary",position:"absolute",top:10,height:16,width:"100%"})}),(0,n.jsx)(d.z,{left:x,gap:g,width:"100%",height:"100%",children:f.map((e,t)=>(0,n.jsx)(m.e,{animation:{scale:r===t?1.3:1},duration:200,children:(0,n.jsxs)(u.T,{alignHorizontal:"center",children:[(0,n.jsx)(c.t,{backgroundColor:"background",rounded:"full",p:e.check?3:4,height:36,width:36,children:(0,n.jsx)(d.z,{height:"100%",width:"100%",children:e.check?(0,n.jsx)(h.S,{fill:"primary",size:k+2}):(0,n.jsx)(c.t,{borderColor:"primary",borderWidth:8,rounded:"full",height:k,width:k})})}),(0,n.jsxs)(s.n,{level:3,children:[e.targetGoal,(0,n.jsx)(a.V,{id:"StreakGoalProgress.Days",defaultMessage:"ì¼"})]})]})},t))})]})})})})});var x=r(72731),f=r(57744),j=r(86902),k=r(58693),w=r(16615),v=r(47002);let S=(0,p.memo)(e=>{let{options:t,currentOption:r,onSelect:o,renderRewardText:l,eventName:s,properties:h}=e,{trackEvent:m}=(0,x.j)(),g=(0,p.useCallback)(e=>{o(e),s&&m({name:"".concat(s," Clicked"),properties:null==h?void 0:h(e)})},[s,o,h,m]);return(0,n.jsx)(u.T,{gap:12,children:t.map((e,t)=>{var o;return(0,n.jsx)(f.b,{properties:null!=(o=null==h?void 0:h(e))?o:{},children:(0,n.jsx)(j.I,{skip:(0,i.O)(s),name:"".concat(s," Impressed"),children:(0,n.jsx)(k.o,{"data-class101-target-id":"87bf6ed646d8",onClick:()=>g(e),children:(0,n.jsx)(c.t,{p:20,rounded:"md",borderColor:(null==r?void 0:r.targetGoal)===e.targetGoal?"primary":"outline2",borderWidth:(null==r?void 0:r.targetGoal)===e.targetGoal?2:1,children:(0,n.jsxs)(d.z,{alignHorizontal:"space-between",alignVertical:"center",children:[(0,n.jsxs)(d.z,{spacing:8,alignVertical:"center",children:[(0,n.jsx)(w.h,{level:5,children:(0,n.jsx)(a.V,{id:"RewardGoalOptions.TargetGoal",defaultMessage:"{days}ì¼",values:{days:e.targetGoal}})}),e.hot&&(0,n.jsx)(d.z,{children:(0,n.jsx)(v.E,{kind:"inverse",size:"sm",children:(0,n.jsx)(a.V,{id:"RewardGoalOptions.Hot",defaultMessage:"HOT\uD83D\uDD25"})})})]}),(0,n.jsx)(w.h,{level:6,weight:"medium",color:"onView2",children:l(e.reward)})]})})})},t)},t)})})});var b=r(72202),C=r(97406),M=r(95632),y=r(26821),R=r(4841),G=r(45061),O=r(71646),P=r(35545),I=r(86739),z=r(56392),A=r(78975),N=r(23725);function $(){let e=(0,I._)(["\n query RewardStreakGoalOptionsOnSetStreakGoal($timeZone: String!) {\n rewardStreakGoalOptions(timeZone: $timeZone) {\n goal\n rewardTicketCount\n hot\n }\n}\n "]);return $=function(){return e},e}function T(){let e=(0,I._)(["\n mutation RewardStreakGoalCreateOnSetStreakGoal($input: RewardStreakGoalCreateInput!) {\n rewardStreakGoalCreate(input: $input) {\n rewardStreakGoal {\n id\n targetDays\n rewardTicketCount\n }\n }\n}\n "]);return T=function(){return e},e}let V={},E=(0,z.J1)($()),_=(0,z.J1)(T()),D=(0,o.o)(e=>{let{onComplete:t,currentStreak:r,viewMode:a,entryType:o}=e,{showToast:l}=(0,P.hs)(),{localizeText:d}=(0,O.B)(),{isLoggedIn:c,isAuthenticationInProgress:u}=(0,R.h)(),[h,m]=(0,p.useState)(),{rewardStreakGoalOptionsData:g,isRewardStreakGoalOptionsLoading:x}=function(e){let t={...V,...e},r=A.I(E,t);return p.useMemo(()=>{let{data:e,loading:t,error:n,called:a,refetch:o,fetchMore:i,...l}=r;return{rewardStreakGoalOptionsData:null==e?void 0:e.rewardStreakGoalOptions,isRewardStreakGoalOptionsLoading:t,rewardStreakGoalOptionsError:n,isRewardStreakGoalOptionsCalled:a,refetchRewardStreakGoalOptions:o,fetchMoreRewardStreakGoalOptions:i,...l}},[r])}({variables:{timeZone:(0,p.useMemo)(()=>(0,G.P)(new Date),[])},skip:!c}),[f,{isRewardStreakGoalCreateLoading:j}]=function(e){let t={...V,...e},r=N.n(_,t);return p.useMemo(()=>{let{data:e,loading:t,error:n,called:a,...o}=r[1];return[r[0],{rewardStreakGoalCreateData:null==e?void 0:e.rewardStreakGoalCreate,isRewardStreakGoalCreateLoading:t,rewardStreakGoalCreateError:n,isRewardStreakGoalCreateCalled:a,...o}]},[r])}({refetchQueries:["MeAndMyAttendanceOnuseMeAndMyAttendance"]}),k=(0,p.useMemo)(()=>{var e;return null!=(e=null==g?void 0:g.map(e=>{var t;return{targetGoal:e.goal,reward:e.rewardTicketCount,hot:null!=(t=e.hot)&&t}}))?e:[]},[g]),w=(0,i.O)(h),v=(0,p.useCallback)(()=>{c&&w&&f({variables:{input:{goal:h.targetGoal,rewardTicketCount:h.reward,timeZone:(0,G.P)(new Date)}},onCompleted:()=>{l({kind:"success",title:d({defaultMessage:"ì°ì ìê° ëª©í를 ì¤ì íì´ì",id:"RewardStreak.SetStreakGoalSuccess"})}),t()},onError:()=>{l({kind:"error",title:d({defaultMessage:"목í ì¤ì ì ì¤í¨íìµëë¤",id:"RewardStreak.SetStreakGoalFailed"})}),t()}})},[f,c,w,d,t,null==h?void 0:h.reward,null==h?void 0:h.targetGoal,l]),S=(0,p.useCallback)(e=>d({id:"RewardGoalOptions.Reward",defaultMessage:"+ë³µê¶ {reward}ì¥"},{reward:e}),[d]),b=(0,p.useMemo)(()=>({pageName:"subs_streak_goal_setting",streakCount:r,streakGoals:k.map(e=>e.targetGoal),streakRewards:k.map(e=>e.reward)}),[r,k]),C=(0,p.useMemo)(()=>(null==h?void 0:h.reward)?d({id:"RewardStreak.SetStreakGoalPopover",defaultMessage:"목í ë¬ì±íë©´\n<b>ë³µê¶ {reward}ì¥</b>ì ì¶ê°ë¡ ë°ìì"},{reward:h.reward,b:e=>
1(0,n.jsx)(s.n,{level:2,weight:"medium",color:"orangeVibrant",children:e})}):d({defaultMessage:"목í ë¬ì±íë©´\në³µê¶ì ì¶ê°ë¡ ë°ìì",id:"vIZ5PnF8uDXN"}),[d,null==h?void 0:h.reward]);return{isLoading:x||u,isCreateLoading:j,options:k,selectedOption:h,handleOptionChange:m,handleButtonClick:v,isSelected:w,renderRewardText:S,currentStreak:r,properties:b,popoverText:C,viewMode:a,entryType:o}},e=>{let{isLoading:t,options:r,selectedOption:o,handleOptionChange:i,handleButtonClick:l,isCreateLoading:s,isSelected:d,renderRewardText:c,currentStreak:h,properties:m,popoverText:p,viewMode:x,entryType:k}=e;return(0,n.jsx)(M.Q,{width:"100%",backgroundColor:"background",height:"100%",children:(0,n.jsxs)(f.b,{fulfilled:!t,properties:{...m,entryType:k},children:[(0,n.jsx)(b.a,{name:"Subs Streak Goal Setting",skip:"modal"===x}),(0,n.jsx)(j.I,{name:"Subs Streak Goal Setting Impressed",skip:"page"===x,children:(0,n.jsxs)(u.T,{width:"100%",height:"100%",alignVertical:"space-between",flex:1,children:[(0,n.jsxs)(u.T,{flex:1,height:"100%",children:[(0,n.jsxs)(u.T,{pt:60,pb:40,children:[(0,n.jsx)(w.h,{level:3,textAlign:"center",children:(0,n.jsx)(a.V,{id:"RewardStreak.SetStreakGoal",defaultMessage:"ì°ì ìê° ëª©í를 ì¸ìë³¼ê¹ì?"})}),(0,n.jsx)(u.T,{mt:110,gap:30,children:(0,n.jsx)(g,{currentStreak:h,current:o,options:r,popoverText:p})})]}),(0,n.jsx)(u.T,{px:20,children:(0,n.jsx)(S,{options:r,currentOption:o,onSelect:i,renderRewardText:c,eventName:"Subs Streak Goal Option",properties:e=>({streakGoalOption:e.targetGoal})})})]}),(0,n.jsx)(u.T,{px:20,pt:20,children:(0,n.jsx)(j.I,{name:"Subs Streak Goal Done Button Impressed",children:(0,n.jsx)(C.W,{name:"Subs Streak Goal Done Button Clicked",children:(0,n.jsx)(y.W,{"data-class101-target-id":"326672b0d584",loading:s,disabled:!d,size:"xl",full:!0,kind:"primary",onClick:l,children:(0,n.jsx)(a.V,{id:"RewardStreak.Decided",defaultMessage:"ê²°ì¬íì´ì"})})})})})]})})]})})})}}]); 2//# sourceMappingURL=26831-536b6d4ccac65dda.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.