!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ed36200f-feca-442e-8f62-ba9f4ade3742",e._sentryDebugIdIdentifier="sentry-dbid-ed36200f-feca-442e-8f62-ba9f4ade3742")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6022],{58156:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mypage/payment",function(){return i(32451)}])},1914:function(e,t,i){"use strict";i.d(t,{H:function(){return l}});var r=i(85893),n=i(93717),o=i(57747),s=i(8411),a=i(81903);let l=e=>{let{children:t,blockProps:i}=e,{isNativePlatform:l}=(0,a.m)();return(0,r.jsx)(n.k,{direction:"column",align:"center",...i,children:(0,r.jsx)(o.xu,{as:"main",width:"full",maxWidth:"920px",paddingX:l?"12px":["4","8"],paddingTop:l?"16px":["48px","80px"],paddingBottom:l?"16px":["48px","132px"],sx:{["@media (min-width: ".concat(s.u1,")")]:{paddingTop:"132px"}},children:t})})}},76737:function(e,t,i){"use strict";i.d(t,{I:function(){return l}});var r=i(85893),n=i(93717),o=i(57747),s=i(8411),a=i(81903);let l=e=>{let{children:t,blockProps:i}=e,{isNativePlatform:l}=(0,a.m)();return(0,r.jsx)(n.k,{direction:"column",align:"center",...i,children:(0,r.jsx)(o.xu,{as:"main",width:"full",maxWidth:"984px",paddingX:l?"12px":["4","8"],paddingTop:l?"16px":["48px","80px"],paddingBottom:l?"16px":["48px","132px"],sx:{["@media (min-width: ".concat(s.u1,")")]:{paddingTop:"132px"}},children:t})})}},46899:function(e,t,i){"use strict";i.d(t,{w:function(){return l}});var r=i(85893),n=i(93717),o=i(57747),s=i(8411),a=i(81903);let l=e=>{let{children:t,blockProps:i}=e,{isNativePlatform:l}=(0,a.m)();return(0,r.jsx)(n.k,{direction:"column",align:"center",...i,children:(0,r.jsx)(o.xu,{as:"main",width:"full",maxWidth:"calc(920px + 32px * 2)",paddingX:l?"12px":["4","8"],paddingTop:l?"16px":["48px","80px"],paddingBottom:l?"16px":["48px","132px"],sx:{["@media (min-width: ".concat(s.u1,")")]:{paddingTop:"132px"}},children:t})})}},36553:function(e,t,i){"use strict";i.d(t,{X:function(){return s}});var r=i(85893),n=i(14225),o=i(71293);let s=i(67294).forwardRef((e,t)=>{let{text:i,maxWidth:s,color:a,background:l,isLoading:d,isDisabled:c,type:u,as:x,cursor:p,onClick:h,href:m}=e;return(0,r.jsx)(n.z,{ref:t,as:x,isLoading:d,isDisabled:c,type:u,background:l,borderRadius:"50px",color:a,cursor:p,height:"60px",maxWidth:s,width:"100%",transition:"0.5s",display:"flex",alignItems:"center",_hover:{opacity:.8},href:m,onClick:h,children:(0,r.jsx)(o.x,{fontSize:"16px",width:"100%",fontWeight:"700",letterSpacing:"0.1em",textAlign:"center",lineHeight:"17px",children:i})})});s.displayName="CommonButtonTypeC"},31054:function(e,t,i){"use strict";i.d(t,{q:function(){return d}});var r=i(85893),n=i(93717),o=i(57747),s=i(81903),a=i(19083),l=i(27684);let d=e=>{let{children:t,isTopPage:i=!1,layoutContents:d}=e,{isNativePlatform:c}=(0,s.m)();return(0,r.jsxs)(n.k,{position:"relative",direction:"column",minH:"100vh",backgroundColor:"backgroundPrimary",children:[!c&&(0,r.jsx)(o.xu,{zIndex:"1",sx:i?{position:"absolute",top:"0",right:"0",left:"0"}:void 0,children:(0,r.jsx)(l.O,{isTopPage:i,headerLogo:null==d?void 0:d.headerLogo,menuLogo:null==d?void 0:d.menuLogo})}),(0,r.jsx)(o.xu,{width:"full",flex:"1",children:t}),!c&&(0,r.jsx)(a.m,{footerLogo:null==d?void 0:d.footerLogo})]})}},39057:function(e,t,i){"use strict";i.d(t,{r:function(){return a}});var r=i(85893),n=i(93717),o=i(57747),s=i(81903);let a=e=>{let{children:t}=e,{isNativePlatform:i}=(0,s.m)();return(0,r.jsx)(n.k,{direction:"column",align:"center",width:"100%",children:(0,r.jsx)(o.xu,{as:"main",width:"full",maxWidth:"984px",paddingX:i?"12px":["6","8"],paddingTop:i?"16px":["40px","70px"],paddingBottom:i?"16px":["80px","120px"],children:t})})}},51130:function(e,t,i){"use strict";i.d(t,{p:function(){return a}});var r=i(78551),n=i(60466),o=i(42564),s=i(8138);let a=()=>{let{user:e}=(0,s.P)(),{data:t,refetch:i,isLoading:a}=(0,r.a)({queryKey:["/users/me"],queryFn:async()=>{let t=await (0,o.q)(e);return(0,n.jo)({Authorization:"Bearer ".concat(t)})},enabled:!!e});return{me:t,refetch:i,isLoading:a}}},391:function(e,t,i){"use strict";i.d(t,{i:function(){return m}});var r=i(77491),n=i(8138),o=i(51130);let s=e=>{if(e&&e.firstName&&e.lastName)return"".concat(null==e?void 0:e.firstName," ").concat(null==e?void 0:e.lastName)};var a=i(7963),l=i(98029),d=i(42564),c=i(54465),u=i(12173),x=i(75548);let p=(0,u.G)(),h=e=>(0,c.J)(p?x.v:x.B,{stripeAccount:e}),m=(e,t)=>{let{user:i}=(0,n.P)(),{me:c}=(0,o.p)(),u=(0,a.p)(),{mutate:x,isPending:p}=(0,l.D)({mutationFn:async()=>{var n;if(!e||!t)throw Error("productId or connectId is missing.");let o=await h(t);if(!o)return;let a=s(c);if(!a)throw Error("MeName is missing.");let l=await (0,d.q)(i),u=await (0,r.eA)(e,{Authorization:"Bearer ".concat(l)}),x=await o.confirmKonbiniPayment(u.clientSecret,{payment_method:{billing_details:{name:a,email:null!==(n=null==i?void 0:i.email)&&void 0!==n?n:""}}});if(x.error)throw x.error},onError:e=>{"MeName is missing."===e.message?u({title:"名前が未設定です",status:"error",description:"マイページから名前を設定してください"}):u({title:"予期せぬエラーが発生しました",status:"error"})}});return{isPending:p,confirmKonbiniPayment:x}}},76659:function(e,t,i){"use strict";i.d(t,{R:function(){return n}});var r=i(34416);let n=e=>!!e&&e.subscription.method===r.f_.CARD},98891:function(e,t,i){"use strict";i.d(t,{I:function(){return d}});var r=i(77491),n=i(78551),o=i(76659),s=i(70811),a=i(8138),l=i(42564);let d=()=>{let{subscriptionWithPlan:e}=(0,s.M)(),t=(0,o.R)(e),{user:i}=(0,a.P)(),{data:d,isFetching:c,isError:u}=(0,n.a)({queryKey:["/stripe"],queryFn:async()=>{let e=await (0,l.q)(i);return(0,r.BM)({Authorization:"Bearer ".concat(e)})},enabled:t&&!!i});return{stripePortal:d,isPortalLoading:c,isError:u}}},60466:function(e,t,i){"use strict";i.d(t,{$G:function(){return l},DO:function(){return o},aH:function(){return s},ci:function(){return a},jo:function(){return n},xA:function(){return d}});var r=i(16429);let n=async e=>(await r.L.get("/v1/users/me",{headers:e})).data,o=async(e,t)=>(await r.L.put("/v1/users/me",e,{headers:t})).data,s=async e=>(await r.L.get("/v1/users/me:getLoginCode",{headers:e})).data,a=async e=>await r.L.post("/v1/users/me:cancelCarrierSubscriptions",void 0,{headers:e}),l=async e=>await r.L.post("/v1/users/me:cancelVeritrans4gSubscriptions",void 0,{headers:e}),d=async e=>(await r.L.get("/v1/users/me/qrCode",{headers:e,responseType:"blob"})).data},32451:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSG:function(){return eh},default:function(){return em}});var r=i(85893),n=i(2962),o=i(67294),s=i(85827),a=i(32326),l=i(9421),d=i(97885),c=i(93717),u=i(22757),x=i(71293),p=i(70811),h=i(444),m=i(34416);let g=[m.f_.PREPAID,m.f_.KONBINI,m.f_.TRANSFER],f=()=>{let{subscriptionWithPlan:e,isLoading:t}=(0,p.M)();if(t||!e)return null;let i=e.subscription.method;return g.some(e=>e===i)?(0,h.N_)(e.subscription.endTime,"YYYY年MM月DD日"):null},b=()=>{let{subscriptionWithPlan:e,isLoading:t}=(0,p.M)();return{paymentMethodText:(0,o.useMemo)(()=>{if(t)return"";if(e)switch(e.subscription.method){case m.f_.CARD:return"クレジットカード";case m.f_.PREPAID:return"プリペイド決済";case m.f_.KONBINI:return"コンビニ決済";case m.f_.IAP:return"アプリ内決済";case m.f_.TRANSFER:return"現在の有効期限後にご登録ください";case m.f_.SOFTBANK:return"ソフトバンク";case m.f_.DOCOMO:return"docomo";case m.f_.AU:return"AU"}return"登録されていません"},[e,t])}},j=d.i.PAYMENT_BEGINNING_OF_MONTH,y=[m.f_.CARD,m.f_.IAP,m.f_.TRANSFER,m.f_.SOFTBANK,m.f_.DOCOMO,m.f_.AU],v=()=>{let{subscriptionWithPlan:e,isLoading:t}=(0,p.M)();if(t||!e)return null;let i=e.subscription.method;if(!y.some(e=>e===i))return null;let r=e.subscription.providerType===m.qb.TRANSFER;return(0,h.N_)(e.subscription.endTime+(j&&!r?-32401:0),"YYYY年MM月DD日")};var k=i(14701);let _=()=>{let{paymentMethodText:e}=b(),t=v(),i=(0,k.R)(),r=f(),n=[];return n.push({name:"決済内容",definition:e}),t&&n.push({name:"次のお支払い日",definition:t,isDisabled:!!i}),r&&n.push({name:"次のお支払い日",definition:r}),n};var S=i(14225),w=i(41664),P=i.n(w);let N=e=>{let{shouldWrap:t,href:i,children:n}=e;return t&&""!==i?(0,r.jsx)(P(),{passHref:!0,legacyBehavior:!0,href:i,children:n}):n};var C=i(391),L=i(98891),M=i(76659);let R=(e,t)=>{var i;let r="",n=!1,o=null!==(i=null==t?void 0:t.text)&&void 0!==i?i:"",s=null;switch(null==t?void 0:t.type){case"link":s={as:"a"},n=!0,r=t.href;break;case"button":s={isLoading:e,onClick:t.onClick}}return{buttonProps:s,text:o,shouldWrap:n,href:r}},W=(e,t)=>{let i=e.subscription.state,r="";switch(i){case m.jc.ACTIVE:r="お支払い方法を変更";break;case m.jc.PAST_DUE:r="お支払い方法を更新"}return{type:"link",href:null!=t?t:"",text:r}},I=()=>({type:"link",href:"/mypage/payment/addPrepaid",text:"追加する"}),T=e=>({type:"button",text:"追加する",onClick:()=>e}),E=e=>{let{subscriptionWithPlan:t,confirmKonbiniPayment:i,stripePortalUrl:r}=e;if(void 0===t)return{type:"link",href:d.i.SIGN_UP_FLOW.includes("plans")?"/mypage/payment/plans":"/mypage/payment/select",text:"お支払い方法を登録"};switch(t.subscription.method){case m.f_.CARD:return W(t,r);case m.f_.PREPAID:return I();case m.f_.KONBINI:return T(i)}return null},G=()=>{var e;let{subscriptionWithPlan:t,isLoading:i}=(0,p.M)(),{stripePortal:r,isPortalLoading:n}=(0,L.I)(),{isPending:o,confirmKonbiniPayment:s}=(0,C.i)(null==t?void 0:null===(e=t.subscriptionPlan)||void 0===e?void 0:e.konbiniPlanId),a=E({subscriptionWithPlan:t,confirmKonbiniPayment:s,stripePortalUrl:null==r?void 0:r.url});return null===a?null:R((0,M.R)(t)&&n||o||i,a)},D=()=>{let e=G();if(null===e)return null;let{buttonProps:t,text:i,shouldWrap:n,href:o}=e;return(0,r.jsx)(N,{shouldWrap:n,href:o,children:(0,r.jsx)(S.z,{colorScheme:"main",marginTop:"7",maxWidth:"64",width:"fit-content",transition:"0.5s",_hover:{opacity:.8},...t,children:i})})};var O=i(75166);let B=()=>{let{subscriptionWithPlan:e}=(0,p.M)(),t=(0,k.R)(),i="";if(e){let t=(0,O.W)(e.subscription.endTime);i="決済の更新期限は".concat(t,"までです。")}return{isPastDue:t,message:i}},z=()=>{let{isPastDue:e,message:t}=B();return e?(0,r.jsxs)(c.k,{color:"red.500",marginTop:"20px",fontSize:"14px",flexWrap:"wrap",children:[(0,r.jsx)(x.x,{children:"お支払い方法に問題があったためプランの更新に失敗しました。"}),(0,r.jsx)(x.x,{children:t})]}):null},A=()=>{let e=_();return(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(u.X,{as:"h3",fontSize:"14px",color:"textMain",children:"お支払い方法"}),(0,r.jsxs)(c.k,{align:"center",backgroundColor:"backgroundBasecolor",borderRadius:"7px",direction:"column",padding:["24px 20px 40px","35px 60px"],width:"100%",children:[(0,r.jsx)(c.k,{width:"full",backgroundColor:"white",border:"1px solid #eee",flexDirection:"column",fontSize:"14px",gridGap:"24px",marginTop:"6px",minHeight:["142px","166px"],padding:["24px 16px","36px 30px"],rounded:"4px",children:e.map(e=>(0,r.jsxs)(c.k,{color:e.isDisabled?"textGrey":"textMain",align:"center",borderBottom:"1px solid #ddd",justify:"space-between",paddingBottom:"12px",children:[(0,r.jsx)(x.x,{children:e.name}),(0,r.jsx)(x.x,{children:e.definition})]},e.name))}),(0,r.jsx)(z,{}),(0,r.jsx)(D,{})]})]})};var H=i(96854);let F=e=>{var t,i;let{subscriptionWithPlan:r,isLoading:n}=(0,p.M)(),o=(null==r?void 0:null===(t=r.subscription)||void 0===t?void 0:t.method)===m.f_.CARD,s=(null==r?void 0:null===(i=r.subscription)||void 0===i?void 0:i.state)===m.jc.ACTIVE,a=e&&e.items.length>1;return{canUpgrade:o&&s&&a,isLoading:n}},U=e=>{var t,i;let{subscriptionPlans:n}=e,{subscriptionWithPlan:o,isLoading:s}=(0,p.M)(),{canUpgrade:a}=F(n);return d.i.SIGN_UP_FLOW.includes("plans")?(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(u.X,{as:"h3",fontSize:"14px",color:"textMain",children:"プラン内容"}),(0,r.jsxs)(c.k,{align:"center",background:"backgroundBasecolor",borderRadius:"7px",flexDirection:"column",gridGap:"29px",padding:["26px 18px 41px","36px 60px 33px"],children:[(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"8px",width:"full",children:[(0,r.jsx)(x.x,{fontSize:"14px",color:"textMain",children:"サービスプラン"}),(0,r.jsx)(H.O,{isLoaded:!s,borderRadius:"4px",children:(0,r.jsx)(x.x,{background:"white",border:"2px solid",borderColor:"main.500",borderRadius:"4px",fontSize:"15px",fontWeight:"bold",lineHeight:"56px",height:"56px",padding:"0 20px",width:"100%",children:null!==(i=null==o?void 0:null===(t=o.subscriptionPlan)||void 0===t?void 0:t.membershipName)&&void 0!==i?i:"登録されていません"})})]}),a&&(0,r.jsx)(P(),{passHref:!0,legacyBehavior:!0,href:"payment/plans/upgrade",children:(0,r.jsx)(S.z,{as:"a",colorScheme:"main",maxWidth:"64",width:"fit-content",transition:"0.5s",_hover:{opacity:.8},children:(0,r.jsx)(x.x,{variant:"btnJp",children:"プランを変更する"})})})]})]}):null};var Y=i(1914);let X=e=>{let{subscriptionPlans:t}=e;return(0,r.jsx)(Y.H,{children:(0,r.jsxs)(c.k,{direction:"column",children:[(0,r.jsx)(u.X,{as:"h1",borderBottom:"1px solid",borderColor:"border",color:"textMain",fontWeight:"bold",fontSize:"22px",paddingBottom:"20px",children:d.i.SIGN_UP_FLOW.includes("plans")?"プラン・お支払い方法":"お支払い方法"}),(0,r.jsxs)(c.k,{gridGap:"45px",flexDirection:"column",marginTop:"21px",children:[(0,r.jsx)(U,{subscriptionPlans:t}),(0,r.jsx)(A,{})]})]})})};var K=i(46899);let q=()=>{let e=G();if(null===e)return null;let{buttonProps:t,text:i,shouldWrap:n,href:o}=e;return(0,r.jsx)(N,{shouldWrap:n,href:o,children:(0,r.jsx)(S.z,{background:"main.500",height:"48px",minWidth:"150px",transition:"0.5s",variant:"solid",width:"fit-content",_hover:{opacity:.8},...t,children:(0,r.jsx)(x.x,{color:"white",variant:"btnJp",children:i})})})},Q=()=>{let{isPastDue:e,message:t}=B();return e?(0,r.jsxs)(c.k,{color:"red.500",marginTop:"20px",fontSize:"14px",flexWrap:"wrap",children:[(0,r.jsx)(x.x,{children:"お支払い方法に問題があったためプランの更新に失敗しました。"}),(0,r.jsx)(x.x,{children:t})]}):null},V=()=>{let e=_();return(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"8px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textMain",variant:"small",children:"お支払い方法"}),(0,r.jsxs)(c.k,{align:"center",backgroundColor:"backgroundLight2",borderRadius:"2px",direction:"column",gridGap:"25px",padding:["30px 18px","57px 60px 30px"],children:[(0,r.jsx)(c.k,{backgroundColor:"backgroundMain",borderRadius:"4px",flexDirection:"column",fontSize:"14px",gridGap:"24px",marginTop:"6px",minHeight:["142px","166px"],padding:["24px 18px 26px","28px 30px 39px"],width:"100%",children:e.map(e=>(0,r.jsxs)(c.k,{alignItems:"center",borderBottom:"1px solid",borderColor:"borderMain",color:e.isDisabled?"textGrey":"textMain",justify:"space-between",paddingBottom:"18px",children:[(0,r.jsx)(x.x,{variant:"small",children:e.name}),(0,r.jsx)(x.x,{variant:"small",children:e.definition})]},e.name))}),(0,r.jsx)(Q,{}),(0,r.jsx)(q,{})]})]})},J=e=>{var t,i;let{subscriptionPlans:n}=e,{subscriptionWithPlan:o,isLoading:s}=(0,p.M)(),{canUpgrade:a}=F(n);return d.i.SIGN_UP_FLOW.includes("plans")?(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"8px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textMain",variant:"small",children:"プラン内容"}),(0,r.jsxs)(c.k,{background:"backgroundBasecolor",borderRadius:"2px",flexDirection:"column",gridGap:"25px",padding:["26px 18px 41px","36px 60px 33px"],children:[(0,r.jsx)(H.O,{isLoaded:!s,borderRadius:"4px",children:(0,r.jsx)(x.x,{background:"white",border:"2px solid",borderColor:"main.500",borderRadius:"4px",color:"textMain",height:"56px",lineHeight:"56px",padding:"0 20px",variant:"h4",width:"100%",children:null!==(i=null==o?void 0:null===(t=o.subscriptionPlan)||void 0===t?void 0:t.membershipName)&&void 0!==i?i:"登録されていません"})}),a&&(0,r.jsx)(P(),{passHref:!0,legacyBehavior:!0,href:"payment/plans/upgrade",children:(0,r.jsx)(S.z,{as:"a",margin:"0 auto",height:"48px",width:"fit-content",background:"main.500",borderRadius:"48px",color:"textQuinary",minWidth:"150px",transition:"0.5s",_hover:{opacity:.8},children:(0,r.jsx)(x.x,{color:"white",variant:"btnJp",children:"プランを変更する"})})})]})]}):null},Z=e=>{let{subscriptionPlans:t}=e;return(0,r.jsx)(K.w,{children:(0,r.jsxs)(c.k,{direction:"column",margin:"auto",maxWidth:"720px",children:[(0,r.jsx)(x.x,{as:"h1",borderBottom:"1px solid",borderColor:"borderMain",color:"textMain",paddingBottom:["15px","50px"],variant:"h2",children:d.i.SIGN_UP_FLOW.includes("plans")?"プラン・お支払い方法":"お支払い方法"}),(0,r.jsxs)(c.k,{gridGap:"45px",flexDirection:"column",marginTop:"21px",children:[(0,r.jsx)(J,{subscriptionPlans:t}),(0,r.jsx)(V,{})]})]})})};var $=i(38990);let ee=()=>{let e=G();if(null===e)return null;let{buttonProps:t,text:i,shouldWrap:n,href:o}=e;return(0,r.jsx)(N,{shouldWrap:n,href:o,children:(0,r.jsx)(S.z,{background:"primary",borderRadius:"50px",color:"textQuinary",marginTop:["36px","28px"],minWidth:"140px",padding:"0 20px",transition:"0.5s",_hover:{opacity:.8},...t,children:(0,r.jsx)(x.x,{color:"textQuinary",fontSize:"16px",fontWeight:"bold",letterSpacing:"0.1em",lineHeight:"17px",children:i})})})},et=()=>{let{isPastDue:e,message:t}=B();return e?(0,r.jsxs)(c.k,{color:"textTertiary",marginTop:"20px",fontSize:"14px",flexWrap:"wrap",children:[(0,r.jsx)(x.x,{children:"お支払い方法に問題があったためプランの更新に失敗しました。"}),(0,r.jsx)(x.x,{children:t})]}):null},ei=()=>{let e=_();return(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textPrimaryBgNon",fontSize:"15px",fontWeight:"bold",letterSpacing:"0.1em",lineHeight:"17px",children:"お支払い方法"}),(0,r.jsxs)(c.k,{align:"center",backgroundColor:"backgroundSecondary",borderRadius:"7px",direction:"column",padding:["24px 20px 40px","35px 60px"],width:"100%",children:[(0,r.jsx)(c.k,{width:"full",backgroundColor:"backgroundQuaternary",flexDirection:"column",fontSize:"14px",gridGap:"24px",marginTop:"6px",minHeight:["142px","166px"],padding:["24px 16px","36px 30px"],rounded:"4px",children:e.map(e=>(0,r.jsxs)(c.k,{color:e.isDisabled?"textSecondary":"textPrimary",alignItems:"center",borderBottom:"1px solid",borderColor:"textSecondary",justifyContent:"space-between",paddingBottom:"12px",children:[(0,r.jsx)(x.x,{fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:e.name}),(0,r.jsx)(x.x,{fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:e.definition})]},e.name))}),(0,r.jsx)(et,{}),(0,r.jsx)(ee,{})]})]})},er=e=>{var t,i,n,o;let{subscriptionPlans:s}=e,{subscriptionWithPlan:a,isLoading:l}=(0,p.M)(),{canUpgrade:u}=F(s);return d.i.SIGN_UP_FLOW.includes("plans")?(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textPrimaryBgNon",fontSize:"15px",fontWeight:"bold",letterSpacing:"0.1em",lineHeight:"17px",children:"プラン内容"}),(0,r.jsxs)(c.k,{align:"center",background:"backgroundSecondary",borderRadius:"7px",flexDirection:"column",gridGap:"29px",padding:["26px 18px 41px","36px 60px 33px"],children:[(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"8px",width:"full",children:[(0,r.jsx)(x.x,{color:"textPrimary",fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:"サービスプラン"}),(0,r.jsx)(H.O,{isLoaded:!l,borderRadius:"4px",height:"56px",children:(0,r.jsxs)(x.x,{as:"div",display:"flex",justifyContent:"space-between",background:"backgroundQuaternary",border:"2px solid",borderColor:"primary",borderRadius:"4px",color:"textPrimary",lineHeight:"56px",padding:"0 20px",fontSize:"15px",fontWeight:"bold",letterSpacing:"0.1em",width:"100%",children:[(0,r.jsx)(x.x,{children:null!==(n=null==a?void 0:null===(t=a.subscriptionPlan)||void 0===t?void 0:t.membershipName)&&void 0!==n?n:"登録されていません"}),(0,r.jsx)(x.x,{children:null!==(o=null==a?void 0:null===(i=a.subscriptionPlan)||void 0===i?void 0:i.description)&&void 0!==o?o:""})]})})]}),u&&(0,r.jsx)(P(),{passHref:!0,legacyBehavior:!0,href:"payment/plans/upgrade",children:(0,r.jsx)(S.z,{as:"a",background:"primary",borderRadius:"50px",color:"textQuinary",marginTop:["10px","3px"],minWidth:"140px",padding:"0 20px",transition:"0.5s",_hover:{opacity:.8},children:(0,r.jsx)(x.x,{fontSize:"16px",fontWeight:"700",letterSpacing:"0.1em",lineHeight:"17px",color:"textQuinary",children:"プランを変更する"})})})]})]}):null};var en=i(76737);let eo=e=>{let{subscriptionPlans:t}=e;return(0,r.jsx)(en.I,{children:(0,r.jsxs)(c.k,{direction:"column",children:[(0,r.jsx)(x.x,{as:"h1",borderBottom:"1px solid",borderColor:"borderPrimary",color:"titlePrimary",paddingBottom:"20px",fontSize:"26px",fontWeight:"bold",letterSpacing:"0.05em",lineHeight:"31px",children:d.i.SIGN_UP_FLOW.includes("plans")?"プラン・お支払い方法":"お支払い方法"}),(0,r.jsxs)(c.k,{gridGap:"45px",flexDirection:"column",marginTop:"21px",children:[(0,r.jsx)(er,{subscriptionPlans:t}),(0,r.jsx)(ei,{})]})]})})};var es=i(31054),ea=i(39057),el=i(36553);let ed=e=>{var t,i,n,o;let{subscriptionPlans:s}=e,{subscriptionWithPlan:a,isLoading:l}=(0,p.M)(),{canUpgrade:u}=F(s);return d.i.SIGN_UP_FLOW.includes("plans")?(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textPrimaryBgNon",fontSize:"15px",letterSpacing:"0.1em",lineHeight:"17px",children:"プラン内容"}),(0,r.jsxs)(c.k,{align:"center",background:"backgroundSecondary",borderRadius:"7px",flexDirection:"column",gridGap:["50px","29px"],padding:["26px 18px 41px","36px 60px 33px"],children:[(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"8px",width:"full",children:[(0,r.jsx)(x.x,{color:"textPrimary",fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:"サービスプラン"}),(0,r.jsx)(H.O,{isLoaded:!l,borderRadius:"4px",height:"56px",children:(0,r.jsxs)(c.k,{justifyContent:"flex-start",wrap:"wrap",background:"backgroundQuaternary",border:"2px solid",borderColor:"themePrimary",borderRadius:"4px",color:"textPrimary",padding:"18px 20px",fontSize:"15px",fontWeight:"bold",letterSpacing:"0.1em",width:"100%",lineHeight:"normal",children:[(0,r.jsx)(x.x,{marginRight:"100px",children:null!==(n=null==a?void 0:null===(t=a.subscriptionPlan)||void 0===t?void 0:t.membershipName)&&void 0!==n?n:"登録されていません"}),(0,r.jsx)(x.x,{color:"themePrimary",children:null!==(o=null==a?void 0:null===(i=a.subscriptionPlan)||void 0===i?void 0:i.description)&&void 0!==o?o:""})]})})]}),u&&(0,r.jsx)(P(),{passHref:!0,legacyBehavior:!0,href:"payment/plans/upgrade",children:(0,r.jsx)(el.X,{text:"プランを変更する",type:"button",maxWidth:"300px",color:"textPrimary",background:"themePrimary"})})]})]}):null},ec=()=>{let e=G();if(null===e)return null;let{buttonProps:t,text:i,shouldWrap:n,href:o}=e;return(0,r.jsx)(N,{shouldWrap:n,href:o,children:(0,r.jsx)(el.X,{text:i,maxWidth:"300px",color:"textPrimary",background:"themePrimary",isLoading:null==t?void 0:t.isLoading,onClick:null==t?void 0:t.onClick})})},eu=()=>{let{isPastDue:e,message:t}=B();return e?(0,r.jsxs)(c.k,{color:"textTertiary",marginTop:"20px",fontSize:"14px",flexWrap:"wrap",children:[(0,r.jsx)(x.x,{children:"お支払い方法に問題があったためプランの更新に失敗しました。"}),(0,r.jsx)(x.x,{children:t})]}):null},ex=()=>{let e=_();return(0,r.jsxs)(c.k,{flexDirection:"column",gridGap:"13px",children:[(0,r.jsx)(x.x,{as:"h2",color:"textPrimaryBgNon",fontSize:"15px",letterSpacing:"0.1em",lineHeight:"17px",children:"お支払い方法"}),(0,r.jsxs)(c.k,{align:"center",backgroundColor:"backgroundSecondary",borderRadius:"7px",direction:"column",padding:["24px 20px 40px","35px 60px"],width:"100%",gridGap:"29px",children:[(0,r.jsx)(c.k,{width:"full",backgroundColor:"backgroundQuaternary",flexDirection:"column",fontSize:"14px",gridGap:"24px",marginTop:"6px",minHeight:["142px","166px"],padding:["24px 16px","36px 30px"],rounded:"4px",children:e.map(e=>(0,r.jsxs)(c.k,{color:e.isDisabled?"textSecondary":"textPrimary",alignItems:"center",borderBottom:"1px solid",borderColor:"borderPrimary",justifyContent:"space-between",paddingBottom:"12px",children:[(0,r.jsx)(x.x,{fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:e.name}),(0,r.jsx)(x.x,{fontSize:"14px",fontWeight:"500",letterSpacing:"0.06em",lineHeight:"19px",children:e.definition})]},e.name))}),(0,r.jsx)(eu,{}),(0,r.jsx)(ec,{})]})]})},ep=e=>{let{subscriptionPlans:t}=e;return(0,r.jsx)(ea.r,{children:(0,r.jsxs)(c.k,{direction:"column",children:[(0,r.jsx)(x.x,{as:"h1",textAlign:"center",borderBottom:"1px solid",borderColor:"borderPrimary",color:"textPrimaryBgNon",paddingBottom:["33px","39px"],variant:["pageTopSp","pageTopPc"],children:d.i.SIGN_UP_FLOW.includes("plans")?"プラン・お支払い方法":"お支払い方法"}),(0,r.jsxs)(c.k,{gridGap:"45px",flexDirection:"column",marginTop:"21px",children:[(0,r.jsx)(ed,{subscriptionPlans:t}),(0,r.jsx)(ex,{})]})]})})};var eh=!0,em=e=>{let{ogImage:t,subscriptionPlans:i,layoutContents:o}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.PB,{title:d.i.SERVICE_NAME,description:d.i.DESCRIPTION,openGraph:{title:"".concat(d.i.SERVICE_NAME),images:[{url:t,width:1200,height:630,alt:"".concat(d.i.SERVICE_NAME)}]}}),d.i.DESIGN_TYPE===l.Z.TYPE_A&&(0,r.jsx)(s.T,{children:(0,r.jsx)(X,{subscriptionPlans:i})}),d.i.DESIGN_TYPE===l.Z.TYPE_A_EX&&(0,r.jsx)($.M,{children:(0,r.jsx)(eo,{subscriptionPlans:i})}),d.i.DESIGN_TYPE===l.Z.TYPE_B&&(0,r.jsx)(a.R,{children:(0,r.jsx)(Z,{subscriptionPlans:i})}),d.i.DESIGN_TYPE===l.Z.TYPE_C&&(0,r.jsx)(es.q,{layoutContents:o,children:(0,r.jsx)(ep,{subscriptionPlans:i})})]})}},33951:function(e,t,i){"use strict";i.d(t,{XQ:function(){return n}});var r=i(25432);function n(e,t){return Array.isArray(e)?e.map(e=>null===e?null:t(e)):(0,r.Kn)(e)?Object.keys(e).reduce((i,r)=>(i[r]=t(e[r]),i),{}):null!=e?t(e):null}Object.freeze(["base","sm","md","lg","xl","2xl"])},6089:function(e,t,i){"use strict";i.d(t,{E:function(){return c}});var r=i(16554),n=i(85893),o=(0,r.G)(function(e,t){let{htmlWidth:i,htmlHeight:r,alt:o,...s}=e;return(0,n.jsx)("img",{width:i,height:r,ref:t,alt:o,...s})});o.displayName="NativeImage";var s=i(26245),a=i(67294),l=(e,t)=>"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t,d=i(16914),c=(0,r.G)(function(e,t){let{fallbackSrc:i,fallback:r,src:c,srcSet:u,align:x,fit:p,loading:h,ignoreFallback:m,crossOrigin:g,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:b,...j}=e,y=void 0!==i||void 0!==r,v=null!=h||m||!y,k=l(function(e){let{loading:t,src:i,srcSet:r,onLoad:n,onError:o,crossOrigin:l,sizes:d,ignoreFallback:c}=e,[u,x]=(0,a.useState)("pending");(0,a.useEffect)(()=>{x(i?"loading":"pending")},[i]);let p=(0,a.useRef)(),h=(0,a.useCallback)(()=>{if(!i)return;m();let e=new Image;e.src=i,l&&(e.crossOrigin=l),r&&(e.srcset=r),d&&(e.sizes=d),t&&(e.loading=t),e.onload=e=>{m(),x("loaded"),null==n||n(e)},e.onerror=e=>{m(),x("failed"),null==o||o(e)},p.current=e},[i,l,r,d,n,o,t]),m=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return(0,s.G)(()=>{if(!c)return"loading"===u&&h(),()=>{m()}},[u,h,c]),c?"loaded":u}({...e,crossOrigin:g,ignoreFallback:v}),f),_={ref:t,objectFit:p,objectPosition:x,...v?j:function(e,t=[]){let i=Object.assign({},e);for(let e of t)e in i&&delete i[e];return i}(j,["onError","onLoad"])};return k?r||(0,n.jsx)(d.m.img,{as:o,className:"chakra-image__placeholder",src:i,..._}):(0,n.jsx)(d.m.img,{as:o,src:c,srcSet:u,crossOrigin:g,loading:h,referrerPolicy:b,className:"chakra-image",..._})});c.displayName="Image"},73804:function(e,t,i){"use strict";i.d(t,{GS:function(){return h},HC:function(){return g},QI:function(){return m},aV:function(){return p}});var r=i(36948),n=i(55227),o=i(92495),s=i(16554),a=i(77030),l=i(33179),d=i(16914),c=i(85893),[u,x]=(0,n.k)({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<List />\" "}),p=(0,s.G)(function(e,t){let i=(0,a.jC)("List",e),{children:r,styleType:n="none",stylePosition:s,spacing:x,...p}=(0,l.Lr)(e),h=(0,o.W)(r);return(0,c.jsx)(u,{value:i,children:(0,c.jsx)(d.m.ul,{ref:t,listStyleType:n,listStylePosition:s,role:"list",__css:{...i.container,...x?{"& > *:not(style) ~ *:not(style)":{mt:x}}:{}},...p,children:h})})});p.displayName="List";var h=(0,s.G)((e,t)=>{let{as:i,...r}=e;return(0,c.jsx)(p,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});h.displayName="OrderedList";var m=(0,s.G)(function(e,t){let{as:i,...r}=e;return(0,c.jsx)(p,{ref:t,as:"ul",styleType:"initial",marginStart:"1em",...r})});m.displayName="UnorderedList";var g=(0,s.G)(function(e,t){let i=x();return(0,c.jsx)(d.m.li,{ref:t,...e,__css:i.item})});g.displayName="ListItem",(0,s.G)(function(e,t){let i=x();return(0,c.jsx)(r.J,{ref:t,role:"presentation",...e,__css:i.icon})}).displayName="ListIcon"},22757:function(e,t,i){"use strict";i.d(t,{X:function(){return d}});var r=i(16554),n=i(77030),o=i(33179),s=i(16914),a=i(25432),l=i(85893),d=(0,r.G)(function(e,t){let i=(0,n.mq)("Heading",e),{className:r,...d}=(0,o.Lr)(e);return(0,l.jsx)(s.m.h2,{ref:t,className:(0,a.cx)("chakra-heading",e.className),...d,__css:i})});d.displayName="Heading"},55281:function(e,t,i){"use strict";i.d(t,{K:function(){return u}});var r=i(16914),n=i(85893),o=e=>(0,n.jsx)(r.m.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});o.displayName="StackItem";var s=i(33951),a=i(92495),l=i(25432),d=i(16554),c=i(67294),u=(0,d.G)((e,t)=>{let{isInline:i,direction:d,align:u,justify:x,spacing:p="0.5rem",wrap:h,children:m,divider:g,className:f,shouldWrapChildren:b,...j}=e,y=i?"row":null!=d?d:"column",v=(0,c.useMemo)(()=>(function(e){let{spacing:t,direction:i}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":(0,s.XQ)(i,e=>r[e])}})({spacing:p,direction:y}),[p,y]),k=!!g,_=!b&&!k,S=(0,c.useMemo)(()=>{let e=(0,a.W)(m);return _?e:e.map((t,i)=>{let r=void 0!==t.key?t.key:i,s=i+1===e.length,a=(0,n.jsx)(o,{children:t},r),l=b?a:t;if(!k)return l;let d=(0,c.cloneElement)(g,{__css:v});return(0,n.jsxs)(c.Fragment,{children:[l,s?null:d]},r)})},[g,v,k,_,b,m]),w=(0,l.cx)("chakra-stack",f);return(0,n.jsx)(r.m.div,{ref:t,display:"flex",alignItems:u,justifyContent:x,flexDirection:y,flexWrap:h,gap:k?void 0:p,className:w,...j,children:S})});u.displayName="Stack"},64859:function(e,t,i){"use strict";i.d(t,{x:function(){return d}});var r=i(35541),n=i(25432),o=i(16554),s=i(16914),a=i(67294),l=i(85893),d=(0,o.G)((e,t)=>{let{className:i,...o}=e,{headerId:d,setHeaderMounted:c}=(0,r.vR)();(0,a.useEffect)(()=>(c(!0),()=>c(!1)),[c]);let u=(0,n.cx)("chakra-modal__header",i),x={flex:0,...(0,r.I_)().header};return(0,l.jsx)(s.m.header,{ref:t,className:u,id:d,...o,__css:x})});d.displayName="ModalHeader"},92495:function(e,t,i){"use strict";i.d(t,{W:function(){return n}});var r=i(67294);function n(e){return r.Children.toArray(e).filter(e=>(0,r.isValidElement)(e))}},7963:function(e,t,i){"use strict";i.d(t,{p:function(){return a}});var r=i(21089),n=i(57402),o=i(7634),s=i(67294);function a(e){let{theme:t}=(0,o.uP)(),i=(0,r.OX)();return(0,s.useMemo)(()=>(0,n.Cj)(t.direction,{...i,...e}),[e,t.direction,i])}},98029:function(e,t,i){"use strict";i.d(t,{D:function(){return u}});var r=i(67294),n=i(59289),o=i(27037),s=i(7506),a=i(24139),l=class extends s.l{#e;#t=void 0;#i;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(t.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#n(),this.#o()}mutate(e,t){return this.#r=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#n(){let e=this.#i?.state??(0,n.R)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.V.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context;e?.type==="success"?(this.#r.onSuccess?.(e.data,t,i),this.#r.onSettled?.(e.data,null,t,i)):e?.type==="error"&&(this.#r.onError?.(e.error,t,i),this.#r.onSettled?.(void 0,e.error,t,i))}this.listeners.forEach(e=>{e(this.#t)})})}},d=i(30202),c=i(86290);function u(e,t){let i=(0,d.NL)(t),[n]=r.useState(()=>new l(i,e));r.useEffect(()=>{n.setOptions(e)},[n,e]);let s=r.useSyncExternalStore(r.useCallback(e=>n.subscribe(o.V.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=r.useCallback((e,t)=>{n.mutate(e,t).catch(c.Z)},[n]);if(s.error&&(0,c.L)(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}}},function(e){e.O(0,[2962,7066,8551,5626,932,5906,8990,2565,7847,2888,9774,179],function(){return e(e.s=58156)}),_N_E=e.O()}]);