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IAAAA,EAAAA,KAAAA,EAAAA,EAAsD6C,EAAAA,CAAGC,IAAI,CACpExE,QAASA,OAMhB,KAIT,EAEA,IAAAyE,EAAehD","sources":["webpack://_N_E/?d5e1","webpack://_N_E/./src/components/fragments/card/confirm-card/ConfirmCard.tsx","webpack://_N_E/./src/components/fragments/card/confirm-card/index.ts","webpack://_N_E/./src/components/fragments/card/alert-card/AlertCard.tsx","webpack://_N_E/./src/components/fragments/card/alert-card/index.ts","webpack://_N_E/./src/components/fragments/card/asked-card/AskedCard.tsx","webpack://_N_E/./src/components/fragments/card/asked-card/index.ts","webpack://_N_E/./src/components/fragments/card/success-card/index.ts","webpack://_N_E/./src/components/fragments/card/index.ts","webpack://_N_E/./src/components/fragments/card/success-card/SuccessCard.tsx","webpack://_N_E/./src/modules/utils/function.ts","webpack://_N_E/./src/pages/settings/account/change/password/__components__/success-screen/SuccessScreen.tsx","webpack://_N_E/./src/pages/settings/account/change/password/__components__/success-screen/index.ts","webpack://_N_E/./src/pages/settings/account/change/password/__components__/password-change-form/const.ts","webpack://_N_E/./src/pages/settings/account/change/password/__components__/password-change-form/PasswordChangeForm.tsx","webpack://_N_E/./src/pages/settings/account/change/password/__components__/password-change-form/index.ts","webpack://_N_E/./src/pages/settings/account/change/password/__gql__/me.gen.ts","webpack://_N_E/./src/pages/settings/account/change/password/__gql__/do-renew-password.gen.ts","webpack://_N_E/./src/pages/settings/account/change/password/__gql__/verify-password.gen.ts","webpack://_N_E/./src/pages/settings/account/change/password/const.ts","webpack://_N_E/./src/pages/settings/account/change/password/index.page.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/settings/account/change/password\",\n function () {\n return require(\"private-next-pages/settings/account/change/password/index.page.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/settings/account/change/password\"])\n });\n }\n ","import { type BaseCardProps, BaseCard } from \"@/components/fragments/card/base-card\";\nimport { VStack } from \"@chakra-ui/react\";\nimport { type FC, type ReactNode } from \"react\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport { Button, type ButtonProps } from \"@/components/essentials/button\";\nimport { confirmCardOkButtonTestId, confirmCardCancelButtonTestId } from \"./const\";\n\nexport interface ConfirmCardProps extends Omit {\n headerImage?: ReactNode;\n headerMessage?: string;\n message?: string | ReactNode;\n okButtonLabel: string;\n cancelButtonLabel: string;\n okButtonProps?: Omit;\n cancelButtonProps?: Omit;\n}\n\nexport const ConfirmCard: FC = ({\n headerImage,\n headerMessage,\n message,\n cancelButtonLabel,\n okButtonLabel,\n okButtonProps,\n cancelButtonProps,\n ...rest\n}) => {\n return (\n \n \n {headerImage}\n {headerMessage}\n \n {message}\n \n \n \n \n \n \n \n );\n};\n","export * from \"./ConfirmCard\";\n","import { BaseCard, type BaseCardProps } from \"@/components/fragments/card/base-card\";\nimport { VStack, HStack } from \"@chakra-ui/react\";\nimport { Button, type ButtonProps } from \"@/components/essentials/button\";\nimport { type ReactNode, type FC } from \"react\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport { alertCardCancelButtonTestId, alertCardOkButtonTestId } from \"./const\";\n\nexport interface AlertCardProps extends Omit {\n headerImage: ReactNode;\n headerMessage: string;\n message?: string;\n okButtonLabel: string;\n cancelButtonLabel: string;\n okButtonProps?: Omit;\n cancelButtonProps?: Omit;\n}\nexport const AlertCard: FC = ({\n headerImage,\n headerMessage,\n message,\n cancelButtonLabel,\n okButtonLabel,\n okButtonProps,\n cancelButtonProps,\n ...rest\n}) => {\n return (\n \n \n {headerImage}\n {headerMessage}\n \n {message}\n \n \n \n \n \n \n \n );\n};\n","export * from \"./AlertCard\";\n","import { type FC } from \"react\";\nimport { Box } from \"@/components/essentials/box\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport {\n Accordion,\n AccordionButton,\n AccordionIcon,\n AccordionItem,\n AccordionPanel,\n type AccordionProps,\n} from \"@chakra-ui/accordion\";\nimport { Icon } from \"@chakra-ui/react\";\nimport { type IconType } from \"react-icons\";\n\nexport interface AskedItem {\n readonly title: string;\n readonly panel: string;\n readonly icon?: IconType;\n}\n\nexport interface AskedCardProps extends AccordionProps {\n readonly items: AskedItem[];\n}\n\nexport const AskedCard: FC = (props) => {\n const { items, ...rest } = props;\n return (\n \n {items.map((item, key) => {\n return (\n \n \n {item.icon !== undefined && }\n \n {item.title}\n \n \n \n \n {item.panel}\n \n \n );\n })}\n \n );\n};\n","export * from \"./AskedCard\";\n","export * from \"./SuccessCard\";\n","export * from \"./alert-card\";\nexport * from \"./asked-card\";\nexport * from \"./confirm-card\";\nexport * from \"./alert-card\";\nexport * from \"./success-card\";\n","import { type BaseCardProps, BaseCard } from \"@/components/fragments/card/base-card\";\nimport { type FC } from \"react\";\nimport { Flex } from \"@chakra-ui/react\";\nimport { Icon } from \"@/components/essentials/icon\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport { type TypographyBreakpointsVariant } from \"@/components/essentials/typography/type\";\nimport { Button, type ButtonProps } from \"@/components/essentials/button\";\nimport Link, { type LinkProps } from \"next/link\";\nimport { type PartiallyPartial } from \"@/modules/utils/types\";\nimport { successCardButtonTestId, successCardIconTestId, successCardTextTestId } from \"./const\";\n\nexport const typographyVariant: TypographyBreakpointsVariant = {\n base: \"display5\",\n sm: \"display4\",\n md: \"display4\",\n lg: \"display4\",\n xl: \"display4\",\n \"2xl\": \"display4\",\n};\n\nexport interface SuccessCardProps extends PartiallyPartial {\n readonly text: string;\n readonly buttonText?: string;\n readonly buttonHref?: LinkProps[\"href\"];\n readonly buttonProps?: Omit;\n}\n\nexport const SuccessCard: FC = ({ text, buttonText, buttonHref, buttonProps, children, ...rest }) => {\n return (\n \n \n \n \n {text}\n \n {children}\n {buttonText === undefined && buttonHref === undefined && buttonProps === undefined ? null : buttonHref ? (\n \n {buttonText}\n \n ) : (\n \n )}\n \n \n );\n};\n","// biome-ignore lint/suspicious/noEmptyBlockStatements :[AUTOMATICALLY-INSERTED] Unexpected empty block.\nexport const noop = (): void => {};\n","import { type FC } from \"react\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport { SuccessCard, typographyVariant } from \"@/components/fragments/card\";\nimport { pagesPath } from \"@/pathpida/generated/$path\";\n\nexport const SuccessScreen: FC = () => {\n return (\n \n \n 変更後のパスワードで\n
\n 再度サインインしてください\n
\n \n );\n};\n","export { SuccessScreen } from \"./SuccessScreen\";\n","import { type PasswordChangeFormValues } from \"./type\";\n\nexport const defaultValuesPasswordChange: PasswordChangeFormValues = {\n password: \"\",\n newPassword: \"\",\n confirmPassword: \"\",\n};\n\nexport const passwordChangeButtonTestId =\n \"pages/settings/account/change/password/__components__/password-change-form/PasswordChangeForm/Button-submit\";\nexport const passwordChangeTypographyTitleTestId =\n \"pages/settings/account/change/password/__components__/password-change-form/PasswordChangeForm/Typography-title\";\nexport const passwordChangeTypographyDescriptionTestId =\n \"pages/settings/account/change/password/__components__/password-change-form/PasswordChangeForm/Typography-description\";\n","import { type FC } from \"react\";\nimport { Center, VStack, Flex } from \"@chakra-ui/react\";\nimport { Box } from \"@/components/essentials/box\";\nimport { Button } from \"@/components/essentials/button\";\nimport { Typography } from \"@/components/essentials/typography\";\nimport { PasswordForm, NewPasswordForm, ConfirmPasswordForm } from \"@/components/fragments/forms\";\nimport { useFormContext } from \"react-hook-form\";\nimport {\n passwordChangeButtonTestId,\n passwordChangeTypographyDescriptionTestId,\n passwordChangeTypographyTitleTestId,\n} from \"./const\";\n\ninterface PasswordChangeFormProps {\n readonly loading: boolean;\n readonly email: string | undefined;\n}\n\nexport const PasswordChangeForm: FC = ({ loading, email }) => {\n const {\n formState: { isValid },\n } = useFormContext();\n return (\n \n \n \n パスワードの変更\n \n \n お客様の大切な情報を守るため、パスワードは推測されにくい安全なものをご入力ください。\n {\" \"}\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n パスワードを変更する\n \n
\n
\n );\n};\n","export { PasswordChangeForm } from \"./PasswordChangeForm\";\nexport { defaultValuesPasswordChange } from \"./const\";\nexport type { PasswordChangeFormValues } from \"./type\";\n","// @ts-nocheck\nimport * as Types from '../../../../../../gql/generated/graphql.gen';\n\nimport { gql } from '@apollo/client';\nimport * as Apollo from '@apollo/client';\nconst defaultOptions = {} as const;\nexport type MePagesSettingsAccountChangePasswordQueryVariables = Types.Exact<{ [key: string]: never; }>;\n\n\nexport type MePagesSettingsAccountChangePasswordQuery = { __typename?: 'Query', me: { __typename?: 'FamilyAccount', mail: string } };\n\n\nexport const MePagesSettingsAccountChangePasswordDocument = gql`\n query mePagesSettingsAccountChangePassword {\n me {\n mail\n }\n}\n `;\n\n/**\n * __useMePagesSettingsAccountChangePasswordQuery__\n *\n * To run a query within a React component, call `useMePagesSettingsAccountChangePasswordQuery` and pass it any options that fit your needs.\n * When your component renders, `useMePagesSettingsAccountChangePasswordQuery` returns an object from Apollo Client that contains loading, error, and data properties\n * you can use to render your UI.\n *\n * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;\n *\n * @example\n * const { data, loading, error } = useMePagesSettingsAccountChangePasswordQuery({\n * variables: {\n * },\n * });\n */\nexport function useMePagesSettingsAccountChangePasswordQuery(baseOptions?: Apollo.QueryHookOptions) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useQuery(MePagesSettingsAccountChangePasswordDocument, options);\n }\nexport function useMePagesSettingsAccountChangePasswordLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useLazyQuery(MePagesSettingsAccountChangePasswordDocument, options);\n }\nexport function useMePagesSettingsAccountChangePasswordSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) {\n const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}\n return Apollo.useSuspenseQuery(MePagesSettingsAccountChangePasswordDocument, options);\n }\nexport type MePagesSettingsAccountChangePasswordQueryHookResult = ReturnType;\nexport type MePagesSettingsAccountChangePasswordLazyQueryHookResult = ReturnType;\nexport type MePagesSettingsAccountChangePasswordSuspenseQueryHookResult = ReturnType;\nexport type MePagesSettingsAccountChangePasswordQueryResult = Apollo.QueryResult;","// @ts-nocheck\nimport * as Types from '../../../../../../gql/generated/graphql.gen';\n\nimport { gql } from '@apollo/client';\nimport * as Apollo from '@apollo/client';\nconst defaultOptions = {} as const;\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutationVariables = Types.Exact<{\n newPassword: Types.Scalars['String']['input'];\n}>;\n\n\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutation = { __typename?: 'Mutation', doRenewPassword: boolean };\n\n\nexport const DoRenewPasswordPagesSettingsAccountChangePasswordDocument = gql`\n mutation doRenewPasswordPagesSettingsAccountChangePassword($newPassword: String!) {\n doRenewPassword(newPassword: $newPassword)\n}\n `;\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutationFn = Apollo.MutationFunction;\n\n/**\n * __useDoRenewPasswordPagesSettingsAccountChangePasswordMutation__\n *\n * To run a mutation, you first call `useDoRenewPasswordPagesSettingsAccountChangePasswordMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useDoRenewPasswordPagesSettingsAccountChangePasswordMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [doRenewPasswordPagesSettingsAccountChangePasswordMutation, { data, loading, error }] = useDoRenewPasswordPagesSettingsAccountChangePasswordMutation({\n * variables: {\n * newPassword: // value for 'newPassword'\n * },\n * });\n */\nexport function useDoRenewPasswordPagesSettingsAccountChangePasswordMutation(baseOptions?: Apollo.MutationHookOptions) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useMutation(DoRenewPasswordPagesSettingsAccountChangePasswordDocument, options);\n }\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutationHookResult = ReturnType;\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutationResult = Apollo.MutationResult;\nexport type DoRenewPasswordPagesSettingsAccountChangePasswordMutationOptions = Apollo.BaseMutationOptions;","// @ts-nocheck\nimport * as Types from '../../../../../../gql/generated/graphql.gen';\n\nimport { gql } from '@apollo/client';\nimport * as Apollo from '@apollo/client';\nconst defaultOptions = {} as const;\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutationVariables = Types.Exact<{\n password: Types.Scalars['String']['input'];\n}>;\n\n\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutation = { __typename?: 'Mutation', verifyPassword: boolean };\n\n\nexport const VerifyPasswordPagesSettingsAccountChangePasswordDocument = gql`\n mutation verifyPasswordPagesSettingsAccountChangePassword($password: String!) {\n verifyPassword(password: $password)\n}\n `;\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutationFn = Apollo.MutationFunction;\n\n/**\n * __useVerifyPasswordPagesSettingsAccountChangePasswordMutation__\n *\n * To run a mutation, you first call `useVerifyPasswordPagesSettingsAccountChangePasswordMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useVerifyPasswordPagesSettingsAccountChangePasswordMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [verifyPasswordPagesSettingsAccountChangePasswordMutation, { data, loading, error }] = useVerifyPasswordPagesSettingsAccountChangePasswordMutation({\n * variables: {\n * password: // value for 'password'\n * },\n * });\n */\nexport function useVerifyPasswordPagesSettingsAccountChangePasswordMutation(baseOptions?: Apollo.MutationHookOptions) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useMutation(VerifyPasswordPagesSettingsAccountChangePasswordDocument, options);\n }\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutationHookResult = ReturnType;\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutationResult = Apollo.MutationResult;\nexport type VerifyPasswordPagesSettingsAccountChangePasswordMutationOptions = Apollo.BaseMutationOptions;","export const apolloErrorMe = \"pages/settings/account/change/password/ApolloError/me\";\nexport const apolloErrorVerifyPassword = \"pages/settings/account/change/password/ApolloError/verifyPassword\";\nexport const apolloErrorDoRenewPassword = \"pages/settings/account/change/password/ApolloError/doRenewPassword\";\n","import { useCallback, useState } from \"react\";\nimport type { NextPage } from \"next\";\nimport { UnauthedLayout } from \"@/layouts\";\nimport { SuccessScreen } from \"./__components__/success-screen\";\nimport {\n PasswordChangeForm,\n type PasswordChangeFormValues,\n defaultValuesPasswordChange,\n} from \"./__components__/password-change-form\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useApolloError } from \"@/hooks/useApolloError\";\nimport { useMePagesSettingsAccountChangePasswordQuery } from \"./__gql__/me.gen\";\nimport { useDoRenewPasswordPagesSettingsAccountChangePasswordMutation } from \"./__gql__/do-renew-password.gen\";\nimport { useVerifyPasswordPagesSettingsAccountChangePasswordMutation } from \"./__gql__/verify-password.gen\";\nimport { noop } from \"@/modules/utils/function\";\nimport { NextSeo } from \"next-seo\";\nimport { apolloErrorDoRenewPassword, apolloErrorMe, apolloErrorVerifyPassword } from \"./const\";\n\nconst SettingsAccountChangePasswordPage: NextPage = () => {\n const resultMePagesSettingsAccountChangePasswordQuery = useMePagesSettingsAccountChangePasswordQuery();\n\n const [\n verifyPasswordPagesSettingsAccountChangePasswordMutation,\n resultVerifyPasswordPagesSettingsAccountChangePasswordMutation,\n ] = useVerifyPasswordPagesSettingsAccountChangePasswordMutation();\n const [\n doRenewPasswordPagesSettingsAccountChangePasswordMutation,\n resultDoRenewPasswordPagesSettingsAccountChangePasswordMutation,\n ] = useDoRenewPasswordPagesSettingsAccountChangePasswordMutation();\n\n useApolloError(resultMePagesSettingsAccountChangePasswordQuery.error, {\n testid: apolloErrorMe,\n });\n useApolloError(resultVerifyPasswordPagesSettingsAccountChangePasswordMutation.error, {\n testid: apolloErrorVerifyPassword,\n });\n useApolloError(resultDoRenewPasswordPagesSettingsAccountChangePasswordMutation.error, {\n testid: apolloErrorDoRenewPassword,\n });\n\n const loading =\n resultVerifyPasswordPagesSettingsAccountChangePasswordMutation.loading ||\n resultDoRenewPasswordPagesSettingsAccountChangePasswordMutation.loading;\n\n const [isSubmitSuccessful, setIsSubmitSuccessful] = useState(false);\n\n const methods = useForm({\n defaultValues: defaultValuesPasswordChange,\n mode: \"all\",\n criteriaMode: \"all\",\n });\n const { handleSubmit } = methods;\n\n const handleChangePassword = useCallback(\n async ({ password, newPassword }: PasswordChangeFormValues): Promise => {\n verifyPasswordPagesSettingsAccountChangePasswordMutation({\n variables: {\n password,\n },\n })\n .then(({ data }) => {\n if (data?.verifyPassword === true) {\n return doRenewPasswordPagesSettingsAccountChangePasswordMutation({\n variables: {\n newPassword,\n },\n });\n }\n return Promise.reject(new Error(\"invalid password\"));\n })\n .then(({ data }) => {\n if (data?.doRenewPassword === true) {\n setIsSubmitSuccessful(true);\n }\n })\n .catch(noop);\n },\n [\n verifyPasswordPagesSettingsAccountChangePasswordMutation,\n doRenewPasswordPagesSettingsAccountChangePasswordMutation,\n ],\n );\n\n return (\n <>\n \n \n {!isSubmitSuccessful ? (\n \n {\n // biome-ignore lint/complexity/noVoid :[AUTOMATICALLY-INSERTED] The use of void is not allowed.\n void handleSubmit(handleChangePassword)(e);\n }}\n >\n \n \n \n ) : (\n \n )}\n \n \n );\n};\n\nexport default SettingsAccountChangePasswordPage;\n"],"names":["window","__NEXT_P","push","__webpack_require__","ConfirmCard","headerImage","headerMessage","message","cancelButtonLabel","okButtonLabel","okButtonProps","cancelButtonProps","rest","param","emotion_react_jsx_runtime_browser_esm","tZ","BaseCard","BX","VStack","justifyContent","alignItems","Typography","variant","textAlign","color","whiteSpace","w","Button","styleVariant","typographyVariant","base","sm","md","lg","xl","SuccessCard","text","buttonText","buttonHref","buttonProps","children","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__","Flex","flexDir","Icon","as","boxSize","mt","undefined","Link","href","noop","SuccessScreen","pagesPath","br","defaultValuesPasswordChange","password","newPassword","confirmPassword","PasswordChangeForm","loading","email","formState","isValid","useFormContext","gridGap","Box","gridRowGap","PasswordForm","formLabel","placeholder","helperText","NewPasswordForm","ConfirmPasswordForm","Center","type","my","size","disabled","isLoading","defaultOptions","MePagesSettingsAccountChangePasswordDocument","gql","DoRenewPasswordPagesSettingsAccountChangePasswordDocument","VerifyPasswordPagesSettingsAccountChangePasswordDocument","SettingsAccountChangePasswordPage","resultMePagesSettingsAccountChangePasswordQuery","useMePagesSettingsAccountChangePasswordQuery","baseOptions","options","Apollo","verifyPasswordPagesSettingsAccountChangePasswordMutation","resultVerifyPasswordPagesSettingsAccountChangePasswordMutation","useVerifyPasswordPagesSettingsAccountChangePasswordMutation","doRenewPasswordPagesSettingsAccountChangePasswordMutation","resultDoRenewPasswordPagesSettingsAccountChangePasswordMutation","useDoRenewPasswordPagesSettingsAccountChangePasswordMutation","useApolloError","error","testid","isSubmitSuccessful","setIsSubmitSuccessful","useState","methods","useForm","defaultValues","mode","criteriaMode","handleSubmit","handleChangePassword","useCallback","variables","then","data","verifyPassword","Promise","reject","doRenewPassword","catch","HY","NextSeo","title","description","UnauthedLayout","pt","px","bgColor","FormProvider","form","onSubmit","e","me","mail","index_page"],"sourceRoot":""}