PageSourceSearch

https://pivotmedia.co.jp/_next/static/chunks/pages/auth/sign_in-1f222ab4c25c517d.js

js pivotmedia.co.jp collected 2026-09-24 17:49:49 UTC 8,918 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5008],{1343:(e,n,s)=>{"use strict";s.d(n,{l:()=>r});let r=e=>{i(e)&&window.open(e,"_blank","noopener,noreferrer")},i=e=>{try{let n=new URL(e);return"https:"===n.protocol}catch(e){return!1}}},27022:(e,n,s)=>{"use strict";s.d(n,{BZ:()=>i,ue:()=>r});let r="https://pivot.go.link/?adj_t=1agt4bkx",i=e=>{let{episodeId:n,userId:s,firstAccessTime:r,referer:i,adjustDeeplinkToken:a="1ggyuata",displayType:t,tab:l,tagCode:o}=e,c=new URLSearchParams;return void 0!==s&&c.append("user_id",s.toString()),void 0!==r&&c.append("first_access_time",r.toISOString()),void 0!==i&&c.append("referer",i),void 0!==t&&c.append("display_type",t),void 0!==l&&c.append("tab",l),void 0!==o&&"recommended"!==o&&c.append("tag_code",o),c.append("adj_t",a),"https://4x9f.adj.st/episode_id=".concat(n,"?").concat(c.toString())}},32864:(e,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/sign_in",function(){return s(48871)}])},48871:(e,n,s)=>{"use strict";s.r(n),s.d(n,{SignInPage:()=>G,__N_SSP:()=>X,default:()=>Z});var r=s(37876),i=s(71265),a=s(5746),t=s(95848),l=s(45868),o=s(29910),c=s(74859),d=s(83258),u=s(63372),p=s(5279),h=s(36040),g=s(99553);let m=async e=>{let{transactionId:n,provider:s,nonce:r}=e;return await g.nr.oidcLogin({oidcTransactionId:n,provider:(0,h.wO)(s),nonce:r,clientType:p.o})};var x=s(80191),w=s(40813),v=s(83665),j=s(27022),f=s(26703),k=s(29137),_=s(81641),N=s(1343),T=s(81673),y=s(633),S=s(55610),C=s(14232),I=s(43724),R=s(72509),E=s(93282),P=s(13809),b=s(48872),A=s(33296),B=s(14070),O=s(13810),L=s(88992),M=s(60513);let $=M.z.object({email:M.z.string().trim().min(1,{message:"メールアドレスを入力してください。"}),password:M.z.string().min(1,{message:"パスワードを入力してください。"})}),z=e=>{let{linkToSignUp:n,linkToForgotPassword:s,errorMessage:i,onSignInWithEmail:a,onSignInWithOidc:t,onClickViewInApp:c}=e,[d,u]=(0,C.useState)(!1);return(0,r.jsxs)(o.B,{spacing:"2xl",align:"center",children:[(0,r.jsx)(l.D,{size:"M",children:"ログイン"}),i&&(0,r.jsx)(I.Fc,{messageType:"alert",children:i}),d?(0,r.jsx)(D,{linkToForgotPassword:s,onSubmit:a}):(0,r.jsx)(F,{onSelect:e=>{switch(e){case"email":u(!0);return;case"google":t("google");return;case"apple":t("apple");return;default:(0,f.x)(e)}},linkToSignUp:n,onClickViewInApp:c})]})},F=e=>{let{onSelect:n,linkToSignUp:s,onClickViewInApp:i}=e,{isSp:t}=(0,B.P)();return(0,r.jsxs)(o.B,{spacing:"xl",children:[(0,r.jsx)(a.$,{variant:"secondary",icon:(0,r.jsx)(A.A,{}),onClick:()=>n("email"),children:"メールアドレスで続ける"}),(0,r.jsxs)(o.B,{spacing:"md",children:[(0,r.jsx)(R.c,{text:"他サービスでログイン"}),!t&&(0,r.jsx)(c.E,{size:"S",className:"tw-text-neutral-pale",children:"すでにメールアドレスで登録済みの方は、アカウントページで他サービスのアカウントを紐づけることで、次回からログインが可能です。"}),(0,r.jsx)(a.$,{variant:"secondary",icon:(0,r.jsx)(b.A,{}),onClick:()=>n("google"),children:"Googleでログイン"}),(0,r.jsx)(a.$,{variant:"secondary",icon:(0,r.jsx)(P.A,{}),onClick:()=>n("apple"),children:"Appleでログイン"})]}),(0,r.jsxs)(o.B,{spacing:"md",children:[(0,r.jsx)(R.c,{text:"アカウントをお持ちでない方",className:"tw-mt-3"}),(0,r.jsx)(a.$,{variant:"link",href:s,className:"tw-font-semibold",children:"新規登録"})]}),t&&(0,r.jsx)(a.$,{variant:"primary",className:"tw-mx-auto tw-mt-3 tw-w-80",onClick:i,children:"アプリで開く"})]})},D=e=>{var n,s;let{onSubmit:i,linkToForgotPassword:t}=e,{register:l,handleSubmit:c,formState:{errors:d,isValid:u,isSubmitting:p}}=(0,L.mN)({mode:"onChange",resolver:(0,O.u)($),defaultValues:{}});return(0,r.jsxs)(o.B,{spacing:"2xl",align:"center",children:[(0,r.jsxs)(o.B,{spacing:"xl",children:[(0,r.jsx)(E.p,{id:"email",label:"メールアドレス",...l("email"),isError:!!d.email,errorMessage:null==(n=d.email)?void 0:n.message}),(0,r.jsx)(E.p,{id:"password",label:"パスワード",type:"password",...l("password"),isError:!!d.password,errorMessage:null==(s=d.password)?void 0:s.message})]}),(0,r.jsxs)(o.B,{spacing:"md",children:[(0,r.jsx)(a.$,{variant:"primary",onClick:c(i),disabled:!u||p,children:"ログイン"}),(0,r.jsx)(a.$,{variant:"white-link",href:t,children:"パスワードをお忘れですか?"})]})]})},U=e=>{let{signInContextParams:{originalPath:n}={}
1,oidcParams:s,oidcErrorCode:i,onCompleteSignInWithEmail:p,onCompleteSignInWithOidc:h}=e,[g,I]=(0,C.useState)(),{setUserSession:R}=(0,v.Z2)(),E=(0,t.bP)(),P=(0,y.t)(x.hG,{defaultValue:void 0}),b=async e=>{var n,s;let{data:r,error:i}=await (0,d.l4)({emailAddress:e.email,password:e.password});if(i)return void I(i.message);let a=null==r?void 0:r.auth;if(null==a||!a.accessToken||!a.refreshToken)return void I("ログイン処理中にエラーが発生しました。");await R({accessToken:a.accessToken,refreshToken:a.refreshToken,anonymousToken:a.anonymousToken});let t=null!=(s=null==(n=r.user)?void 0:n.id)?s:"";_.h.sendLogin({userId:Number(t),authServiceName:"email"}),await (null==p?void 0:p())},A=async e=>{try{let{oidcAuthPath:s}=(0,w.RN)({provider:e,intent:"login",successRedirectPath:"/auth/sign_in",failureRedirectPath:"/auth/sign_in"});P.set({provider:e,redirectPath:null!=n?n:"/"}),location.assign(s)}catch(e){I((0,k.A)(e).message);return}},B=(0,C.useRef)(!1);return(0,S.u)(()=>{(async()=>{if(B.current)return;if(B.current=!0,i)switch(i){case"EXPIRED_TRANSACTION":return I("セッションが無効です。再度お試しください。");case"INTERNAL_SERVER_ERROR":return I("サーバーエラーが発生しました。時間を空けてから再度お試しください。");default:return(0,f.x)(i)}if(!s.isRedirected)return;if(void 0===P.value)return I("エラーが発生しました。再度お試しください。");let{provider:e,transactionId:n,nonce:r,redirectPath:a}=P.value;if(void 0===n||void 0===r||s.transactionId!==n)return I("エラーが発生しました。再度お試しください。");try{var t,l;let s=await m({transactionId:n,provider:e,nonce:r}),i=s.auth;if((null==i?void 0:i.accessToken)&&i.refreshToken)await R({accessToken:i.accessToken,refreshToken:i.refreshToken,anonymousToken:i.anonymousToken});else throw console.error("Failed to complete OIDC sign in: missing tokens",s),Error("ログイン処理に失敗しました。再度お試しください。");let o=null!=(l=null==(t=s.user)?void 0:t.id)?l:"";_.h.sendLogin({userId:Number(o),authServiceName:e}),P.remove(),await (null==h?void 0:h({redirectPath:null!=a?a:"/"}))}catch(e){(0,u.Iq)(e)&&e.code===T.C.NotFound&&null!==e.userMessage&&e.userMessage.includes("登録されていません")&&E.open(),I((0,u.Bf)(e,"エラーが発生しました。再度お試しください。"))}})()}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{onSignInWithEmail:b,onSignInWithOidc:A,linkToSignUp:"/auth/sign_up?original_path=".concat(encodeURIComponent(null!=n?n:"/")),linkToForgotPassword:"/auth/password_reset",errorMessage:g,onClickViewInApp:()=>{(0,N.l)(j.ue),_.h.sendClickAppInstallLink({screenName:"sign_in",positionName:"sign_in"})}}),(0,r.jsx)(t.lG,{...E,children:(0,r.jsx)(t.Cf,{children:(0,r.jsxs)(o.B,{spacing:"2xl",align:"center",paddingX:"3xl",paddingY:"md",children:[(0,r.jsx)(t.L3,{asChild:!0,children:(0,r.jsx)(l.D,{as:"h2",size:"2L",align:"center",children:"指定された外部のアカウントは連携されておりません"})}),(0,r.jsx)(t.rr,{asChild:!0,children:(0,r.jsx)(c.E,{size:"M",align:"center",children:"他の外部アカウント、またはメールアドレスでやり直してください。"})}),(0,r.jsx)(t.HM,{className:"tw-w-full",children:(0,r.jsx)(a.$,{variant:"secondary",children:"OK"})})]})})})]})};var V=s(89099),W=s(59688),X=!0;let G=e=>{let{queryParams:n}=e,s=(0,V.useRouter)(),{originalPath:a,oidcTransactionId:t,oidcErrorCode:l}=n,o=async()=>{W.oR.success("ログインしました");let e=a||"/";s.replace(e)},c=async e=>{let{redirectPath:n}=e;W.oR.success("ログインしました"),s.push(n)};return(0,r.jsx)(i.M,{children:(0,r.jsx)(U,{onCompleteSignInWithEmail:o,onCompleteSignInWithOidc:c,signInContextParams:{originalPath:a},oidcParams:t?{transactionId:t,isRedirected:!0}:{isRedirected:!1}
1,oidcErrorCode:l})})},Z=G},72509:(e,n,s)=>{"use strict";s.d(n,{c:()=>a});var r=s(37876),i=s(21257);s(14232);let a=e=>{let{text:n,className:s,lineClassName:a,color:t="pale"}=e,l="pale"===t?"tw-bg-neutral-pale":"tw-bg-neutral-night";return(0,r.jsxs)("div",{className:(0,i.cn)("tw-flex tw-w-full tw-items-center",s),children:[(0,r.jsx)("div",{className:(0,i.cn)("tw-h-px tw-flex-1",l,a)}),n&&(0,r.jsx)("span",{className:(0,i.cn)("tw-px-4 tw-text-[15px]","pale"===t?"tw-text-neutral-pale":"tw-text-neutral-night"),children:n}),(0,r.jsx)("div",{className:(0,i.cn)("tw-h-px tw-flex-1",l,a)})]})};a.displayName="Divider"}},e=>{e.O(0,[513,8992,6306,636,6593,8792],()=>e(e.s=32864)),_N_E=e.O()}]);

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.