1import{r as o,j as e}from"./vendor-react-CYOoHjOf.js";import{j as $}from"./vendor-redux-BXotTMQH.js";import{L as Pe,T as x,ad as Ie,m as K,c1 as Se,ge as De,i as Ce,h as xe,a as u,bX as U,b as ye,V as B,ec as Ae,fJ as Me,o as F,q as H,gf as Ee,t as G,g7 as ke,v as je,M as S,j as Ne,bS as Le,bv as Re,l as Te,k as we,g as ve}from"./index-NXCSpy0w.js";import{R as _e}from"./ReturnButton-C43vaIAe.js";import{N as Oe}from"./constants-B7vMyeIK.js";import{aH as v,aK as m,bd as X,aR as $e,aX as Ue,aY as W,b6 as Be,aS as Fe,aT as He,aU as Ge}from"./vendor-mui-A_M4pNO3.js";import{e as E}from"./auth-niconico-DVzROP80.js";import{u as We}from"./useCheckSitePerformancePlan-CRZQi_No.js";import{u as Je}from"./useNiconicoUserId-z3VLhd0c.js";import{P as Ke,a as J}from"./mypage.types-BZip3ud9.js";import"./vendor-lodash-Cp5T_Ztg.js";import"./vendor-axios-BLlBCaos.js";import"./vendor-auth-DXBuXNeD.js";import"./vendor-motion-CwbUqb9k.js";const A="NavLink",d={content:`${A}-content`,subLabel:`${A}-subLabel`,iconChevRight:`${A}-iconChevRight`,label:`${A}-label`},Xe=v(m)(({theme:n})=>({[`& .${d.content}`]:{display:"flex",overflow:"hidden",alignItems:"center",justifyContent:"flex-end",marginLeft:n.spacing(1)},[`& .${d.subLabel}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${d.iconChevRight}`]:{color:n.palette.secondary.darker},[`& .${d.label}`]:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),Ye=({label:n,subLabel:h,linkTo:s,isHiddenIcon:i=!1,disabled:l,...r})=>e.jsx(X,{component:s?Pe:m,to:s,disabled:l,...r,children:e.jsxs(Xe,{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",py:1.5,children:[e.jsx(x,{variant:"body1",fontWeight:400,className:d.label,children:n}),e.jsxs(m,{color:"text.secondary",className:d.content,children:[h&&e.jsx(x,{variant:"caption",fontWeight:400,lineHeight:"19px",className:d.subLabel,children:h}),!i&&e.jsx(Ie,{className:d.iconChevRight,fontSize:"small",iconKey:"ChevronRightIcon"})]})]})}),t=o.memo(Ye),M="AccountInformation",f={dialogTitle:`${M}-dialogTitle`,dialogContent:`${M}-dialogContent`,dialogActions:`${M}-dialogActions`,linkDetailPremium:`${M}-linkDetailPremium`},qe=v(x)(({theme:n})=>({[`&.${f.linkDetailPremium}`]:{padding:n.spacing(1.75,0),color:n.palette.info.main,"&:hover":{textDecoration:"underline"}}})),ze=v($e)(({theme:n})=>({[`& .${f.dialogTitle}`]:{fontWeight:700},[`& .${f.dialogContent}`]:{padding:n.spacing(0,6)},[`& .${f.dialogActions}`]:{padding:n.spacing(4,6)}})),Qe=()=>{const[n,h]=o.useState(!1),[s,i]=o.useState(!1);return o.useEffect(()=>{const{keyCloakUserId:l}=K(),{userInformation:r}=Se.getState().auth.totalUserInformation[De],I=!!r?.accessToken;h(I&&!r.isSuperUser&&!E(l)),i(I&&!(E(l,"oauth2|")||E(l)))},[]),{isShowDeleteAccountLink:n,isShowChangePasswordLink:s}},hn=()=>{const n=Ce(),{keyCloakUserId:h}=K(),{isPerformancePlanAvailable:s}=We(),i=xe(),l=Ue(),r=W(l.breakpoints.down("md")),I=W(l.breakpoints.only("xs")),k=u(a=>a.app.fanclubSiteInfo?.platformId)===U.CHPL,y=ve(),{signed:Y,isSuperUser:j,fanclubMemberId:N,nickname:q,mailAddress:z}=ye(),g=u(a=>a.mypage.fanclubMemberMyPageData),p=u(a=>a.mypage.memberDetail),Q=u(a=>a.mypage.fanclubPersonalInfoPolicy),b=u(a=>a.mypage.memberDetail?.isJoinedPerformancePlan),[V,_]=o.useState(!0),[Z,L]=o.useState(!1),[R,ee]=o.useState(!1),{isShowChangePasswordLink:ne,isShowDeleteAccountLink:ae}=Qe(),oe=o.useMemo(()=>R?B.PASSWORD_FOR_CHANGE_MAIL:B.NEW_EMAIL,[R]),P=p?.isPremiumUser,D=p?.hasJoinedPlan,c=!!g?.fanclubMember?.fanclubSpecificProfile?.activeFanclubMembership?.fanclubBillingPlan,te=o.useMemo(()=>s&&b?!0:k?!!(p?.hasCreditCardPaidMember||p?.fanclubMemberPaymentInfo?.gmoMemberId&&P):!!(c&&g?.fanclubMember?.fanclubSpecificProfile?.activeFanclubMembership?.paymentMethod?.id===Ke.CREDIT_CARD),[s,b,g?.fanclubMember?.fanclubSpecificProfile?.activeFanclubMembership?.paymentMethod?.id,c,k,y,P,p?.fanclubMemberPaymentInfo?.gmoMemberId,p?.hasCreditCardPaidMember]),O=o.useMemo(()=>c,[c,D,y,P,b]),se=u(a=>a.payment.performancePlan?.performancePlan),ie=u(a=>a.mypage.discordClient),le=u(a=>a.mypage.hasDiscordBillingPlanRole),re=Ae.provisioningMode===U.SHTA,ce=ie!==null&&!j&&(!re||le),ue=!j&&s,C=se?.name??"",me=o.useMemo(()=>!!(g?.fanclubPersonalInfoPolicy?.hasPersonalInfo||g?.fanclubPersonalInfoPolicy?.personalInfoSetting===J.BOTH||g?.fanclubPersonalInfoPolicy?.personalInfoSetting===J.ONLY_PAID_MEMBER&&c),[g,Q,p,y,c]),de=Je(),fe=Me(),{titleDialog:he,contentDialog:ge}=o.useMemo(()=>D&&b?{titleDialog:"ãã©ã³å ¥ä¼ä¸ã§ã",contentDialog:`ã¢ã«ã¦ã³ããåé¤ããã«ã¯ãå ã«ä¼å¡ãã©ã³ã®éä¼ã¨${C}ã®è§£ç´æç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã`}:b?{titleDialog:`${C}å ¥ä¼ä¸ã§ã`,contentDialog:`ã¢ã«ã¦ã³ããåé¤ããã«ã¯ãå ã«${C}ã®è§£ç´æç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã`}:D&&P?{titleDialog:"ãã³ãã³ãã¬ãã¢ã å ¥ä¼ä¸ã§ã",contentDialog:`ã¢ã«ã¦ã³ããåé¤ããã«ã¯ããã©ã³ä¼å¡ã¨ãã³ãã³ãã¬ãã¢ã ã®è§£ç´æç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã 2ãã³ãã³ãã¬ãã¢ã ã®è§£ç´ã¯ããã³ãã³å´ã®ãã¤ãã¼ã¸ãããæç¶ããå¯è½ã§ãã`}:D?{titleDialog:"ãã©ã³å ¥ä¼ä¸ã§ã",contentDialog:"ã¢ã«ã¦ã³ããåé¤ããã«ã¯ãå ã«ä¼å¡ãã©ã³ã®é伿ç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã"}:P?{titleDialog:"ãã³ãã³ãã¬ãã¢ã å ¥ä¼ä¸ã§ã",contentDialog:`ã¢ã«ã¦ã³ããåé¤ããã«ã¯ãå ã«ãã³ãã³ãã¬ãã¢ã ã®è§£ç´æç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã 3ãã³ãã³ãã¬ãã¢ã ã®è§£ç´ã¯ããã³ãã³å´ã®ãã¤ãã¼ã¸ãããæç¶ããå¯è½ã§ãã`}:c?{titleDialog:"ãã©ã³å ¥ä¼ä¸ã§ã",contentDialog:"ã¢ã«ã¦ã³ããåé¤ããã«ã¯ãå ã«ä¼å¡ãã©ã³ã®é伿ç¶ãããã¦ããã ãå¿ è¦ãããã¾ãã"}:{titleDialog:"",contentDialog:""}
3,[c,C,b,D,P]),pe=()=>{O&&L(!0)};return o.useEffect(()=>{const a=F();H(),N&&n(Ee({fanclubSiteId:a,fanclubMemberId:N.toString()})).then($).then(()=>{_(!1)}).catch(({data:{error:T},status:w})=>{_(!1),G({error:T,dispatch:n,status:w,history:i})})},[n,N,i,Y,y]),o.useEffect(()=>{const a=F(),T=H();n(ke({fanclubGroupId:T,fanclubSiteId:a})).then($).catch(({data:{error:w},status:be})=>{G({error:w,dispatch:n,status:be,history:i})})},[n,i]),o.useEffect(()=>{ee(!E(h,"oauth2|"))},[h]),V?e.jsx(je,{isFullScreen:!0}):e.jsxs(m,{px:6,children:[e.jsxs(m,{maxWidth:505,mx:"auto",mt:r?6:10,mb:I?32:40,children:[e.jsx(_e,{path:S.MY_PAGE}),e.jsx(m,{mt:r?2:4,children:e.jsx(x,{variant:"h5",fontSize:I?"20px":"25px",lineHeight:I?"28px":"34px",children:"ã¢ã«ã¦ã³ãæ
å ±"})}),e.jsxs(m,{mt:r?6:12,children:[e.jsx(t,{label:"ããã¯ãã¼ã ",subLabel:q||"æªç»é²",linkTo:S.CHANGE_NICKNAME}),k&&e.jsx(t,{label:"ãã³ãã³ã¦ã¼ã¶ã¼ID",subLabel:de,isHiddenIcon:!0}),e.jsx(t,{label:"ã¡ã¼ã«ã¢ãã¬ã¹",subLabel:z,linkTo:oe,disabled:j}),ne&&e.jsx(t,{label:"ãã¹ã¯ã¼ã",linkTo:R?S.CHANGE_PASSWORD:Ne.REISSUE_PASSWORD}),me&&e.jsx(t,{label:"å人æ
å ±",linkTo:Le.PERSONAL_INFORMATION}),te&&e.jsx(t,{label:"ã¯ã¬ã¸ããã«ã¼ãè¨å®",linkTo:Re.PAYMENT_CHANGE}),ue&&e.jsx(t,{linkTo:S.PERFORMANCE_PLAN_DETAIL,label:C,subLabel:b?"å
¥ä¼ä¸":"æªå
¥ä¼"}),ce&&e.jsx(t,{label:"Discord飿º",linkTo:S.DISCORD_SETTING}),ae&&e.jsx(t,{label:"ã¢ã«ã¦ã³ãåé¤",linkTo:O?void 0:{pathname:Te.DELETE_ACCOUNT,state:{from:S.ACCOUNT_INFORMATION}},onClick:pe}),P&&e.jsx(X,{component:"a",target:"_blank",href:Oe.PURCHASE_DETAIL_FOR_PREMIUM,children:e.jsx(qe,{className:f.linkDetailPremium,variant:"subtitle2",children:"ãã³ãã³ãã¬ãã¢ã ã«ã¤ãã¦"})}),e.jsx(m,{mt:10,children:e.jsx(Be,{})}),e.jsx(t,{label:"ãã°ã¢ã¦ã",onClick:fe})]})]}),e.jsxs(ze,{fullWidth:!0,open:Z,onClose:()=>L(!1),children:[e.jsx(Fe,{className:f.dialogTitle,children:he}),e.jsx(He,{className:f.dialogContent,children:e.jsx(x,{whiteSpace:"pre-line",variant:"body1",color:"textSecondary",children:ge})}),e.jsx(Ge,{className:f.dialogActions,children:e.jsx(we,{variant:"contained",onClick:()=>L(!1),color:"primary",children:"OK"})})]})]})};export{hn 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.