1(this["webpackJsonppubl-uw"]=this["webpackJsonppubl-uw"]||[]).push([[30],{2840:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Nt}));var i=n(4),c=n.n(i),o=n(9),r=n(16),a=n(47),s=n(142),l=n(19),d=n(147),u=n(36),p=n(37),b=n(606),j=n(150),m=n(13),h=n(403),f=n(592),O=n(14),g=n(2759);function x(e){var t=e.queryName,n=Object(g.a)(t,0),c=Object(O.a)(n,2),o=c[0],r=c[1],a=Object(i.useState)(null),s=Object(O.a)(a,2),l=s[0],d=s[1],u=Object(i.useRef)(null);return Object(i.useEffect)((function(){setTimeout((function(){o&&u.current&&(u.current.scrollTo(0,o),r(0))}),0)}),[o]),Object(i.useEffect)((function(){null!==l&&u.current&&u.current.scrollTo(0,l.scrollY)}),[l]),{layoutRef:u,storeCurrentScrollPosition:function(){u.current&&r(u.current.scrollTop)},moveScrollTo:function(e){d({scrollY:e})},resetScrollPosition:function(e){r(e||0)}}}var _=n(2771),v=n(2772),C=n(7),T=n(2),y=n(182),S=n(399),I=n(15),w=n(115),k=n(35),E=n(192),B=n(89),N=n(117),A=n(2774),D=n(2766),L=n(5),R=n(0);var M=L.default.div.withConfig({displayName:"S_Flex",componentId:"sc-143m5c9-0"})(["display:flex;"]),P=L.default.div.withConfig({displayName:"S_ChipBox",componentId:"sc-143m5c9-1"})(["align-items:center;display:flex;flex-wrap:wrap;row-gap:",";"],(function(e){return e.theme.spacing.spacingC})),U=L.default.div.withConfig({displayName:"S_ChipWrapper",componentId:"sc-143m5c9-2"})(["padding-right:",";&:last-child{padding-right:0;}"],(function(e){return e.theme.spacing.spacingB})),F=function(e){var t=e.type,n=void 0===t?"BASIC":t,i=e.labels;return"CHIP"===n?Object(R.jsx)(M,{children:Object(R.jsx)(P,{children:i.map((function(e,t){return Object(R.jsx)(U,{children:Object(R.jsx)(T.D_Chip,{text:e.title,onClickChip:e.onClick})},"".concat(e.title,"-").concat(t))}))})}):Object(R.jsx)(T.D_UserDesktopSideTab,{itemArray:i||[],spacingMode:"none"})},z=n(2765),V=n(2767),G=n(408),H=n(412),W=Object(L.css)(["position:relative;&::before{border-color:",";border-radius:50%;border-style:solid;border-width:2px;box-sizing:border-box;content:'';display:block;height:96px;position:absolute;width:96px;}"],(function(e){return e.theme.ui_profile_image_border_brandprimary})),q=L.default.div.withConfig({displayName:"S_ThumbnailBorder",componentId:"sc-nlglwy-0"})(["",""],(function(e){return e.isActive&&W})),K=L.default.div.withConfig({displayName:"S_ContentOperator",componentId:"sc-nlglwy-1"})(["align-items:center;background-color:",";border-radius:24px;cursor:pointer;display:flex;flex-direction:column;max-width:320px;min-width:270px;&:not(:first-child){margin-left:",";}"],(function(e){return e.theme.ui_cpnt_sheet_base}),(function(e){return e.theme.spacing.spacingE})),Y=L.default.div.withConfig({displayName:"S_OverlayText",componentId:"sc-nlglwy-2"})(["padding:0 12px;"]),X=function(e){var t=e.creator,n=e.isActive,i=e.handleClickOperator;return Object(R.jsx)(R.Fragment,{children:Object(R.jsxs)(K,{onClick:function(){i(t.id)},children:[Object(R.jsx)(T.Spacing,{size:"spacing_f"}),Object(R.jsx)(q,{isActive:n,children:Object(R.jsx)(T.ImageView,{src:t.imageSrc,shapeType:"circular",width:96,noImageWidth:96,ratio:"1_1",scaleType:"cover",borderMode:"use"})}),Object(R.jsx)(T.Spacing,{size:"spacing_b"}),Object(R.jsx)(Y,{children:Object(R.jsx)(T.D_TextLabel,{text:t.nickname,styleTheme:"subTitleBold",textAlign:"center",wordBreak:"break_all",lineLimit:1,ellipsisMode:"use"})}),Object(R.jsx)(T.Spacing,{size:"spacing_f"})]},t.id)})},J=Object(L.css)(["position:relative;"]),Z=L.default.div.withConfig({displayName:"S_ThumbnailBorder",componentId:"sc-9a4f9r-0"})(["",""],(function(e){return e.isActive&&J})),Q=L.default.div.withConfig({displayName:"S_ContentOperator",componentId:"sc-9a4f9r-1"})(["align-items:center;border-radius:24px;cursor:pointer;display:flex;flex-direction:column;height:172px;justify-content:center;max-width:100%;position:relative;&::after{background-color:",";border-radius:",";content:'';height:100%;left:0;position:absolute;top:0;width:100%;}"],(function(e){return e.theme.ui_dimmed_01}),(function(e){return e.theme.spacing.spacingD})),$=L.default.div.withConfig({displayName:"S_ImageWrapper",componentId:"sc-9a4f9r-2"})(["align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative;width:270px;"]),ee=L.default.div.withConfig({displayName:"S_OverlayText",componentId:"sc-9a4f9r-3"})(["bottom:0;color:#000000;padding:12px;position:absolute;text-align:center;width:100%;z-index:2;& > [x-pds-name='TextLabel']{font-size:18px;font-weight:",";}"],(function(e){return e.isActive?"bold":"normal"})),te=function(e){var t=e.creator,n=e.isActive,i=e.handleClickOperator;return Object(R.jsx)(R.Fragment,{children:Object(R.jsx)(Q,{onClick:function(){i(t.id)},children:Object(R.jsx)(Z,{isActive:n,children:Object(R.jsxs)($,{children:[Object(R.jsx)(T.ImageView,{src:t.imageSrc,shapeType:"round",radius:16,width:270,height:172,noImageWidth:270,noImageHeight:172,scaleType:"cover"}),Object(R.jsx)(ee,{isActive:n,children:Object(R.jsx)(T.D_TextLabel,{text:t.nickname,colorTheme:"sysTextWhite",textAlign:"center",wordBreak:"break_all",lineLimit:1,ellipsisMode:"use"})})]})})},t.id)})},ne=L.default.div.withConfig({displayName:"S_Wrapper",componentId:"sc-qrcjua-0"})(["position:relative;"]),ie=Object(L.css)(["justify-content:center;"]),ce=L.default.div.withConfig({displayName:"S_ContentOperatorPanel",componentId:"sc-qrcjua-1"})(["display:flex;max-width:1352px;min-width:1152px;overflow:scroll;"," @media screen and (max-width:1200px){width:1152px;}@media screen and (min-width:1200px) and (max-width:1400px){width:calc(100vw - 48px);}& >:not(.start):not(:nth-child(2)):not(:first-child):not(.end){margin-left:",";}"],(function(e){return e.centered&&ie}),(function(e){return e.theme.spacing.spacingE})),oe=L.default.div.withConfig({displayName:"S_Prev",componentId:"sc-qrcjua-2"})(["align-items:center;background:linear-gradient( to right,",","," );display:flex;height:100%;justify-content:flex-start;left:0;position:absolute;width:160px;z-index:10;"],(function(e){return e.theme.ui_cpnt_pg_gradient_01}),(function(e){return e.theme.ui_cpnt_pg_gradient_02})),re=L.default.div.withConfig({displayName:"S_Next",componentId:"sc-qrcjua-3"})(["align-items:center;background:linear-gradient( to right,",","," );display:flex;height:100%;justify-content:flex-end;position:absolute;right:0;width:160px;"],(function(e){return e.theme.ui_cpnt_pg_gradient_02}),(function(e){return e.theme.ui_cpnt_pg_gradient_01})),ae=function(e){var t=e.type,n=void 0===t?"BASIC":t,c=Object(r.k)(),a=Object(r.m)(),s=a.channelCode,l=a.pAppCode,d=Object(o.d)(H.c),u=Object(i.useRef)(),p=Object(i.useRef)(),b=Object(i.useRef)(),m=Object(G.a)({root:u.current,target:p.current,defaultStatus:!0}),h=Object(G.a)({root:u.current,target:b.current,defaultStatus:!1}),f=function(e){c.push("".concat(Object(j.a)(v.b,{channelCode:s,pAppCode:l}),"?profileId=").concat(e))},O=function(e){return c.location.search.includes("profileId=".concat(e))};return Object(R.jsx)(R.Fragment,{children:d&&d.length>0&&Object(R.jsx)(ne,{children:Object(R.jsxs)(ce,{ref:u,centered:d.length<=4,children:[d.length>4&&!m&&Object(R.jsx)(oe,{children:Object(R.jsx)(T.D_IconButton,{fillType:"line",shapeType:"circular",baseSize:"large",iconName:"ic_arrow_left",onClick:function(){!function(e){var t=u.current.scrollLeft;u.current.scroll({left:t-e,behavior:"smooth"})}(600)}})}),Object(R.jsx)("div",{ref:p,className:"start"}),d.map((function(e){return"RECTANGLE"===n?Object(R.jsx)(te,{creator:e,isActive:O(e.id),handleClickOperator:f},e.id):Object(R.jsx)(X,{creator:e,isActive:O(e.id),handleClickOperator:f},e.id)})),Object(R.jsx)("div",{ref:b,className:"end"}),d.length>4&&!h&&Object(R.jsx)(re,{children:Object(R.jsx)(T.D_IconButton,{fillType:"line",shapeType:"circular",baseSize:"large",iconName:"ic_arrow_right",onClick:function(){!function(e){var t=u.current.scrollLeft;u.current.scroll({left:t+e,behavior:"smooth"})}(600)}})})]})})})};var se=L.default.div.withConfig({displayName:"S_Hero",componentId:"sc-aeyw4m-0"})(["display:flex;justify-content:center;position:relative;width:100%;",""],(function(e){return e.hasText&&Object(L.css)(["&::before{background-color:",";content:'';display:block;height:100%;position:absolute;top:0;width:100%;}"],(function(e){var t=e.theme;return"".concat(t.ui_dimmed_01)}))})),le=L.default.div.withConfig({displayName:"S_Text",componentId:"sc-aeyw4m-1"})(["bottom:0;max-width:1352px;min-width:1152px;padding-left:",";padding-right:",";position:absolute;width:100%;"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),de=function(e){var t=e.src,n=e.title,i=e.description;return Object(R.jsxs)(se,{hasText:!(!n&&!i),children:[Object(R.jsx)(T.ImageView,{src:Object(N.a)(t),shapeType:"rectangle",width:"responsive",height:480,noImageHeight:480,scaleType:"cover"}),Object(R.jsxs)(le,{children:[Object(R.jsx)(T.D_TextLabel,{text:n,styleTheme:"displayBold",colorOverride:"ui_hero_title_text"}),Object(R.jsx)(T.Spacing,{size:"spacing_b"}),Object(R.jsx)(T.D_TextLabel,{text:i,styleTheme:"subTitleRegular",colorOverride:"ui_hero_description_text"}),Object(R.jsx)(T.Spacing,{size:"spacing_h"})]})]})},ue=n(589),pe=n(590),be=n(2754);var je=function(e){var t=e.posts,n=e.isLoading,c=e.totalPostsCount,r=e.currentPage,a=e.fetchPostsByPage,s=e.deletePost,d=e.moveToPostDetail,u=e.moveToEditPost,p=e.storeCurrentScrollPosition,b=Object(y.a)("translation").t,j=Object(w.a)(),m=j.openDialog,h=j.closeDialog,f=Object(i.useRef)(null);return{lastPostRef:function(e){var t=e.isLoading,n=e.posts,c=e.totalPostsCount,r=e.initialPage,a=e.fetchNextPage,s=Object(i.useMemo)(l.n,[]),d=Object(o.d)(s),u=Object(i.useRef)(r),p=Object(i.useRef)(),b=Object(be.a)(n.length);Object(i.useEffect)((function(){b!==n.length&&0===n.length&&d&&a(1,d.id)}),[n]);var j=Object(i.useCallback)((function(e){t||0===n.length||0===c||(p.current&&p.current.disconnect(),p.current=ne
1w IntersectionObserver((function(e){n.length>=c||e[0].isIntersecting&&(u.current+=1,d&&a(u.current,d.id))})),e&&p.current.observe(e))}),[t,c,n]);return Object(i.useEffect)((function(){u.current=r}),[r]),Object(i.useEffect)((function(){return function(){u.current=1}}),[]),{lastCommentRef:j}}({isLoading:n,posts:t,initialPage:r,totalPostsCount:c,fetchNextPage:a}).lastCommentRef,handleClickMenuButton:function(e){var t=e.type,n=e.id;switch(t){case z.b.EDIT:u(n);break;case z.b.DELETE:f.current=n,m({contentText:b("str_delete_alert_dialog"),btnMode:"tbtn_amount2",tBtn1Text:b("str_confirm"),tBtn2Text:b("str_cancel"),onClickTBtn1:function(){f.current&&s(f.current),f.current=null,h()},onClickTBtn2:function(){f.current=null,h()}})}},handleClickPostContent:function(e){p(),d(e)}}},me=n(2755),he=n(235),fe=n(236);var Oe=function(){var e=Object(y.a)("translation").t,t=Object(o.c)(),n=Object(r.m)().pAppCode,i=Object(o.d)(l.d),c=Object(o.d)(_.b),a=Object(w.a)(),s=a.openDialog,d=a.closeDialog,u=Object(me.a)(),p=u.openReportContentModal;function b(e){var t=e.slice(-5);return"***".concat(t)}return{handleClickUGCMenuButton:function(o){var r,a=o.type,l=o.content,u=o.distinctId,j=o.id,m=o.nickname,h=u===(null===i||void 0===i||null===(r=i.channelProfile)||void 0===r?void 0:r.distinctId),f=null===c||void 0===c?void 0:c.some((function(e){return e.distinctId===u}));switch(a){case z.e.REPORT:if(h||f)return void s({contentText:e("str_6535"),btnMode:"tbtn_amount1",tBtn1Text:e("str_ok"),onClickTBtn1:d});!function(e){p(e,n)}(null!==l&&void 0!==l?l:"");break;case z.e.BLOCK:if(h||f)return void s({contentText:e("str_6537"),btnMode:"tbtn_amount1",tBtn1Text:e("str_ok"),onClickTBtn1:d});!function(n){s({contentText:e("str_6504"),btnMode:"tbtn_amount2",tBtn1Text:e("str_confirm"),tBtn2Text:e("str_cancel"),onClickTBtn1:function(){t(Object(he.a)({distinctId:n})),d()},onClickTBtn2:d})}(u);break;case z.e.UNBLOCK:!function(n,i){var c;s({contentText:e("str_6507",{code:b(n),nick:(c=i||"",c.charAt(0)+"*".repeat(c.length-1))}),btnMode:"tbtn_amount2",tBtn1Text:e("str_confirm"),tBtn2Text:e("str_cancel"),onClickTBtn1:function(){t(Object(he.d)({distinctId:n})),d()},onClickTBtn2:d})}(u,m);break;case z.e.HIDE:if(h||f)return void s({contentText:e("str_6536"),btnMode:"tbtn_amount1",tBtn1Text:e("str_ok"),onClickTBtn1:d});!function(n){s({contentText:e("str_6498"),btnMode:"tbtn_amount2",tBtn1Text:e("str_confirm"),tBtn2Text:e("str_cancel"),onClickTBtn1:function(){t(Object(fe.c)({type:"POST",id:n})),d()},onClickTBtn2:d})}(j);break;case z.e.UNHIDE:!function(n){s({contentText:e("str_6499"),btnMode:"tbtn_amount2",tBtn1Text:e("str_confirm"),tBtn2Text:e("str_cancel"),onClickTBtn1:function(){t(Object(fe.d)({type:"POST",id:n})),d()},onClickTBtn2:d})}(j)}},ReportContent:u.ReportContent}};var ge=L.default.div.withConfig({displayName:"S_PostCardWrapper",componentId:"sc-z30li2-0"})(["margin-bottom:",";:last-child{margin-bottom:",";}"],(function(e){return e.theme.spacing.spacingF}),(function(e){return e.theme.spacing.spacingI})),xe=function(e){var t,n=e.title,i=e.posts,c=e.pagination,a=e.queryParams,d=e.reactionDisplayType,u=e.isReactionNumberShow,p=e.storeCurrentScrollPosition,b=e.sellerContentType,m=void 0===b?"BASIC":b,h=e.userContentType,f=void 0===h?"BASIC":h,O=e.fetchPostsByPage,g=Object(y.a)("translation").t,x=Object(o.c)(),C=Object(r.k)(),S=Object(r.m)(),I=S.channelCode,w=S.pAppCode,k=Object(o.d)(l.c),E=null===k||void 0===k?void 0:k.id,N=Object(o.d)(_.g),A=Object(o.d)(B.b),L=null===(t=Object(o.d)(l.d))||void 0===t?void 0:t.channelProfile,M=Object(o.d)(_.b),P=Object(o.d)(ue.b),U=Object(o.d)(pe.e),F=je({posts:i,isLoading:N,totalPostsCount:c.total,currentPage:c.page,fetchPostsByPage:O,deletePost:function(e){if(!E)return;k&&x(Object(s.i)({postId:e,channelId:E,pAppCode:w}))},moveToPostDetail:function(e){C.push(Object(j.a)(v.a,{channelCode:I,pAppCode:w,postId:e}),a)},moveToEditPost:function(e){x(Object(s.w)({isOpen:!0,postId:e}))},storeCurrentScrollPosition:p}),z=F.lastPostRef,V=F.handleClickMenuButton,G=F.handleClickPostContent,H=Oe(),W=H.handleClickUGCMenuButton,q=H.ReportContent;return null!==i&&void 0!==i&&i.length?Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.D_TextLabel,{text:n,styleTheme:"displayBold"}),Object(R.jsx)(T.Spacing,{size:"spacing_e"}),null===i||void 0===i?void 0:i.map((function(e,t){var n=e.profileId===A.id,c=(null===L||void 0===L?void 0:L.id)===(null===e||void 0===e?void 0:e.profileId),o=null===M||void 0===M?void 0:M.some((function(t){return t.id===e.profileId}));return Object(R.jsx)(ge,{ref:i.length-1===t?z:null,children:Object(R.jsx)(D.f,{post:e,hasComment:!0,isPreview:!0,isPostsViewStyle:!0,reactionDisplayType:d,isReactionNumberShow:u,isMyPost:n,isBlockedUser:!!P&&Boolean(P[e.profileDistinctId]),isHiddenPost:!!U&&Boolean(U[e.id]),contentType:c||o?m:f,onClickContent:G,onClickMyContentPopUp:V,onClickUgcContentPopUp:W})},e.id)})),q]}):Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.D_TextLabel,{text:n,styleTheme:"displayBold"}),Object(R.jsx)(T.Spacing,{size:"spacing_j"}),Object(R.jsx)(T.D_TextLabel,{text:g("str_374"),colorTheme:"sysTextTertiary",styleTheme:"body2Regular",textAlign:"center"})]})},_e={dataObjectType:"CUSTOM_DATA",dataObjectResourceName:"CustomSEOResource",customSEOResourceSchema:{title:"{{menuName}}",description:"{{channelName}}\uc758 \ud3ec\uc2a4\ud2b8\ub97c \ub458\ub7ec\ubcf4\uc138\uc694."},keyMappingDefinition:{title:"title",description:"description"}};var ve=L.default.div.withConfig({displayName:"S_Banner",componentId:"sc-gqdte3-0"})(["",""],(function(e){return e.hasLink&&"cursor:pointer"})),Ce=function(){var e=Object(y.a)("translation").t,t=Object(r.k)(),n=t.location,c=n.pathname,a=n.search,d=Object(r.m)(),u=d.channelCode,p=d.pAppCode,b=Object(E.a)(),m=b.get("platformTiers"),h=b.get("profileId"),f=b.get("labelId"),O={sortBy:"published_at"};m&&(O.platformTiers=m),h&&(O.profileId=h),f&&(O.labelId=f);var g=Object(o.c)(),L=Object(o.d)(l.c),M=null===L||void 0===L?void 0:L.id,P=Object(o.d)(B.b),U=P.id.toString(),G=Object(o.d)(_.c),H=Object(o.d)(_.m),W=Object(o.d)(_.l),q=Object(o.d)(_.e),K=Object(o.d)(_.i),Y=Object(o.d)(_.b),X=Object(V.a)(),J=X.isContentOperatorTabShow,Z=X.sellerTabName,Q=X.subscriberTabName,$=X.postWritingType,ee=X.isTabSeparated,te=X.resources,ne=X.contentLayoutTemplateName,ie=X.labelTemplateName,ce=X.operatorTemplateName,oe=X.isReactionNumberShow,re=X.reactionType,se=X.sellerPostTemplateName,le=X.userPostTemplateName,ue=Object(w.e)().userEntrywayForUse,pe=x({queryName:"scroll"}),be=pe.layoutRef,je=pe.storeCurrentScrollPosition,me=pe.moveScrollTo,he=Object(i.useRef)(null),fe=Object(i.useMemo)((function(){var t="";switch(m||h||f||(t=e("str_2246")),m){case z.c.SELLER:t=Z||e("str_seller");break;case z.c.SUBSCRIBER:t=Q||e("str_subscriber")}if(h){var n=null===Y||void 0===Y?void 0:Y.find((function(e){return e.id.toString()===h}));n&&(t=n.nickname),h===U&&(t=e("str_1572"))}if(f){var i=null===K||void 0===K?void 0:K.find((function(e){return e.id.toString()===f}));t=i?"#".concat(i.name):"#"}return t}),[m,h,Y,f,K]),Oe=Object(i.useMemo)((function(){var n=Object(A.a)(location.pathname,{platformTiers:m,profileId:h,labelId:f}),i=function(e,t){return e===t};
1function c(e){i(e,n)||t.push(e)}var o=[],r={title:e("str_2246"),isActive:i(Object(j.a)(v.b,{channelCode:u,pAppCode:p}),n),onClick:function(){return c(Object(j.a)(v.b,{channelCode:u,pAppCode:p}))}};if(o.push(r),"SELLER_ONLY"===$)return o;if(ee){var a=Object(A.a)(Object(j.a)(v.b,{channelCode:u,pAppCode:p}),{platformTiers:z.c.SELLER}),s=Object(A.a)(Object(j.a)(v.b,{channelCode:u,pAppCode:p}),{platformTiers:z.c.SUBSCRIBER}),l={title:Z||e("str_seller"),isActive:i(a,n),onClick:function(){return c(a)}},d={title:Q||e("str_subscriber"),isActive:i(s,n),onClick:function(){return c(s)}};o.push(l,d)}var b=Object(A.a)(Object(j.a)(v.b,{channelCode:u,pAppCode:p}),{profileId:P.id}),O={title:e("str_1572"),isActive:i(b,n),onClick:ue((function(){return c(b)}))};return o.push(O),o}),[P,t.location]),ge=L?{title:e("str_seo_a00001_posts_title",{menuName:L.pAppCodeMenuItemNameSet[p],interpolation:{escapeValue:!1}}),description:e("str_seo_a00001_posts_desc",{channelName:L.title,interpolation:{escapeValue:!1}})}:null;Object(k.b)("".concat(p,"Posts"),"".concat(p.toLowerCase(),"_posts")),Object(S.c)({manifest:_e,isActivated:!0,data:ge,options:{useChannelTitlePrefix:!0}}),Object(i.useLayoutEffect)((function(){if(u&&!(m||h||f));}),[m,h,f]),Object(i.useLayoutEffect)((function(){M&&c===Object(j.a)(v.b,{channelCode:u,pAppCode:p})&&(H&&"PostDetail"===t.location.state||(g(Object(s.p)(Object(C.a)({pAppCode:p,channelId:M,limit:I.a,page:1},O))),be.current&&he.current&&be.current.scrollTop>he.current.offsetTop-210&&me(he.current.offsetTop-210)))}),[c,m,h,f]),Object(i.useEffect)((function(){M&&q&&(g(Object(s.c)()),g(Object(s.p)(Object(C.a)({pAppCode:p,channelId:M,limit:I.a,page:1},O))))}),[q]);
1var Ce=function(e){e&&function(e){var t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}(e)&&window.open(e,"","noopener")};return Object(R.jsx)(T.WTContainersBox,{layoutType:"WTS_1",container1Ref:be,content1:Object(R.jsx)(R.Fragment,{children:(null===te||void 0===te?void 0:te.hero.use)&&Object(R.jsx)(de,{src:null===te||void 0===te?void 0:te.hero.src,title:null===te||void 0===te?void 0:te.hero.title,description:null===te||void 0===te?void 0:te.hero.description})}),content2:Object(R.jsxs)(R.Fragment,{children:[Object(R.jsxs)(D.a,{type:ne,OperatorPanel:J&&Object(R.jsx)(ae,{type:ce}),Tabbar:null!==ne&&void 0!==ne&&ne.includes("TAB")?Object(R.jsx)(T.D_UserDesktopTabBar,{itemArray:Oe,styleTheme:"content2"}):Object(R.jsx)(T.D_UserDesktopSideTab,{itemArray:Oe,spacingMode:"none"}),Labels:Object(R.jsx)(F,{type:ie,labels:function(e){var n=Object(A.a)(location.pathname,{platformTiers:m,profileId:h,labelId:f});return e.map((function(e){var i=Object(A.a)(Object(j.a)(v.b,{channelCode:u,pAppCode:p}),{labelId:e.id}),c=i===n;return{title:"#".concat(e.name),isActive:i===n,onClick:c?void 0:function(){return t.push(i)}}}))}(K)}),CreatePostButton:"seller_user"===function(e){switch(e){case"SELLER_USER":return"seller_user";case"SELLER_ONLY":return"seller_only";default:return"seller_user"}}($)&&Object(R.jsx)(T.D_MainButton,{text:e("str_401"),iconMode:"left",iconFillType:"fill",iconName:"ic_edit",onClick:ue((function(){g(Object(s.v)({isOpen:!0}))}))}),Banner1:Object(R.jsx)(R.Fragment,{children:(null===te||void 0===te?void 0:te.banner1.use)&&Object(R.jsx)(ve,{hasLink:!!te.banner1.linkSrc,onClick:function(){Ce(te.banner1.linkSrc)},children:Object(R.jsx)(T.ImageView,{src:Object(N.a)(te.banner1.src),shapeType:"rectangle",width:"responsive",ratio:"auto",noImageHeight:240,scaleType:"cover"})})}),Banner2:(null===te||void 0===te?void 0:te.banner2.use)&&Object(R.jsx)(ve,{hasLink:!!te.banner2.linkSrc,onClick:function(){Ce(te.banner2.linkSrc)},children:Object(R.jsx)(T.ImageView,{src:Object(N.a)(te.banner2.src),shapeType:"rectangle",width:"responsive",ratio:"auto",noImageHeight:360,scaleType:"cover"})}),children:[Object(R.jsx)("div",{ref:he}),H&&Object(R.jsx)(xe,{title:fe,posts:H,pagination:W,queryParams:a,sellerContentType:se,userContentType:le,reactionDisplayType:function(e){switch(e){case"REPEATABLE_REACTION":return"repeatable_reaction";case"SINGLE_RECOMMENDATION":return"single_recommendation";case"NONE":return"none";default:return"repeatable_reaction"}}(re),isReactionNumberShow:oe,storeCurrentScrollPosition:je,fetchPostsByPage:function(e){M&&g(Object(s.p)(Object(C.a)({pAppCode:p,channelId:M,limit:I.a,page:e},O)))}})]}),G&&Object(R.jsx)(D.c,{error:G})]})})},Te=n(2758),ye=n(130),Se=n(10),Ie=n(405),we=n(597),ke=n(87),Ee=n(45),Be=c.a.forwardRef((function(e,t){var n=e.displayType,c=void 0===n?"none":n,o=e.contentDisplayType,a=void 0===o?"normal":o,s=e.tBtn1Text,l=e.content,d=e.avatarUrl,u=e.avatarBorderColorTheme,b=e.nickname,j=e.nicknameBadgeMode,m=void 0===j?"none":j,h=e.createdAt,f=e.likeCount,g=e.isLiked,x=e.isReactionNumber,_=e.mediaSrc,v=e.useCommentUpvote,C=e.distinctId,S=e.contextMenuItemArray,k=e.pinned,E=e.onClickTBtn1,B=e.onClickLikeButton,N=e.onClickContextMenuItem,A=Object(y.a)("translation").t,D=Object(i.useState)(!1),L=Object(O.a)(D,2),M=L[0],P=L[1],U=Object(i.useRef)(null),F=Object(w.e)().userEntrywayForUse,z=Object(r.l)(),V=Object(i.useRef)(null),G=Object(p.N)(),H=Object(i.useState)(!1),W=Object(O.a)(H,2),q=W[0],K=W[1];function Y(e){e.stopPropagation(),K(!q)}Object(i.useEffect)((function(){K(!1)}),[G,z.pathname]),Object(i.useEffect)((function(){function e(){K(!1)}return q&&window.addEventListener("wheel",e),function(){window.removeEventListener("wheel",e)}}),[q]);var X=function(e){N&&N(e),K(!1)},J=Object(R.jsx)(p.D,{targetRef:V,placement:"bottom-end",isOpen:q,onClickOutside:function(){K(!1)},onClick:Y,children:Object(R.jsx)(T.D_ContextMenu,{children:null===S||void 0===S?void 0:S.map((function(e){return Object(R.jsx)(T.D_ContextMenuItem,{option:e,onClick:X},e.value)}))})});return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsxs)(p.E,{children:[Object(R.jsxs)(Ne,{ref:t,children:[Object(R.jsx)(Le,{avatarBorderColorTheme:u,children:Object(R.jsx)(T.ImageView,{src:"block"===a?I.A:d,shapeType:"circular",width:40,height:40,borderMode:"use",scaleType:"cover"})}),Object(R.jsx)(T.Spacing,{size:"spacing_c",spacingType:"width"}),Object(R.jsxs)(Ae,{children:[Object(R.jsxs)(Re,{children:[Object(R.jsxs)("div",{children:[k&&Object(R.jsxs)(Ge,{children:[Object(R.jsx)(T.Icon,{iconName:"ic_pin",size:12,colorKey:"ui_cpnt_icon_sys_grey_02"}),Object(R.jsx)(T.Spacing,{size:"spacing_a",spacingType:"width"}),Object(R.jsx)(T.D_TextLabel,{text:A("str_pinned_comment"),styleTheme:"caption2Regular",colorTheme:"sysTextSecondary"})]}),Object(R.jsxs)(Me,{children:[Object(R.jsx)(T.D_TextLabel,{text:"block"===a&&C?"*".repeat(3)+C.split("-")[1]:b,styleTheme:"caption1Regular",colorTheme:"block"===a?"sysTextSecondary":"sysTextPrimary"}),"use"===m&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_a",spacingType:"width"}),Object(R.jsx)(T.Icon,{size:16,colorKey:"ui_cpnt_icon_usr_brandprimary",fillType:"fill",iconName:"ic_verified"})]}),Object(R.jsx)(T.Spacing,{size:"spacing_a",spacingType:"width"}),Object(R.jsx)(T.D_TextLabel,{text:"\xb7 ".concat(Ee.a.tz(h).fromNow()),styleTheme:"caption1Regular",colorTheme:"sysTextTertiary"})]})]}),"tBtn1"===c&&Object(R.jsx)(R.Fragment,{children:Object(R.jsxs)(Ue,{onClick:E,children:[Object(R.jsx)(T.Spacing,{size:"spacing_d",spacingType:"width"}),Object(R.jsx)(T.D_TextLabel,{text:s,styleTheme:"caption1Regular",colorTheme:"sysTextSecondary"})]})}),"moreBtn"===c&&Object(R.jsx)("div",{ref:V,children:Object(R.jsx)(T.D_IconButton,{baseSize:"medium",baseColorKey:"ui_cpnt_button_fill_base_transparent",iconFillType:"fill",iconName:"ic_more",iconColorKey:"ui_cpnt_icon_sys_grey_02",onClick:Y})})]}),Object(R.jsx)(T.Spacing,{size:"spacing_b"}),Object(R.jsxs)(T.D_ContentSheet,{width:"100%",height:"auto",paddingLeft:"spacing_c",paddingRight:"spacing_c",paddingTop:"spacing_b",paddingBottom:"spacing_b",shapeType:"round",radius:8,backgroundColorTheme:"base2",overrideCSS:"normal"===a?void 0:{paddingTop:"9px",paddingBottom:"9px"},children:[Object(R.jsx)(T.D_TextLabel,{text:"block"===a?A("str_6516"):"hidden"===a?A("str_6513"):l,styleTheme:"normal"===a?"body2Regular":"caption1Regular",colorTheme:"normal"===a?"sysTextPrimary":"sysTextTertiary",wordBreak:"break_all",textAlign:"normal"===a?"left":"center"}
1),"normal"===a&&_&&Object(R.jsx)(Pe,{onClick:function(){return P(!0)},children:Object(R.jsx)(T.ImageView,{src:_,width:240,height:"responsive",radius:8,borderMode:"use"})})]}),v&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_b"}),Object(R.jsx)(T.D_ReactionButton,{displayType:x?"icon_text":"icon_only",text:f,iconName:"ic_thumb_up",status:g?"select":"default",onClick:F(B)})]})]})]}),J]}),Object(R.jsx)(T.Spacing,{size:"spacing_e"}),M&&_&&Object(R.jsx)(R.Fragment,{children:Object(ke.createPortal)(Object(R.jsxs)(Fe,{onClick:function(){P(!1)},children:[Object(R.jsx)(ze,{}),Object(R.jsx)(Ve,{ref:U,children:Object(R.jsx)(T.ImageView,{src:_,shapeType:"rectangle"})})]}),document.getElementById("root"))})]})})),Ne=L.default.div.withConfig({displayName:"S_Comment",componentId:"sc-1s05tug-0"})(["display:flex;text-align:left;"]),Ae=L.default.div.withConfig({displayName:"S_CommentColumn",componentId:"sc-1s05tug-1"})(["height:100%;position:relative;width:100%;"]),De=Object(L.css)(["position:relative;&::before{border-color:",";border-radius:50%;border-style:solid;border-width:2px;box-sizing:border-box;content:'';display:block;height:40px;position:absolute;width:40px;}"],(function(e){return e.theme.ui_profile_image_border_brandprimary})),Le=L.default.div.withConfig({displayName:"S_ThumbnailBorder",componentId:"sc-1s05tug-2"})(["",""],(function(e){return"primary"===e.avatarBorderColorTheme?De:""})),Re=L.default.div.withConfig({displayName:"S_InfoContents",componentId:"sc-1s05tug-3"})(["align-items:center;display:flex;height:100%;justify-content:space-between;position:relative;"]),Me=L.default.span.withConfig({displayName:"S_InfoBox",componentId:"sc-1s05tug-4"})(["align-items:center;display:flex;height:100%;position:relative;"]),Pe=L.default.div.withConfig({displayName:"S_ImageBox",componentId:"sc-1s05tug-5"})(["cursor:pointer;margin-bottom:",";margin-top:",";"],(function(e){return e.theme.spacing.spacingA}),(function(e){return e.theme.spacing.spacingC})),Ue=L.default.div.withConfig({displayName:"S_ButtonWrapper",componentId:"sc-1s05tug-6"})(["cursor:pointer;display:flex;text-align:right;"]),Fe=L.default.div.withConfig({displayName:"S_FullScreenImagePortalWrapper",componentId:"sc-1s05tug-7"})(["align-items:center;display:flex;height:100vh;justify-content:center;left:0;position:absolute;top:0;width:100vw;"]),ze=L.default.div.withConfig({displayName:"S_Dimmed",componentId:"sc-1s05tug-8"})(["background-color:",";height:100vh;overflow:hidden;position:absolute;width:100vw;z-index:300;"],(function(e){return e.theme.ui_contents_dimmed})),Ve=L.default.div.withConfig({displayName:"S_FullScreenImageBox",componentId:"sc-1s05tug-9"})(["box-sizing:border-box;max-height:100vh;position:absolute;z-index:301;& > div{img{box-sizing:border-box;max-height:100vh;max-width:100vw;padding:",";}}"],(function(e){return e.theme.spacing.spacingE})),Ge=L.default.div.withConfig({displayName:"S_PinnedInfo",componentId:"sc-1s05tug-10"})(["align-items:center;display:flex;"]);Be.displayName="CommentListItem";var He=Be;var We=function(e){var t=e.isReactionShow,n=e.isReactionNumberShow,c=e.authorId,a=e.lastCommentRef,d=e.comments,u=e.isLoading,b=void 0!==u&&u,j=e.usePin,m=e.useTopBottomSpacing,h=e.CommentAlertDialog,f=e.openCommentAlertDialog,O=e.handleClickConfirmCommentAlertDialog,g=e.handleClickCancelCommentAlertDialog,x=Object(y.a)("translation").t,_=Object(o.c)(),v=Object(i.useMemo)(l.n,[]),C=Object(o.d)(v),S=Object(r.m)().pAppCode,w=Object(o.d)(l.d),k=Object(o.d)(we.a),E=Object(o.d)(ue.b),B=Object(o.d)(pe.c),N=Se.b.isGuest(),A=Object(me.a)(),D=A.ReportContent,L=A.openReportContentModal,M=Object(Ie.a)(),P=M.ModalDialog,U=M.setModalDialogMessage,F=M.setIsModalDialogOpen;return Object(R.jsxs)(R.Fragment,{children:[b&&0===(null===d||void 0===d?void 0:d.length)&&Object(R.jsx)(p.x,{}),d&&d.length>0?Object(R.jsx)(R.Fragment,{children:Object(R.jsx)(p.f,{useTopBottomSpacing:m,children:d.map((function(e,i){var o,r=null===w||void 0===w?void 0:w.channelProfile.imageSrc,l=null===w||void 0===w?void 0:w.channelProfile.nickname,u=null===k||void 0===k||null===(o=k.find((function(t){return t.distinctId===e.profileDistinctId})))||void 0===o?void 0:o.distinctId,p=e.profileId===c,b=(e.profileDistinctId,null===w||void 0===w||w.channelProfile.distinctId,e.profileDistinctId===(null===w||void 0===w?void 0:w.channelProfile.distinctId)),m=e.profileDistinctId===u,h=b||m,O=e.profileDistinctId&&Boolean(E[e.profileDistinctId]),g=Boolean(B[e.id]);return Object(R.jsx)(He,{displayType:"moreBtn",contentDisplayType:O?"block":g?"hidden":"normal",content:e.content,avatarUrl:b&&r?r:e.authorThumbnailSrc,avatarBorderColorTheme:h?"primary":"none",distinctId:e.profileDistinctId,nickname:b&&l?l:e.author,nicknameBadgeMode:h?"use":"none",likeCount:e.totalCommentLikes,isLiked:e.hasUserLiked,isReactionNumber:n,onClickLikeButton:function(){var t=null===C||void 0===C?void 0:C.id;t&&_(Object(s.s)({pAppCode:S,channelId:t,commentId:e.id,isLiked:!e.hasUserLiked}))},createdAt:e.insertedAt,mediaSrc:e.mediaSrc,contextMenuItemArray:N?I.n:p?I.p:O?I.o:g?I.m:I.q,onClickContextMenuItem:function(t){var n;return function(e,t,n,i,c){switch(e.value){case"REPORT":if(h){U(x("str_6535")),F(!0);break}L(n,S);break;case"DELETE":f(t,e.value,i,c);break;case"HIDE_COMMENT":if(h){U(x("str_6536")),F(!0);break}f(t,e.value,i,c);break;case"UNHIDE_COMMENT":f(t,e.value,i,c);break;case"BLOCK_USER":if(h){U(x("str_6537")),F(!0);break}f(t,e.value,i,c);break;case"UNBLOCK_USER":f(t,e.value,i,c)}}
1(t,e.id,e.content,e.author,null!==(n=e.profileDistinctId)&&void 0!==n?n:"")},useCommentUpvote:t,ref:i===d.length-1?a:null,pinned:j&&e.pinned},e.id)}))})}):Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_g"}),Object(R.jsx)(T.D_TextLabel,{text:x("str_2172"),styleTheme:"body2Regular",colorTheme:"sysTextTertiary",textAlign:"center"}),Object(R.jsx)(T.Spacing,{size:"spacing_i"})]}),Object(R.jsx)(h,{onClickConfirm:O,onClickCancel:g}),Object(R.jsx)(P,{}),D]})},qe=n(498),Ke=n.n(qe),Ye=n(29),Xe=n(602);var Je=L.default.div.withConfig({displayName:"S_CommentInputWrapper",componentId:"sc-poi459-0"})(["box-sizing:border-box;padding:0 ",";width:100%;& > form{height:auto;}"],(function(e){return e.theme.spacing.spacingE})),Ze=L.default.div.withConfig({displayName:"S_TextFieldBox",componentId:"sc-poi459-1"})(["box-sizing:border-box;padding:",";"],(function(e){return e.theme.spacing.spacingD})),Qe=L.default.div.withConfig({displayName:"S_ImageWrapper",componentId:"sc-poi459-2"})(["display:flex;margin-bottom:",";margin-left:",";position:relative;width:56px;"],(function(e){return e.theme.spacing.spacingB}),(function(e){return e.theme.spacing.spacingD})),$e=L.default.div.withConfig({displayName:"S_IconButtonBox",componentId:"sc-poi459-3"})(["position:absolute;right:",";top:",";"],(function(e){return e.theme.spacing.spacingA}),(function(e){return e.theme.spacing.spacingA})),et=L.default.div.withConfig({displayName:"S_IconSheetWrapper",componentId:"sc-poi459-4"})(["box-sizing:border-box;display:flex;justify-content:",";padding:0 ",";width:100%;"],(function(e){return e.allowCommentImageUpdate?"space-between":"flex-end"}),(function(e){return e.theme.spacing.spacingA})),tt=function(e){var t=e.handleAddComment,n=e.handleAddCommentWithImage,c=e.isUserEntryway,o=e.userEntrywayOption,r=Object(y.a)("translation").t,a=Object(w.e)().userEntrywayForUse,s=Object(i.useState)(5),l=Object(O.a)(s,2),d=l[0],u=l[1],b=Object(i.useState)(null),j=Object(O.a)(b,2),m=j[0],h=j[1],f=Object(i.useState)(null),g=Object(O.a)(f,2),x=g[0],_=g[1],v=Object(i.useState)(!1),S=Object(O.a)(v,2),k=S[0],E=S[1],B=Object(Ye.useForm)({mode:"onChange"}),N=B.handleSubmit,A=B.reset,D=B.control,L=B.register,M=B.formState,P=M.isSubmitSuccessful,U=M.isValid,F=M.errors,z={minLength:1,maxLength:{value:I.t,message:r("str_comment_limit_validation",{maxCount:I.t})}},G=Object(Ye.useWatch)({name:"comment",control:D}),H=L("comment",z),W=H.onChange,q=H.onBlur,K=Object(V.a)().isImageUploadAllowed;Object(i.useEffect)((function(){P&&(A({comment:""}),h(null),_(null))}),[P]);var Y=function(e){if(G){if(m)return n({content:e.comment,selectedImage:m}),void u(1);t(e.comment),u(1)}};return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(Je,{children:Object(R.jsx)(Ye.FormProvider,Object(C.a)(Object(C.a)({},B),{},{children:Object(R.jsxs)(T.Form,{onSubmit:c?a(N(Y),o):N(Y),children:[Object(R.jsx)(p.H,{isError:Boolean(F.comment),radius:16,children:Object(R.jsxs)(T.D_ContentSheet,{width:"100%",height:"responsive",shapeType:"round",radius:16,paddingTop:"none",paddingBottom:"none",paddingLeft:"none",paddingRight:"none",children:[Object(R.jsxs)(Ze,{children:[Object(R.jsx)(Ke.a,{name:"comment",autoMinRows:1,autoMaxRows:d,textLineType:"auto",textSize:"form2",textWeight:"normal",hintText:r("str_73"),onBlur:function(e){q(e)},onChange:function(e){1===d&&u(5),W(e)},validation:z}),Object(R.jsx)(p.d,{error:F.comment})]}),x&&Object(R.jsxs)(Qe,{children:[Object(R.jsx)(T.ImageView,{src:x,width:56,ratio:"1_1",radius:8,scaleType:"cover",borderMode:"use",backgroundFillMode:"use"}),Object(R.jsx)($e,{children:Object(R.jsx)(T.D_IconButton,{iconName:"ic_xmark",iconColorKey:"ui_cpnt_button_icon_white",iconSize:16,shapeType:"circular",baseSize:"xsmall",baseColorKey:"ui_cpnt_button_fill_base_black_opacity50",onClick:function(){h(null),_(null)}})})]}),Object(R.jsxs)(et,{allowCommentImageUpdate:K,children:[K&&Object(R.jsx)(T.D_UploadIconButton,{iconName:"ic_photo",iconFillType:"fill",accept:"image/jpeg, image/jpg, image/png, image/gif",iconColorKey:"ui_cpnt_button_icon_enabled",baseSize:"large",baseColorKey:"ui_cpnt_button_fill_base_transparent",onClick:function(e){if(e.target.files){var t=e.target.files[0],n=URL.createObjectURL(t);Xe.a.getBytesToMb(t.size)>I.s.IMAGE_MAX_SIZE_BY_MB?E(!0):(h(t),_(n))}}}),Object(R.jsx)(T.D_IconButton,{type:"submit",iconName:"ic_paper_plane",iconFillType:"fill",iconColorKey:null!==G&&void 0!==G&&G.trim()&&U?"ui_cpnt_icon_usr_brandprimary":"ui_cpnt_button_icon_disabled",state:null!==G&&void 0!==G&&G.trim()&&U?"normal":"disabled",baseSize:"large",baseColorKey:"ui_cpnt_button_fill_base_transparent",onMouseDown:function(e){null===e||void 0===e||e.preventDefault()}})]})]})}),Object(R.jsx)(T.Spacing,{size:"spacing_d"})]})}))}),k&&Object(R.jsx)(T.D_DesktopAlertDialog,{contentText:r("str_892"),tBtn1Text:r("str_confirm"),onClickTBtn1:function(){return E(!1)}})]})},nt={dataObjectType:"CUSTOM_DATA",dataObjectResourceName:"CustomSEOResource",customSEOResourceSchema:{title:"{{postTitle}}",description:"{{postContents}}",thumbnailSrc:"{postImageSrcs}"},keyMappingDefinition:{title:"title",description:"description",thumbnailSrc:"thumbnailSrc"}};var it=L.default.div.withConfig({displayName:"S_Flex",componentId:"sc-1ivlpva-0"})(["display:flex;"]),ct=L.default.div.withConfig({displayName:"S_Banner",componentId:"sc-1ivlpva-1"})(["",""],(function(e){return e.hasLink&&"cursor:pointer"})),ot=L.default.div.withConfig({displayName:"S_ContentWrapper",componentId:"sc-1ivlpva-2"})(["padding:0 ",";"],(function(e){return e.theme.spacing.spacingE})),rt=function(){var e,t,n=Object(y.a)("translation").t,c=Object(o.c)(),a=Object(r.k)(),d=Object(E.a)(),u=Object(r.m)(),b=u.channelCode,j=u.postId,m=u.pAppCode,h=Object(o.d)(l.c),f=null===h||void 0===h?void 0:h.id,g=Object(o.d)(B.b),x=Object(V.a)(),C=x.sellerTabName,L=x.subscriberTabName,M=x.postWritingType,P=x.isTabSeparated,U=x.resources,G=x.contentLayoutTemplateName,H=x.labelTemplateName,W=x.isReactionNumberShow,q=x.reactionType,K=x.isCommentOrderDe
1sc,Y=x.isCommentReactionShow,X=Object(o.d)(_.k),J=Object(o.d)(_.c),Z=Object(o.d)(_.i),Q=Object(o.d)(_.a),$=Object(o.d)(_.j),ee=Object(o.d)(_.o),te=Object(o.d)(_.g),ne=Object(o.d)(ue.b),ie=Object(o.d)(pe.e),ce=Oe(),oe=ce.handleClickUGCMenuButton,re=ce.ReportContent,ae=Object(i.useState)(!1),se=Object(O.a)(ae,2),le=se[0],de=se[1],be=Object(w.e)().userEntrywayForUse,je=d.get("platformTiers"),me=d.get("profileId"),he=d.get("labelId"),fe=X&&X.content&&h?{title:n("str_seo_a00001_post_detail_title",{menuName:h.pAppCodeMenuItemNameSet[m],interpolation:{escapeValue:!1}}),description:n("str_seo_a00001_post_detail_desc",{postContents:Object(Se.j)(X.content,150)}),thumbnailSrc:null===(e=X.storyResource)||void 0===e||null===(t=e.imageSrcs)||void 0===t?void 0:t[0]}:null;Object(k.b)("".concat(m,"PostDetail"),"".concat(m.toLowerCase(),"_post_detail")),Object(S.c)({manifest:nt,isActivated:!0,data:fe,options:{useChannelTitlePrefix:!0}}),Object(i.useEffect)((function(){f&&j&&(c(Object(s.o)({postId:j,channelId:f,pAppCode:m})),c(Object(s.n)({pAppCode:m,postId:j,channelId:f,order:K?"DESC":"ASC"})))}),[c,j,f]),Object(i.useEffect)((function(){X&&c(Object(s.q)({pAppCode:m,channelId:f,resourceId:X.id}))}),[X,f]),Object(i.useEffect)((function(){return function(){c(Object(s.b)())}}),[]);var ge=function(e){e&&function(e){var t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}(e)&&window.open(e,"","noopener")},xe=Object(Te.a)({isLoading:te,comments:Q,totalCommentsCount:ee,handleDeleteComment:function(e){f&&c(Object(s.h)({postId:j,commentId:Number(e),channelId:f,pAppCode:m}))},handleCreateComment:function(e){f&&c(Object(s.d)({content:e,channelId:f,postId:j,pAppCode:m,isCommentOrderDesc:K}))},handleCreateCommentWithImage:function(e){var t=e.content,n=e.selectedImage;f&&c(Object(s.d)({content:t,channelId:f,postId:j,selectedImage:n,pAppCode:m,isCommentOrderDesc:K}))},fetchCommentsByPage:function(e){h&&c(Object(s.k)({limit:I.r,page:e,postId:j,channelId:h.id,order:K?"DESC":"ASC",pAppCode:m,pinned:!1}))},deps:[j]}),_e=xe.lastCommentRef,ve=xe.handleClickSubmitComment,Ce=xe.CommentAlertDialog,Ie=xe.openCommentAlertDialog,we=xe.handleClickConfirmCommentAlertDialog,ke=xe.handleClickCancelCommentAlertDialog,Ee=xe.handleClickSubmitCommentWithImage,Be=function(e){var t=Object(A.a)(location.pathname,{platformTiers:je,profileId:me,labelId:he});return e.map((function(e){var n=Object(A.a)(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}),{labelId:e.id}),i=n===t;return{title:"#".concat(e.name),isActive:n===t,onClick:i?void 0:function(){return a.push(n)}}}))},Ne=Object(i.useMemo)((function(){var e=Object(A.a)(location.pathname,{platformTiers:je,profileId:me,labelId:he}),t=function(e,t){return e===t};function i(n){t(n,e)||a.push(n)}var c=[],o={title:n("str_2246"),isActive:t(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}),e),onClick:function(){return i(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}))}};if(c.push(o),"SELLER_ONLY"===M)return c;if(P){var r=Object(A.a)(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}),{platformTiers:z.c.SELLER}),s=Object(A.a)(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}),{platformTiers:z.c.SUBSCRIBER}),l={title:C||n("str_seller"),isActive:t(r,e),onClick:function(){return i(r)}},d={title:L||n("str_subscriber"),isActive:t(s,e),onClick:function(){return i(s)}};c.push(l,d)}var u=Object(A.a)(Object(Se.l)(v.b,{channelCode:b,pAppCode:m}),{profileId:g.id}),p={title:n("str_1572"),isActive:t(u,e),onClick:be((function(){return i(u)}))};return c.push(p),c}),[g,a.location]),Ae=function(){c(Object(s.v)({isOpen:!0}))};if(!X&&te)return Object(R.jsx)(ye.a,{});var De=(null===X||void 0===X?void 0:X.profileDistinctId)===(null===g||void 0===g?void 0:g.distinctId);return Object(R.jsx)(T.WTContainersBox,{layoutType:"WTN_3",content1:Object(R.jsxs)(R.Fragment,{children:[Object(R.jsxs)(D.a,{type:G,Tabbar:null!==G&&void 0!==G&&G.includes("TAB")?Object(R.jsx)(T.D_UserDesktopTabBar,{itemArray:Ne,styleTheme:"content2"}):Object(R.jsx)(T.D_UserDesktopSideTab,{itemArray:Ne}),Labels:Object(R.jsx)(R.Fragment,{children:null!==G&&void 0!==G&&G.includes("TAB")?Object(R.jsx)(F,{type:H,labels:Be(Z)}):Object(R.jsxs)(it,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_e",spacingType:"width"}),Object(R.jsx)(F,{type:H,labels:Be(Z)})]})}),CreatePostButton:"seller_user"===function(e){switch(e){case"SELLER_USER":return"seller_user";case"SELLER_ONLY":return"seller_only";default:return"seller_user"}}(M)&&Object(R.jsx)(R.Fragment,{children:null!==G&&void 0!==G&&G.includes("TAB")?Object(R.jsx)(T.D_MainButton,{text:n("str_401"),iconMode:"left",iconFillType:"fill",iconName:"ic_edit",onClick:be(Ae)}
1):Object(R.jsxs)(it,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_e",spacingType:"width"}),Object(R.jsx)(T.D_MainButton,{text:n("str_401"),iconMode:"left",iconFillType:"fill",iconName:"ic_edit",onClick:be(Ae)})]})}),Banner1:Object(R.jsx)(R.Fragment,{children:(null===U||void 0===U?void 0:U.banner1.use)&&Object(R.jsx)(ct,{hasLink:!!U.banner1.linkSrc,onClick:function(){ge(U.banner1.linkSrc)},children:Object(R.jsx)(T.ImageView,{src:U.banner1.src,shapeType:"rectangle",width:"responsive",ratio:"auto",noImageHeight:240,scaleType:"cover"})})}),Banner2:(null===U||void 0===U?void 0:U.banner2.use)&&Object(R.jsx)(ct,{hasLink:!!U.banner2.linkSrc,onClick:function(){ge(U.banner2.linkSrc)},children:Object(R.jsx)(T.ImageView,{src:Object(N.a)(U.banner2.src),shapeType:"rectangle",width:"responsive",ratio:"auto",noImageHeight:360,scaleType:"cover"})}),children:[Object(R.jsx)(T.Spacing,{size:"spacing_e"}),Object(R.jsx)(p.i,{titleText:n("str_back"),onClickLeftBtn:function(){var e=a.location.state;a.push(Object(Se.l)(v.b,{channelCode:b,pAppCode:m})+e,"PostDetail")}}),Object(R.jsxs)(ot,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_f"}),X&&Object(R.jsx)(D.f,{post:X,isBlockedUser:!!ne&&Boolean(ne[X.profileDistinctId]),isHiddenPost:!!ie&&Boolean(ie[X.id]),isMyPost:De,reactionDisplayType:function(e){switch(e){case"REPEATABLE_REACTION":return"repeatable_reaction";case"SINGLE_RECOMMENDATION":return"single_recommendation";case"NONE":return"none";default:return"repeatable_reaction"}}(q),isReactionNumberShow:W,isFoldable:!1,contentType:"BASIC",onClickMyContentPopUp:function(e){var t=e.type,n=e.id;t!==z.b.EDIT?t===z.b.DELETE&&de(!0):c(Object(s.w)({isOpen:!0,postId:n}))},onClickUgcContentPopUp:oe,onPurchaseCallback:function(){return f&&c(Object(s.o)({postId:j,channelId:f,pAppCode:m}))}}),Object(R.jsx)(T.Spacing,{size:"spacing_f"}),Object(R.jsx)(T.Divider,{})]}),Object(R.jsx)(p.b,{count:ee}),Object(R.jsx)(tt,{handleAddComment:ve,handleAddCommentWithImage:Ee,isUserEntryway:!0}
1),Object(R.jsx)(T.Spacing,{size:"spacing_e"}),$&&$.length>0&&Object(R.jsx)(We,{usePin:!0,useTopBottomSpacing:!1,isReactionNumberShow:W,isReactionShow:Y,authorId:g.id,comments:$,lastCommentRef:_e,CommentAlertDialog:Ce,openCommentAlertDialog:Ie,handleClickConfirmCommentAlertDialog:we,handleClickCancelCommentAlertDialog:ke}),Object(R.jsx)(We,{useTopBottomSpacing:!1,isReactionNumberShow:W,isReactionShow:Y,authorId:g.id,comments:Q,lastCommentRef:_e,CommentAlertDialog:Ce,openCommentAlertDialog:Ie,handleClickConfirmCommentAlertDialog:we,handleClickCancelCommentAlertDialog:ke}),Object(R.jsx)(T.Spacing,{size:"spacing_g"}),le&&Object(R.jsx)(T.D_DesktopAlertDialog,{contentText:n("str_delete_alert_dialog"),btnMode:"tbtn_amount2",tBtn1Text:n("str_confirm"),tBtn2Text:n("str_cancel"),onClickTBtn1:function(){f&&(c(Object(s.i)({postId:j,channelId:f,pAppCode:m})),de(!1),a.goBack())},onClickTBtn2:function(){return de(!1)}}),re]}),J&&Object(R.jsx)(D.c,{error:J})]})})},at=n(3),st=n.n(at),lt=n(17),dt=n(34),ut=n(572),pt=n(574),bt=n(141),jt=n(287);function mt(e){var t=e.isLoading,n=e.type,i=e.files,c=e.youtubeSrc,o=e.uploadPreview,r=void 0!==o&&o,a=e.setIsVideoUploadError,s=e.setSelectedFiles,l=e.setSelectedOption,d=Object(y.a)("translation").t,u=function(e){if(n===I.wb.VIDEO||n===I.wb.YOUTUBE)return s([]),void l("");var t=i.filter((function(t){return t.id!==e}));t.length||l(""),s(t)};return t?Object(R.jsx)(p.x,{position:"relative",useBoxShadow:!1}):Object(R.jsxs)(ht,{children:[n===I.wb.IMAGE&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_e"}),i.map((function(e){return Object(R.jsx)(D.g,{src:e.previewSrc,id:e.id,handleDelete:u,hasCancelButton:!0},e.id)}))]}),n===I.wb.VIDEO&&i.length>0&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_e"}),null===i[0].previewSrc?Object(R.jsxs)("div",{style:{position:"relative"},children:[Object(R.jsx)(D.g,{src:"",id:i[0].id,hasCancelButton:!0,handleDelete:u,imageType:"rectangle"},i[0].id),Object(R.jsx)(ft,{children:d("str_1918")})]}):Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(D.h,{uploadCheck:r,src:URL.createObjectURL(i[0].file),hasDeleteButton:!0,onDelete:u,thumbnailSrc:i[0].previewSrc,onCheckVideoError:function(e){a(!e)}}),Object(R.jsx)(T.Spacing,{size:"spacing_e"})]})]}),n===I.wb.YOUTUBE&&c&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Spacing,{size:"spacing_e"}),Object(R.jsx)(D.d,{src:c,hasDeleteButton:!0,onDelete:u}),Object(R.jsx)(T.Spacing,{size:"spacing_e"})]})]})}var ht=L.default.div.withConfig({displayName:"S_ContentWrapper",componentId:"sc-1h2rv1e-0"})(["margin-left:",";margin-right:",";"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),ft=L.default.div.withConfig({displayName:"S_VideoErrorText",componentId:"sc-1h2rv1e-1"})(["color:",";font-size:",";left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);"],(function(e){return e.theme.ui_temp_white}),(function(e){return e.theme.desktopFontSize.body1})),Ot=Object(i.memo)(mt),gt=n(2790);var xt=L.default.label.withConfig({displayName:"S_SelectOption",componentId:"sc-1jnau7c-0"})(["align-items:center;cursor:pointer;display:flex;margin-right:24px;"]),_t=L.default.span.withConfig({displayName:"S_Text",componentId:"sc-1jnau7c-1"})(["color:",";font-size:",";margin-left:4px;"],(function(e){return e.theme.ui_temp_grey_01}),(function(e){return e.theme.desktopFontSize.caption1})),vt=L.default.input.withConfig({displayName:"S_InvisibleInput",componentId:"sc-1jnau7c-2"})(["display:none;"]),Ct=function(e){var t=e.icon,n=e.label,i=e.fieldName,c=e.type,o=void 0===c?"file":c,r=e.accept,a=e.handleModal,s=e.handleFile,l=e.isModalButton,d=void 0!==l&&l,u=e.value;return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsxs)(xt,{htmlFor:i,onClick:a,children:[t,Object(R.jsx)(_t,{children:n})]}),!d&&Object(R.jsx)(vt,{id:i,type:o,accept:r?"".concat(r,"/*"):"none",multiple:"image"===r,onChange:function(e){e&&s&&(s(e,u),e.target.value="")}})]})};var Tt=L.default.div.withConfig({displayName:"S_SelectBar",componentId:"sc-1ldk80y-0"})(["background-color:transparent;display:flex;height:48px;padding-left:",";padding-right:",";"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),yt=function(e){var t=e.handleModal,n=e.handleFileChange,i=Object(y.a)("translation").t;return Object(R.jsxs)(Tt,{children:[Object(R.jsx)(Ct,{icon:Object(R.jsx)(T.Icon,{iconName:"ic_photo"}),label:i("str_image"),fieldName:"selectedImages",accept:"image",handleFile:n,value:
1I.wb.IMAGE}),Object(R.jsx)(Ct,{icon:Object(R.jsx)(T.Icon,{iconName:"ic_video"}),label:i("str_video"),fieldName:"selectedVideos",accept:"video",handleFile:n,value:I.wb.VIDEO}),Object(R.jsx)(Ct,{icon:Object(R.jsx)(T.Icon,{iconName:"ic_links"}),type:"button",label:i("str_youtube"),fieldName:"modalSelector",accept:"none",handleModal:t,isModalButton:!0,value:I.wb.YOUTUBE})]})};var St=L.default.div.withConfig({displayName:"S_Wrapper",componentId:"sc-1v0g999-0"})(["margin-left:",";margin-right:",";"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),It=function(){var e=Object(o.c)(),t=Object(y.a)("translation").t,n=Object(r.k)(),c=Object(i.useState)(""),a=Object(O.a)(c,2),d=a[0],u=a[1],b=Object(i.useState)([]),j=Object(O.a)(b,2),m=j[0],h=j[1],f=Object(i.useState)(""),g=Object(O.a)(f,2),x=g[0],S=g[1],w=Object(i.useState)(!1),E=Object(O.a)(w,2),N=E[0],A=E[1],L=Object(i.useState)(!1),M=Object(O.a)(L,2),P=M[0],U=M[1],F=Object(i.useState)(""),G=Object(O.a)(F,2),H=G[0],W=G[1],q=Object(i.useState)(!1),K=Object(O.a)(q,2),Y=K[0],X=K[1],J=Object(i.useState)(!1),Z=Object(O.a)(J,2),Q=Z[0],$=Z[1],ee=Object(i.useState)(!1),te=Object(O.a)(ee,2),ne=te[0],ie=te[1],ce=Object(i.useState)(!1),oe=Object(O.a)(ce,2),re=oe[0],ae=oe[1],se=Object(r.m)(),le=se.channelCode,de=se.pAppCode,ue=Object(V.a)().isLabelRequired,pe=Object(o.d)(l.c),be=null===pe||void 0===pe?void 0:pe.id,je=Object(o.d)(B.b),me=Object(o.d)(_.g),he=Object(o.d)(_.i),fe=Object(i.useState)(),Oe=Object(O.a)(fe,2),ge=Oe[0],xe=Oe[1],_e=Object(Ye.useForm)({mode:"onChange",defaultValues:{content:""}}),ve=Object(Ye.useForm)({mode:"onChange"}),Ce=_e.formState,Te=Ce.isValid,ye=Ce.isDirty,Ie=!function(){if(ue&&(!ge||ge.length<=0))return!1;if(d===bt.d.VIDEO)return!ne&&(Te&&ye);return Te&&ye}();function we(e){switch(e){case e.sellerId:return"SELLER";case e.userId:return e.isFeatured?"USER_FEATURED":"USER_GENERAL";default:return"USER_GENERAL"}}Object(k.b)("".concat(de,"CreatePost"),"".concat(de.toLowerCase(),"_create_post"));var ke=function(){var e=Object(dt.a)(st.a.mark((function e(n,i){var c,o,r,a,s,l,p,b,j,f;return st.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(c=n.target.files)&&void 0!==c&&c.length){e.next=3;break}return e.abrupt("return");case 3:if(i!==bt.d.VIDEO){e.next=36;break}return ie(!0),o=Object(O.a)(c,1),r=o[0],e.prev=6,e.next=9,Object(pt.a)(r);case 9:if(a=e.sent,s=a.duration,l=a.dataUrl,p=a.width,b=a.height,Object(gt.a)(p,b)){e.next=20;break}return W(t("str_2962")),U(!0),n.target.value="",e.abrupt("return");case 20:if(!(s>I.V.VIDEO_MAX_DURATION)){e.next=25;break}return W(t("str_err_991",{errCode:"err"})),U(!0),n.target.value="",e.abrupt("return");case 25:h([{id:Object(ut.a)(),previewSrc:p?l:null,file:r}]),u(i),n.target.value="",e.next=35;break;case 30:return e.prev=30,e.t0=e.catch(6),W(t("str_err_1915")),U(!0),e.abrupt("return");case 35:return e.abrupt("return");case 36:if(i!==bt.d.IMAGE){e.next=55;break}if(!(m.length+c.length>I.V.IMAGE_MAX_COUNT)){e.next=41;break}return W(t("str_err_6300",{errCode:"err"})),U(!0),e.abrupt("return");case 41:if(!Object(lt.a)(c).some((function(e){return e.size>=I.V.IMAGE_MAX_SIZE}))){e.next=46;break}return W(t("str_err_990",{errCode:"err"})),U(!0),e.abrupt("return");case 46:return ae(!0),e.next=49,Promise.all(Object(lt.a)(c).map(function(){var e=Object(dt.a)(st.a.mark((function e(n){var i,c;return st.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(jt.a)(n);case 3:return i=e.sent,c=i.file,e.abrupt("return",{id:Object(ut.a)(),previewSrc:URL.createObjectURL(c),file:c});case 8:return e.prev=8,e.t0=e.catch(0),ae(!1),W(t("str_err_8587")),U(!0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}()));case 49:j=e.sent,f=j.filter(Boolean),d===bt.d.IMAGE?h([].concat(Object(lt.a)(m),Object(lt.a)(f))):h(f),u(i),ae(!1),n.target.value="";case 55:case"end":return e.stop()}}),e,null,[[6,30]])})));return function(t,n){return e.apply(this,arguments)}}(),Ee=function(){e(Object(s.v)({isOpen:!1}));var t=new URLSearchParams(location.search).get("from")||"";n.push("".concat(Object(Se.l)(v.b,{channelCode:le,pAppCode:de})).concat(t?"&from=".concat(t):""))},Be=function(){e(Object(s.v)({isOpen:!1}))},Ne={required:{value:!0,message:t("str_err_2090")},minLength:{value:z.d.CONTENT.MIN_LENGTH,message:t("str_min_max_length_validation",{minLength:z.d.CONTENT.MIN_LENGTH,maxLength:z.d.CONTENT.MAX_LENGTH})},maxLength:{value:z.d.CONTENT.MAX_LENGTH,message:t("str_min_max_length_validation",{minLength:z.d.CONTENT.MIN_LENGTH,maxLength:z.d.CONTENT.MAX_LENGTH})}};return Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(Ye.FormProvider,Object(C.a)(Object(C.a)({},_e),{},{children:Object(R.jsx)(T.Form,{children:Object(R.jsxs)(T.D_DesktopBasicModal,{titleText:t("str_2069"),mBtn1Text:t("str_register"),mBtn2Text:t
1("str_cancel"),size:"medium",onClickMBtn1:_e.handleSubmit((function(t){var n=t.content;if(be)switch(d){case bt.d.VIDEO:$(!0);break;case bt.d.IMAGE:e(Object(s.e)({pAppCode:de,channelId:be,content:n,labels:ge,type:d,resources:m.map((function(e){return{id:Object(ut.a)(),body:e.file}})),platformTier:we(je)})),Ee();break;case bt.d.YOUTUBE:e(Object(s.e)({pAppCode:de,channelId:be,content:n,labels:ge,type:d,youtubeSrc:x,platformTier:we(je)})),Ee();break;default:e(Object(s.e)({pAppCode:de,content:n,labels:ge,channelId:be,type:bt.d.PLAIN,platformTier:we(je)})),Ee()}})),onClickMBtn2:function(){m.length||_e.getValues("content")?X(!0):Be()},mBtn1State:Ie?"disabled":"normal",bodySpacingMode:"none",children:[me&&Object(R.jsx)(p.x,{}),Object(R.jsx)(St,{children:Object(R.jsx)(T.D_BlogTextField,{name:"content",hintText:t("str_86"),maxLength:z.d.CONTENT.MAX_LENGTH,autoMinRows:7,autoMaxRows:12,spacingMode:"none",validation:Ne})}),Object(R.jsx)(T.Spacing,{size:"spacing_d"}),he.length>0&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Divider,{}),Object(R.jsx)(T.Spacing,{size:"spacing_e"}),Object(R.jsx)(D.e,{isRequired:ue,onChange:function(e){xe(e)}})]}),Object(R.jsx)(T.Divider,{}),Object(R.jsx)(yt,{handleModal:function(){return A(!0)},handleFileChange:ke}),Object(R.jsx)(Ot,{isLoading:re,uploadPreview:!0,type:d,files:m,youtubeSrc:x,setSelectedFiles:h,setSelectedOption:u,setIsVideoUploadError:ie})]})})})),N&&Object(R.jsx)(Ye.FormProvider,Object(C.a)(Object(C.a)({},ve),{},{children:Object(R.jsx)(T.Form,{children:Object(R.jsx)(T.D_DesktopBasicModal,{titleText:t("str_youtube_url"),mBtn1Text:t("str_confirm"),mBtn2Text:t("str_cancel"),onClickMBtn1:ve.handleSubmit((function(e){var n=e.youtubeLink;if(!Se.g.getId(n))return W(t("str_err_993")),void U(!0);S(n),u(bt.d.YOUTUBE),A(!1)})),onClickMBtn2:function(){return A(!1)},size:"small",children:Object(R.jsx)(T.D_TextField,{name:"youtubeLink",hintText:t("str_89"),maxLength:I.Jb,size:"rlarge"})})})})),P&&Object(R.jsx)(T.D_DesktopAlertDialog,{contentText:H,btnMode:"tbtn_amount1",tBtn1Text:t("str_confirm"),onClickTBtn1:function(){return U(!1)}}),Q&&Object(R.jsx)(T.D_DesktopAlertDialog,{titleText:t("str_1473"),contentText:t("str_1474"),btnMode:"tbtn_amount2",tBtn2Text:t("str_cancel"),tBtn1Text:t("str_confirm"),onClickTBtn1:function(){if(be){var t=Object(O.a)(m,1)[0];if(t.file){var n=_e.getValues("content");e(Object(s.e)({pAppCode:de,channelId:be,content:n,labels:ge,type:bt.d.VIDEO,resources:[{id:Object(ut.a)(),body:t.file}],platformTier:we(je)})),$(!1),Ee()}}},onClickTBtn2:function(){return $(!1)}}),Y&&Object(R.jsx)(T.D_DesktopAlertDialog,{contentText:t("str_85"),btnMode:"tbtn_amount2",tBtn2Text:t("str_cancel"),tBtn1Text:t("str_confirm"),onClickTBtn1:function(){X(!1),Be()},onClickTBtn2:function(){return X(!1)}})]})};var wt=L.default.div.withConfig({displayName:"S_MediaBox",componentId:"sc-1swpaw2-0"})(["margin-left:",";margin-right:",";margin-top:",";"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),kt=L.default.div.withConfig({displayName:"S_Wrapper",componentId:"sc-1swpaw2-1"})(["margin-left:",";margin-right:",";"],(function(e){return e.theme.spacing.spacingE}),(function(e){return e.theme.spacing.spacingE})),Et=function(){var e,t,n,c,a=Object(y.a)("translation").t,d=Object(o.c)(),u=Object(r.m)().pAppCode,p=Object(i.useMemo)(l.n,[]),b=Object(o.d)(p),j=null===b||void 0===b?void 0:b.id,m=Object(o.d)(_.n),h=Object(i.useState)(""),f=Object(O.a)(h,2),g=f[0],x=f[1],v=Object(i.useState)(!1),S=Object(O.a)(v,2),I=S[0],w=S[1],E=Object(o.d)(_.k),B=Object(o.d)(_.g),N=Object(V.a)().isLabelRequired,A=Object(o.d)(_.i),L=Object(i.useState)(null===E||void 0===E?void 0:E.labels),M=Object(O.a)(L,2),P=M[0],U=M[1],F=Object(i.useState)(!1),G=Object(O.a)(F,2),H=G[0],W=G[1],q=Object(i.useMemo)((function(){return null===E||void 0===E?void 0:E.labels.slice().sort((function(e,t){return t.id-e.id}))}),[null===E||void 0===E?void 0:E.labels]),K=Object(Ye.useForm)({mode:"onChange",defaultValues:{content:g}}),Y=K.formState,X=Y.isValid,J=Y.isDirty,Z=!X||!(J||H)||N&&(!P||P.length<=0),Q=K.reset;Object(k.b)("".concat(u,"EditPost"),"".concat(u.toLowerCase(),"_edit_post")),Object(i.useEffect)((function(){m&&j&&d(Object(s.o)({postId:m,channelId:j,pAppCode:u}))}),[d,m,j]),Object(i.useEffect)((function(){E&&U(E.labels)}),[E]),Object(i.useEffect)((function(){E&&E.content&&(x(E.content),Q({content:E.content}))}),[E,Q]),Object(i.useEffect)((function(){if(E&&P){var e=P.length===E.labels.length&&Object(lt.a)(P).sort().every((function(e,t){return e.id===Object(lt.a)(E.labels).sort()[t].id}));W(!e)}}),[E,P]);var $=function(){W(!1),d(Object(s.w)({isOpen:!1}))},ee={required:{value:!0,message:a("str_err_2090")},minLength:{value:z.d.CONTENT.MIN_LENGTH,message:a("str_min_max_length_validation",{minLength:z.d.CONTENT.MIN_LENGTH,maxLength:z.d.CONTENT.MAX_LENGTH})},maxLength:{value:z.d.CONTENT.MAX_LENGTH,message:a("str_min_max_length_validation",{minLength:z.d.CONTENT.MIN_LENGTH,maxLength:z.d.CONTENT.MAX_LENGTH})}};return Object(R.jsxs)(R.Fragment,{children:[E&&Object(R.jsx)(Ye.FormProvider,Object(C.a)(Object(C.a)({},K),{},{children:Object(R.jsx)(T.Form,{children:Object(R.jsxs)(T.D_DesktopBasicModal,{titleText:a("str_2067"),mBtn1Text:a("str_register"),mBtn2Text:a("str_cancel"),mBtn1State:Z?"disabled":"normal",size:"medium",onClickMBtn1:K.handleSubmit((function(e){var t=e.content;if(j&&E&&m){if(E.storyResource){var n=E.storyResource,i=n.imageSrcs,c=n.type,o=n.videoSrc,r=n.youtubeSrc;d(Object(s.x)({pAppCode:u,content:t,labels:P,channelId:j,postId:m,storyResource:{imageSrcs:i,type:c,videoSrc:o,youtubeSrc:r}}))}else d(Object(s.x)({pAppCode:u,content:t,labels:P,channelId:j,postId:m}));$()}})),onClickMBtn2:function(){K.formState.isDirty?w(!0):$()},bodySpacingMode:"none",children:[B&&Object(R.jsx)(ye.a,{}
1),Object(R.jsx)(kt,{children:Object(R.jsx)(T.D_BlogTextField,{name:"content",hintText:a("str_86"),maxLength:z.d.CONTENT.MAX_LENGTH,textLineType:"auto",autoMinRows:7,autoMaxRows:12,spacingMode:"none",validation:ee})}),Object(R.jsx)(T.Spacing,{size:"spacing_d"}),A.length>0&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Divider,{}),Object(R.jsx)(T.Spacing,{size:"spacing_e"}),Object(R.jsx)(D.e,{isRequired:N,onChange:function(e){U(e)},defaultValues:q})]}),((null===E||void 0===E||null===(e=E.storyResource)||void 0===e?void 0:e.type)===bt.d.IMAGE||(null===E||void 0===E||null===(t=E.storyResource)||void 0===t?void 0:t.type)===bt.d.VIDEO||(null===E||void 0===E||null===(n=E.storyResource)||void 0===n?void 0:n.type)===bt.d.YOUTUBE)&&Object(R.jsxs)(R.Fragment,{children:[Object(R.jsx)(T.Divider,{}),Object(R.jsxs)(wt,{children:[E&&E.storyResource.type===bt.d.IMAGE&&(null===(c=E.storyResource.imageSrcs)||void 0===c?void 0:c.map((function(e){return Object(R.jsx)(D.g,{src:e,id:e},e)}))),E&&E.storyResource.type===bt.d.VIDEO&&E.storyResource.videoSrc&&E.storyResource.imageSrcs&&Object(R.jsx)(D.h,{src:E.storyResource.videoSrc,thumbnailSrc:E.storyResource.imageSrcs[0]}),E&&E.storyResource.videoSrc&&!E.storyResource.imageSrcs&&Object(R.jsx)(D.h,{src:E.storyResource.videoSrc}),E&&E.storyResource.type===bt.d.YOUTUBE&&E.storyResource.youtubeSrc&&Object(R.jsx)(D.d,{src:E.storyResource.youtubeSrc})]})]})]})})})),I&&Object(R.jsx)(T.D_DesktopAlertDialog,{contentText:a("str_85"),btnMode:"tbtn_amount2",tBtn2Text:a("str_cancel"),tBtn1Text:a("str_confirm"),onClickTBtn1:function(){w(!1),$()},onClickTBtn2:function(){return w(!1)}})]})};function Bt(){var e=Object(r.m)().pAppCode,t=Object(o.c)(),n=Object(o.d)(l.c),c=Object(o.d)(_.d),d=Object(o.d)(_.f);return Object(i.useEffect)((function(){t(Object(s.m)({channelId:(null===n||void 0===n?void 0:n.id)||0,pAppCode:e}))}),[]),Object(R.jsxs)(R.Fragment,{children:[Object(R.jsxs)(r.g,{children:[Object(R.jsx)(r.d,{exact:!0,path:v.b,component:Ce}),Object(R.jsx)(a.l,{path:v.a,component:rt,option:"GUEST_OPEN_WHEN_PUBLIC_OPEN"})]}),c&&Object(R.jsx)(It,{}),d&&Object(R.jsx)(Et,{})]})}var Nt=function(){var e=Object(r.l)(),t=Object(r.m)().pAppCode,n=Object(o.c)(),c=Object(i.useMemo)(u.f,[]),O=Object(o.d)(c),g=Object(i.useMemo)(l.n,[]),_=Object(o.d)(g),C=Object(o.d)(d.c),T=Object(o.d)(d.b),y=x({queryName:"scroll"}).resetScrollPosition;if(Object(i.useEffect)((function(){Object(j.a)(m.a,{channelCode:S,pAppCode:t})===e.pathname&&(n(Object(s.c)()),y())}),[e.pathname]),!_)return Object(R.jsx)(R.Fragment,{});var S=_.channelCode;if(T)switch(T.code){case 403:return Object(R.jsx)(r.c,{to:Object(m.P)(S,t)});default:return Object(R.jsx)(r.g,{children:Object(R.jsx)(r.c,{to:Object(m.V)(S)})})}return C&&C.code===t?Object(R.jsx)(p.k,{children:Object(R.jsxs)(r.g,{children:[Object(R.jsx)(a.q,{path:v.b,component:Bt,isAuthenticated:O}),Object(R.jsx)(a.q,{exact:!0,path:m.Zb,component:f.a,isAuthenticated:O}),Object(R.jsx)(r.c,{from:m.a,to:Object(j.a)(v.b,{channelCode:S,pAppCode:t})})]})}):T||C?Object(R.jsx)(b.a,{}):Object(R.jsxs)(r.g,{children:[Object(R.jsx)(a.q,{exact:!0,path:m.fb,component:h.a,isAuthenticated:O}),Object(R.jsx)(r.c,{to:Object(m.U)(S)})]})}}}]);
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.