1import{bb as Oe,bc as ge,s as D,m as u,r as n,bd as ne,j as t,n as X,B as oe,at as He,$ as Ne,a9 as ze,a0 as $e,c as Le,be as Ue,a_ as ee,d as I,T as Q,aj as _e,ag as Te,as as H,e as me,l as re,bf as le,bg as We,bh as fe,aX as Ee,_ as U,a$ as Ge,bi as he,bj as Ke,t as J,J as Xe,w as Ve,aR as Ye,aw as qe,aa as Me,Z as be,aU as Ze,bk as Je,bl as Qe,bm as et,ba as tt,bn as nt,a5 as ot,bo as K,bp as at,bq as st,br as rt,bs as it,bt as lt,bu as xe,bv as ct,aO as te,bw as dt,L as Ce,bx as Se,ar as mt,by as pt,bz as ut,K as De,bA as ye,bB as gt,bC as ft,E as ht,ae as bt,af as xt,N as Ct,ao as St,b9 as yt}from"./index-t4jkVxhS.js";import{S as wt,a as jt}from"./swiper-slide-CTaSPHEj.js";import{S as It,H as we}from"./HTMLContentsDisplay-DP9N_A8L.js";import{O as At}from"./OpgDetailPage-BB0bKFzo.js";import{D as kt,C as vt,a as Nt,T as $t,L as Lt,S as Tt}from"./CommentReportDialog-Dwp358c2.js";import{S as Et,u as Mt}from"./useCheckAdminUser-D12YAgC3.js";import{P as Dt}from"./PlanPurchaseDialog-gfuJA0FY.js";import{i as je}from"./index-Ks9zOcjd.js";import{S as Pt,F as Bt,a as Rt,b as Ft}from"./Twitter-Du7Zgg6U.js";import{c as Ot}from"./copy-clipboard-BDVZ9-in.js";import{A as Ht,a as zt,b as Ut}from"./ArticleThemeTileLayoutItem-prVugg-k.js";import{f as _t}from"./formatTime-tS_6vJm0.js";import{C as ce}from"./CustomMuiChip-Bf4fFH25.js";import{u as Wt}from"./usePutLastAccessContents-BlAZC_QO.js";import"./DialogContentText-BPwKfn2c.js";import"./FormikTextField-F8uSQVtL.js";import"./TextField-BuhSARSk.js";import"./useFormControl-5uBryT1f.js";import"./CustomBottomSheetDialog-CqQXD2tI.js";import"./time.helper-C6LtDjN6.js";import"./index-bwaovhYt.js";import"./Chip-CKmmAm9e.js";function Ie(e,r){Oe(2,arguments);var l=ge(e),a=ge(r);return l.getTime()>a.getTime()}const Z="ArticleBillingPlanArea",M={billingPlanDialog:`${Z}-billingPlanDialog`,btnPlanDetail:`${Z}-btnPlanDetail`,subtitle:`${Z}-subtitle`,textSecondary:`${Z}-textSecondary`,icon:`${Z}-icon`},Gt=D(u)(({theme:e})=>({[`&.${M.billingPlanDialog}`]:{backgroundColor:"rgba(250, 250, 250, 0.8)"},[`& .${M.btnPlanDetail}`]:{marginTop:e.spacing(4),backgroundColor:e.palette.grey[800],color:e.palette.white,"&:hover":{backgroundColor:e.palette.grey[700]}},[`& .${M.subtitle}`]:{color:"rgba(0, 0, 0, 0.87)"},[`& .${M.textSecondary}`]:{color:"rgba(22, 22, 25, 0.6)"},[`& .${M.icon}`]:{position:"absolute",top:0,left:"50%",transform:"translate(-50%, -50%)"}})),Kt=({articleCode:e,fanclubBillingPlans:r,userBillingPlan:l,userExpiredBilling:a,articleAuthorizationType:o,particialAccess:c,themeRelativeUrl:p})=>{const C=o&&[ne.LIMITED_PLAN,ne.NONE_FREE].includes(o.id)&&c,[i,f]=n.useState(!1),d=n.useMemo(()=>r?.filter(h=>h.enabledFanclubBillingPlanSetting)||[],[r]);return t.jsxs(t.Fragment,{children:[t.jsxs(Gt,{p:6,display:"flex",flexDirection:"column",alignItems:"center",position:"relative",className:M.billingPlanDialog,children:[t.jsx(Et,{className:M.icon}),t.jsx(X,{variant:"subtitle1",className:M.subtitle,children:"éå®ã³ã³ãã³ã"}),t.jsx(X,{variant:"caption",className:M.textSecondary,children:C?"ç¶ããèªãã«ã¯ãä¼å¡ãã©ã³ãè³¼å
¥ãã¦ãã ãã":"è¨äºãèªãã«ã¯ãä¼å¡ãã©ã³ãè³¼å
¥ãã¦ãã ãã"}),t.jsx(oe,{variant:"contained",color:"primary",fullWidth:!0,className:M.btnPlanDetail,onClick:()=>f(!0),children:"ãã©ã³è©³ç´°"})]}),t.jsx(Dt,{open:i,onClose:()=>f(!1),availablePlans:d,userBillingPlan:l,userExpiredBilling:a,contentType:He.ARTICLE,contentCode:`${p}/${e}`})]})},Xt=n.memo(Kt),$="ArticleComment",y={wrapper:`${$}-wrapper`,commentHeader:`${$}-commentHeader`,largeCommentHeader:`${$}-largeCommentHeader`,loading:`${$}-loading`,commentArea:`${$}-commentArea`,commentInputWrapper:`${$}-commentInputWrapper`,commentInput:`${$}-commentInput`,showCommentAreaBtn:`${$}-showCommentAreaBtn`,errorComment:`${$}-errorComment`,...Ne[$]},Vt=(e,r)=>({[`& .${y.wrapper}`]:{position:"fixed",bottom:0,left:0,width:"100%",marginBottom:0,display:"flex",flexDirection:"column",background:e.palette.background.default,boxShadow:"-2px -6px 12px 0px #60606229",transition:"height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",zIndex:100,transform:r.keyboardOffset?`translateY(-${r.keyboardOffset}px)`:"none","& > div:first-of-type":{padding:e.spacing(2.375,6),[e.breakpoints.up("md")]:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4)}},"&.showChPlus":{height:`calc(100% - ${r.height}px)`,[e.breakpoints.up("md")]:{height:"auto"}},"&.show":{height:`calc(100% - ${r.height}px)`,[e.breakpoints.up("md")]:{height:"auto"}},[e.breakpoints.up("md")]:{position:"relative",height:"auto",padding:e.spacing(6,0),marginBottom:e.spacing(46),boxSh
1adow:e.shadows[0],transform:"none"}},[`& .${y.largeCommentHeader}`]:{padding:`${e.spacing(4.375,6)} !important`,"& [class*='showCommentAreaBtn']":{top:8},[e.breakpoints.up("md")]:{padding:`${e.spacing(4.375,4)} !important`}},[`& .${y.commentHeader}`]:{padding:e.spacing(4.375,4),display:"flex",gap:e.spacing(2),position:"relative"},[`& .${y.showCommentAreaBtn}`]:{position:"absolute",top:0,right:24,width:40,height:40,"& svg":{fontSize:22}},[`& .${y.commentArea}`]:{height:0,overflowX:"hidden",borderColor:e.palette.divider,"&.show":{height:"auto"},"&.empty > .MuiBox-root":{padding:0},[e.breakpoints.up("md")]:{maxHeight:Ue},"&.active":{flex:1},"& .article-comment-detail-container":{display:"flex",alignItems:"flex-start",padding:e.spacing(.2,4),marginTop:e.spacing(4),"&:first-of-type":{marginTop:e.spacing(0)},"& .article-comment-detail-main":{flex:1}}},[`& .${y.loading}`]:{color:e.palette.primary.dark,display:"flex",justifyContent:"center",margin:e.spacing(6,0)},[`& .${y.commentInputWrapper}`]:{padding:e.spacing(2,6,4,6),"& button":{padding:e.spacing(2)},[e.breakpoints.up("md")]:{position:"sticky",bottom:0,padding:e.spacing(4)}},[`& .${y.commentInput}`]:{flex:1,padding:e.spacing(3),height:44,lineHeight:20/14,fontSize:14,background:e.palette.secondary.main,border:"1px solid transparent",outline:"none",maxHeight:86,scrollbarColor:"transparent transparent",color:e.palette.text.primary,"&.error":{borderColor:e.palette.error.main},"&::-webkit-scrollbar":{width:10,background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"transparent"},[e.breakpoints.up("md")]:{maxHeight:206}},[`& .${y.errorComment}`]:{marginTop:e.spacing(1),fontSize:12,color:e.palette.error.main}}),Yt=$e(Vt,Le[$]),qt=["height","keyboardOffset"],Pe=D(ze,{shouldForwardProp:e=>!qt.includes(e)})(({theme:e,...r})=>({...Yt(e,r)})),Ae="ArticleCommentDetail",ae={menuIconButton:`${Ae}-menuIconButton`,divider:`${Ae}-divider`},Zt=D("span")(({theme:e})=>({[`&.${ae.divider}`]:{margin:e.spacing(0,1),color:e.palette.divider}})),Jt=D(ee)(({theme:e})=>({[`&.${ae.menuIconButton}`]:{padding:e.spacing(2)}})),Qt=({commentData:e,handleOpenMenu:r})=>{const{postAt:l,comment:a,blockedUserId:o,nicknamePostedby:c}=e,p=I(m=>m.article.fanclubPersonInfoPolicy.nicknameDisplaySetting);return t.jsxs("div",{className:"article-comment-detail-container",children:[t.jsxs("div",{className:"article-comment-detail-main",children:[t.jsxs(Q,{variant:"caption",lineHeight:1.5,color:"textSecondary",display:"block",children:[c&&p&&t.jsxs(t.Fragment,{children:[c,t.jsx(Zt,{className:ae.divider,children:"|"})]}),_e(Te(l))]}),t.jsx(Q,{variant:"body2",wordBreak:"break-word",whiteSpace:"break-spaces",customColor:o?"text.disabled":"text.primary",children:o?"ãã®ã³ã¡ã³ãã¯è¡¨ç¤ºããã¾ãã":a})]}),!o&&t.jsx(Jt,{className:ae.menuIconButton,onClick:m=>r(m,e),size:"large",children:t.jsx(H,{iconKey:"MoreVertIcon"})})]})},en=n.memo(Qt),tn=({articleId:e,onComment:r})=>{const l=I(S=>S.app.offsetHeightNavbar),[a,o]=n.useState(""),c=n.useRef(null),[p,m]=n.useState(!1),{signed:C,isSuperUser:i,fanclubMemberId:f}=me(),d=I(S=>S.auth.fanclubMemberSetting),h=I(S=>S.article.articleDetail.data),L=re(),T=!C,E=i,w=a.length>le,P=S=>{const R=S.target.value.trim();o(R)},b=()=>{c.current&&(c.current.style.height="44px",c.current.style.height=`${c.current.scrollHeight}px`)},A=()=>{!f||!a||!a.trim()||i||h?.isCommentNgUser||w||L(Ke({articleId:e,fanclubMemberId:f,data:{articleComment:{comment:a.trim()}}})).then(J).then(()=>{r()}).catch(S=>{Xe({error:S,dispatch:L,errorMessages:{MSGNFAP01001:he.MSGNFAP01001,MSGCM008:Ve.MSGCM008.replace(":max",le.toString())}})}).finally(()=>{o(""),c.current&&(c.current.value="")}
1)},k=()=>{m(!0)},v=n.useMemo(()=>{const S=We(new Date);return!d||!d?.commentNgFrom&&!d?.commentNgTo?!1:d?.commentNgFrom&&!d?.commentNgTo?Ie(S,new Date(d?.commentNgFrom)):!d?.commentNgFrom&&d?.commentNgTo?je(S,new Date(d?.commentNgTo)):Ie(S,new Date(d.commentNgFrom??""))&&je(S,new Date(d.commentNgTo??""))},[d]),B=n.useMemo(()=>!i&&(h?.isCommentNgUser||v?fe.NG:fe.ALLOW)||"",[h?.isCommentNgUser,v,i]);return t.jsx(Pe,{height:l,children:t.jsxs(u,{p:4,bgcolor:"background.default",className:y.commentInputWrapper,children:[t.jsxs(u,{display:"flex",alignItems:"center",width:"100%",onClick:T?k:void 0,children:[t.jsx("textarea",{name:"comment",className:U(y.commentInput,Ge,w&&"error"),placeholder:B,onChange:Ee(P,150),onInput:b,ref:c,disabled:T||E||v}),t.jsx(ee,{onClick:A,disabled:!a.length||i||h?.isCommentNgUser||v||w,size:"large",children:t.jsx(H,{iconKey:"SendIcon"})})]}),w&&t.jsx("div",{className:y.errorComment,children:he.MAX_LENGTH_COMMENT.replace(":max",le.toString())}),h?.commentAcceptance&&!h.commentPublicity&&t.jsx(Q,{variant:"caption",color:"textSecondary",children:"æç¨¿ãããã³ã¡ã³ãã¯æ¿èªå¾ã«è¡¨ç¤ºããã¾ã"}),t.jsx(kt,{isOpenDialog:p,handleCloseDialog:()=>m(!1)})]})})},nn=n.memo(tn),on="ListNavigationResponsive",Be={dialogContent:`${on}-dialogContent`},an=D(u)(()=>({[`&.${Be.dialogContent}`]:{fontSize:16,"& > .MuiBox-root":{height:42,lineHeight:"42px"}}})),ke=D(qe)(({theme:e})=>({width:"100%",padding:e.spacing(1.5,4)})),sn=D(Ye)(()=>({"& .MuiMenu-list":{minWidth:180}})),rn=({anchorEl:e,setAnchorEl:r,comment:{postFanclubMember:l,...a}})=>{const{fanclubMemberId:o}=me(),[c,p]=n.useState(!1),{articleCode:m}=Me(),C=re(),i=n.useCallback(()=>{r(null)},[r]),f=()=>{p(!0)},d=n.useCallback(()=>{p(!1)},[]),h=()=>{o&&l?.keyCloakUserId&&C(Je({fanclubMemberId:o,fanclubMemberNgUsers:{ngFanclubMember:{keyCloakUserId:l.keyCloakUserId}}})).then(J).then(()=>C(Qe(l.keyCloakUserId))).catch(()=>C(et({withCloseButton:!0,setMaxWidth:!0,message:"NGã¦ã¼ã¶ã¼ç»é²æ°ãä¸éã«éãã¦ããããã追å ã§ãã¾ããã",customAction:t.jsx(oe,{size:"large",color:"primary",children:"NGã¦ã¼ã¶ã¼è¨å®"})}))).finally(i)};return n.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[i]),t.jsxs(t.Fragment,{children:[t.jsx(be,{breakpoints:"sm",breakDirection:"up",children:t.jsx(Ze,{open:!!e,onClose:i,children:t.jsxs(an,{p:6,width:"100vw",onClick:i,className:Be.dialogContent,children:[o!==l?.i
1d&&t.jsx(u,{mb:2,children:t.jsx(Q,{variant:"button",fontSize:15,onClick:h,children:"NG ã¦ã¼ã¶ã¼ç»é²"})}),t.jsx(u,{mb:2,onClick:f,children:t.jsx(X,{variant:"button",children:"éå ±"})})]})})}),t.jsx(be,{breakpoints:"sm",breakDirection:"down",children:t.jsxs(sn,{anchorEl:e,keepMounted:!0,open:!!e,onClose:i,onClick:i,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[o!==l?.id&&t.jsx(ke,{onClick:h,children:"NG ã¦ã¼ã¶ã¼ç»é²"}),t.jsx(ke,{onClick:f,children:"éå ±"})]})}),t.jsx(vt,{isOpenReportDialog:c,comment:{message:a.comment||"",nickname:a.nicknamePostedby,sentAt:a.postAt,senderId:l.keyCloakUserId},handleCloseReportDialog:d,contentType:Nt.ARTICLE,contentCode:m})]})},ln=n.memo(rn),cn="LoadingNewArticle",Re={loading:`${cn}-loading`},dn=D("div")(({theme:e})=>({[`&.${Re.loading}`]:{color:e.palette.primary.dark,display:"flex",justifyContent:"center",margin:e.spacing(6,0)}})),mn=()=>t.jsx(dn,{className:Re.loading,children:t.jsx(tt,{size:36,color:"inherit"})}),pn=n.memo(mn),un=400,gn=()=>{const[e,r]=n.useState(0),l=n.useRef(!1),a=n.useRef();return n.useEffect(()=>{if(!nt||!window.visualViewport)return;const o=window.visualViewport,c=()=>{a.current!==void 0&&(cancelAnimationFrame(a.current),a.current=void 0)},p=()=>{c();const C=performance.now()+un,i=()=>{window.scrollY!==0&&window.scrollTo(0,0),performance.now()<C?a.current=requestAnimationFrame(i):a.current=void 0};a.current=requestAnimationFrame(i)},m=()=>{const i=document.documentElement.clientHeight-o.height,f=i>0;f&&!l.current?p():f||c(),l.current=f;const d=f?Math.max(0,i-o.offsetTop):0;r(h=>h===d?h:d)};return m(),o.addEventListener("resize",m),o.addEventListener("scroll",m),()=>{c(),o.removeEventListener("resize",m),o.removeEventListener("scroll",m)}},[]),e},fn=({articleId:e})=>{const r=I(s=>s.app.offsetHeightNavbar),l=gn(),a=ot(s=>s.breakpoints.up("md")),o=n.useRef(null),c=n.useRef(null),p=n.useRef(0),m=n.useRef(0),C=I(s=>s.article.articleComment.isLoading),i=I(s=>s.article.articleComment.list),f=I(s=>s.article.articleComment.total),d="show",[h,L]=n.useState(K.DOWN),[T,E]=n.useState(null),[w,P]=n.useState(null),[b,A]=n.useState(!1),[k,v]=n.useState(!1),[B,S]=n.useState(0),R=re(),V=n.useCallback(()=>{o.current&&o.current.scrollTo({top:o.current.scrollHeight-p.current})},[]),O=n.useCallback(async s=>(at(s)&&(L(s),o.current&&(p.current=(o.current.scrollTop>=0?o.current.scrollHeight-o.current.scrollTop:o.current.scrollHeight)+st),await R(rt({articleId:e,params:{lastCommentsId:it(s),sort:s}})),s===K.UP&&(S(N=>N+1),V())),Promise.resolve()),[e,R,V]),ie=n.useCallback(s=>c.current!==null&&c.current>s&&s<200,[]),_=n.useCallback(()=>o.current?o.current.scrollTop+o.current.clientHeight+lt>=o.current.scrollHeight:!1,[]),W=()=>{if(!o.current)return;const s=o.current.scrollTop;ie(s)&&O(K.UP),c.current=s,_()&&O(K.DOWN)},F=n.useCallback(()=>{o.current?.scrollTo(0,o.current.scrollHeight)},[]),Y=n.useCallback(()=>{a||A(s=>!s)},[a]),x=n.useCallback((s,N)=>{E(s.currentTarget),P(N)},[]);return n.useEffect(()=>{const s=o.current,N=()=>{s&&s.scrollTop>=0&&(p.current=s.scrollHeight-s.scrollTop)};return s&&(s.onscroll=N),()=>{s&&s.removeEventListener("scroll",N)}},[B]),n.useEffect(()=>(R(xe(!1)),()=>{R(xe(!0))}),[e,R]),n.useEffect(()=>{O(K.UP).finally(()=>{F(),setTimeout(()=>{F()},300)})},[O,F]),n.useEffect(()=>{b&&F()},[b,F]),n.useEffect(()=>{const s=()=>{sessionStorage.setItem("positionScrollArticleDetail",window.scrollY.toString())};return a?A(!1):window.addEventListener("scroll",s),()=>{window.removeEventListener("scroll",s)}},[a]),n.useEffect(()=>(b?(m.current=Number(sessionStorage.getItem("positionScrollArticleDetail")),document.body.classList.add("overflow-hidden")):document.body.classList.remove("overflow-hidden"),!b&&m.current&&window.scrollTo({top:m.current}),()=>{document.body.classList.remove("overflow-hidden")}),[b]),n.useEffect(()=>{k&&(F(),v(!1))},[k,F]),t.jsx(Pe,{height:r,keyboardOffset:a?0:l,children:t.jsxs("div",{className:U(y.wrapper,(a||b)&&d),children:[t.jsxs("div",{className:U(b&&y.largeCommentHeader,y.commentHeader),"aria-hidden":!0,onClick:Y,children:[t.jsx(X,{variant:"subtitle2",children:"ã³ã¡ã³ã"}),t.jsx(X,{variant:"subtitle2",color:"textSecondary",children:f}),t.jsx(ee,{className:U(y.showCommentAreaBtn,"showCommentAreaBtn"),size:"large",children:t.jsx(H,{iconKey:b?"CloseIcon":"UnfoldMoreIcon"})})]}),t.jsx(u,{borderTop:(a||b)&&i&&i.length>0?1:0,borderBottom:a||b?1:0,className:U(y.commentArea,(a||b)&&"show",i&&i.length===0&&"empty",b&&!a&&"active"),id:ct,ref:o,py:a||b?2:0,px:a?0:2,onScroll:Ee(W,150),children:i&&t.jsxs(t.Fragment,{children:[C&&h===K.UP&&t.jsx(pn,{}),i.map(s=>t.jsx(en,{commentData:s,handleOpenMenu:x},s.id))]})},B),t.jsx(nn,{articleId:e,onComment:()=>v(!0)}),w&&t.jsx(ln,{anchorEl:T,setAnchorEl:E,comment:w})]})})},hn=n.memo(fn),j="ArticleContent",g={wrapper:`${j}-wrapper`,swiper:`${j}-swiper`,commentIcon:`${j}-commentIcon`,articleContent:`${j}-articleContent`,sharedButton:`${j}-sharedButton`,relatedCardWrapper:`${j}-relatedCardWrapper`,relatedListLayoutWrapper:`${j}-relatedListLayoutWrapper`,relatedTileLayoutWrapper:`${j}-relatedTileLayoutWrapper`,relatedCard:`${j}-relatedCard`,arrowIcon:`${j}-arrowIcon`,title:`${j}-title`,...Ne[j]},bn=e=>({[`&.${g.wrapper}`]:{padding:e.spacing(0,6),[e.breakpoints.up("sm")]:{padding:e.spacing(0,12)},[e.breakpoints.up("md")]:{padding:e.spacing(0,6)}},[`& .${g.swiper}`]:{width:"100%","& .swiper-slide":{width:"auto"}},[`& .${g.commentIcon}`]:{color:e.palette.secondary.darkText,fontSize:18},[`& .${g.articleContent}`]:{wordBreak:"break-all","& iframe":{maxWidth:"100%"},"& a":{color:`${e.palette.info.main} !important`}},[`& .${g.sharedButton}`]:{padding:0,marginLeft:e.spacing(4)},[`&.${g.relatedCardWrapper}`]:{marginBottom:e.spacing(26),[e.breakpoints.up("md")]:{marginBottom:e.spacing(0)},"& > .MuiBox-root":{width:"calc(50% - 8px)",[e.breakpoints.up("md")]:{width:"calc(50% - 12px)"}},"& .MuiBox-root > .MuiButtonBase-root":{marginBottom:e.spacing(2)},"& .button-label":{color:e.palette.secondary.darker},"& [class*='wrapperFullwidth']":{marginBottom:e.spacing(12),[e.breakpoints.up("md")]:{marginBottom:e.spacing(0)},[e.breakpoints.up("md")]:{marginBottom:e.spacing(6)}}},[`&.${g.relatedListLayoutWrapper}`]:{display:"flex",flexDirection:"column","& > .MuiBox-root":{width:"100%",[e.breakpoints.up("md")]:{width:"100%"}},"& [class*='relatedCard']":{marginLeft:0,"& > .MuiBox-root:first-of-type":{textAlign:"left"},"&:last-of-type [class*='wrapper-']":{marginBottom:e.spacing(11.25),[e.breakpoints.up("sm")]:{marginBottom:e.spacing(0)},[e.breakpoints.up("md")]:{marginBottom:e.spacing(6)}}}},[`&.${g.relatedTileLayoutWrapper}`]:{"& [class*='wrapperFullwidth']":{marginBottom:e.spacing(0),[e.breakpoints.up("md")]:{marginBottom:e.spacing(6)}}},[`& .${g.relatedCard}`]:{marginLeft:e.spacing(4),[e.breakpoints.up("md")]:{marginLeft:e.spacing(6)}},[`& .${g.arrowIcon}`]:{color:e.palette.secondary.darker},[`& .${g.title}`]:{fontWeight:700,fontSize:"1.125rem",[e.breakpoints.up("sm")]:{fontSize:"1.25rem"}}}),xn=$e(bn,Le[j]),de=D(u)(({theme:e,...r})=>({...xn(e,r)})),ve="ArticleShareSnsBox",se={content:`${ve}-content`,btnCopy:`${ve}-btnCopy`},Cn=D(u)(({theme:e})=>({[`&.${se.content}`]:{"& button":{height:32},"& button:not(:last-of-type) svg":{width:32,height:32,marginRight:e.spacing(4)}},[`& .${se.btnCopy}
1`]:{width:32,height:32,backgroundColor:e.palette.grey[600],color:e.palette.white,"& svg":{fontSize:16},"&:hover":{backgroundColor:e.palette.grey[700]}}})),Sn=({shareUrl:e,hashtagFacebook:r,shareTitle:l,hashtagTwitter:a})=>{const o=()=>{Ot(e)};return t.jsxs(Cn,{py:4,mb:4,display:"flex",justifyContent:"flex-end",className:se.content,children:[t.jsx($t,{url:e,title:l,hashtags:a,children:t.jsx(Pt,{fontSize:48})}),t.jsx(Bt,{url:e,hashtag:r,quote:l,children:t.jsx(Rt,{width:48,height:48})}),t.jsx(Lt,{url:e,title:l,children:t.jsx(Ft,{fontSize:48})}),t.jsx(ee,{onClick:o,className:se.btnCopy,size:"large",children:t.jsx(H,{iconKey:"FilterNoneIcon"})})]})},yn=n.memo(Sn),wn=({articleTitle:e,articleTheme:r,isSuperUser:l,themeRelativeUrl:a})=>{const{article:{relatedArticle:{nextArticle:o,prevArticle:c}},app:{fanclubSiteHeaderFooterInformation:p}}=I(d=>d),m=n.useMemo(()=>{const d=p?.hashTag?.split(/\s/).filter(Boolean).map(h=>h.replace(/^#/,""));return d?.length?{facebook:`#${d.join(" ")}`,twitter:d}:null},[p?.hashTag]),C=n.useMemo(()=>{switch(r?.articleListLayoutType?.id){case te.LIST_LAYOUT:return Ut;case te.TILE_LAYOUT:return zt;default:return Ht}},[r?.articleListLayoutType?.id]),i=r?.articleListLayoutType?.id===te.LIST_LAYOUT,f=r?.articleListLayoutType?.id===te.TILE_LAYOUT;return t.jsxs(u,{mt:6,children:[t.jsx(yn,{shareUrl:window.location.href,shareTitle:e,hashtagTwitter:m?.twitter,hashtagFacebook:m?.facebook}),(c||o)&&t.jsxs(t.Fragment,{children:[t.jsx(dt,{}),t.jsxs(de,{mt:4,maxWidth:504,mx:"auto",display:"flex",justifyContent:"space-between",className:U(g.relatedCardWrapper,i&&g.relatedListLayoutWrapper,f&&g.relatedTileLayoutWrapper),children:[t.jsx(u,{children:c&&t.jsxs(t.Fragment,{children:[t.jsx(oe,{startIcon:t.jsx(H,{iconKey:"ArrowBackIcon",className:g.arrowIcon}),size:"small",component:Ce,to:Se.NFC_AP_010.replace(":themeRelativeUrl",a).replace(":articleCode",c.articleCode),children:t.jsx("span",{className:"button-label",children:"åã¸"})}),t.jsx(C,{data:c,isSmallSize:!0,isFullWidth:!0,billingPlanInformation:{isSuperUser:l},isClickWrapperNavigateToDetail:!0,themeRelativeUrl:a})]})}),o&&t.jsxs(u,{className:U(g.relatedCard,"relatedCard"),children:[t.jsx(u,{textAlign:"end",children:t.jsx(oe,{endIcon:t.jsx(H,{iconKey:"ArrowForwardIcon",className:g.arrowIcon}),size:"small",component:Ce,to:Se.NFC_AP_010.replace(":themeRelativeUrl",a).replace(":articleCode",o.articleCode),children:t.jsx("span",{className:"button-label",children:"次ã¸"})})}),t.jsx(C,{data:o,isSmallSize:!0,isFullWidth:!0,billingPlanInformation:{isSuperUser:l},isClickWrapperNavigateToDetail:!0,themeRelativeUrl:a})]})]})]})]})},jn=n.memo(wn),In=({articleDetail:{articleTitle:e,publishAt:r,articleAuthorizationType:l,particialAccess:a,countArticleComments:o,articleArticleCategories:c,contents:p,commentAcceptance:m,articleTheme:C,id:i,thumbnailUrl:f},userBillingPlan:d,userExpiredBilling:h,isSuperUser:L,fanclubBillingPlans:T,themeRelativeUrl:E,articleCode:w})=>{const{article:{articleDetail:{isLoading:P}},auth:{fanclubMemberSetting:b}}=I(x=>x),A=b?.allPublishedContentsAccessible,k=n.useRef(null),v=I(x=>x.article.themeName),[B,S]=n.useState(!1),[R,V]=n.useState(null),O=l?.id,ie=I(x=>x.app.fanclubSiteInfo?.platformId),_=n.useMemo(()=>O&&[ne.LIMITED_PLAN,ne.NONE_FREE].includes(O),[O]),W=_&&a,F=x=>{S(!0),V(x.currentTarget)},Y=n.useMemo(()=>!!(d?.id&&T?.find(x=>x.id===d.id)||L),[T,d?.id,L]);return n.useEffect(()=>{if(!p)return;const x=k.current;x&&[...x.getElementsByTagName("img")].forEach(s=>{s.setAttribute("data-width",`${Number(s.getAttribute("width"))}`)})},[p]),n.useEffect(()=>{const x=()=>{const s=k.current;if(s){const N=s.clientWidth;[...s.getElementsByTagName("img")].forEach(z=>{const pe=Number(z.getAttribute("data-width")),G=Number(z.getAttribute("width")),ue=Number(z.getAttribute("height"));if(pe>N){const q=G/N;z.setAttribute("width",`${G/q}`),z.setAttribute("height",`${ue/q}`)}else if(N>G&&pe>G){const q=N/G;z.setAttribute("width",`${G*q}`),z.setAttribute("height",`${ue*q}`)}})}};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[p]),t.jsxs(u,{overflow:"hidden",children:[t.jsx(It,{}),t.jsx(At,{image:f,title:e,description:"",platformId:ie}),t.jsxs(de,{maxWidth:816,width:"100%",mx:"auto",mt:6,className:g.wrapper,children:[t.jsxs(u,{mb:4,display:"flex",children:[_&&t.jsx(ce,{customColor:"gradient.main",color:"white",size:"small",label:t.jsxs(u,{display:"flex",alignItems:"center",fontSize:12,lineHeight:2,children:[t.jsx(mt,{width:15}),t.jsx(u,{ml:.5,children:"ä¼å¡éå®"})]})}),W&&t.jsx(u,{ml:1,children:t.jsx(ce,{size:"small",color:"white",customColor:"accent.main",label:"ä¸é¨ç¡æ"})})]}),t.jsx(u,{mb:4,children:t.jsx(Q,{variant:"h6",wordBreak:"break-all",className:g.title,children:e})}),c&&t.jsx(u,{mb:4,children:t.jsx(wt,{freeMode:!0,slidesPerView:"auto",direction:"horizontal",className:g.swiper,children:t.jsx(jt,{children:t.jsx(u,{display:"flex",flexWrap:"nowrap",alignItems:"center",children:c.map(x=>t.jsx(u,{mr:2,children:t.jsx(ce,{size:"small",color:"secondary",label:x.articleCategory.categoryName,variant:"outlined",extraSmallChip:!0})},x.id))})})})}),t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",color:"text.secondary",fontSize:12,mb:6,children:[t.jsx(X,{variant:"caption",children:_t(Te(r))}),t.jsxs(u,{display:"flex",alignItems:"center",children:[m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{iconKey:"ModeCommentIcon",className:g.commentIcon}),t.jsx(u,{ml:1,children:o})]}),t.jsx(ee,{onClick:F,className:g.sharedButton,size:"large",children:t.jsx(H,{iconKey:"ShareIcon",fontSize:"small"})})]})]}),(!_&&!W||A||Y)&&t.jsx(u,{ref:k,mb:6,className:g.articleContent,children:t.jsx(we,{c
1ontent:p?.replace(pt,"<br />")||""})}),!A&&W&&!Y&&t.jsx(u,{ref:k,mb:6,className:g.articleContent,children:t.jsx(we,{content:ut(p||"")})}),(_||W)&&!A&&!Y&&t.jsx(Xt,{fanclubBillingPlans:T,articleCode:w,userBillingPlan:d,userExpiredBilling:h,particialAccess:a,articleAuthorizationType:l,themeRelativeUrl:E}),t.jsx(jn,{articleTitle:e,articleTheme:C,isSuperUser:L,themeRelativeUrl:E}),m&&!P&&t.jsx(hn,{articleId:i})]}),t.jsx(Tt,{shareUrl:window.location.href,shareTitle:e,anchorEl:R,setAnchorEl:V,isOpenShareSnsResponsive:B,setIsOpenShareSnsResponsive:S}),t.jsx(de,{"data-theme-name":v,className:g.bgShapeArticleDetail})]})},An=n.memo(In),Fe=()=>({isPreviewMode:new URLSearchParams(window.location.search).get("mode")==="preview"}),kn=()=>{const e=re(),{articleCode:r,themeRelativeUrl:l}=Me(),[a,o]=n.useState(!1),{article:{articleDetail:c},app:{fanclubSiteInfo:p}}=I(w=>w),{fanclubMemberId:m,isSuperUser:C}=me(),[i,f]=n.useState(null),[d,h]=n.useState(null),[L,T]=n.useState(null),{isPreviewMode:E}=Fe();return n.useEffect(()=>{e(ye())},[e]),Wt(),n.useEffect(()=>{if(!p)return;const{fanclubSiteId:w}=p,P=[e(gt({fanclubSiteId:w,articleCode:r})).then(J).then(f).catch(()=>f(null))];r&&l&&P.push(e(ft({fanclubSiteId:ht(),themeRelativeUrl:l,articleCode:r,mode:E?"preview":void 0})).then()),m&&P.push(e(bt({fanclubMemberId:m.toString(),fanclubSiteId:w})).then(J).then(b=>{const A=b.fanclubSpecificProfile?.activeFanclubMembership?.fanclubBillingPlan,k=b.fanclubSpecificProfile?.activeFanclubMembership?.memberNo,v=b.fanclubSpecificProfile?.activeFanclubMembership?.expireBufferingEndAt;A?h(A):k&&v&&e(xt({fanclubSiteId:w,fanclubMemberId:m.toString()})).then(J).then(B=>{B&&T(B)})})),o(!0),Promise.all(P).finally(()=>o(!1))},[e,p,m,r,l,E]),n.useEffect(()=>()=>{sessionStorage.setItem("backFromDetail","true"),e(ye())},[e]),a?t.jsx(Ct,{isFullScreen:!0}):c.hasError?t.jsx(De,{notFound:!0}):t.jsxs(t.Fragment,{children:[t.jsx(St,{}),t.jsx(yt,{children:t.jsx("meta",{name:"referrer",content:"unsafe-url"})}),c.data&&t.jsx(An,{articleDetail:c.data,fanclubBillingPlans:i,userBillingPlan:d,userExpiredBilling:L,isSuperUser:C,themeRelativeUrl:l,articleCode:r})]})},vn=()=>{const e=Mt(),{isPreviewMode:r}=Fe();return!e&&r?t.jsx(De,{notFound:!0}):t.jsx(kn,{})},qn=n.memo(vn);export{qn as default};
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.