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ExBg5E,EAAmBh5E,GAC5Bk5E,EAAaE,EAAgBp5E,GAE3Bk5E,EAAeA,CAACG,EAA0B37E,MAC1C27E,EAAMh7E,MAAMi7E,GAAML,EAAcv7E,EAAM47E,KAEtCL,EAAgBA,CAACM,EAAYC,IAC/BD,EAAGE,gBAAkBD,EAAGC,cAEtBN,EAAqB,CACvB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAGEC,EAAiB,CACnB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,K","sources":["webpack://touchweb/./src/blueprint/theme/icons-colored/buyer-protection.svg","webpack://touchweb/./src/apps/tradera/components/vip/seller-details/buyer-protection-info-header.jpg","webpack://touchweb/./src/apps/tradera/components/vip/seller-details/buyer-protection-info-modal.module.scss","webpack://touchweb/./src/components/payment-method/payment-method-logo.module.scss","webpack://touchweb/./src/apps/my-tradera/app/components/cancel-item-modal/cancel-item-modal.tsx","webpack://touchweb/./src/apps/my-tradera/app/components/leave-feedback/leave-feedback-api.ts","webpack://touchweb/./src/apps/my-tradera/app/components/seller-list/seller-list-api.ts","webpack://touchweb/./src/apps/my-tradera/app/components/settings/selling/item-localization.tsx","webpack://touchweb/./src/apps/my-tradera/app/components/settings/selling/member-prefilled-packaging-cost-api.ts","webpack://touchweb/./src/apps/my-tradera/app/constants/text-strings.ts","webpack://touchweb/./src/apps/my-tradera/app/containers/booked-shipment-api.ts","webpack://touchweb/./src/apps/my-tradera/app/helpers/enums.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/item-actions-helper.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/item-helper.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/list-helper.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/route-helper.js","webpack://touchweb/./src/apps/my-tradera/app/pages/routes.ts","webpack://touchweb/./src/apps/my-tradera/app/state/actions/my-tradera-items.js","webpack://touchweb/./src/apps/my-tradera/app/state/payout/reducer.ts","webpack://touchweb/./src/apps/my-tradera/app/state/reducers/cookies.js","webpack://touchweb/./src/apps/my-tradera/app/state/reducers/filters.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/item-actions-helper-seller.js","webpack://touchweb/./src/apps/my-tradera/app/helpers/item-actions-helper-buyer.js","webpack://touchweb/./src/apps/my-tradera/app/state/selectors/item-actions.js","webpack://touchweb/./src/apps/my-tradera/app/state/selectors/items.js","webpack://touchweb/./src/apps/my-tradera/app/state/selectors/seller-commands.js","webpack://touchweb/./src/apps/my-tradera/app/state/reducers/my-tradera-items.js","webpack://touchweb/./src/apps/my-tradera/app/state/reducers/my-tradera.js","webpack://touchweb/./src/apps/my-tradera/app/state/selectors/item-columns.js","webpack://touchweb/./src/apps/my-tradera/app/state/selectors/item-labels.js","webpack://touchweb/./src/apps/my-tradera/app/utils/feature-toggles.js","webpack://touchweb/./src/apps/my-tradera/pick-list2/services/pick-list-api.ts","webpack://touchweb/./src/apps/my-tradera/saved-searches/saved-searches-api.ts","webpack://touchweb/./src/apps/tradera/components/vip/api/vip-api-constants.ts","webpack://touchweb/./src/apps/tradera/components/vip/helpers/analytics.ts","webpack://touchweb/./src/apps/tradera/components/vip/helpers/navigation-helper.ts","webpack://touchweb/./src/apps/tradera/components/vip/seller-details/buyer-protection-info-modal.tsx","webpack://touchweb/./src/components/bank-id/state/bank-id/actions.ts","webpack://touchweb/./src/components/divider/divider.tsx","webpack://touchweb/./src/components/form-controls/text-input/text-input.tsx","webpack://touchweb/./src/components/item-card/item-card-parts/item-card-image-size.ts","webpack://touchweb/./src/components/loader/loader.tsx","webpack://touchweb/./src/components/payment-method/payment-method-name.tsx","webpack://touchweb/./src/components/payout-destination-modal/state/reducer.ts","webpack://touchweb/./src/components/payout-destination-modal/state/types.ts","webpack://touchweb/./src/components/portals/loading-portal.jsx","webpack://touchweb/./src/components/quick-view/ajax-item-api.ts","webpack://touchweb/./src/components/quick-view/quick-view-reducer.ts","webpack://touchweb/./src/components/scrollable-modal/header-with-image.tsx","webpack://touchweb/./src/helpers/checkout-errors.ts","webpack://touchweb/./src/helpers/shipping-validation-errors.ts","webpack://touchweb/./src/hooks/use-page-meta.tsx","webpack://touchweb/./src/localization/countries.js","webpack://touchweb/./src/state/configure-store.tsx","webpack://touchweb/./src/state/member-storage/hooks.ts","webpack://touchweb/./src/state/member-storage/reducer.ts","webpack://touchweb/./src/state/member/reducer.ts","webpack://touchweb/./src/state/multi-currency/actions.ts","webpack://touchweb/./src/state/page/reducer.ts","webpack://touchweb/./src/state/personalisation/helpers.ts","webpack://touchweb/./src/state/push-notifications/push-notifications-slice.js","webpack://touchweb/./src/state/services/member-api.ts","webpack://touchweb/./src/state/services/touchweb-syi-api.ts","webpack://touchweb/./src/state/services/types/webapi-discover-generated.ts","webpack://touchweb/./src/state/ui/actions.ts","webpack://touchweb/./src/state/ui/reducer.ts","webpack://touchweb/./src/state/views/cart/reducer.js","webpack://touchweb/./src/state/views/checkout/initial-state.js","webpack://touchweb/./src/state/views/checkout/reducer.js","webpack://touchweb/./src/state/views/invoice-checkout/actions.js","webpack://touchweb/./src/state/views/invoice-checkout/initial-state.js","webpack://touchweb/./src/state/views/invoice-checkout/reducer.js","webpack://touchweb/./src/state/views/invoice-checkout/selector.js","webpack://touchweb/./src/state/views/payouts/initial-state.js","webpack://touchweb/./src/state/views/payouts/reducer.js","webpack://touchweb/./src/state/views/report-item/actions.js","webpack://touchweb/./src/state/views/report-item/api.js","webpack://touchweb/./src/state/views/report-item/constants.ts","webpack://touchweb/./src/state/views/report-item/reducer.js","webpack://touchweb/./src/state/views/shipping-calculator/reducer.js","webpack://touchweb/./src/state/views/shipping-calculator/selectors.js","webpack://touchweb/./src/state/views/shipping-checkout/actions.js","webpack://touchweb/./src/state/views/shipping-checkout/initial-state.js","webpack://touchweb/./src/state/views/shipping-checkout/reducer.js","webpack://touchweb/./src/state/views/shipping-checkout/selector.js","webpack://touchweb/./src/state/views/tradera-shop/actions.js","webpack://touchweb/./src/state/views/tradera-shop/api.js","webpack://touchweb/./src/state/views/tradera-shop/reducer.ts","webpack://touchweb/./src/state/views/tradera-shop/selectors.ts","webpack://touchweb/./src/state/views/view-item/api.ts","webpack://touchweb/./src/state/views/view-item/reducer.ts","webpack://touchweb/./src/utils/allowed-buyer-region.ts"],"sourcesContent":["function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nexport default (({\n styles = {},\n ...props\n}) => /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 49 57\"\n}, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#003B29\",\n d: \"M18.55 34.55l8.78 17.76 14.7-19.14c.28-.5-.33-2.05-.59-2.56l-2.6-5.2a1.74 1.74 0 00-2.26-.82l-17.15 7.7a1.74 1.74 0 00-.88 2.26z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#000\",\n fillRule: \"evenodd\",\n d: \"M19.79 33.08a.86.86 0 00-.44 1.13l8.75 18.64 13.24-19.77c.48.24-.2-1.33-.34-1.6l-2.93-5.69a.87.87 0 00-1.13-.4l-17.15 7.69zm-2.04 1.82a2.6 2.6 0 011.33-3.41l17.15-7.69a2.6 2.6 0 013.4 1.22l2.93 5.7c.39.77.36 1.69-.07 2.44L27 53.67 17.75 34.9zm4.36-1.75l3.21-1.36a.87.87 0 11.68 1.6l-1.86.79-.01.52a2.85 2.85 0 01-.87 1.78l.9 1.92a.87.87 0 11-1.58.73l-1.54-3.3.72-.4c.47-.25.6-.6.64-.92a1.8 1.8 0 00-.04-.59v-.02l-.25-.75zm9.42-3.2A.87.87 0 0132 28.8l3.2-1.32.4.45c.31.32.66.39.99.36a1.9 1.9 0 00.57-.14l.75-.37.4.74-.77.41.77-.4.01.01.03.06a54.94 54.94 0 011.4 2.89.87.87 0 01-1.6.67 29.86 29.86 0 00-1.04-2.19c-.12.03-.25.04-.38.05a2.9 2.9 0 01-1.92-.5l-2.15.89a.87.87 0 01-1.13-.47z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#000\",\n fillRule: \"evenodd\",\n d: \"M30.41 42.71a11.87 11.87 0 002.4 5.1l-1.38 1.08a13.63 13.63 0 01-2.73-5.87c-.43-2.41-.14-5.18 2.33-6.63a5.34 5.34 0 014.71-.24c.68.27 1.29.63 1.77 1.02.48.37.89.81 1.12 1.26l-1.54.8c-.08-.15-.29-.4-.66-.7a5.25 5.25 0 00-1.32-.76 3.6 3.6 0 00-3.2.12c-1.5.88-1.89 2.64-1.5 4.82z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FEF880\",\n d: \"M12.3 43.07l-1.42-21.66 3.9-.2 1.16 22.88-3.64-1.02z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#000\",\n fillRule: \"evenodd\",\n d: \"M9.05 21.46a.79.79 0 00-.75.83l.77 13.87-1.58.09-.76-13.88a2.37 2.37 0 012.24-2.49l16.92-.86a2.37 2.37 0 012.49 2.25l.23 7.38-1.58.08-.23-7.38a.79.79 0 00-.83-.75l-9.93.5 1.04 25.8-5.46-4.85-1.05-20.67-1.52.08zm3.1-.16l.78 20.7 2.3 5-.77-25.8-2.3.11z\",\n clipRule: \"evenodd\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#000\",\n fillRule: \"evenodd\",\n d: \"M23.58.62l-.02.02a8.26 8.26 0 01-.35.3l-1.16.87A44.5 44.5 0 01.93 9.6L0 9.69v.93c0 13.46 5.94 24.7 11.82 32.52A74.82 74.82 0 0022.6 54.66a38.48 38.48 0 001.02.83l.01.02.63-.81-.62.81.61.47.63-.46-.62-.82.62.82.02-.02a6 6 0 00.24-.19l.72-.59c.62-.51 1.5-1.27 2.55-2.28 2.1-2 4.92-4.96 7.78-8.8 5.71-7.66 11.63-18.87 12.33-32.97l.05-.95-.94-.12a50.13 50.13 0 01-17.16-5.27 33.51 33.51 0 01-5.2-3.4 10.63 10.63 0 01-.29-.27h-.01L24.29 0l-.7.62zm.68 52.76l.29-.23a67.87 67.87 0 0010-10.73c5.42-7.28 10.99-17.78 11.87-30.92A51.75 51.75 0 0129.5 6.14a35.56 35.56 0 01-5.26-3.41A42.12 42.12 0 0118.5 6.4a46.6 46.6 0 01-16.44 5.14c.26 12.45 5.8 22.92 11.4 30.37a72.76 72.76 0 0010.8 11.47z\",\n clipRule: \"evenodd\"\n})));","export default \"//static.tradera.net/touchweb/static/output/images/buyer-protection-info-header.aa953bab.jpg\";","// extracted by mini-css-extract-plugin\nexport default {\"optionalIcon\":\"optionalIcon--AQ8wd\",\"mandatoryIcon\":\"mandatoryIcon--nfXwD\"};","// extracted by mini-css-extract-plugin\nexport default {\"logo-with-border\":\"logo-with-border--YUhER\",\"logoWithBorder\":\"logo-with-border--YUhER\",\"narrow\":\"narrow--f0Ui0\",\"logo-without-border\":\"logo-without-border--Qwh_Z\",\"logoWithoutBorder\":\"logo-without-border--Qwh_Z\",\"logoDouble\":\"logoDouble--megLH\"};","import { useTranslator } from 'tradera/lang/translate';\nimport { Button } from 'tradera/components/atoms/button/button';\nimport { ScrollableModal } from 'tradera/components/scrollable-modal/scrollable-modal';\nimport { useAppDispatch, useAppSelector } from 'tradera/state/hooks';\nimport { Text } from 'tradera/components/atoms/text/text';\nimport { closeModal } from 'tradera/state/ui/reducer';\n\nexport const CANCEL_ITEM_MODAL_ID = 'CANCEL_ITEM';\n\nexport const CancelItemModal = () => {\n const dispatch = useAppDispatch();\n const { t } = useTranslator();\n\n const { currentModal, currentModalData } = useAppSelector(\n (state) => state.ui.modals\n );\n\n const isModalOpen = currentModal === CANCEL_ITEM_MODAL_ID;\n const itemId = currentModalData?.itemId;\n\n const showModal = isModalOpen && !!itemId;\n\n return (\n dispatch(closeModal())}\n maxWidth=\"40vh\"\n title={t('cancel_item_modal_title')}\n footer={\n \n }\n mobileBottomSheet>\n
\n \n {t('cancel_item_modal_text_1')}\n \n \n {t('cancel_item_modal_text_2')}\n \n {t('cancel_item_modal_text_3')}\n
\n \n );\n};\n","import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';\nimport type { Feedback } from './feedbacks-reducer';\nimport type {\n LeaveFeedbackItemViewModel,\n PagedFeedback\n} from './leave-feedback';\nimport qs from 'qs';\n\nconst leaveFeedbackApi = createApi({\n reducerPath: 'leaveFeedbackApi',\n tagTypes: ['PagedFeedback'],\n baseQuery: fetchBaseQuery({\n baseUrl: ''\n }),\n endpoints: (builder) => ({\n getFeedbackItems: builder.query<\n { items: LeaveFeedbackItemViewModel[] },\n { role: string; transactionIds: string[] }\n >({\n query: ({ role, transactionIds }) => ({\n url: `/my/leave-feedback/${role}/items?${qs.stringify({\n ids: transactionIds\n })}`,\n method: 'GET'\n })\n }),\n getAllFeedbackItems: builder.query<\n PagedFeedback,\n { role: string; skip?: number; take?: number }\n >({\n providesTags: ['PagedFeedback'],\n query: ({ role, skip = 0, take = 10 }) => ({\n url: `/my/leave-feedback/${role}/pageditems`,\n params: {\n skip,\n take\n }\n })\n }),\n submitFeedback: builder.mutation<\n {\n failures?: {\n errorCode: string;\n transactionId: number;\n }[];\n },\n {\n role: string;\n data: Omit[];\n }\n >({\n invalidatesTags: ['PagedFeedback'],\n query: ({ role, data }) => ({\n url: `/my/leave-feedback/${role}/save`,\n method: 'POST',\n body: data\n })\n })\n })\n});\n\nexport const {\n useGetFeedbackItemsQuery,\n useGetAllFeedbackItemsQuery,\n useSubmitFeedbackMutation\n} = leaveFeedbackApi;\n\nexport default leaveFeedbackApi;\n","import { createApi } from '@reduxjs/toolkit/query/react';\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\nimport type {\n SellerSuggestionsRequest,\n SellerListRequest,\n FavouriteSellerCardDto,\n GetSellerListApiResponse\n} from 'src/state/services/types/webapi-discover-generated';\nimport qs from 'qs';\nimport { isServer } from 'tradera/utils/nextjs';\n\nexport type ParsedSellers = {\n sellers?: FavouriteSellerCardDto[] | null;\n totalSellers: number;\n totalPages: number;\n};\n\nexport const sellerListApi = createApi({\n reducerPath: 'sellerListApi',\n baseQuery: isomorphicWebApiBaseQuery,\n endpoints: (build) => ({\n getSellerList: build.query<\n ParsedSellers,\n | (SellerListRequest & { type: 'favourites' })\n | (SellerSuggestionsRequest & { type: 'suggested' })\n >({\n query: (params) => {\n const query = qs.stringify(params);\n const baseUrl = isServer ? '' : '/api/webapi';\n const listType =\n params.type === 'favourites'\n ? 'seller-list'\n : 'seller-suggestions';\n return `${baseUrl}/discover/${listType}?${query}`;\n },\n transformResponse: (\n response: GetSellerListApiResponse,\n _,\n arg\n ) => ({\n sellers: response.favouriteSellerCardDtos,\n totalSellers: response.totalSellers,\n totalPages: Math.ceil(response.totalSellers / arg.maxSellers!)\n })\n }),\n followSeller: build.mutation({\n query: (sellerId) => ({\n url: '/my/favourite-sellers/add',\n method: 'POST',\n body: { sellerId }\n })\n }),\n unfollowSeller: build.mutation({\n query: (sellerId) => ({\n url: '/my/favourite-sellers/remove',\n method: 'POST',\n body: { ids: [sellerId] }\n })\n })\n })\n});\n\nexport const {\n useGetSellerListQuery,\n useFollowSellerMutation,\n useUnfollowSellerMutation,\n util\n} = sellerListApi;\n","import { classNames } from 'tradera/utils/class-names';\nimport type { TFunction } from 'i18next';\nimport { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useCurrentLanguage, useTranslator } from 'tradera/lang/translate';\nimport { mapCountryCodeToCountryKey } from 'tradera/localization/countries';\nimport { mapLanguageCodeToLanguageKey } from 'tradera/localization/map-language-code-to-language-key';\nimport { webApiClient } from 'tradera/utils/http';\nimport { isSwedenCountryCodeOrUndefined } from 'tradera/localization/countrycode';\nimport { getLanguageFromCountryCode } from 'tradera/localization/languagecode';\nimport { selectShippingRegionCountryCodeIso2 } from 'tradera/state/shipping-region/selectors';\nimport type { MemberSellerSettingsItemLocalizationApiDto } from 'tradera/state/services/types/webapi-member-generated';\nimport type { DropdownOption } from 'tradera/apps/my-tradera/app/components/settings/components/settings-dropdown/settings-dropdown';\nimport { SettingsDropdown } from 'tradera/apps/my-tradera/app/components/settings/components/settings-dropdown/settings-dropdown';\nimport { showErrorToast, showSuccessToast } from 'tradera/services/toasts';\n\ntype ItemLocalizationProps = {\n itemLocalization:\n | MemberSellerSettingsItemLocalizationApiDto\n | null\n | undefined;\n};\n\nexport const ItemLocalization = ({\n itemLocalization\n}: ItemLocalizationProps) => {\n const { t } = useTranslator();\n const memberCountryCode = useSelector(selectShippingRegionCountryCodeIso2);\n const descriptionLanguages = [\n ...new Set([getLanguageFromCountryCode(memberCountryCode), 'sv', 'en'])\n ].map((code) => getLanguageOption(code, t));\n const shippingFromCountries = [\n getCountryOption('SE', t),\n getCountryOption('DK', t)\n ];\n const { defaultCountryCodeIso2, defaultLanguageCodeIso2 } =\n useDefaultItemLocalizationSettingValues();\n const [selectedDescriptionLanguage, setSelectedDescriptionLanguage] =\n useState(\n descriptionLanguages.find(\n (o) =>\n o.value ===\n itemLocalization?.selectedDescriptionLanguageCodeIso2 ||\n o.value === defaultLanguageCodeIso2\n )!\n );\n const [selectedShippingFrom, setSelectedShippingFrom] =\n useState(\n shippingFromCountries.find(\n (o) =>\n o.value === itemLocalization?.shippingFromCountryCodeIso2 ||\n o.value === defaultCountryCodeIso2\n )!\n );\n\n if (isSwedenCountryCodeOrUndefined(memberCountryCode)) return null;\n\n const onSelectedDescriptionLanguageChange = async (\n option: DropdownOption\n ) => {\n try {\n await webApiClient.put(\n '/member/profile/selected-description-language',\n {\n languageCodeIso2: option.value\n }\n );\n setSelectedDescriptionLanguage(option);\n showSuccessToast('myt_settings_update_success');\n } catch {\n showErrorToast('myt_settings_update_failed');\n }\n };\n\n const onShippingFromCountryChange = async (option: DropdownOption) => {\n try {\n await webApiClient.put('/member/profile/shipping-from-country', {\n countryCodeIso2: option.value\n });\n setSelectedShippingFrom(option);\n showSuccessToast('myt_settings_update_success');\n } catch {\n showErrorToast('myt_settings_update_failed');\n }\n };\n\n const showShippingFrom = ['DK', 'SE'].includes(memberCountryCode);\n return (\n <>\n \n {showShippingFrom && selectedShippingFrom && (\n \n )}\n \n );\n};\n\nexport const getDefaultSelectedDescriptionLanguageCodeIso2 = (\n memberLanguageCodeIso2: string | null,\n memberCountryCodeIso2: string\n) => {\n const countryLanguageCode = getLanguageFromCountryCode(\n memberCountryCodeIso2\n );\n\n return memberLanguageCodeIso2 === countryLanguageCode\n ? countryLanguageCode\n : 'sv';\n};\n\nexport const getDefaultShippingFromCountryCodeIso2 = (\n memberCountryCodeCodeIso2: string\n) => {\n return ['DK', 'SE'].includes(memberCountryCodeCodeIso2)\n ? memberCountryCodeCodeIso2\n : null;\n};\n\nexport const useDefaultItemLocalizationSettingValues = (): {\n defaultCountryCodeIso2: string | null;\n defaultLanguageCodeIso2: string;\n} => {\n const countryCode = useSelector(selectShippingRegionCountryCodeIso2);\n const { language } = useCurrentLanguage();\n\n return {\n defaultCountryCodeIso2:\n getDefaultShippingFromCountryCodeIso2(countryCode),\n defaultLanguageCodeIso2: getDefaultSelectedDescriptionLanguageCodeIso2(\n language,\n countryCode\n )\n };\n};\n\ntype ItemLocalizationSettingsProps = {\n selectedDescriptionLanguageCodeIso2: string;\n shippingFromCountryCodeIso2: string | null;\n onSelectedDescriptionLanguageChange: (languageCodeIso2: string) => void;\n onShippingFromCountryChange: (countryCodeIso2: string) => void;\n narrowSelector?: boolean;\n};\nexport const ItemLocalizationSettings = ({\n selectedDescriptionLanguageCodeIso2,\n shippingFromCountryCodeIso2,\n onSelectedDescriptionLanguageChange,\n onShippingFromCountryChange,\n narrowSelector = false\n}: ItemLocalizationSettingsProps) => {\n const { t } = useTranslator();\n const memberCountryCode = useSelector(selectShippingRegionCountryCodeIso2);\n\n const descriptionLanguages = [\n ...new Set([getLanguageFromCountryCode(memberCountryCode), 'sv', 'en'])\n ].map((code) => getLanguageOption(code, t));\n\n const shippingFromCountries = [\n getCountryOption('SE', t),\n getCountryOption('DK', t)\n ];\n\n const labelClassName = classNames(\n 'col-12',\n narrowSelector ? 'col-md-8' : 'col-md-6'\n );\n const selectorClassName = classNames(\n 'col-12',\n narrowSelector ? 'col-md-4' : 'col-md-6'\n );\n\n const showShippingFrom = ['DK', 'SE'].includes(memberCountryCode);\n const topRowClassName = classNames('row', showShippingFrom && 'mb-4');\n\n return (\n
\n
\n
\n \n {t('myt_settings_selectedDescriptionLanguage')}\n \n
\n {t('myt_settings_selectedDescriptionLanguage_info')}\n
\n
\n
\n \n onSelectedDescriptionLanguageChange(e.target.value)\n }>\n {descriptionLanguages.map(({ value, text }) => (\n \n ))}\n \n
\n
\n {showShippingFrom && shippingFromCountryCodeIso2 && (\n
\n
\n \n {t('myt_settings_shippingFromCountry')}\n \n
\n {t('myt_settings_shippingFromCountry_info')}\n
\n
\n
\n \n onShippingFromCountryChange(e.target.value)\n }>\n {shippingFromCountries.map(({ value, text }) => (\n \n ))}\n \n
\n
\n )}\n
\n );\n};\n\nconst getLanguageOption = (code: string, t: TFunction): DropdownOption => ({\n value: code,\n text: t(mapLanguageCodeToLanguageKey(code))\n});\n\nconst getCountryOption = (code: string, t: TFunction): DropdownOption => ({\n value: code,\n text: t(mapCountryCodeToCountryKey(code))\n});\n","import { createApi } from '@reduxjs/toolkit/query/react';\nimport type {\n GetMemberPrefilledPackagingCostApiResponse,\n UpdateMemberPrefilledPackagingCostApiRequest,\n UpdateMemberPrefilledPackagingCostApiResponse\n} from 'tradera/state/services/types/webapi-selling-generated';\n\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\n\nexport const memberPrefilledPackagingCostApi = createApi({\n reducerPath: 'memberPrefilledPackagingCostApi',\n baseQuery: isomorphicWebApiBaseQuery,\n endpoints: (builder) => ({\n getMemberPrefilledPackagingCost: builder.query<\n GetMemberPrefilledPackagingCostApiResponse,\n void\n >({\n query: () => {\n return `/api/webapi/selling/member-prefilled-packaging-cost`;\n }\n }),\n setMemberPrefilledPackagingCost: builder.mutation<\n UpdateMemberPrefilledPackagingCostApiResponse,\n UpdateMemberPrefilledPackagingCostApiRequest\n >({\n query: (body) => {\n return {\n url: `/api/webapi/selling/member-prefilled-packaging-cost`,\n method: 'POST',\n body\n };\n },\n onQueryStarted: async (arg, { dispatch, queryFulfilled }) => {\n const patchResult = dispatch(\n memberPrefilledPackagingCostApi.util.updateQueryData(\n 'getMemberPrefilledPackagingCost',\n undefined,\n (draft) => {\n Object.assign(draft, {\n packagingCost: arg.packagingCost\n });\n }\n )\n );\n\n try {\n await queryFulfilled;\n } catch {\n patchResult.undo();\n }\n }\n })\n })\n});\n\nexport const {\n useGetMemberPrefilledPackagingCostQuery,\n useSetMemberPrefilledPackagingCostMutation\n} = memberPrefilledPackagingCostApi;\n","export default {\n ERRORS: {\n GENERIC:\n 'Något har gått fel på Tradera. Vi jobbar på att fixa det. Försök igen om en stund.'\n },\n SHIPPING_LABELS: {\n NO_SELECTED_SHIPPING: 'Inget fraktsätt valt',\n FREE_SHIPPING: 'Fri frakt',\n TAKEAWAY: 'Avhämtning'\n }\n} as const;\n","import qs from 'qs';\nimport { createApi } from '@reduxjs/toolkit/query/react';\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\nimport type {\n BookedShipmentGetByCheckoutIdRequest,\n BookedShipmentGetByPurchaseOrderIdRequest,\n GetBookedShipmentByPurchaseOrderIdApiResponse,\n GetBookedShipmentByShipmentCheckoutIdApiResponse\n} from 'tradera/state/services/types/webapi-mytradera-generated';\n\nexport const bookedShipmentsApi = createApi({\n reducerPath: 'bookedShipmentsApi',\n baseQuery: isomorphicWebApiBaseQuery,\n endpoints: (builder) => ({\n getShipmentBookingByPurchaseOrderId: builder.query<\n GetBookedShipmentByPurchaseOrderIdApiResponse,\n BookedShipmentGetByPurchaseOrderIdRequest\n >({\n query: ({ purchaseOrderId }) => {\n return `/api/webapi/mytradera/shipping/bookedShipment/getByPurchaseOrderId?${qs.stringify(\n { purchaseOrderId }\n )}`;\n }\n }),\n getShipmentBookingByShippingCheckoutId: builder.query<\n GetBookedShipmentByShipmentCheckoutIdApiResponse,\n BookedShipmentGetByCheckoutIdRequest\n >({\n query: ({ shipmentCheckoutId }) => {\n return `/api/webapi/mytradera/shipping/bookedShipment/getByCheckoutId?${qs.stringify(\n { shipmentCheckoutId }\n )}`;\n }\n })\n })\n});\n\nexport const {\n useGetShipmentBookingByPurchaseOrderIdQuery,\n useGetShipmentBookingByShippingCheckoutIdQuery\n} = bookedShipmentsApi;\n","const getJSValue = {\n True: true,\n False: false,\n All: 'All'\n};\n\nconst setJSValue = {\n true: 'True',\n false: 'False',\n All: 'All'\n};\n\nexport const setEnum = (value) => setJSValue[value];\nexport const getEnum = (value) => getJSValue[value];\n","import fetch from '../utils/fetch';\nimport URLS from '../constants/urls';\nexport const types = {\n LINK: 'LINK',\n EXTERNAL_LINK: 'EXTERNAL_LINK',\n EXTERNAL_LINK_ICON: 'EXTERNAL_LINK_ICON',\n DISPATCH: 'DISPATCH',\n DISABLED: 'DISABLED'\n};\n\n/**\n * Converts Array to string for FormData;\n * @param {array} ids array of ids to send to backend\n */\nconst getBodyStringFromIDs = (ids) => {\n let bodyString = '';\n if (ids) {\n ids.forEach((id, pos) => {\n // eslint-disable-next-line better-mutation/no-mutation\n bodyString += `${pos > 0 ? '&' : ''}ids=${id}`;\n });\n }\n return bodyString;\n};\n\n/**\n * Headers to be set on 'fetch' requests for FormData\n * We should remove FormData posts\n */\nconst formHeaders = {\n 'X-Requested-With': 'XmlHtpRequest',\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n 'Content-Disposition': 'form-data'\n};\n\n/**\n * Get Restart Items Summary\n * @param {array} ids\n * @returns {promise} fetch promise returned;\n */\nexport const restartItemsSummary = (ids) =>\n fetch(URLS.ACTIVE_ITEMS_RESTART_SUMMARY, {\n body: JSON.stringify({ ids: ids })\n });\n\n/**\n * End Items\n * @param {array} ids 'selectedCheckboxes in state'\n * @returns {promise} fetch promise returned;\n */\nexport const endItems = (ids) =>\n fetch(URLS.ACTIVE_END_ITEMS, {\n body: `${getBodyStringFromIDs(ids)}&filter=all`,\n headers: formHeaders\n });\n\n/**\n * Show Items\n * @param {array} ids 'selectedCheckboxes in state'\n * @returns {promise} fetch promise returned;\n */\nexport const showActive = (ids) =>\n fetch(URLS.BUYER_ACTIVE_ITEMS_SHOW, {\n body: `${getBodyStringFromIDs(ids)}&filter=all`,\n headers: formHeaders\n });\n\n/**\n * Hide Items\n * @param {array} ids 'selectedCheckboxes in state'\n * @returns {promise} fetch promise returned;\n */\nexport const hideActive = (ids) =>\n fetch(URLS.BUYER_ACTIVE_ITEMS_HIDE, {\n body: `${getBodyStringFromIDs(ids)}&filter=all`,\n headers: formHeaders\n });\n\n/**\n * Restart Items\n * @param {array} ids 'selectedCheckboxes in state'\n * @returns {promise} fetch promise returned;\n */\nexport const restartItems = (ids) =>\n fetch(URLS.UNSOLD_RESTART_ITEMS, {\n body: `${getBodyStringFromIDs(ids)}&filter=all`,\n headers: formHeaders\n });\n","import { formatPrice } from './formats';\nimport { LIST_VIEW_TYPES } from './../constants/list-types';\nimport STRINGS from './../constants/text-strings';\n\nexport const generateSumOfDiscounts = (discounts) => {\n return discounts\n .map((discount) => discount.amount)\n .reduce((total, currentAmount) => {\n return total + currentAmount;\n }, 0);\n};\n\nexport const getBidCount = (item) => {\n return item && item.bidInformation && item.bidInformation.bidCount > 0\n ? item.bidInformation.bidCount\n : 0;\n};\n\nexport const getSumOfDiscounts = (item) => {\n const transaction = item.transaction;\n return transaction &&\n transaction.discounts &&\n transaction.discounts.length > 0\n ? generateSumOfDiscounts(transaction.discounts)\n : null;\n};\n\nexport const getMaxBid = (item) =>\n item.caller && item.caller.maxBid && item.caller.maxBid > 0\n ? item.caller.maxBid\n : null;\n\nexport const getTimeLeft = (item) => {\n return item.isActive === true && item.timeLeft && item.timeLeft.timeleft\n ? item.timeLeft.timeleft\n : null;\n};\n\nexport const isTimeLeftCritical = (item) => {\n return item.timeLeft && item.timeLeft.critical\n ? item.timeLeft.critical\n : false;\n};\n\nexport const getShippingCost = (item, listViewType) => {\n const translateShippingNames = (name) => {\n const names = {\n Takeaway: 'Avh.',\n TakeawayLong: 'Avhämtning',\n TakeawayOnly: 'Avhämtning',\n SchenkerPrivpak: 'DB Schenker',\n Alternative: 'Annat fraktsätt'\n };\n if (!names[name]) {\n return name;\n }\n if (name === 'Takeaway' && listViewType === LIST_VIEW_TYPES.BASIC) {\n return names['TakeawayLong'];\n }\n return names[name];\n };\n\n const shouldShowShippingPrice = (shippingItem) =>\n shippingItem.shippingType === 'Takeaway'\n ? ''\n : `: ${formatPrice(shippingItem.shippingCost)}`;\n const getShippingLabelWithPrice = (shippingItem) => {\n return `${translateShippingNames(\n shippingItem.shippingType\n )}${shouldShowShippingPrice(shippingItem)}`;\n };\n\n return () => {\n const shippingOptions = item.listing.shippingOptions;\n\n if (item.transaction) {\n // Logic from Areas/MyTradera/Models/ShippingPrice.cs\n const selectedShipping = item.transaction.selectedShipping;\n if (selectedShipping) {\n if (selectedShipping.isTakeaway) {\n return `${translateShippingNames(\n 'Takeaway'\n )}: ${formatPrice(item.transaction.selectedShipping.cost)}`;\n }\n\n if (selectedShipping.isFreeShipping) {\n return STRINGS.SHIPPING_LABELS.FREE_SHIPPING;\n }\n return `${translateShippingNames(\n selectedShipping.name\n )}: ${formatPrice(item.transaction.selectedShipping.cost)}`;\n } else {\n /*\n * @todo: This if should be fixed in the backend.\n */\n if (shippingOptions.length === 1) {\n const theOnlyShippingOption =\n item.listing.shippingOptions[0];\n return theOnlyShippingOption.shippingType === 'Takeaway'\n ? STRINGS.SHIPPING_LABELS.TAKEAWAY\n : formatPrice(theOnlyShippingOption.shippingCost);\n }\n\n return shippingOptions.map((shippingItem, i) => {\n return listViewType === LIST_VIEW_TYPES.BASIC ? (\n

{getShippingLabelWithPrice(shippingItem)}

\n ) : (\n `${getShippingLabelWithPrice(shippingItem)}${\n i < shippingOptions.length ? ', ' : ''\n }`\n );\n });\n }\n }\n\n const itemOffersTakeawayOnly = () =>\n shippingOptions.length === 1 &&\n shippingOptions.find(\n (shippingOption) => shippingOption.shippingType === 'Takeaway'\n ) !== undefined\n ? true\n : false;\n const getCheapestShippingCost = () =>\n shippingOptions.length === 0\n ? { shippingCost: 0 }\n : shippingOptions.reduce((accumulator, currentValue) => {\n if (\n (currentValue.shippingCost <\n accumulator.shippingCost &&\n currentValue.shippingType !== 'Takeaway') ||\n accumulator.shippingType === 'Takeaway'\n ) {\n return currentValue;\n }\n return accumulator;\n });\n\n return itemOffersTakeawayOnly()\n ? STRINGS.SHIPPING_LABELS.TAKEAWAY\n : formatPrice(getCheapestShippingCost().shippingCost);\n };\n};\n\nexport const isNormalListViewType = (listViewType) =>\n listViewType === LIST_VIEW_TYPES.NORMAL;\n","import { PAGE_LIST_TYPES, PAGE_BULK_ACTIONS } from '../constants/list-types';\n\n/**\n * @param {string} listType\n * @param {object} item\n * @returns {object} 'Bulk Actions' available for the specific list\n */\n\nexport const listActions = (\n listType,\n memberId,\n selectedFilterBar,\n count = 0,\n t\n) => {\n const actions = {\n [PAGE_LIST_TYPES.SELLER_ACTIVE]: () => {\n switch (selectedFilterBar) {\n default:\n return {\n isCheckboxActive: (item) =>\n item && item.bidInformation.bidCount === 0,\n bulkCssClass: 'outline-dark',\n label: t('myt_action_cancelListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.ACTIVE_CANCEL,\n modal: {\n icon: 'warning',\n heading: t(\n 'myt_action_cancelListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_cancelListingsModalMessage',\n { count: count }\n ),\n confirmButtonText: t(\n 'myt_action_cancelListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_cancelListingsModalCancelButtonText'\n ),\n dismissable: true\n },\n idType: 'itemId'\n };\n }\n },\n\n [PAGE_LIST_TYPES.SELLER_NOT_SOLD]: () => {\n switch (selectedFilterBar) {\n default:\n return {\n isCheckboxActive: (item) => {\n if (!item) {\n return false;\n }\n if (item.listing.restart.hasRestartedChild) {\n return false;\n }\n return !item.isArchived;\n },\n /*\n * @todo: confirm this\n */\n bulkCssClass: 'outline-dark',\n label: t('myt_action_restartListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.UNSOLD_RESTART,\n modal: {\n heading: t(\n 'myt_action_restartListingsModalHeading',\n { count: count, itemCount: count }\n ),\n dismissable: true,\n wide: true,\n confirmButtonText: t(\n 'myt_action_restartListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_restartListingsModalCancelButtonText'\n ),\n headingCSS: 'messaging-modal-title-with-line',\n messageAlignment: 'left',\n cssClass: false\n },\n idType: 'itemId'\n };\n }\n },\n\n [PAGE_LIST_TYPES.BUYER_ACTIVE_ITEMS]: () => {\n switch (selectedFilterBar) {\n case 'BuyerHidden':\n return {\n isCheckboxActive: (item) => {\n return (\n (item &&\n item.caller.leadingBidRemoved === true) ||\n (item.bidInformation.leadingBidder &&\n item.bidInformation.leadingBidder.id !==\n memberId)\n );\n },\n bulkCssClass: 'outline-dark',\n label: t(\n 'myt_action_showBuyerHiddenActiveListingsLabel'\n ),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_SHOW_ACTIVE,\n modal: {\n heading: t(\n 'myt_action_showBuyerHiddenActiveListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_showBuyerHiddenActiveListingsModalMessage',\n { count: count }\n ),\n dismissable: true,\n wide: false,\n confirmButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalCancelButtonText'\n ),\n icon: 'warning',\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n case 'BuyerNotHidden':\n return {\n isCheckboxActive: (item) => {\n return (\n (item &&\n item.caller?.leadingBidRemoved === true) ||\n (item.bidInformation.leadingBidder &&\n (item.bidInformation.leadingBidder.id !==\n memberId ||\n item.reservePriceReached === false))\n );\n },\n bulkCssClass: 'outline-dark',\n label: t('myt_action_hideListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_HIDE_ACTIVE,\n modal: {\n heading: t('myt_action_hideListingsModalHeading', {\n count: count,\n itemCount: count\n }),\n dismissable: true,\n wide: false,\n icon: 'warning',\n confirmButtonText: t(\n 'myt_action_hideListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_hideListingsModalCancelButtonText'\n ),\n message: t('myt_action_hideListingsModalMessage', {\n count: count\n }),\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n default:\n return undefined;\n }\n },\n\n [PAGE_LIST_TYPES.BUYER_ITEMS_LOST]: () => {\n switch (selectedFilterBar) {\n case 'ItemsLostNotHidden':\n return {\n isCheckboxActive: () => true,\n bulkCssClass: 'outline-dark',\n label: t('myt_action_hideListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_HIDE_ACTIVE,\n modal: {\n heading: t('myt_action_hideListingsModalHeading', {\n count: count,\n itemCount: count\n }),\n dismissable: true,\n wide: false,\n icon: 'warning',\n confirmButtonText: 'Ja',\n cancelButtonText: 'Nej',\n message: t('myt_action_hideListingsModalMessage', {\n count: count\n }),\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n case 'ItemsLostHidden':\n return {\n isCheckboxActive: () => true,\n bulkCssClass: 'outline-dark',\n label: t(\n 'myt_action_showBuyerHiddenActiveListingsLabel'\n ),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_SHOW_ACTIVE,\n modal: {\n heading: t(\n 'myt_action_showBuyerHiddenActiveListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_showBuyerHiddenActiveListingsModalMessage',\n { count: count }\n ),\n dismissable: true,\n wide: false,\n confirmButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalCancelButtonText'\n ),\n icon: 'warning',\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n default:\n return undefined;\n }\n },\n\n default: () => ({})\n };\n\n return actions[listType] ? actions[listType]() : actions['default']();\n};\n","import { selectFiltersState } from 'tradera/apps/my-tradera/app/state/selectors/filters';\n\nconst getDefaultFilters = (filtersState, checkModifiersExist) => {\n return {\n 'filters[paging][page]':\n checkModifiersExist && filtersState.modifiers.paging\n ? filtersState.modifiers.paging.page\n : '',\n 'filters[paging][size]':\n checkModifiersExist && filtersState.modifiers.paging\n ? filtersState.modifiers.paging.size\n : '',\n 'filters[selectedFilterBar]': checkModifiersExist\n ? filtersState.modifiers.selectedFilterBar\n : '',\n 'filters[sellerFilters][feedbackLeft]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.feedbackLeft\n : '',\n 'filters[sellerFilters][paid]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.paid\n : '',\n 'filters[sellerFilters][shipped]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.shipped\n : '',\n 'filters[sellerFilters][hidden]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.hidden\n : '',\n 'filters[buyerFilters][feedbackLeft]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.feedbackLeft\n : '',\n 'filters[buyerFilters][paid]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.paid\n : '',\n 'filters[buyerFilters][hidden]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.hidden\n : ''\n };\n};\n\n/** This matches query parameters to state filters.\n * @param {object} state\n * @returns {object}\n */\nexport const getAvailableQueryParams = (state) => {\n const filtersState = selectFiltersState(state);\n\n const checkModifiersExist =\n !!state && filtersState && filtersState.modifiers;\n\n const defaultFilters = getDefaultFilters(filtersState, checkModifiersExist);\n\n return {\n ...defaultFilters,\n 'filters[datatype]': checkModifiersExist\n ? filtersState.modifiers.datatype\n : '',\n 'filters[dateRange][field]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.field\n : '',\n 'filters[dateRange][from]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.from\n : '',\n 'filters[dateRange][to]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.to\n : '',\n 'filters[hasBids]': checkModifiersExist\n ? filtersState.modifiers.hasBids\n : '',\n 'filters[itemCondition]': checkModifiersExist\n ? filtersState.modifiers.itemCondition\n : '',\n 'filters[itemType]': checkModifiersExist\n ? filtersState.modifiers.itemType\n : '',\n 'filters[processState]': checkModifiersExist\n ? filtersState.modifiers.processState\n : '',\n 'filters[purchaseType]': checkModifiersExist\n ? filtersState.modifiers.purchaseType\n : '',\n 'filters[query][properties]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.properties\n : '',\n 'filters[query][scope]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.scope\n : '',\n 'filters[query][searchQuery]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.searchQuery\n : '',\n 'filters[reservePriceReached]': checkModifiersExist\n ? filtersState.modifiers.reservePriceReached\n : '',\n 'filters[searchType]': checkModifiersExist\n ? filtersState.modifiers.searchType\n : '',\n 'filters[sellerFilters][shippingBooked]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.shippingBooked\n : '',\n 'filters[sort][order]':\n checkModifiersExist && filtersState.modifiers.sort\n ? filtersState.modifiers.sort.order\n : '',\n 'filters[sort][sorting]':\n checkModifiersExist && filtersState.modifiers.sort\n ? filtersState.modifiers.sort.sorting\n : '',\n 'filters[userIs]': checkModifiersExist\n ? filtersState.modifiers.userIs\n : '',\n 'filters[selectedFilterBar]': checkModifiersExist\n ? filtersState.modifiers.selectedFilterBar\n : ''\n };\n};\n\n/**\n * Checks if a query parameter is in the available parameters.\n * @param {function} getState\n * @param {object} locationQuery\n */\nexport const checkStateOfQueryParams = (getState, locationQuery) => {\n const check = getAvailableQueryParams(getState());\n const checkItem = (item) =>\n !!check[item] &&\n check[item].toString() !== locationQuery[item].toString();\n return Object.keys(check).some((item) => {\n if (!check[item] || !locationQuery[item]) {\n return false;\n }\n return checkItem(item) ? true : false;\n });\n};\n","import mapObject from 'lodash/mapValues';\nimport { REDIRECT_TO_NEWDRAFT_QUERY } from 'tradera/apps/syi/constants';\nimport { OPTIONAL_LANG } from 'tradera/apps/tradera/helpers/optional-lang';\nimport PAGE_TYPES from 'tradera/constants/page-types';\n\nexport const myTraderaUrls = {\n overview: '/my/overview',\n overview2: '/my/overview2',\n buyerOverview: '/my/overview-buyer',\n sellerOverview: '/my/overview-seller',\n accountOverview: '/my/overview-my-account',\n wishlist: '/my/wish-list',\n profile: '/profile/items/:memberId/:cleanedMemberAlias',\n activeItems: '/my/active-items',\n itemsLost: '/my/items-lost',\n active: '/my/active',\n sold: '/my/sold',\n unsold: '/my/unsold',\n listings: '/my/listings',\n listingsUnsold: '/my/listings?tab=unsold',\n bidding: '/my/bidding',\n purchases: '/my/purchases',\n savedSearches: '/my/saved-searches',\n sellerList: '/my/seller-list',\n pickList: '/my/picklist',\n leaveFeedback: '/my/leave-feedback/:role',\n buyerFeedback: '/my/leave-feedback/buyer',\n sellerFeedback: '/my/leave-feedback/seller',\n myFeedback: '/my/feedback',\n invoices: '/my/invoices',\n templates: '/selling/templates',\n payouts: '/my/payouts',\n accounting: '/my/accounting',\n messaging: '/messaging',\n selling: `/selling?${REDIRECT_TO_NEWDRAFT_QUERY}`,\n sellingTemplates: '/selling/templates',\n settings: '/my/settings',\n settingsAccount: '/my/settings/account',\n settingsEmail: '/my/settings/email',\n settingsSelling: '/my/settings/selling',\n settingsNotifications: '/my/settings/notifications',\n settingsSecurity: '/my/settings/security',\n settingsPayouts: '/my/settings/payouts',\n settingsLocalization: '/my/settings/localization',\n buyShippingBags: '/tradera-shop/shipping-bags',\n payeeVerification: '/my/PayeeVerification',\n hyperwalletPayeeVerificationCompleted: '/my/PayeeVerificationCompleted',\n shippingCheckout: '/my/shipping/checkout',\n shippingBook: '/my/shipping',\n shippingConfirmation: '/my/shipping/confirmation/:shipmentCheckoutId',\n invoiceCheckout: '/my/invoices/payment/:invoiceId',\n invoiceConfirmation: '/my/invoices/confirmation/:invoiceId',\n traderaShop: '/tradera-shop',\n notFound: '/my/settings/*'\n} as const;\n\nexport const getMyTraderaUrls = (\n toLocalizedUrl: (url: string) => string\n): Record =>\n mapObject(myTraderaUrls, (url) => toLocalizedUrl(url));\n\nexport const myTraderaRouteUrls = mapObject(\n myTraderaUrls,\n (url) => `${OPTIONAL_LANG}${url}`\n);\n\nexport const myTraderaRoutes = mapObject(\n {\n SellerListPage: {\n path: myTraderaRouteUrls.sellerList\n },\n SavedSearchesPage: {\n path: myTraderaRouteUrls.savedSearches\n },\n PayeeVerificationPage: {\n path: myTraderaRouteUrls.payeeVerification\n },\n HyperwalletPayeeVerificationCompletedPage: {\n path: myTraderaRouteUrls.hyperwalletPayeeVerificationCompleted\n },\n BuyerActiveItemsPage: {\n path: myTraderaRouteUrls.activeItems\n },\n PurchasesPage: {\n path: myTraderaRouteUrls.purchases\n },\n ItemsLostPage: {\n path: myTraderaRouteUrls.itemsLost\n },\n BiddingPage: {\n path: myTraderaRouteUrls.bidding\n },\n ListingsPage: {\n path: myTraderaRouteUrls.listings\n },\n ListingsUnsoldPage: {\n path: myTraderaRouteUrls.listingsUnsold\n },\n ActivePage: {\n path: myTraderaRouteUrls.active\n },\n UnsoldPage: {\n path: myTraderaRouteUrls.unsold\n },\n PayoutsPage: {\n path: myTraderaRouteUrls.payouts\n },\n AccountingPage: {\n path: myTraderaRouteUrls.accounting\n },\n SettingsPage: {\n path: myTraderaRouteUrls.settings,\n exact: true\n },\n SettingsAccountPage: {\n path: myTraderaRouteUrls.settingsAccount\n },\n SettingsEmailPage: {\n path: myTraderaRouteUrls.settingsEmail\n },\n SettingsNotificationsPage: {\n path: myTraderaRouteUrls.settingsNotifications\n },\n SettingsSellingPage: {\n path: myTraderaRouteUrls.settingsSelling\n },\n SettingsSecurityPage: {\n path: myTraderaRouteUrls.settingsSecurity\n },\n SettingsPayoutsPage: {\n path: myTraderaRouteUrls.settingsPayouts\n },\n SettingsLocalizationPage: {\n path: myTraderaRouteUrls.settingsLocalization\n },\n LeaveFeedbackPage: {\n path: myTraderaRouteUrls.leaveFeedback\n },\n ShippingCheckoutPage: {\n path: myTraderaRouteUrls.shippingCheckout\n },\n ShippingConfirmationPage: {\n path: myTraderaRouteUrls.shippingConfirmation\n },\n NotFoundPage: {\n path: myTraderaRouteUrls.notFound\n },\n InvoicesPage: {\n path: myTraderaRouteUrls.invoices\n },\n InvoiceCheckoutPage: {\n path: myTraderaRouteUrls.invoiceCheckout\n },\n InvoiceConfirmationPage: {\n path: myTraderaRouteUrls.invoiceConfirmation\n },\n ShippingBookPage: {\n path: myTraderaRouteUrls.shippingBook\n },\n PickList: {\n path: myTraderaRouteUrls.pickList\n }\n },\n (route) => ({\n pageType: PAGE_TYPES.MY_TRADERA_PAGE,\n ...route\n })\n);\n","import { push, replace } from 'connected-react-router';\nimport qs from 'qs';\nimport {\n error,\n searching,\n selectMyTraderaState\n} from 'tradera/apps/my-tradera/app/state/reducers/my-tradera';\nimport { endItems } from '../../helpers/item-actions-helper';\nimport { logger } from 'packages/logger';\nimport Analytics from 'packages/analytics';\nimport { getAvailableQueryParams } from '../../helpers/route-helper';\nimport URLS from '../../constants/urls';\nimport fetch from '../../utils/fetch';\nimport featureToggles from '../../utils/feature-toggles';\nimport { selectCookiesState } from 'tradera/apps/my-tradera/app/state/reducers/cookies';\nimport { selectFiltersState } from 'tradera/apps/my-tradera/app/state/selectors/filters';\nimport { selectMyTraderaItemsState } from 'tradera/apps/my-tradera/app/state/reducers/my-tradera-items';\nimport { selectRouterState } from 'tradera/apps/my-tradera/app/state/selectors/router';\nimport { scrollToInitialScroll } from 'tradera/apps/my-tradera/app/state/actions/scroll-to-initial-scroll';\n\n/**\n * @param {function} dispatch dispatch redux action\n * @param {err} error error relayed from asynch call\n */\nconst handleError = (dispatch, e) => {\n dispatch(searching(false));\n dispatch(error(true));\n logger(e);\n};\n\nconst actionTypes = {\n BUYER_ACTIVE_ITEMS_HIDE: 'BUYER_ACTIVE_ITEMS_HIDE',\n BUYER_ACTIVE_ITEMS_SHOW: 'BUYER_ACTIVE_ITEMS_SHOW',\n UPDATE_ITEMS: 'UPDATE_ITEMS',\n COMPLETED_SEARCH: 'COMPLETED_SEARCH',\n OPEN_MORE: 'OPENED_MORE_BUTTON_DROPDOWN',\n SELECT_ITEM: 'SELECT_ITEM_CHECKBOX',\n SELECT_ALL_ITEMS: 'SELECT_ALL_ITEMS',\n REMOVE_ITEMS: 'REMOVE_ITEMS',\n OPEN_DEL_LISTING_ITEM: 'OPEN_DELETE_LISTING_ITEM',\n REMOVE_ALL_SELECTED: 'REMOVE_ALL_SELECTED_CHECKBOXES',\n UPDATE_ITEMS_WITH_ERROR: 'UPDATED_ALL_ITEMS_DUE_TO_ERROR',\n ITEM_HIDDEN: 'ITEM_HIDDEN',\n ITEM_SHOWN: 'ITEM_SHOWN',\n FEEDBACK_LEFT_BY_BUYER: 'FEEDBACK_LEFT_BY_BUYER',\n RESET_ITEMS: 'RESET_ITEMS',\n SET_RESTARTED: 'SET_RESTARTED',\n SET_NEW_SHIPPING_PRICE: 'SET_NEW_SHIPPING_PRICE'\n};\n\nconst updateItems = (value, page, listViewType) => ({\n type: actionTypes.UPDATE_ITEMS,\n payload: {\n value,\n page,\n listViewType,\n memberMessagingParticipation: true\n }\n});\n\nconst updateItemsWithError = () => ({\n type: actionTypes.UPDATE_ITEMS_WITH_ERROR\n});\n\nconst openMore = (itemId, pageName = false) => {\n if (pageName) {\n Analytics.trackEvent({\n category: pageName,\n action: 'Toggle',\n label: 'More'\n });\n }\n\n return {\n type: actionTypes.OPEN_MORE,\n payload: itemId\n };\n};\n\nconst selectItem = (itemId, listViewType, selectedFilterBar) => ({\n type: actionTypes.SELECT_ITEM,\n payload: {\n id: itemId,\n listViewType,\n selectedFilterBar\n }\n});\n\nconst resetSelectedCheckboxes = () => ({\n type: actionTypes.REMOVE_ALL_SELECTED\n});\n\nconst selectAllItems = (select, listViewType, selectedFilterBar, memberId) => ({\n type: actionTypes.SELECT_ALL_ITEMS,\n payload: {\n select,\n listViewType,\n selectedFilterBar,\n memberId\n }\n});\n\nconst removeItems = (itemIds) => ({\n type: actionTypes.REMOVE_ITEMS,\n payload: itemIds\n});\n\nconst updateURL = (url) => (dispatch, getState) => {\n const state = getState();\n const locationDescriptor = {\n pathname: url,\n search: qs.stringify(getAvailableQueryParams(state))\n };\n\n if (!window.location.search) {\n dispatch(replace(locationDescriptor));\n } else {\n dispatch(push(locationDescriptor));\n }\n};\n\nconst buyerActiveItemsHide = (itemIds, listViewType) => ({\n type: actionTypes.BUYER_ACTIVE_ITEMS_HIDE,\n payload: {\n ids: itemIds,\n listViewType: listViewType\n }\n});\n\nconst buyerActiveItemsShow = (itemIds, listViewType) => ({\n type: actionTypes.BUYER_ACTIVE_ITEMS_SHOW,\n payload: {\n ids: itemIds,\n listViewType: listViewType\n }\n});\n\nconst unsoldItemsHidden = (itemIds, listViewType) => ({\n type: actionTypes.ITEM_HIDDEN,\n payload: {\n ids: itemIds,\n listViewType: listViewType\n }\n});\n\nconst unsoldItemsShown = (itemIds, listViewType) => ({\n type: actionTypes.ITEM_SHOWN,\n payload: {\n ids: itemIds,\n listViewType: listViewType\n }\n});\n\nconst resetMyTraderaItems = () => ({\n type: actionTypes.RESET_ITEMS\n});\n\nconst cancelItem = (item) => (dispatch) => {\n dispatch(searching(true));\n endItems([item.itemId])\n .then((response) => {\n if (response && response.itemId) {\n dispatch(removeItems(response.itemId));\n }\n dispatch(resetSelectedCheckboxes());\n dispatch(searching(false));\n return;\n })\n .catch((error) => handleError(dispatch, error));\n};\n\nconst setRestarted = (itemIds, listViewType) => ({\n type: actionTypes.SET_RESTARTED,\n payload: {\n itemIds: itemIds,\n listViewType: listViewType\n }\n});\n\n/**\n * Tmp function until backend has changed its api\n * Manipulate paging params before sending to API;\n * @param {object} params - current state.filters.modifiers;\n */\nconst changeParamsForBackend = (params) => {\n const skip =\n params.paging && params.paging.page > 0\n ? (params.paging.page - 1) * params.paging.size\n : 0;\n const take =\n params.paging && params.paging.page > 0 ? params.paging.size * 1 : 25;\n\n const newPaging = {\n skip: skip < 0 ? 0 : skip,\n take: take\n };\n\n return {\n ...params,\n paging: newPaging\n };\n};\n\nconst runSearch =\n (\n page,\n shouldScrollToInitialScroll = false,\n listViewType,\n waitForBackend = false,\n dontModifyHistory = true\n ) =>\n async (dispatch, getState) => {\n if (!featureToggles.isMyTraderaElasticEnabled) {\n return;\n }\n\n const endPoint = page && page.searchUrl;\n\n if (!endPoint) {\n return;\n }\n\n const search = async () => {\n const state = getState();\n\n dispatch(searching(true));\n dispatch(error(false));\n dispatch(resetMyTraderaItems());\n dispatch(resetSelectedCheckboxes());\n\n try {\n const modifiers = selectFiltersState(state).modifiers;\n\n const routeBefore = getState().router.location.pathname;\n\n const data = await fetch(endPoint, {\n body: JSON.stringify(changeParamsForBackend(modifiers))\n });\n\n const routeAfter = getState().router.location.pathname;\n const routeHasChanged = routeAfter !== routeBefore;\n\n if (!routeHasChanged) {\n dispatch(updateItems(data, page.pageName, listViewType));\n }\n\n if (shouldScrollToInitialScroll === true) {\n scrollToInitialScroll();\n }\n dispatch(searching(false));\n return dispatch(error(false));\n } catch (error) {\n dispatch(updateItemsWithError());\n if (dontModifyHistory === false) {\n updateURL(\n dispatch,\n page.url,\n selectFiltersState(state).modifiers\n );\n }\n handleError(dispatch, error);\n }\n };\n\n // This is a hack to enable delay of searches since sometimes when modifying an item\n // outside of the SPA world, it could take some time for the backend to catch up\n if (waitForBackend === true) {\n setTimeout(search, 3000);\n } else {\n search();\n }\n };\n\nconst rebuildList = () => (dispatch, getState) => {\n const existingState = { ...selectMyTraderaItemsState(getState()) };\n if (!existingState.itemsByID) {\n return dispatch(error(true));\n }\n const state = getState();\n\n const pageName =\n selectMyTraderaState(state).page &&\n selectMyTraderaState(state).page[\n selectRouterState(state).location.pathname\n ] &&\n selectMyTraderaState(state).page[\n selectRouterState(state).location.pathname\n ].pageName;\n const items = existingState.itemsOrderedByID.map(\n (i) => existingState.itemsByID[i]\n );\n const newState = {\n currentTime: existingState.currentTime,\n paging: existingState.paging,\n statistics: existingState.statistics,\n items: items\n };\n dispatch(\n updateItems(\n newState,\n pageName,\n selectCookiesState(getState()).LIST_VIEW_TYPE\n )\n );\n};\n\n// From the more-menu\nconst buyerActiveItemsHideItems = (itemIds) => (dispatch) => {\n dispatch(searching(true));\n fetch(URLS.BUYER_ACTIVE_ITEMS_HIDE, {\n body: JSON.stringify({ ids: itemIds })\n })\n .then(() => {\n dispatch(error(false));\n dispatch(removeItems(itemIds));\n dispatch(searching(false));\n return;\n })\n .catch((error) => handleError(dispatch, error));\n};\n\n// From the more-menu\nconst buyerActiveItemsShowItems = (itemIds) => (dispatch) => {\n dispatch(searching(true));\n fetch(URLS.BUYER_ACTIVE_ITEMS_SHOW, {\n body: JSON.stringify({ ids: itemIds })\n })\n .then(() => {\n dispatch(error(false));\n dispatch(removeItems(itemIds));\n dispatch(searching(false));\n return;\n })\n .catch((error) => handleError(dispatch, error));\n};\n\nconst sellerUnhideUnsold = (itemIds, listViewType) => (dispatch) => {\n dispatch(searching(true));\n fetch(URLS.UNSOLDSHOW, {\n body: JSON.stringify({ ids: itemIds })\n })\n .then(() => {\n dispatch(error(false));\n dispatch(unsoldItemsShown(itemIds, listViewType));\n dispatch(searching(false));\n return;\n })\n .catch((error) => handleError(dispatch, error));\n};\n\nconst sellerHideUnsold = (itemIds, listViewType) => (dispatch) => {\n dispatch(searching(true));\n fetch(URLS.UNSOLDHIDE, {\n body: JSON.stringify({ ids: itemIds })\n })\n .then(() => {\n dispatch(error(false));\n dispatch(unsoldItemsHidden(itemIds, listViewType));\n dispatch(searching(false));\n return;\n })\n .catch((error) => handleError(dispatch, error));\n};\n\nconst setNewShippingPrice = (purchaseOrderId, shippingProvider, newPrice) => ({\n type: actionTypes.SET_NEW_SHIPPING_PRICE,\n purchaseOrderId,\n shippingProvider,\n newPrice\n});\n\nexport default {\n resetMyTraderaItems,\n handleError,\n actionTypes,\n cancelItem,\n buyerActiveItemsHide,\n buyerActiveItemsShow,\n buyerActiveItemsHideItems, // More menu\n buyerActiveItemsShowItems, // More menu\n updateItems,\n resetSelectedCheckboxes,\n openMore,\n updateURL,\n runSearch,\n selectItem,\n removeItems,\n selectAllItems,\n rebuildList,\n sellerUnhideUnsold,\n sellerHideUnsold,\n setRestarted,\n setNewShippingPrice,\n changeParamsForBackend\n};\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport getPayoutState from './initial-state';\nimport type { GetPayoutSettingsViewModelApiResponse } from 'tradera/state/services/types/webapi-member-generated';\n\nconst payoutSlice = createSlice({\n name: 'payout',\n initialState: getPayoutState(),\n reducers: {\n receivePayoutsSettings: (\n state,\n { payload }: PayloadAction\n ) => {\n state.payoutSettings = payload;\n state.isFetching = false;\n },\n removePayoutDestination: (state) => {\n state.payoutSettings = {\n ...state.payoutSettings,\n payoutDestination: undefined\n };\n },\n setFetching: (state, { payload }) => {\n state.isFetching = payload;\n }\n }\n});\n\nexport const { receivePayoutsSettings, removePayoutDestination, setFetching } =\n payoutSlice.actions;\n\nexport default payoutSlice.reducer;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport cookieUtil from 'tradera/utils/cookie';\nimport { MYTRADERA_DEFAULT_COOKIES } from 'tradera/constants/cookies';\nimport { logger } from 'packages/logger';\nimport { createSlice } from '@reduxjs/toolkit';\n\nconst defaultState = () => {\n const defaultCookies = {};\n Object.keys(MYTRADERA_DEFAULT_COOKIES).forEach((value) => {\n const val = cookieUtil.readCookie(MYTRADERA_DEFAULT_COOKIES[value].key);\n defaultCookies[value] = val\n ? val\n : MYTRADERA_DEFAULT_COOKIES[value].default;\n });\n return defaultCookies;\n};\n\nconst cookiesSlice = createSlice({\n name: 'cookies',\n initialState: defaultState(),\n reducers: {\n setCookie: {\n reducer: (state, { payload }) => {\n if (state[payload.name] !== payload.value) {\n state[payload.name] = payload.value;\n }\n },\n prepare: (payload) => {\n const { length, key } = MYTRADERA_DEFAULT_COOKIES[payload.name];\n try {\n cookieUtil.createCookie(key, payload.value, length);\n } catch (e) {\n logger(e);\n }\n return { payload };\n }\n }\n }\n});\n\nexport default cookiesSlice.reducer;\n\nexport const { setCookie } = cookiesSlice.actions;\n\nexport const selectCookiesState = (state) => state.views.myTradera.cookies;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport { setEnum } from 'tradera/apps/my-tradera/app/helpers/enums';\n\nconst initialState = {\n modifiers: {\n query: {},\n paging: {}\n },\n filterBar: null,\n shownFilters: null\n};\n\nconst resetPageIndex = (state) => ({\n page: 1,\n size: state.modifiers.paging.size\n});\n\nconst slice = createSlice({\n name: 'filters',\n initialState,\n reducers: {\n updatePageSize: (state, { payload }) => {\n state.modifiers.paging.page = 1;\n state.modifiers.paging.size = payload.size;\n },\n selectSortChange: (state, { payload }) => {\n state.modifiers.sort = {\n sorting: payload.sort,\n order: payload.sortOrder\n };\n state.modifiers.paging = resetPageIndex(state);\n },\n changeSortOrder: (state) => {\n state.modifiers.sort = {\n sorting: state.modifiers.sort.sorting,\n order:\n state.modifiers.sort.order === 'Descending'\n ? 'Ascending'\n : 'Descending'\n };\n state.modifiers.paging = resetPageIndex(state);\n },\n selectTypeChange: (state, { payload }) => {\n state.modifiers.itemType = payload.itemType;\n state.modifiers.paging = resetPageIndex(state);\n },\n setDateFrom: (state, { payload }) => {\n state.modifiers.dateRange.from = payload.from;\n state.modifiers.paging = resetPageIndex(state);\n },\n setSingleFilterValue: (state, { payload }) => {\n state.modifiers.sellerFilters[payload.filter] = payload.value;\n },\n setDateTo: (state, { payload }) => {\n state.modifiers.dateRange.to = payload.to;\n state.modifiers.paging = resetPageIndex(state);\n },\n filterByState: (state, { payload }) => {\n let showSelectFiltersDropDown = false;\n if (payload.selected === 'Valj') {\n showSelectFiltersDropDown =\n !state.filterBar.showSelectFiltersDropDown;\n }\n setSellerFilterBarModifiers(state, payload.selected);\n state.defaults = {\n ...state.defaults\n };\n state.modifiers.selectedFilterBar = payload.selected;\n state.modifiers.paging = resetPageIndex(state);\n state.filterBar.showSelectFiltersDropDown =\n showSelectFiltersDropDown;\n },\n changePage: (state, { payload }) => {\n state.modifiers.paging.page = payload.page;\n },\n resetDateRangeTo: (state) => {\n state.modifiers.dateRange.to =\n state.defaults.modifiers.dateRange.to;\n },\n resetDateRangeFrom: (state) => {\n state.modifiers.dateRange.from =\n state.defaults.modifiers.dateRange.from;\n },\n resetFilters: (state) => {\n state.modifiers = { ...state.defaults.modifiers };\n state.filterBar = {\n ...state.filterBar,\n ...state.defaults.filterBar\n };\n },\n changeSearchQuery: (state, { payload }) => {\n state.modifiers.query.searchQuery = payload.searchQuery;\n state.modifiers.sort = {\n sorting: 'BestMatch',\n order: 'Ascending'\n };\n state.modifiers.paging = resetPageIndex(state);\n },\n selectReservationPriceChange: (state, { payload }) => {\n state.modifiers.reservePriceReached = payload.reservePriceReached;\n state.modifiers.paging = resetPageIndex(state);\n },\n updateFiltersForSelectedPage: (state, { payload }) => {\n if (!payload.newFilters.modifiers) {\n return;\n }\n Object.keys(payload.newFilters).forEach(\n (key) => (state[key] = payload.newFilters[key])\n );\n state.defaults = {\n ...payload.defaultFilters\n };\n },\n setFiltersFromRouter: (state, { payload }) => {\n state.modifiers = payload.filters;\n }\n }\n});\n\nexport default slice.reducer;\n\nexport const {\n updatePageSize,\n selectTypeChange,\n selectSortChange,\n changeSortOrder,\n setDateFrom,\n setDateTo,\n changePage,\n changeSearchQuery,\n selectReservationPriceChange,\n setFiltersFromRouter,\n updateFiltersForSelectedPage,\n filterByState,\n setSingleFilterValue,\n resetFilters,\n resetDateRangeTo,\n resetDateRangeFrom\n} = slice.actions;\n\n/**\n * setSellerFilterBarModifiers\n * @param {object} state\n * @param {string} selected\n * @returns {object} state of 'filters' based on UI tab selection. Note: WebApi expects values as Capitalcase Enum;\n */\nconst setSellerFilterBarModifiers = (state, selected) => {\n if (selected === 'Valj') {\n return;\n }\n\n if (state.modifiers.sellerFilters) {\n Object.keys(state.modifiers.sellerFilters).forEach((key) => {\n state.modifiers.sellerFilters[key] = setEnum('All');\n });\n }\n\n if (state.modifiers.buyerFilters) {\n Object.keys(state.modifiers.buyerFilters).forEach((key) => {\n state.modifiers.buyerFilters[key] = setEnum('All');\n });\n }\n\n switch (selected) {\n case 'SellerNoFeedback':\n state.modifiers.sellerFilters.paid = setEnum(true);\n state.modifiers.sellerFilters.shipped = setEnum(true);\n state.modifiers.sellerFilters.feedbackLeft = setEnum(false);\n state.modifiers.sellerFilters.hidden = setEnum(false);\n break;\n case 'BuyerNoFeedback':\n state.modifiers.buyerFilters.feedbackLeft = setEnum(false);\n state.modifiers.buyerFilters.paid = setEnum(true);\n state.modifiers.buyerFilters.hidden = setEnum(false);\n break;\n case 'SellerNotPaid':\n state.modifiers.sellerFilters.paid = setEnum(false);\n state.modifiers.sellerFilters.shipped = setEnum(false);\n state.modifiers.sellerFilters.hidden = setEnum(false);\n break;\n case 'BuyerNotPaid':\n state.modifiers.buyerFilters.paid = setEnum(false);\n state.modifiers.buyerFilters.hidden = setEnum(false);\n break;\n case 'NotSent':\n state.modifiers.sellerFilters.paid = setEnum(true);\n state.modifiers.sellerFilters.shipped = setEnum(false);\n state.modifiers.sellerFilters.hidden = setEnum(false);\n break;\n case 'AllSold':\n case 'AllUnsold':\n state.modifiers.sellerFilters.hidden = setEnum(false);\n break;\n case 'SellerHidden':\n state.modifiers.sellerFilters.hidden = setEnum(true);\n break;\n case 'BuyerHidden':\n state.modifiers.buyerFilters.hidden = setEnum(true);\n break;\n case 'BuyerNotHidden':\n state.modifiers.buyerFilters.hidden = setEnum(false);\n break;\n case 'AllPurchases':\n state.modifiers.buyerFilters.hidden = setEnum(false);\n break;\n case 'AllBids':\n state.modifiers.hasBids = setEnum('All');\n break;\n case 'HasBids':\n state.modifiers.hasBids = setEnum(true);\n break;\n case 'NoBids':\n state.modifiers.hasBids = setEnum(false);\n break;\n case 'ItemsLostNotHidden':\n state.modifiers.buyerFilters.hidden = setEnum(false);\n break;\n case 'ItemsLostHidden':\n state.modifiers.buyerFilters.hidden = setEnum(true);\n break;\n default:\n break;\n }\n};\n","import myTraderaItemActions from '../state/actions/my-tradera-items';\nimport featureToggles from '../utils/feature-toggles';\nimport {\n openNewMessageModal,\n openModal,\n openShareModal\n} from 'tradera/state/ui/reducer';\nimport { types } from './item-actions-helper';\nimport { toLocalizedUrl } from 'tradera/utils/url';\nimport { getSrc } from 'tradera/components/item-card/item-card-parts/item-card-image-size';\nimport { getMessagingPageLink } from 'tradera/apps/my-tradera/app/helpers/messaging-helpers';\nimport { CANCEL_ITEM_MODAL_ID } from '../components/cancel-item-modal/cancel-item-modal';\n\nconst getId = (item) => item.key;\nconst getIds = (item) => [item.itemId];\n\n// isPrimaryAction = will be primary action unless one before has not already been set as primary action\n// Hence, the order of the actions matter.\nconst commonActions = (item) => ({\n sellSimilar: () => ({\n id: getId(item),\n type: types.LINK,\n label: 'Sälj liknande',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_sellSimilar'),\n url: `/selling/sell-similar/${item.itemId}`,\n gaLabel: 'SellSimilar',\n isVisible: () => true,\n isPrimaryAction: () => true\n })\n});\n\nexport const activeSellerActions = (item) => {\n const isShopItem = item.listing.itemType === 'Shopitem';\n const common = commonActions(item);\n\n const translationKeys = {\n shareHeader: 'myt_shareHeader',\n shareMailSubject: 'myt_shareViaMailSubject',\n shareMailBody: 'myt_shareViaMailBody',\n sharePinterestDescription: 'myt_shareViaPinterestDescription',\n shareLinkText: 'myt_shareLink'\n };\n\n const actions = [\n () => ({\n id: getId(item),\n type: isShopItem ? types.DISABLED : types.LINK,\n showTooltip: isShopItem,\n getTranslatedTooltip: (t) => t('myt_itemCard_shopItem_tooltip'),\n label: 'Ändra',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_update'),\n url: `/selling/edit/${item.itemId}`,\n gaLabel: isShopItem\n ? 'EditShopItem'\n : item.bidInformation.bidCount === 0\n ? 'EditItem'\n : 'AddText',\n isVisible: () => true,\n isPrimaryAction: () => true\n }),\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Dela',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_share'),\n gaLabel: 'ShareActiveSellingItem',\n isVisible: () => true,\n isPrimaryAction: () => false,\n dispatch: (dispatch, _props, preferredLanguageCode) => {\n const shareLinkHref = toLocalizedUrl(\n new URL(item.itemUrl, window.location.origin).href,\n preferredLanguageCode\n );\n dispatch(\n openShareModal({\n shareLinkHref,\n translationKeys,\n shareTitle: item.listing.shortDescription,\n shareImageUrl: item.listing.images.main.full\n })\n );\n }\n }),\n common.sellSimilar,\n () => ({\n id: getId(item),\n type: types.LINK,\n url: getMessagingPageLink(\n item.seller.id,\n item.bidInformation?.leadingBidder?.id,\n item.itemId,\n {\n traderaUserId: item.seller.id\n }\n ),\n label: 'Kontakta högstbjudande',\n getTranslatedLabel: (t) =>\n t('myt_itemCard_actions_contactHighestBidder'),\n dispatch: (dispatch, _props, _preferredLanguageCode, t) => {\n const itemSquareImage = getSrc(\n item.listing.images.mainTemplate ?? '',\n '{format}',\n 250\n );\n dispatch(\n openNewMessageModal({\n title: t('myt_itemCard_actions_contactHighestBidder'),\n itemId: item.itemId,\n senderId: item.seller.id,\n recipientId: item.bidInformation.leadingBidder.id,\n recipientAlias: item.bidInformation.leadingBidder.alias,\n itemTitle: item.listing.shortDescription,\n itemImageUrl: itemSquareImage,\n itemSellerId: item.seller.id\n })\n );\n },\n gaLabel: 'ContactHighestBidder',\n isVisible: () => {\n return (\n featureToggles.isMessagingEnabled &&\n item.bidInformation.bidCount > 0\n );\n },\n isPrimaryAction: () => false\n }),\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Avbryt annons',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_cancelItem'),\n dispatch: (dispatch) => {\n if (item.bidInformation.bidCount === 0) {\n dispatch(myTraderaItemActions.cancelItem(item));\n } else {\n dispatch(\n openModal({\n modalId: CANCEL_ITEM_MODAL_ID,\n data: {\n itemId: item.itemId\n }\n })\n );\n }\n },\n gaLabel: 'EndItem',\n isVisible: () => true,\n isPrimaryAction: () => true\n }),\n () => ({\n id: getId(item),\n type: types.LINK,\n label: 'Marknadsför',\n getTranslatedLabel: (t) => t('upsell_extras_button'),\n url: `/selling/features/${item.itemId}`,\n isVisible: () => true,\n isPromotedSecondaryAction: () => true\n })\n ];\n return actions;\n};\n\nexport const unsoldActions = (item, listViewType, memberId) => {\n const actions = [\n () => ({\n id: getId(item),\n type: types.LINK,\n label: item.listing.restart.hasRestartedChild\n ? 'Sälj liknande'\n : 'Lägg upp igen',\n getTranslatedLabel: (t) =>\n item.listing.restart.hasRestartedChild\n ? t('myt_itemCard_actions_sellSimilar')\n : t('myt_itemCard_actions_restart'),\n url: item.listing.restart.hasRestartedChild\n ? `/selling/sell-similar/${item.itemId}`\n : `/selling/restart/${item.itemId}`,\n gaLabel: 'Restart',\n isVisible: () => true,\n isPrimaryAction: () => true\n }),\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Dölj',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_hide'),\n dispatch: (dispatch) => {\n dispatch(\n myTraderaItemActions.sellerHideUnsold(\n getIds(item),\n listViewType\n )\n );\n },\n gaLabel: 'HideUnsold',\n isVisible: () =>\n !item.transaction && !item.hiddenByMember?.includes(memberId),\n isPrimaryAction: () => true\n }),\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Visa',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_show'),\n dispatch: (dispatch) => {\n dispatch(\n myTraderaItemActions.sellerUnhideUnsold(\n getIds(item),\n listViewType\n )\n );\n },\n gaLabel: 'UnhideUnsold',\n isVisible: () =>\n !item.transaction && item.hiddenByMember?.includes(memberId),\n isPrimaryAction: () => true\n })\n ];\n return actions;\n};\n","import myTraderaItemActions from '../state/actions/my-tradera-items';\n\nexport const types = {\n LINK: 'LINK',\n EXTERNAL_LINK: 'EXTERNAL_LINK',\n DISPATCH: 'DISPATCH'\n};\n\nconst getId = (item) => item.key;\nconst getIds = (item) => [item.itemId];\n\nconst fixItemUrlIfNeeded = (item = {}) => {\n // Fix this at backend?\n return item.itemUrl && item.itemUrl[0] !== '/'\n ? `/${item.itemUrl}`\n : item.itemUrl;\n};\n\n// isPrimaryAction = will be primary action unless one before has not already been set as primary action\n// Hence, the order of the actions matter.\nconst commonActions = (item) => {\n const actions = {\n itemsFromSeller: () => ({\n id: getId(item),\n type: types.LINK,\n label: 'Säljarens annonser',\n getTranslatedLabel: (t) =>\n t('myt_itemCard_actions_itemsFromSeller'),\n url: `/profile/items/${item.seller.id}/${item.seller.cleanedAlias}`,\n gaLabel: 'SellerOtherItems',\n isVisible: () => !item.haveMultipleRows,\n isPrimaryAction: () => true\n })\n };\n return actions;\n};\n\nexport const activeBuyerActions = (item, listViewType, memberId) => {\n const common = commonActions(item);\n const actions = [\n () => {\n const isLeading =\n item.bidInformation &&\n item.bidInformation.leadingBidder &&\n item.bidInformation.leadingBidder.id === memberId;\n const fixedItemUrl = fixItemUrlIfNeeded(item);\n return {\n id: getId(item),\n type: types.LINK,\n label: isLeading ? 'Öka maxbud' : 'Lägg bud',\n getTranslatedLabel: (t) =>\n isLeading\n ? t('myt_itemCard_actions_raiseMaxBid')\n : t('myt_itemCard_actions_placeBid'),\n url: fixedItemUrl,\n gaLabel: isLeading ? 'RaiseMaxBid' : 'PlaceBid',\n buttonTheme: 'success',\n isVisible: () => true,\n isPrimaryAction: () => true\n };\n },\n common.itemsFromSeller,\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Dölj',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_hide'),\n dispatch: (dispatch) => {\n dispatch(\n myTraderaItemActions.buyerActiveItemsHideItems(\n getIds(item),\n listViewType\n )\n );\n },\n gaLabel: 'HideBuyerActiveItem',\n isVisible: () =>\n (item.caller.leadingBidRemoved ||\n (item.bidInformation.leadingBidder &&\n item.bidInformation.leadingBidder.id !== memberId)) &&\n item.caller.hidden === false,\n isPrimaryAction: () => true\n }),\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Visa',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_show'),\n dispatch: (dispatch) => {\n dispatch(\n myTraderaItemActions.buyerActiveItemsShowItems(\n getIds(item),\n listViewType\n )\n );\n },\n gaLabel: 'ShowBuyerActiveItem',\n isVisible: () => item.caller.hidden === true, // User should always be able to Show a hidden item, no matter if leading or not\n isPrimaryAction: () => true\n })\n ];\n return actions;\n};\n\nexport const lostActions = (item, listViewType) => {\n const common = commonActions(item);\n const actions = [\n common.itemsFromSeller,\n () => ({\n id: getId(item),\n type: types.DISPATCH,\n label: 'Dölj',\n getTranslatedLabel: (t) => t('myt_itemCard_actions_hide'),\n dispatch: (dispatch) => {\n dispatch(\n myTraderaItemActions.buyerActiveItemsHideItems(\n getIds(item),\n listViewType\n )\n );\n },\n gaLabel: 'HideBuyerLostItem',\n isVisible: () => true,\n isPrimaryAction: () => true\n })\n ];\n return actions;\n};\n","import {\n activeSellerActions,\n unsoldActions\n} from '../../helpers/item-actions-helper-seller';\nimport {\n activeBuyerActions,\n lostActions\n} from '../../helpers/item-actions-helper-buyer';\nimport { PAGE_NAMES } from '../../constants/page';\nimport { logger } from 'packages/logger';\n\nexport const getActionsForItem = (item, listViewType, memberId, pageName) => {\n const secondaryActions = [];\n let primaryAction = null;\n let promotedSecondaryAction = null;\n\n const checkAndAdd = (action) => {\n try {\n if (!action.isVisible) {\n throw 'Action is not compatible: ' + action.label;\n }\n if (!action.isVisible()) {\n return;\n }\n if (primaryAction === null && action.isPrimaryAction()) {\n // eslint-disable-next-line better-mutation/no-mutation\n primaryAction = action;\n } else if (\n promotedSecondaryAction === null &&\n action.isPromotedSecondaryAction &&\n action.isPromotedSecondaryAction()\n ) {\n // eslint-disable-next-line better-mutation/no-mutation\n promotedSecondaryAction = action;\n\n // Keep it in secondary actions list for views where promoted secondary is not displayed,\n // and in case user misses promoted secondary button\n secondaryActions.push(action);\n } else {\n secondaryActions.push(action);\n }\n } catch (error) {\n logger(error);\n }\n };\n\n const resolveActions = (potentialActions) => {\n potentialActions.forEach((actionCreator) => {\n const action = actionCreator();\n checkAndAdd(action);\n });\n return {\n primaryAction,\n secondaryActions,\n promotedSecondaryAction\n };\n };\n\n let actionsForItem = [];\n switch (pageName) {\n case PAGE_NAMES.BuyerActiveItems:\n actionsForItem = resolveActions(\n activeBuyerActions(item, listViewType, memberId)\n );\n break;\n case PAGE_NAMES.BuyerItemsLost:\n actionsForItem = resolveActions(lostActions(item, listViewType));\n break;\n case PAGE_NAMES.SellerUnsold:\n actionsForItem = resolveActions(\n unsoldActions(item, listViewType, memberId)\n );\n break;\n case PAGE_NAMES.SellerActive:\n actionsForItem = resolveActions(activeSellerActions(item));\n break;\n default:\n throw (\n 'Actions for item and pageName ' + pageName + ' is not defined'\n );\n }\n return actionsForItem;\n};\n","import {\n getBuyerActiveItemsLabel,\n getBuyerItemsLostLabel,\n getActiveLabel,\n getUnsoldLabel\n} from './item-labels';\nimport { getActionsForItem } from './item-actions';\n\nimport { getColumns } from './item-columns';\nimport {\n buyerActiveItemsColumns,\n buyerItemsLostColumns,\n sellerActiveColumns,\n sellerUnsoldColumns\n} from './../../constants/column-definitions';\nimport { logger } from 'packages/logger';\nimport { PAGE_NAMES } from '../../constants/page';\n\n/**\n * @param {boolean} declares if response is incorrect;\n */\nconst hasIncorrectResponse = (response) =>\n !response ||\n response === null ||\n response === undefined ||\n typeof response === 'string';\n\n/**\n * @param {object} response - copy of the response with empty values;\n */\nconst createReturnObject = (response) => ({\n paging: response.paging,\n itemsOrderedByID: [],\n itemsByID: {},\n statistics: response.statistics,\n currentTime: response.currentTime,\n currentMemberId: response.currentMemberId,\n sellerEmail: response.sellerEmail || ''\n});\n\n/**\n * TODO\n * Describe the relationship of transactionID / PurchaseID for future developers;\n *\n * @param {object} item - the item from webApi\n * @returns {object} The single item transformed with all properties set as expected for the front end.\n * @desc - the purchase\n */\nconst getItem = (\n item,\n labelFunc,\n columnFunc,\n listType,\n listViewType,\n memberId,\n pageName\n) => ({\n ...item,\n key: item.transaction ? item.transaction.transactionId : item.itemId,\n bidInformation: {\n ...item.bidInformation,\n hasBids: item.bidInformation.bidCount > 0\n },\n label: labelFunc(item, memberId),\n actions: getActionsForItem(item, listViewType, memberId, pageName),\n columns: columnFunc(item, listType),\n shippingPrice: getCheapestShippingPrice(item),\n leadingBidder:\n item.bidInformation.leadingBidder && item.isActive\n ? item.bidInformation.leadingBidder\n : null,\n buyer:\n item.transaction && item.transaction.buyer\n ? item.transaction.buyer\n : null,\n itemUrl:\n item.itemUrl.substring(0, 1) === '/' ? item.itemUrl : `/${item.itemUrl}`\n});\n\nconst getCheapestShippingPrice = (item) => {\n const shippingOptions = (item.listing.shippingOptions || [])\n .filter(\n (option) =>\n option.shippingType !== 'Takeaway' &&\n option.shippingType !== 'TakeawayOnly'\n )\n .map(({ shippingCost }) => shippingCost);\n\n return shippingOptions.length > 0\n ? shippingOptions.reduce((prev, current) =>\n prev < current ? prev : current\n )\n : 0;\n};\n\n/**\n * @returns {Object} : Defines which labels and actions are used for each page\n */\nconst actionLabelMap = {\n [PAGE_NAMES.BuyerActiveItems]: {\n label: getBuyerActiveItemsLabel,\n columns: buyerActiveItemsColumns,\n pageName: PAGE_NAMES.BuyerActiveItems\n },\n [PAGE_NAMES.BuyerItemsLost]: {\n label: getBuyerItemsLostLabel,\n columns: buyerItemsLostColumns,\n pageName: PAGE_NAMES.BuyerItemsLost\n },\n [PAGE_NAMES.SellerActive]: {\n label: getActiveLabel,\n columns: sellerActiveColumns,\n pageName: PAGE_NAMES.SellerActive\n },\n [PAGE_NAMES.SellerUnsold]: {\n label: getUnsoldLabel,\n columns: sellerUnsoldColumns,\n pageName: PAGE_NAMES.SellerUnsold\n }\n};\n\nexport const getUnsoldItem = (item, listViewType) =>\n getItem(\n item,\n getUnsoldLabel,\n getColumns(sellerUnsoldColumns[listViewType], listViewType),\n actionLabelMap[PAGE_NAMES.SellerUnsold].columns[listViewType],\n listViewType,\n '',\n PAGE_NAMES.SellerUnsold\n );\n\n/**\n * @param {object} response - from webApi\n * @param {string} listViewType\n * @param {string} memberId\n * @param {boolean} memberMessagingParticipation\n * @param {string} pageName\n * @description creates an ordered list of items, with ui state set for frontend;\n */\nexport const getItemsInOrder = (response, listViewType, memberId, pageName) => {\n if (!actionLabelMap[pageName]) {\n try {\n throw actionLabelMap[pageName];\n } catch (e) {\n logger(e);\n }\n }\n const newItems = createReturnObject(response);\n if (hasIncorrectResponse(response)) {\n return newItems;\n }\n\n Object.keys(response.items).forEach((key) => {\n const item = response.items[key];\n let id = 1;\n switch (pageName) {\n case PAGE_NAMES.BuyerActiveItems:\n case PAGE_NAMES.BuyerItemsLost:\n case PAGE_NAMES.SellerUnsold:\n case PAGE_NAMES.SellerActive:\n id = item.itemId.toString();\n break;\n default:\n try {\n throw `trying to update state on undefined (${pageName}) pageName`;\n } catch (e) {\n logger(e);\n }\n }\n newItems.itemsOrderedByID.push(id);\n // eslint-disable-next-line better-mutation/no-mutation\n newItems.itemsByID[id] = getItem(\n item, //item,\n actionLabelMap[pageName].label, //labelFunc,\n getColumns(\n actionLabelMap[pageName].columns[listViewType],\n listViewType\n ), //columnFunc,\n actionLabelMap[pageName].columns[listViewType], //listType,\n listViewType, //listViewType,\n memberId, //memberId,\n actionLabelMap[pageName].pageName //pageName\n );\n });\n\n return newItems;\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { getUnsoldItem } from './items';\nimport { logger } from 'packages/logger';\nimport { findKeysByItemId } from '../../helpers/commands-helper.js';\nimport { isServer } from 'tradera/utils/nextjs';\n\nif (isServer) {\n // Do not remove this without also removing the disable of eslint better-mutation/no-mutation at top of file.\n throw new Error(\n 'This implementation is not compatible with SSR as global properties are shared between server instances'\n );\n}\n\nconst updateUnsoldLabelsAndActions = (item, listViewType) => {\n if (listViewType === undefined) {\n try {\n throw (\n 'updateUnsoldLabelsAndActions: listViewType === undefined, ' +\n item\n );\n } catch (e) {\n logger(e);\n }\n }\n return getUnsoldItem(item, listViewType);\n};\n\nconst setUnsoldItemHiddenState =\n (flag, listViewType) => (items, memberId) => (key) => {\n const item = items[key];\n if (!item) {\n try {\n throw `setUnsoldItemHiddenState failed. tried to find key ${key} in ${JSON.stringify(\n items\n )}`;\n } catch (err) {\n logger(err);\n }\n return [];\n }\n\n if (!item.hiddenByMember?.includes(memberId)) {\n item.removeFromList = true;\n }\n return updateUnsoldLabelsAndActions(item, listViewType, memberId);\n };\n\nconst setItemsHasRestartedChild = (flag, listViewType) => (items) => (key) => {\n const item = items[key];\n if (!item) {\n try {\n throw `setItemHasRestartedChild failed. tried to find key ${key} in ${JSON.stringify(\n items\n )}`;\n } catch (err) {\n logger(err);\n }\n return [];\n }\n\n item.listing.restart.hasRestartedChild = flag;\n return updateUnsoldLabelsAndActions(item, listViewType);\n};\n\nexport const markItemAsHiddenReducer = (state, action) => {\n const updatedItems = { ...state.itemsByID };\n const updateChangedItems = setUnsoldItemHiddenState(\n true,\n action.payload.listViewType\n )(updatedItems, state.currentMemberId);\n const findUpdatedKeysByItemId = findKeysByItemId(updatedItems);\n action.payload.ids.map(findUpdatedKeysByItemId).map(updateChangedItems);\n return updatedItems;\n};\n\nexport const markItemAsShownReducer = (state, action) => {\n const updatedItems = { ...state.itemsByID };\n const updateChangedItems = setUnsoldItemHiddenState(\n false,\n action.payload.listViewType\n )(updatedItems);\n const findUpdatedKeysByItemId = findKeysByItemId(updatedItems);\n action.payload.ids.map(findUpdatedKeysByItemId).map(updateChangedItems);\n return updatedItems;\n};\n\nexport const setRestartedReducer = (state, action) => {\n const stateItems = { ...state.itemsByID };\n const updateChangedItems = setItemsHasRestartedChild(\n true,\n action.payload.listViewType\n )(stateItems);\n const findUpdatedKeysByItemId = findKeysByItemId(stateItems);\n const updatedItems = action.payload.itemIds\n .map(findUpdatedKeysByItemId)\n .map(updateChangedItems);\n updatedItems.forEach((updatedItem) => {\n stateItems[updatedItem.key] = updatedItem;\n });\n return stateItems;\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport myTraderaItems from '../actions/my-tradera-items';\nimport { getItemsInOrder } from '../selectors/items';\nimport { listActions } from '../../helpers/list-helper';\n\nimport {\n markItemAsHiddenReducer,\n markItemAsShownReducer,\n setRestartedReducer\n} from '../selectors/seller-commands';\n\nimport { findKeysByPurchaseOrderId } from '../../helpers/commands-helper.js';\nimport { isServer } from 'tradera/utils/nextjs';\n\nif (isServer) {\n // Do not remove this without also removing the disable of eslint better-mutation/no-mutation at top of file.\n throw new Error(\n 'This implementation is not compatible with SSR as global properties are shared between server instances'\n );\n}\n\nexport default (state, action) => {\n state = state || {};\n\n const updateItems = () => {\n return {\n ...state,\n ...getItemsInOrder(\n action.payload.value,\n action.payload.listViewType,\n action.payload.value.currentMemberId,\n action.payload.page\n )\n };\n };\n\n /**\n * Called when server has an error\n * @returns {object} with basic structure needed for application.\n */\n const updateItemsWithError = () => ({\n ...state,\n itemsByID: {},\n itemsOrderedByID: [],\n statistics: {\n values: []\n },\n paging: {\n ...state.paging,\n totalItems: 0\n }\n });\n\n /**\n * Tells State which More Menu to open / close;\n * @returns {object} - new state\n */\n const openMore = () => ({\n ...state,\n isSubMenuOpen:\n action.payload === state.isSubMenuOpen ? false : action.payload\n });\n\n /**\n * Selects a specific item for bulk action;\n * @returns {object} new state\n */\n const selectItem = () => {\n let bulkChecked = false;\n if (\n !state.selectedCheckboxes ||\n state.selectedCheckboxes.length === 0\n ) {\n return {\n ...state,\n selectedCheckboxes: [action.payload.id],\n bulkChecked: bulkChecked\n };\n } else {\n let chosenBoxes = [...state.selectedCheckboxes];\n if (state.selectedCheckboxes.indexOf(action.payload.id) > -1) {\n bulkChecked = false;\n chosenBoxes = chosenBoxes.filter(\n (id) => id !== action.payload.id\n );\n } else {\n chosenBoxes.push(action.payload.id);\n }\n\n return {\n ...state,\n selectedCheckboxes: chosenBoxes,\n bulkChecked: bulkChecked\n };\n }\n };\n\n /**\n * Selects all items for bulk action\n * @returns {object} new state\n */\n const selectAllItems = () => {\n const checkIfActive = (item) => {\n const actions = listActions(\n action.payload.listViewType,\n action.payload.memberId,\n action.payload.selectedFilterBar,\n 0,\n () => {}\n );\n return actions.isCheckboxActive(item);\n };\n if (action.payload.select === true || !state.bulkChecked) {\n const allItemsWithBulk = Object.keys(state.itemsByID)\n .filter((itemId) => checkIfActive(state.itemsByID[itemId]))\n .map((id) => {\n return parseInt(id, 10);\n });\n return {\n ...state,\n selectedCheckboxes: allItemsWithBulk,\n bulkChecked: true\n };\n }\n\n return {\n ...state,\n selectedCheckboxes: [],\n bulkChecked: false\n };\n };\n\n const openDelListingItem = () => ({\n ...state,\n isOpenDeleteItem:\n action.payload === false ? false : !state.isOpenDeleteItem\n });\n\n const removeAllSelected = () => ({\n ...state,\n selectedCheckboxes: [],\n bulkChecked: false\n });\n\n const removeItems = () => {\n const newItemsOrderedByID = state.itemsOrderedByID.filter((id) =>\n action.payload.some(\n (element) => element.toString() === id.toString()\n )\n ? false\n : true\n );\n const newItems = {};\n newItemsOrderedByID.map(\n (item) => (newItems[item] = state.itemsByID[item])\n );\n return {\n ...state,\n itemsByID: newItems,\n itemsOrderedByID: newItemsOrderedByID\n };\n };\n\n const setNewShippingPrice = () => {\n const items = { ...state.itemsByID };\n const itemKeysForPurchaseOrderId = findKeysByPurchaseOrderId(items)(\n action.purchaseOrderId\n );\n const shippingDiscount = {\n shippingProvider: action.shippingProvider,\n price: action.newPrice\n };\n itemKeysForPurchaseOrderId.forEach((key) => {\n items[key] = {\n ...items[key],\n transaction: {\n ...items[key].transaction,\n shippingDiscount: shippingDiscount\n }\n };\n });\n return {\n ...state,\n itemsByID: items\n };\n };\n\n /**\n * Reset state to empty.\n */\n const resetItems = () => ({\n ...state,\n itemsByID: [],\n itemsOrderedByID: [],\n paging: {\n ...state.paging,\n totalItems: 0\n }\n });\n\n const itemHidden = () => ({\n ...state,\n itemsByID: markItemAsHiddenReducer(state, action)\n });\n const itemShown = () => ({\n ...state,\n itemsByID: markItemAsShownReducer(state, action)\n });\n const setRestarted = () => ({\n ...state,\n itemsByID: setRestartedReducer(state, action)\n });\n\n const def = () => state;\n\n const reducers = {\n [myTraderaItems.actionTypes.UPDATE_ITEMS]: updateItems,\n [myTraderaItems.actionTypes.UPDATE_ITEMS_WITH_ERROR]:\n updateItemsWithError,\n [myTraderaItems.actionTypes.OPEN_MORE]: openMore,\n [myTraderaItems.actionTypes.SELECT_ITEM]: selectItem,\n [myTraderaItems.actionTypes.SELECT_ALL_ITEMS]: selectAllItems,\n [myTraderaItems.actionTypes.OPEN_DEL_LISTING_ITEM]: openDelListingItem,\n [myTraderaItems.actionTypes.REMOVE_ALL_SELECTED]: removeAllSelected,\n [myTraderaItems.actionTypes.REMOVE_ITEMS]: removeItems,\n [myTraderaItems.actionTypes.ITEM_HIDDEN]: itemHidden,\n [myTraderaItems.actionTypes.ITEM_SHOWN]: itemShown,\n [myTraderaItems.actionTypes.RESET_ITEMS]: resetItems,\n [myTraderaItems.actionTypes.SET_RESTARTED]: setRestarted,\n [myTraderaItems.actionTypes.SET_NEW_SHIPPING_PRICE]: setNewShippingPrice\n };\n\n return !reducers[action.type] ? def() : reducers[action.type]();\n};\n\nexport const selectMyTraderaItemsState = (state) =>\n state.views.myTradera.myTraderaItems;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport initData from 'init-data';\nimport TEXT_STRINGS from 'tradera/apps/my-tradera/app/constants/text-strings';\nimport { createSlice } from '@reduxjs/toolkit';\n\nconst initialState = {\n isSearching: false,\n page: {},\n error: false,\n initData: {\n environment: initData.environment || '',\n version: initData.environment || '',\n title: initData.title || '',\n description: initData.description || ''\n },\n splitTests: initData.splitTests || null,\n memberAlias: initData ? initData.memberAlias : '',\n memberFirstName: initData ? initData.memberFirstName : '',\n memberId: initData ? initData.memberId : '',\n memberLastName: initData ? initData.memberLastName : '',\n memberCountryCodeIso2: initData ? initData.memberCountryCodeIso2 : null,\n memberMessagingParticipation: true,\n mobileMenu: false,\n mobileActions: false,\n changeShippingModal: {\n open: false,\n purchaseOrderId: null\n },\n shippingQrCodeModal: {\n open: false,\n purchaseOrderId: null\n }\n};\n\nconst slice = createSlice({\n name: 'my-tradera',\n initialState,\n reducers: {\n searching: (state, { payload }) => {\n state.isSearching = payload;\n },\n error: (state, { payload }) => {\n state.error =\n payload === true ? TEXT_STRINGS.ERRORS.GENERIC : payload;\n },\n openModal: (state, { payload }) => {\n state.openModal = payload;\n },\n setBreakPoint: (state, { payload }) => {\n state.breakpoint = payload;\n },\n mobileMenu: (state, { payload }) => {\n state.mobileMenu =\n payload && payload === false ? false : !state.mobileMenu;\n },\n mobileActions: (state, { payload }) => {\n state.mobileActions =\n payload && payload === false ? false : !state.mobileActions;\n },\n openChangeShipping: (state, { payload }) => {\n state.changeShippingModal.open = true;\n state.changeShippingModal.purchaseOrderId = payload.purchaseOrderId;\n state.changeShippingModal.receiverCountry =\n payload.receiverCountry || 'SE';\n },\n closeChangeShipping: (state) => {\n state.changeShippingModal.open = false;\n },\n openShippingQrCodeModal: (state, { payload }) => {\n state.shippingQrCodeModal.open = true;\n state.shippingQrCodeModal.purchaseOrderId = payload.purchaseOrderId;\n },\n closeShippingQrCodeModal: (state) => {\n state.shippingQrCodeModal.open = false;\n },\n setTranslatedRouteInformation: (state, { payload }) => {\n state.page = payload;\n }\n }\n});\n\nexport const selectMyTraderaState = (state) => state.views.myTradera.myTradera;\n\nexport default slice.reducer;\n\nexport const {\n openModal,\n searching,\n error,\n mobileMenu,\n mobileActions,\n setBreakPoint,\n openChangeShipping,\n closeChangeShipping,\n openShippingQrCodeModal,\n closeShippingQrCodeModal,\n setTranslatedRouteInformation\n} = slice.actions;\n","import 'react';\nimport { itemHasBidsButReservePriceNotReached } from './item-labels';\nimport { columns } from '../../constants/column-definitions';\nimport { PAGE_NAMES } from '../../constants/page';\nimport {\n getBidCount,\n getMaxBid,\n getShippingCost\n} from '../../helpers/item-helper';\nimport { infoItemComponents } from 'tradera/apps/my-tradera/app/components/listing/item/info-item-components';\n\nconst labels = {\n [columns.CurrentPrice]: 'Pris',\n [columns.TransactionDate]: 'Avslutad',\n [columns.EndDate]: 'Sluttid',\n [columns.ShippingCost]: 'Frakt',\n [columns.Bids]: '#Bud',\n [columns.ItemId]: 'Objektnr',\n [columns.OpeningBid]: 'Utrop',\n [columns.ReservePrice]: 'Res.pris',\n [columns.BuyItNow]: 'Köp nu',\n [columns.OwnReference]: 'Ref',\n [columns.MaxBid]: 'Maxbud',\n [columns.TimeLeft]: 'Tid kvar',\n [columns.MandatoryBuyerProtection]: 'Köparskydd'\n};\n\nconst columnCssClassCore = {\n [columns.CurrentPrice]: 'myt-list3__table-column-current-price', // show tablet\n [columns.TransactionDate]: 'myt-list3__table-column-end-date',\n [columns.EndDate]: 'myt-list3__table-column-end-date',\n [columns.ShippingCost]: 'myt-list3__table-column-shipping-cost', // show tablet\n [columns.Bids]: 'myt-list3__table-column-current-bids', // show tablet\n [columns.ItemId]: 'myt-list3__table-column-item-id',\n [columns.OpeningBid]: 'myt-list3__table-column-opening-bid',\n [columns.ReservePrice]: 'myt-list3__table-column-reserve-price',\n [columns.BuyItNow]: 'myt-list3__table-column-buy-it-now',\n [columns.OwnReference]: 'myt-list3__table-column-own-reference',\n [columns.MaxBid]: 'myt-list3__table-column-maxbid',\n [columns.TimeLeft]: 'myt-list3__table-column-timeleft',\n [columns.MandatoryBuyerProtection]:\n 'myt-list3__table-column-buyerprotection'\n};\n\nconst getCoreCssClass = (column) => columnCssClassCore[column];\nconst getHeading = (label, cssClass, columnKey) => ({\n term: label,\n cssClass: cssClass,\n columnKey\n});\n\nexport const getTranslatedColumnKey = (t, columnKey) => {\n switch (columnKey) {\n case columns.CurrentPrice:\n return t('myt_columns_price');\n case columns.TransactionDate:\n return t('myt_columns_transactionDate');\n case columns.EndDate:\n return t('myt_columns_endTime');\n case columns.ShippingCost:\n return t('myt_columns_shipping');\n case columns.Bids:\n return `#${t('myt_columns_bids')}`;\n case columns.ItemId:\n return t('myt_columns_objectNo');\n case columns.OpeningBid:\n return t('myt_columns_startingPrice');\n case columns.ReservePrice:\n return t('myt_columns_reservePrice');\n case columns.BuyItNow:\n return t('myt_columns_buyNow');\n case columns.OwnReference:\n return t('myt_columns_ownReference');\n case columns.MaxBid:\n return t('myt_columns_maxBid');\n case columns.TimeLeft:\n return t('myt_columns_timeLeft');\n case columns.MandatoryBuyerProtection:\n return t('myt_columns_buyerProtection');\n default:\n return '';\n }\n};\n\nexport const getHeadings = (t, columnDefinitions) => {\n return columnDefinitions\n ? columnDefinitions.map((columnKey) =>\n getHeading(\n getTranslatedColumnKey(t, columnKey),\n columnCssClassCore[columnKey]\n )\n )\n : [];\n};\n\nexport const getUserHeading = (t, pageName) => {\n const highestBidder = t('myt_columns_highestBidder');\n\n switch (pageName) {\n case PAGE_NAMES.BuyerActiveItems:\n return getHeading(\n highestBidder,\n 'myt-list3__table-column-counterpart'\n );\n case PAGE_NAMES.SellerActive:\n return getHeading(\n highestBidder,\n 'myt-list3__table-column-counterpart'\n );\n case PAGE_NAMES.SellerUnsold:\n return getHeading(\n highestBidder,\n 'myt-list3__table-column-counterpart'\n );\n default:\n return null;\n }\n};\n\n/**\n * @name GetColumns\n * @desc Builds the columns out for a single item;\n */\nexport const getColumns = (columnDefinitions, listViewType) => (item) => {\n const getColumn = (label, value, cssClass, title, columnKey) => ({\n term: label,\n definition: value,\n cssClass: cssClass,\n tagTitle: title,\n columnKey\n });\n\n const hasTransactionDate =\n !!item &&\n item.transaction &&\n item.transaction &&\n item.transaction.transactionDate;\n const price = item.transaction\n ? parseInt(item.transaction.price)\n : parseInt(item.currentPrice);\n\n const getCurrentPriceMeta = () =>\n itemHasBidsButReservePriceNotReached(item)\n ? columnCssClassCore[columns.CurrentPrice] + ' text-danger bold'\n : columnCssClassCore[columns.CurrentPrice];\n\n const getItemId = item.itemId;\n const itemType = item.listing.itemType;\n const hasHighestBidder =\n item && item.bidInformation && item.bidInformation.leadingBidder\n ? true\n : false;\n const shouldShowBids =\n itemType === 'Auction' ||\n (hasHighestBidder && itemType === 'AuctionBin') ||\n (hasHighestBidder &&\n item.transaction &&\n item.listing.purchaseType === 'Auction')\n ? true\n : false;\n const bidCount = getBidCount(item);\n const getTransactionDate = hasTransactionDate\n ? item.transaction.transactionDate.formatted\n : null;\n const getEndDate = item.listing.endDate.formatted;\n const getCurrentPrice = () => ({\n component: infoItemComponents.ITEM_PRICE,\n transaction: item.transaction,\n price: price\n });\n const getTimeLeftAsString = item.listing.timeLeft\n ? item.listing.timeLeft.timeleft\n : null;\n\n const columnCssClass = {\n [columns.CurrentPrice]: getCurrentPriceMeta(),\n [columns.TransactionDate]:\n getCoreCssClass(columns.TransactionDate) +\n (hasTransactionDate && item.transaction.transactionDate.critical\n ? ' text-danger'\n : ''),\n [columns.EndDate]:\n getCoreCssClass(columns.EndDate) +\n (item.listing.endDate.critical ? ' text-danger' : ''),\n [columns.ShippingCost]: getCoreCssClass(columns.ShippingCost),\n [columns.Bids]: getCoreCssClass(columns.Bids),\n [columns.ItemId]: getCoreCssClass(columns.ItemId),\n [columns.OpeningBid]: getCoreCssClass(columns.OpeningBid),\n [columns.ReservePrice]: getCoreCssClass(columns.ReservePrice),\n [columns.BuyItNow]: getCoreCssClass(columns.BuyItNow),\n [columns.OwnReference]: getCoreCssClass(columns.OwnReference),\n [columns.Discount]: getCoreCssClass(columns.Discount) + ' text-danger',\n [columns.TimeLeft]: getCoreCssClass(columns.TimeLeft),\n [columns.MaxBid]: getCoreCssClass(columns.MaxBid),\n [columns.MandatoryBuyerProtection]: ''\n };\n\n const columnTitle = {\n [columns.CurrentPrice]: itemHasBidsButReservePriceNotReached(item)\n ? 'Reservationspris ej uppnått'\n : price,\n [columns.TransactionDate]: hasTransactionDate\n ? item.transaction.transactionDate.full\n : null,\n [columns.EndDate]:\n item &&\n item.listing &&\n item.listing.endDate &&\n item.listing.endDate.critical\n ? item.listing.timeLeft.timeleft\n : item.listing.endDate.full,\n [columns.ShippingCost]: '',\n [columns.Bids]: bidCount,\n [columns.ItemId]: '',\n [columns.OpeningBid]: '',\n [columns.ReservePrice]: '',\n [columns.BuyItNow]: '',\n [columns.OwnReference]: '',\n [columns.Discount]: '',\n [columns.TimeLeft]: getTimeLeftAsString,\n [columns.MandatoryBuyerProtection]: ''\n };\n\n const getBids =\n shouldShowBids && bidCount\n ? {\n component: infoItemComponents.BIDS,\n itemId: getItemId,\n bidCount: bidCount\n }\n : '-';\n const getOpeningBid =\n item.listing.pricing.openingBid > 0\n ? item.listing.pricing.openingBid\n : ' ';\n const getReservePrice =\n item.listing.pricing.reservePrice > 0\n ? item.listing.pricing.reservePrice\n : 0;\n const getBuyItNow =\n item.listing.pricing.buyItNow > 0 ? item.listing.pricing.buyItNow : 0;\n const getOwnReference = item.listing.ownReference\n ? item.listing.ownReference\n : ' ';\n const getDefinitionForPriceLabel = (price) => ({\n component: infoItemComponents.PRICE_LABEL,\n price\n });\n const getTimeLeft = {\n component: infoItemComponents.TIME_LEFT,\n timeLeft: item.listing.timeLeft\n };\n const shippingCost = getShippingCost(item, listViewType)();\n const getBuyerProtectionCost = () => ({\n component: infoItemComponents.MANDATORY_BUYER_PROTECTION,\n price: item.listing.pricing.buyerProtectionCost\n });\n\n const definitions = {\n [columns.CurrentPrice]: getCurrentPrice(),\n [columns.TransactionDate]: getTransactionDate,\n [columns.EndDate]: getEndDate,\n [columns.ShippingCost]: shippingCost,\n [columns.Bids]: getBids,\n [columns.ItemId]: getItemId,\n [columns.OpeningBid]: getOpeningBid,\n [columns.ReservePrice]: getDefinitionForPriceLabel(getReservePrice),\n [columns.BuyItNow]: getDefinitionForPriceLabel(getBuyItNow),\n [columns.OwnReference]: getOwnReference,\n [columns.MaxBid]: getDefinitionForPriceLabel(getMaxBid(item)),\n [columns.TimeLeft]: getTimeLeft,\n [columns.MandatoryBuyerProtection]: getBuyerProtectionCost()\n };\n\n return columnDefinitions.map((columnKey) =>\n getColumn(\n columnKey === 'CurrentPrice' ? undefined : labels[columnKey],\n definitions[columnKey],\n columnCssClass[columnKey],\n columnTitle[columnKey],\n columnKey\n )\n );\n};\n\nexport default {\n getColumns,\n getHeadings\n};\n","export const getTranslatedImageLabel = (t, labelKey) => {\n switch (labelKey) {\n case buyerActiveItemsLabelKeys.RESERVE_PRICE_NOT_REACHED:\n case activeLabelKeys.RESERVE_PRICE_NOT_REACHED:\n case unsoldLabelKeys.RESERVE_PRICE_NOT_REACHED:\n return t('myt_itemCard_imgLabel_reservePriceNotReached');\n case soldLabelKeys.NOT_PAID:\n case purchasesLabelKeys.NOT_PAID:\n return t('myt_itemCard_imgLabel_notPaid');\n case unsoldLabelKeys.NOT_PAID:\n return t('myt_itemCard_imgLabel_unsoldNotPaid');\n case soldLabelKeys.PAYMENT_PENDING:\n case purchasesLabelKeys.PAYMENT_PENDING:\n return t('myt_itemCard_imgLabel_paymentPending');\n case soldLabelKeys.PAID:\n case purchasesLabelKeys.PAID:\n return t('myt_itemCard_imgLabel_paid');\n case soldLabelKeys.DONE:\n case purchasesLabelKeys.DONE:\n return t('myt_itemCard_imgLabel_done');\n case buyerActiveItemsLabelKeys.LEADING:\n return t('myt_itemCard_imgLabel_leading');\n case buyerActiveItemsLabelKeys.OVERBIDDEN:\n return t('myt_itemCard_imgLabel_overbidden');\n case buyerActiveItemsLabelKeys.BID_REMOVED:\n return t('myt_itemCard_imgLabel_bidRemoved');\n case activeLabelKeys.NOT_STARTED:\n return t('myt_itemCard_imgLabel_notStarted');\n case activeLabelKeys.HAS_BIDS:\n return t('myt_itemCard_imgLabel_hasBids');\n case activeLabelKeys.ACTIVE:\n return t('myt_itemCard_imgLabel_active');\n case activeLabelKeys.SOLD:\n return t('myt_itemCard_imgLabel_sold');\n case activeLabelKeys.NOT_SOLD:\n return t('myt_itemCard_imgLabel_notSold');\n case soldLabelKeys.SHIPPING_BOOKED:\n return t('myt_itemCard_imgLabel_shippingBooked');\n case soldLabelKeys.SHIPPED:\n case purchasesLabelKeys.SHIPPED:\n return t('myt_itemCard_imgLabel_shipped');\n case unsoldLabelKeys.FORICBLY_CLOSED:\n return t('myt_itemCard_imgLabel_forciblyClosed');\n case unsoldLabelKeys.RESTARTED:\n return t('myt_itemCard_imgLabel_restarted');\n case itemLostLabelKeys.REMOVED:\n return t('myt_itemCard_imgLabel_removed');\n case itemLostLabelKeys.LOST:\n return t('myt_itemCard_imgLabel_lost');\n default:\n return '';\n }\n};\n\nconst buyerActiveItemsLabelKeys = {\n RESERVE_PRICE_NOT_REACHED: 'BUYER_RESERVE_PRICE_NOT_REACHED',\n LEADING: 'LEADING',\n OVERBIDDEN: 'OVERBIDDEN',\n BID_REMOVED: 'BID_REMOVED'\n};\n\nconst activeLabelKeys = {\n NOT_STARTED: 'NOT_STARTED',\n RESERVE_PRICE_NOT_REACHED: 'ACTIVE_RESERVE_PRICE_NOT_REACHED',\n HAS_BIDS: 'HAS_BIDS',\n ACTIVE: 'ACTIVE',\n SOLD: 'SOLD',\n NOT_SOLD: 'NOT_SOLD'\n};\n\nconst soldLabelKeys = {\n NOT_PAID: 'SOLD_NOT_PAID',\n PAYMENT_PENDING: 'PAYMENT_PENDING',\n PAID: 'SOLD_PAID',\n SHIPPING_BOOKED: 'SHIPPING_BOOKED',\n SHIPPED: 'SHIPPED',\n DONE: 'SOLD_DONE'\n};\n\nconst unsoldLabelKeys = {\n NOT_PAID: 'UNSOLD_NOT_PAID',\n RESERVE_PRICE_NOT_REACHED: 'UNSOLD_RESERVE_PRICE_NOT_REACHED',\n FORICBLY_CLOSED: 'FORCIBLY_CLOSED',\n RESTARTED: 'RESTARTED'\n};\n\nconst purchasesLabelKeys = {\n NOT_PAID: 'PURHCASED_NOT_PAID',\n PAYMENT_PENDING: 'PAYMENT_PENDING',\n PAID: 'PURCHASED_PAID',\n SHIPPED: 'SHIPPED',\n DONE: 'PURCHASED_DONE'\n};\n\nconst itemLostLabelKeys = {\n LOST: 'LOST',\n REMOVED: 'ITEMLOST_REMOVED '\n};\n\nconst buyerActiveItemsLabels = {\n reservePriceNotReached: {\n key: buyerActiveItemsLabelKeys.RESERVE_PRICE_NOT_REACHED,\n color: 'red'\n },\n leading: {\n key: buyerActiveItemsLabelKeys.LEADING,\n color: 'green'\n },\n overbidden: {\n key: buyerActiveItemsLabelKeys.OVERBIDDEN,\n color: 'red'\n },\n bidRemoved: {\n key: buyerActiveItemsLabelKeys.BID_REMOVED,\n color: 'grey-hard'\n }\n};\n\nconst activeLabels = {\n notStarted: {\n key: activeLabelKeys.NOT_STARTED,\n color: 'grey-soft'\n },\n reservePriceNotReached: {\n key: activeLabelKeys.RESERVE_PRICE_NOT_REACHED,\n color: 'red'\n },\n hasBids: { key: activeLabelKeys.HAS_BIDS, color: 'green' },\n active: { key: activeLabelKeys.ACTIVE, color: 'blue' },\n sold: { key: activeLabelKeys.SOLD, color: 'green' },\n notSold: {\n key: activeLabelKeys.NOT_SOLD,\n color: 'grey-soft'\n }\n};\n\nconst unsoldLabels = {\n notPaid: {\n key: unsoldLabelKeys.NOT_PAID,\n color: 'grey-hard'\n },\n reservePriceNotReached: {\n key: unsoldLabelKeys.RESERVE_PRICE_NOT_REACHED,\n color: 'red'\n },\n forciblyClosed: {\n key: unsoldLabelKeys.FORICBLY_CLOSED,\n color: 'red'\n },\n restarted: {\n key: unsoldLabelKeys.RESTARTED,\n color: 'blue'\n }\n};\n\nconst itemLostLabels = {\n lost: {\n key: itemLostLabelKeys.LOST,\n color: 'grey-hard'\n },\n removed: {\n key: itemLostLabelKeys.REMOVED,\n color: 'grey-hard'\n }\n};\n\nexport const itemHasBids = (item) => item.bidInformation.bidCount > 0;\nexport const itemHasBidsButReservePriceNotReached = (item) =>\n item.transaction\n ? false\n : itemHasBids(item) &&\n !item.reservePriceReached &&\n item.listing.pricing.reservePrice !== -1;\n\nconst getActiveActiveLabel = (item) => {\n if (itemHasBidsButReservePriceNotReached(item)) {\n return activeLabels.reservePriceNotReached;\n }\n return itemHasBids(item) ? activeLabels.hasBids : activeLabels.active;\n};\n\nexport const getActiveLabel = (item) => {\n switch (item.activityType) {\n case 'NotPublished':\n return activeLabels.notStarted;\n case 'Active':\n return getActiveActiveLabel(item);\n case 'Sold':\n return activeLabels.sold;\n case 'Unsold':\n return activeLabels.unSold;\n }\n};\n\nexport const getUnsoldLabel = (item) => {\n if (item && item.listing.restart.hasRestartedChild) {\n return unsoldLabels.restarted;\n }\n if (item && item.forciblyClosed && item.forciblyClosed.closed) {\n return unsoldLabels.forciblyClosed;\n }\n if (itemHasBidsButReservePriceNotReached(item)) {\n return unsoldLabels.reservePriceNotReached;\n }\n return unsoldLabels.notPaid;\n};\n\nexport const getBuyerActiveItemsLabel = (item, memberId) => {\n if (item.caller.leadingBidRemoved === true) {\n return buyerActiveItemsLabels.bidRemoved;\n }\n\n if (\n item.bidInformation.leadingBidder &&\n item.bidInformation.leadingBidder.id === memberId\n ) {\n if (!item.reservePriceReached) {\n return buyerActiveItemsLabels.reservePriceNotReached;\n }\n return buyerActiveItemsLabels.leading;\n } else {\n return buyerActiveItemsLabels.overbidden;\n }\n};\n\nexport const getBuyerItemsLostLabel = (item) => {\n if (item && item.forciblyClosed && item.forciblyClosed.closed) {\n return {\n ...itemLostLabels.removed\n };\n }\n\n return {\n ...itemLostLabels.lost\n };\n};\n","import initData from 'init-data';\n\nconst isEnabled = (key) => {\n return (\n initData && initData.featureSwitches && initData.featureSwitches[key]\n );\n};\n\nexport const errors = {\n ELASTIC_MYTRADERA:\n 'Just nu har vi driftstörningar på delar av Mitt Tradera. Vi arbetar på att lösa problemet.'\n};\n\n// ATTENTION!\n// Do not any more dependencies to initData.featureSwitches!\n// Feature switches MUST be read from Redux.\n// The functions below must only be used in MyTradera and the only\n// reason they are still here is because it requires large changes\n// to MyTradera to get rid of them.\nexport default {\n isMyTraderaElasticEnabled: isEnabled('mytradera-elasticsearch'),\n isMessagingEnabled: isEnabled('messaging'),\n isPennybridgeCharitiesEnabled: isEnabled('pennybridge-charities'),\n isDiscontinuedSaleEnabled: isEnabled('discontinued-sale'),\n isDiscontinuedSaleMessagingEnabled: isEnabled(\n 'discontinued-sale-messaging'\n ),\n isDisputeV2AddEnabled: isEnabled('dispute-v2-add')\n};\n","import qs from 'qs';\nimport { createApi } from '@reduxjs/toolkit/query/react';\nimport {\n PickListFilterShippedStatus,\n type MarkAsPaidBySellerApiRequest,\n type MarkAsPaidBySellerApiResponse,\n type MemberPickListV2ApiResponse,\n type PicklistV2Request,\n type SetItemShippedApiRequest,\n type SetItemShippedApiResponse,\n type SetTransactionVisibilityApiRequest,\n type SetTransactionVisibilityApiResponse,\n PickListFilterPaidStatus\n} from 'tradera/state/services/types/webapi-member-generated';\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\nimport {\n updatePaidStatusForBuyerItems,\n updateShippingStatusForBuyerItems,\n updateVisibilityStatusForBuyerItems\n} from './pick-list-item-updater';\nimport type { AppDispatch } from 'tradera/state/configure-store';\n\nexport const PickListTagTypes = { PickListItems: 'PickListItems' } as const;\nconst getPickListItemsCacheKeys: Set = new Set();\n\nexport const pickListApi = createApi({\n reducerPath: 'pickListApi',\n baseQuery: isomorphicWebApiBaseQuery,\n tagTypes: Object.values(PickListTagTypes),\n endpoints: (builder) => ({\n markAsShipped: builder.mutation<\n SetItemShippedApiResponse,\n SetItemShippedApiRequest\n >({\n query: (payload) => {\n return {\n url: '/api/webapi/member/selling/item-shipped',\n method: 'POST',\n body: payload\n };\n },\n async onQueryStarted(patch, { dispatch, queryFulfilled }) {\n const patchResults = [];\n for (const cacheKey of getPickListItemsCacheKeys) {\n const patchResult = dispatch(\n pickListApi.util.updateQueryData(\n 'getPickListItems',\n cacheKey,\n (draft) => {\n const updatedItems =\n updateShippingStatusForBuyerItems(\n patch,\n draft.items\n );\n\n Object.assign(draft, {\n items: updatedItems\n });\n }\n )\n );\n\n patchResults.push(patchResult);\n }\n\n try {\n await queryFulfilled;\n } catch {\n for (const patch of patchResults) {\n patch.undo();\n }\n }\n }\n }),\n markAsPaidBySeller: builder.mutation<\n MarkAsPaidBySellerApiResponse,\n MarkAsPaidBySellerApiRequest\n >({\n query: (payload) => {\n return {\n url: '/api/webapi/member/selling/marked-as-paid-by-seller',\n method: 'POST',\n body: payload\n };\n },\n async onQueryStarted(patch, { dispatch, queryFulfilled }) {\n const patchResults = [];\n for (const cacheKey of getPickListItemsCacheKeys) {\n const patchResult = dispatch(\n pickListApi.util.updateQueryData(\n 'getPickListItems',\n cacheKey,\n (draft) => {\n const updatedItems =\n updatePaidStatusForBuyerItems(\n patch,\n draft.items\n );\n\n Object.assign(draft, {\n items: updatedItems\n });\n }\n )\n );\n\n patchResults.push(patchResult);\n }\n\n try {\n await queryFulfilled;\n } catch {\n for (const patch of patchResults) {\n patch.undo();\n }\n }\n }\n }),\n setItemVisibility: builder.mutation<\n SetTransactionVisibilityApiResponse,\n SetTransactionVisibilityApiRequest\n >({\n query: (payload) => {\n return {\n url: '/api/webapi/member/transaction-visibility',\n method: 'POST',\n body: payload\n };\n },\n transformResponse: (res: SetTransactionVisibilityApiResponse) => {\n if (res?.responseStatus?.errorCode) {\n throw new Error('Error occured');\n }\n\n return res;\n },\n async onQueryStarted(patch, { dispatch, queryFulfilled }) {\n /*\n * On each request to getPickListItems we store the request in a list.\n * The request is used as a key to the cache for a request. By storing all the\n * requests it allows us to go through the cache and update the items and\n * perform optimistic updates.\n *\n * So what we do here is go through the cache of all the requests that the user has\n * done to getPickListItems\n */\n const patchResults = [];\n for (const cacheKey of getPickListItemsCacheKeys) {\n /*\n * Here we are accessing the cache for getPickListItems and performing an update\n * on the items, simulating what the backend would do to them. draft is the items\n * and patch is the mutation arguments, in this case: purchaseOrderId and hidden.\n *\n * updateVisibilityStatusForBuyerItems will go through all the buyers and set\n * isHiddenBySeller to true or false depending on what the patch.hidden is,\n * then filter away all the items that is no longer matching the patch\n */\n const patchResult = dispatch(\n pickListApi.util.updateQueryData(\n 'getPickListItems',\n cacheKey,\n (draft) => {\n const updatedBuyers =\n updateVisibilityStatusForBuyerItems(\n patch,\n draft.items\n );\n\n Object.assign(draft, {\n items: updatedBuyers\n });\n }\n )\n );\n\n /*\n * We add every patch to a list of patches. If the request fails\n * then we will go through every patch and undo it.\n */\n patchResults.push(patchResult);\n }\n\n try {\n await queryFulfilled;\n } catch {\n for (const patch of patchResults) {\n patch.undo();\n }\n }\n },\n invalidatesTags: (resp, err, req) => {\n const cacheKeys = [...getPickListItemsCacheKeys];\n\n /*\n * If we have more than one page, then we want to invalidate all tags\n * since the items will shift around\n */\n const hasMoreThanOnePage = cacheKeys.some(\n (key) => key?.skip ?? 0 >= (key?.take ?? -1)\n );\n\n if (hasMoreThanOnePage) {\n return [\n {\n type: PickListTagTypes.PickListItems\n }\n ];\n }\n\n /*\n * If the request goes well, then we do want to invalidate some tags.\n * By invalidating the tags we are telling RTKQ that the cache of these requests is\n * no longer valid and we want to refetch that request the next time it is requested.\n * We decide which tags to be invalidated by going through all cacheKeys, which\n * conveniently has the same id as the ids to the tags.\n *\n * Since we can easily remove items from the cache, it is not as easy to add items.\n * Therefore we will invalidate those tags where an item has been added. When we\n * hide an item, that means that we added an item to the request that has the filter\n * retrieveHidden = false. So we can invalidate all the tags where this item would now\n * appear (key.retrieveHidden === req.hidden)\n */\n const tagsToInvalidate = cacheKeys\n .filter((key) => key.retrieveHidden === req.hidden)\n .map((key) => ({\n type: PickListTagTypes.PickListItems,\n id: JSON.stringify(key)\n }));\n\n return tagsToInvalidate;\n }\n }),\n getPickListItems: builder.query<\n MemberPickListV2ApiResponse,\n PicklistV2Request\n >({\n query: (query) => {\n getPickListItemsCacheKeys.add(query);\n\n const stringified = qs.stringify(query);\n return `/api/webapi/member/selling/picklist-v2?${stringified}`;\n },\n\n providesTags: (resp, err, req) => [\n {\n type: PickListTagTypes.PickListItems,\n id: JSON.stringify(req)\n }\n ]\n })\n })\n});\n\nexport const invalidateTagsOnShippedStatus = () => (dispatch: AppDispatch) => {\n const cacheKeys = [...getPickListItemsCacheKeys];\n const tagsToInvalidate = cacheKeys\n .filter((key) => key.shippedStatus !== PickListFilterShippedStatus.All)\n .map((key) => ({\n type: PickListTagTypes.PickListItems,\n id: JSON.stringify(key)\n }));\n\n dispatch(pickListApi.util.invalidateTags(tagsToInvalidate));\n};\n\nexport const invalidateTagsOnPaidStatus = () => (dispatch: AppDispatch) => {\n const cacheKeys = [...getPickListItemsCacheKeys];\n const tagsToInvalidate = cacheKeys\n .filter((key) => key.paidStatus !== PickListFilterPaidStatus.All)\n .map((key) => ({\n type: PickListTagTypes.PickListItems,\n id: JSON.stringify(key)\n }));\n\n dispatch(pickListApi.util.invalidateTags(tagsToInvalidate));\n};\n\nexport const {\n useMarkAsShippedMutation,\n useMarkAsPaidBySellerMutation,\n useSetItemVisibilityMutation,\n useGetPickListItemsQuery\n} = pickListApi;\n","import qs from 'qs';\nimport { createApi } from '@reduxjs/toolkit/query/react';\nimport type {\n GetSavedSearchesWithItemsApiResponse,\n SavedsearchesitemsRequest,\n RemoveSavedSearchesApiResponse,\n RemoveSavedSearchesApiRequest,\n SavedSearchEmailNotificationApiRequest,\n SavedSearchEmailNotificationApiResponse\n} from 'tradera/state/services/types/webapi-discover-generated';\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\nimport { isServer } from 'tradera/utils/nextjs';\n\nenum Tags {\n SAVED_SEARCHES_LIST = 'SAVED_SEARCHES_LIST'\n}\n\n// This was previously a variable that would keep track of the latest cacheKey.\n// With that we would only update the latest cache key, so if the user goes\n// from page 1 to page 2, and back to page 1, the cache would not be updated for page\n// 1 since page 2 would be the latest cache key.\nconst cacheKeySet = new Set();\nexport const savedSearchesApi = createApi({\n reducerPath: 'savedSearchesApi',\n baseQuery: isomorphicWebApiBaseQuery,\n tagTypes: Object.keys(Tags),\n endpoints: (builder) => ({\n getSavedSearches: builder.query<\n GetSavedSearchesWithItemsApiResponse,\n SavedsearchesitemsRequest\n >({\n query: (params) => {\n cacheKeySet.add(params);\n const baseUrl = isServer ? '' : '/api/webapi';\n return `${baseUrl}/discover/savedsearchesitems?${qs.stringify({\n ...params,\n sortBy: 'Alphabetical'\n })}`;\n },\n providesTags: [Tags.SAVED_SEARCHES_LIST]\n }),\n\n removeSavedSearches: builder.mutation<\n RemoveSavedSearchesApiResponse,\n RemoveSavedSearchesApiRequest\n >({\n query: (params) => {\n const baseUrl = isServer ? '' : '/api/webapi';\n return {\n url: `${baseUrl}/discover/removesavedsearches`,\n method: 'DELETE',\n body: params\n };\n },\n async onQueryStarted(params, { dispatch, queryFulfilled }) {\n for (const cacheKey of cacheKeySet) {\n const patchResult = dispatch(\n savedSearchesApi.util.updateQueryData(\n 'getSavedSearches',\n cacheKey,\n (draft) => {\n // eslint-disable-next-line better-mutation/no-mutation\n draft.savedSearches =\n draft.savedSearches?.filter(\n (item) =>\n !params?.ids?.includes(item.id)\n );\n }\n )\n );\n try {\n await queryFulfilled;\n } catch {\n patchResult.undo();\n }\n }\n },\n invalidatesTags: [Tags.SAVED_SEARCHES_LIST]\n }),\n\n toggleEmailNotification: builder.mutation<\n SavedSearchEmailNotificationApiResponse,\n SavedSearchEmailNotificationApiRequest\n >({\n query: (params) => {\n const baseUrl = isServer ? '' : '/api/webapi';\n return {\n url: `${baseUrl}/discover/savedsearchemailnotification`,\n method: 'POST',\n body: { ...params }\n };\n },\n async onQueryStarted(params, { dispatch, queryFulfilled }) {\n for (const cacheKey of cacheKeySet) {\n const patchResult = dispatch(\n savedSearchesApi.util.updateQueryData(\n 'getSavedSearches',\n cacheKey,\n (draft) => {\n draft.savedSearches?.forEach((item) => {\n if (item.id === params.savedSearchDto?.id) {\n Object.assign(item, {\n hasEnabledEmailNotifications:\n params.savedSearchDto.sendMail\n });\n }\n });\n }\n )\n );\n try {\n await queryFulfilled;\n } catch {\n patchResult.undo();\n }\n }\n }\n })\n })\n});\n\nexport const {\n useGetSavedSearchesQuery,\n useRemoveSavedSearchesMutation,\n useToggleEmailNotificationMutation\n} = savedSearchesApi;\n","enum BID_VALIDATION_RESULTS {\n AUCTION_HAS_ENDED = 'AuctionHasEnded',\n AUCTION_HAS_NOT_STARTED = 'AuctionHasNotStarted',\n BELOW_MINIMUM = 'BelowMinimum',\n BELOW_OWN_LEADING_BID = 'BelowOwnLeadingBid',\n BELOW_RESERVE_PRICE = 'BelowReservePrice',\n BID_NOT_FOUND = 'BidNotFound',\n BIDDER_IS_BLOCKED = 'BidderIsBlocked',\n BUYING_LIMIT_REACHED = 'BuyingLimitReached',\n EQUAL_OR_HIGHER_THAN_BUY_IT_NOW = 'EqualOrHigherThanBuyItNow',\n HIGHER_BIDDER_EXISTS = 'HigherBidderExists',\n ITEM_NO_LONGER_AVAILABLE = 'ItemNoLongerAvailable',\n ITEM_NOT_FOUND = 'ItemNotFound',\n LEADING_BIDDER = 'LeadingBidder',\n NO_LONGER_VALID = 'NoLongerValid',\n ONLY_EU_BUYERS_ACCEPTED = 'OnlyEUBuyersAccepted',\n ONLY_NORDIC_BUYERS_ACCEPTED = 'OnlyNordicBuyersAccepted',\n ONLY_SWEDISH_BUYERS_ACCEPTED = 'OnlySwedishBuyersAccepted',\n SUCCESSFULLY_CHANGED_AUTOBID = 'SuccessfullyChangedAutoBid',\n USER_IS_SUSPENDED = 'UserIsSuspended',\n MAX_PLACED_BIDS_LIMIT = 'MaxPlacedBidsLimit',\n BID_AMOUNT_LIMIT = 'BidAmountLimit',\n OFFLINE = 'Offline'\n}\n\nconst BID_VALIDATION_SUCCESSES: string[] = [\n BID_VALIDATION_RESULTS.LEADING_BIDDER,\n BID_VALIDATION_RESULTS.SUCCESSFULLY_CHANGED_AUTOBID\n];\n\nconst BID_VALIDATION_RETRY: string[] = [\n BID_VALIDATION_RESULTS.BELOW_MINIMUM,\n BID_VALIDATION_RESULTS.BELOW_RESERVE_PRICE,\n BID_VALIDATION_RESULTS.BELOW_OWN_LEADING_BID,\n BID_VALIDATION_RESULTS.OFFLINE\n];\n\nconst BIN_VALIDATION_RESULTS = {\n ITEM_NOT_FOUND: 'ItemNotFound',\n ONLY_EU_BUYERS_ACCEPTED: 'OnlyEUBuyersAccepted',\n ONLY_NORDIC_BUYERS_ACCEPTED: 'OnlyNordicBuyersAccepted',\n ONLY_SWEDISH_BUYERS_ACCEPTED: 'OnlySwedishBuyersAccepted',\n USER_IS_SUSPENDED: 'UserIsSuspended',\n BIDDER_IS_BLOCKED: 'BidderIsBlocked',\n ITEM_HAS_ENDED: 'ItemHasEnded',\n ITEM_ALREADY_PURCHASED_BY_OTHER_USER: 'ItemAlreadyPurchasedByOtherUser',\n PURCHASE_DID_NOT_SUCCEED: 'PurchaseDidNotSucceed'\n};\n\nexport {\n BID_VALIDATION_RESULTS,\n BID_VALIDATION_SUCCESSES,\n BID_VALIDATION_RETRY,\n BIN_VALIDATION_RESULTS\n};\n","import { GtmService } from 'tradera/services/google-tagmanager/google-tagmanager-service';\nimport { BID_VALIDATION_RESULTS } from '../api/vip-api-constants';\n\n// extend window with necessary properties\ntype WindowWithDataLayer = Window & {\n gaData: Record;\n ga: {\n getAll: () => [\n {\n get: (s: string) => string;\n }\n ];\n };\n};\n\ndeclare const window: WindowWithDataLayer;\n\nexport const CATEGORIES = {\n VIEW_ITEM: 'View item',\n BIDDING: 'Bidding',\n CART: 'Cart',\n CHECKOUT_BIN: 'Checkout bin'\n};\n\nconst trackAction = (category: string, action: string, label: string) => {\n GtmService.trackAction(category, action, label);\n};\n\nexport const trackBiddingConfirmBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Bid button', 'Bekräfta bud');\n\nexport const trackBiddingShowEnterBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Show', 'EnterBid');\n\nexport const trackBiddingShowConfirmBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Show', 'ConfirmBid');\n\nexport const trackBiddingShowChangeMaxBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Show', 'ChangeMaxBid');\n\nexport const trackBiddingQuickBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Bid button', 'Lägg snabbud');\n\nexport const trackBiddingNewMaxBid = () =>\n trackAction(CATEGORIES.BIDDING, 'Bid button', 'Lägg maxbud');\n\nexport const trackNewBid = () =>\n trackAction(CATEGORIES.VIEW_ITEM, 'Bid button', 'Lägg bud');\n\nexport const trackNewMaxBid = () =>\n trackAction(CATEGORIES.VIEW_ITEM, 'Bid button', 'Ändra maxbud');\n\nexport const trackOpenCheckoutBin = () =>\n trackAction(CATEGORIES.CHECKOUT_BIN, 'Show', 'Open BIN modal');\n\nexport const trackConfirmBin = (itemId: number) => {\n trackAction(\n CATEGORIES.CHECKOUT_BIN,\n 'Bin navigation',\n 'Confirm BIN purchase'\n );\n GtmService.trackGA4('will_buy_now', {\n item_id: itemId\n });\n};\n\nexport const trackPayBin = () =>\n trackAction(CATEGORIES.CHECKOUT_BIN, 'Bin navigation', 'Pay BIN');\n\nexport const trackKeepShopping = () =>\n trackAction(CATEGORIES.CHECKOUT_BIN, 'Bin navigation', 'Keep shopping');\n\nexport const trackBinError = () =>\n trackAction(CATEGORIES.CHECKOUT_BIN, 'Bin navigation', 'Error');\n\nexport const trackBidPlaced = (\n itemId: string | number,\n validationCode: string,\n isMaxBid: boolean | undefined,\n potentialBidChange: number | undefined,\n bidId: number | undefined,\n transactionTotal: number | undefined,\n leadingBidAmount: number | undefined\n) => {\n switch (validationCode) {\n case BID_VALIDATION_RESULTS.LEADING_BIDDER:\n case BID_VALIDATION_RESULTS.HIGHER_BIDDER_EXISTS:\n // LeadingBidder.cshtml and HigherBidderExists renders _PlaceBidDataLayerTracking.cshtml\n // which has this tracking.\n GtmService.push({\n event: 'auctionEvent',\n transactionTotal: `${transactionTotal}`\n });\n GtmService.trackAction(\n CATEGORIES.BIDDING,\n 'PlacedBidPotential',\n isMaxBid ? 'MaxBid' : 'MinBid',\n potentialBidChange,\n true\n );\n GtmService.push({\n event: 'bidPlacedEvent',\n itemId: `${itemId}`,\n placedBidId: `${bidId}`,\n bidValue: `${transactionTotal}`,\n currentLeadingBid: `${leadingBidAmount}`,\n timestamp: Date.now()\n });\n break;\n }\n GtmService.trackAction(CATEGORIES.BIDDING, 'Show', validationCode, 0, true);\n};\n\nexport const trackWishlist = (\n itemId: string | number,\n isAdding: boolean\n): void => {\n const action = isAdding ? 'Added to wish list' : 'Removed from wish list';\n const label = isAdding\n ? `Added item: ${itemId}`\n : `Removed item: ${itemId}`;\n GtmService.trackAction('View item', action, label);\n};\n\nexport const trackAddToCart = (\n sellerMemberAlias: string,\n fixedPrice: number,\n redirectUrl?: string\n): void =>\n GtmService.trackLinkClickAndGotoUrl(\n CATEGORIES.CART,\n 'Add to cart',\n `Added ${sellerMemberAlias}`,\n redirectUrl,\n fixedPrice\n );\n\nconst defaultClientId = '2ab8b9da-aeb2-4790-86cf-bd1cd3c51453';\nexport const getGaTrackingData = (\n googleAnalyticsTrackingId?: string | undefined,\n isHybridAppContextForIos?: boolean,\n isHybridAppContextForAndroid?: boolean,\n appInstanceId?: string | null,\n sessionId?: string | null\n): {\n clientId: string;\n trackingIds: string[];\n platform: string;\n appInstanceId: string | undefined | null;\n sessionId?: string | null;\n} => {\n const trackingPlatform = isHybridAppContextForIos\n ? 'ios'\n : isHybridAppContextForAndroid\n ? 'android'\n : 'web';\n\n return {\n clientId: window?.ga?.getAll?.()[0]?.get('clientId') || defaultClientId,\n trackingIds:\n typeof googleAnalyticsTrackingId !== 'undefined'\n ? [googleAnalyticsTrackingId]\n : [],\n platform: trackingPlatform,\n appInstanceId,\n sessionId\n };\n};\n","import qs from 'qs';\nimport { URL_HASHES } from 'tradera/constants/url-hashes';\n\n// Lets make TS accept title on window\ndeclare global {\n interface Window {\n title: string;\n }\n}\n\n/**\n * Remove hash and forceRedirect param from url\n */\nexport const removeHashFromUrl = () => {\n const { forceRedirect, ...otherQueryParams } = qs.parse(location.search, {\n ignoreQueryPrefix: true\n });\n if (document.location.hash.length === 0 && !forceRedirect) {\n return;\n }\n const url =\n location.pathname +\n qs.stringify(otherQueryParams, { addQueryPrefix: true });\n history.replaceState({}, window.title, url);\n};\n\nexport const removeQueryParametersFromUrl = () => {\n const url = location.href.replace(location.search, '');\n history.replaceState({}, window.title, url);\n};\n\nexport const shouldOpenBiddingModal = () =>\n document.location.hash.includes(URL_HASHES.openBiddingModal);\n\nexport const shouldSaveInWishlist = () =>\n document.location.hash.includes(URL_HASHES.saveInWishlist);\n\nexport const shouldOpenBinModal = () =>\n document.location.hash.includes(URL_HASHES.openBinModal);\n\nexport const shouldBuyShopItem = () =>\n document.location.hash.includes(URL_HASHES.buyShopItem);\n\nexport const shouldShowRequestedCombinedShippingToast = () =>\n document.location.hash.includes(URL_HASHES.hasRequestedCombinedShipping);\n\nexport const shouldOpenReferralModal = () =>\n document.location.hash.includes(URL_HASHES.openReferralModal);\n\nconst getBaseRedirectUrl = () => {\n // Add random query parameter to force reload when redirecting to this url\n // and only the hash differs\n const queryParams = {\n ...qs.parse(location.search, { ignoreQueryPrefix: true }),\n forceRedirect: Math.round(Math.random() * 100000)\n };\n return (\n location.protocol +\n '//' +\n location.host +\n location.pathname +\n qs.stringify(queryParams, { addQueryPrefix: true })\n );\n};\n\nexport const getBiddingRedirectUrl = () =>\n getBaseRedirectUrl() + '#' + URL_HASHES.openBiddingModal;\n\nexport const getWishlistRedirectUrl = () =>\n getBaseRedirectUrl() + '#' + URL_HASHES.saveInWishlist;\n\nexport const getBinRedirectUrl = () =>\n getBaseRedirectUrl() + '#' + URL_HASHES.openBinModal;\n\nexport const getShopItemRedirectUrl = () =>\n getBaseRedirectUrl() + '#' + URL_HASHES.buyShopItem;\n","import { useTranslator, Trans } from 'tradera/lang/translate';\nimport ShieldIcon from '@tradera/blueprint/theme/icons2/shield.svg?jsx';\nimport HeaderImage from './buyer-protection-info-header.jpg';\nimport CheckIcon from 'tradera/blueprint/theme/icons2/check.svg?jsx';\nimport BuyerProtectionIcon from '@tradera/blueprint/theme/icons-colored/buyer-protection.svg?jsx';\nimport { useLocalizedPriceFormatterWithExchangeRate } from 'tradera/localization/use-localized-price-formatter';\nimport { ScrollableModal } from 'tradera/components/scrollable-modal/scrollable-modal';\nimport { HeaderWithImage } from 'tradera/components/scrollable-modal/header-with-image';\nimport { classNames } from 'tradera/utils/class-names';\nimport { Button } from 'tradera/components/atoms/button/button';\nimport { HeaderWithCloseButton } from 'tradera/components/scrollable-modal/header-with-close-button';\nimport type { PaymentApiDto } from 'tradera/state/services/types/webapi-browse-generated';\n\nimport styles from './buyer-protection-info-modal.module.scss';\nimport { CurrencyRateType } from 'tradera/state/multi-currency/reducer';\n\nexport enum BuyerProtectionModalType {\n Optional = 'Optional',\n Mandatory = 'Mandatory',\n None = 'None'\n}\n\ntype BuyerProtectionInfoModalProps = {\n handleCloseModal: () => void;\n type: BuyerProtectionModalType;\n payment?: PaymentApiDto | null;\n isBuyer: boolean;\n};\n\nexport const BuyerProtectionInfoModal = ({\n handleCloseModal,\n type,\n payment,\n isBuyer\n}: BuyerProtectionInfoModalProps) => {\n const { t } = useTranslator();\n const localizedPriceFormatter = useLocalizedPriceFormatterWithExchangeRate(\n payment?.paymentMethodExchangeRate,\n isBuyer ? CurrencyRateType.Buyer : CurrencyRateType.Seller\n );\n const show =\n type === BuyerProtectionModalType.Mandatory ||\n type === BuyerProtectionModalType.Optional;\n\n return type === BuyerProtectionModalType.Mandatory ? (\n }\n mobileBottomSheet>\n
\n \n

\n {t('mandatoryBuyerProtectionModal_heading')}\n

\n
\n {t('mandatoryBuyerProtectionModal_subHeading', {\n baseAmount: localizedPriceFormatter(\n +t(\n 'mandatoryBuyerProtectionModal_subHeading_baseAmount'\n )\n )\n })}\n
\n\n
\n \n \n {t('mandatoryBuyerProtectionModal_point1Heading')}\n \n
\n
\n \n }}\n />\n
\n\n
\n \n \n {t('mandatoryBuyerProtectionModal_point2Heading')}\n \n
\n
\n {t('mandatoryBuyerProtectionModal_point2Text')}\n
\n\n
\n \n \n {t('mandatoryBuyerProtectionModal_point3Heading')}\n \n
\n
\n {t('mandatoryBuyerProtectionModal_point3Text')}\n
\n
\n \n ) : (\n \n }\n onClose={handleCloseModal}\n />\n }>\n <>\n

\n \n }}\n />\n

\n

\n {t('buyerProtectionModal_priceHeader')}\n

\n

\n {t('buyerProtectionModal_example')}\n {t('buyerProtectionModal_price')}\n

\n

\n \n {t('buyerProtectionModal_example1Text_localized', {\n amount: localizedPriceFormatter(2000)\n })}\n \n \n {localizedPriceFormatter(\n +t(\n 'buyerProtectionModal_example1BuyerProtectionAmount'\n )\n )}\n \n

\n

\n \n {t('buyerProtectionModal_example2Text_localized', {\n amount: localizedPriceFormatter(500)\n })}\n \n \n {localizedPriceFormatter(\n +t(\n 'buyerProtectionModal_example2BuyerProtectionAmount'\n )\n )}\n \n

\n \n \n );\n};\n","import { ModalState } from './modal-state';\nimport type { ErrorMessageCodes } from './error-message-codes';\nimport type { AppDispatch, GetState } from 'tradera/state/configure-store';\nimport { completed, inProgress, setError, reset, startAuth } from './reducer';\nimport { webApiClient } from 'tradera/utils/http';\nimport type {\n BankIdAuthenticationBeginApiRequest,\n BankIdAuthenticationBeginApiResponse,\n BankIdAuthenticationProgressApiResponse,\n BankIdOnFileAuthenticationBeginApiRequest,\n BankIdOnFileAuthenticationBeginApiResponse,\n BeginBankIdSignatoryAuthenticationApiRequest\n} from 'tradera/state/services/types/webapi-auth-generated';\nimport { showSuccessToast } from 'tradera/services/toasts';\nimport { logger } from 'packages/logger';\nimport type { AxiosError } from 'axios';\nimport { type BankIdBeginWithIdApiRequest } from 'tradera/state/services/types/webapi-member-generated';\nimport qs from 'qs';\n\ntype OnError = (message?: ErrorMessageCodes) => void;\ntype OnComplete = (\n bankIdOrderRef?: string | null,\n autoStartToken?: string | null\n) => void;\n\nconst sleep = (delay: number) =>\n new Promise((resolve) => setTimeout(resolve, delay));\n\nexport const startAuthAndOpenModal = (\n onComplete: OnComplete,\n onError: OnError,\n purpose: string,\n contactSsn?: string,\n organizationNumber?: string\n) => {\n return async (dispatch: AppDispatch) => {\n dispatch(reset());\n dispatch(startAuth({ purpose }));\n\n try {\n const { data } = contactSsn\n ? await webApiClient.post<\n BankIdAuthenticationBeginApiResponse,\n BeginBankIdSignatoryAuthenticationApiRequest\n >('/auth/bankid/authenticate-signatory', {\n purpose,\n organizationNumber,\n contactSsn\n })\n : await webApiClient.post<\n BankIdAuthenticationBeginApiResponse,\n BankIdAuthenticationBeginApiRequest\n >('/auth/bankid/authenticate', { purpose });\n\n const errorCode = data.responseStatus\n ?.errorCode as ErrorMessageCodes;\n if (errorCode) {\n dispatch(setError(errorCode));\n onError(errorCode);\n\n logger(`BankId: received error code ${errorCode}`);\n return;\n }\n\n dispatch(\n inProgress({\n autoStartToken: data?.autoStartToken,\n qrData: data?.qrData,\n bankIdOrderRef: data?.bankIdOrderRef,\n contactSsn: contactSsn,\n organizationNumber: organizationNumber\n })\n );\n dispatch(\n bankIdPollProgress(\n onComplete,\n onError,\n contactSsn,\n organizationNumber\n )\n );\n } catch (error) {\n dispatch(setError(undefined));\n onError(undefined);\n\n const maybeAxiosError = error as AxiosError;\n logger(`BankId: received exception ${maybeAxiosError?.message}`);\n }\n };\n};\n\nexport const startAuthWithIdAndOpenModal = (\n onComplete: OnComplete,\n onError: OnError,\n purpose: string,\n memberId: number\n) => {\n return async (dispatch: AppDispatch) => {\n dispatch(reset());\n dispatch(startAuth({ purpose, memberId }));\n\n try {\n const { data } = await webApiClient.post<\n BankIdAuthenticationBeginApiResponse,\n BankIdBeginWithIdApiRequest\n >('/member/profile/bankId-recovery-with-id', {\n memberId\n });\n\n const errorCode = data.responseStatus\n ?.errorCode as ErrorMessageCodes;\n if (errorCode) {\n dispatch(setError(errorCode));\n onError(errorCode);\n\n logger(`BankId: received error code ${errorCode}`);\n return;\n }\n\n dispatch(\n inProgress({\n autoStartToken: data?.autoStartToken,\n qrData: data?.qrData,\n bankIdOrderRef: data?.bankIdOrderRef\n })\n );\n dispatch(\n bankIdPollProgress(\n onComplete,\n onError,\n undefined /* contactSsn */,\n undefined /* organizationNumber */,\n memberId\n )\n );\n } catch (error) {\n dispatch(setError(undefined));\n onError(undefined);\n\n const maybeAxiosError = error as AxiosError;\n logger(`BankId: received exception ${maybeAxiosError?.message}`);\n }\n };\n};\n\nexport const startAuthOnFile = (purpose: string, memberId?: number) => {\n return async (dispatch: AppDispatch) => {\n dispatch(startAuth({ purpose, memberId }));\n\n let autoStartToken: string | null = null;\n try {\n const { data } = await webApiClient.post<\n BankIdOnFileAuthenticationBeginApiResponse,\n BankIdOnFileAuthenticationBeginApiRequest\n >('/auth/bankid/authenticate-on-file', {\n purpose,\n memberId\n });\n\n const errorCode = data.responseStatus\n ?.errorCode as ErrorMessageCodes;\n if (errorCode) {\n dispatch(setError(errorCode));\n logger(`BankId on file: received error code ${errorCode}`);\n return;\n }\n\n autoStartToken = data?.autoStartToken ?? null;\n const bankIdOrderRef = data?.bankIdOrderRef ?? undefined;\n dispatch(\n inProgress({\n autoStartToken,\n bankIdOrderRef\n })\n );\n } catch (error) {\n dispatch(setError(undefined));\n\n const maybeAxiosError = error as AxiosError;\n logger(\n `BankId on file: received exception ${maybeAxiosError?.message}`\n );\n }\n\n return autoStartToken;\n };\n};\n\n/**\n * poll touchweb/webapi to see check if the user has made their bank id auth.\n * this might take some time since the user needs to open up their mobile app with bank id\n */\nconst bankIdPollProgress =\n (\n onComplete: OnComplete,\n onError: OnError,\n contactSsn?: string,\n organizationNumber?: string,\n memberId?: number\n ) =>\n async (dispatch: AppDispatch, getState: GetState) => {\n const state = getState();\n const { modalState, bankIdOrderRef, errorCode } = state.bankId;\n\n if (modalState === ModalState.ERROR) {\n onError(errorCode ?? undefined);\n return;\n }\n\n if (modalState !== ModalState.IN_PROGRESS) {\n return;\n }\n\n if (!bankIdOrderRef) {\n await sleep(3000);\n dispatch(\n bankIdPollProgress(\n onComplete,\n onError,\n contactSsn,\n organizationNumber,\n memberId\n )\n );\n\n return;\n }\n\n try {\n const { data } = contactSsn\n ? await webApiClient.get(\n `/auth/bankid/member-identification-progress-signatory?bankIdOrderRef=${bankIdOrderRef}&organizationNumber=${organizationNumber}&contactSsn=${contactSsn}`\n )\n : memberId\n ? await webApiClient.get(\n `/member/profile/bankId-progress-with-id?${qs.stringify(\n {\n bankIdOrderRef,\n memberId\n }\n )}`\n )\n : await webApiClient.get(\n `/auth/bankid/progress?bankIdOrderRef=${bankIdOrderRef}`\n );\n\n const errorCode = data.responseStatus\n ?.errorCode as ErrorMessageCodes;\n\n if (errorCode) {\n dispatch(setError(errorCode));\n onError(errorCode);\n return;\n }\n\n if (data?.isCompleted) {\n dispatch(completed());\n showSuccessToast('bankIdModal_verificationCompletedTitle');\n onComplete(bankIdOrderRef);\n return;\n }\n\n dispatch(\n inProgress({\n qrData: data?.qrData\n })\n );\n\n await sleep(3000);\n dispatch(\n bankIdPollProgress(\n onComplete,\n onError,\n contactSsn,\n organizationNumber,\n memberId\n )\n );\n } catch {\n dispatch(setError(undefined));\n onError(undefined);\n }\n };\n","import type React from 'react';\nimport { forwardRef } from 'react';\nimport { classNames } from 'tradera/utils/class-names';\n\nimport styles from './divider.module.scss';\n\nimport type { PolyRefFunction } from 'react-polymorphed';\n\nconst polyRef = forwardRef as PolyRefFunction;\n\nexport type DividerProps = React.PropsWithChildren<{\n dark?: boolean;\n className?: string;\n thick?: boolean;\n /**\n * Will hide `last-of-type` via CSS\n */\n hideLast?: boolean;\n}>;\n\nexport const Divider = polyRef<'hr', DividerProps>(\n (\n { as, children, className, dark, thick, hideLast, ...props },\n forwardRef\n ) => {\n const Component = as ?? (children ? 'div' : 'hr');\n const role = Component !== 'hr' ? 'separator' : undefined;\n\n return (\n \n {children ? (\n {children}\n ) : null}\n \n );\n }\n);\n","import React from 'react';\nimport type { BaseInputFieldProps } from '../base-input-field/base-input-field';\nimport { BaseInputField } from '../base-input-field/base-input-field';\nimport type { BaseInputWrapperProps } from '../base-input-wrapper/base-input-wrapper';\nimport { BaseInputWrapper } from '../base-input-wrapper/base-input-wrapper';\nimport { useControllableState } from '../use-controllable-state';\n\nexport type TextInputProps = {\n /**\n * Note that changing the type here to email and tel will also add validation\n * to the input field, meaning that if we want to support both a username and\n * an email, setting type=\"email\" will make the field invalid if it's not an email.\n * If you just want to get a certain keyboard on mobile devices, use the\n * inputMode prop instead. https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode\n */\n type?: 'text' | 'email' | 'tel';\n noLigatures?: boolean;\n} & Omit &\n Omit;\n\nexport const TextInput = React.forwardRef(\n function TextInput(\n {\n value,\n defaultValue,\n label,\n hint,\n error,\n help,\n autoComplete = 'on',\n onChange,\n name,\n collapsed,\n className,\n style,\n ...props\n },\n ref\n ) {\n const [localValue, setLocalValue] = useControllableState({\n prop: value,\n defaultProp: defaultValue || ''\n });\n\n const handleOnChange = (e: React.ChangeEvent) => {\n /**\n * Set local value, needed if the component is not controlled.\n */\n setLocalValue(e.target.value);\n\n onChange?.(e);\n };\n\n return (\n \n \n \n );\n }\n);\n","import { ITEM_LAYOUT } from 'tradera/constants/ui';\n\ntype PixelDensity = '1x' | '1.5x' | '2x' | '3x';\n// Resolutions are square (equal width & height) that match img-proxy nginx config\n// `small` is a 250px JPG fallback for Safari 14-15.6 on macOS 10.x - the rest are WEBP\ntype ItemImageResolution = 250 | 500 | 750 | 1000 | 'small';\n\nconst DEFAULT_RESOLUTION: ItemImageResolution = 500;\n\nexport type SrcSetMap = {\n [key in PixelDensity]?: ItemImageResolution;\n};\n\ntype PixelDensityResolution = {\n [key in ItemImageResolution]?: SrcSetMap;\n};\n\nconst pixelDensityResolution: PixelDensityResolution = {\n 250: {\n '1x': 250,\n '2x': 250,\n '3x': 500\n },\n 500: {\n '1x': 250,\n '1.5x': 250,\n '2x': 500\n },\n 750: {\n '1x': 500,\n '1.5x': 750\n }\n};\n\nconst pixelDensityResolutionDesktop: PixelDensityResolution = {\n 250: {\n '1x': 250,\n '2x': 500,\n '3x': 750\n },\n 500: {\n '1x': 500,\n '1.5x': 750,\n '2x': 1000\n },\n 750: {\n '1x': 750,\n '1.5x': 1000\n }\n};\n\ntype LayoutImageResolution = {\n [key in ITEM_LAYOUT]: ItemImageResolution;\n};\n\nconst layoutImageResolution: LayoutImageResolution = {\n [ITEM_LAYOUT.LIST]: 250,\n [ITEM_LAYOUT.GRID]: 250,\n [ITEM_LAYOUT.GRID_MEDIUM]: 500,\n [ITEM_LAYOUT.GRID_LARGE]: 750\n};\n\nconst fullWidthLayoutImageResolution: LayoutImageResolution = {\n [ITEM_LAYOUT.LIST]: 250,\n [ITEM_LAYOUT.GRID]: 500,\n [ITEM_LAYOUT.GRID_MEDIUM]: 750,\n [ITEM_LAYOUT.GRID_LARGE]: 750\n};\n\ntype ImageSizeArgs = {\n itemLayout?: ITEM_LAYOUT;\n isSiteWidthFull?: boolean;\n isMobile?: boolean;\n};\n\nexport const getItemLayoutSrcSet = ({\n itemLayout = ITEM_LAYOUT.GRID,\n isSiteWidthFull = false,\n isMobile = false\n}: ImageSizeArgs) => {\n const imageResolution = isSiteWidthFull\n ? fullWidthLayoutImageResolution[itemLayout]\n : layoutImageResolution[itemLayout];\n\n return isMobile\n ? pixelDensityResolution[imageResolution]\n : pixelDensityResolutionDesktop[imageResolution];\n};\n\nexport const getSrc = (\n src: string,\n placeholder: string | RegExp,\n resolution?: ItemImageResolution\n) => src.replace(placeholder, `${resolution || DEFAULT_RESOLUTION}-square`);\n\nexport const getSrcSet = (\n src: string,\n placeholder: string | RegExp,\n srcSetMap?: SrcSetMap\n) => {\n if (!srcSetMap) {\n return getSrc(src, placeholder, DEFAULT_RESOLUTION);\n }\n\n return Object.entries(srcSetMap)\n .map(\n ([pixelDensity, resolution]) =>\n `${getSrc(src, placeholder, resolution)} ${pixelDensity}`\n )\n .join(', ');\n};\n","import { useEffect, useRef } from 'react';\n\nimport LoadingIcon from '@tradera/blueprint/theme/icons2/loading.svg?jsx';\nimport LoadingPortal from 'tradera/components/portals/loading-portal';\nimport { classNames } from 'tradera/utils/class-names';\n\nimport styles from './loader.module.scss';\n\ntype LoaderComponentProps = React.PropsWithChildren &\n React.HTMLAttributes & {\n className: string;\n visibleClassName: string;\n };\n\nconst LoaderComponent = ({\n className,\n children,\n visibleClassName,\n ...otherProps\n}: LoaderComponentProps) => {\n const loaderRef = useRef(null);\n useEffect(() => {\n const timeout = setTimeout(() => {\n loaderRef?.current?.classList.add(visibleClassName);\n }, 0);\n return () => clearTimeout(timeout);\n }, [visibleClassName]);\n\n return (\n \n {children}\n \n );\n};\n\ntype GlobalLoaderProps = React.PropsWithChildren & {\n blurBackground?: boolean;\n};\n\n// Global loading with overlay that covers the whole page, except top menu\nexport const GlobalLoader = ({\n children,\n blurBackground\n}: GlobalLoaderProps) => (\n \n {children ? (\n children\n ) : (\n \n )}\n \n);\n\n// Legacy global loader that uses portal\nexport const PortalLoader = () => (\n \n \n \n);\n\ntype LocalLoaderProps = React.HTMLAttributes & {\n className?: string;\n};\n\n/**\n * Local loader that covers its closest positioned parent\n *\n * Tip: use position-relative class for containing parent\n */\nexport const LocalLoader = ({ className, ...otherProps }: LocalLoaderProps) => (\n \n \n \n);\n\ntype LocalLoaderWithChildrenProps = React.PropsWithChildren &\n React.HTMLAttributes & {\n className?: string;\n };\n\nexport const LocalLoaderWithChildren = ({\n className,\n children,\n ...otherProps\n}: LocalLoaderWithChildrenProps) => (\n \n {children}\n \n);\n\ntype LoaderProps = {\n usePortal: boolean;\n};\n\nconst Loader = ({ usePortal = true }: LoaderProps) => {\n return usePortal ? : ;\n};\n\nexport default Loader;\n","import {\n type TranslationFunction,\n useTranslator\n} from 'tradera/lang/translate';\n\nexport const getPaymentMethodName = (\n paymentMethod: string,\n t: TranslationFunction\n) => {\n switch (paymentMethod) {\n case 'Mastercard':\n case 'Visa':\n case 'VisaMasterCard':\n case 'Card':\n return t('syi_payment_option_VisaMasterCard');\n case 'Paynova':\n return t('syi_payment_option_Paynova');\n case 'PayPal':\n return t('syi_payment_option_PayPal');\n case 'SwishHandel':\n return t('syi_payment_option_Swish');\n case 'ApplePay':\n return t('syi_payment_option_ApplePay');\n case 'GooglePay':\n return t('syi_payment_option_GooglePay');\n case 'Klarna':\n return t('syi_payment_option_Klarna');\n case 'NoPaymentMethod':\n return t('syi_payment_option_NoPaymentMethod');\n case 'Invoice':\n case 'Wallet':\n return t('syi_payment_option_balance');\n case 'Trustly':\n return t('syi_payment_option_trustly');\n default:\n return null;\n }\n};\n\ntype PaymentMethodNameProps = {\n paymentMethod: string;\n};\n\nexport const PaymentMethodName = ({\n paymentMethod\n}: PaymentMethodNameProps) => {\n const { t } = useTranslator();\n\n return {getPaymentMethodName(paymentMethod, t)};\n};\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport getInitialState from './initial-state';\nimport type { GetPayoutSettingsModalViewModelApiResponse } from 'tradera/state/services/types/webapi-member-generated';\nimport type { PayoutDestinationModalState } from './types';\n\nconst payoutDestinationModalSlice = createSlice({\n name: 'payoutDestinationModal',\n initialState: getInitialState(),\n reducers: {\n receiveModalData: (\n state,\n {\n payload\n }: PayloadAction\n ) => {\n state.requireBankIdVerification =\n payload.member?.requireBankIdVerification || false;\n state.tink.tinkLinkUrl =\n payload.tink?.tinkLinkUrl || state.tink.tinkLinkUrl;\n state.hyperwallet = {\n ...state.hyperwallet,\n ...payload.hyperwallet\n };\n state.availablePayoutOptions = payload.availablePayoutOptions || [];\n state.payoutFrequencyOption =\n payload.payoutFrequencyOption || undefined;\n state.isFetching = false;\n },\n setFetching: (state, { payload }) => {\n state.isFetching = payload;\n },\n resetPayoutDestinationOptionState: (state) => {\n const initialState = getInitialState();\n return {\n ...state,\n modalState: {\n ...initialState.modalState,\n ...{\n selectedOption:\n state.displayedPayoutOptions.length === 1\n ? state.displayedPayoutOptions[0]\n : undefined\n }\n },\n tink: {\n ...initialState.tink,\n tinkLinkUrl: state.tink.tinkLinkUrl\n },\n bankAccount: initialState.bankAccount,\n paypal: initialState.paypal,\n swish: initialState.swish\n };\n },\n openSettingsModal: (state) => {\n state.showSettingsModal = true;\n },\n closeSettingsModal: (state) => {\n state.showSettingsModal = false;\n },\n setDisplayedPayoutOptions: (state, { payload }) => {\n state.displayedPayoutOptions = payload;\n if (payload.length === 1) {\n state.modalState = {\n ...state.modalState,\n selectedOption: payload[0]\n };\n }\n },\n // Tink\n setTinkFetching: (state, { payload }) => {\n return {\n ...state,\n tink: {\n ...state.tink,\n isFetching: payload\n }\n };\n },\n setTinkBankAccounts: (state, { payload }) => {\n return {\n ...state,\n tink: {\n ...state.tink,\n accounts: payload,\n isFetching: false,\n errorMessage: undefined\n }\n };\n },\n setTinkAccount: (state, { payload }: PayloadAction) => {\n return {\n ...state,\n tink: {\n ...state.tink,\n account: payload\n }\n };\n },\n tinkError: (state, { payload }) => {\n return {\n ...state,\n tink: {\n ...state.tink,\n errorMessage: payload,\n isFetching: false\n }\n };\n },\n cancelTink: (state) => {\n return {\n ...state,\n tink: {\n ...state.tink,\n accounts: null,\n errorMessage: '',\n isFetching: false\n }\n };\n },\n // Update status\n setUpdateStatus: (state, { payload }) => {\n return {\n ...state,\n updateStatus: {\n ...state.updateStatus,\n ...payload\n }\n };\n },\n startUpdate: (state) => {\n return {\n ...state,\n updateStatus: {\n ...state.updateStatus,\n isUpdating: true,\n errorMessage: undefined,\n processCorrelationId: undefined\n }\n };\n },\n setUpdateError: (state, { payload }) => {\n return {\n ...state,\n updateStatus: {\n ...state.updateStatus,\n isUpdating: false,\n errorMessage: payload\n },\n modalState: {\n ...state.modalState\n }\n };\n },\n finishUpdate: (state) => {\n return {\n ...state,\n updateStatus: {\n ...state.updateStatus,\n isUpdating: false,\n processCorrelationId: undefined\n }\n };\n },\n setModalState: (\n state,\n { payload }: PayloadAction\n ) => {\n return {\n ...state,\n modalState: {\n ...state.modalState,\n ...payload\n }\n };\n },\n // Manual\n setBankAccount: (state, { payload }) => {\n return {\n ...state,\n bankAccount: {\n ...state.bankAccount,\n ...payload\n }\n };\n },\n // PayPal\n setPayPalEmail: (state, { payload }: PayloadAction) => {\n return {\n ...state,\n paypal: {\n ...state.paypal,\n emailAddress: payload\n }\n };\n },\n // Swish\n setSwishNumber: (state, { payload }: PayloadAction) => {\n return {\n ...state,\n swish: {\n ...state.swish,\n swishNumber: payload\n }\n };\n },\n setSwishVerificationCode: (\n state,\n { payload }: PayloadAction\n ) => {\n return {\n ...state,\n swish: {\n ...state.swish,\n verificationCode: payload\n }\n };\n }\n }\n});\n\nexport const {\n receiveModalData,\n setFetching,\n resetPayoutDestinationOptionState,\n openSettingsModal,\n closeSettingsModal,\n setDisplayedPayoutOptions,\n setTinkFetching,\n setTinkBankAccounts,\n setTinkAccount,\n tinkError,\n cancelTink,\n setUpdateStatus,\n startUpdate,\n setUpdateError,\n finishUpdate,\n setModalState,\n setBankAccount,\n setPayPalEmail,\n setSwishNumber,\n setSwishVerificationCode\n} = payoutDestinationModalSlice.actions;\n\nexport default payoutDestinationModalSlice.reducer;\n","import type {\n AvailablePayoutOption,\n TinkBankAccountDto\n} from 'tradera/state/services/types/webapi-member-generated';\n\nexport type PayoutState = {\n hyperwallet?: PayoutSettingsHyperwallet;\n updateStatus: PayoutUpdateStatus;\n modalState: PayoutDestinationModalState;\n payoutFrequencyOption?: string;\n availablePayoutOptions: AvailablePayoutOption[];\n displayedPayoutOptions: AvailablePayoutOption[];\n requireBankIdVerification: boolean;\n isFetching: boolean;\n showSettingsModal: boolean;\n\n tink: PayoutTinkState;\n bankAccount: PayoutBankState;\n paypal: PayoutPayPalState;\n swish: PayoutSwishState;\n};\n\nexport type PayoutUpdateStatus = {\n isUpdating: boolean;\n processCorrelationId?: string;\n errorMessage?: string;\n};\n\nexport type PayoutTinkState = {\n tinkLinkUrl: string;\n accounts?: TinkBankAccountDto[] | null;\n account?: string;\n errorMessage?: string;\n isFetching: boolean;\n};\n\nexport type PayoutDestinationModalState = {\n selectedOption?: AvailablePayoutOption;\n isAccountValid?: boolean;\n currentView?: PayoutDestinationModalView;\n};\n\nexport enum PayoutDestinationModalView {\n SelectOption = 'SelectOption',\n UnknownBank = 'UnknownBank',\n VerifySwish = 'VerifySwish'\n}\n\nexport type PayoutBankState = {\n clearingNumber: string;\n accountNumber: string;\n};\n\nexport type PayoutPayPalState = {\n emailAddress: string;\n};\n\nexport type PayoutSwishState = {\n swishNumber?: string;\n verificationCode?: string;\n};\n\nexport type PayoutSettingsHyperwallet = {\n userToken?: string | null;\n widgetBaseUrl?: string | null;\n};\n","import { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\n\nexport default class LoadingPortal extends Component {\n static propTypes = {\n children: PropTypes.node,\n className: PropTypes.string\n };\n\n constructor() {\n super();\n this.el = document.createElement('div');\n this.loadingPortalRoot = document.getElementById('loading-portal');\n }\n\n componentDidMount() {\n if (this.loadingPortalRoot) {\n this.loadingPortalRoot.appendChild(this.el);\n setTimeout(() => {\n this.el.classList.add('loading-portal-visible');\n }, 0);\n }\n }\n\n componentWillUnmount() {\n if (this.loadingPortalRoot) {\n this.loadingPortalRoot.removeChild(this.el);\n }\n }\n\n render() {\n const { children, className = 'loading-portal' } = this.props;\n this.el.className = className;\n return ReactDOM.createPortal(children, this.el);\n }\n}\n","import { createApi } from '@reduxjs/toolkit/query/react';\nimport type { BrowseItemApiDto } from 'tradera/state/services/types/webapi-browse-generated';\nimport { isomorphicWebApiBaseQuery } from 'tradera/state/services/utils/webapi-base-query';\nimport { toLocalizedUrl } from 'tradera/utils/url';\n\ntype AjaxItemDto = Pick<\n BrowseItemApiDto,\n | 'imageFormats'\n | 'shortDescription'\n | 'longDescription'\n | 'itemId'\n | 'itemCondition'\n | 'itemType'\n | 'endDate'\n | 'bidCount'\n | 'openingBid'\n | 'fixedPrice'\n | 'quantity'\n | 'shippingOptions'\n | 'paymentOptions'\n> & {\n url: string;\n auctionVisits: number;\n};\n\nexport const ajaxItemApi = createApi({\n reducerPath: 'ajaxItemApi',\n baseQuery: isomorphicWebApiBaseQuery,\n endpoints: (builder) => ({\n getAjaxItem: builder.query<\n AjaxItemDto,\n { itemId: number; languageCode: string }\n >({\n query: ({ itemId, languageCode }) =>\n toLocalizedUrl(`/ajax/item/${itemId}`, languageCode)\n })\n })\n});\n\nexport const { useGetAjaxItemQuery } = ajaxItemApi;\n","/* eslint-disable better-mutation/no-mutation */\nimport { type PayloadAction, createSlice } from '@reduxjs/toolkit';\n\nimport type { PossibleItemTypes } from '../item-card/item-card';\n\ntype QuickViewState = {\n item?: PossibleItemTypes | null;\n items?: PossibleItemTypes[] | null;\n isOpen: boolean;\n openedFrom?: string | null;\n};\n\nexport const initialState: QuickViewState = {\n isOpen: false\n};\n\nexport const quickView = createSlice({\n name: 'quickView',\n initialState,\n reducers: {\n openQuickView: (\n state,\n {\n payload\n }: PayloadAction<{\n item?: PossibleItemTypes;\n items?: PossibleItemTypes[] | null;\n openedFrom?: string;\n }>\n ) => {\n const {\n items = state.items,\n item = state.item,\n openedFrom\n } = payload;\n\n state.item = item;\n state.items = items;\n state.isOpen = true;\n state.openedFrom = openedFrom;\n },\n closeQuickView: (state) => {\n state.item = null;\n state.items = null;\n state.isOpen = false;\n state.openedFrom = null;\n }\n }\n});\n\nexport const { openQuickView, closeQuickView } = quickView.actions;\n\nexport default quickView.reducer;\n","import type React from 'react';\nimport { useState } from 'react';\nimport CloseIcon from '@tradera/blueprint/theme/icons2/close.svg?jsx';\nimport { Button } from 'tradera/components/atoms/button/button';\nimport { classNames } from 'tradera/utils/class-names';\n\nimport styles from './header-with-image.module.scss';\nimport { Text } from '../atoms/text/text';\nimport { Space } from '../atoms/space/space';\nimport { Heading } from '../atoms/heading/heading';\n\ntype HeaderWithImageProps = {\n preTitle?: string;\n mainTitle: string;\n icon?: React.ReactNode;\n imgSrc: string;\n srcSet?: {\n small: string;\n medium: string;\n large: string;\n };\n videoSrc?: string;\n tallImage?: boolean;\n onClose: () => void;\n};\n\nexport const HeaderWithImage = ({\n preTitle,\n mainTitle,\n icon,\n imgSrc,\n srcSet,\n videoSrc,\n tallImage,\n onClose\n}: HeaderWithImageProps) => {\n const [videoError, setVideoError] = useState(false);\n const headerClass = classNames(styles.header, {\n [styles.headerTall]: tallImage\n });\n\n return (\n
\n {videoSrc && !videoError ? (\n setVideoError(true)}\n />\n ) : (\n \n )}\n
\n
\n {preTitle}\n \n \n {mainTitle}\n \n {icon}\n \n }\n onClick={onClose}\n />\n
\n
\n );\n};\n","export const CHECKOUT_ERRORS = {\n DECLINED: 'DECLINED',\n GENERIC: 'GENERIC',\n NotSpecifiedShippingOption: 'NotSpecifiedShippingOption',\n NO_PAYMENT_METHOD: 'No payment method is available.',\n CANCELLED: 'Cancelled'\n};\n\nconst CHECKOUT_ERROR_STRINGS = {\n [CHECKOUT_ERRORS.DECLINED]: 'checkout_summary_error_declined',\n [CHECKOUT_ERRORS.GENERIC]: 'checkout_summary_error',\n [CHECKOUT_ERRORS.NotSpecifiedShippingOption]:\n 'checkout_summary_error_shipping_non_spec',\n [CHECKOUT_ERRORS.NO_PAYMENT_METHOD]:\n 'checkout_summary_error_no_payment_method',\n // Possible error codes from backend\n ['Error']: 'checkout_summary_error',\n ['Declined']: 'checkout_summary_error_declined',\n ['InsufficientFunds']: 'checkout_summary_error_insufficient_funds',\n ['PaymentInstrumentTypeNotAccepted']:\n 'checkout_summary_error_payment_intrument_type_not_accepted'\n};\n\ntype CheckoutErrorMessage = keyof typeof CHECKOUT_ERRORS;\n\nexport const getCheckoutErrorMessage = (type: CheckoutErrorMessage) => {\n return (\n CHECKOUT_ERROR_STRINGS[type] ||\n CHECKOUT_ERROR_STRINGS[CHECKOUT_ERRORS.GENERIC]\n );\n};\n","type ErrorKey = {\n message: string;\n};\n\ntype ErrorMap = Record;\n\nexport const resolveMostPreciseTranslationKey = (\n errorKeys: ErrorKey[]\n): string => {\n const errorTranslationKeys = errorKeys.map((key) =>\n getOrDefault(key.message)\n );\n\n const errorPrio = [DefaultReceiverAddressError, DefaultError];\n const prioritizedKeys = errorTranslationKeys.sort((a, b) => {\n const aPrio = errorPrio.indexOf(a);\n const bPrio = errorPrio.indexOf(b);\n\n return aPrio - bPrio;\n });\n\n return prioritizedKeys[0];\n};\n\nexport const isUnSupportedProduct = (error: ErrorKey): boolean =>\n error.message ===\n `${Shipment}:${ValidatedProperty.Product}:${ValidationErrorType.NotSupported}`;\n\nexport const getDefaultErrorKey = (): string => DefaultError;\n\nconst getOrDefault = (errorCode: string): string => {\n const error = errorMap[errorCode];\n if (!error) return DefaultError;\n\n return error;\n};\n\nconst Unknown = 'Unknown';\nconst ReceiverAddress = 'ReceiverAddress';\nconst Shipment = 'Shipment';\nconst SenderAddress = 'SenderAddress';\nconst AgentAddress = 'AgentAddress';\nconst Product = 'Product';\n\nconst ValidatedProperty = {\n Unknown: 'Unknown',\n Street: 'Street',\n ZipCode: 'ZipCode',\n City: 'City',\n CountryCode: 'CountryCode',\n Email: 'Email',\n Phone: 'Phone',\n Length: 'Length',\n Width: 'Width',\n Height: 'Height',\n Weight: 'Weight',\n Product: 'Product',\n Type: 'Type',\n Name: 'Name',\n Agent: 'Agent'\n};\n\nconst ValidationErrorType = {\n Unknown: 'Unknown',\n Missing: 'Missing',\n WrongFormat: 'WrongFormat',\n NotReal: 'NotReal',\n ZipcodeRouting: 'ZipcodeRouting',\n NotSupported: 'NotSupported',\n NotEnabled: 'NotEnabled'\n};\n\nexport const DefaultReceiverAddressError =\n 'shipping_validation_defaultReceiverAddress';\nexport const CheckReceiverZipCodeError =\n 'shipping_validation_checkReceiverZipCode';\nexport const CheckReceiverPhoneError = 'shipping_validation_checkReceiverPhone';\nexport const ReceiverAgentMissingError =\n 'shipping_validation_receiverAgentMissing';\nexport const CheckAddressesError = 'shipping_validation_checkAddresses';\nexport const DefaultError = 'shipping_validation_default';\nexport const GenericShippingError = 'shipping_checkout_something_went_wrong';\n\nconst CheckReceiverEmailError = 'shipping_validation_checkReceiverEmail';\nconst InvalidCountryCodeError = 'shipping_validation_invalidCountryCode';\nconst DefaultSenderAddressError = 'shipping_validation_defaultSenderAddress';\nconst CheckSenderEmailError = 'shipping_validation_checkSenderEmail';\nconst CheckSenderPhoneError = 'shipping_validation_checkSenderPhone';\nconst CheckSenderZipCodeError = 'shipping_validation_checkSenderZipCode';\nconst DefaultAgentAddressError = 'shipping_validation_defaultAgentAddress';\nconst BadZipCodeError = 'shipping_validation_badZipCode';\nconst DefaultProductNotEnabledError =\n 'shipping_validation_defaultProductNotEnabled';\n\nconst errorMap: ErrorMap = {\n [`${ReceiverAddress}:${ValidatedProperty.City}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.City}:${ValidationErrorType.WrongFormat}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.NotSupported}`]:\n InvalidCountryCodeError,\n [`${ReceiverAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.WrongFormat}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.Email}:${ValidationErrorType.Missing}`]:\n CheckReceiverEmailError,\n [`${ReceiverAddress}:${ValidatedProperty.Email}:${ValidationErrorType.WrongFormat}`]:\n CheckReceiverEmailError,\n [`${ReceiverAddress}:${ValidatedProperty.Name}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.Name}:${ValidationErrorType.WrongFormat}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.Phone}:${ValidationErrorType.Missing}`]:\n CheckReceiverPhoneError,\n [`${ReceiverAddress}:${ValidatedProperty.Phone}:${ValidationErrorType.WrongFormat}`]:\n CheckReceiverPhoneError,\n [`${ReceiverAddress}:${ValidatedProperty.Street}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.Street}:${ValidationErrorType.WrongFormat}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.Unknown}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.Missing}`]:\n DefaultReceiverAddressError,\n [`${ReceiverAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.NotReal}`]:\n CheckReceiverZipCodeError,\n [`${ReceiverAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.NotSupported}`]:\n CheckReceiverZipCodeError,\n [`${ReceiverAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.WrongFormat}`]:\n CheckReceiverZipCodeError,\n [`${ReceiverAddress}:${ValidatedProperty.Agent}:${ValidationErrorType.Missing}`]:\n ReceiverAgentMissingError,\n\n [`${Shipment}:${ValidatedProperty.Agent}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.City}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Height}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Length}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Street}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Unknown}:${ValidationErrorType.Unknown}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Unknown}:${ValidationErrorType.ZipcodeRouting}`]:\n CheckAddressesError,\n [`${Shipment}:${ValidatedProperty.Weight}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.Width}:${ValidationErrorType.Missing}`]:\n DefaultError,\n [`${Shipment}:${ValidatedProperty.ZipCode}:${ValidationErrorType.NotReal}`]:\n BadZipCodeError,\n [`${Shipment}:${ValidatedProperty.ZipCode}:${ValidationErrorType.WrongFormat}`]:\n DefaultError,\n\n [`${SenderAddress}:${ValidatedProperty.City}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.City}:${ValidationErrorType.WrongFormat}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.WrongFormat}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.Email}:${ValidationErrorType.Missing}`]:\n CheckSenderEmailError,\n [`${SenderAddress}:${ValidatedProperty.Email}:${ValidationErrorType.WrongFormat}`]:\n CheckSenderEmailError,\n [`${SenderAddress}:${ValidatedProperty.Name}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.Name}:${ValidationErrorType.WrongFormat}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.Phone}:${ValidationErrorType.Missing}`]:\n CheckSenderPhoneError,\n [`${SenderAddress}:${ValidatedProperty.Phone}:${ValidationErrorType.WrongFormat}`]:\n CheckSenderPhoneError,\n [`${SenderAddress}:${ValidatedProperty.Street}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.Street}:${ValidationErrorType.WrongFormat}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.Unknown}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.Missing}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.NotReal}`]:\n DefaultSenderAddressError,\n [`${SenderAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.NotSupported}`]:\n CheckSenderZipCodeError,\n [`${SenderAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.WrongFormat}`]:\n CheckSenderZipCodeError,\n\n [`${AgentAddress}:${ValidatedProperty.Unknown}:${ValidationErrorType.WrongFormat}`]:\n DefaultAgentAddressError,\n [`${AgentAddress}:${ValidatedProperty.Street}:${ValidationErrorType.WrongFormat}`]:\n DefaultAgentAddressError,\n [`${AgentAddress}:${ValidatedProperty.ZipCode}:${ValidationErrorType.WrongFormat}`]:\n DefaultAgentAddressError,\n [`${AgentAddress}:${ValidatedProperty.City}:${ValidationErrorType.WrongFormat}`]:\n DefaultAgentAddressError,\n [`${AgentAddress}:${ValidatedProperty.CountryCode}:${ValidationErrorType.WrongFormat}`]:\n DefaultAgentAddressError,\n\n [`${Product}:${ValidatedProperty.Type}:${ValidationErrorType.NotEnabled}`]:\n DefaultProductNotEnabledError,\n\n [`${Unknown}:${ValidatedProperty.Unknown}:${ValidationErrorType.Unknown}`]:\n DefaultError\n};\n","import { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { useTranslator } from 'tradera/lang/translate';\nimport PAGE_TYPES from 'tradera/constants/page-types';\nimport {\n setPageMeta,\n type CustomPageMetaData\n} from 'tradera/state/page/reducer';\n\n/**\n * Set page metadata, either with a pagemeta id or a page metadata object\n *\n * @param {string} [type]\n * @param {object} [customPageMetaData]\n */\nconst usePageMeta = (\n type = PAGE_TYPES.DEFAULT,\n customPageMetaData?: CustomPageMetaData,\n setMetaTitle = true\n) => {\n const { t } = useTranslator();\n const dispatch = useDispatch();\n\n useEffect(() => {\n const pageMetaData = {\n metaTitle: setMetaTitle ? t(`pageMeta_title_${type}`) : '',\n type,\n ...(customPageMetaData || {\n canonicalLink: location.pathname,\n metaDescription: '',\n metaRobots: '',\n ogImage: '',\n breadcrumbs: ''\n })\n };\n dispatch(setPageMeta(pageMetaData));\n }, [customPageMetaData, dispatch, setMetaTitle, t, type]);\n};\n\nexport { usePageMeta, PAGE_TYPES };\n","const bannedCountries = new Set([\n 'af',\n 'bi',\n 'by',\n 'cd',\n 'cf',\n 'cu',\n 'fx',\n 'gn',\n 'gw',\n 'iq',\n 'ir',\n 'kp',\n 'lb',\n 'ly',\n 'ml',\n 'mm',\n 'ng',\n 'ni',\n 'ru',\n 'sd',\n 'so',\n 'ss',\n 'sy',\n 'tn',\n 'ua',\n 've',\n 'ye',\n 'zw'\n]);\n\nconst euCountries = new Set([\n 'at',\n 'be',\n 'bg',\n 'cy',\n 'cz',\n 'de',\n 'dk',\n 'ee',\n 'es',\n 'fi',\n 'fr',\n 'gr',\n 'hr',\n 'hu',\n 'ie',\n 'it',\n 'lt',\n 'lu',\n 'lv',\n 'mt',\n 'nl',\n 'pl',\n 'pt',\n 'ro',\n 'se',\n 'si',\n 'sk'\n]);\n\nexport const removeBannedCountries = (country) =>\n !bannedCountries.has(country.countryCodeIso2.toLowerCase());\n\nexport const removeBannedCountryCodes = (countryCodeIso2) =>\n !bannedCountries.has(countryCodeIso2.toLowerCase());\n\nexport const getAvailableCountries = (t) => {\n return Object.keys(countries)\n .filter(removeBannedCountryCodes)\n .map((code) => ({\n code,\n name: t(mapCountryCodeToCountryKey(code))\n }))\n .sort((a, b) => (a.name > b.name ? 1 : -1));\n};\n\nexport const countryIsInEU = (countryCode) =>\n euCountries.has(countryCode.toLowerCase());\n\n// We map this way to ensure that each key in lokalise is present in code.\n// This allows us to clean up unnecessary codes in the future.\nexport const mapCountryCodeToCountryKey = (countryCode) => {\n const lokaliseKey = countries[countryCode.toLowerCase()];\n if (!lokaliseKey)\n throw `CountryCode ${countryCode} has no mapping to lokalise key`;\n return lokaliseKey;\n};\n\nexport const countries = {\n ad: 'country_ad',\n ae: 'country_ae',\n af: 'country_af',\n ag: 'country_ag',\n ai: 'country_ai',\n al: 'country_al',\n am: 'country_am',\n an: 'country_an',\n ao: 'country_ao',\n aq: 'country_aq',\n ar: 'country_ar',\n as: 'country_as',\n at: 'country_at',\n au: 'country_au',\n aw: 'country_aw',\n ax: 'country_ax',\n az: 'country_az',\n ba: 'country_ba',\n bb: 'country_bb',\n bd: 'country_bd',\n be: 'country_be',\n bf: 'country_bf',\n bg: 'country_bg',\n bh: 'country_bh',\n bi: 'country_bi',\n bj: 'country_bj',\n bm: 'country_bm',\n bn: 'country_bn',\n bo: 'country_bo',\n br: 'country_br',\n bs: 'country_bs',\n bt: 'country_bt',\n bv: 'country_bv',\n bw: 'country_bw',\n by: 'country_by',\n bz: 'country_bz',\n ca: 'country_ca',\n cc: 'country_cc',\n cd: 'country_cd',\n cf: 'country_cf',\n cg: 'country_cg',\n ch: 'country_ch',\n ci: 'country_ci',\n ck: 'country_ck',\n cl: 'country_cl',\n cm: 'country_cm',\n cn: 'country_cn',\n co: 'country_co',\n cr: 'country_cr',\n cu: 'country_cu',\n cv: 'country_cv',\n cx: 'country_cx',\n cy: 'country_cy',\n cz: 'country_cz',\n de: 'country_de',\n dj: 'country_dj',\n dk: 'country_dk',\n dm: 'country_dm',\n do: 'country_do',\n dz: 'country_dz',\n ec: 'country_ec',\n ee: 'country_ee',\n eg: 'country_eg',\n eh: 'country_eh',\n er: 'country_er',\n es: 'country_es',\n et: 'country_et',\n fi: 'country_fi',\n fj: 'country_fj',\n fk: 'country_fk',\n fm: 'country_fm',\n fo: 'country_fo',\n fr: 'country_fr',\n fx: 'country_fx',\n ga: 'country_ga',\n gb: 'country_gb',\n gd: 'country_gd',\n ge: 'country_ge',\n gf: 'country_gf',\n gh: 'country_gh',\n gi: 'country_gi',\n gl: 'country_gl',\n gm: 'country_gm',\n gn: 'country_gn',\n gp: 'country_gp',\n gq: 'country_gq',\n gr: 'country_gr',\n gs: 'country_gs',\n gt: 'country_gt',\n gu: 'country_gu',\n gw: 'country_gw',\n gy: 'country_gy',\n hk: 'country_hk',\n hm: 'country_hm',\n hn: 'country_hn',\n hr: 'country_hr',\n ht: 'country_ht',\n hu: 'country_hu',\n id: 'country_id',\n ie: 'country_ie',\n il: 'country_il',\n in: 'country_in',\n io: 'country_io',\n iq: 'country_iq',\n ir: 'country_ir',\n is: 'country_is',\n it: 'country_it',\n jm: 'country_jm',\n jo: 'country_jo',\n jp: 'country_jp',\n ke: 'country_ke',\n kg: 'country_kg',\n kh: 'country_kh',\n ki: 'country_ki',\n km: 'country_km',\n kn: 'country_kn',\n kp: 'country_kp',\n kr: 'country_kr',\n kw: 'country_kw',\n ky: 'country_ky',\n kz: 'country_kz',\n la: 'country_la',\n lb: 'country_lb',\n lc: 'country_lc',\n li: 'country_li',\n lk: 'country_lk',\n lr: 'country_lr',\n ls: 'country_ls',\n lt: 'country_lt',\n lu: 'country_lu',\n lv: 'country_lv',\n ly: 'country_ly',\n ma: 'country_ma',\n mc: 'country_mc',\n md: 'country_md',\n mg: 'country_mg',\n mh: 'country_mh',\n mk: 'country_mk',\n ml: 'country_ml',\n mm: 'country_mm',\n mn: 'country_mn',\n mo: 'country_mo',\n mp: 'country_mp',\n mq: 'country_mq',\n mr: 'country_mr',\n ms: 'country_ms',\n mt: 'country_mt',\n mu: 'country_mu',\n mv: 'country_mv',\n mw: 'country_mw',\n mx: 'country_mx',\n my: 'country_my',\n mz: 'country_mz',\n na: 'country_na',\n nc: 'country_nc',\n ne: 'country_ne',\n nf: 'country_nf',\n ng: 'country_ng',\n ni: 'country_ni',\n nl: 'country_nl',\n no: 'country_no',\n np: 'country_np',\n nr: 'country_nr',\n nu: 'country_nu',\n nz: 'country_nz',\n om: 'country_om',\n pa: 'country_pa',\n pe: 'country_pe',\n pf: 'country_pf',\n pg: 'country_pg',\n ph: 'country_ph',\n pk: 'country_pk',\n pl: 'country_pl',\n pm: 'country_pm',\n pn: 'country_pn',\n pr: 'country_pr',\n ps: 'country_ps',\n pt: 'country_pt',\n pw: 'country_pw',\n py: 'country_py',\n qa: 'country_qa',\n re: 'country_re',\n ro: 'country_ro',\n ru: 'country_ru',\n rs: 'country_rs',\n rw: 'country_rw',\n sa: 'country_sa',\n sb: 'country_sb',\n sc: 'country_sc',\n sd: 'country_sd',\n se: 'country_se',\n sg: 'country_sg',\n sh: 'country_sh',\n si: 'country_si',\n sj: 'country_sj',\n sk: 'country_sk',\n sl: 'country_sl',\n sm: 'country_sm',\n sn: 'country_sn',\n so: 'country_so',\n sr: 'country_sr',\n st: 'country_st',\n sv: 'country_sv',\n sy: 'country_sy',\n sz: 'country_sz',\n tc: 'country_tc',\n td: 'country_td',\n tf: 'country_tf',\n tg: 'country_tg',\n th: 'country_th',\n tj: 'country_tj',\n tk: 'country_tk',\n tl: 'country_tl',\n tm: 'country_tm',\n tn: 'country_tn',\n to: 'country_to',\n tr: 'country_tr',\n tt: 'country_tt',\n tv: 'country_tv',\n tw: 'country_tw',\n tz: 'country_tz',\n ua: 'country_ua',\n ug: 'country_ug',\n um: 'country_um',\n us: 'country_us',\n uy: 'country_uy',\n uz: 'country_uz',\n va: 'country_va',\n vc: 'country_vc',\n ve: 'country_ve',\n vg: 'country_vg',\n vi: 'country_vi',\n vn: 'country_vn',\n vu: 'country_vu',\n wf: 'country_wf',\n ws: 'country_ws',\n ye: 'country_ye',\n yt: 'country_yt',\n yu: 'country_yu',\n za: 'country_za',\n zm: 'country_zm',\n zw: 'country_zw'\n};\n","import { configureStore } from '@reduxjs/toolkit';\nimport type { Store } from '@reduxjs/toolkit';\nimport { Provider } from 'react-redux';\nimport rootReducer from './root-reducer';\nimport { routerMiddleware } from 'connected-react-router';\nimport { getHistory } from 'tradera/utils/history';\nimport { sentryReduxEnhancer } from 'tradera/utils/sentry/redux';\nimport { initializeState } from './state-initializer';\nimport initData from 'tradera/legacy/static/packages/init-data';\nimport { isServer } from 'tradera/utils/nextjs';\nimport { discoverApi } from './services/discover-api';\nimport { independentSearchApi } from './services/independent-search-api';\nimport { feesApi } from './services/fees-api';\nimport { touchwebSearchApi } from './services/touchweb-search-api';\nimport { touchwebSyiApi } from './services/touchweb-syi-api';\nimport { cartApi } from './services/cart-api';\nimport { messagingStatsApi } from './services/messaging-stats-api';\nimport { categoriesApi } from 'tradera/state/services/categories-api';\nimport type { History } from 'history';\nimport { bidHistoryApi } from 'tradera/components/bid-history/bid-history-api';\nimport { draftsApi } from 'tradera/apps/syi/state/drafts-api';\nimport { templatesApi } from 'tradera/apps/syi/state/templates-api';\nimport { shippingComplaintApi } from './services/shipping-complaint-api';\nimport { savedSearchesApi } from 'tradera/apps/my-tradera/saved-searches/saved-searches-api';\nimport { pickListApi } from 'tradera/apps/my-tradera/pick-list2/services/pick-list-api';\nimport { referralModalApi } from 'tradera/components/referral-modal/services/referral-modal-api';\nimport { wishListApi } from './services/wish-list-api';\nimport { ajaxItemApi } from 'tradera/components/quick-view/ajax-item-api';\nimport { firebaseApi } from 'tradera/components/messaging/firebase-api';\nimport { webApi } from 'tradera/state/services/webapi-api';\nimport { topListsApi } from 'tradera/apps/tradera/components/top-lists/top-lists-api';\nimport { sellerListApi } from 'tradera/apps/my-tradera/app/components/seller-list/seller-list-api';\nimport { bookedShipmentsApi } from 'tradera/apps/my-tradera/app/containers/booked-shipment-api';\nimport { feedbackRemovalApi } from 'tradera/apps/tradera/resolution/feedback-removal/feedback-removal-api';\nimport { startPageThemeApi } from 'tradera/state/services/start-page-theme-api';\nimport { preferredShippingProvidersApi } from 'tradera/components/shipping/preferred-shipping-providers/preferred-shipping-providers-api';\nimport { memberPrefilledPackagingCostApi } from 'tradera/apps/my-tradera/app/components/settings/selling/member-prefilled-packaging-cost-api';\nimport { memberLatestPublishedListingApi } from './services/member-latest-published-listing-api';\nimport { changePasswordApi } from 'tradera/apps/my-tradera/settings/password/password-api';\nimport { mySoldApi } from 'tradera/apps/my-tradera/sold/sold-api';\nimport { myPurchasesApi } from 'tradera/apps/my-tradera/purchases/purchases-api';\nimport { wardrobeNewsForYouApi } from 'tradera/apps/tradera/start-page/components/wardrobe-news-for-you/wardrobe-news-for-you-api';\nimport { othersAlsoLookedAtApi } from './services/others-also-looked-at-api';\nimport { checkoutUpsellApi } from 'tradera/apps/tradera/components/checkout-upsell/checkout-upsell-api';\nimport { valuationApi } from './services/valuation-api';\nimport { syiShippingApi } from 'tradera/apps/syi/state/actions/shipping-api';\nimport { resellSuggestionsApi } from 'tradera/apps/tradera/start-page/components/resell-suggestions/resell-suggestions-api';\nimport { similarItemsV2Api } from './services/similar-items-v2-api';\nimport leaveFeedbackApi from 'tradera/apps/my-tradera/app/components/leave-feedback/leave-feedback-api';\nif (isServer) {\n // Do not remove this without also removing the disable of eslint better-mutation/no-mutation at top of file.\n throw new Error(\n 'This implementation is not compatible with SSR as global properties are shared between server instances'\n );\n}\n\n// Hot reloading\nconst enableWebPackHotModuleReplacementForReducers = (\n // webpack modules are not typed\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n module: any,\n store: Store\n) => {\n if (!module.hot) {\n return;\n }\n module.hot.accept('./root-reducer', () => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const nextRootReducer = require('./root-reducer');\n store.replaceReducer(nextRootReducer);\n });\n};\n\nconst initializeStore = (browserHistory: History) => {\n const isProd =\n typeof process === 'object' && process.env?.NODE_ENV === 'production';\n\n const reduxStore = configureStore({\n reducer: rootReducer(browserHistory),\n middleware: (getDefaultMiddleware) => {\n const middlewares = [\n discoverApi.middleware,\n categoriesApi.middleware,\n changePasswordApi.middleware,\n independentSearchApi.middleware,\n feesApi.middleware,\n pickListApi.middleware,\n touchwebSearchApi.middleware,\n touchwebSyiApi.middleware,\n bidHistoryApi.middleware,\n cartApi.middleware,\n draftsApi.middleware,\n templatesApi.middleware,\n shippingComplaintApi.middleware,\n savedSearchesApi.middleware,\n referralModalApi.middleware,\n wishListApi.middleware,\n messagingStatsApi.middleware,\n firebaseApi.middleware,\n ajaxItemApi.middleware,\n webApi.middleware,\n topListsApi.middleware,\n sellerListApi.middleware,\n bookedShipmentsApi.middleware,\n feedbackRemovalApi.middleware,\n startPageThemeApi.middleware,\n preferredShippingProvidersApi.middleware,\n memberPrefilledPackagingCostApi.middleware,\n memberLatestPublishedListingApi.middleware,\n mySoldApi.middleware,\n myPurchasesApi.middleware,\n wardrobeNewsForYouApi.middleware,\n othersAlsoLookedAtApi.middleware,\n similarItemsV2Api.middleware,\n checkoutUpsellApi.middleware,\n valuationApi.middleware,\n syiShippingApi.middleware,\n resellSuggestionsApi.middleware,\n leaveFeedbackApi.middleware\n ];\n if (browserHistory) {\n middlewares.push(routerMiddleware(browserHistory));\n }\n return getDefaultMiddleware().concat(middlewares);\n },\n // If url contains ?debug-redux devtools will be enabled in production;\n devTools: !isProd || window.location.search.includes('debug-redux'),\n enhancers: [sentryReduxEnhancer]\n });\n\n enableWebPackHotModuleReplacementForReducers(module, reduxStore);\n return reduxStore;\n};\n\ntype SelectFn = (state: ReturnType) => RootState;\ntype OnChangeFn = (previousState: RootState, currentState: RootState) => void;\n\n// make it possible to observe state changes. used by syi\nexport const observeStore = function (select: SelectFn, onChange: OnChangeFn) {\n let currentState: RootState;\n function handleChange() {\n const nextState = select(store.getState());\n if (nextState !== currentState) {\n const previousState = currentState;\n // eslint-disable-next-line better-mutation/no-mutation\n currentState = nextState;\n onChange(previousState, currentState);\n }\n }\n\n const unsubscribe = store.subscribe(handleChange);\n handleChange();\n return unsubscribe;\n};\n\nconst store = initializeStore(getHistory());\n\ninitializeState(initData)(store.dispatch);\n\nexport default store;\n\n// Ref: https://redux-toolkit.js.org/tutorials/typescript\n// Infer the `RootState` and `AppDispatch` types from the store itself\nexport type RootState = ReturnType;\n// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}\nexport type AppDispatch = typeof store.dispatch;\nexport type GetState = () => RootState;\n\n// Don't know how to type this properly...\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const ProviderWithGlobalStore = (props: any) => (\n \n);\n","import { useCallback, useEffect } from 'react';\nimport { useCookieUtil } from 'tradera/hooks/use-cookie-util';\nimport useIsLoggedIn from 'tradera/hooks/use-is-loggedin';\nimport { useAppDispatch, useAppSelector } from 'tradera/state/hooks';\nimport {\n loadMemberServerStorageData,\n saveMemberServerStorageValue\n} from 'tradera/state/member-storage/actions';\nimport { setValue } from 'tradera/state/member-storage/reducer';\n\nconst useMemberServerStorageInternal = <\n TValue,\n TDefaultValue extends TValue | undefined\n>(\n key: string,\n parse: (value: string) => TValue,\n stringify: (value: TValue) => string,\n defaultValue: TDefaultValue\n) => {\n const dispatch = useAppDispatch();\n const isLoggedIn = useIsLoggedIn();\n const isUninitialized = useAppSelector(\n (state) => state.memberStorage.isUnitialized\n );\n const isSuccess = useAppSelector((state) => state.memberStorage.isSuccess);\n const currentValue = useAppSelector(\n (state) => state.memberStorage.data[key]\n );\n if (isLoggedIn && isUninitialized) {\n dispatch(loadMemberServerStorageData());\n }\n\n const storeValue = useCallback(\n async (value: TValue) => {\n if (isLoggedIn) {\n return dispatch(\n saveMemberServerStorageValue(key, stringify(value))\n );\n }\n },\n [dispatch, isLoggedIn, key, stringify]\n );\n\n const value =\n currentValue !== undefined ? parse(currentValue) : defaultValue;\n\n return [value, storeValue, { isReady: isSuccess }] as const;\n};\n\nconst useMemberServerStorageWithCookieFallbackInternal = <\n TValue,\n TDefaultValue extends TValue | undefined\n>(\n key: string,\n parse: (value: string) => TValue,\n stringify: (value: TValue) => string,\n defaultValue: TDefaultValue,\n expires?: number | string | Date\n) => {\n const dispatch = useAppDispatch();\n const isLoggedIn = useIsLoggedIn();\n const [_value, _storeValue, { isReady: _isReady }] =\n useMemberServerStorageInternal(\n key,\n parse,\n stringify,\n // Use undefined as default value to make it possible to distinguish\n // between default value and no value.\n undefined\n );\n\n const cookieUtil = useCookieUtil();\n const isFunctionalCookieEnabled = cookieUtil.gdpr.isFunctionalEnabled();\n\n // Synchronise state with cookie value\n useEffect(() => {\n // Don't overwrite existing value\n if (_value !== undefined) return;\n\n // Don't read cookie if functional cookies are disabled\n if (!isFunctionalCookieEnabled) return;\n\n // Don't synchronise state if server data is not ready\n if (isLoggedIn && !_isReady) return;\n\n const cookieValue = cookieUtil.getCookie(key);\n\n // Nothing to synchronise if we have no cookie value\n if (cookieValue === null || cookieValue === undefined) return;\n const parsedValue = parse(cookieValue);\n\n if (isLoggedIn) {\n _storeValue(parsedValue);\n } else {\n dispatch(setValue({ key, value: stringify(parsedValue) }));\n }\n }, [\n isLoggedIn,\n isFunctionalCookieEnabled,\n _isReady,\n _value,\n key,\n cookieUtil,\n dispatch,\n _storeValue,\n parse,\n stringify\n ]);\n\n const storeValue = useCallback(\n (value: TValue) => {\n if (isLoggedIn) {\n return _storeValue(value);\n }\n const stringValue = stringify(value);\n if (isFunctionalCookieEnabled) {\n cookieUtil.createCookie(key, stringValue, expires);\n }\n dispatch(setValue({ key, value: stringValue }));\n },\n [\n _storeValue,\n cookieUtil,\n isFunctionalCookieEnabled,\n isLoggedIn,\n key,\n stringify,\n dispatch,\n expires\n ]\n );\n\n let fallbackValue: TValue | undefined;\n // No use for fallback value if we already have value\n if (!_value) {\n // Can only use cookie if functional cookies are enabled\n if (isFunctionalCookieEnabled) {\n const cookieValue = cookieUtil.getCookie(key);\n if (cookieValue !== null && cookieValue !== undefined) {\n fallbackValue = parse(cookieValue);\n }\n }\n }\n\n return [\n _value ?? fallbackValue ?? defaultValue,\n storeValue,\n {\n isReady: _isReady || !isLoggedIn,\n isPersistant: isLoggedIn || isFunctionalCookieEnabled\n }\n ] as const;\n};\n\n/**\n * You will get an array with three elements:\n * 1. The value\n * 2. A function to set the value\n * 3. An object with two properties:\n * - isReady: true if the value is ready to be used\n * - isPersistant: true if the value is persisted in the server\n * The hook is called with the key and defaultValue.\n *\n * @example\n * const [hasSeenAutoShippingModal, setHasSeenAutoShippingModal, { isReady }] =\n * useMemberServerStorageBoolean(HAS_SEEN_AUTO_SHIPPING_MODAL, false);\n */\nexport const useMemberServerStorageBoolean = (\n key: string,\n defaultValue?: boolean\n) =>\n useMemberServerStorageInternal(\n key,\n useCallback((value: string) => value === '1', []),\n useCallback((value: boolean) => (value ? '1' : '0'), []),\n defaultValue\n );\n\nexport const useMemberServerStorageNumber = <\n TDefaultValue extends number | undefined\n>(\n key: string,\n defaultValue: TDefaultValue\n) =>\n useMemberServerStorageInternal(\n key,\n useCallback((value: string) => Number(value), []),\n useCallback((value: number) => value.toString(), []),\n defaultValue\n );\n\nexport const useMemberServerStorageWithCookieFallbackBoolean = (\n key: string,\n defaultValue?: boolean,\n expires?: number | string | Date\n) =>\n useMemberServerStorageWithCookieFallbackInternal(\n key,\n // We also check for value true here since som old cookies might have been set with true/false\n useCallback((value: string) => value === '1' || value === 'true', []),\n useCallback((value: boolean) => (value ? '1' : '0'), []),\n defaultValue,\n expires\n );\n\nexport const useMemberServerStorageWithCookieFallbackString = <\n TValue extends string = string\n>(\n key: string,\n defaultValue?: TValue,\n expires?: number | string | Date\n) =>\n useMemberServerStorageWithCookieFallbackInternal(\n key,\n useCallback((value: string) => value as TValue, []),\n useCallback((value: TValue) => value as string, []),\n defaultValue,\n expires\n );\n\nexport const useMemberServerStorage = (\n key: string,\n defaultValue: TValue\n) =>\n useMemberServerStorageInternal(\n key,\n useCallback((value: string) => JSON.parse(value) as TValue, []),\n useCallback((value: TValue) => JSON.stringify(value), []),\n defaultValue\n );\n\nexport const useMemberServerStorageWithCookieFallback = <\n TValue extends unknown | undefined\n>(\n key: string,\n defaultValue: TValue,\n expires?: number | string | Date\n) =>\n useMemberServerStorageWithCookieFallbackInternal(\n key,\n useCallback((value: string) => JSON.parse(value) as TValue, []),\n useCallback((value: TValue) => JSON.stringify(value), []),\n defaultValue,\n expires\n );\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { loadMemberServerStorageData } from 'tradera/state/member-storage/actions';\n\nexport type MemberStorageState = {\n isUnitialized: boolean;\n isLoading: boolean;\n isError: boolean;\n isSuccess: boolean;\n data: Record;\n};\n\nconst initialState: MemberStorageState = {\n isUnitialized: true,\n isLoading: false,\n isError: false,\n isSuccess: false,\n data: {}\n};\n\nconst memberStorageSlice = createSlice({\n name: 'memberStorage',\n initialState,\n reducers: {\n setData: (state, action: PayloadAction>) => {\n state.isUnitialized = false;\n state.isLoading = false;\n state.isError = false;\n state.isSuccess = true;\n state.data = action.payload;\n },\n setValue: (\n state,\n action: PayloadAction<{ key: string; value: string }>\n ) => {\n state.data[action.payload.key] = action.payload.value;\n }\n },\n extraReducers: (builder) => {\n builder.addCase(loadMemberServerStorageData.pending, (state) => {\n state.isUnitialized = false;\n state.isLoading = true;\n state.isError = false;\n state.isSuccess = false;\n });\n builder.addCase(\n loadMemberServerStorageData.fulfilled,\n (state, action) => {\n state.isUnitialized = false;\n state.isLoading = false;\n state.isError = false;\n state.isSuccess = true;\n action.payload.rows?.forEach((row) => {\n if (row.key && row.value) {\n state.data[row.key] = row.value;\n }\n });\n }\n );\n builder.addCase(loadMemberServerStorageData.rejected, (state) => {\n state.isUnitialized = false;\n state.isLoading = false;\n state.isError = true;\n state.isSuccess = false;\n });\n }\n});\n\nexport const { setData, setValue } = memberStorageSlice.actions;\n\nexport default memberStorageSlice.reducer;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { getInitialState } from './get-initial-state';\nimport type { InitData } from 'tradera/state/init-data/types';\nimport type { MemberSessionDataApiResponse } from '../services/types/webapi-member-generated';\n\nexport type MemberState = {\n // from init-data\n memberCountryCodeIso2: string;\n isCompany: boolean;\n cleanedMemberAlias: string | null;\n facebookId: string | null;\n isLoggedIn: boolean;\n hasLoggedIn: boolean; // TGL-369 Add cookie tracking if a member has logged in at least once\n previousLoginMethod: string | null;\n memberAlias: string | null;\n memberId: number;\n memberDetailedSellerRatingAverage: number; // float\n memberCountry: string | null;\n memberEmail: string | null;\n memberEmailMd5: string | null;\n memberEmailSha256: string | null;\n memberFirstName: string | null;\n memberLastName: string | null;\n memberBirthdate: string | null;\n memberTown: string | null;\n memberHeroImage: {\n max: string | null;\n med: string | null;\n min: string | null;\n };\n hasTraderaPay: boolean;\n age: number | null;\n gender: string | null;\n registrationDate: string | null;\n memberIsBuyer: boolean;\n memberIsSeller: boolean;\n // from reducer state\n isFetchingGeolocation: boolean;\n geolocation: {\n isoCode: string;\n } | null; //KATS: Do we have this type for this that we can use?\n currencyCode: string | null;\n permissions: MemberSessionDataApiResponse['permissions'];\n isImpersonationSession: boolean;\n blueshiftEventSignature: string | null;\n memberIdHash: string | null;\n automaticTranslationPreferred: boolean;\n memberState: number;\n isTrustedMember: boolean;\n};\n\nconst initialState: MemberState = {\n isLoggedIn: false,\n hasLoggedIn: false,\n previousLoginMethod: null,\n isFetchingGeolocation: false,\n isImpersonationSession: false,\n geolocation: null,\n memberHeroImage: {\n max: null,\n med: null,\n min: null\n },\n memberCountryCodeIso2: '',\n isCompany: false,\n cleanedMemberAlias: null,\n facebookId: null,\n memberAlias: null,\n memberDetailedSellerRatingAverage: 0,\n memberCountry: null,\n memberEmail: null,\n memberEmailMd5: null,\n memberEmailSha256: null,\n memberFirstName: null,\n memberLastName: null,\n memberBirthdate: null,\n memberTown: null,\n hasTraderaPay: false,\n age: null,\n gender: null,\n registrationDate: null,\n memberIsBuyer: false,\n memberIsSeller: false,\n memberId: 0,\n currencyCode: null,\n permissions: null,\n blueshiftEventSignature: null,\n memberIdHash: null,\n automaticTranslationPreferred: false,\n memberState: -1,\n isTrustedMember: false\n};\n\nconst memberSlice = createSlice({\n name: 'member',\n initialState,\n reducers: {\n initializeFromInitData: (state, action: PayloadAction) => {\n return { ...state, ...getInitialState(action.payload) };\n },\n initialize: (\n state,\n action: PayloadAction\n ) => {\n return { ...state, ...action.payload };\n },\n setIsFetchingGeolocation: (state, action) => {\n state.isFetchingGeolocation = action.payload.isFetchingGeolocation;\n },\n setIsImpersonationSession: (state, action: PayloadAction) => {\n state.isImpersonationSession = action.payload;\n },\n setGeolocation: (state, action) => {\n state.geolocation = action.payload;\n },\n failedLoadingGeolocation: (state) => {\n state.geolocation = null;\n state.isFetchingGeolocation = false;\n },\n setMemberHeroImage: (state, action: PayloadAction) => {\n state.memberHeroImage.max = action.payload;\n state.memberHeroImage.med = action.payload;\n state.memberHeroImage.min = action.payload;\n },\n setHasLoggedIn: (state, action: PayloadAction) => {\n state.hasLoggedIn = action.payload;\n },\n setPreviousLoginMethod: (state, action: PayloadAction) => {\n state.previousLoginMethod = action.payload;\n },\n setMemberActive: (state) => {\n state.memberState = 2000;\n }\n }\n});\n\nexport const {\n initialize,\n setIsFetchingGeolocation,\n setIsImpersonationSession,\n setGeolocation,\n failedLoadingGeolocation,\n setMemberHeroImage,\n initializeFromInitData,\n setHasLoggedIn,\n setPreviousLoginMethod,\n setMemberActive\n} = memberSlice.actions;\n\nexport default memberSlice.reducer;\n","import Analytics from 'packages/analytics';\nimport cookieUtil from 'tradera/utils/cookie';\nimport { setPreferredCurrency } from './reducer';\nimport { selectIsLoggedIn } from 'tradera/state/member/selectors';\nimport { touchWebClient } from 'tradera/utils/http';\nimport { selectPreferredLanguage } from 'tradera/state/language/selectors';\nimport type { AppDispatch, GetState } from '../configure-store';\n\nexport const setPreferredCurrencyThunk =\n (currencyCode: string, triggerGa = true) =>\n async (dispatch: AppDispatch, getState: GetState) => {\n if (triggerGa) {\n Analytics.trackEvent({\n category: 'Settings',\n action: 'Currency',\n label: currencyCode\n });\n }\n\n if (selectIsLoggedIn(getState())) {\n await touchWebClient.post('my/profile/save-currency-setting', {\n currencyCode\n });\n }\n\n createPreferredCurrencyCookie(currencyCode);\n dispatch(setPreferredCurrency({ currencyCode }));\n };\n\nexport const setCurrencyIfNotChosen =\n (currencyCode: string) => (dispatch: AppDispatch, getState: GetState) => {\n if (\n cookieUtil.readCookie('preferred_currency') ||\n selectIsLoggedIn(getState())\n ) {\n return;\n }\n\n const { languageCodeIso2 = 'sv' } =\n selectPreferredLanguage(getState()) ?? {};\n\n const map: Record = {\n sv: 'SEK',\n da: 'DKK',\n de: 'EUR'\n };\n\n if (Object.keys(map).includes(languageCodeIso2)) {\n dispatch(setPreferredCurrencyThunk(map[languageCodeIso2], false));\n } else {\n dispatch(setPreferredCurrencyThunk(currencyCode, false));\n }\n };\n\nconst yearInMilliseconds = 1000 * 60 * 60 * 24 * 365;\nconst createPreferredCurrencyCookie = (currencyCode: string) => {\n cookieUtil.createCookie(\n 'preferred_currency',\n currencyCode,\n new Date(new Date().getTime() + yearInMilliseconds)\n );\n};\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { PAGE_TYPES } from 'tradera/hooks/use-page-meta';\nimport type { InitData } from 'tradera/state/init-data/types';\n\nexport type CustomPageMetaData = {\n breadcrumbs: string;\n canonicalLink: string;\n metaDescription: string;\n metaRobots: string;\n ogImage: string;\n};\n\nexport type PageState = {\n type: string;\n metaTitle: string;\n} & CustomPageMetaData;\n\nexport const initialState: PageState = {\n type: PAGE_TYPES.DEFAULT,\n metaTitle: '',\n breadcrumbs: '',\n canonicalLink: '',\n metaDescription: '',\n metaRobots: '',\n ogImage: ''\n};\n\nconst pageSlice = createSlice({\n name: 'page',\n initialState,\n reducers: {\n initialize: (_, { payload }: PayloadAction) => {\n return {\n ...initialState,\n metaDescription: payload.description || '',\n metaTitle: payload.title || '',\n type: payload.pageName\n };\n },\n setPageMeta: (state, { payload }: PayloadAction) => {\n return { ...state, ...payload };\n },\n setPageType: (state, { payload }: PayloadAction) => {\n return { ...state, type: payload };\n }\n }\n});\n\nexport const { initialize, setPageMeta, setPageType } = pageSlice.actions;\n\nexport const reducer = pageSlice.reducer;\n","import StorageService from 'tradera/services/storage-service';\nimport { STORAGE_KEYS } from 'tradera/constants/storage';\nimport type { RecentSearch } from 'tradera/state/personalisation/reducer';\n\nconst recentSearchesService = new StorageService(STORAGE_KEYS.SEARCH_RECENT);\nconst recentBrandAttributesService = new StorageService(\n STORAGE_KEYS.RECENT_BRAND_ATTRIBUTES\n);\n\ntype RecentSearchFromLocalStorage = Omit;\n\ntype LegacyRecentSearchFromLocalStorage = number;\n\nexport const getRecentSearchesLocalStorage = (): RecentSearch[] => {\n const recentSearches = recentSearchesService\n .fetch<\n RecentSearchFromLocalStorage | LegacyRecentSearchFromLocalStorage\n >()\n .orderByTimestamp?.();\n\n const formattedRecentSearches = recentSearches?.map((recent) => {\n return {\n text: recent.key,\n count:\n typeof recent.value === 'number'\n ? recent.value\n : recent.value?.count,\n queryParams:\n typeof recent.value === 'object'\n ? recent.value?.queryParams\n : { q: recent.key }\n };\n });\n\n return formattedRecentSearches ?? [];\n};\n\nexport const setRecentSearchLocalStorage = (\n searchTerm: string,\n queryParams: object,\n count: number\n) => {\n recentSearchesService.set(searchTerm, {\n count,\n queryParams\n });\n};\n\nexport const removeRecentSearchLocalStorage = (searchTerm: string) => {\n if (!searchTerm || searchTerm.length < 3) {\n return;\n }\n recentSearchesService.remove(searchTerm);\n};\n\nexport const setRecentBrandAttributesLocalStorage = (\n filter: string,\n value: string\n) => {\n recentBrandAttributesService.set(filter, value);\n};\n\nexport const getRecentBrandAttributesLocalStorage = () => {\n const recentBrandAttributes = recentBrandAttributesService\n .fetch()\n .orderByTimestamp?.()\n .find((item) => item.value && item.key);\n const recentBrand = {\n filter: recentBrandAttributes?.key || null,\n value: recentBrandAttributes?.value || null\n };\n return recentBrand.filter && recentBrand.value ? recentBrand : {};\n};\n","/* eslint-disable better-mutation/no-mutation */\n\n/**\n * HOW IT WORKS\n *\n * urban airship has something called channels. A tradera member subscribes to a channel to get push notifications.\n * each channel has tags that indicate what kind of push notifications the member wants to receive. In the case of the wish list\n * reminder that particular setting subscribes the user to 2 different notifications: reminder 15 minutes before auction ends\n * and reminder 3 minutes before the auction ends. In order to be able to have 1 push notification setting that subscribes\n * to multiple push notifications at tradera we call these tag groups.\n *\n *\n * Urban airship docs:\n * https://docs.airship.com/reference/libraries/web-notify-sdk/latest/index.html\n *\n * web_version_2:\n * Version 1 of push notifications was just targetted at wish list reminders, 3 min and 15 min. When this release was done\n * the code did subscribe the user to all notifications even though the user only wanted to signup for wish list reminders.\n * Since the app push notifier only sent wishlist reminders for web push it was not a problem that the user was subscribed to all\n * kinds of notifications. In the next release when tradera wanted to offer all sorts of push notifications but wanted the users\n * to on their own sign up then we had to update all the current subscriptions. Since this is not possible via the urban airship\n * to update channels via the REST API and then see the updated reflected in the Web SDK we had to introduce the tag web_version_2\n * that indicates if the user has updated their push notification settings.\n *\n * opt-in dialog sample usage:\n * import uiActions from 'tradera/state/ui/actions';\n * import { MODAL_TYPES } from 'tradera/constants/push-notifications';\n *\n * uiActions.openNotificationOptinModalAction(\n * MODAL_TYPES.wishlistReminders\n * )\n *\n */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport { logger } from 'packages/logger';\nimport {\n CHANNEL_TAG_GROUPS,\n MODAL_TYPES\n} from 'tradera/state/push-notifications/constants';\nimport { localStore } from 'tradera/utils/storage';\nimport { STORAGE_KEYS } from 'tradera/constants/storage';\nimport {\n getUrbanSdk,\n getTagGroupsFromUrbanAirship,\n isPushEnabled\n} from './helpers';\n\nconst pushNotificationsSlice = createSlice({\n name: 'pushNotifications',\n initialState: {\n enabled: false,\n initDone: false,\n pushSupported: false,\n optedIn: false,\n tagGroups: {\n wishlistReminders: false,\n buyingListingOutbid: false,\n buyingListingWon: false,\n sellingListingFirstBid: false,\n sellingListingAllBids: false,\n sellingListingSold: false,\n sellingPaymentReceived: false\n },\n shownModals: {\n [MODAL_TYPES.wishlistReminders]: false,\n [MODAL_TYPES.default]: false,\n [MODAL_TYPES.selling]: false\n }\n },\n reducers: {\n setInitDone(state) {\n state.initDone = true;\n },\n setPushSupported(state, actions) {\n state.pushSupported = actions.payload;\n if (!state.pushSupported) {\n state.optedIn = false;\n }\n },\n setOptedInValue(state, action) {\n state.optedIn = action.payload;\n },\n setTagGroupsValue(state, action) {\n const tagGroups = action.payload;\n state.tagGroups = { ...state.tagGroups, ...tagGroups };\n },\n setShownModalTrue(state, action) {\n const modalType = action.payload;\n state.shownModals[modalType] = true;\n localStore.setItem(\n STORAGE_KEYS.WEB_PUSH_SHOWN_MODALS,\n state.shownModals\n );\n },\n setAllShownModals(state, action) {\n const shownModals = action.payload;\n state.shownModals = shownModals;\n localStore.setItem(\n STORAGE_KEYS.WEB_PUSH_SHOWN_MODALS,\n state.shownModals\n );\n },\n setEnabled(state, action) {\n const enabled = action.payload;\n state.enabled = enabled;\n }\n }\n});\n\nconst actions = pushNotificationsSlice.actions;\nexport const { setShownModalTrue } = actions;\nexport default pushNotificationsSlice.reducer;\n\n/**\n * this should be called as soon as the store is mounted\n */\nexport const init = () => async (dispatch, getState) => {\n let sdk = null;\n try {\n sdk = await getUrbanSdk();\n } catch (error) {\n // not able to init sdk\n }\n dispatch(\n actions.setPushSupported(\n sdk !== null && sdk.canRegister && sdk.isSupported\n )\n );\n\n if (sdk !== null && sdk.channel !== null) {\n dispatch(actions.setOptedInValue(sdk.channel.optedIn));\n\n // has this user been upgraded to version 2?\n if (!sdk.channel.tags.has('web_version_2')) {\n await sdk.channel.tags.set([\n 'wishlist_reminder_3_min_optin',\n 'wishlist_reminder_15_min_optin',\n 'web_version_2'\n ]);\n }\n const tagGroups = await getTagGroupsFromUrbanAirship();\n dispatch(actions.setTagGroupsValue(tagGroups));\n }\n dispatch(actions.setEnabled(sdk !== null && isPushEnabled(getState)));\n\n // load modal shown settings from local store\n const shownModals = localStore.getItem(STORAGE_KEYS.WEB_PUSH_SHOWN_MODALS);\n if (shownModals !== null) {\n dispatch(actions.setAllShownModals(shownModals));\n }\n dispatch(actions.setInitDone());\n};\n\nexport const optIn = () => async (dispatch, getState) => {\n try {\n dispatch(actions.setOptedInValue(true));\n const memberId = getState().member.memberId;\n const sdk = await getUrbanSdk();\n const channel = await sdk.register();\n await channel.namedUser.set(memberId.toString());\n return channel;\n } catch (error) {\n dispatch(actions.setOptedInValue(false));\n return null;\n }\n};\n\nexport const optOut = () => async (dispatch) => {\n try {\n dispatch(actions.setOptedInValue(false));\n const sdk = await getUrbanSdk();\n if (sdk !== null && sdk.channel !== null) {\n await sdk.channel.optOut();\n }\n } catch (error) {\n dispatch(actions.setOptedInValue(true));\n return null;\n }\n};\n\nconst saveTagsToUrbanAirshipAndUpdateState = async (\n channel,\n tagGroups,\n tagGroupValue,\n dispatch,\n getState\n) => {\n // check what tag groups to set and not set\n const tagGroupsToSet = { ...getState().pushNotifications.tagGroups };\n for (const t of tagGroups) {\n tagGroupsToSet[t] = tagGroupValue;\n }\n\n // get the actual tags that we want to get push notifications for and\n // register these tags in urban airship\n let channelTags = ['web_version_2'];\n for (const [group, enabled] of Object.entries(tagGroupsToSet)) {\n if (enabled) {\n channelTags = [...channelTags, ...CHANNEL_TAG_GROUPS[group]];\n }\n }\n\n dispatch(actions.setTagGroupsValue(tagGroupsToSet));\n await channel.tags.set(channelTags);\n};\n\nexport const addTagGroups = (tagGroupsToAdd) => async (dispatch, getState) => {\n try {\n // no sdk? then do nothing\n const sdk = await getUrbanSdk();\n if (sdk === null) {\n return;\n }\n\n let channel = sdk.channel;\n if (channel === null) {\n channel = await dispatch(optIn());\n if (channel === null) {\n dispatch(actions.setPushSupported(false));\n // seems user clicked on block notifications in the browser, abort\n return;\n }\n }\n\n saveTagsToUrbanAirshipAndUpdateState(\n channel,\n tagGroupsToAdd,\n true,\n dispatch,\n getState\n );\n } catch (error) {\n logger(error);\n }\n};\n\nexport const removeTagGroups =\n (tagGroupsToRemove) => async (dispatch, getState) => {\n try {\n // no sdk and no subscription? then do nothing\n const sdk = await getUrbanSdk();\n if (sdk === null || sdk.channel === null) {\n return;\n }\n saveTagsToUrbanAirshipAndUpdateState(\n sdk.channel,\n tagGroupsToRemove,\n false,\n dispatch,\n getState\n );\n } catch (error) {\n logger(error);\n }\n };\n","import qs from 'qs';\nimport type {\n GetKycPendingActionsApiResponse,\n QuestionnaireRequest,\n GetKycQuestionnairePageDefinitionApiResponse,\n GetMemberVerificationStatusApiResponse,\n InitializeQuestionnaireApiRequest,\n InitializeQuestionnaireApiResponse,\n CompleteQuestionnaireApiResponse,\n CompleteQuestionnaireApiRequest,\n GetMemberCompanyMoneyTransferLicenseStatusApiResponse,\n SetMakeAnOfferMemberEnabledApiResponse,\n SetMakeAnOfferMemberEnabledApiRequest,\n SetMessagingSilentApiRequest,\n SetMessagingSilentApiResponse,\n GetMessagingSilentApiResponse,\n GetMemberEmailNotificationsSettingsViewModelApiResponse,\n SetMessagingEmailNotifyApiResponse,\n SetMessagingEmailNotifyApiRequest,\n UpdateMemberEmailSettingsApiResponse,\n UpdateMemberEmailSettingsApiRequest,\n GetMemberCompanyDac7StatusApiResponse,\n UpdateMemberVatNumberApiRequest,\n UpdateMemberVatNumberApiResponse,\n GetMemberHasTaxIdentificationNumberApiResponse,\n UpdateMemberTaxIdentificationNumberApiRequest,\n UpdateMemberTaxIdentificationNumberApiResponse,\n GetMessagingConfigurationApiResponse,\n GetMemberShouldCollectTaxIdentificationNumberApiResponse,\n GetMagicalSyiEnabledApiResponse,\n GetMagicalSyiEnabledApiRequest,\n GetMemberGeoDataApiResponse\n} from './types/webapi-member-generated';\nimport { MessagingEmailNotification } from './types/webapi-member-generated';\nimport { webApi } from './webapi-api';\nimport { isServer } from 'tradera/utils/nextjs';\n\nexport const memberApi = webApi.injectEndpoints({\n endpoints: (builder) => ({\n getPendingKycActions: builder.query<\n GetKycPendingActionsApiResponse,\n void\n >({\n query: () => {\n return {\n url: '/api/webapi/member/kyc/pending-actions',\n method: 'GET'\n };\n }\n }),\n getQuestionnaire: builder.query<\n GetKycQuestionnairePageDefinitionApiResponse,\n QuestionnaireRequest\n >({\n query: (params) =>\n `/api/webapi/member/kyc/questionnaire?${qs.stringify(params)}`\n }),\n initializeQuestionnaire: builder.mutation<\n InitializeQuestionnaireApiResponse,\n InitializeQuestionnaireApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/kyc/initialize-questionnaire',\n method: 'POST',\n body: params\n };\n }\n }),\n completeQuestionnaire: builder.mutation<\n CompleteQuestionnaireApiResponse,\n CompleteQuestionnaireApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/kyc/complete-questionnaire',\n method: 'POST',\n body: params\n };\n }\n }),\n getVerificationStatus: builder.query<\n GetMemberVerificationStatusApiResponse,\n void\n >({\n query: () => '/api/webapi/member/verification-status'\n }),\n setMakeAnOfferEnabled: builder.mutation<\n SetMakeAnOfferMemberEnabledApiResponse,\n SetMakeAnOfferMemberEnabledApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/make-an-offer-enabled',\n method: 'PUT',\n body: params\n };\n }\n }),\n getSilentMessagingEnabled: builder.query<\n GetMessagingSilentApiResponse,\n void\n >({\n query: () => '/api/webapi/member/messaging/silent'\n }),\n setSilentMessagingEnabled: builder.mutation<\n SetMessagingSilentApiResponse,\n SetMessagingSilentApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/messaging/silent',\n method: 'PUT',\n body: params\n };\n },\n onQueryStarted(request, { dispatch }) {\n dispatch(\n memberApi.util.updateQueryData(\n 'getMemberEmailNotificationsSettingsViewModel',\n undefined,\n (draft) => {\n Object.assign(draft, {\n silentMessaging: {\n ...draft.silentMessaging,\n enabled: request.enabled\n }\n });\n }\n )\n );\n },\n invalidatesTags: ['memberemailnotificationssettingsviewmodel']\n }),\n getCompanyMoneyTransferLicenseStatus: builder.query<\n GetMemberCompanyMoneyTransferLicenseStatusApiResponse,\n void\n >({\n query: () =>\n '/api/webapi/member/company-money-transfer-license-status'\n }),\n getMemberEmailNotificationsSettingsViewModel: builder.query<\n GetMemberEmailNotificationsSettingsViewModelApiResponse,\n void\n >({\n query: () =>\n '/api/webapi/member/memberemailnotificationssettingsviewmodel',\n providesTags: ['memberemailnotificationssettingsviewmodel']\n }),\n setMessagingEmailNotify: builder.mutation<\n SetMessagingEmailNotifyApiResponse,\n SetMessagingEmailNotifyApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/messaging/emailnotify',\n method: 'PUT',\n body: params\n };\n },\n onQueryStarted(request, { dispatch }) {\n dispatch(\n memberApi.util.updateQueryData(\n 'getMemberEmailNotificationsSettingsViewModel',\n undefined,\n (draft) => {\n Object.assign(draft, {\n messaging: {\n ...draft.messaging,\n emailNotifyAll:\n request.emailNotify ===\n MessagingEmailNotification.All\n }\n });\n }\n )\n );\n },\n invalidatesTags: ['memberemailnotificationssettingsviewmodel']\n }),\n getMemberHasTaxIdentificationNumber: builder.query<\n GetMemberHasTaxIdentificationNumberApiResponse,\n void\n >({\n query: () => '/api/webapi/member/has-tin'\n }),\n getMemberShouldCollectTaxIdentificationNumber: builder.query<\n GetMemberShouldCollectTaxIdentificationNumberApiResponse,\n void\n >({\n query: () => '/api/webapi/member/should-collect-tin'\n }),\n setMemberTaxIdentificationNumber: builder.mutation<\n UpdateMemberTaxIdentificationNumberApiResponse,\n UpdateMemberTaxIdentificationNumberApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/tin',\n method: 'PUT',\n body: params\n };\n }\n }),\n updateMemberEmailSettings: builder.mutation<\n UpdateMemberEmailSettingsApiResponse,\n UpdateMemberEmailSettingsApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/email-settings',\n method: 'PUT',\n body: params\n };\n }\n }),\n getCompanyDac7Status: builder.query<\n GetMemberCompanyDac7StatusApiResponse,\n void\n >({\n query: () => '/api/webapi/member/company-dac7-status'\n }),\n setMemberVatNumber: builder.mutation<\n UpdateMemberVatNumberApiResponse,\n UpdateMemberVatNumberApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/vat-number',\n method: 'PUT',\n body: params\n };\n }\n }),\n setMagicalSyi: builder.mutation<\n GetMagicalSyiEnabledApiResponse,\n GetMagicalSyiEnabledApiRequest\n >({\n query: (params) => {\n return {\n url: '/api/webapi/member/seller-magical-syi-enabled',\n method: 'PUT',\n body: params\n };\n }\n }),\n getMagicalSyiEnabled: builder.query<\n GetMagicalSyiEnabledApiResponse,\n void\n >({\n query: () => '/api/webapi/member/seller-magical-syi-enabled'\n }),\n getMessagingConfiguration: builder.query<\n GetMessagingConfigurationApiResponse,\n void\n >({\n query: () => '/api/webapi/member/messaging/messaging-configuration'\n }),\n getMemberGeoData: builder.query({\n query: () => {\n const baseUrl = isServer ? '' : '/api/webapi';\n return `${baseUrl}/member/geo`;\n }\n })\n })\n});\n\nexport const {\n useGetPendingKycActionsQuery,\n useGetQuestionnaireQuery,\n useInitializeQuestionnaireMutation,\n useCompleteQuestionnaireMutation,\n useGetVerificationStatusQuery,\n useSetMakeAnOfferEnabledMutation,\n useGetSilentMessagingEnabledQuery,\n useSetSilentMessagingEnabledMutation,\n useGetCompanyMoneyTransferLicenseStatusQuery,\n useGetMemberEmailNotificationsSettingsViewModelQuery,\n useSetMessagingEmailNotifyMutation,\n useUpdateMemberEmailSettingsMutation,\n useGetCompanyDac7StatusQuery,\n useSetMemberVatNumberMutation,\n useGetMemberHasTaxIdentificationNumberQuery,\n useGetMemberShouldCollectTaxIdentificationNumberQuery,\n useSetMemberTaxIdentificationNumberMutation,\n useSetMagicalSyiMutation,\n useGetMagicalSyiEnabledQuery,\n useGetMessagingConfigurationQuery,\n useGetMemberGeoDataQuery,\n endpoints\n} = memberApi;\n","import { createApi } from '@reduxjs/toolkit/query/react';\nimport { DEFAULT_LANGUAGE } from 'tradera/lang/constants.mjs';\nimport { touchWebClient } from 'tradera/utils/http';\nimport { httpClientBaseQuery } from './utils/http-client-base-query';\nimport qs from 'qs';\nimport type {\n CategorySearchApiResponse,\n CategorySearchRequest\n} from './types/webapi-discover-generated';\n\nimport { z } from 'zod';\n\nconst CategorySchema = z.object({\n name: z.string(),\n categoryId: z.number(),\n isLeaf: z.boolean()\n});\n\nconst CategorySuggestionSchema = z.object({\n matchedItemCount: z.number(),\n name: z.string(),\n categoryId: z.number(),\n isLeaf: z.boolean()\n});\n\nconst CategoriesAndSuggestionsSchema = z.object({\n categories: z.array(CategorySchema),\n // FYI: we don't get these currently in DEV\n suggestions: z.array(CategorySuggestionSchema).optional()\n});\n\ntype GetCategoriesResponse = z.infer;\n\ntype GetCategoriesParams = {\n categoryId: number;\n shortDescription?: string | null;\n locale?: string;\n currentLevel?: number;\n};\n\nexport const touchwebSyiApi = createApi({\n reducerPath: 'touchwebSyiApi',\n baseQuery: httpClientBaseQuery({ client: touchWebClient }),\n endpoints: (builder) => ({\n getCategories: builder.query<\n GetCategoriesResponse,\n GetCategoriesParams\n >({\n query: ({\n categoryId = -1,\n shortDescription,\n currentLevel = 0\n }) => {\n if (categoryId > 0 && currentLevel > 0) {\n return {\n url: `/selling/categorysuggestions`,\n method: 'POST',\n data: {\n categoryId: categoryId,\n levelToSearch: currentLevel + 1,\n title: shortDescription\n }\n };\n }\n\n return {\n url: '/selling/toplevelcategorysuggestions',\n method: 'POST',\n data: {\n title: shortDescription\n }\n };\n },\n\n transformResponse: (response: unknown, _meta, arg) => {\n const data = CategoriesAndSuggestionsSchema.parse(response);\n\n const suggestions = data?.suggestions || [];\n\n return {\n ...data,\n // just use the first 3 suggestions and merge the rest as regular categories\n suggestions: suggestions.slice(0, 3),\n categories: [...data.categories, ...suggestions.slice(3)]\n ?.slice()\n .sort((a, b) =>\n new Intl.Collator(\n arg.locale ?? DEFAULT_LANGUAGE\n ).compare(a.name, b.name)\n )\n };\n }\n }),\n categorySearch: builder.query<\n CategorySearchApiResponse,\n CategorySearchRequest\n >({\n query: (request) =>\n `/api/webapi/discover/category-search?${qs.stringify(request)}`\n })\n })\n});\n\nexport type Category = z.infer;\n\nexport const { useCategorySearchQuery, useGetCategoriesQuery, usePrefetch } =\n touchwebSyiApi;\n","/* eslint-disable */\n/* tslint:disable */\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\n\nexport interface AddsavedsearchCreateParams {\n request?: AddSavedSearchApiRequest;\n}\n\nexport interface AllClothesBrandAttributeValuesRequest {\n request?: GetAllClothesBrandAttributeValuesApiRequest;\n}\n\nexport interface AllClothesSizeAttributeValuesRequest {\n request?: GetAllClothesSizeAttributeValuesApiRequest;\n}\n\nexport interface AttributedefinitionsRequest {\n request?: GetAllAttributeDefinitionsApiRequest;\n}\n\nexport interface BrandPageRequest {\n brand?: string;\n /** @format int32 */\n pageSize?: number;\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n shippingCountryCodeIso2?: string;\n allowedBuyerRegions?: string;\n}\n\nexport interface CategoryPageCreateParams {\n request?: CategoryPageApiRequest;\n}\n\nexport interface CategorySearchRequest {\n query?: string;\n searchLanguageCodeIso2?: string;\n}\n\nexport interface CausesPageCausesItemsCreateParams {\n request?: CausesItemsApiRequest;\n}\n\nexport interface CustomResultPagesCampaignPageCreateParams {\n request?: CampaignPageApiRequest;\n}\n\nexport interface CustomResultPagesCausePageCreateParams {\n request?: CausePageApiRequest;\n}\n\nexport interface CustomResultPagesCharityPageCreateParams {\n request?: CharityPageApiRequest;\n}\n\nexport interface CustomResultPagesShopPageCreateParams {\n request?: ShopPageApiRequest;\n}\n\nexport interface DisableWardrobeProfileCreateParams {\n request?: DisableWardrobeProfileApiRequest;\n}\n\nexport interface EnableWardrobeProfileCreateParams {\n request?: EnableWardrobeProfileApiRequest;\n}\n\nexport interface FavouritesellersAndItems2Request {\n /** @format int32 */\n maxFavouriteSellers?: number;\n /** @format int32 */\n maxItems?: number;\n /** @format int32 */\n maxItemsPerFavouriteSeller?: number;\n /** @format int32 */\n skipItems?: number;\n shippingCountryCode?: string;\n userLanguage?: string;\n automaticTranslationPreferred?: boolean;\n}\n\nexport interface FavouritesellersCreateParams {\n request?: AddFavouriteSellerApiRequest;\n}\n\nexport interface FavouritesellersDeleteParams {\n request?: RemoveFavouriteSellersApiRequest;\n}\n\nexport interface FavouritesellersRequest {\n request?: GetFavouriteSellersApiRequest;\n}\n\nexport interface ForShopDetailParams {\n /** @format int32 */\n size?: number;\n allowedBuyerRegions?: string[];\n searchResultLanguageCodeIso2?: string;\n /** @format int32 */\n itemId: number;\n}\n\nexport interface GetBlueshiftEmailPreferencesLinkRequest {\n request?: GetBlueshiftEmailPreferencesLinkApiRequest;\n}\n\nexport interface HistogramCreateParams {\n request?: SearchCategoryHistogramApiRequest;\n}\n\nexport interface ImageSearchCreateParams {\n request?: ImageSearchApiRequest;\n}\n\nexport interface ImageSearchItemCreateParams {\n request?: ImageSearchFromItemIdApiRequest;\n}\n\nexport interface IndependentSearchCreateParams {\n request?: IndependentSearchApiRequest;\n}\n\nexport interface ItemsItemsByIdsRequest {\n searchLanguageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n itemIds?: number[];\n}\n\nexport interface MemberSearchFiltersCreateParams {\n request?: UpdateMemberSearchFiltersApiRequest;\n}\n\nexport interface MemberSearchFiltersRequest {\n request?: GetMembersSearchFiltersApiRequest;\n}\n\nexport interface MoreFromSellerCreateParams {\n request?: MoreFromSellerApiRequest;\n}\n\nexport interface MoreFromSellerRequest {\n /** @format int32 */\n sellerMemberId?: number;\n /** @format int32 */\n size?: number;\n searchResultLanguageCodeIso2?: string;\n}\n\nexport interface MoreItemsForCombinedShippingFromSellerCreateParams {\n request?: MoreItemsFromSellerForCombinedShippingApiRequest;\n}\n\nexport interface MoreItemsForCombinedShippingRequest {\n shippingCountryCodeIso2?: string;\n searchLanguageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n itemId?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface MoreItemsFromCategoryRequest {\n shippingCountryCodeIso2?: string;\n searchLanguageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n itemId?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface MoreItemsFromSellerRequest {\n shippingCountryCodeIso2?: string;\n searchLanguageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n itemId?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface MoreItemsFromShopRequest {\n shippingCountryCodeIso2?: string;\n searchLanguageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n itemId?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface MorefromcampaignRequest {\n query?: string;\n campaignCodeIds?: number[];\n excludeItemIds?: number[];\n /** @format int32 */\n size?: number;\n searchResultLanguageCodeIso2?: string;\n}\n\nexport interface OthersAlsoLookedAtDetailParams {\n /** @format int32 */\n size?: number;\n automaticTranslationPreferred?: boolean;\n userLanguage?: string;\n /** @format int32 */\n itemId: number;\n}\n\nexport interface PersonalizedRecommendationSearchRequest {\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n allowedBuyerRegions?: string[];\n}\n\nexport interface ProfilePageProfileItemsCreateParams {\n request?: ProfileItemsApiRequest;\n}\n\nexport interface RecommendationsV3Request {\n slot?: string;\n seedItemIds?: number[];\n cookie?: string;\n /** @format int32 */\n maxResults?: number;\n /** @format int32 */\n pageNumber?: number;\n /** @format int32 */\n seedCategoryId?: number;\n searchResultLanguageCodeIso2?: string;\n}\n\nexport interface RecommendationsV4Request {\n slot?: string;\n shippingCountryCode?: string;\n seedItemIds?: number[];\n /** @format int32 */\n maxResults?: number;\n /** @format int32 */\n pageNumber?: number;\n userLanguage?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n seedCategoryId?: number;\n}\n\nexport interface RemovesavedsearchDeleteParams {\n request?: RemoveSavedSearchApiRequest;\n}\n\nexport interface RemovesavedsearchesDeleteParams {\n request?: RemoveSavedSearchesApiRequest;\n}\n\nexport interface SavedsearchemailnotificationCreateParams {\n request?: SavedSearchEmailNotificationApiRequest;\n}\n\nexport interface SavedsearchesRequest {\n sortBy?: string;\n}\n\nexport interface SavedsearchesitemsRequest {\n /** @format int32 */\n maxSearches?: number;\n /** @format int32 */\n maxItemsPerSearch?: number;\n /** @format int32 */\n skipSearches?: number;\n sortBy?: string;\n languageCodeIso2?: string;\n}\n\nexport interface SavedsearchesparametersRequest {\n /** @format int32 */\n memberId?: number;\n /** @format int32 */\n savedSearchId?: number;\n}\n\nexport interface SearchCreateParams {\n request?: ExecuteCustomResultPageSearchApiRequest;\n id: string;\n}\n\nexport interface SearchRequest {\n query?: string;\n /** @format int32 */\n page?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface SearchPageCreateParams {\n request?: SearchPageApiRequest;\n}\n\nexport interface SearchV2CreateParams {\n request?: ExecuteSavedSearchForCurrentUserApiRequest;\n}\n\nexport interface SellerListRequest {\n /** @format int32 */\n maxSellers?: number;\n /** @format int32 */\n maxItemsPerSeller?: number;\n /** @format int32 */\n skipSellers?: number;\n shippingCountryCode?: string;\n}\n\nexport interface SellerListSearchRequest {\n query?: string;\n /** @format int32 */\n page?: number;\n /** @format int32 */\n pageSize?: number;\n}\n\nexport interface SellerSuggestionsRequest {\n /** @format int32 */\n maxSellers?: number;\n /** @format int32 */\n maxItemsPerSeller?: number;\n /** @format int32 */\n skipSellers?: number;\n shippingCountryCode?: string;\n}\n\nexport interface ServerTimeRequest {\n request?: ServerTimeApiRequest;\n}\n\nexport interface SimilarItemsDetailParams {\n /** @format int32 */\n size?: number;\n allowedBuyerRegions?: string[];\n searchResultLanguageCodeIso2?: string;\n /** @format int32 */\n itemId: number;\n}\n\nexport interface SimilarItemsV2DetailParams {\n /** @format int32 */\n size?: number;\n automaticTranslationPreferred?: boolean;\n userLanguage?: string;\n shippingCountryCodeIso2?: string;\n /** @format int32 */\n itemId: number;\n}\n\nexport interface SimilarSellerSuggestionsRequest {\n /** @format int32 */\n sellerMemberId?: number;\n /** @format int32 */\n maxSellers?: number;\n keepSellersWithNoItems?: boolean;\n}\n\nexport interface StartPageBrandSuggestionsRequest {\n request?: BrandSuggestionsApiRequest;\n}\n\nexport interface StartPageCreateParams {\n request?: StartPageApiRequest;\n}\n\nexport interface StartPageIdeasRequest {\n languageCodeIso2?: string;\n}\n\nexport interface StartPageInstagramFeedRequest {\n request?: InstagramFeedApiRequest;\n}\n\nexport interface StartPageLastChanceRequest {\n shippingCountryCodeIso2?: string;\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n limit?: number;\n}\n\nexport interface StartPageNewsForYouRequest {\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n}\n\nexport interface StartPagePersonalisedSearchesRequest {\n request?: PersonalisedSearchesApiRequest;\n}\n\nexport interface StartPageResellSuggestionsRequest {\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n /** @format int32 */\n take?: number;\n}\n\nexport interface StartPageSellersOfInterestRequest {\n shippingCountryCode?: string;\n /** @format int32 */\n maxSellers?: number;\n}\n\nexport interface StartPageTrendingBrandsRequest {\n request?: TrendingBrandsApiRequest;\n}\n\nexport interface StartPageTrendingSearchesRequest {\n languageCodeIso2?: string;\n}\n\nexport interface SuggestionsByParentsCreateParams {\n request?: CategoriesSuggestionsApiRequest;\n}\n\nexport interface SuggestionsTopLevelCreateParams {\n request?: RootCategorySuggestionsApiRequest;\n}\n\nexport interface TopListsRequest {\n languageCodeIso2?: string;\n automaticTranslationPreferred?: boolean;\n}\n\nexport interface ResponseError {\n errorCode?: string | null;\n fieldName?: string | null;\n message?: string | null;\n}\n\nexport interface ResponseError2 {\n request?: Search2ApiRequest;\n}\n\nexport interface ResponseError5 {\n request?: ExecuteSavedSearchApiRequest;\n}\n\nexport interface ResponseStatus {\n errorCode?: string | null;\n errors?: ResponseError[] | null;\n message?: string | null;\n stackTrace?: string | null;\n}\n\nexport interface CategoryNodeApiDto {\n alternativeName?: string | null;\n /** @format int32 */\n count?: number | null;\n /** @format int32 */\n id: number;\n isLeaf: boolean;\n /** @format int32 */\n level: number;\n name?: string | null;\n}\n\nexport interface ItemScoreDto {\n /** @format int32 */\n categoryLeafId: number;\n itemId?: string | null;\n /** @format double */\n rank: number;\n searchResultOrigin?: SearchResultOrigin | null;\n}\n\nexport interface ResourceLink {\n href?: string | null;\n /** @format int32 */\n index: number;\n paging?: string | null;\n rel?: string | null;\n text?: string | null;\n}\n\nexport interface SearchResultHitsPerCategoryApiDto {\n categories?: CategoryNodeApiDto[] | null;\n current?: CategoryNodeApiDto | null;\n parents?: CategoryNodeApiDto[] | null;\n}\n\nexport enum SearchResultOrigin {\n Keyword = 'Keyword',\n Vector = 'Vector',\n KeywordAndVector = 'KeywordAndVector'\n}\n\nexport interface ShippingOption {\n /** @format int32 */\n cost: number;\n type?: string | null;\n}\n\nexport interface AggregationRow {\n /** @format int64 */\n count: number;\n displayName?: string | null;\n name?: string | null;\n searchFilter?: any;\n /** @format int32 */\n sortOrder: number;\n swedishDisplayName?: string | null;\n}\n\nexport interface AttributeDefinition {\n backingField?: string | null;\n /** @format int64 */\n id: number;\n possibleValues?: string[] | null;\n shouldTranslateValues: boolean;\n}\n\nexport interface AttributeFacetResults {\n termFacets?: TermFacetResults[] | null;\n}\n\nexport interface BlueshiftRecommendations4ApiResponse {\n items?: ItemCardDto[] | null;\n /** @format int32 */\n itemsMatched: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface BlueshiftRecommendationsApiResponse {\n responseStatus?: ResponseStatus | null;\n result?: Search2ApiResult | null;\n}\n\nexport interface CategoriesSuggestionsApiRequest {\n /** @format int32 */\n categoryLevel: number;\n parentCategoryIds?: number[] | null;\n shortDescription?: string | null;\n}\n\nexport interface CategoriesSuggestionsApiResponse {\n categoriesAndSuggestions?: Record;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface CategoryHits {\n categories?: ValuationSearchCategory[] | null;\n /** @format int32 */\n count: number;\n}\n\nexport interface CategorySearchApiResponse {\n categories?: SearchCategoryGroup[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface ExecuteCustomResultPageSearchApiRequest {\n id?: string | null;\n searchOverrides?: Search2ApiRequest | null;\n}\n\nexport interface ExecuteCustomResultPageSearchApiResponse {\n response?: Search2ApiResponse | null;\n responseStatus?: ResponseStatus | null;\n searchRequest?: Search2ApiRequest | null;\n}\n\nexport interface AttributeValues {\n numberAttributeValues?: NumberAttributeValue[] | null;\n termAttributeValues?: TermAttributeValue[] | null;\n}\n\nexport interface AttributeFacets {\n rangeFacets?: RangeFacet[] | null;\n termFacets?: TermFacet_CustomName1[] | null;\n}\n\nexport interface Range {\n customKey?: string | null;\n /** @format double */\n from?: number | null;\n /** @format double */\n to?: number | null;\n}\n\nexport interface RangeFacet {\n backingField?: string | null;\n /** @format double */\n filterFrom?: number | null;\n /** @format double */\n filterTo?: number | null;\n id?: string | null;\n /** @format int32 */\n limit: number;\n ranges?: Range[] | null;\n}\n\nexport interface TermFacet_CustomName1 {\n backingField?: string | null;\n filteredNumbers?: number[] | null;\n filteredTerms?: string[] | null;\n /** @format int32 */\n limit: number;\n}\n\nexport interface CategoriesAndSuggestionsDto {\n categories?: CategoryDto[] | null;\n suggestions?: SuggestedCategoryDto[] | null;\n}\n\nexport interface CategoryDto {\n /** @format int32 */\n categoryId: number;\n isLeaf: boolean;\n name?: string | null;\n}\n\nexport interface ElapsedTime {\n /** @format int64 */\n elapsedMilliseconds: number;\n layerName?: string | null;\n}\n\nexport interface FavouriteSellerApiDto {\n /** @format int32 */\n activeItems: number;\n /** @format date-time */\n createDate: string;\n hasShopAccount: boolean;\n /** @format int32 */\n id: number;\n /** @format int32 */\n memberId: number;\n sellerAlias?: string | null;\n /** @format int32 */\n sellerId: number;\n /** @format int32 */\n sellerTotalRating: number;\n}\n\nexport interface FavouriteSellerCardDto {\n hasShop: boolean;\n heroImageUrl?: string | null;\n isSuggestion: boolean;\n items?: FavouriteSellerCardItemDto[] | null;\n /** @format int32 */\n matchedItems: number;\n sellerAlias?: string | null;\n /** @format int32 */\n sellerId: number;\n sellerProfileUrl?: string | null;\n}\n\nexport interface FavouriteSellerCardItemDto {\n /** @format int32 */\n categoryId: number;\n imageUrl?: string | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n itemId: number;\n itemUrl?: string | null;\n shortDescription?: string | null;\n}\n\nexport interface SimilarSellerCardDto {\n existsInFavouriteSellers: boolean;\n heroImage?: string | null;\n /** @format int32 */\n matchedItems: number;\n sellerAlias?: string | null;\n /** @format int32 */\n sellerId: number;\n sellerProfileUrl?: string | null;\n}\n\nexport interface Hint {\n name?: string | null;\n value?: string | null;\n}\n\nexport interface ItemCardDto {\n attributes?: ItemCardDtoItemCardAttribute[] | null;\n /** @format int32 */\n buyNowPrice: number;\n /** @format int32 */\n categoryId: number;\n /** @format int32 */\n discountRate: number;\n displayHighlighted: boolean;\n /** @format date-time */\n endDate: string;\n hasFreeShipping: boolean;\n /** @format int32 */\n imageHeight?: number | null;\n imageSecondaryUrl?: string | null;\n imageSecondaryUrlTemplate?: string | null;\n imageUrl?: string | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n imageWidth?: number | null;\n isActive: boolean;\n isAuthenticated: boolean;\n /** @format int32 */\n itemId: number;\n itemType?: string | null;\n itemUrl?: string | null;\n onDisplay: boolean;\n /** @format int32 */\n price: number;\n /** @format int32 */\n priceBeforeDiscount: number;\n reservedPriceReached: boolean;\n sellerAlias?: string | null;\n /** @format double */\n sellerDsrAverage?: number | null;\n /** @format int32 */\n sellerMemberId: number;\n shippingOptions?: ItemCardDtoShippingOption[] | null;\n shortDescription?: string | null;\n /** @format date-time */\n startDate: string;\n /** @format int32 */\n totalBids: number;\n}\n\nexport interface ItemCardDtoItemCardAttribute {\n name?: string | null;\n values?: string[] | null;\n}\n\nexport interface ItemCardDtoShippingOption {\n /** @format int32 */\n cost: number;\n type?: string | null;\n}\n\nexport interface NumberAttributeValue {\n /** @format int32 */\n id: number;\n name?: string | null;\n values?: number[] | null;\n}\n\nexport enum OfferItemAvailabilityFilter {\n All = 'All',\n AvailableForOffers = 'AvailableForOffers',\n AvailableForOffersOrUnknown = 'AvailableForOffersOrUnknown'\n}\n\nexport enum QueryScope {\n Narrow = 'Narrow',\n Normal = 'Normal',\n Wide = 'Wide'\n}\n\nexport enum SearchItemConditionApiDto {\n All = 'All',\n New = 'New',\n Used = 'Used'\n}\n\nexport enum SearchItemTypeApiDto {\n All = 'All',\n Auction = 'Auction',\n FixedPrice = 'FixedPrice'\n}\n\nexport interface SearchResultCategoryHistogramApiDto {\n categories?: CategoryNodeApiDto[] | null;\n}\n\nexport interface SearchResultItem2ApiDto {\n attributeValues?: AttributeValues | null;\n /** @format int32 */\n buyNowPrice: number;\n /** @format int32 */\n categoryId: number;\n /** @format int32 */\n discountRate: number;\n displayHighlighted: boolean;\n displayPromoted: boolean;\n /** @format date-time */\n displaySupersizedUntil?: string | null;\n /** @format date-time */\n endDate: string;\n hasFreeShipping: boolean;\n hasImage: boolean;\n hasNonSpecifiedShipping: boolean;\n hasShopAccount: boolean;\n imageGallerySizeUrl?: string | null;\n /** @format int32 */\n imageHeight?: number | null;\n imageMiniThumbSizeUrl?: string | null;\n imageNormalSizeUrl?: string | null;\n imageSecondaryGallerySizeUrl?: string | null;\n imageThumbSizeUrl?: string | null;\n imageUrlFormats?: string[] | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n imageWidth?: number | null;\n isActive: boolean;\n isAuthenticated: boolean;\n isAvailableForOffers?: boolean | null;\n isPickupOnly: boolean;\n /** @format int32 */\n itemId: number;\n /** @format int32 */\n itemStatusId: number;\n itemType?: string | null;\n itemUrl?: string | null;\n links?: ResourceLink[] | null;\n longDescription?: string | null;\n /** @format int32 */\n maxBid: number;\n onDisplay: boolean;\n /** @format int32 */\n openingBid?: number | null;\n paymentOptions?: string[] | null;\n /** @format int32 */\n price: number;\n /** @format int32 */\n priceBeforeDiscount: number;\n /** @format int32 */\n quantityRemaining: number;\n reservedPriceReached: boolean;\n /** @format int32 */\n rootItemId: number;\n sellerAlias?: string | null;\n /** @format double */\n sellerDsrAverage?: number | null;\n /** @format double */\n sellerLocationLat?: number | null;\n /** @format double */\n sellerLocationLong?: number | null;\n /** @format int32 */\n sellerMemberId: number;\n shippingOptions?: ShippingOption[] | null;\n /** @format int32 */\n shippingPrice: number;\n shippingType?: string | null;\n shortDescription?: string | null;\n /** @format double */\n soldPrice?: number | null;\n /** @format date-time */\n startDate: string;\n /** @format int32 */\n totalBids: number;\n}\n\nexport enum SearchSellerApiDto {\n All = 'All',\n Private = 'Private',\n Company = 'Company'\n}\n\nexport enum SearchSortOrderApiDto {\n Relevance = 'Relevance',\n TimeLeft = 'TimeLeft',\n AddedOn = 'AddedOn',\n Price = 'Price',\n Bids = 'Bids',\n PriceWithShipping = 'PriceWithShipping',\n MaxSellerDsr = 'MaxSellerDsr',\n HighestWishListCount = 'HighestWishListCount',\n LowestWishListCount = 'LowestWishListCount'\n}\n\nexport interface SellerOverviewDto {\n alias?: string | null;\n heroImageUrl?: string | null;\n /** @format int32 */\n memberId: number;\n /** @format int32 */\n numberOfActiveItems: number;\n}\n\nexport interface SellerOverviewWithFavouriteSellerStatusDto {\n alias?: string | null;\n existsInFavouriteSellers: boolean;\n heroImageUrl?: string | null;\n /** @format int32 */\n memberId: number;\n /** @format int32 */\n numberOfActiveItems: number;\n}\n\nexport interface SuggestedCategoryDto {\n /** @format int32 */\n categoryId: number;\n isLeaf: boolean;\n /** @format int64 */\n matchedItemCount: number;\n name?: string | null;\n}\n\nexport interface TermAttributeValue {\n /** @format int32 */\n id: number;\n name?: string | null;\n values?: string[] | null;\n}\n\nexport interface FacetPresentation {\n isMultiSelect: boolean;\n shouldTranslateValues: boolean;\n type?: string | null;\n}\n\nexport interface AddFavouriteSellerApiRequest {\n /** @format int32 */\n sellerId: number;\n}\n\nexport interface AddFavouriteSellerApiResponse {\n /** @format int32 */\n createdId: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface GetFavouriteSellersAndItems2ApiResponse {\n favouriteSellers?: FavouriteSellerCardDto[] | null;\n items?: ItemCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n totalItems: number;\n}\n\nexport type GetFavouriteSellersApiRequest = object;\n\nexport interface GetFavouriteSellersApiResponse {\n favouriteSellerApiDtos?: FavouriteSellerApiDto[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface RemoveFavouriteSellersApiRequest {\n ids?: number[] | null;\n}\n\nexport interface RemoveFavouriteSellersApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport type GetAllAttributeDefinitionsApiRequest = object;\n\nexport interface GetAllAttributeDefinitionsApiResponse {\n attributeDefinitions?: AttributeDefinition[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport type GetAllClothesBrandAttributeValuesApiRequest = object;\n\nexport interface GetAllClothesBrandAttributeValuesApiResponse {\n clothesBrandAttributeValues?: string[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport type GetAllClothesSizeAttributeValuesApiRequest = object;\n\nexport interface GetAllClothesSizeAttributeValuesApiResponse {\n clothesSizeAttributeValues?: string[] | null;\n /** @deprecated */\n clothesSizeChildrenAttributeValues?: string[] | null;\n responseStatus?: ResponseStatus | null;\n shoeSizeAttributeValues?: string[] | null;\n}\n\nexport type GetBlueshiftEmailPreferencesLinkApiRequest = object;\n\nexport interface GetBlueshiftEmailPreferencesLinkApiResponse {\n emailPreferencesLink?: string | null;\n ok: boolean;\n responseStatus?: ResponseStatus | null;\n}\n\nexport type GetMembersSearchFiltersApiRequest = object;\n\nexport interface GetMembersSearchFiltersApiResponse {\n responseStatus?: ResponseStatus | null;\n searchFilters?: SearchFilter[] | null;\n}\n\nexport interface GetSellerByAliasSearchApiResponse {\n responseStatus?: ResponseStatus | null;\n sellerOverviews?: SellerOverviewDto[] | null;\n /** @format int32 */\n totalSellers: number;\n}\n\nexport interface GetSellerListApiResponse {\n favouriteSellerCardDtos?: FavouriteSellerCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n totalSellers: number;\n}\n\nexport interface GetSellerSuggestionsApiResponse {\n favouriteSellerCardDtos?: FavouriteSellerCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n totalSellers: number;\n}\n\nexport interface GetSimilarSellerSuggestionsApiResponse {\n responseStatus?: ResponseStatus | null;\n sellerCardDtos?: SimilarSellerCardDto[] | null;\n}\n\nexport interface ImageSearchApiRequest {\n searchResultLanguageCodeIso2?: string | null;\n gcsUri?: string | null;\n}\n\nexport interface ImageSearchApiResponse {\n responseStatus?: ResponseStatus | null;\n result?: Search2ApiResult | null;\n}\n\nexport interface ImageSearchFromItemIdApiRequest {\n searchResultLanguageCodeIso2?: string | null;\n allowedBuyerRegions?: string[] | null;\n /** @format int32 */\n itemId: number;\n}\n\nexport interface MoreFromCampaignApiResponse {\n items?: SearchResultItem2ApiDto[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MoreFromSellerApiRequest {\n searchResultLanguageCodeIso2?: string | null;\n /** @format int32 */\n sellerMemberId: number;\n /** @format int32 */\n size: number;\n}\n\nexport interface MoreFromSellerApiResponse {\n responseStatus?: ResponseStatus | null;\n result?: Search2ApiResult | null;\n}\n\nexport interface OthersAlsoLookedAtApiResponse {\n items?: ItemCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface PersonalizedRecommendationSearchApiResponse {\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface RootCategorySuggestionsApiRequest {\n shortDescription?: string | null;\n}\n\nexport interface RootCategorySuggestionsApiResponse {\n categories?: CategoryDto[] | null;\n responseStatus?: ResponseStatus | null;\n suggestions?: SuggestedCategoryDto[] | null;\n}\n\nexport interface AddSavedSearchApiRequest {\n savedSearchDto?: SavedSearchApiDto | null;\n}\n\nexport interface AddSavedSearchApiResponse {\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n savedSearchCreatedId: number;\n /** @format int32 */\n userId: number;\n}\n\nexport interface ExecuteSavedSearchApiRequest {\n /** @format int32 */\n id: number;\n savedSearchOverrides?: Search2ApiRequest | null;\n /** @format int32 */\n userId: number;\n}\n\nexport interface ExecuteSavedSearchApiResponse {\n response?: Search2ApiResponse | null;\n responseStatus?: ResponseStatus | null;\n searchRequest?: SavedSearchApiDto | null;\n}\n\nexport interface ExecuteSavedSearchForCurrentUserApiRequest {\n /** @format int32 */\n id: number;\n savedSearchOverrides?: Search2ApiRequest | null;\n}\n\nexport interface GetSavedSearchParametersApiResponse {\n parameters?: SearchRequestParameters | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface GetSavedSearchesApiResponse {\n responseStatus?: ResponseStatus | null;\n savedSearches?: SavedSearchListItemApiDto[] | null;\n /** @format int32 */\n userId: number;\n}\n\nexport interface GetSavedSearchesWithItemsApiResponse {\n responseStatus?: ResponseStatus | null;\n savedSearches?: SavedSearchListItem[] | null;\n /** @format int32 */\n totalSearches: number;\n}\n\nexport interface RemoveSavedSearchApiRequest {\n /** @format int32 */\n id: number;\n}\n\nexport interface RemoveSavedSearchApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface RemoveSavedSearchesApiRequest {\n ids?: number[] | null;\n}\n\nexport interface RemoveSavedSearchesApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface SavedSearchEmailNotificationApiRequest {\n savedSearchDto?: SavedSearchEmailNotificationApiDto | null;\n}\n\nexport interface SavedSearchEmailNotificationApiResponse {\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n savedSearchId: number;\n sendEmail: boolean;\n sendPush: boolean;\n}\n\nexport interface SavedSearchListItem {\n attributeNames?: Record;\n categoryName?: string | null;\n hasEnabledEmailNotifications: boolean;\n /** @format int32 */\n id: number;\n items?: SavedSearchItemDto[] | null;\n name?: string | null;\n parameters?: SearchRequestParameters | null;\n}\n\nexport interface Search2ApiRequest {\n parameters?: SearchRequestParameters | null;\n}\n\nexport interface Search2ApiResponse {\n responseStatus?: ResponseStatus | null;\n result?: Search2ApiResult | null;\n}\n\nexport interface Search2ApiResult {\n attributeFacets?: AttributeFacetResults | null;\n brands?: AggregationRow[] | null;\n categoryHits?: SearchResultHitsPerCategoryApiDto | null;\n departments?: AggregationRow[] | null;\n elapsedMilliseconds?: ElapsedTime[] | null;\n filteredSearchWords?: string[] | null;\n genders?: AggregationRow[] | null;\n isCsaSearchQuery: boolean;\n isSavedSearchNotificationsEnabled: boolean;\n itemCondition?: AggregationRow[] | null;\n itemScores?: ItemScoreDto[] | null;\n itemType?: AggregationRow[] | null;\n items?: SearchResultItem2ApiDto[] | null;\n /** @format int32 */\n itemsMatched: number;\n links?: ResourceLink[] | null;\n /** @format double */\n maxFixedPrice?: number | null;\n /** @format double */\n maxPrice?: number | null;\n /** @format int32 */\n pageIndex: number;\n /** @format int32 */\n pageSize: number;\n paging?: string | null;\n priceRange?: AggregationRow[] | null;\n relatedItems?: SearchResultItem2ApiDto[] | null;\n searchHintsUsed?: Hint[] | null;\n searchLanguages?: string[] | null;\n sellerType?: AggregationRow[] | null;\n shoeSize?: AggregationRow[] | null;\n shoeTypes?: AggregationRow[] | null;\n spellingCorrectedSearchString?: string | null;\n subDepartments?: AggregationRow[] | null;\n}\n\nexport interface SearchCategoryGroup {\n leafCategories?: SearchCategoryLevel[] | null;\n parentCategories?: SearchCategoryLevel[] | null;\n}\n\nexport interface SearchCategoryHistogramApiRequest {\n alias?: string | null;\n allowedBuyerRegions?: string[] | null;\n /** @format int32 */\n bidCountMax?: number | null;\n /** @format int32 */\n bidCountMin?: number | null;\n /** @format int32 */\n campaignCodeId?: number | null;\n /** @format int32 */\n categoryId?: number | null;\n /** @format int32 */\n county?: number | null;\n device?: string | null;\n /** @format date-time */\n endDateFrom?: string | null;\n /** @format date-time */\n endDateTo?: string | null;\n expiredItems?: boolean | null;\n /** @format double */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n imagelinkHints?: Hint[] | null;\n itemCondition: SearchItemConditionApiDto;\n itemType: SearchItemTypeApiDto;\n /** @format int32 */\n itemsPerPage: number;\n /** @format int32 */\n memberId?: number | null;\n /** @format int32 */\n pageIndex: number;\n paging?: string | null;\n query?: string | null;\n queryScope: QueryScope;\n searchHints?: Hint[] | null;\n searchInDescription?: boolean | null;\n /** @format float */\n sellerDsrFrom?: number | null;\n /** @format float */\n sellerDsrTo?: number | null;\n sellerType: SearchSellerApiDto;\n sortBy: SearchSortOrderApiDto;\n sortDescending: boolean;\n /** @format date-time */\n startDateFrom?: string | null;\n /** @format date-time */\n startDateTo?: string | null;\n /** @format double */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n /** @format int32 */\n zipCode?: number | null;\n}\n\nexport interface SearchCategoryHistogramApiResponse {\n categories?: SearchResultCategoryHistogramApiDto | null;\n elapsedMilliseconds?: ElapsedTime[] | null;\n /** @format int32 */\n itemsMatched: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface SearchCategoryLevel {\n /** @format int32 */\n categoryId: number;\n isLeaf: boolean;\n /** @format int32 */\n level: number;\n name?: string | null;\n}\n\nexport interface SearchFilter {\n filterName?: string | null;\n filterValue?: string | null;\n}\n\nexport interface SearchRequestParameters {\n /** @format int32 */\n addedSince?: number | null;\n alias?: string | null;\n allowedBuyerRegions?: string[] | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: AttributeFacets | null;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n bidCountMax?: number | null;\n /** @format int32 */\n bidCountMin?: number | null;\n brandTags?: string[] | null;\n brands?: string[] | null;\n campaignCodeIds?: number[] | null;\n categories?: number[] | null;\n /** @format int32 */\n categoryId?: number | null;\n charityIds?: number[] | null;\n /** @format int32 */\n county?: number | null;\n departments?: string[] | null;\n device?: string | null;\n /** @format date-time */\n endDateFrom?: string | null;\n /** @format date-span */\n endDateSafetyOffset?: string | null;\n /** @format date-time */\n endDateTo?: string | null;\n /** @format int32 */\n endingIn?: number | null;\n expiredItems?: boolean | null;\n forCharity?: boolean | null;\n forceKeywordSearch: boolean;\n /** @format double */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n genders?: string[] | null;\n imagelinkHints?: Hint[] | null;\n itemCondition?: SearchItemConditionApiDto | null;\n itemIds?: number[] | null;\n itemStatus?: string | null;\n itemType?: SearchItemTypeApiDto | null;\n /** @format int32 */\n itemsPerPage: number;\n memberIds?: number[] | null;\n offerItemAvailability?: OfferItemAvailabilityFilter | null;\n onDisplay?: boolean | null;\n paging?: string | null;\n query?: string | null;\n queryScope?: QueryScope | null;\n searchHints?: Hint[] | null;\n searchInDescription?: boolean | null;\n sellerCity?: string | null;\n /** @format float */\n sellerDsrFrom?: number | null;\n /** @format float */\n sellerDsrTo?: number | null;\n /** @format int32 */\n sellerLocationDistance?: number | null;\n /** @format double */\n sellerLocationLat?: number | null;\n /** @format double */\n sellerLocationLong?: number | null;\n sellerType?: SearchSellerApiDto | null;\n shippingTypes?: string[] | null;\n shoeSizes?: string[] | null;\n shoeTypes?: string[] | null;\n sortBy?: SearchSortOrderApiDto | null;\n sortDescending: boolean;\n /** @format date-time */\n startDateFrom?: string | null;\n /** @format date-time */\n startDateTo?: string | null;\n subDepartments?: string[] | null;\n /** @format double */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n userLanguage?: string | null;\n /** @format int32 */\n zipCode?: number | null;\n}\n\nexport type ServerTimeApiRequest = object;\n\nexport interface ServerTimeApiResponse {\n /** @format date-time */\n currentTime: string;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface SimilarItemsApiResponse {\n items?: SearchResultItem2ApiDto[] | null;\n responseStatus?: ResponseStatus | null;\n searchId?: string | null;\n}\n\nexport interface SimilarItemsFromShopApiResponse {\n items?: SearchResultItem2ApiDto[] | null;\n responseStatus?: ResponseStatus | null;\n searchId?: string | null;\n}\n\nexport interface SimilarItemsV2ApiResponse {\n items?: ItemCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface TermFacet_CustomName2 {\n backingField?: string | null;\n filteredNumbers?: number[] | null;\n filteredTerms?: TermValue[] | null;\n /** @format int32 */\n limit: number;\n}\n\nexport interface TermFacetResults {\n displayName?: string | null;\n /** @deprecated */\n facet?: TermFacet_CustomName1 | null;\n hits?: AggregationRow[] | null;\n presentation?: FacetPresentation | null;\n preserveHitsOrder: boolean;\n /** @format int32 */\n sortOrder: number;\n termFacet?: TermFacet_CustomName2 | null;\n}\n\nexport interface TermValue {\n appliedFromWardrobeProfile: boolean;\n value?: string | null;\n}\n\nexport interface GetTrendingSellersAndItemsApiResponse {\n items?: ItemCardDto[] | null;\n responseStatus?: ResponseStatus | null;\n sellers?: FavouriteSellerCardDto[] | null;\n /** @format int32 */\n totalItems: number;\n}\n\nexport interface UpdateMemberSearchFiltersApiRequest {\n searchFilters?: SearchFilter[] | null;\n}\n\nexport interface UpdateMemberSearchFiltersApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface ValuationSearchApiResponse {\n /** @format int32 */\n averagePrice?: number | null;\n /** @format int32 */\n averageStartingPrice?: number | null;\n categoryHits?: CategoryHits[] | null;\n /** @format int32 */\n count: number;\n /** @format int32 */\n highestPrice?: number | null;\n items?: SearchResultItem2ApiDto[] | null;\n /** @format int32 */\n lowestPrice?: number | null;\n /** @format double */\n medianPrice?: number | null;\n /** @format double */\n medianStartingPrice?: number | null;\n responseStatus?: ResponseStatus | null;\n /** @format int32 */\n userPriceDangerThreshold?: number | null;\n /** @format int32 */\n userPriceWarningThreshold?: number | null;\n}\n\nexport interface ValuationSearchCategory {\n /** @format int32 */\n id: number;\n /** @format int32 */\n level: number;\n name?: string | null;\n}\n\nexport type DisableWardrobeProfileApiRequest = object;\n\nexport interface DisableWardrobeProfileApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport type EnableWardrobeProfileApiRequest = object;\n\nexport interface EnableWardrobeProfileApiResponse {\n responseStatus?: ResponseStatus | null;\n}\n\nexport type GetWardrobeProfileApiRequest = object;\n\nexport interface GetWardrobeProfileApiResponse {\n isEnabled: boolean;\n responseStatus?: ResponseStatus | null;\n searchFilters?: WardrobeProfileSearchFilter[] | null;\n}\n\nexport interface WardrobeProfileSearchFilter {\n filterName?: string | null;\n filterValue?: string | null;\n}\n\nexport interface BrandContentViewModel {\n hero?: BrandHeroImageViewModel | null;\n intro?: string | null;\n links?: BrandLinkViewModel[] | null;\n logo?: string | null;\n slug?: string | null;\n title?: string | null;\n}\n\nexport interface BrandHeroImageViewModel {\n max?: string | null;\n med?: string | null;\n min?: string | null;\n}\n\nexport interface BrandLinkViewModel {\n brand?: string | null;\n url?: string | null;\n}\n\nexport interface BrandNameViewModel {\n slug?: string | null;\n title?: string | null;\n}\n\nexport interface BrandPageApiResponse {\n brand?: BrandContentViewModel | null;\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n trendingBrands?: BrandNameViewModel[] | null;\n}\n\nexport interface CategoryFilterCategoryViewModel {\n alternativeName?: string | null;\n children?: CategoryFilterCategoryViewModel[] | null;\n /** @format int32 */\n count?: number | null;\n /** @format int32 */\n id: number;\n isSelected: boolean;\n name?: string | null;\n /** @format int32 */\n sortOrder: number;\n status?: string | null;\n url?: string | null;\n}\n\nexport interface CategoryFilterViewModel {\n activeCategory?: CategoryFilterCategoryViewModel | null;\n categoryTree?: CategoryFilterCategoryViewModel | null;\n parameter?: string | null;\n type?: string | null;\n}\n\nexport interface CategoryContentViewModel {\n headerText?: string | null;\n introText?: string | null;\n mainText?: string | null;\n}\n\nexport interface CategoryLinkViewModel {\n displayText?: string | null;\n href?: string | null;\n /** @format int32 */\n id: number;\n isSelected: boolean;\n isTopLevel: boolean;\n /** @format int32 */\n level: number;\n name?: string | null;\n selected: boolean;\n}\n\nexport interface CategoryPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n county?: string | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface CategoryPageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n categoryContent?: CategoryContentViewModel | null;\n categoryPath?: CategoryLinkViewModel[] | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n /** @format int32 */\n fromCategoryId?: number | null;\n headerText?: string | null;\n introText?: string | null;\n isCsaSearchQuery: boolean;\n isPermanent?: boolean | null;\n isRedirect: boolean;\n isSavedSearchEmailEnabled: boolean;\n items?: ItemCardViewModel[] | null;\n mainText?: string | null;\n pagination?: PaginationViewModel | null;\n redirect?: CategoryRedirectViewModel | null;\n responseStatus?: ResponseStatus | null;\n searchLanguages?: string[] | null;\n /** @format int32 */\n toCategoryId?: number | null;\n /** @format int64 */\n totalItemCount: number;\n /** @format int64 */\n totalItems: number;\n}\n\nexport interface CategoryRedirectViewModel {\n /** @format int32 */\n fromCategoryId: number;\n isPermanent: boolean;\n toAttributes?: Record;\n /** @format int32 */\n toCategoryId: number;\n}\n\nexport interface CausesItemsApiRequest {\n languageCodeIso2: string;\n shippingCountryCodeIso2: string;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n queryScope?: string | null;\n searchInLongDescription?: boolean | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n}\n\nexport interface CausesItemsApiResponse {\n searchLanguageCodesIso2: string[];\n enableSavedSearch: boolean;\n filters: FiltersViewModel;\n isCsaSearchQuery: boolean;\n items: ItemCardViewModel[];\n pagination: PaginationViewModel;\n redirect?: CausesItemsRedirectViewModel | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface CausesItemsRedirectViewModel {\n /** @format int32 */\n fromCategoryId: number;\n isPermanent: boolean;\n toAttributes: Record;\n /** @format int32 */\n toCategoryId: number;\n}\n\nexport interface CampaignPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n campaignId?: string | null;\n /** @format int32 */\n categoryId?: number | null;\n county?: string | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface CampaignPageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n content?: CrpContentViewModel | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n isCsaSearchQuery: boolean;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n redirectUrl?: string | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface CausePageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n causeId?: string | null;\n county?: string | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface CausePageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n content?: CrpContentViewModel | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n isCsaSearchQuery: boolean;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n redirectUrl?: string | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface CharityPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n charityId?: string | null;\n county?: string | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface CharityPageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n content?: CrpContentViewModel | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n isCsaSearchQuery: boolean;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n redirectUrl?: string | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface CrpBannerLinkViewModel {\n href?: string | null;\n text?: string | null;\n title?: string | null;\n}\n\nexport interface CrpBannerViewModel {\n cssClass?: string | null;\n desktopImageUrl?: string | null;\n desktopRetinaImageUrl?: string | null;\n links?: CrpBannerLinkViewModel[] | null;\n mobileImageUrl?: string | null;\n mobileRetinaImageUrl?: string | null;\n tabletImageUrl?: string | null;\n tabletRetinaImageUrl?: string | null;\n ticker?: CrpTickerViewModel | null;\n}\n\nexport interface CrpCharityViewModel {\n description?: string | null;\n name?: string | null;\n}\n\nexport interface CrpContentViewModel {\n banner?: CrpBannerViewModel | null;\n charity?: CrpCharityViewModel | null;\n crpLabel?: string | null;\n externalEmbeddingOptions?: CrpExternalEmbeddingOptionsViewModel | null;\n headline?: string | null;\n heroImageUrl?: string | null;\n id?: string | null;\n introText?: string | null;\n introTitle?: string | null;\n isVerified: boolean;\n logoImageUrl?: string | null;\n metaDescription?: string | null;\n pageTitle?: string | null;\n searchBar?: CrpSearchBarViewModel | null;\n seoText?: string | null;\n seoTextHeader?: string | null;\n socialMedia?: CrpSocialMediaViewModel | null;\n}\n\nexport interface CrpExternalEmbeddingOptionsViewModel {\n externalSites?: string | null;\n isEnabled: boolean;\n}\n\nexport interface CrpInstagramPostViewModel {\n id?: string | null;\n thumbnailUrl?: string | null;\n}\n\nexport interface CrpSearchBarViewModel {\n placeholder?: string | null;\n query?: string | null;\n showSearchBar: boolean;\n}\n\nexport interface CrpSocialMediaViewModel {\n instagramAlias?: string | null;\n instagramPosts?: CrpInstagramPostViewModel[] | null;\n youtubeVideoIds?: string[] | null;\n}\n\nexport interface CrpTickerViewModel {\n campaignCodeIds?: number[] | null;\n /** @format double */\n targetValue?: number | null;\n /** @format double */\n totalEarnings: number;\n}\n\nexport interface ShopPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n county?: string | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n shopId?: string | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface ShopPageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n content?: CrpContentViewModel | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n isCsaSearchQuery: boolean;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n redirectUrl?: string | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface FilterOptionViewModel {\n appliedFromWardrobeProfile: boolean;\n /** @format int64 */\n count?: number | null;\n displayName?: string | null;\n name?: string | null;\n /** @format int32 */\n sortOrder: number;\n value?: string | null;\n}\n\nexport interface FiltersViewModel {\n attributeFilters?: MultipleOptionsFilterViewModel[] | null;\n categoryFilter?: CategoryFilterViewModel | null;\n priceRangeFilter?: PriceRangeFilterViewModel | null;\n singleOptionFilters?: SingleOptionFilterViewModel[] | null;\n wardrobeProfile?: WardrobeProfileViewModel | null;\n}\n\nexport interface ItemCardAttributeViewModel {\n name?: string | null;\n values?: string[] | null;\n}\n\nexport enum ItemCardSearchResultOrigin {\n Keyword = 'Keyword',\n Vector = 'Vector',\n KeywordAndVector = 'KeywordAndVector'\n}\n\nexport interface ItemCardShippingOptionViewModel {\n /** @format int32 */\n cost: number;\n type?: string | null;\n}\n\nexport interface ItemCardViewModel {\n attributes?: ItemCardAttributeViewModel[] | null;\n /** @format int32 */\n buyNowPrice: number;\n /** @format int32 */\n categoryId: number;\n /** @format int32 */\n discountRate: number;\n displayHighlighted: boolean;\n /** @format date-time */\n endDate: string;\n hasFreeShipping: boolean;\n /** @format int32 */\n imageHeight?: number | null;\n imageSecondaryUrlTemplate?: string | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n imageWidth?: number | null;\n inWishList?: boolean | null;\n isActive: boolean;\n isAuthenticated: boolean;\n isAvailableForOffers?: boolean | null;\n /** @format int32 */\n itemId: number;\n itemType?: string | null;\n itemUrl?: string | null;\n onDisplay: boolean;\n /** @format int32 */\n price: number;\n /** @format int32 */\n priceBeforeDiscount: number;\n reservedPriceReached: boolean;\n searchResultOrigin?: ItemCardSearchResultOrigin | null;\n sellerAlias?: string | null;\n /** @format double */\n sellerDsrAverage?: number | null;\n /** @format int32 */\n sellerMemberId: number;\n shippingOptions?: ItemCardShippingOptionViewModel[] | null;\n shortDescription?: string | null;\n /** @format date-time */\n startDate: string;\n /** @format int32 */\n totalBids: number;\n}\n\nexport interface ItemsByIdsApiResponse {\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MoreItemsForCombinedShippingApiResponse {\n items?: ItemCardViewModel[] | null;\n /** @format int32 */\n itemsMatched: number;\n /** @format int32 */\n pageSize: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MoreItemsFromCategoryApiResponse {\n items?: ItemCardViewModel[] | null;\n /** @format int32 */\n itemsMatched: number;\n /** @format int32 */\n pageSize: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MoreItemsFromSellerApiResponse {\n items?: ItemCardViewModel[] | null;\n /** @format int32 */\n itemsMatched: number;\n /** @format int32 */\n pageSize: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MoreItemsFromSellerForCombinedShippingApiRequest {\n searchLanguageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n automaticTranslationPreferred: boolean;\n itemIds?: number[] | null;\n /** @format int32 */\n pageSize?: number | null;\n /** @format int32 */\n sellerMemberId: number;\n /** @format date-time */\n upsellItemEndDate?: string | null;\n}\n\nexport interface MoreItemsFromShopApiResponse {\n items?: ItemCardViewModel[] | null;\n /** @format int32 */\n itemsMatched: number;\n /** @format int32 */\n pageSize: number;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface MultipleOptionsFilterViewModel {\n displayName?: string | null;\n isIndexable: boolean;\n name?: string | null;\n options?: FilterOptionViewModel[] | null;\n parameter?: string | null;\n presentation?: string | null;\n preserveOptionsOrder: boolean;\n selectedValues?: string[] | null;\n translateOptions: boolean;\n type?: string | null;\n}\n\nexport interface PaginationLinkViewModel {\n isSelected: boolean;\n /** @format int32 */\n pageIndex: number;\n paging?: string | null;\n state?: string | null;\n}\n\nexport interface PaginationViewModel {\n firstPage?: PaginationLinkViewModel | null;\n lastPage?: PaginationLinkViewModel | null;\n /** @format int32 */\n pageCount: number;\n /** @format int32 */\n pageIndex: number;\n pageLinks?: PaginationLinkViewModel[] | null;\n /** @format int32 */\n pageSize: number;\n}\n\nexport interface PriceRangeFilterOptionViewModel {\n parameter?: string | null;\n /** @format int32 */\n value?: number | null;\n}\n\nexport interface PriceRangeFilterViewModel {\n fromPrice?: PriceRangeFilterOptionViewModel | null;\n name?: string | null;\n toPrice?: PriceRangeFilterOptionViewModel | null;\n type?: string | null;\n}\n\nexport interface ProfileItemsApiRequest {\n languageCodeIso2: string;\n shippingCountryCodeIso2: string;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n /** @format int32 */\n memberId: number;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n queryScope?: string | null;\n searchInLongDescription?: boolean | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n}\n\nexport interface ProfileItemsApiResponse {\n searchLanguageCodesIso2: string[];\n enableSavedSearch: boolean;\n filters: FiltersViewModel;\n isCsaSearchQuery: boolean;\n items: ItemCardViewModel[];\n onDisplayItems: ItemCardViewModel[];\n pagination: PaginationViewModel;\n redirect?: ProfileItemsRedirectViewModel | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface ProfileItemsRedirectViewModel {\n /** @format int32 */\n fromCategoryId: number;\n isPermanent: boolean;\n toAttributes: Record;\n /** @format int32 */\n toCategoryId: number;\n}\n\nexport interface IndependentSearchApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n county?: string | null;\n forceKeywordSearch: boolean;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n /** @deprecated */\n includeFilters: boolean;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n queryScope?: string | null;\n searchInLongDescription?: boolean | null;\n searchTypeVariantHint?: string | null;\n /** @format int32 */\n sellerLocationDistance?: number | null;\n /** @format double */\n sellerLocationLat?: number | null;\n /** @format double */\n sellerLocationLong?: number | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface IndependentSearchApiResponse {\n filters?: FiltersViewModel | null;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface WebGetSellerByAliasSearchApiResponse {\n responseStatus?: ResponseStatus | null;\n sellerOverviews?: SellerOverviewWithFavouriteSellerStatusDto[] | null;\n /** @format int32 */\n totalSellers: number;\n}\n\nexport interface SearchCategoryRedirectViewModel {\n /** @format int32 */\n fromCategoryId: number;\n isPermanent: boolean;\n toAttributes?: Record;\n /** @format int32 */\n toCategoryId: number;\n}\n\nexport interface SearchPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n alias?: string | null;\n allowedBuyerRegions?: string | null;\n applyWardrobeProfileBrands?: boolean | null;\n applyWardrobeProfileSizes?: boolean | null;\n attributes?: Record;\n automaticTranslationPreferred: boolean;\n /** @format int32 */\n categoryId?: number | null;\n county?: string | null;\n forceKeywordSearch: boolean;\n /** @format int32 */\n fromNumberOfBids?: number | null;\n /** @format int32 */\n fromPrice?: number | null;\n /** @format int32 */\n fromWishListCount?: number | null;\n itemCondition?: string | null;\n itemStatus?: string | null;\n itemType?: string | null;\n offerItemAvailability?: string | null;\n /** @format int32 */\n pageSize?: number | null;\n paging?: string | null;\n query?: string | null;\n queryScope?: string | null;\n searchInLongDescription?: boolean | null;\n searchTypeVariantHint?: string | null;\n sellerType?: string | null;\n shippingTypes?: string[] | null;\n sortBy?: string | null;\n /** @format int32 */\n toNumberOfBids?: number | null;\n /** @format int32 */\n toPrice?: number | null;\n /** @format int32 */\n toWishListCount?: number | null;\n zipCode?: string | null;\n}\n\nexport interface SearchPageApiResponse {\n searchLanguageCodesIso2?: string[] | null;\n enableSavedSearch: boolean;\n filters?: FiltersViewModel | null;\n /** @format int32 */\n fromCategoryId?: number | null;\n isCsaSearchQuery: boolean;\n isPermanent?: boolean | null;\n isRedirect: boolean;\n isSavedSearchEmailEnabled: boolean;\n isTooBroad: boolean;\n items?: ItemCardViewModel[] | null;\n pagination?: PaginationViewModel | null;\n redirect?: SearchCategoryRedirectViewModel | null;\n relatedItems?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n searchLanguages?: string[] | null;\n /** @format int32 */\n toCategoryId?: number | null;\n /** @format int64 */\n totalItemCount: number;\n /** @format int64 */\n totalItems: number;\n}\n\nexport interface SingleOptionFilterViewModel {\n displayName?: string | null;\n isIndexable: boolean;\n name?: string | null;\n options?: FilterOptionViewModel[] | null;\n parameter?: string | null;\n presentation?: string | null;\n selectedValue?: string | null;\n translateOptions: boolean;\n type?: string | null;\n}\n\nexport type BrandSuggestionsApiRequest = object;\n\nexport interface BrandSuggestionsApiResponse {\n brands?: SuggestedBrandViewModel[] | null;\n isTrendingBrands: boolean;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface IdeaViewModel {\n /** @format int32 */\n categoryId?: number | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n index: number;\n name?: string | null;\n type?: string | null;\n url?: string | null;\n}\n\nexport interface IdeasApiResponse {\n ideas?: IdeaViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport type InstagramFeedApiRequest = object;\n\nexport interface InstagramFeedApiResponse {\n posts?: InstagramPostViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface InstagramPostViewModel {\n imageUrl?: string | null;\n url?: string | null;\n}\n\nexport interface LastChanceApiResponse {\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface NewsForYouApiResponse {\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface PersonalisedSearchViewModel {\n /** @format int32 */\n index: number;\n name?: string | null;\n url?: string | null;\n}\n\nexport type PersonalisedSearchesApiRequest = object;\n\nexport interface PersonalisedSearchesApiResponse {\n responseStatus?: ResponseStatus | null;\n searches?: PersonalisedSearchViewModel[] | null;\n}\n\nexport interface ResellSuggestionsApiResponse {\n items?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n /** @format int64 */\n totalItemCount: number;\n}\n\nexport interface SellersOfInterestApiResponse {\n responseStatus?: ResponseStatus | null;\n sellerCards?: FavouriteSellerCardDto[] | null;\n}\n\nexport interface StartPageApiRequest {\n languageCodeIso2?: string | null;\n shippingCountryCodeIso2?: string | null;\n preview: boolean;\n title?: string | null;\n}\n\nexport interface StartPageApiResponse {\n configuration?: StartPageConfigurationViewModel | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface StartPageConfigurationViewModel {\n content?: StartPageContentViewModel[] | null;\n header?: any;\n meta?: any;\n}\n\nexport interface StartPageContentViewModel {\n data?: any;\n id?: string | null;\n type?: string | null;\n}\n\nexport interface SuggestedBrandViewModel {\n /** @format int32 */\n categoryId?: number | null;\n /** @format int32 */\n index: number;\n name?: string | null;\n url?: string | null;\n}\n\nexport interface TrendingBrandViewModel {\n /** @format int32 */\n categoryId?: number | null;\n /** @format int32 */\n index: number;\n logoImageUrl?: string | null;\n name?: string | null;\n slug?: string | null;\n}\n\nexport type TrendingBrandsApiRequest = object;\n\nexport interface TrendingBrandsApiResponse {\n brands?: TrendingBrandViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface TrendingSearchViewModel {\n /** @format int32 */\n categoryId?: number | null;\n imageUrlTemplate?: string | null;\n /** @format int32 */\n index: number;\n query?: string | null;\n}\n\nexport interface TrendingSearchesApiResponse {\n responseStatus?: ResponseStatus | null;\n searches?: TrendingSearchViewModel[] | null;\n}\n\nexport interface TopListsApiResponse {\n mostActivePerCity?: Record;\n mostActivePerCityAdjustedForPopulation?: Record;\n mostBiddedItems?: ItemCardViewModel[] | null;\n mostExpensiveItems?: ItemCardViewModel[] | null;\n mostExpensiveSold?: ItemCardViewModel[] | null;\n mostWishListedItems?: ItemCardViewModel[] | null;\n responseStatus?: ResponseStatus | null;\n}\n\nexport interface WardrobeProfileViewModel {\n areBrandFiltersApplied: boolean;\n areSizeFiltersApplied: boolean;\n isEnabled: boolean;\n searchFilters?: SearchFilter[] | null;\n}\n\nexport interface SavedSearchApiDto {\n /** @format int32 */\n id: number;\n name?: string | null;\n /** @format int32 */\n notificationType: number;\n notifyMemberWithPush: boolean;\n parameters?: SearchRequestParameters | null;\n}\n\nexport interface SavedSearchEmailNotificationApiDto {\n /** @format int32 */\n id: number;\n sendMail: boolean;\n sendPush?: boolean | null;\n}\n\nexport interface SavedSearchItemDto {\n imageUrlTemplate?: string | null;\n /** @format int32 */\n itemId: number;\n itemUrl?: string | null;\n title?: any;\n}\n\nexport interface SavedSearchListItemApiDto {\n alternativeCategoryName?: string | null;\n categoryName?: string | null;\n /** @format int32 */\n id: number;\n name?: string | null;\n /** @format int32 */\n notificationType: number;\n notifyMemberWithPush: boolean;\n parameters?: SearchRequestParameters | null;\n}\n\nexport interface TrendingsellersAndItemsRequest {\n /** @format int32 */\n maxSellers?: number;\n /** @format int32 */\n maxItems?: number;\n /** @format int32 */\n maxItemsPerSeller?: number;\n /** @format int32 */\n skipItems?: number;\n shippingCountryCode?: string;\n userLanguage?: string;\n automaticTranslationPreferred?: boolean;\n}\n\nexport interface ValuationSearchRequest {\n query?: string;\n /** @format int32 */\n categoryId?: number;\n searchResultLanguageCodeIso2?: string;\n itemCondition?: string;\n modelVersion?: string;\n}\n\nexport interface WardrobeProfileRequest {\n request?: GetWardrobeProfileApiRequest;\n}\n","import { logger } from 'packages/logger';\nimport { API_ERRORS } from 'tradera/utils/api';\nimport { cache, CACHE_KEYS } from 'tradera/utils/cache';\nimport {\n openProfileMenu,\n closeModal,\n openNotificationOptinModal,\n logOut,\n setSystemMessages,\n setSystemBadges\n} from './reducer';\nimport { getSystemMessages, getSystemBadges } from './api';\nimport {\n type SystemMessage,\n SystemMessageSeverity,\n type SystemMessageType\n} from '../services/types/webapi-member-generated';\nimport type { AppDispatch, GetState } from 'tradera/state/configure-store';\nimport type {\n SystemBadgeType,\n SystemBadge\n} from 'tradera/state/services/types/webapi-mytradera-generated';\n\n/**\n * signIn\n * @param {object} [payload]\n * @param {string} payload.redirectUrl - where to send the user after login completes\n * @param {boolean} [payload.siteHeader] - Experiment: different behaviour for clicks in site header\n */\nexport const signIn =\n (payload?: { redirectUrl: string; siteHeader?: boolean }) =>\n (dispatch: AppDispatch) => {\n dispatch(openProfileMenu(payload?.redirectUrl));\n dispatch(closeModal());\n };\n\n/**\n * Open a notification optin modal\n *\n * @param {boolean} type - type of notifications to show modal for\n * @returns {function(*, *): boolean}\n */\nexport const openNotificationOptinModalAction =\n (\n modalType: string,\n gaLabel: string,\n title: string,\n description: string,\n tagGroups: unknown[]\n ) =>\n async (dispatch: AppDispatch, getState: GetState) => {\n const { pushNotifications } = getState();\n if (!pushNotifications.enabled) {\n return;\n }\n if (\n pushNotifications.shownModals[\n modalType as keyof typeof pushNotifications.shownModals\n ] === true\n ) {\n return;\n }\n dispatch(\n openNotificationOptinModal({\n modalType,\n gaLabel,\n title,\n description,\n tagGroups\n })\n );\n };\n\nexport const logOutAction = () => async (dispatch: AppDispatch) => {\n cache.remove(CACHE_KEYS.SYSTEM_MESSAGES);\n cache.remove(CACHE_KEYS.SYSTEM_BADGES);\n\n // This is a hacky way to log out from Firebase even though the Firebase\n // app might not be loaded currently. We can use the firebase.auth().signOut()\n // method if inside Messaging and the Firebase app is loaded, but after\n // leaving Messaging we need to delete the database that holds auth information\n // to make sure the user is logged out.\n indexedDB.deleteDatabase('firebaseLocalStorageDb');\n\n dispatch(logOut());\n};\n\nexport const fetchSystemMessages =\n () => async (dispatch: AppDispatch, getState: GetState) => {\n const {\n member: { isLoggedIn }\n } = getState();\n if (isLoggedIn) {\n try {\n let systemMessages = cache.read(CACHE_KEYS.SYSTEM_MESSAGES);\n if (!systemMessages?.messages) {\n const fetchedMessages = await getSystemMessages();\n if (fetchedMessages?.data?.items) {\n systemMessages = {\n messages: fetchedMessages.data.items.reduce(\n (\n acc: Record,\n message: SystemMessage\n ) => ({\n ...acc,\n [message.type]: true\n }),\n {}\n ),\n notificationCount:\n fetchedMessages.data.items.filter(\n (message: SystemMessage) =>\n message.severity ===\n SystemMessageSeverity.Warning\n ).length\n };\n cache.write(CACHE_KEYS.SYSTEM_MESSAGES, systemMessages);\n }\n }\n dispatch(setSystemMessages(systemMessages));\n } catch (error: unknown) {\n // Invalidate cache to fetch fresh again next action\n cache.remove(CACHE_KEYS.SYSTEM_MESSAGES);\n if (!(error instanceof Error)) {\n logger(error);\n return;\n }\n switch (error.message) {\n case API_ERRORS.LOGGED_OUT:\n await dispatch(logOutAction());\n window.location.href = '/login/logout';\n break;\n case API_ERRORS.IGNORE_ME:\n case API_ERRORS.CANCELLED:\n case API_ERRORS.NETWORK:\n case API_ERRORS.TIMEOUT:\n break;\n default:\n logger(error);\n break;\n }\n }\n }\n };\n\nexport const fetchSystemBadges =\n () => async (dispatch: AppDispatch, getState: GetState) => {\n const {\n member: { isLoggedIn }\n } = getState();\n if (!isLoggedIn) return;\n\n try {\n let systemBadges = cache.read(CACHE_KEYS.SYSTEM_BADGES);\n if (!systemBadges?.badges) {\n const fetchedBadges = await getSystemBadges();\n if (fetchedBadges?.data?.badges) {\n const badgeMap = fetchedBadges.data.badges.reduce(\n (\n acc: Record,\n badge: SystemBadge\n ) => ({\n ...acc,\n [badge.type]: badge\n }),\n {}\n );\n systemBadges = {\n badges: badgeMap,\n notificationCount: badgeMap.PayoutsActivity ? 1 : 0\n };\n cache.write(CACHE_KEYS.SYSTEM_BADGES, systemBadges);\n }\n }\n dispatch(setSystemBadges(systemBadges));\n } catch (error: unknown) {\n // Invalidate cache to fetch fresh again next action\n cache.remove(CACHE_KEYS.SYSTEM_BADGES);\n if (\n error instanceof Error &&\n error.message === API_ERRORS.LOGGED_OUT\n ) {\n await dispatch(logOutAction());\n window.location.href = '/login/logout';\n }\n }\n };\n\nexport const reloadSystemMessages = () => (dispatch: AppDispatch) => {\n cache.remove(CACHE_KEYS.SYSTEM_MESSAGES);\n dispatch(fetchSystemMessages());\n};\n\nexport const reloadSystemBadges = () => (dispatch: AppDispatch) => {\n cache.remove(CACHE_KEYS.SYSTEM_BADGES);\n dispatch(fetchSystemBadges());\n};\n","/* eslint-disable better-mutation/no-mutation */\nimport { type PayloadAction, createSlice } from '@reduxjs/toolkit';\nimport { MODAL_STATE } from 'tradera/constants/ui';\nimport { getInitialBadges, type UiState } from './initial-state';\nimport type {\n SystemBadge,\n SystemBadgeType\n} from 'tradera/state/services/types/webapi-mytradera-generated';\n\nconst uiSlice = createSlice({\n name: 'ui',\n initialState: {} as UiState,\n reducers: {\n initialize: (_state, { payload }) => {\n return {\n ...payload\n };\n },\n toggleHeaderSearch: (state, { payload }) => {\n state.showHeaderSearch = payload;\n },\n\n openVideoModal: (state, { payload }) => {\n const {\n videoUrl,\n videoId,\n title,\n pageType,\n buttonLink,\n buttonText\n } = payload;\n state.videoModal = {\n ...state.videoModal,\n open: MODAL_STATE.OPEN,\n videoUrl,\n videoId,\n title,\n pageType,\n buttonLink,\n buttonText\n };\n },\n closeVideoModal: (state) => {\n state.videoModal.open = MODAL_STATE.CLOSED;\n },\n openNewMessageModal: (state, { payload }) => {\n state.newMessageModal = {\n open: MODAL_STATE.OPEN,\n title: payload.title,\n senderId: payload.senderId,\n recipientId: payload.recipientId,\n recipientAlias: payload.recipientAlias,\n itemId: payload.itemId,\n itemTitle: payload.itemTitle,\n itemImageUrl: payload.itemImageUrl,\n purchaseOrderId: payload.purchaseOrderId,\n itemSellerId: payload.itemSellerId\n };\n },\n closeNewMessageModal: (state) => {\n state.newMessageModal.open = MODAL_STATE.CLOSED;\n },\n openNotificationOptinModal: (state, { payload }) => {\n const { modalType, gaLabel, title, description, tagGroups } =\n payload;\n state.notificationOptinModal = {\n ...state.notificationOptinModal,\n open: MODAL_STATE.OPEN,\n modalType,\n gaLabel,\n title,\n description,\n tagGroups\n };\n },\n closeNotificationOptinModal: (state) => {\n state.notificationOptinModal.open = MODAL_STATE.CLOSED;\n },\n openModal: (state, { payload }) => {\n const { modalId, data } = payload;\n state.modals = {\n currentModal: modalId,\n currentModalData: data\n };\n },\n closeModal: (state) => {\n state.modals = {\n currentModal: null,\n currentModalData: null\n };\n },\n setSystemMessages: (state, { payload }) => {\n state.systemMessages = payload.messages;\n state.badges.messageNotificationCount = payload.notificationCount;\n },\n setSystemBadges: (\n state,\n {\n payload\n }: PayloadAction<{\n badges: Record;\n notificationCount: number;\n }>\n ) => {\n state.systemBadges = payload.badges;\n state.badges.badgeNotificationCount = payload.notificationCount;\n },\n openProfileMenu: (\n state,\n { payload }: PayloadAction\n ) => {\n state.profileMenu = {\n open: MODAL_STATE.OPEN,\n redirectUrl: payload\n };\n },\n closeProfileMenu: (state) => {\n state.profileMenu.open = MODAL_STATE.CLOSED;\n },\n openCategoryDropdownMenu: (state) => {\n state.categoryDropdownMenu.open = MODAL_STATE.OPEN;\n },\n closeCategoryDropdownMenu: (state) => {\n state.categoryDropdownMenu.open = MODAL_STATE.CLOSED;\n },\n openSearchForm: (state) => {\n state.showSearchForm = true;\n },\n closeSearchForm: (state) => {\n state.showSearchForm = false;\n },\n logOut: (state) => {\n state.badges = getInitialBadges();\n },\n openItemSettings: (state, { payload }) => {\n state.itemSettings = {\n open: MODAL_STATE.OPEN,\n item: payload\n };\n },\n closeItemSettings: (state) => {\n state.itemSettings = {\n open: MODAL_STATE.CLOSED,\n item: {}\n };\n },\n openShareModal: (state, { payload }) => {\n state.shareModal = {\n isOpen: true,\n settings: payload\n };\n },\n closeShareModal: (state) => {\n state.shareModal = {\n isOpen: false,\n settings: null\n };\n },\n openHelpSection: (state, { payload }) => {\n state.helpSection = {\n isOpen: true,\n settings: payload\n };\n },\n closeHelpSection: (state) => {\n state.helpSection = {\n isOpen: false,\n settings: null\n };\n },\n openWishListSideSheet: (state) => {\n state.wishListSideSheet.isOpen = true;\n },\n closeWishListSideSheet: (state) => {\n state.wishListSideSheet.isOpen = false;\n },\n openNotificationsSideSheet: (state) => {\n state.notificationsSideSheet.isOpen = true;\n },\n closeNotificationsSideSheet: (state) => {\n state.notificationsSideSheet.isOpen = false;\n },\n updateProductCommunications: (state, { payload }) => {\n state.productCommunications = payload;\n },\n showSaveSearchBanner: (\n state,\n { payload = true }: PayloadAction\n ) => {\n state.showSaveSearchBanner = payload;\n },\n openCollectSsnModal: (state) => {\n state.collectSsnModal.isOpen = true;\n },\n closeCollectSsnModal: (state) => {\n state.collectSsnModal.isOpen = false;\n },\n openReferralModal: (state) => {\n state.referralModal.isOpen = true;\n },\n closeReferralModal: (state) => {\n state.referralModal.isOpen = false;\n }\n }\n});\n\nexport const {\n initialize,\n toggleHeaderSearch,\n openVideoModal,\n closeVideoModal,\n openNewMessageModal,\n closeNewMessageModal,\n openNotificationOptinModal,\n closeNotificationOptinModal,\n setSystemMessages,\n setSystemBadges,\n openProfileMenu,\n closeProfileMenu,\n openCategoryDropdownMenu,\n closeCategoryDropdownMenu,\n openSearchForm,\n closeSearchForm,\n openItemSettings,\n closeItemSettings,\n logOut,\n openModal,\n closeModal,\n openShareModal,\n closeShareModal,\n openHelpSection,\n closeHelpSection,\n openWishListSideSheet,\n closeWishListSideSheet,\n openNotificationsSideSheet,\n closeNotificationsSideSheet,\n updateProductCommunications,\n showSaveSearchBanner,\n openCollectSsnModal,\n closeCollectSsnModal,\n openReferralModal,\n closeReferralModal\n} = uiSlice.actions;\n\nexport const reducer = uiSlice.reducer;\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport getInitialState from './initial-state';\n\nconst cartSlice = createSlice({\n name: 'cart',\n initialState: getInitialState(),\n reducers: {\n setFetching: (state, { payload }) => {\n state.isFetching = payload;\n },\n setConfirmingId: (state, { payload }) => {\n state.confirmingId = payload;\n },\n setCartData: (state, { payload }) => {\n state.isFetching = false;\n state.merchantPreOrders = payload.merchantPreOrders;\n state.errors = {};\n state.loaded = true;\n },\n setError: (state, { payload }) => {\n state.errors[payload.id] = payload.message;\n state.confirmingId = undefined;\n }\n }\n});\n\nexport const { setFetching, setConfirmingId, setCartData, setError } =\n cartSlice.actions;\n\nexport default cartSlice.reducer;\n","export const MODAL_TYPE = {\n SWISH_HANDEL: 'SWISH_HANDEL',\n TRUSTLY: 'TRUSTLY'\n};\n\nexport const PAYMENT_OPTIONS = {\n CARD: 'Card',\n PAYPAL: 'PayPal',\n APPLEPAY: 'ApplePay',\n GOOGLEPAY: 'GooglePay',\n SWISH_HANDEL: 'SwishHandel',\n VISA_MASTERCARD: 'VisaMasterCard',\n KLARNA: 'Klarna',\n TRUSTLY: 'Trustly',\n WALLET: 'Wallet',\n NO_PAYMENT_METHOD: 'NoPaymentMethod'\n};\n\nexport const PAYMENT_OPTION_STATUS = {\n AVAILABLE: 'Available',\n UNAVAILABLE_DUE_TO_AMOUNT: 'UnavailableDueToAmount',\n AVAILABLE_WITH_DISTURBANCE: 'AvailableWithDisturbance'\n};\n\nexport const BUYER_PROTECTION_STATE = {\n NOT_SELECTED: 'NotSelected',\n NOT_ADDED: 'NotAdded',\n ADDED: 'Added'\n};\n\nexport default () => {\n return {\n buyerMember: null,\n checkoutSummary: {\n hasError: false,\n isFetching: false\n },\n hasError: false,\n isFetching: false,\n payment: {\n hasError: false,\n isFetching: false,\n paymentOptions: null,\n selectedPayment: null,\n buyerProtection: BUYER_PROTECTION_STATE.NOT_SELECTED,\n orderCalculation: null,\n paymentMethodData: null,\n paymentMethodAmount: null,\n isValid: false,\n discountCodes: [],\n discountCodesValidating: false,\n showSelectedPaymentAsPayButton: false\n },\n sellerMember: null,\n modal: {\n open: '',\n paymentAttemptId: '',\n trustlyRedirectUrl: ''\n },\n ongoingPaymentAttempt: null,\n shippingInfo: {\n shippingOptions: null,\n shippingPriceRange: null,\n shippingDiscount: null,\n collectionPoints: null,\n selectedCollectionPoint: null,\n isBooked: false,\n isFetching: false\n },\n combinedShippingInfo: null,\n purchaseOrder: {},\n shippingOptionsLoading: false,\n verificationStatus: {\n needsKyc: false\n },\n preselectedValues: {\n shipping: null,\n paymentOption: null,\n buyerProtection: BUYER_PROTECTION_STATE.NOT_SELECTED,\n discountCode: null\n },\n currencyCode: 'SEK'\n };\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport getInitialState from 'tradera/state/views/checkout/initial-state';\n\nconst checkoutSlice = createSlice({\n name: 'checkout',\n initialState: getInitialState(),\n reducers: {\n receiveCheckout: (state, { payload }) => {\n const {\n buyerMember,\n purchaseOrder,\n sellerMember,\n shippingInfo,\n combinedShippingInfo,\n ongoingPaymentAttempt,\n shippingFeeRule,\n verificationStatus\n } = payload;\n state.buyerMember = { ...buyerMember };\n state.sellerMember = { ...sellerMember };\n state.isFetching = false;\n state.hasError = false;\n state.purchaseOrderId = purchaseOrder.purchaseOrderId;\n state.orderNumber = purchaseOrder.orderNumber;\n state.paidStatus = purchaseOrder.paidStatus;\n state.ongoingPaymentAttempt = ongoingPaymentAttempt;\n state.shippingInfo.shippingOptions = shippingInfo.shippingOptions;\n state.shippingInfo.shippingPriceRange =\n shippingInfo.shippingPriceRange;\n state.shippingInfo.shippingDiscount = shippingInfo.shippingDiscount;\n state.shippingInfo.selectedCollectionPoint =\n shippingInfo.collectionPointId !== undefined\n ? { id: shippingInfo.collectionPointId }\n : undefined;\n state.shippingInfo.isBooked = shippingInfo.isBooked;\n state.combinedShippingInfo = combinedShippingInfo;\n state.shippingFeeRule = shippingFeeRule;\n state.purchaseOrder = purchaseOrder;\n state.shippingOptionsLoading = false;\n state.verificationStatus = verificationStatus;\n },\n receiveShippingOptions: (state, { payload }) => {\n state.shippingInfo.shippingOptions = payload;\n },\n setShippingOptionsLoading: (state, { payload }) => {\n state.shippingOptionsLoading = payload.isLoading;\n },\n receivePaymentOptions: (state, { payload }) => {\n state.payment.paymentOptions = payload;\n state.payment.isFetching = false;\n },\n receiveCollectionPoints: (state, { payload }) => {\n state.shippingInfo.collectionPoints = payload;\n },\n setFetching: (state, { payload }) => {\n state.isFetching = payload;\n state.hasError = false;\n },\n openModal: (state, { payload }) => {\n const { open, paymentAttemptId, trustlyRedirectUrl } = payload;\n state.modal = {\n open,\n paymentAttemptId,\n trustlyRedirectUrl\n };\n },\n cancelPayment: (state) => {\n state.checkoutSummary.hasError = false;\n state.checkoutSummary.isFetching = false;\n },\n closeModal: (state) => {\n state.modal = {\n open: ''\n };\n },\n setHasError: (state, { payload }) => {\n state.hasError = payload;\n state.isFetching = false;\n },\n setPaymentFetching: (state, { payload }) => {\n state.payment.isFetching = payload;\n state.payment.hasError = false;\n },\n setPaymentHasError: (state, { payload }) => {\n state.payment.hasError = payload;\n state.payment.isFetching = false;\n },\n setPaymentIsValid: (state, { payload }) => {\n state.payment.isValid = payload;\n },\n setPaymentMethodData: (state, { payload }) => {\n state.payment.paymentMethodData = payload;\n },\n setCheckoutSummaryFetching: (state, { payload }) => {\n state.checkoutSummary.isFetching = payload;\n state.checkoutSummary.hasError = false;\n },\n setCheckoutSummaryHasError: (state, { payload }) => {\n state.checkoutSummary.hasError = payload;\n state.checkoutSummary.isFetching = false;\n },\n setSelectedPayment: (state, { payload }) => {\n state.payment.selectedPayment = payload;\n state.checkoutSummary.hasError = false;\n },\n setOrderCalculation: (state, { payload }) => {\n state.payment.orderCalculation = payload;\n },\n setBuyerProtection: (state, { payload }) => {\n state.payment.buyerProtection = payload;\n },\n setSelectedShipping: (state, { payload }) => {\n state.selectedShipping = payload;\n },\n setOngoingPaymentAttempt: (state, { payload }) => {\n state.ongoingPaymentAttempt = payload;\n },\n setCombinedShippingInfo: (state, { payload }) => {\n state.combinedShippingInfo = {\n ...state.combinedShippingInfo,\n ...payload\n };\n },\n setBuyerMember: (state, { payload }) => {\n state.buyerMember = { ...state.buyerMember, ...payload };\n },\n setBuyerMemberAddress: (state, { payload }) => {\n state.buyerMember.address = {\n ...state.buyerMember.address,\n ...payload\n };\n },\n setCollectionPoint: (state, { payload }) => {\n state.shippingInfo.selectedCollectionPoint = payload;\n },\n setShippingInfoFetching: (state, { payload }) => {\n state.shippingInfo.isFetching = payload;\n },\n setCollectionPointSaving: (state, { payload }) => {\n state.shippingInfo.savingCollectionPoint = payload;\n },\n setDropinLoading: (state, { payload }) => {\n state.payment.dropinLoading = payload;\n },\n setDiscountCodesValidating: (state, { payload }) => {\n state.payment.discountCodesValidating = payload;\n },\n setDiscountCodes: (state, { payload }) => {\n state.payment.discountCodes = payload;\n },\n setPaymentMethodAmount: (state, { payload }) => {\n state.payment.paymentMethodAmount = payload;\n },\n setPreselectedValues: (state, { payload }) => {\n state.preselectedValues = payload;\n },\n setShowSelectedPaymentAsPayButton: (state, { payload }) => {\n state.payment.showSelectedPaymentAsPayButton = payload;\n },\n setCurrencyCode: (state, { payload }) => {\n state.currencyCode = payload || state.currencyCode;\n }\n }\n});\n\nexport const {\n openModal,\n closeModal,\n cancelPayment,\n receiveCheckout,\n receiveShippingOptions,\n setShippingOptionsLoading,\n receivePaymentOptions,\n receiveCollectionPoints,\n setFetching,\n setHasError,\n setCheckoutSummaryFetching,\n setCheckoutSummaryHasError,\n setPaymentFetching,\n setPaymentHasError,\n setPaymentIsValid,\n setPaymentMethodData,\n setSelectedPayment,\n setOrderCalculation,\n setSelectedShipping,\n setOngoingPaymentAttempt,\n setCombinedShippingInfo,\n setBuyerMember,\n setBuyerMemberAddress,\n setCollectionPoint,\n setShippingInfoFetching,\n setCollectionPointSaving,\n setBuyerProtection,\n setDropinLoading,\n setDiscountCodesValidating,\n setDiscountCodes,\n setPaymentMethodAmount,\n setPreselectedValues,\n setShowSelectedPaymentAsPayButton,\n setCurrencyCode\n} = checkoutSlice.actions;\n\nexport default checkoutSlice.reducer;\n","import api from './api';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\nimport { logError } from 'tradera/utils/api';\nimport utils from './utils';\nimport {\n selectInvoiceCheckout,\n selectInvoiceOngoingPayment,\n selectInvoicePayment,\n selectSellerPhoneNumber\n} from './selector';\nimport {\n closePaymentModal,\n openPaymentModal,\n resetOngoingPaymentAttempt,\n setCheckoutSummaryFetching,\n setPaymentMethodData\n} from './reducer';\nimport { CHECKOUT_ERRORS } from 'tradera/helpers/checkout-errors';\nimport {\n MODAL_TYPE,\n PAYMENT_OPTIONS\n} from 'tradera/state/views/invoice-checkout/initial-state';\nimport { paymentInstance } from 'tradera/apps/my-tradera/invoice-checkout/payment/braintree-drop-in';\nimport {\n selectMemberEmail,\n selectMemberFirstName,\n selectMemberLastName\n} from 'tradera/state/member/selectors';\nimport { selectShippingRegionCountryCodeIso2 } from 'tradera/state/shipping-region/selectors';\n\nexport const getInvoice = createAsyncThunk(\n 'invoiceCheckout/getInvoice',\n async ({ invoiceId }, thunkAPI) => {\n try {\n const result = await api.getInvoice(invoiceId);\n\n return result.data;\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\n// Payment\n\nexport const getPaymentOptions = createAsyncThunk(\n 'invoiceCheckout/getPaymentOptions',\n async (invoiceId, thunkAPI) => {\n try {\n const { data } = await api.getPaymentOptions(invoiceId);\n return data;\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nconst sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay));\n\nconst PAYMENT_STATUS = {\n AUTHORIZED: 'Authorized',\n AWAITING_SWISH: 'AwaitingExternalAuthentication',\n CANCELLED: 'Cancelled',\n CANCELLING: 'Cancelling',\n CANCELLING_FAILED: 'CancellingFailed',\n COMPLETING: 'Completing',\n COMPLETING_FAILED: 'CompletingFailed',\n DECLINED: 'Declined',\n FAILED: 'Failed',\n INIT: 'Initializing',\n INIT_COMPLETE: 'Initialized',\n INIT_FAILED: 'InitializationFailed',\n SETTLED: 'Settled'\n};\n\n// eslint-disable-next-line no-control-regex\nconst containsNonPrintableAscii = (value) => value.match(/[^\\x00-\\x7F]/g);\n\nconst createThreeDSecureParameters = (getState) => {\n const currentState = getState();\n const { amountOwed: totalCost } = selectInvoiceCheckout(currentState);\n const memberFirstName = selectMemberFirstName(currentState);\n const firstName = containsNonPrintableAscii(memberFirstName)\n ? null\n : memberFirstName;\n const memberLastName = selectMemberLastName(currentState);\n const lastName = containsNonPrintableAscii(memberLastName)\n ? null\n : memberLastName;\n\n const buyerAddress = {\n countryCodeAlpha2: selectShippingRegionCountryCodeIso2(currentState),\n phoneNumber: selectSellerPhoneNumber(currentState)?.replace(\n /[^\\d]/g,\n ''\n )\n };\n return {\n amount: totalCost,\n email: selectMemberEmail(currentState),\n billingAddress: {\n givenName: firstName,\n surname: lastName,\n ...buyerAddress\n },\n additionalInformation: {\n shippingGivenName: firstName,\n shippingSurname: lastName,\n shippingAddress: buyerAddress\n }\n };\n};\n\nexport const initBraintreePayment =\n (paymentOption, onComplete) => async (dispatch, getState) => {\n let requestOptions = {};\n\n if (\n paymentOption === PAYMENT_OPTIONS.VISA_MASTERCARD ||\n paymentOption === PAYMENT_OPTIONS.GOOGLEPAY\n ) {\n requestOptions = {\n threeDSecure: createThreeDSecureParameters(getState)\n };\n }\n\n dispatch(setCheckoutSummaryFetching(true));\n\n try {\n if (paymentInstance) {\n const data =\n await paymentInstance.requestPaymentMethod(requestOptions);\n dispatch(setPaymentMethodData(data));\n } else {\n throw { message: CHECKOUT_ERRORS.NO_PAYMENT_METHOD };\n }\n return dispatch(initPayment(onComplete));\n } catch (error) {\n return Promise.reject(error);\n }\n };\n\nexport const initPayment = (onComplete) => async (dispatch, getState) => {\n const currentState = getState();\n\n const { invoicePaymentAttemptId } =\n selectInvoiceOngoingPayment(currentState);\n const { selectedPayment, paymentMethodData } =\n selectInvoicePayment(currentState);\n const { invoiceId } = selectInvoiceCheckout(currentState);\n\n dispatch(closePaymentModal());\n dispatch(setCheckoutSummaryFetching(true));\n\n try {\n const paymentAttemptId = invoicePaymentAttemptId || utils.getUuid();\n\n if (!invoicePaymentAttemptId) {\n const formData = {\n invoicePaymentAttemptId: paymentAttemptId,\n invoiceId,\n paymentMethod: selectedPayment,\n paymentMethodData\n };\n await api.initializePayment(formData);\n }\n\n //POST successful? then start polling:\n return dispatch(\n checkPaymentStatus(paymentAttemptId, selectedPayment, onComplete)\n );\n } catch (error) {\n return Promise.reject(error);\n }\n};\n\nexport const cancelPayment = async (invoicePaymentAttemptId) => {\n const formData = {\n invoicePaymentAttemptId\n };\n\n try {\n await api.cancelPayment(formData);\n } catch (error) {\n return Promise.reject(error);\n }\n};\n\nexport const checkPaymentStatus =\n (paymentAttemptId, paymentMethod, onComplete) =>\n async (dispatch, getState) => {\n const { modal } = selectInvoicePayment(getState());\n\n let poll = true;\n\n try {\n const paymentStatus = await api.getPaymentStatus(paymentAttemptId);\n\n const { data } = paymentStatus;\n\n switch (data?.status) {\n case PAYMENT_STATUS.AUTHORIZED:\n case PAYMENT_STATUS.COMPLETING:\n case PAYMENT_STATUS.INIT:\n case PAYMENT_STATUS.INIT_COMPLETE:\n case PAYMENT_STATUS.CANCELLING:\n poll = true;\n break;\n case PAYMENT_STATUS.AWAITING_SWISH:\n poll = true;\n if (!modal.open) {\n dispatch(\n openPaymentModal({\n open: MODAL_TYPE.SWISH_HANDEL,\n paymentAttemptId\n })\n );\n }\n break;\n case PAYMENT_STATUS.SETTLED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(setCheckoutSummaryFetching(false));\n onComplete();\n break;\n case PAYMENT_STATUS.DECLINED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n return Promise.reject(new Error(CHECKOUT_ERRORS.DECLINED));\n case PAYMENT_STATUS.CANCELLED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n break;\n case PAYMENT_STATUS.COMPLETING_FAILED:\n case PAYMENT_STATUS.FAILED:\n case PAYMENT_STATUS.INIT_FAILED:\n case PAYMENT_STATUS.CANCELLING_FAILED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n return Promise.reject(\n new Error(`Payment error: ${data?.status}`)\n );\n default:\n dispatch(closePaymentModal());\n poll = false;\n }\n } catch (error) {\n poll = false;\n return Promise.reject(error);\n }\n\n if (poll) {\n await sleep(1500);\n return dispatch(\n checkPaymentStatus(paymentAttemptId, paymentMethod, onComplete)\n );\n }\n };\n","export const MODAL_TYPE = {\n BANK_ID: 'BANK_ID',\n SWISH_HANDEL: 'SWISH_HANDEL'\n};\n\nexport const PAYMENT_OPTIONS = {\n CARD: 'Card',\n APPLEPAY: 'ApplePay',\n GOOGLEPAY: 'GooglePay',\n SWISH_HANDEL: 'SwishHandel',\n VISA_MASTERCARD: 'VisaMasterCard'\n};\n\nexport const PAYMENT_OPTION_STATUS = {\n AVAILABLE: 'Available',\n UNAVAILABLE_DUE_TO_AMOUNT: 'UnavailableDueToAmount',\n AVAILABLE_WITH_DISTURBANCE: 'AvailableWithDisturbance'\n};\n\nexport default () => ({\n invoice: {},\n ongoingPaymentAttempt: {\n invoicePaymentAttemptId: null,\n paymentMethod: null\n },\n payment: {\n hasError: false,\n isFetching: false,\n paymentOptions: null,\n selectedPayment: null,\n paymentMethodData: null,\n modal: {\n open: ''\n }\n },\n checkoutSummary: {\n hasError: false,\n isFetching: false\n }\n});\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport getInitialState from './initial-state';\nimport { getPaymentOptions, getInvoice } from './actions';\n\nconst invoiceCheckoutSlice = createSlice({\n name: 'invoiceCheckout',\n initialState: getInitialState(),\n reducers: {\n setInvoiceData: (state, { payload }) => {\n state.invoice = payload;\n },\n setSelectedPayment: (state, { payload }) => {\n state.payment.selectedPayment = payload;\n state.payment.paymentMethodData = null;\n state.checkoutSummary.hasError = false;\n },\n setPaymentMethodData: (state, { payload }) => {\n state.payment.paymentMethodData = payload;\n },\n setPaymentPaying: (state, { payload }) => {\n state.payment.isPaying = payload;\n state.payment.hasError = false;\n },\n setCheckoutSummaryFetching: (state, { payload }) => {\n state.checkoutSummary.isFetching = payload;\n state.checkoutSummary.hasError = false;\n state.isUpdating = payload;\n },\n setCheckoutSummaryHasError: (state, { payload }) => {\n state.checkoutSummary.hasError = payload;\n state.checkoutSummary.isFetching = false;\n state.isUpdating = false;\n },\n openPaymentModal: (state, { payload }) => {\n const { open, paymentAttemptId } = payload;\n state.payment.modal = {\n open,\n paymentAttemptId\n };\n },\n closePaymentModal: (state) => {\n state.payment.modal = {\n open: ''\n };\n },\n resetOngoingPaymentAttempt: (state) => {\n state.ongoingPaymentAttempt = {\n invoicePaymentAttemptId: null,\n paymentMethod: null\n };\n }\n },\n extraReducers: (builder) => {\n // get invoice\n builder.addCase(getInvoice.fulfilled, (state, { payload }) => {\n state.invoice = {\n ...state.invoice,\n ...payload.invoice,\n isFetching: false\n };\n state.sellerPhoneNumber = payload.sellerPhone;\n state.ongoingPaymentAttempt = {\n ...state.ongoingPaymentAttempt,\n ...payload.ongoingPaymentAttempt\n };\n });\n builder.addCase(getInvoice.pending, (state) => {\n state.invoice = {\n ...state.invoice,\n isFetching: true,\n hasError: null\n };\n });\n builder.addCase(getInvoice.rejected, (state) => {\n state.invoice = {\n ...state.invoice,\n isFetching: false,\n hasError: true\n };\n });\n\n // get payment options\n builder.addCase(getPaymentOptions.fulfilled, (state, { payload }) => {\n const { paymentOptions } = payload;\n state.payment = {\n ...state.payment,\n isFetching: false,\n paymentOptions: paymentOptions\n };\n });\n builder.addCase(getPaymentOptions.pending, (state) => {\n state.payment = {\n ...state.payment,\n isFetching: true,\n hasError: null\n };\n });\n builder.addCase(getPaymentOptions.rejected, (state) => {\n state.payment = {\n ...state.payment,\n isFetching: false,\n hasError: true\n };\n });\n }\n});\n\nexport const {\n openNonIntegratedModal,\n closeNonIntegratedModal,\n setSelectedPayment,\n setPaymentMethodData,\n setPaymentPaying,\n setCheckoutSummaryFetching,\n setCheckoutSummaryHasError,\n openPaymentModal,\n closePaymentModal,\n setTermsAccepted,\n setInvoiceData,\n resetOngoingPaymentAttempt\n} = invoiceCheckoutSlice.actions;\n\nexport default invoiceCheckoutSlice.reducer;\n","export const selectInvoiceCheckout = (state) =>\n state.views.invoiceCheckout.invoice;\n\nexport const selectInvoicePayment = (state) =>\n state.views.invoiceCheckout.payment;\n\nexport const selectInvoiceOngoingPayment = (state) =>\n state.views.invoiceCheckout.ongoingPaymentAttempt;\n\nexport const selectCheckoutSummary = (state) =>\n state.views.invoiceCheckout.checkoutSummary;\n\nexport const selectSellerPhoneNumber = (state) =>\n state.views.invoiceCheckout.sellerPhoneNumber;\n","export const ENTRY_LOADING_STATUS = {\n DONE: 'done',\n LOADING: 'loading',\n UNAVAILABLE: 'unavailable',\n ERROR: 'error'\n};\n\nexport const ENTRY_LOAD_ACTION = {\n PRINT: 'print'\n};\n\nexport default () => {\n return {\n entries: {\n list: [],\n pagination: {\n index: 1,\n lastSequenceNumber: undefined,\n showLoadMoreButton: false,\n hasMore: true\n },\n loadingStatus: ENTRY_LOADING_STATUS.DONE,\n loadAction: undefined,\n dropdownData: {}\n },\n pending: undefined,\n payoutStatus: {},\n csvLoading: false,\n showPayoutFrequencyModal: false\n };\n};\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport getInitialState from './initial-state';\n\nconst payoutsSlice = createSlice({\n name: 'payouts',\n initialState: getInitialState(),\n reducers: {\n setPayoutStatus: (state, { payload }) => {\n state.payoutStatus = payload;\n },\n setEntries: (state, { payload }) => {\n state.entries.list = payload;\n },\n setPagination: (state, { payload }) => {\n state.entries.pagination = payload;\n },\n setEntriesLoadingStatus: (state, { payload }) => {\n state.entries.loadingStatus = payload;\n },\n setEntriesLoadAction: (state, { payload }) => {\n state.entries.loadAction = payload;\n },\n resetEntries: (state) => {\n state.entries = getInitialState().entries;\n },\n setPending: (state, { payload }) => {\n state.pending = payload;\n },\n setCsvLoading: (state, { payload }) => {\n state.csvLoading = payload;\n },\n updatePayoutFrequency: (state, { payload }) => {\n state.payoutStatus.payoutFrequencyOption = payload;\n },\n setShowPayoutFrequencyModal: (state, { payload }) => {\n state.showPayoutFrequencyModal = payload;\n },\n removePayoutAccount: (state) => {\n state.payoutStatus = {\n ...state.payoutStatus,\n account: undefined,\n accountType: undefined\n };\n },\n setShouldSelectPayoutMethod: (state, { payload }) => {\n state.payoutStatus.shouldSelectPayoutMethod = payload;\n },\n setDropdownData: (state, { payload: { key, data } }) => {\n state.entries.dropdownData[key] = data;\n }\n }\n});\n\nexport const {\n setPayoutStatus,\n setEntries,\n setPagination,\n setEntriesLoadingStatus,\n setEntriesLoadAction,\n resetEntries,\n setPending,\n setCsvLoading,\n updatePayoutFrequency,\n setShowPayoutFrequencyModal,\n removePayoutAccount,\n setShouldSelectPayoutMethod,\n setDropdownData\n} = payoutsSlice.actions;\n\nexport default payoutsSlice.reducer;\n","import { setReportItem, setViewState } from './reducer';\nimport { getReportItemModel, postReport } from './api';\nimport { VIEW_STATES } from './constants';\nimport { logger } from 'packages/logger';\nimport { API_ERRORS } from 'tradera/utils/api';\nimport { getBackToHereRedirectUrl } from 'tradera/utils/url';\nimport { getReturnUrl } from 'tradera/utils/login';\n\nconst onLoggedOut = () => {\n window.location = `/login${getReturnUrl(getBackToHereRedirectUrl())}`;\n};\n\nexport const loadReportItemModel = (itemId) => async (dispatch, getState) => {\n const reportItem = getState().views.reportItem;\n const isLoaded = reportItem.itemId === itemId;\n if (isLoaded) {\n dispatch(\n setViewState(\n reportItem.hasEnded ? VIEW_STATES.ITEM_ENDED : VIEW_STATES.FORM\n )\n );\n return;\n }\n try {\n dispatch(setViewState(VIEW_STATES.LOADING));\n const { data } = await getReportItemModel(itemId);\n\n dispatch(handleReportItemModel(data));\n } catch (error) {\n if (error.message === API_ERRORS.LOGGED_OUT) {\n onLoggedOut();\n } else {\n logger(error);\n }\n }\n};\n\nexport const handleReportItemModel = (reportItemModel) => (dispatch) => {\n dispatch(setReportItem(reportItemModel));\n};\n\nexport const submitReport =\n (itemId, reason, message, categoryId) => async (dispatch) => {\n dispatch(setViewState(VIEW_STATES.SUBMITTING));\n try {\n await postReport(itemId, reason, message, categoryId);\n dispatch(setViewState(VIEW_STATES.SUBMIT_SUCCESS));\n } catch (error) {\n logger(error);\n dispatch(setViewState(VIEW_STATES.SUBMIT_FAILED));\n }\n };\n","import { touchWebClient } from 'tradera/utils/http';\n\nexport const getReportItemModel = (itemId) => {\n return touchWebClient.get(`report-item/${itemId}.json`);\n};\n\nexport const postReport = (itemId, reason, message, categoryId) => {\n const payload = { reason, message, categoryId };\n return touchWebClient.post(`report-item/${itemId}`, payload);\n};\n","export const VIEW_STATES = {\n FORM: 'FORM',\n ITEM_ENDED: 'ITEM_ENDED',\n LOADING: 'LOADING',\n SUBMIT_FAILED: 'SUBMIT_FAILED',\n SUBMIT_SUCCESS: 'SUBMIT_SUCCESS',\n SUBMITTING: 'SUBMITTING'\n} as const;\n\nexport const REASONS = {\n NONE: '0',\n SUSPECTED_FRAUD: '1',\n ITEM_IS_A_COUNTERFEIT: '2',\n BRAND_NAME_MISUSE: '3',\n WRONG_CATEGORY: '4',\n PROHIBITED_SHIPPINGvOR_PAYMEN_TMETHOD: '5',\n OTHER_PROHIBITED_ITEM: '6',\n OTHER_PROHIBITED_SETUP: '7',\n OTHER: '8'\n} as const;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport { assertNoUndefinedProperties } from 'tradera/utils/assert';\nimport { getItemState } from '../view-item/item-state-helper';\nimport { getAmountDetails } from 'tradera/apps/tradera/components/vip/bidding/bid-details'; // TODO put getAmountDetails somewhere else\nimport { VIEW_STATES } from './constants';\n\nexport const initialState = {\n amount: 0,\n breadCrumbs: [],\n categoryId: 0,\n categoryNames: [],\n categories: [],\n categoryLevel: 0,\n description: null,\n hasEnded: false,\n images: [],\n itemId: 0,\n itemUrl: null,\n paymentOptions: [],\n reasons: [],\n resultMessage: null,\n shippingOptions: [],\n shippingTerms: [],\n sellerMemberId: 0,\n title: null,\n viewState: VIEW_STATES.LOADING,\n itemDetails: null\n};\n\nconst slice = createSlice({\n name: 'reportItem',\n initialState,\n reducers: {\n resetInitialState: () => {\n return initialState;\n },\n setReportItem: (state, { payload: { item, itemUrl, reasons } }) => {\n const itemDetails = item.itemDetails;\n const bidInfo = item.bidInfo;\n const itemState = getItemState(\n itemDetails.hasEnded,\n itemDetails.hasStarted,\n itemDetails.itemType,\n bidInfo.bidCount,\n bidInfo.reservePriceReached,\n bidInfo.nextValidBidAmount,\n bidInfo.transactionType,\n bidInfo.leadingBidderMemberId\n );\n const amountDetails = getAmountDetails(\n itemState,\n bidInfo.leadingBidAmount,\n itemDetails.openingBid,\n bidInfo.bidCount > 0\n );\n state.amount = amountDetails.amount;\n state.allowedBuyerRegion = itemDetails.allowedBuyerRegion;\n state.breadCrumbs = item.breadCrumbs;\n state.categoryId = itemDetails.categoryId;\n state.categoryNames = item.breadCrumbs.map(\n (breadCrumb) => breadCrumb.text\n );\n state.description = itemDetails.description;\n state.endDate = itemDetails.endDate;\n state.hasEnded = itemDetails.hasEnded;\n state.images = itemDetails.images;\n state.itemId = itemDetails.itemId;\n state.itemUrl = itemUrl;\n state.paymentOptions = itemDetails.paymentOptions;\n state.reasons = reasons;\n state.shippingOptions = itemDetails.shippingOptions;\n state.shippingTerms = itemDetails.shippingTerms;\n state.sellerMemberId = itemDetails.sellerMemberId;\n state.title = itemDetails.title;\n state.viewState = itemDetails.hasEnded\n ? VIEW_STATES.ITEM_ENDED\n : VIEW_STATES.FORM;\n state.itemDetails = itemDetails;\n assertNoUndefinedProperties(state);\n },\n setViewState: (state, { payload }) => {\n state.viewState = payload;\n },\n setCategories: (state, { payload: categories, categoryLevel }) => {\n state.categories = categories;\n state.categoryLevel = categoryLevel;\n }\n }\n});\n\nexport const { resetInitialState, setReportItem, setViewState, setCategories } =\n slice.actions;\nexport const reducer = slice.reducer;\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport ENDPOINTS from 'tradera/constants/endpoints';\nimport {\n axiosWithTokenRefresh,\n axiosConfigs,\n finalizeResponse,\n handleError\n} from 'tradera/utils/api';\n\nimport {\n selectBox,\n isLoadingShippingProducts,\n selectIsBoxValid\n} from './selectors';\n\nconst defaultBox = {\n length: 15,\n height: 15,\n width: 15,\n weight: 1000\n};\n\nconst weightMap = {\n 1: 50,\n 2: 100,\n 3: 250,\n 4: 500,\n 5: 1000,\n 6: 2000,\n 7: 3000,\n 8: 5000,\n 9: 7000,\n 10: 9000,\n 11: 10000,\n 12: 12000,\n 13: 15000,\n 14: 20000,\n 15: 35000\n};\n\nexport const shippingCalculatorEnabledCountries = ['DK', 'NL', 'SE'];\n\nconst shippingCalculatorSlice = createSlice({\n name: 'shippingCalculator',\n initialState: {\n box: { ...defaultBox },\n availableFromCountryCodes: [],\n availableToCountryCodes: [],\n defaultBox,\n weightUnit: 'kg',\n weightSliderValue: 5,\n isLoadingShippingProducts: false,\n shippingProviders: [\n {\n providerName: 'SchenkerPrivpak',\n service: 'traceable'\n },\n {\n providerName: 'PostNordParcel',\n service: 'traceable'\n },\n {\n providerName: 'PostNordStamp',\n service: 'stamps_digital'\n },\n {\n providerName: 'DHL',\n service: 'traceable'\n },\n {\n providerName: 'DhlNetherlands',\n service: 'traceable'\n },\n {\n providerName: 'Bussgods',\n service: 'traceable'\n },\n {\n providerName: 'BringDenmark',\n service: 'traceable'\n },\n {\n providerName: 'PostNordStampDenmark',\n service: 'stamps'\n },\n {\n providerName: 'Instabox',\n service: 'traceable'\n }\n ],\n internationalProductsGroupedByFromThenToCountry: {\n SE: { SE: [] }\n },\n showError: false\n },\n reducers: {\n initializeShippingCalculator: (state, action) => {\n const defaultCountry = shippingCalculatorEnabledCountries.includes(\n action.payload.defaultCountry\n )\n ? action.payload.defaultCountry\n : 'SE';\n state.defaultCountry = defaultCountry;\n state.selectedToCountry = defaultCountry;\n state.selectedFromCountry = defaultCountry;\n },\n setSelectedToCountry: (state, action) => {\n state.selectedToCountry = action.payload.selectedToCountry;\n },\n setSelectedFromCountry: (state, action) => {\n state.selectedFromCountry = action.payload.selectedFromCountry;\n },\n setDefaultValuesOnBox: (state) => {\n state.box = { ...defaultBox };\n const value = weightMap[5];\n state.weightUnit = value % 1000 === 0 ? 'kg' : 'g';\n state.weightSliderValue = 5;\n },\n updateFilter: (state, action) => {\n const { filterName, value } = action.payload;\n state.box[filterName] = value;\n },\n setWeightFilter: (state, action) => {\n const value = weightMap[action.payload.value];\n state.weightUnit = value % 1000 === 0 ? 'kg' : 'g';\n state.box.weight = value;\n state.weightSliderValue = action.payload.value;\n },\n setWeightUnit: (state, action) => {\n state.weightUnit = action.payload.weightUnit;\n },\n beginFetchingShippingProducts: (state) => {\n state.isLoadingShippingProducts = true;\n },\n setShowError: (state) => {\n state.showError = true;\n },\n setShippingProducts: (state, action) => {\n const { internationalShippingCalculatorProducts } = action.payload;\n\n const internationalProductsGroupedByFromThenToCountry =\n internationalShippingCalculatorProducts.reduce(\n (prev, product) => {\n const {\n fromCountryCodeIso2: from,\n toCountryCodeIso2: to\n } = product;\n prev[from] = prev[from] || {};\n prev[from][to] = prev[from][to] || [];\n prev[from][to].push(product);\n return prev;\n },\n {}\n );\n\n const availableToCountryCodes = [\n ...new Set(\n internationalShippingCalculatorProducts.map(\n ({ toCountryCodeIso2 }) => toCountryCodeIso2\n )\n )\n ];\n\n const availableFromCountryCodes = [\n ...new Set(\n internationalShippingCalculatorProducts.map(\n ({ fromCountryCodeIso2 }) => fromCountryCodeIso2\n )\n )\n ];\n\n state.availableFromCountryCodes = availableFromCountryCodes;\n state.availableToCountryCodes = availableToCountryCodes;\n state.showError = false;\n state.internationalProductsGroupedByFromThenToCountry =\n internationalProductsGroupedByFromThenToCountry;\n state.isLoadingShippingProducts = false;\n }\n }\n});\n\nexport const setDefaultValues = () => (dispatch, getState) => {\n const state = getState();\n dispatch(setDefaultValuesOnBox());\n dispatch(fetchShippingProducts());\n dispatch(\n initializeShippingCalculator({\n defaultCountry: state.views.shippingCalculator.defaultCountry\n })\n );\n};\n\nexport const fetchShippingProducts = () => async (dispatch, getState) => {\n const { length, height, width, weight } = selectBox(getState());\n\n if (isLoadingShippingProducts(getState())) {\n return;\n }\n\n if (!selectIsBoxValid(getState())) {\n dispatch(\n setShippingProducts({\n internationalShippingCalculatorProducts: []\n })\n );\n return;\n }\n dispatch(beginFetchingShippingProducts());\n\n try {\n const response = await axiosWithTokenRefresh()\n .get(ENDPOINTS.INTERNATIONAL_SHIPPING_CALCULATOR, {\n params: {\n lengthInMillimeters: length * 10,\n heightInMillimeters: height * 10,\n widthInMillimeters: width * 10,\n weightInGrams: weight\n },\n ...axiosConfigs.authenticated\n })\n .then(finalizeResponse())\n .catch(handleError());\n\n dispatch(\n setShippingProducts({\n internationalShippingCalculatorProducts:\n response.data.internationalShippingCalculatorProducts\n })\n );\n } catch (e) {\n dispatch(\n setShippingProducts({\n internationalShippingCalculatorProducts: []\n })\n );\n dispatch(setShowError());\n }\n};\n\nexport const {\n updateFilter,\n setWeightUnit,\n beginFetchingShippingProducts,\n initializeShippingCalculator,\n setShippingProducts,\n setDefaultValuesOnBox,\n setSelectedToCountry,\n setSelectedFromCountry,\n setWeightFilter,\n setShowError\n} = shippingCalculatorSlice.actions;\nexport default shippingCalculatorSlice.reducer;\n","export const selectBox = (state) => state.views.shippingCalculator.box;\n\nexport const selectFilterValue = (filterName) => (state) =>\n state.views.shippingCalculator.box[filterName];\n\nexport const selectIsBoxValid = (state) =>\n state.views.shippingCalculator.box.height > 0 &&\n state.views.shippingCalculator.box.length > 0 &&\n state.views.shippingCalculator.box.width > 0 &&\n state.views.shippingCalculator.box.weight > 0;\n\nexport const selectWeightUnit = (state) =>\n state.views.shippingCalculator.weightUnit;\n\nexport const selectWeightSliderValue = (state) =>\n state.views.shippingCalculator.weightSliderValue;\n\nexport const selectNormalizedWeight = (state) =>\n state.views.shippingCalculator.box.weight % 1000 === 0\n ? state.views.shippingCalculator.box.weight / 1000\n : state.views.shippingCalculator.box.weight;\n\nexport const selectWeightString = (state) =>\n `${selectNormalizedWeight(state)} ${selectWeightUnit(state)}`;\n\nexport const isLoadingShippingProducts = (state) =>\n state.views.shippingCalculator.isLoadingShippingProducts;\n\nexport const selectShippingProviders = (state) =>\n state.views.shippingCalculator.shippingProviders.map((provider) => ({\n ...provider,\n domesticProducts:\n selectShippingProducts(state)[\n state.views.shippingCalculator.selectedFromCountry\n ]?.filter(\n ({ shippingProvider }) =>\n shippingProvider === provider.providerName\n ) || []\n }));\n\nexport const selectAvailableShippingProviders = (state) => {\n const shippingProviders = state.views.shippingCalculator.shippingProviders;\n const shippingProducts = selectShippingProducts(state);\n\n const includedProviders = [];\n\n shippingProviders.forEach((provider) => {\n Object.keys(shippingProducts).forEach((key) => {\n if (\n shippingProducts[key] &&\n shippingProducts[key].length > 0 &&\n shippingProducts[key].some(\n (x) =>\n x.shippingProvider === provider.providerName &&\n !includedProviders.includes(x.shippingProvider)\n )\n ) {\n includedProviders.push(provider.providerName);\n }\n });\n });\n\n return shippingProviders.filter(({ providerName }) =>\n includedProviders.find((p) => p === providerName)\n );\n};\n\nexport const selectShippingProducts = (state) => {\n const {\n internationalProductsGroupedByFromThenToCountry,\n selectedFromCountry\n } = state.views.shippingCalculator;\n return (\n internationalProductsGroupedByFromThenToCountry[selectedFromCountry] ||\n {}\n );\n};\n\nexport const selectIsDifferentFromDefaultBox = (state) =>\n !(\n state.views.shippingCalculator.box.length ===\n state.views.shippingCalculator.defaultBox.length &&\n state.views.shippingCalculator.box.width ===\n state.views.shippingCalculator.defaultBox.width &&\n state.views.shippingCalculator.box.height ===\n state.views.shippingCalculator.defaultBox.height &&\n state.views.shippingCalculator.box.weight ===\n state.views.shippingCalculator.defaultBox.weight\n );\n\nexport const selectSelectedCountries = (state) => ({\n selectedFromCountry: state.views.shippingCalculator.selectedFromCountry,\n selectedToCountry: state.views.shippingCalculator.selectedToCountry\n});\n\nexport const selectAvailableCountryCodes = (state) => ({\n availableFromCountryCodes:\n state.views.shippingCalculator.availableFromCountryCodes,\n availableToCountryCodes:\n state.views.shippingCalculator.availableToCountryCodes\n});\n\nexport const selectShowError = (state) =>\n state.views.shippingCalculator.showError;\n","import api from './api';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\nimport { logger } from 'packages/logger';\nimport { logError } from 'tradera/utils/api';\nimport utils from './utils';\nimport {\n selectCheckoutSummary,\n selectItemWithoutShipment,\n selectSellerPhoneNumber,\n selectShipment,\n selectShippingCheckout,\n selectShippingPayment\n} from './selector';\nimport {\n getDefaultErrorKey,\n isUnSupportedProduct,\n resolveMostPreciseTranslationKey\n} from 'tradera/helpers/shipping-validation-errors';\nimport {\n closePaymentModal,\n openPaymentModal,\n resetOngoingPaymentAttempt,\n setCheckoutSummaryFetching,\n setPaymentMethodData\n} from './reducer';\nimport { CHECKOUT_ERRORS } from 'tradera/helpers/checkout-errors';\nimport {\n MODAL_TYPE,\n PAYMENT_OPTIONS\n} from 'tradera/state/views/shipping-checkout/initial-state';\nimport { paymentInstance } from 'tradera/apps/my-tradera/shipping-checkout/payment/braintree-drop-in';\nimport {\n selectMemberEmail,\n selectMemberFirstName,\n selectMemberLastName\n} from 'tradera/state/member/selectors';\nimport { NIL as NIL_UUID } from 'uuid';\nimport { selectShippingRegionCountryCodeIso2 } from 'tradera/state/shipping-region/selectors';\n\nexport const deleteShipment = createAsyncThunk(\n 'shippingCheckout/deleteShipment',\n async ({ shipmentId }, thunkAPI) => {\n try {\n await api.deleteShipment(shipmentId);\n const result = await api.createShipmentCheckout();\n const { shipmentCheckoutId } = result?.data || {};\n return {\n shipmentId,\n shipmentCheckoutId\n };\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const createShipmentCheckout = createAsyncThunk(\n 'shippingCheckout/createShipmentCheckout',\n async (callback = () => {}, thunkAPI) => {\n try {\n const result = await api.createShipmentCheckout();\n callback();\n\n return result.data;\n } catch (error) {\n logError(error);\n callback();\n\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const getShippingOptions = createAsyncThunk(\n 'shippingCheckout/getShippingOptions',\n async (\n {\n fromCountry,\n toCountry,\n bringEnabled,\n postnordEnabled,\n dhlEnabled,\n schenkerEnabled,\n purchaseOrderId\n },\n thunkAPI\n ) => {\n try {\n const result = await api.getShippingOptions(\n fromCountry,\n toCountry,\n purchaseOrderId\n );\n\n return {\n data: result.data,\n bringEnabled: bringEnabled,\n postnordEnabled: postnordEnabled,\n dhlEnabled: dhlEnabled,\n schenkerEnabled: schenkerEnabled\n };\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const updateShipment = createAsyncThunk(\n 'shippingCheckout/updateShipment',\n async (shipmentDetails, thunkAPI) => {\n thunkAPI.dispatch(setCheckoutSummaryFetching(true));\n\n let mostPreciseTranslationKey;\n try {\n const { data } = await api.setShipmentDetails(shipmentDetails);\n const { errors } = data.responseStatus;\n if (!errors) {\n if (data.shipmentCheckoutId !== NIL_UUID) {\n return data;\n }\n\n return thunkAPI.dispatch(\n createShipmentCheckout(() =>\n thunkAPI.dispatch(setCheckoutSummaryFetching(false))\n )\n );\n }\n\n mostPreciseTranslationKey =\n resolveMostPreciseTranslationKey(errors);\n } catch (error) {\n logError(error);\n mostPreciseTranslationKey = getDefaultErrorKey();\n }\n\n thunkAPI.dispatch(setCheckoutSummaryFetching(false));\n return thunkAPI.rejectWithValue({\n mostPreciseErrorKey: mostPreciseTranslationKey\n });\n }\n);\n\nexport const updateShippingProvider = (id, payload) => (dispatch, getState) => {\n const shipment = selectShipment(getState(), id);\n\n const { providerId, id: productId } = payload;\n const { purchaseOrderId, shipmentId, receiver } = shipment;\n\n const shippingPayload = buildShippingPayload(\n shipmentId,\n providerId,\n productId,\n purchaseOrderId,\n receiver\n );\n\n dispatch(updateShipment(shippingPayload));\n};\n\nexport const updateShippingAddress = (id, payload) => (dispatch, getState) => {\n const shipment = selectShipment(getState(), id);\n\n const { purchaseOrderId, shippingProvider, shipmentId, product, receiver } =\n shipment;\n\n const address = {\n name: payload.name || receiver.name,\n city: payload.city || receiver.city,\n zipCode: payload.zipCode || receiver.zipCode,\n street: payload.streetName || receiver.street\n };\n\n const shippingPayload = buildShippingPayload(\n shipmentId,\n shippingProvider,\n product.id,\n purchaseOrderId,\n address\n );\n dispatch(updateShipment(shippingPayload));\n};\n\nexport const createShipment = createAsyncThunk(\n 'shippingCheckout/createShipment',\n async (payload, thunkAPI) => {\n const { selectedShipping, buyerContactDetails } =\n selectItemWithoutShipment(thunkAPI.getState());\n\n const { address } = payload;\n const shippingPayload = buildShippingPayload(\n null,\n payload.providerId || selectedShipping.providerId,\n payload.productId || selectedShipping.productId,\n payload.purchaseOrderId,\n {\n name: address?.name || buyerContactDetails.fullName,\n city: address?.city || buyerContactDetails.town,\n zipCode: address?.zipCode || buyerContactDetails.zipCode,\n street: address?.street || buyerContactDetails.streetName\n }\n );\n\n try {\n const { data } = await api.setShipmentDetails(shippingPayload);\n const { errors } = data.responseStatus;\n\n if (!errors) {\n return data;\n }\n\n // Can happen i combined shipping when seller sets custom shipping price and changes product\n // in that case we want to let the seller choose a product from shipping selector\n if (isUnSupportedProduct(errors[0])) {\n return thunkAPI.rejectWithValue({\n hasUnSupportedProduct: true\n });\n }\n\n const mostPreciseTranslationKey =\n resolveMostPreciseTranslationKey(errors);\n\n return thunkAPI.rejectWithValue({\n mostPreciseErrorKey: mostPreciseTranslationKey\n });\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue({\n mostPreciseErrorKey: getDefaultErrorKey()\n });\n }\n }\n);\n\nexport const markAsBooked = createAsyncThunk(\n 'shippingCheckout/markAsBooked',\n async (purchaseOrderId, thunkAPI) => {\n try {\n return await api.setShippingAsBooked(purchaseOrderId);\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const markAsShipped = createAsyncThunk(\n 'shippingCheckout/markAsShipped',\n async (purchaseOrderId, thunkAPI) => {\n try {\n return await api.setShippingAsShipped(purchaseOrderId);\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const getItemWithoutShipment = createAsyncThunk(\n 'shippingCheckout/getItemWithoutShipment',\n async (purchaseOrderId, thunkAPI) => {\n try {\n const { data } =\n await api.getMemberSoldItemShippingInfo(purchaseOrderId);\n const { responseStatus, shipmentCheckoutId } = data;\n if (responseStatus?.errorCode) {\n return thunkAPI.rejectWithValue({\n errorCode: responseStatus?.errorCode,\n shipmentCheckoutId\n });\n }\n\n return data;\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const getShippingConfirmation = createAsyncThunk(\n 'shippingCheckout/getShippingConfirmation',\n async (shippingCheckoutId, thunkAPI) => {\n try {\n const isBookingComplete =\n await pollShippingConfirmationStatus(shippingCheckoutId);\n\n if (!isBookingComplete) {\n logger(\n `Booking was not completed after 10 retries. shippingCheckoutId ${shippingCheckoutId}`\n );\n return thunkAPI.rejectWithValue({ isLongPolling: true });\n }\n\n const response =\n await api.getShippingConfirmation(shippingCheckoutId);\n return response.data;\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nconst pollShippingConfirmationStatus = async (shippingCheckoutId) =>\n new Promise((resolve, reject) => {\n let iterations = 0;\n const poll = async () => {\n if (iterations === 10) {\n return resolve(false);\n }\n\n try {\n const { data } =\n await api.getIsBookingComplete(shippingCheckoutId);\n\n if (data.isBookingComplete) {\n return resolve(true);\n }\n } catch (error) {\n logError(error);\n\n return reject(error);\n }\n\n // eslint-disable-next-line better-mutation/no-mutation\n iterations++;\n\n setTimeout(poll, 2000);\n };\n\n poll();\n });\n\nconst buildShippingPayload = (\n shipmentId,\n shippingProvider,\n shippingProductId,\n purchaseOrderId,\n receiver\n) => ({\n shipmentId, // nullable if `null` -> new shipment is created\n shippingProvider,\n buyerAddress: {\n name: receiver.name,\n city: receiver.city,\n zipCode: receiver.zipCode,\n streetName: receiver.street\n },\n shippingProductId,\n purchaseOrderId\n});\n\n// Payment\n\nexport const getPaymentOptions = createAsyncThunk(\n 'shippingCheckout/getPaymentOptions',\n async (shipmentCheckoutId, thunkAPI) => {\n try {\n const { data } = await api.getPaymentOptions(shipmentCheckoutId);\n return data;\n } catch (error) {\n logError(error);\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nexport const getUnbookedShipments = createAsyncThunk(\n 'shippingCheckout/getUnbookedShipments',\n async (thunkAPI) => {\n try {\n const result = await api.getUnbookedShipments();\n\n return result.data;\n } catch (error) {\n logError(error);\n\n return thunkAPI.rejectWithValue(error);\n }\n }\n);\n\nconst sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay));\n\nconst PAYMENT_STATUS = {\n AUTHORIZED: 'Authorized',\n AWAITING_SWISH: 'AwaitingExternalAuthentication',\n CANCELLED: 'Cancelled',\n CANCELLING: 'Cancelling',\n CANCELLING_FAILED: 'CancellingFailed',\n COMPLETING: 'Completing',\n COMPLETING_FAILED: 'CompletingFailed',\n DECLINED: 'Declined',\n FAILED: 'Failed',\n INIT: 'Initializing',\n INIT_COMPLETE: 'Initialized',\n INIT_FAILED: 'InitializationFailed',\n SETTLED: 'Settled'\n};\n\n// eslint-disable-next-line no-control-regex\nconst containsNonPrintableAscii = (value) => value.match(/[^\\x00-\\x7F]/g);\n\nconst createThreeDSecureParameters = (getState) => {\n const currentState = getState();\n const { totalCost } = selectCheckoutSummary(currentState);\n const memberFirstName = selectMemberFirstName(currentState);\n const firstName = containsNonPrintableAscii(memberFirstName)\n ? null\n : memberFirstName;\n const memberLastName = selectMemberLastName(currentState);\n const lastName = containsNonPrintableAscii(memberLastName)\n ? null\n : memberLastName;\n\n const buyerAddress = {\n phoneNumber: selectSellerPhoneNumber(currentState)?.replace(\n /[^\\d]/g,\n ''\n ),\n countryCodeAlpha2: selectShippingRegionCountryCodeIso2(currentState)\n };\n return {\n amount: totalCost,\n email: selectMemberEmail(currentState),\n billingAddress: {\n givenName: firstName,\n surname: lastName,\n ...buyerAddress\n },\n additionalInformation: {\n shippingGivenName: firstName,\n shippingSurname: lastName,\n shippingAddress: buyerAddress\n }\n };\n};\n\nexport const initBraintreePayment =\n (paymentOption, onComplete) => async (dispatch, getState) => {\n let requestOptions = {};\n\n if (\n paymentOption === PAYMENT_OPTIONS.VISA_MASTERCARD ||\n paymentOption === PAYMENT_OPTIONS.GOOGLEPAY\n ) {\n requestOptions = {\n threeDSecure: createThreeDSecureParameters(getState)\n };\n }\n\n dispatch(setCheckoutSummaryFetching(true));\n\n try {\n if (paymentInstance) {\n const data =\n await paymentInstance.requestPaymentMethod(requestOptions);\n dispatch(setPaymentMethodData(data));\n } else {\n throw { message: CHECKOUT_ERRORS.NO_PAYMENT_METHOD };\n }\n return dispatch(initPayment(onComplete));\n } catch (error) {\n return Promise.reject(error);\n }\n };\n\nexport const initPayment = (onComplete) => async (dispatch, getState) => {\n const currentState = getState();\n\n const { ongoingPaymentAttempt } = selectShippingCheckout(currentState);\n const payment = selectShippingPayment(currentState);\n const { shipmentCheckoutId, selectedPayment, paymentMethodData } = payment;\n\n dispatch(closePaymentModal());\n dispatch(setCheckoutSummaryFetching(true));\n\n try {\n const { shipmentPaymentAttemptId } = ongoingPaymentAttempt;\n const paymentAttemptId = shipmentPaymentAttemptId || utils.getUuid();\n\n if (!shipmentPaymentAttemptId) {\n const formData = {\n shipmentPaymentAttemptId: paymentAttemptId,\n shipmentCheckoutId,\n paymentMethod: selectedPayment,\n paymentMethodData\n };\n await api.initializePayment(formData);\n }\n\n //POST successful? then start polling:\n return dispatch(\n checkPaymentStatus(paymentAttemptId, selectedPayment, onComplete)\n );\n } catch (error) {\n return Promise.reject(error);\n }\n};\n\nexport const cancelPayment = async (shipmentPaymentAttemptId) => {\n const formData = {\n shipmentPaymentAttemptId\n };\n\n try {\n await api.cancelPayment(formData);\n } catch (error) {\n return Promise.reject(error);\n }\n};\n\nexport const checkPaymentStatus =\n (paymentAttemptId, paymentMethod, onComplete) =>\n async (dispatch, getState) => {\n const { modal } = selectShippingPayment(getState());\n\n let poll = true;\n\n try {\n const paymentStatus = await api.getPaymentStatus(paymentAttemptId);\n\n const { data } = paymentStatus;\n\n switch (data?.status) {\n case PAYMENT_STATUS.AUTHORIZED:\n case PAYMENT_STATUS.COMPLETING:\n case PAYMENT_STATUS.INIT:\n case PAYMENT_STATUS.INIT_COMPLETE:\n case PAYMENT_STATUS.CANCELLING:\n poll = true;\n break;\n case PAYMENT_STATUS.AWAITING_SWISH:\n poll = true;\n if (!modal.open) {\n dispatch(\n openPaymentModal({\n open: MODAL_TYPE.SWISH_HANDEL,\n paymentAttemptId\n })\n );\n }\n break;\n case PAYMENT_STATUS.SETTLED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(setCheckoutSummaryFetching(false));\n onComplete();\n break;\n case PAYMENT_STATUS.DECLINED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n return Promise.reject(new Error(CHECKOUT_ERRORS.DECLINED));\n case PAYMENT_STATUS.CANCELLED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n break;\n case PAYMENT_STATUS.COMPLETING_FAILED:\n case PAYMENT_STATUS.FAILED:\n case PAYMENT_STATUS.INIT_FAILED:\n case PAYMENT_STATUS.CANCELLING_FAILED:\n poll = false;\n dispatch(closePaymentModal());\n dispatch(resetOngoingPaymentAttempt());\n dispatch(setCheckoutSummaryFetching(false));\n return Promise.reject(\n new Error(`Payment error: ${data?.status}`)\n );\n default:\n dispatch(closePaymentModal());\n poll = false;\n }\n } catch (error) {\n poll = false;\n return Promise.reject(error);\n }\n\n if (poll) {\n await sleep(1500);\n return dispatch(\n checkPaymentStatus(paymentAttemptId, paymentMethod, onComplete)\n );\n }\n };\nexport const addShipment = async (shipment) => {\n const { purchaseOrderId, selectedShipping, buyerDetails } = shipment;\n const { shippingProvider, shippingProductId } = selectedShipping || {};\n\n const shippingPayload = buildShippingPayload(\n null,\n shippingProvider,\n shippingProductId,\n purchaseOrderId,\n {\n name: buyerDetails.name,\n city: buyerDetails.city,\n zipCode: buyerDetails.zipCode,\n street: buyerDetails.streetName\n }\n );\n\n try {\n const { data } = await api.setShipmentDetails(shippingPayload);\n const { errors } = data.responseStatus;\n\n if (!errors) {\n return data;\n }\n\n // Can happen i combined shipping when seller sets custom shipping price and changes product\n // in that case we want to let the seller choose a product from shipping selector\n if (isUnSupportedProduct(errors[0])) {\n return { error: 'shipping_validation_unsupportedProduct' };\n }\n\n const mostPreciseTranslationKey =\n resolveMostPreciseTranslationKey(errors);\n\n return { error: mostPreciseTranslationKey };\n } catch (error) {\n logError(error);\n return { error: getDefaultErrorKey() };\n }\n};\n","export const MODAL_TYPE = {\n BANK_ID: 'BANK_ID',\n SWISH_HANDEL: 'SWISH_HANDEL'\n};\n\nexport const PAYMENT_OPTIONS = {\n CARD: 'Card',\n PAYPAL: 'PayPal',\n APPLEPAY: 'ApplePay',\n GOOGLEPAY: 'GooglePay',\n SWISH_HANDEL: 'SwishHandel',\n VISA_MASTERCARD: 'VisaMasterCard',\n INVOICE: 'Invoice'\n};\n\nexport const PAYMENT_OPTION_STATUS = {\n AVAILABLE: 'Available',\n UNAVAILABLE_DUE_TO_AMOUNT: 'UnavailableDueToAmount',\n AVAILABLE_WITH_DISTURBANCE: 'AvailableWithDisturbance'\n};\n\nexport default () => ({\n shipments: [],\n isInitialized: false,\n isFetching: false,\n hasError: false,\n error: null,\n isDeleting: false,\n isUpdating: false,\n isCreating: false,\n isCreated: false,\n isCreateInitialized: false,\n ongoingPaymentAttempt: {\n shipmentPaymentAttemptId: null,\n paymentMethod: null\n },\n payment: {\n hasError: false,\n isFetching: false,\n paymentOptions: null,\n selectedPayment: null,\n paymentMethodData: null,\n modal: {\n open: ''\n }\n },\n checkoutSummary: {\n hasError: false,\n isFetching: false,\n totalCost: null,\n termsAccepted: true\n },\n itemWithoutShipment: {\n error: null,\n items: null,\n selectedShipping: null,\n buyerContactDetails: null,\n shipmentCheckoutId: null,\n isFetching: false,\n isInitialized: false\n },\n nonIntegrated: {\n open: false,\n provider: null,\n isUpdating: false,\n markedAsBooked: false,\n markedAsShipped: false,\n hasError: false\n },\n shipping: {\n shippingOptions: [],\n isShippingFetching: false,\n hasShippingError: false,\n isShippingInitialized: false\n },\n shippingConfirmation: {\n data: null,\n isInitialized: false,\n isFetching: false,\n isLongPolling: false,\n hasError: false\n },\n unbookedShipments: {\n loading: false,\n error: false,\n shipments: []\n }\n});\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport getInitialState from './initial-state';\nimport utils from './utils';\nimport {\n deleteShipment,\n createShipmentCheckout,\n getShippingOptions,\n updateShipment,\n markAsBooked,\n markAsShipped,\n getItemWithoutShipment,\n getPaymentOptions,\n createShipment,\n getShippingConfirmation,\n getUnbookedShipments\n} from './actions';\n\nconst shippingCheckoutSlice = createSlice({\n name: 'shippingCheckout',\n initialState: getInitialState(),\n reducers: {\n openNonIntegratedModal: (state, { payload }) => {\n state.nonIntegrated.providerId = payload;\n state.nonIntegrated.open = true;\n },\n closeNonIntegratedModal: (state) => {\n state.nonIntegrated.providerId = null;\n state.nonIntegrated.open = false;\n state.nonIntegrated.markedAsBooked = false;\n state.nonIntegrated.markedAsShipped = false;\n state.nonIntegrated.hasError = false;\n state.nonIntegrated.isUpdating = false;\n },\n setSelectedPayment: (state, { payload }) => {\n state.payment.selectedPayment = payload;\n state.payment.paymentMethodData = null;\n state.checkoutSummary.hasError = false;\n },\n setPaymentMethodData: (state, { payload }) => {\n state.payment.paymentMethodData = payload;\n },\n setCheckoutSummaryFetching: (state, { payload }) => {\n state.checkoutSummary.isFetching = payload;\n state.checkoutSummary.hasError = false;\n state.isUpdating = payload;\n },\n setCheckoutSummaryHasError: (state, { payload }) => {\n state.checkoutSummary.hasError = payload;\n state.checkoutSummary.isFetching = false;\n state.isUpdating = false;\n },\n openPaymentModal: (state, { payload }) => {\n const { open, paymentAttemptId } = payload;\n state.payment.modal = {\n open,\n paymentAttemptId\n };\n },\n closePaymentModal: (state) => {\n state.payment.modal = {\n open: ''\n };\n },\n setTermsAccepted: (state, { payload }) => {\n state.checkoutSummary.termsAccepted = payload;\n },\n resetOngoingPaymentAttempt: (state) => {\n state.ongoingPaymentAttempt = {\n shipmentPaymentAttemptId: null,\n paymentMethod: null\n };\n },\n setUnbookedShipments: (state, { payload }) => {\n state.unbookedShipments = {\n ...state.unbookedShipments,\n shipments: payload\n };\n }\n },\n extraReducers: (builder) => {\n // create\n builder.addCase(\n createShipmentCheckout.fulfilled,\n (state, { payload }) => {\n state.shipments = payload.shipments;\n state.payment = {\n ...state.payment,\n shipmentCheckoutId: payload.shipmentCheckoutId\n };\n state.sellerPhoneNumber = payload.sellerPhone;\n state.ongoingPaymentAttempt = {\n ...state.ongoingPaymentAttempt,\n ...payload.ongoingPaymentAttempt\n };\n\n state.isFetching = false;\n state.hasFetchError = false;\n\n const totalShippingCost = payload.shipments.reduce(\n (memo, item) => memo + item.shippingPrice,\n 0\n );\n\n state.checkoutSummary.totalCost = totalShippingCost;\n }\n );\n builder.addCase(createShipmentCheckout.pending, (state) => {\n state.isInitialized = true;\n state.isFetching = true;\n state.hasFetchError = false;\n });\n builder.addCase(createShipmentCheckout.rejected, (state) => {\n state.isFetching = false;\n state.hasFetchError = true;\n });\n\n // delete\n builder.addCase(deleteShipment.fulfilled, (state, { payload }) => {\n const { shipmentCheckoutId, shipmentId } = payload;\n\n state.payment = {\n ...state.payment,\n shipmentCheckoutId: shipmentCheckoutId\n };\n state.shipments = state.shipments.filter(\n (shipment) => shipment.shipmentId !== shipmentId\n );\n state.hasDeleteError = false;\n state.isDeleting = false;\n\n const totalShippingCost = state.shipments.reduce(\n (memo, item) => memo + item.shippingPrice,\n 0\n );\n\n state.checkoutSummary.totalCost = totalShippingCost;\n });\n builder.addCase(deleteShipment.pending, (state) => {\n state.hasDeleteError = false;\n state.isDeleting = true;\n });\n builder.addCase(deleteShipment.rejected, (state) => {\n state.hasDeleteError = true;\n state.isDeleting = false;\n });\n\n // update\n builder.addCase(\n updateShipment.fulfilled,\n (state, { meta, payload }) => {\n const { arg } = meta;\n const { streetName, ...cleanedBuyerAddress } = arg.buyerAddress;\n state.shipments = state.shipments.map((shipment) =>\n shipment.shipmentId === arg.shipmentId\n ? {\n ...shipment,\n receiver: {\n ...shipment.receiver,\n ...cleanedBuyerAddress,\n street: arg.buyerAddress.streetName\n },\n mostPreciseErrorKey: null,\n isUpdatingShipment: false\n }\n : shipment\n );\n\n state.createdShipmentCheckoutId = payload.shipmentCheckoutId;\n state.error = null;\n state.isUpdating = false;\n }\n );\n builder.addCase(updateShipment.pending, (state, { meta }) => {\n const { arg } = meta;\n state.shipments = state.shipments.map((shipment) =>\n shipment.shipmentId === arg.shipmentId\n ? {\n ...shipment,\n isUpdatingShipment: true,\n mostPreciseErrorKey: null\n }\n : shipment\n );\n\n state.isUpdating = true;\n });\n builder.addCase(updateShipment.rejected, (state, { meta, payload }) => {\n const { arg } = meta;\n state.shipments = state.shipments.map((shipment) =>\n shipment.shipmentId === arg.shipmentId\n ? {\n ...shipment,\n isUpdatingShipment: false,\n mostPreciseErrorKey: payload.mostPreciseErrorKey\n }\n : shipment\n );\n\n state.error = {\n translationKey: payload.mostPreciseErrorKey\n };\n state.isUpdating = false;\n });\n\n // create shipment\n builder.addCase(\n createShipment.fulfilled,\n (state, { meta, payload }) => {\n const { arg } = meta;\n\n const { selectedShipping } = state.itemWithoutShipment;\n state.itemWithoutShipment = {\n ...state.itemWithoutShipment,\n selectedShipping: {\n providerId:\n arg.providerId || selectedShipping.providerId,\n productId: arg.productId || selectedShipping.productId\n }\n };\n\n state.createdShipmentCheckoutId = payload.shipmentCheckoutId;\n state.error = null;\n state.isCreating = false;\n state.isCreated = true;\n }\n );\n\n builder.addCase(createShipment.pending, (state) => {\n state.isCreating = true;\n state.isCreateInitialized = true;\n });\n\n builder.addCase(createShipment.rejected, (state, { meta, payload }) => {\n const { arg } = meta;\n\n const { selectedShipping } = state.itemWithoutShipment;\n state.itemWithoutShipment = {\n ...state.itemWithoutShipment,\n selectedShipping: {\n providerId: arg.providerId || selectedShipping?.providerId,\n productId: arg.productId || selectedShipping?.productId\n }\n };\n\n state.error = {\n translationKey: payload?.mostPreciseErrorKey,\n hasUnSupportedProduct: payload?.hasUnSupportedProduct\n };\n state.isCreating = false;\n });\n\n // get shipping info\n builder.addCase(\n getItemWithoutShipment.fulfilled,\n (state, { payload }) => {\n state.itemWithoutShipment = {\n ...payload,\n isInitialized: true,\n isFetching: false,\n error: null\n };\n }\n );\n builder.addCase(getItemWithoutShipment.pending, (state) => {\n state.itemWithoutShipment = {\n isInitialized: true,\n isFetching: true,\n error: null\n };\n });\n builder.addCase(\n getItemWithoutShipment.rejected,\n (state, { payload }) => {\n state.itemWithoutShipment = {\n isInitialized: true,\n isFetching: false,\n shipmentCheckoutId: payload.shipmentCheckoutId,\n error: {\n errorCode: payload?.errorCode\n }\n };\n }\n );\n\n // get shipping options\n builder.addCase(getShippingOptions.fulfilled, (state, { payload }) => {\n const {\n data,\n bringEnabled,\n postnordEnabled,\n dhlEnabled,\n schenkerEnabled\n } = payload;\n //Decorate products with cost & uuid for shipping dialog:\n const productsDecorated = data.productsPerWeightSpan.map(\n (weightClass) => {\n const productsWithDecoration = weightClass.products.map(\n (product) => {\n let outage = false;\n switch (product.providerId) {\n case 'BringDenmark':\n outage = !bringEnabled;\n break;\n case 'PostNordParcel':\n outage = !postnordEnabled;\n break;\n case 'SchenkerPrivpak':\n outage = !schenkerEnabled;\n break;\n case 'DHL':\n outage = !dhlEnabled;\n break;\n default:\n outage = false;\n break;\n }\n\n return {\n ...product,\n productId: product.id,\n cost: product.price,\n uuid: utils.getUuid(),\n outage: outage\n };\n }\n );\n\n const filteredProductsWithDecoration =\n productsWithDecoration.filter(\n (shippingProvider) =>\n shippingProvider.providerId !==\n 'BringDenmark' || bringEnabled\n );\n return {\n ...weightClass,\n products: filteredProductsWithDecoration\n };\n }\n );\n state.shipping.shippingOptions = productsDecorated;\n\n state.shipping.isShippingFetching = false;\n state.shipping.hasShippingError = false;\n });\n builder.addCase(getShippingOptions.pending, (state) => {\n state.shipping.isShippingFetching = true;\n state.shipping.hasShippingError = false;\n state.shipping.isShippingInitialized = true;\n });\n builder.addCase(getShippingOptions.rejected, (state) => {\n state.shipping.isShippingFetching = false;\n state.shipping.hasShippingError = true;\n });\n\n // mark as booked\n builder.addCase(markAsBooked.fulfilled, (state) => {\n state.nonIntegrated.markedAsBooked = true;\n state.nonIntegrated.hasError = false;\n state.nonIntegrated.isUpdating = false;\n });\n builder.addCase(markAsBooked.pending, (state) => {\n state.nonIntegrated.markedAsBooked = true;\n state.nonIntegrated.hasError = false;\n state.nonIntegrated.isUpdating = true;\n });\n builder.addCase(markAsBooked.rejected, (state) => {\n state.nonIntegrated.markedAsBooked = false;\n state.nonIntegrated.hasError = true;\n state.nonIntegrated.isUpdating = false;\n });\n\n // mark as shipped\n builder.addCase(markAsShipped.fulfilled, (state) => {\n state.nonIntegrated.markedAsShipped = true;\n state.nonIntegrated.hasError = false;\n state.nonIntegrated.isUpdating = false;\n });\n builder.addCase(markAsShipped.pending, (state) => {\n state.nonIntegrated.markedAsShipped = true;\n state.nonIntegrated.hasError = false;\n state.nonIntegrated.isUpdating = true;\n });\n builder.addCase(markAsShipped.rejected, (state) => {\n state.nonIntegrated.markedAsShipped = false;\n state.nonIntegrated.hasError = true;\n state.nonIntegrated.isUpdating = false;\n });\n\n // get payment options\n builder.addCase(getPaymentOptions.fulfilled, (state, { payload }) => {\n const { paymentOptions } = payload;\n state.payment = {\n ...state.payment,\n paymentOptions: paymentOptions\n };\n });\n builder.addCase(getPaymentOptions.pending, (state) => {\n state.payment = {\n ...state.payment,\n isFetching: true,\n hasError: null\n };\n });\n builder.addCase(getPaymentOptions.rejected, (state) => {\n state.payment = {\n ...state.payment,\n isFetching: false,\n hasError: true\n };\n });\n // Get shipping confirmation\n builder.addCase(\n getShippingConfirmation.fulfilled,\n (state, { payload }) => {\n state.shippingConfirmation.data = payload;\n state.shippingConfirmation.isFetching = false;\n state.shippingConfirmation.hasError = false;\n }\n );\n builder.addCase(getShippingConfirmation.pending, (state) => {\n state.shippingConfirmation.isInitialized = true;\n state.shippingConfirmation.isFetching = true;\n state.shippingConfirmation.hasError = false;\n });\n builder.addCase(\n getShippingConfirmation.rejected,\n (state, { payload }) => {\n state.shippingConfirmation.isFetching = false;\n\n if (payload.isLongPolling) {\n state.shippingConfirmation.isLongPolling =\n payload.isLongPolling;\n } else {\n state.shippingConfirmation.hasError = true;\n }\n }\n );\n // get unbooked shipments\n builder.addCase(\n getUnbookedShipments.fulfilled,\n (state, { payload }) => {\n const { unbookedShipments } = payload;\n state.unbookedShipments = {\n ...state.unbookedShipments,\n shipments: unbookedShipments,\n loading: false,\n error: false\n };\n }\n );\n builder.addCase(getUnbookedShipments.pending, (state) => {\n state.unbookedShipments = {\n ...state.unbookedShipments,\n loading: true,\n error: false\n };\n });\n builder.addCase(getUnbookedShipments.rejected, (state) => {\n state.unbookedShipments = {\n ...state.unbookedShipments,\n loading: false,\n error: true\n };\n });\n }\n});\n\nexport const {\n openNonIntegratedModal,\n closeNonIntegratedModal,\n setSelectedPayment,\n setPaymentMethodData,\n setCheckoutSummaryFetching,\n setCheckoutSummaryHasError,\n openPaymentModal,\n closePaymentModal,\n setTermsAccepted,\n resetOngoingPaymentAttempt,\n setUnbookedShipments\n} = shippingCheckoutSlice.actions;\n\nexport default shippingCheckoutSlice.reducer;\n","export const selectShippingConfirmation = (state) =>\n state.views.shippingCheckout.shippingConfirmation;\n\nexport const selectShippingCheckout = (state) => state.views.shippingCheckout;\n\nexport const selectShipping = (state) => state.views.shippingCheckout.shipping;\n\nexport const selectItemWithoutShipment = (state) =>\n state.views.shippingCheckout.itemWithoutShipment;\n\nexport const selectShipment = (state, shipmentId) =>\n state.views.shippingCheckout?.shipments?.find(\n (shipment) => shipment.shipmentId === shipmentId\n );\n\nexport const selectShippingPayment = (state) =>\n state.views.shippingCheckout.payment;\n\nexport const selectCheckoutSummary = (state) =>\n state.views.shippingCheckout.checkoutSummary;\n\nexport const selectSellerPhoneNumber = (state) =>\n state.views.shippingCheckout.sellerPhoneNumber;\n\nexport const selectUnbookedShipments = (state) =>\n state.views.shippingCheckout.unbookedShipments;\n","import {\n selectAutomaticTranslationPreferred,\n selectPreferredLanguageCode\n} from 'tradera/state/language/selectors';\nimport { getTraderaShopProductData } from './api';\nimport { logger } from 'packages/logger';\nimport { fetchDescription, getItemsFromSeller } from '../view-item/api';\nimport {\n beginLoadingTranslatedDescription,\n failedLoadingTranslatedDescription,\n setCurrentDescriptionLanguageCodeIso2,\n setIsLoading,\n setItemDetails,\n setProduct,\n setSellerItems,\n setTranslatedDescription,\n setTranslationOnDemandDisabled\n} from './reducer';\nimport { translatedDescriptionStates } from '../view-item/reducer';\nimport {\n selectTranslatedDescription,\n selectTranslatedDescriptionState\n} from './selectors';\nimport { selectShippingRegionCountryCodeIso2 } from 'tradera/state/shipping-region/selectors';\nimport { isSwedenCountryCodeOrUndefined } from 'tradera/localization/countrycode';\nimport { areLanguageCodesIso2Equal } from 'tradera/localization/languagecode';\nimport { selectIsFeatureEnabled } from 'tradera/state/environment/selectors';\nimport { wishlist } from 'tradera/state/items/reducer';\n\nexport const fetchTraderaShopProductData =\n (urlSlug) => async (dispatch, getState) => {\n const preferredLanguageCode = selectPreferredLanguageCode(getState());\n dispatch(setIsLoading(true));\n try {\n const traderaShopProduct = await getTraderaShopProductData(\n urlSlug,\n preferredLanguageCode\n );\n dispatch(handleTraderaShopProduct(traderaShopProduct));\n dispatch(setIsLoading(false));\n } catch (error) {\n const status = error.response && error.response.status;\n if (status === 404) {\n // Handle server side.\n window.location.reload();\n } else {\n logger(error);\n }\n }\n };\n\nexport const handleTraderaShopProduct = (traderaShopProduct) => (dispatch) => {\n const { product, item } = traderaShopProduct;\n dispatch(setProduct(product));\n dispatch(setItemDetails(item.itemDetails));\n dispatch(setTranslation(item));\n if (item.itemDetails.inWishList) {\n dispatch(wishlist({ itemId: item.itemDetails.itemId, exists: true }));\n }\n};\n\nconst setTranslation = (itemModel) => (dispatch, getState) => {\n const state = getState();\n const shippingRegion = selectShippingRegionCountryCodeIso2(state);\n const preferredLanguageCodeIso2 = selectPreferredLanguageCode(state);\n const disabledForEnglishLangSwedes =\n isSwedenCountryCodeOrUndefined(shippingRegion) &&\n areLanguageCodesIso2Equal(preferredLanguageCodeIso2, 'en');\n const automaticTranslationPreferred =\n selectAutomaticTranslationPreferred(state);\n const descriptionLanguageCodeIso2 =\n itemModel.itemDetails.descriptionLanguageCodeIso2;\n const shouldTranslateDescriptionOnLoad =\n automaticTranslationPreferred &&\n preferredLanguageCodeIso2 !== descriptionLanguageCodeIso2 &&\n !disabledForEnglishLangSwedes;\n dispatch(\n setCurrentDescriptionLanguageCodeIso2(\n shouldTranslateDescriptionOnLoad\n ? preferredLanguageCodeIso2\n : descriptionLanguageCodeIso2\n )\n );\n};\n\nexport const loadTranslatedDescription =\n (itemId, languageCodeIso2, descriptionLanguageCodeIso2) =>\n async (dispatch, getState) => {\n const isOnDemandItemDescriptionTranslation = selectIsFeatureEnabled(\n 'on-demand-item-description-translation'\n )(getState());\n\n if (!languageCodeIso2 || !isOnDemandItemDescriptionTranslation) {\n return;\n }\n\n if (\n languageCodeIso2.toLowerCase() ===\n descriptionLanguageCodeIso2.toLowerCase()\n ) {\n return;\n }\n\n if (\n selectTranslatedDescriptionState(getState()) ===\n translatedDescriptionStates.LOADING ||\n selectTranslatedDescription(getState())?.languageCodeIso2 ===\n languageCodeIso2\n ) {\n return;\n }\n\n dispatch(beginLoadingTranslatedDescription());\n\n try {\n const result = await fetchDescription(itemId, languageCodeIso2);\n if (result.data.translations.isTranslationOnDemandDisabled) {\n dispatch(setTranslationOnDemandDisabled());\n return;\n }\n\n dispatch(\n setTranslatedDescription({\n title: result.data.translations.title,\n description: result.data.translations.description,\n additionalDescriptions:\n result.data.translations.additionalDescriptions,\n languageCodeIso2: result.data.translations.languageCodeIso2,\n providerName: 'Google Translate',\n shippingTerms: result.data.translations.shippingTerms\n })\n );\n } catch (e) {\n dispatch(failedLoadingTranslatedDescription());\n }\n };\n\nexport const fetchItemsFromSeller =\n ({ sellerMemberId, size }) =>\n async (dispatch, getState) => {\n try {\n const preferredLanguageCode =\n selectPreferredLanguageCode(getState());\n const params = {\n sellerMemberId,\n size,\n searchResultLanguageCodeIso2: preferredLanguageCode\n };\n const result = await getItemsFromSeller(\n params,\n preferredLanguageCode\n );\n const { items, itemsMatched } = result.data.result;\n dispatch(setSellerItems({ items, itemsMatched }));\n } catch (e) {\n dispatch(setSellerItems(null));\n }\n };\n","import {\n axiosWithTokenRefresh,\n finalizeResponse,\n handleError,\n API_ERRORS\n} from 'tradera/utils/api';\nimport { toLocalizedUrl } from 'tradera/utils/url';\n\nexport const getTraderaShopProductData = async (id, preferredLanguageCode) => {\n return axiosWithTokenRefresh()\n .get(toLocalizedUrl(`/tradera-shop/${id}.json`, preferredLanguageCode))\n .then(finalizeResponse())\n .then((response) => response.data)\n .catch(\n handleError({\n // Ignore 400 & 401 errors that slip through token refresh\n 400: API_ERRORS.IGNORE_ME,\n 401: API_ERRORS.IGNORE_ME\n })\n );\n};\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { ItemDetails } from '../view-item/reducer';\nimport {\n mapItemDetails,\n translatedDescriptionStates\n} from '../view-item/reducer';\n\ntype TraderaShopSlice = {\n product: TraderaShopProduct;\n itemDetails: ItemDetails;\n isLoading: boolean;\n sellerItems?: [];\n translatedDescription: object | null;\n translatedDescriptionState: string | null;\n currentDescriptionLanguageCodeIso2: string | null;\n};\n\nexport type TraderaShopProduct = {\n urlSlug: string;\n title: string;\n productName: string;\n itemSelectionHeader: string;\n items: TraderaShopProductItem[];\n shippingInfo: string;\n};\n\nexport type TraderaShopProductItem = {\n title: string;\n itemId: number;\n fixedPrice: number;\n};\n\nconst traderaShopSlice = createSlice({\n name: 'traderaShop',\n initialState: {} as Partial,\n reducers: {\n setIsLoading: (state, { payload }) => {\n state.isLoading = payload;\n },\n setItemDetails: (state, { payload }) => {\n state.itemDetails = mapItemDetails(payload);\n },\n setProduct: (state, { payload }) => {\n state.product = payload;\n },\n setSellerItems: (state, { payload }) => {\n state.sellerItems = payload;\n },\n setCurrentDescriptionLanguageCodeIso2: (state, { payload }) => {\n state.currentDescriptionLanguageCodeIso2 = payload;\n },\n setTranslationOnDemandDisabled: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.TRANSLATION_ON_DEMAND_DISABLED;\n },\n setTranslatedDescription: (state, { payload }) => {\n state.translatedDescription = payload;\n state.translatedDescriptionState =\n translatedDescriptionStates.DEFAULT;\n },\n resetTranslatedDescription: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.DEFAULT;\n },\n beginLoadingTranslatedDescription: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.LOADING;\n },\n failedLoadingTranslatedDescription: (state) => {\n state.translatedDescriptionState =\n translatedDescriptionStates.SERVER_ERROR;\n }\n }\n});\n\nexport default traderaShopSlice.reducer;\n\nexport const {\n setIsLoading,\n setItemDetails,\n setProduct,\n setSellerItems,\n setCurrentDescriptionLanguageCodeIso2,\n setTranslationOnDemandDisabled,\n setTranslatedDescription,\n resetTranslatedDescription,\n beginLoadingTranslatedDescription,\n failedLoadingTranslatedDescription\n} = traderaShopSlice.actions;\n","import type { RootState } from 'tradera/state/configure-store';\n\nexport const selectTraderaShop = (state: RootState) => state.views.traderaShop;\n\nexport const selectTranslatedDescriptionState = (state: RootState) =>\n selectTraderaShop(state).translatedDescriptionState;\n\nexport const selectTranslatedDescription = (state: RootState) =>\n selectTraderaShop(state).translatedDescription || null;\n\nexport const selectCurrentDescriptionLanguageCodeIso2 = (state: RootState) =>\n selectTraderaShop(state).currentDescriptionLanguageCodeIso2 || null;\n","import {\n axiosWithTokenRefresh,\n axiosConfigs,\n API_ERRORS\n} from 'tradera/utils/api';\nimport { toLocalizedUrl } from 'tradera/utils/url';\nimport { logger } from 'packages/logger';\nimport { webApiClient } from 'tradera/utils/http';\nimport type { GetItemDescriptionApiResponse } from 'tradera/state/services/types/webapi-browse-generated';\nimport type {\n MoreFromSellerApiRequest,\n MoreFromSellerApiResponse,\n MoreItemsForCombinedShippingApiResponse,\n MoreItemsForCombinedShippingRequest\n} from 'tradera/state/services/types/webapi-discover-generated';\n\nexport const fetchDescription = (itemId: number, languageCodeIso2: string) => {\n return webApiClient.get(\n `/browse/item/${itemId}/description/?languageCodeIso2=${languageCodeIso2}`,\n {\n cancelTokenId: 'getItemDescriptionTranslated',\n ...axiosConfigs.authenticated\n }\n );\n};\n\ntype ValidationResult = {\n code: string;\n title: string;\n body: string;\n};\n\ntype PlaceBidApiResponse = {\n bid: {\n bidId: number;\n hasLostLeadingBid: boolean;\n isSuccessful: boolean;\n leadingBidAmount: number;\n leadingBidderMemberId: number;\n leadingMemberAlias: string;\n nextBidAmount: number;\n validationResult: ValidationResult;\n placedBid: number;\n };\n item: {\n itemId: number;\n bidCount: number | null;\n categoryId: number;\n endDate: string;\n itemType: string;\n openingBid: number | null;\n reservePriceReached: boolean;\n sellermemberId: number;\n startDate: string;\n leadingBid: number;\n };\n transactionTotal: number;\n potentialBidChange: number;\n isMaxBid: boolean;\n serverSecondsLeft: number;\n};\n\n/**\n * Places a bid for the given auction\n */\nexport const placeBidApi = async (\n itemId: number,\n amount: number,\n onLoggedOut: () => void,\n preferredLanguageCode: string,\n gaTrackingSessionId: string\n) => {\n try {\n const response =\n await axiosWithTokenRefresh().post(\n toLocalizedUrl(\n `/item/place-bid/${itemId}`,\n preferredLanguageCode\n ),\n { amount, gaTrackingSessionId },\n axiosConfigs.authenticated\n );\n const {\n data: {\n bid,\n item,\n transactionTotal,\n potentialBidChange,\n isMaxBid,\n serverSecondsLeft\n }\n } = response;\n\n const {\n bidId,\n hasLostLeadingBid,\n isSuccessful,\n leadingBidAmount,\n leadingBidderMemberId,\n leadingMemberAlias: leadingBidMemberAlias,\n nextBidAmount: nextValidBidAmount,\n validationResult,\n placedBid\n } = bid;\n\n const {\n bidCount,\n categoryId,\n endDate,\n itemType,\n openingBid,\n reservePriceReached,\n sellermemberId: sellerMemberId,\n startDate\n } = item;\n\n return {\n isSuccessful,\n validationResult,\n item: {\n bidCount,\n categoryId,\n endDate,\n itemId: item.itemId,\n itemType,\n openingBid,\n reservePriceReached,\n sellerMemberId,\n startDate,\n leadingBid: item.leadingBid\n },\n bidInfo: {\n bidCount,\n bidId,\n hasLostLeadingBid,\n isMaxBid,\n leadingBidAmount,\n leadingBidderMemberId,\n leadingBidMemberAlias,\n nextValidBidAmount,\n potentialBidChange,\n reservePriceReached,\n transactionTotal\n },\n myMaxBidAmount: placedBid,\n serverSecondsLeft\n };\n } catch (error) {\n if (error instanceof Error && error.message === API_ERRORS.LOGGED_OUT) {\n onLoggedOut();\n return;\n }\n\n logger(error);\n }\n};\n\nexport const getItemsFromSeller = (\n params: MoreFromSellerApiRequest,\n preferredLanguageCode: string\n) => {\n return webApiClient.get(\n toLocalizedUrl('/discover/more-from-seller/', preferredLanguageCode),\n { params }\n );\n};\n\nexport const getCombinedShippingUpsell = (\n params: MoreItemsForCombinedShippingRequest\n) => {\n return webApiClient.get(\n '/discover/web/more-items/for-combined-shipping',\n { params }\n );\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { type PayloadAction, createSlice } from '@reduxjs/toolkit';\nimport dayjs from 'dayjs';\nimport { type ITEM_STATES, VIEW_ITEM_STATES } from './constants';\nimport TRANSACTION_TYPES from 'tradera/constants/transaction-types';\nimport { placeBidApi } from './api';\nimport { logger } from 'packages/logger';\nimport * as analytics from '../../../apps/tradera/components/vip/helpers/analytics';\nimport * as itemActions from '../../items/actions';\nimport { assertNoUndefinedProperties } from 'tradera/utils/assert';\nimport {\n selectAutomaticTranslationPreferred,\n selectPreferredLanguageCode\n} from 'tradera/state/language/selectors';\nimport {\n selectBidInfo,\n selectItemId,\n selectItemDetails,\n selectBreadcrumbs,\n selectViewItem\n} from './selectors';\nimport { GtmService as gtm } from 'tradera/services/google-tagmanager/google-tagmanager-service';\nimport { getItemState } from './item-state-helper';\nimport { BID_VALIDATION_RESULTS } from 'tradera/apps/tradera/components/vip/api/vip-api-constants';\nimport { selectExistsInWishList } from 'tradera/state/items/selectors';\nimport { selectShippingRegionCountryCodeIso2 } from 'tradera/state/shipping-region/selectors';\nimport { isSwedenCountryCodeOrUndefined } from 'tradera/localization/countrycode';\nimport { areLanguageCodesIso2Equal } from 'tradera/localization/languagecode';\nimport type {\n ItemBidInfoViewModel,\n ItemCategoryViewModel,\n ItemDetailsViewModel,\n ItemPageModel,\n ItemPurchaseViewModel,\n ItemTranslationsViewModel,\n PaymentApiDto\n} from 'tradera/state/services/types/webapi-browse-generated';\nimport type { AppDispatch, GetState } from 'tradera/state/configure-store';\nimport type ITEM_TYPES from 'tradera/constants/item-types';\nimport type {\n ItemCardViewModel,\n SearchResultItem2ApiDto\n} from 'tradera/state/services/types/webapi-discover-generated';\nimport { DEFAULT_LANGUAGE } from 'tradera/lang/constants.mjs';\nimport { wishlist } from 'tradera/state/items/reducer';\nimport { SOURCE_SCREEN } from 'tradera/services/google-tagmanager/constants';\n\ntype PlaceBidResponse = {\n info?: string | null;\n isSuccessful: boolean | null;\n validationResult: {\n code: BID_VALIDATION_RESULTS;\n } | null;\n error: unknown | null;\n};\n\nconst initialPlaceBidResponse: PlaceBidResponse = {\n info: null,\n isSuccessful: null,\n validationResult: null,\n error: null\n};\n\nexport enum translatedDescriptionStates {\n DEFAULT = 'DEFAULT',\n LOADING = 'LOADING',\n SERVER_ERROR = 'SERVER_ERROR',\n TRANSLATION_ON_DEMAND_DISABLED = 'TRANSLATION_ON_DEMAND_DISABLED'\n}\n\ntype ItemTranslations = ItemTranslationsViewModel & {\n providerName: string;\n};\n\nexport type ItemDetails = Omit & {\n images?: {\n thumbnail?: string | null;\n multiThumbnail?: string | null;\n medium?: string | null;\n normal?: string | null;\n smallFit?: string | null;\n mediumFit?: string | null;\n largeFit?: string | null;\n video?: string | null;\n }[];\n};\n\ntype Breadcrumbs = {\n id: number;\n url?: string | null;\n name?: string | null;\n categoryId: number;\n};\n\ntype BidInfo = Omit & {\n bidId?: number | null;\n bidCount: number | null;\n hasLeadingBid?: boolean;\n};\n\ntype BidToasterData = {\n leadingBidMemberAlias?: string;\n placeBidValidationCode?: string;\n leadingBidAmount?: number;\n nextValidBidAmount?: number;\n myMaxBidAmount?: number;\n};\n\nexport type SellerItems = {\n items: ItemCardViewModel[];\n itemsMatched: number;\n};\n\nexport type ViewItemState = {\n bidInfo: BidInfo | null;\n bidToasterData: BidToasterData | null;\n breadCrumbs: Breadcrumbs[];\n categoryItems: ItemCardViewModel[];\n combinedShippingItems:\n | SearchResultItem2ApiDto[]\n | ItemCardViewModel[]\n | null;\n currentDescriptionLanguageCodeIso2: string | null;\n isBidding: boolean;\n itemDetails: ItemDetails;\n itemState: ITEM_STATES | null;\n myMaxBidAmount: number | null;\n placeBidResponse: PlaceBidResponse;\n purchaseInfo: ItemPurchaseViewModel | null;\n sellerItems: SellerItems | null;\n serverSecondsLeft: number | null;\n shopItems: ItemCardViewModel[];\n translatedDescription: ItemTranslations | null;\n translatedDescriptionState: translatedDescriptionStates;\n viewItemState: VIEW_ITEM_STATES | null;\n isWishlistPending: boolean;\n payment?: PaymentApiDto | null;\n};\n\nexport const initialState: ViewItemState = {\n bidInfo: null,\n bidToasterData: null,\n breadCrumbs: [],\n isBidding: false,\n itemDetails: {} as ItemDetails,\n categoryItems: [],\n shopItems: [],\n sellerItems: null,\n combinedShippingItems: null,\n itemState: null,\n viewItemState: null,\n myMaxBidAmount: null,\n placeBidResponse: initialPlaceBidResponse,\n purchaseInfo: null,\n serverSecondsLeft: null,\n translatedDescription: null,\n translatedDescriptionState: translatedDescriptionStates.DEFAULT,\n currentDescriptionLanguageCodeIso2: null,\n isWishlistPending: false,\n payment: null\n};\n\nconst viewItemSlice = createSlice({\n name: 'viewItem',\n initialState,\n reducers: {\n resetPlaceBidResponse: (state) => {\n state.placeBidResponse = initialPlaceBidResponse;\n },\n resetInitialState: () => {\n return initialState;\n },\n setShowBiddingToaster: (\n state,\n action: PayloadAction\n ) => {\n state.bidToasterData = action.payload;\n },\n setIsRestricted: (state, { payload }) => {\n state.itemDetails.isRestricted = payload;\n },\n setIsInternationalWacko: (state, action: PayloadAction) => {\n if (!state.itemDetails.wackoInfo) {\n throw new Error('wackoInfo is null');\n }\n\n state.itemDetails.wackoInfo.isInternationalWacko = action.payload;\n },\n setItemDetails: (\n state,\n action: PayloadAction\n ) => {\n state.itemDetails = mapItemDetails(action.payload);\n },\n setPayment: (state, action: PayloadAction) => {\n state.payment = action.payload;\n },\n setPurchaseInfo: (\n state,\n action: PayloadAction\n ) => {\n state.purchaseInfo = action.payload;\n },\n setBreadCrumbs: (\n state,\n action: PayloadAction\n ) => {\n state.breadCrumbs = action.payload.map(\n ({ id, href, text }, index) => ({\n id: index,\n url: href,\n name: text,\n categoryId: id\n })\n );\n },\n setIsBidding: (state, action: PayloadAction) => {\n state.isBidding = action.payload;\n },\n setPlaceBidResponse: (\n state,\n action: PayloadAction\n ) => {\n const { payload } = action;\n state.placeBidResponse.isSuccessful = payload.isSuccessful;\n state.placeBidResponse.validationResult = payload.validationResult;\n state.placeBidResponse.error = payload.error;\n },\n setBidInfo: (\n state,\n action: PayloadAction<{\n bidInfo: BidInfo;\n itemId: number;\n memberId: number;\n }>\n ) => {\n const { bidInfo, itemId, memberId } = action.payload;\n // Ensure bid is for current item.\n if (state.itemDetails?.itemId !== itemId) {\n logger(new Error(`setBidInfo was not for current item`), {\n contexts: {\n items: {\n currentItemId: state.itemDetails?.itemId,\n bidInfoItemId: itemId\n }\n }\n });\n return;\n }\n\n // Ensure incoming data is for latest bid. It is possible to get stale data in\n // the response from place bid due to eventual consistency. When that happens\n // we should have received the latest bid before via web socket. For items where\n // web socket updates are not enabled (too long time left of auction) the effect\n // is considered acceptable. Just make sure to not overwrite newer data here.\n const isFirstBidInfo = !state.bidInfo;\n const isBinPurchase =\n bidInfo.transactionType === TRANSACTION_TYPES.BIN;\n const isLatestBid =\n isFirstBidInfo ||\n isBinPurchase ||\n (state.bidInfo?.bidId ?? 0) <= (bidInfo.bidId ?? 0);\n if (!isLatestBid) return;\n\n const bidStatus = getLeadingBidStatus(\n bidInfo,\n memberId,\n state.bidInfo\n );\n\n const existingBidCount = state.bidInfo?.bidCount || 0;\n const incomingBidCount = bidInfo.bidCount || 0;\n const newBidInfo = {\n bidId: bidInfo.bidId || 0,\n leadingBidAmount: bidInfo.leadingBidAmount || 0,\n leadingBidderMemberId: bidInfo.leadingBidderMemberId || null,\n leadingBidMemberAlias: bidInfo.leadingBidMemberAlias || null,\n nextValidBidAmount: bidInfo.nextValidBidAmount,\n transactionType: state.bidInfo?.transactionType\n ? state.bidInfo.transactionType\n : bidInfo.transactionType || null,\n\n // Never update with a lower bidCount. Can happen if place-bid-response comes before WebSocket event.\n bidCount:\n incomingBidCount > existingBidCount\n ? incomingBidCount\n : existingBidCount,\n\n // Never reset if reservePriceReached was true. Can happen if place-bid-response comes before WebSocket event.\n reservePriceReached:\n state.bidInfo?.reservePriceReached ||\n bidInfo.reservePriceReached ||\n false\n };\n\n assertNoUndefinedProperties(newBidInfo);\n\n state.bidInfo = { ...newBidInfo, ...bidStatus };\n },\n setMyMaxBidAmount: (state, action: PayloadAction) => {\n state.myMaxBidAmount = action.payload;\n },\n setItemState: (state, action: PayloadAction) => {\n state.itemState = action.payload;\n },\n setViewItemState: (state, action: PayloadAction) => {\n state.viewItemState = action.payload;\n },\n setServerSecondsLeft: (state, action: PayloadAction) => {\n state.serverSecondsLeft = action.payload;\n },\n setTranslatedDescription: (\n state,\n action: PayloadAction\n ) => {\n state.translatedDescription = action.payload;\n state.translatedDescriptionState =\n translatedDescriptionStates.DEFAULT;\n },\n setCurrentDescriptionLanguageCodeIso2: (\n state,\n action: PayloadAction\n ) => {\n state.currentDescriptionLanguageCodeIso2 = action.payload;\n },\n setTranslationOnDemandDisabled: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.TRANSLATION_ON_DEMAND_DISABLED;\n },\n resetTranslatedDescription: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.DEFAULT;\n },\n beginLoadingTranslatedDescription: (state) => {\n state.translatedDescription = null;\n state.translatedDescriptionState =\n translatedDescriptionStates.LOADING;\n },\n failedLoadingTranslatedDescription: (state) => {\n state.translatedDescriptionState =\n translatedDescriptionStates.SERVER_ERROR;\n },\n setSellerItems: (state, action: PayloadAction) => {\n state.sellerItems = action.payload;\n },\n setCategoryItems: (\n state,\n action: PayloadAction\n ) => {\n state.categoryItems = action.payload;\n },\n setShopItems: (state, action: PayloadAction) => {\n state.shopItems = action.payload;\n },\n setCombinedShippingItems: (\n state,\n action: PayloadAction<\n SearchResultItem2ApiDto[] | ItemCardViewModel[]\n >\n ) => {\n state.combinedShippingItems = action.payload;\n },\n setIsWishlistPending: (state, action: PayloadAction) => {\n state.isWishlistPending = action.payload;\n },\n setPaymentAmountForBid: (\n state,\n action: PayloadAction\n ) => {\n if (state.itemDetails.paymentCalculations) {\n state.itemDetails.paymentCalculations.paymentAmountForBid =\n action.payload;\n }\n }\n }\n});\n\nexport default viewItemSlice.reducer;\n\nexport const mapItemDetails = (\n itemDetails: ItemDetailsViewModel\n): ItemDetails => ({\n ...itemDetails,\n descriptionLanguageCodeIso2:\n itemDetails.descriptionLanguageCodeIso2?.toLowerCase(),\n images: itemDetails.images?.map((img) => ({\n thumbnail: img.thumbnail,\n multiThumbnail: img.thumbnail,\n medium: img.small,\n normal: img.normal,\n smallFit: img.smallFit,\n mediumFit: img.mediumFit,\n largeFit: img.largeFit,\n video: img.video || null\n }))\n});\n\nexport const handleItemModel =\n (itemModel: ItemPageModel, memberId: number) =>\n (dispatch: AppDispatch, getState: GetState) => {\n if (!itemModel.itemDetails) throw new Error('itemDetails is missing');\n\n const previousItemId = selectItemId(getState());\n dispatch(viewItemSlice.actions.setItemDetails(itemModel.itemDetails));\n dispatch(setTranslation(itemModel));\n\n dispatch(viewItemSlice.actions.setPayment(itemModel.payment ?? null));\n\n dispatch(\n viewItemSlice.actions.setPurchaseInfo(\n itemModel.purchaseInfo ?? null\n )\n );\n\n dispatch(\n wishlist({\n itemId: itemModel.itemDetails.itemId,\n exists: !!itemModel.itemDetails.inWishList\n })\n );\n dispatch(\n viewItemSlice.actions.setBreadCrumbs(itemModel.breadCrumbs ?? [])\n );\n\n if (!itemModel.bidInfo) throw new Error('bidInfo is missing');\n dispatch(\n viewItemSlice.actions.setBidInfo({\n bidInfo: itemModel.bidInfo,\n itemId: itemModel.itemDetails.itemId,\n memberId\n })\n );\n\n if (itemModel.bidInfo.myMaxBidAmount) {\n dispatch(\n viewItemSlice.actions.setMyMaxBidAmount(\n itemModel.bidInfo.myMaxBidAmount\n )\n );\n }\n\n const isSafeToShowWinnerStatus =\n itemModel.itemDetails.hasEnded &&\n !itemModel.hasBidsWinnerToBeConfirmed;\n\n const viewItemState = isSafeToShowWinnerStatus\n ? VIEW_ITEM_STATES.ENDED\n : itemModel.itemDetails.hasStarted\n ? VIEW_ITEM_STATES.ACTIVE\n : VIEW_ITEM_STATES.NOT_STARTED;\n\n dispatch(viewItemSlice.actions.setViewItemState(viewItemState));\n\n const { itemDetails, bidInfo } = selectViewItem(getState());\n if (!bidInfo) throw new Error('bidInfo is missing');\n\n dispatch(updateItemState(itemDetails, bidInfo, viewItemState));\n\n dispatch(\n viewItemSlice.actions.setServerSecondsLeft(\n itemModel.serverSecondsLeft\n )\n );\n\n const isNewPage = previousItemId != selectItemId(getState());\n if (isNewPage) {\n dispatch(handleNewPage);\n }\n };\n\nconst setTranslation =\n (itemModel: ItemPageModel) =>\n (dispatch: AppDispatch, getState: GetState) => {\n const state = getState();\n\n const shippingRegion = selectShippingRegionCountryCodeIso2(state);\n const preferredLanguageCodeIso2 = selectPreferredLanguageCode(state);\n\n const disabledForEnglishLangSwedes =\n isSwedenCountryCodeOrUndefined(shippingRegion) &&\n areLanguageCodesIso2Equal(preferredLanguageCodeIso2, 'en');\n const automaticTranslationPreferred =\n selectAutomaticTranslationPreferred(state);\n\n const descriptionLanguageCodeIso2 =\n itemModel.itemDetails?.descriptionLanguageCodeIso2 ||\n DEFAULT_LANGUAGE;\n\n const shouldTranslateDescriptionOnLoad =\n automaticTranslationPreferred &&\n preferredLanguageCodeIso2 !== descriptionLanguageCodeIso2 &&\n !disabledForEnglishLangSwedes;\n\n dispatch(\n viewItemSlice.actions.setCurrentDescriptionLanguageCodeIso2(\n shouldTranslateDescriptionOnLoad\n ? preferredLanguageCodeIso2\n : descriptionLanguageCodeIso2\n )\n );\n if (itemModel.translations) {\n dispatch(\n viewItemSlice.actions.setTranslatedDescription({\n ...itemModel.translations,\n providerName: 'Google Translate'\n })\n );\n } else {\n dispatch(viewItemSlice.actions.resetTranslatedDescription());\n }\n };\n\nexport const handleNewPage = (dispatch: AppDispatch, getState: GetState) => {\n const state = getState();\n const currentItemDetails = selectItemDetails(state);\n const currentBidInfo = selectBidInfo(state);\n const breadCrumbs = selectBreadcrumbs(state);\n\n const swedishCategoryPath = breadCrumbs.map((b) => b.name).join(' > ');\n\n const getAuctionState = () => {\n const hasWon =\n currentItemDetails.hasEnded && currentBidInfo?.hasLeadingBid;\n const isLeading =\n !currentItemDetails.hasEnded && currentBidInfo?.hasLeadingBid;\n if (hasWon) return 'won';\n if (isLeading) return 'leading';\n return currentItemDetails.hasEnded ? 'ended' : 'normal';\n };\n\n const contentGroup = `${currentItemDetails.itemType}-${getAuctionState()}`;\n gtm.trackGtmEvent('viewItem', {\n page: {\n itemState: contentGroup,\n 'content-group-2': swedishCategoryPath,\n 'content-group-3': contentGroup\n },\n itemType: currentItemDetails.itemType,\n itemId: currentItemDetails.itemId,\n itemFixedPrice: currentItemDetails.fixedPrice || 0,\n itemCategory: swedishCategoryPath,\n itemStatus: currentItemDetails.hasEnded ? 'inactive' : 'active',\n itemEndDate: dayjs(currentItemDetails.endDate).format('YYYYMMDD'),\n timestamp: Date.now()\n });\n};\n\nconst updateItemState =\n (\n itemDetails: ItemDetails,\n bidInfo: BidInfo,\n viewItemState: VIEW_ITEM_STATES\n ) =>\n (dispatch: AppDispatch) => {\n if (!itemDetails.itemType) throw new Error('itemType is missing');\n if (!bidInfo.nextValidBidAmount)\n throw new Error('nextValidBidAmount is missing');\n\n const itemType = itemDetails.itemType as ITEM_TYPES;\n const transactionType = bidInfo.transactionType as TRANSACTION_TYPES;\n\n const itemState = getItemState(\n viewItemState === VIEW_ITEM_STATES.ENDED,\n viewItemState !== VIEW_ITEM_STATES.NOT_STARTED,\n itemType,\n bidInfo.bidCount ?? 0,\n bidInfo.reservePriceReached,\n bidInfo.nextValidBidAmount,\n transactionType,\n bidInfo.leadingBidderMemberId ?? undefined,\n itemDetails.isCancelled\n );\n dispatch(viewItemSlice.actions.setItemState(itemState));\n };\n\nconst getLeadingBidStatus = (\n bidInfo: BidInfo,\n memberId: number,\n previousBidInfo: BidInfo | null = null\n) => {\n const hadLeadingBid = !!previousBidInfo?.hasLeadingBid;\n const hasLeadingBid =\n !!memberId && memberId === bidInfo.leadingBidderMemberId;\n const hadLostLeadingBid =\n !!previousBidInfo?.hasLostLeadingBid || bidInfo.hasLostLeadingBid;\n const hasLostLeadingBid =\n (hadLostLeadingBid || hadLeadingBid) && !hasLeadingBid;\n return {\n hasLostLeadingBid,\n hasLeadingBid\n };\n};\n\nexport const toggleWishList =\n (itemId: number, forceAdd = false) =>\n (dispatch: AppDispatch, getState: GetState) => {\n if (getState().views.viewItem.isWishlistPending) {\n return;\n }\n dispatch(viewItemSlice.actions.setIsWishlistPending(true));\n const inWishListOldValue =\n getState().items.wishListItemIds.includes(itemId);\n const inWishListNewValue = !inWishListOldValue || forceAdd;\n\n const itemDetails = getState().views.viewItem.itemDetails;\n\n const wishListCountOldValue = itemDetails.wishListCount ?? 0;\n let wishListCountNewValue = wishListCountOldValue;\n if (Number.isInteger(wishListCountNewValue)) {\n if (inWishListOldValue && !inWishListNewValue) {\n wishListCountNewValue--;\n } else if (!inWishListOldValue && inWishListNewValue) {\n wishListCountNewValue++;\n }\n }\n dispatch(\n viewItemSlice.actions.setItemDetails({\n ...itemDetails,\n inWishList: inWishListNewValue,\n wishListCount: wishListCountNewValue\n })\n );\n\n return dispatch(\n itemActions.wishlist(itemId, {\n value: inWishListNewValue,\n shouldNotTrackEventBecauseNeedsToBeSameAsLegacyVip: true,\n showWishlistModals: !forceAdd,\n sectionGaName: 'VIP',\n gaSourceScreen: SOURCE_SCREEN.VIP,\n gaWishlistType: 'VIP'\n })\n )\n .then((inWishListNewValue) => {\n if (inWishListNewValue !== undefined) {\n analytics.trackWishlist(itemId, inWishListNewValue);\n } else {\n //Restore previous value;\n const itemDetails = getState().views.viewItem.itemDetails;\n dispatch(\n viewItemSlice.actions.setItemDetails({\n ...itemDetails,\n inWishList: inWishListOldValue,\n wishListCount: wishListCountOldValue\n })\n );\n }\n return inWishListNewValue;\n })\n .finally(() => {\n dispatch(viewItemSlice.actions.setIsWishlistPending(false));\n });\n };\n\nexport const placeBid =\n (\n itemId: number,\n memberId: number,\n amount: number,\n onLoggedOut: () => void\n ) =>\n async (dispatch: AppDispatch, getState: GetState) => {\n dispatch(viewItemSlice.actions.setIsBidding(true));\n\n const existsInWishList = selectExistsInWishList(itemId)(getState());\n const preferredLanguageCode = selectPreferredLanguageCode(getState());\n const { gaTrackingSessionId } = getState().environment;\n\n const itemBeforeBid = selectItemDetails(getState());\n\n try {\n const result = await placeBidApi(\n itemId,\n amount,\n onLoggedOut,\n preferredLanguageCode,\n gaTrackingSessionId ?? ''\n );\n\n if (!result) {\n dispatch(\n viewItemSlice.actions.setPlaceBidResponse({\n isSuccessful: false,\n validationResult: {\n code: BID_VALIDATION_RESULTS.OFFLINE\n },\n error: null\n })\n );\n dispatch(viewItemSlice.actions.setIsBidding(false));\n dispatch(\n viewItemSlice.actions.setShowBiddingToaster({\n placeBidValidationCode: BID_VALIDATION_RESULTS.OFFLINE\n })\n );\n return;\n }\n const {\n bidInfo,\n isSuccessful,\n item: updatedItem,\n validationResult,\n myMaxBidAmount,\n serverSecondsLeft\n } = result;\n\n if (isSuccessful) {\n dispatch(\n viewItemSlice.actions.setBidInfo({\n bidInfo,\n itemId,\n memberId\n })\n );\n dispatch(\n viewItemSlice.actions.setMyMaxBidAmount(myMaxBidAmount)\n );\n } else if (bidInfo.leadingBidAmount) {\n dispatch(\n viewItemSlice.actions.setBidInfo({\n bidInfo,\n itemId,\n memberId\n })\n );\n }\n dispatch(\n viewItemSlice.actions.setShowBiddingToaster({\n leadingBidMemberAlias: bidInfo.leadingBidMemberAlias,\n placeBidValidationCode: validationResult.code,\n leadingBidAmount: bidInfo.leadingBidAmount,\n nextValidBidAmount: bidInfo.nextValidBidAmount,\n myMaxBidAmount: result.myMaxBidAmount\n })\n );\n\n const analyticsData = extractAnalyticsData(itemBeforeBid, result);\n analytics.trackBidPlaced(\n itemId,\n validationResult.code,\n analyticsData?.isMaxBid,\n analyticsData?.potentialBidChange,\n analyticsData?.bidId,\n analyticsData?.transactionTotal,\n analyticsData?.leadingBidAmount\n );\n\n const currentItemDetails = getState().views.viewItem.itemDetails;\n dispatch(\n viewItemSlice.actions.setItemDetails({\n ...currentItemDetails,\n ...updatedItem\n })\n );\n\n dispatch(\n viewItemSlice.actions.setPlaceBidResponse({\n isSuccessful,\n validationResult: {\n code: validationResult.code as BID_VALIDATION_RESULTS\n },\n error: null\n })\n );\n\n dispatch(\n viewItemSlice.actions.setServerSecondsLeft(serverSecondsLeft)\n );\n } catch (error) {\n logger(error);\n dispatch(\n viewItemSlice.actions.setPlaceBidResponse({\n isSuccessful: false,\n validationResult: null,\n error\n })\n );\n }\n dispatch(viewItemSlice.actions.setIsBidding(false));\n\n // Add item to wish list if it doesn't already exist in list\n if (!existsInWishList) {\n dispatch(toggleWishList(itemId, true));\n }\n };\n\nconst extractAnalyticsData = (\n itemBeforeBid: ItemDetails,\n placeBidResponse: Awaited>\n) => {\n if (!placeBidResponse) return null;\n\n const { bidInfo } = placeBidResponse;\n\n const transactionTotal =\n bidInfo.leadingBidAmount - (itemBeforeBid.leadingBid || 0);\n const potentialBidChange =\n placeBidResponse.myMaxBidAmount - (itemBeforeBid.leadingBid || 0);\n const isMaxBid =\n placeBidResponse.myMaxBidAmount === placeBidResponse.item.leadingBid;\n\n return {\n isMaxBid,\n potentialBidChange,\n bidId: bidInfo.bidId,\n transactionTotal,\n leadingBidAmount: bidInfo.leadingBidAmount\n };\n};\n\nexport const {\n beginLoadingTranslatedDescription,\n failedLoadingTranslatedDescription,\n resetPlaceBidResponse,\n resetTranslatedDescription,\n setBidInfo,\n setIsRestricted,\n setIsInternationalWacko,\n setViewItemState,\n setTranslatedDescription,\n setTranslationOnDemandDisabled,\n setSellerItems,\n setCategoryItems,\n setShopItems,\n setCombinedShippingItems,\n setCurrentDescriptionLanguageCodeIso2,\n setPaymentAmountForBid\n} = viewItemSlice.actions;\n","const SwedenCountryCode = 'SE';\n\nexport const isInternationalShippingToCountryAllowed = (\n region: string,\n countryCodeIso2: string\n) => {\n switch (region) {\n case 'Sweden':\n return isSwedenCountryCode(countryCodeIso2);\n case 'Nordic':\n return isNordicCountryCode(countryCodeIso2);\n case 'EU':\n return isEuCountryCode(countryCodeIso2);\n case 'International':\n return true;\n default:\n throw `Unhandled buyer region: ${region}`;\n }\n};\n\nexport const isSwedenCountryCode = (countryCodeIso2: string) =>\n isCountryCode(SwedenCountryCode, countryCodeIso2);\n\nexport const isNordicCountryCode = (countryCodeIso2: string) =>\n containsCode(nordicCountryCodes, countryCodeIso2);\n\nexport const isEuCountryCode = (countryCodeIso2: string) =>\n containsCode(euCountryCodes, countryCodeIso2);\n\nconst containsCode = (codes: readonly string[], code: string) =>\n !!codes.find((c) => isCountryCode(code, c));\n\nconst isCountryCode = (c1: string, c2: string) =>\n c1.toUpperCase() === c2.toUpperCase();\n\nconst nordicCountryCodes = [\n 'SE',\n 'FI',\n 'NO',\n 'DK',\n 'IS',\n 'GL',\n 'FO',\n 'AX',\n 'SJ'\n] as const;\n\nconst euCountryCodes = [\n 'AT',\n 'BE',\n 'BG',\n 'CZ',\n 'DE',\n 'DK',\n 'EE',\n 'EL',\n 'ES',\n 'FI',\n 'FR',\n 'GR',\n 'HR',\n 'HU',\n 'IE',\n 'IT',\n 'LT',\n 'LU',\n 'LV',\n 'MT',\n 'NL',\n 'PL',\n 'PT',\n 'RO',\n 'SE',\n 'SI',\n 'SK'\n] as const;\n"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_ref","styles","props","_objectWithoutProperties","_excluded","React","xmlns","fill","viewBox","d","fillRule","clipRule","CANCEL_ITEM_MODAL_ID","CancelItemModal","dispatch","useAppDispatch","t","useTranslator","_useAppSelector","useAppSelector","state","ui","modals","currentModal","currentModalData","isModalOpen","itemId","showModal","_jsx","ScrollableModal","show","onClose","closeModal","maxWidth","title","footer","Button","theme","href","children","mobileBottomSheet","_jsxs","className","Text","as","font","leaveFeedbackApi","createApi","reducerPath","tagTypes","baseQuery","fetchBaseQuery","baseUrl","endpoints","builder","getFeedbackItems","query","role","transactionIds","url","qs","ids","method","getAllFeedbackItems","providesTags","_ref2","_ref2$skip","skip","_ref2$take","take","params","submitFeedback","mutation","invalidatesTags","_ref3","body","data","useGetFeedbackItemsQuery","useGetAllFeedbackItemsQuery","useSubmitFeedbackMutation","sellerListApi","isomorphicWebApiBaseQuery","build","getSellerList","isServer","type","transformResponse","response","_","arg","sellers","favouriteSellerCardDtos","totalSellers","totalPages","Math","ceil","maxSellers","followSeller","sellerId","unfollowSeller","useGetSellerListQuery","useFollowSellerMutation","useUnfollowSellerMutation","util","ItemLocalization","itemLocalization","memberCountryCode","useSelector","selectShippingRegionCountryCodeIso2","descriptionLanguages","Set","getLanguageFromCountryCode","map","code","getLanguageOption","shippingFromCountries","getCountryOption","_useDefaultItemLocali","useDefaultItemLocalizationSettingValues","defaultCountryCodeIso2","defaultLanguageCodeIso2","_useState2","_slicedToArray","useState","find","o","value","selectedDescriptionLanguageCodeIso2","selectedDescriptionLanguage","setSelectedDescriptionLanguage","_useState4","shippingFromCountryCodeIso2","selectedShippingFrom","setSelectedShippingFrom","isSwedenCountryCodeOrUndefined","showShippingFrom","includes","_Fragment","SettingsDropdown","name","label","onChange","async","webApiClient","put","languageCodeIso2","option","showSuccessToast","showErrorToast","selected","options","countryCodeIso2","getDefaultSelectedDescriptionLanguageCodeIso2","memberLanguageCodeIso2","memberCountryCodeIso2","countryLanguageCode","countryCode","language","useCurrentLanguage","memberCountryCodeCodeIso2","text","mapLanguageCodeToLanguageKey","mapCountryCodeToCountryKey","memberPrefilledPackagingCostApi","getMemberPrefilledPackagingCost","setMemberPrefilledPackagingCost","onQueryStarted","queryFulfilled","patchResult","updateQueryData","undefined","draft","packagingCost","undo","useGetMemberPrefilledPackagingCostQuery","useSetMemberPrefilledPackagingCostMutation","ERRORS","GENERIC","SHIPPING_LABELS","NO_SELECTED_SHIPPING","FREE_SHIPPING","TAKEAWAY","bookedShipmentsApi","getShipmentBookingByPurchaseOrderId","purchaseOrderId","getShipmentBookingByShippingCheckoutId","shipmentCheckoutId","useGetShipmentBookingByShippingCheckoutIdQuery","useGetShipmentBookingByPurchaseOrderIdQuery","getJSValue","True","False","All","setJSValue","true","false","setEnum","getEnum","types","LINK","EXTERNAL_LINK","EXTERNAL_LINK_ICON","DISPATCH","DISABLED","getBodyStringFromIDs","bodyString","forEach","id","pos","formHeaders","restartItemsSummary","fetch","URLS","ACTIVE_ITEMS_RESTART_SUMMARY","JSON","stringify","endItems","ACTIVE_END_ITEMS","headers","showActive","BUYER_ACTIVE_ITEMS_SHOW","hideActive","BUYER_ACTIVE_ITEMS_HIDE","restartItems","UNSOLD_RESTART_ITEMS","generateSumOfDiscounts","discounts","discount","amount","reduce","total","currentAmount","getBidCount","item","bidInformation","bidCount","getSumOfDiscounts","transaction","getMaxBid","caller","maxBid","getTimeLeft","isActive","timeLeft","timeleft","isTimeLeftCritical","critical","getShippingCost","listViewType","translateShippingNames","names","Takeaway","TakeawayLong","TakeawayOnly","SchenkerPrivpak","Alternative","LIST_VIEW_TYPES","BASIC","getShippingLabelWithPrice","shippingItem","shippingType","formatPrice","shippingCost","shouldShowShippingPrice","shippingOptions","listing","selectedShipping","isTakeaway","cost","isFreeShipping","STRINGS","theOnlyShippingOption","shippingOption","accumulator","currentValue","isNormalListViewType","NORMAL","listActions","listType","memberId","selectedFilterBar","count","actions","PAGE_LIST_TYPES","SELLER_ACTIVE","isCheckboxActive","bulkCssClass","bulkAction","PAGE_BULK_ACTIONS","ACTIVE_CANCEL","modal","icon","heading","itemCount","message","confirmButtonText","cancelButtonText","dismissable","idType","SELLER_NOT_SOLD","restart","hasRestartedChild","isArchived","UNSOLD_RESTART","wide","headingCSS","messageAlignment","cssClass","BUYER_ACTIVE_ITEMS","leadingBidRemoved","leadingBidder","BUYER_SHOW_ACTIVE","_item$caller","reservePriceReached","BUYER_HIDE_ACTIVE","BUYER_ITEMS_LOST","default","getAvailableQueryParams","filtersState","selectFiltersState","checkModifiersExist","modifiers","defaultFilters","getDefaultFilters","paging","page","size","sellerFilters","feedbackLeft","paid","shipped","hidden","buyerFilters","_objectSpread","datatype","dateRange","field","from","to","hasBids","itemCondition","itemType","processState","purchaseType","properties","scope","searchQuery","searchType","shippingBooked","sort","order","sorting","userIs","checkStateOfQueryParams","getState","locationQuery","check","keys","some","toString","checkItem","myTraderaUrls","overview","overview2","buyerOverview","sellerOverview","accountOverview","wishlist","profile","activeItems","itemsLost","active","sold","unsold","listings","listingsUnsold","bidding","purchases","savedSearches","sellerList","pickList","leaveFeedback","buyerFeedback","sellerFeedback","myFeedback","invoices","templates","payouts","accounting","messaging","selling","REDIRECT_TO_NEWDRAFT_QUERY","sellingTemplates","settings","settingsAccount","settingsEmail","settingsSelling","settingsNotifications","settingsSecurity","settingsPayouts","settingsLocalization","buyShippingBags","payeeVerification","hyperwalletPayeeVerificationCompleted","shippingCheckout","shippingBook","shippingConfirmation","invoiceCheckout","invoiceConfirmation","traderaShop","notFound","getMyTraderaUrls","toLocalizedUrl","mapObject","myTraderaRouteUrls","OPTIONAL_LANG","myTraderaRoutes","SellerListPage","path","SavedSearchesPage","PayeeVerificationPage","HyperwalletPayeeVerificationCompletedPage","BuyerActiveItemsPage","PurchasesPage","ItemsLostPage","BiddingPage","ListingsPage","ListingsUnsoldPage","ActivePage","UnsoldPage","PayoutsPage","AccountingPage","SettingsPage","exact","SettingsAccountPage","SettingsEmailPage","SettingsNotificationsPage","SettingsSellingPage","SettingsSecurityPage","SettingsPayoutsPage","SettingsLocalizationPage","LeaveFeedbackPage","ShippingCheckoutPage","ShippingConfirmationPage","NotFoundPage","InvoicesPage","InvoiceCheckoutPage","InvoiceConfirmationPage","ShippingBookPage","PickList","route","pageType","PAGE_TYPES","MY_TRADERA_PAGE","handleError","e","searching","error","logger","actionTypes","UPDATE_ITEMS","COMPLETED_SEARCH","OPEN_MORE","SELECT_ITEM","SELECT_ALL_ITEMS","REMOVE_ITEMS","OPEN_DEL_LISTING_ITEM","REMOVE_ALL_SELECTED","UPDATE_ITEMS_WITH_ERROR","ITEM_HIDDEN","ITEM_SHOWN","FEEDBACK_LEFT_BY_BUYER","RESET_ITEMS","SET_RESTARTED","SET_NEW_SHIPPING_PRICE","updateItems","payload","memberMessagingParticipation","resetSelectedCheckboxes","removeItems","itemIds","updateURL","locationDescriptor","pathname","search","window","location","push","replace","resetMyTraderaItems","changeParamsForBackend","newPaging","cancelItem","then","catch","buyerActiveItemsHide","buyerActiveItemsShow","buyerActiveItemsHideItems","buyerActiveItemsShowItems","openMore","pageName","Analytics","category","action","runSearch","shouldScrollToInitialScroll","waitForBackend","dontModifyHistory","featureToggles","isMyTraderaElasticEnabled","endPoint","searchUrl","routeBefore","router","routeAfter","scrollToInitialScroll","setTimeout","selectItem","selectAllItems","select","rebuildList","existingState","selectMyTraderaItemsState","itemsByID","selectMyTraderaState","selectRouterState","items","itemsOrderedByID","newState","currentTime","statistics","selectCookiesState","LIST_VIEW_TYPE","sellerUnhideUnsold","UNSOLDSHOW","unsoldItemsShown","sellerHideUnsold","UNSOLDHIDE","unsoldItemsHidden","setRestarted","setNewShippingPrice","shippingProvider","newPrice","payoutSlice","createSlice","initialState","getPayoutState","reducers","receivePayoutsSettings","payoutSettings","isFetching","removePayoutDestination","payoutDestination","setFetching","_payoutSlice$actions","cookiesSlice","defaultState","defaultCookies","MYTRADERA_DEFAULT_COOKIES","val","cookieUtil","readCookie","setCookie","reducer","prepare","_MYTRADERA_DEFAULT_CO","createCookie","views","myTradera","cookies","resetPageIndex","slice","filterBar","shownFilters","updatePageSize","selectSortChange","sortOrder","changeSortOrder","selectTypeChange","setDateFrom","_ref4","setSingleFilterValue","_ref5","filter","setDateTo","_ref6","filterByState","_ref7","showSelectFiltersDropDown","setSellerFilterBarModifiers","defaults","changePage","_ref8","resetDateRangeTo","resetDateRangeFrom","resetFilters","changeSearchQuery","_ref9","selectReservationPriceChange","_ref10","updateFiltersForSelectedPage","_ref11","newFilters","setFiltersFromRouter","_ref12","filters","_slice$actions","getId","getIds","activeSellerActions","isShopItem","common","sellSimilar","getTranslatedLabel","gaLabel","isVisible","isPrimaryAction","commonActions","translationKeys","shareHeader","shareMailSubject","shareMailBody","sharePinterestDescription","shareLinkText","showTooltip","getTranslatedTooltip","_props","preferredLanguageCode","shareLinkHref","URL","itemUrl","origin","openShareModal","shareTitle","shortDescription","shareImageUrl","images","main","full","_item$bidInformation","_item$bidInformation$","getMessagingPageLink","seller","traderaUserId","_preferredLanguageCode","_item$listing$images$","itemSquareImage","getSrc","mainTemplate","openNewMessageModal","senderId","recipientId","recipientAlias","alias","itemTitle","itemImageUrl","itemSellerId","isMessagingEnabled","myTraderaItemActions","openModal","modalId","isPromotedSecondaryAction","itemsFromSeller","cleanedAlias","haveMultipleRows","getActionsForItem","secondaryActions","primaryAction","promotedSecondaryAction","resolveActions","potentialActions","actionCreator","checkAndAdd","actionsForItem","PAGE_NAMES","BuyerActiveItems","activeBuyerActions","isLeading","fixedItemUrl","fixItemUrlIfNeeded","buttonTheme","BuyerItemsLost","lostActions","SellerUnsold","unsoldActions","_item$hiddenByMember","hiddenByMember","_item$hiddenByMember2","SellerActive","getItem","labelFunc","columnFunc","transactionId","columns","shippingPrice","getCheapestShippingPrice","buyer","substring","prev","current","actionLabelMap","getBuyerActiveItemsLabel","buyerActiveItemsColumns","getBuyerItemsLostLabel","buyerItemsLostColumns","getActiveLabel","sellerActiveColumns","getUnsoldLabel","sellerUnsoldColumns","Error","updateUnsoldLabelsAndActions","getUnsoldItem","getColumns","setUnsoldItemHiddenState","flag","err","removeFromList","markItemAsHiddenReducer","updatedItems","updateChangedItems","currentMemberId","findUpdatedKeysByItemId","findKeysByItemId","markItemAsShownReducer","setRestartedReducer","stateItems","setItemsHasRestartedChild","updatedItem","myTraderaItems","getItemsInOrder","newItems","sellerEmail","createReturnObject","hasIncorrectResponse","updateItemsWithError","values","totalItems","isSubMenuOpen","bulkChecked","selectedCheckboxes","chosenBoxes","indexOf","allItemsWithBulk","checkIfActive","parseInt","openDelListingItem","isOpenDeleteItem","removeAllSelected","newItemsOrderedByID","element","itemHidden","itemShown","resetItems","itemKeysForPurchaseOrderId","findKeysByPurchaseOrderId","shippingDiscount","price","isSearching","initData","environment","version","description","splitTests","memberAlias","memberFirstName","memberLastName","mobileMenu","mobileActions","changeShippingModal","open","shippingQrCodeModal","TEXT_STRINGS","setBreakPoint","breakpoint","openChangeShipping","receiverCountry","closeChangeShipping","openShippingQrCodeModal","closeShippingQrCodeModal","setTranslatedRouteInformation","labels","CurrentPrice","TransactionDate","EndDate","ShippingCost","Bids","ItemId","OpeningBid","ReservePrice","BuyItNow","OwnReference","MaxBid","TimeLeft","MandatoryBuyerProtection","columnCssClassCore","getCoreCssClass","column","getHeading","columnKey","term","getTranslatedColumnKey","getHeadings","columnDefinitions","getUserHeading","highestBidder","hasTransactionDate","transactionDate","currentPrice","getItemId","hasHighestBidder","shouldShowBids","getTransactionDate","formatted","getEndDate","endDate","getTimeLeftAsString","columnCssClass","itemHasBidsButReservePriceNotReached","Discount","columnTitle","getBids","component","infoItemComponents","BIDS","getOpeningBid","pricing","openingBid","getReservePrice","reservePrice","getBuyItNow","buyItNow","getOwnReference","ownReference","getDefinitionForPriceLabel","PRICE_LABEL","TIME_LEFT","definitions","ITEM_PRICE","MANDATORY_BUYER_PROTECTION","buyerProtectionCost","getColumn","definition","tagTitle","getTranslatedImageLabel","labelKey","buyerActiveItemsLabelKeys","RESERVE_PRICE_NOT_REACHED","activeLabelKeys","unsoldLabelKeys","soldLabelKeys","NOT_PAID","purchasesLabelKeys","PAYMENT_PENDING","PAID","DONE","LEADING","OVERBIDDEN","BID_REMOVED","NOT_STARTED","HAS_BIDS","ACTIVE","SOLD","NOT_SOLD","SHIPPING_BOOKED","SHIPPED","FORICBLY_CLOSED","RESTARTED","itemLostLabelKeys","REMOVED","LOST","buyerActiveItemsLabels","reservePriceNotReached","color","leading","overbidden","bidRemoved","activeLabels","notStarted","notSold","unsoldLabels","notPaid","forciblyClosed","restarted","itemLostLabels","lost","removed","itemHasBids","activityType","getActiveActiveLabel","unSold","closed","isEnabled","featureSwitches","errors","ELASTIC_MYTRADERA","isPennybridgeCharitiesEnabled","isDiscontinuedSaleEnabled","isDiscontinuedSaleMessagingEnabled","isDisputeV2AddEnabled","PickListTagTypes","PickListItems","getPickListItemsCacheKeys","pickListApi","markAsShipped","patch","patchResults","cacheKey","updateShippingStatusForBuyerItems","markAsPaidBySeller","updatePaidStatusForBuyerItems","setItemVisibility","res","_res$responseStatus","responseStatus","errorCode","updatedBuyers","updateVisibilityStatusForBuyerItems","resp","req","cacheKeys","_key$skip","_key$take","retrieveHidden","getPickListItems","add","invalidateTagsOnShippedStatus","tagsToInvalidate","shippedStatus","PickListFilterShippedStatus","invalidateTags","invalidateTagsOnPaidStatus","paidStatus","PickListFilterPaidStatus","useMarkAsShippedMutation","useMarkAsPaidBySellerMutation","useSetItemVisibilityMutation","useGetPickListItemsQuery","Tags","cacheKeySet","savedSearchesApi","getSavedSearches","sortBy","SAVED_SEARCHES_LIST","removeSavedSearches","_draft$savedSearches","_params$ids","toggleEmailNotification","_draft$savedSearches2","_params$savedSearchDt","savedSearchDto","hasEnabledEmailNotifications","sendMail","useGetSavedSearchesQuery","useRemoveSavedSearchesMutation","useToggleEmailNotificationMutation","BID_VALIDATION_RESULTS","LEADING_BIDDER","SUCCESSFULLY_CHANGED_AUTOBID","BELOW_MINIMUM","BELOW_RESERVE_PRICE","BELOW_OWN_LEADING_BID","OFFLINE","CATEGORIES","trackWishlist","isAdding","GtmService","trackAction","trackAddToCart","sellerMemberAlias","fixedPrice","redirectUrl","trackLinkClickAndGotoUrl","getGaTrackingData","googleAnalyticsTrackingId","isHybridAppContextForIos","isHybridAppContextForAndroid","appInstanceId","sessionId","_window","_window$ga","_window$ga$getAll","_window$ga$getAll$cal","trackingPlatform","clientId","ga","getAll","get","trackingIds","platform","removeHashFromUrl","_qs$parse","ignoreQueryPrefix","forceRedirect","otherQueryParams","document","hash","addQueryPrefix","history","replaceState","removeQueryParametersFromUrl","shouldSaveInWishlist","URL_HASHES","saveInWishlist","shouldShowRequestedCombinedShippingToast","hasRequestedCombinedShipping","shouldOpenReferralModal","openReferralModal","getBaseRedirectUrl","queryParams","round","random","protocol","host","getWishlistRedirectUrl","getShopItemRedirectUrl","buyShopItem","BuyerProtectionModalType","BuyerProtectionInfoModal","handleCloseModal","payment","isBuyer","localizedPriceFormatter","useLocalizedPriceFormatterWithExchangeRate","paymentMethodExchangeRate","CurrencyRateType","Buyer","Seller","Mandatory","Optional","header","HeaderWithCloseButton","BuyerProtectionIcon","classNames","mandatoryIcon","baseAmount","CheckIcon","Trans","i18nKey","components","infoLink","HeaderWithImage","preTitle","mainTitle","imgSrc","HeaderImage","ShieldIcon","optionalIcon","a","sleep","delay","Promise","resolve","startAuthAndOpenModal","onComplete","onError","purpose","contactSsn","organizationNumber","reset","startAuth","_data$responseStatus","post","setError","inProgress","autoStartToken","qrData","bankIdOrderRef","bankIdPollProgress","maybeAxiosError","startAuthOnFile","_data$responseStatus3","_data$autoStartToken","_data$bankIdOrderRef","_state$bankId","bankId","modalState","ModalState","ERROR","IN_PROGRESS","_data$responseStatus4","isCompleted","completed","Divider","polyRef","forwardRef","dark","thick","hideLast","Component","ref","TextInput","defaultValue","hint","help","_ref$autoComplete","autoComplete","collapsed","style","_useControllableState2","useControllableState","prop","defaultProp","localValue","setLocalValue","BaseInputWrapper","BaseInputField","isInvalid","pixelDensityResolution","pixelDensityResolutionDesktop","layoutImageResolution","ITEM_LAYOUT","LIST","GRID","GRID_MEDIUM","GRID_LARGE","fullWidthLayoutImageResolution","getItemLayoutSrcSet","_ref$itemLayout","itemLayout","_ref$isSiteWidthFull","isSiteWidthFull","_ref$isMobile","isMobile","imageResolution","src","placeholder","resolution","getSrcSet","srcSetMap","entries","pixelDensity","join","LoaderComponent","visibleClassName","otherProps","loaderRef","useRef","useEffect","timeout","_loaderRef$current","classList","clearTimeout","GlobalLoader","blurBackground","LoadingIcon","width","height","PortalLoader","LoadingPortal","LocalLoader","_excluded2","local","visible","LocalLoaderWithChildren","_excluded3","_ref5$usePortal","usePortal","getPaymentMethodName","paymentMethod","PaymentMethodName","payoutDestinationModalSlice","getInitialState","receiveModalData","_payload$member","_payload$tink","requireBankIdVerification","member","tink","tinkLinkUrl","hyperwallet","availablePayoutOptions","payoutFrequencyOption","resetPayoutDestinationOptionState","selectedOption","displayedPayoutOptions","bankAccount","paypal","swish","openSettingsModal","showSettingsModal","closeSettingsModal","setDisplayedPayoutOptions","setTinkFetching","setTinkBankAccounts","accounts","errorMessage","setTinkAccount","account","tinkError","cancelTink","setUpdateStatus","updateStatus","startUpdate","isUpdating","processCorrelationId","setUpdateError","finishUpdate","setModalState","setBankAccount","setPayPalEmail","emailAddress","setSwishNumber","_ref13","swishNumber","setSwishVerificationCode","_ref14","verificationCode","_payoutDestinationMod","PayoutDestinationModalView","constructor","super","el","createElement","loadingPortalRoot","getElementById","componentDidMount","appendChild","componentWillUnmount","removeChild","render","_this$props","_this$props$className","ReactDOM","propTypes","ajaxItemApi","getAjaxItem","languageCode","useGetAjaxItemQuery","quickView","isOpen","openQuickView","_payload$items","_payload$item","openedFrom","closeQuickView","_quickView$actions","srcSet","videoSrc","tallImage","videoError","setVideoError","headerClass","headerTall","autoPlay","loop","muted","playsInline","headerImage","small","medium","large","alt","headerImageOverlay","headerContent","Space","justify","align","Heading","closeBtn","CloseIcon","onClick","CHECKOUT_ERRORS","DECLINED","NotSpecifiedShippingOption","NO_PAYMENT_METHOD","CANCELLED","CHECKOUT_ERROR_STRINGS","getCheckoutErrorMessage","resolveMostPreciseTranslationKey","errorKeys","errorTranslationKeys","getOrDefault","errorPrio","DefaultReceiverAddressError","DefaultError","b","isUnSupportedProduct","Shipment","ValidatedProperty","Product","ValidationErrorType","NotSupported","getDefaultErrorKey","errorMap","ReceiverAddress","SenderAddress","AgentAddress","Unknown","Street","ZipCode","City","CountryCode","Email","Phone","Length","Width","Height","Weight","Type","Name","Agent","Missing","WrongFormat","NotReal","ZipcodeRouting","NotEnabled","CheckReceiverZipCodeError","CheckReceiverPhoneError","ReceiverAgentMissingError","CheckAddressesError","GenericShippingError","CheckReceiverEmailError","DefaultSenderAddressError","CheckSenderEmailError","CheckSenderPhoneError","CheckSenderZipCodeError","DefaultAgentAddressError","usePageMeta","DEFAULT","customPageMetaData","setMetaTitle","useDispatch","pageMetaData","metaTitle","canonicalLink","metaDescription","metaRobots","ogImage","breadcrumbs","setPageMeta","bannedCountries","removeBannedCountries","country","has","toLowerCase","removeBannedCountryCodes","getAvailableCountries","countries","lokaliseKey","ad","ae","af","ag","ai","al","am","an","ao","aq","ar","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bm","bn","bo","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cu","cv","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","fi","fj","fk","fm","fo","fr","fx","gb","gd","ge","gf","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","ie","il","in","io","iq","ir","is","it","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","ru","rs","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","st","sv","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","tr","tt","tv","tw","tz","ua","ug","um","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","yu","za","zm","zw","store","browserHistory","_process$env","isProd","process","env","reduxStore","configureStore","rootReducer","middleware","getDefaultMiddleware","middlewares","discoverApi","categoriesApi","changePasswordApi","independentSearchApi","feesApi","touchwebSearchApi","touchwebSyiApi","bidHistoryApi","cartApi","draftsApi","templatesApi","shippingComplaintApi","referralModalApi","wishListApi","messagingStatsApi","firebaseApi","webApi","topListsApi","feedbackRemovalApi","startPageThemeApi","preferredShippingProvidersApi","memberLatestPublishedListingApi","mySoldApi","myPurchasesApi","wardrobeNewsForYouApi","othersAlsoLookedAtApi","similarItemsV2Api","checkoutUpsellApi","valuationApi","syiShippingApi","resellSuggestionsApi","routerMiddleware","concat","devTools","enhancers","sentryReduxEnhancer","enableWebPackHotModuleReplacementForReducers","module","hot","accept","nextRootReducer","require","replaceReducer","initializeStore","getHistory","initializeState","ProviderWithGlobalStore","Provider","useMemberServerStorageInternal","parse","isLoggedIn","useIsLoggedIn","isUninitialized","memberStorage","isUnitialized","isSuccess","loadMemberServerStorageData","storeValue","useCallback","saveMemberServerStorageValue","isReady","useMemberServerStorageWithCookieFallbackInternal","expires","_useMemberServerStora2","_value","_storeValue","_isReady","useCookieUtil","isFunctionalCookieEnabled","gdpr","isFunctionalEnabled","cookieValue","getCookie","parsedValue","setValue","stringValue","fallbackValue","isPersistant","useMemberServerStorageBoolean","useMemberServerStorageWithCookieFallbackBoolean","useMemberServerStorageWithCookieFallbackString","useMemberServerStorageWithCookieFallback","memberStorageSlice","isLoading","isError","setData","extraReducers","addCase","pending","fulfilled","_action$payload$rows","rows","row","rejected","_memberStorageSlice$a","memberSlice","hasLoggedIn","previousLoginMethod","isFetchingGeolocation","isImpersonationSession","geolocation","memberHeroImage","max","med","min","isCompany","cleanedMemberAlias","facebookId","memberDetailedSellerRatingAverage","memberCountry","memberEmail","memberEmailMd5","memberEmailSha256","memberBirthdate","memberTown","hasTraderaPay","age","gender","registrationDate","memberIsBuyer","memberIsSeller","currencyCode","permissions","blueshiftEventSignature","memberIdHash","automaticTranslationPreferred","memberState","isTrustedMember","initializeFromInitData","initialize","setIsFetchingGeolocation","setIsImpersonationSession","setGeolocation","failedLoadingGeolocation","setMemberHeroImage","setHasLoggedIn","setPreviousLoginMethod","setMemberActive","_memberSlice$actions","setPreferredCurrencyThunk","triggerGa","selectIsLoggedIn","touchWebClient","createPreferredCurrencyCookie","setPreferredCurrency","setCurrencyIfNotChosen","_selectPreferredLangu","_ref$languageCodeIso","selectPreferredLanguage","da","Date","getTime","pageSlice","setPageType","_pageSlice$actions","recentSearchesService","StorageService","STORAGE_KEYS","SEARCH_RECENT","recentBrandAttributesService","RECENT_BRAND_ATTRIBUTES","getRecentSearchesLocalStorage","_recentSearchesServic","_recentSearchesServic2","recentSearches","orderByTimestamp","formattedRecentSearches","recent","_recent$value","_recent$value2","q","removeRecentSearchLocalStorage","searchTerm","remove","getRecentBrandAttributesLocalStorage","_recentBrandAttribute","_recentBrandAttribute2","recentBrandAttributes","recentBrand","pushNotificationsSlice","enabled","initDone","pushSupported","optedIn","tagGroups","wishlistReminders","buyingListingOutbid","buyingListingWon","sellingListingFirstBid","sellingListingAllBids","sellingListingSold","sellingPaymentReceived","shownModals","MODAL_TYPES","setInitDone","setPushSupported","setOptedInValue","setTagGroupsValue","setShownModalTrue","modalType","localStore","setItem","WEB_PUSH_SHOWN_MODALS","setAllShownModals","setEnabled","init","sdk","getUrbanSdk","canRegister","isSupported","channel","tags","set","getTagGroupsFromUrbanAirship","isPushEnabled","optIn","register","namedUser","optOut","saveTagsToUrbanAirshipAndUpdateState","tagGroupValue","tagGroupsToSet","pushNotifications","channelTags","group","CHANNEL_TAG_GROUPS","addTagGroups","tagGroupsToAdd","removeTagGroups","tagGroupsToRemove","memberApi","injectEndpoints","getPendingKycActions","getQuestionnaire","initializeQuestionnaire","completeQuestionnaire","getVerificationStatus","setMakeAnOfferEnabled","getSilentMessagingEnabled","setSilentMessagingEnabled","request","silentMessaging","getCompanyMoneyTransferLicenseStatus","getMemberEmailNotificationsSettingsViewModel","setMessagingEmailNotify","emailNotifyAll","emailNotify","MessagingEmailNotification","getMemberHasTaxIdentificationNumber","getMemberShouldCollectTaxIdentificationNumber","setMemberTaxIdentificationNumber","updateMemberEmailSettings","getCompanyDac7Status","setMemberVatNumber","setMagicalSyi","getMagicalSyiEnabled","getMessagingConfiguration","getMemberGeoData","useGetPendingKycActionsQuery","useGetQuestionnaireQuery","useInitializeQuestionnaireMutation","useCompleteQuestionnaireMutation","useGetVerificationStatusQuery","useSetMakeAnOfferEnabledMutation","useGetSilentMessagingEnabledQuery","useSetSilentMessagingEnabledMutation","useGetMemberEmailNotificationsSettingsViewModelQuery","useGetCompanyMoneyTransferLicenseStatusQuery","useSetMessagingEmailNotifyMutation","useUpdateMemberEmailSettingsMutation","useGetCompanyDac7StatusQuery","useSetMemberVatNumberMutation","useGetMemberShouldCollectTaxIdentificationNumberQuery","useGetMemberHasTaxIdentificationNumberQuery","useSetMemberTaxIdentificationNumberMutation","useSetMagicalSyiMutation","useGetMessagingConfigurationQuery","useGetMagicalSyiEnabledQuery","useGetMemberGeoDataQuery","CategorySchema","z","object","string","categoryId","number","isLeaf","boolean","CategorySuggestionSchema","matchedItemCount","CategoriesAndSuggestionsSchema","categories","array","suggestions","optional","httpClientBaseQuery","client","getCategories","_ref$categoryId","_ref$currentLevel","currentLevel","levelToSearch","_meta","_arg$locale","Intl","Collator","locale","DEFAULT_LANGUAGE","compare","categorySearch","useCategorySearchQuery","useGetCategoriesQuery","usePrefetch","QueryScope","SearchItemConditionApiDto","SearchItemTypeApiDto","SearchSellerApiDto","SearchSortOrderApiDto","signIn","openProfileMenu","openNotificationOptinModalAction","openNotificationOptinModal","logOutAction","cache","CACHE_KEYS","SYSTEM_MESSAGES","SYSTEM_BADGES","indexedDB","deleteDatabase","logOut","fetchSystemMessages","_systemMessages","systemMessages","read","messages","_fetchedMessages$data","fetchedMessages","getSystemMessages","acc","notificationCount","severity","SystemMessageSeverity","Warning","write","setSystemMessages","API_ERRORS","LOGGED_OUT","IGNORE_ME","NETWORK","TIMEOUT","fetchSystemBadges","_systemBadges","systemBadges","badges","_fetchedBadges$data","fetchedBadges","getSystemBadges","badgeMap","badge","PayoutsActivity","setSystemBadges","reloadSystemMessages","reloadSystemBadges","uiSlice","_state","toggleHeaderSearch","showHeaderSearch","openVideoModal","videoUrl","videoId","buttonLink","buttonText","videoModal","MODAL_STATE","OPEN","closeVideoModal","CLOSED","newMessageModal","closeNewMessageModal","notificationOptinModal","closeNotificationOptinModal","messageNotificationCount","badgeNotificationCount","profileMenu","closeProfileMenu","openCategoryDropdownMenu","categoryDropdownMenu","closeCategoryDropdownMenu","openSearchForm","showSearchForm","closeSearchForm","getInitialBadges","openItemSettings","itemSettings","closeItemSettings","shareModal","closeShareModal","openHelpSection","helpSection","closeHelpSection","openWishListSideSheet","wishListSideSheet","closeWishListSideSheet","openNotificationsSideSheet","notificationsSideSheet","closeNotificationsSideSheet","updateProductCommunications","productCommunications","showSaveSearchBanner","_ref14$payload","openCollectSsnModal","collectSsnModal","closeCollectSsnModal","referralModal","closeReferralModal","_uiSlice$actions","cartSlice","setConfirmingId","confirmingId","setCartData","merchantPreOrders","loaded","_cartSlice$actions","MODAL_TYPE","SWISH_HANDEL","TRUSTLY","PAYMENT_OPTIONS","CARD","PAYPAL","APPLEPAY","GOOGLEPAY","VISA_MASTERCARD","KLARNA","WALLET","PAYMENT_OPTION_STATUS","AVAILABLE","UNAVAILABLE_DUE_TO_AMOUNT","AVAILABLE_WITH_DISTURBANCE","BUYER_PROTECTION_STATE","NOT_SELECTED","NOT_ADDED","ADDED","buyerMember","checkoutSummary","hasError","paymentOptions","selectedPayment","buyerProtection","orderCalculation","paymentMethodData","paymentMethodAmount","isValid","discountCodes","discountCodesValidating","showSelectedPaymentAsPayButton","sellerMember","paymentAttemptId","trustlyRedirectUrl","ongoingPaymentAttempt","shippingInfo","shippingPriceRange","collectionPoints","selectedCollectionPoint","isBooked","combinedShippingInfo","purchaseOrder","shippingOptionsLoading","verificationStatus","needsKyc","preselectedValues","shipping","paymentOption","discountCode","checkoutSlice","receiveCheckout","shippingFeeRule","orderNumber","collectionPointId","receiveShippingOptions","setShippingOptionsLoading","receivePaymentOptions","receiveCollectionPoints","cancelPayment","setHasError","setPaymentFetching","setPaymentHasError","setPaymentIsValid","setPaymentMethodData","setCheckoutSummaryFetching","setCheckoutSummaryHasError","setSelectedPayment","_ref15","setOrderCalculation","_ref16","setBuyerProtection","_ref17","setSelectedShipping","_ref18","setOngoingPaymentAttempt","_ref19","setCombinedShippingInfo","_ref20","setBuyerMember","_ref21","setBuyerMemberAddress","_ref22","address","setCollectionPoint","_ref23","setShippingInfoFetching","_ref24","setCollectionPointSaving","_ref25","savingCollectionPoint","setDropinLoading","_ref26","dropinLoading","setDiscountCodesValidating","_ref27","setDiscountCodes","_ref28","setPaymentMethodAmount","_ref29","setPreselectedValues","_ref30","setShowSelectedPaymentAsPayButton","_ref31","setCurrencyCode","_ref32","_checkoutSlice$action","getInvoice","createAsyncThunk","thunkAPI","invoiceId","api","logError","rejectWithValue","getPaymentOptions","_await$api$getPayment","PAYMENT_STATUS","containsNonPrintableAscii","match","createThreeDSecureParameters","_selectSellerPhoneNum","currentState","totalCost","selectInvoiceCheckout","amountOwed","selectMemberFirstName","firstName","selectMemberLastName","lastName","buyerAddress","countryCodeAlpha2","phoneNumber","selectSellerPhoneNumber","email","selectMemberEmail","billingAddress","givenName","surname","additionalInformation","shippingGivenName","shippingSurname","shippingAddress","initBraintreePayment","requestOptions","threeDSecure","paymentInstance","requestPaymentMethod","initPayment","reject","invoicePaymentAttemptId","selectInvoiceOngoingPayment","_selectInvoicePayment","selectInvoicePayment","closePaymentModal","utils","formData","checkPaymentStatus","poll","status","openPaymentModal","resetOngoingPaymentAttempt","BANK_ID","invoice","invoiceCheckoutSlice","setInvoiceData","setPaymentPaying","isPaying","sellerPhoneNumber","sellerPhone","_invoiceCheckoutSlice","openNonIntegratedModal","closeNonIntegratedModal","setTermsAccepted","selectCheckoutSummary","ENTRY_LOADING_STATUS","LOADING","UNAVAILABLE","ENTRY_LOAD_ACTION","PRINT","list","pagination","index","lastSequenceNumber","showLoadMoreButton","hasMore","loadingStatus","loadAction","dropdownData","payoutStatus","csvLoading","showPayoutFrequencyModal","payoutsSlice","setPayoutStatus","setEntries","setPagination","setEntriesLoadingStatus","setEntriesLoadAction","resetEntries","setPending","setCsvLoading","updatePayoutFrequency","setShowPayoutFrequencyModal","removePayoutAccount","accountType","setShouldSelectPayoutMethod","shouldSelectPayoutMethod","setDropdownData","_ref11$payload","_payoutsSlice$actions","loadReportItemModel","reportItem","setViewState","hasEnded","VIEW_STATES","ITEM_ENDED","FORM","_await$getReportItemM","getReportItemModel","handleReportItemModel","getReturnUrl","getBackToHereRedirectUrl","reportItemModel","setReportItem","submitReport","reason","SUBMITTING","postReport","SUBMIT_SUCCESS","SUBMIT_FAILED","REASONS","NONE","SUSPECTED_FRAUD","ITEM_IS_A_COUNTERFEIT","BRAND_NAME_MISUSE","WRONG_CATEGORY","PROHIBITED_SHIPPINGvOR_PAYMEN_TMETHOD","OTHER_PROHIBITED_ITEM","OTHER_PROHIBITED_SETUP","OTHER","breadCrumbs","categoryNames","categoryLevel","reasons","resultMessage","shippingTerms","sellerMemberId","viewState","itemDetails","resetInitialState","_ref$payload","bidInfo","itemState","getItemState","hasStarted","nextValidBidAmount","transactionType","leadingBidderMemberId","amountDetails","getAmountDetails","leadingBidAmount","allowedBuyerRegion","breadCrumb","assertNoUndefinedProperties","setCategories","defaultBox","weight","weightMap","shippingCalculatorEnabledCountries","shippingCalculatorSlice","box","availableFromCountryCodes","availableToCountryCodes","weightUnit","weightSliderValue","isLoadingShippingProducts","shippingProviders","providerName","service","internationalProductsGroupedByFromThenToCountry","SE","showError","initializeShippingCalculator","defaultCountry","selectedToCountry","selectedFromCountry","setSelectedToCountry","setSelectedFromCountry","setDefaultValuesOnBox","updateFilter","_action$payload","filterName","setWeightFilter","setWeightUnit","beginFetchingShippingProducts","setShowError","setShippingProducts","internationalShippingCalculatorProducts","product","fromCountryCodeIso2","toCountryCodeIso2","setDefaultValues","fetchShippingProducts","shippingCalculator","_selectBox","selectBox","selectIsBoxValid","axiosWithTokenRefresh","ENDPOINTS","INTERNATIONAL_SHIPPING_CALCULATOR","lengthInMillimeters","heightInMillimeters","widthInMillimeters","weightInGrams","axiosConfigs","authenticated","finalizeResponse","_shippingCalculatorSl","selectFilterValue","selectWeightUnit","selectWeightSliderValue","selectNormalizedWeight","selectWeightString","selectAvailableShippingProviders","shippingProducts","selectShippingProducts","includedProviders","provider","x","p","_state$views$shipping","selectIsDifferentFromDefaultBox","selectSelectedCountries","selectAvailableCountryCodes","selectShowError","deleteShipment","shipmentId","result","createShipmentCheckout","callback","getShippingOptions","fromCountry","toCountry","bringEnabled","postnordEnabled","dhlEnabled","schenkerEnabled","updateShipment","shipmentDetails","mostPreciseTranslationKey","NIL_UUID","mostPreciseErrorKey","updateShippingProvider","shipment","selectShipment","providerId","productId","receiver","shippingPayload","buildShippingPayload","updateShippingAddress","city","zipCode","street","streetName","createShipment","_selectItemWithoutShi","selectItemWithoutShipment","buyerContactDetails","fullName","town","hasUnSupportedProduct","markAsBooked","getItemWithoutShipment","getShippingConfirmation","shippingCheckoutId","pollShippingConfirmationStatus","isLongPolling","iterations","_await$api$getIsBooki","getIsBookingComplete","isBookingComplete","shippingProductId","getUnbookedShipments","selectShippingCheckout","selectShippingPayment","shipmentPaymentAttemptId","addShipment","buyerDetails","INVOICE","shipments","isInitialized","isDeleting","isCreating","isCreated","isCreateInitialized","termsAccepted","itemWithoutShipment","nonIntegrated","markedAsBooked","markedAsShipped","isShippingFetching","hasShippingError","isShippingInitialized","unbookedShipments","loading","shippingCheckoutSlice","setUnbookedShipments","hasFetchError","totalShippingCost","memo","hasDeleteError","meta","_arg$buyerAddress","cleanedBuyerAddress","isUpdatingShipment","createdShipmentCheckoutId","translationKey","productsDecorated","productsPerWeightSpan","weightClass","filteredProductsWithDecoration","products","outage","uuid","_shippingCheckoutSlic","selectShippingConfirmation","selectShipping","_state$views$shipping2","selectUnbookedShipments","fetchTraderaShopProductData","urlSlug","selectPreferredLanguageCode","setIsLoading","traderaShopProduct","getTraderaShopProductData","handleTraderaShopProduct","reload","setProduct","setItemDetails","setTranslation","inWishList","exists","itemModel","shippingRegion","preferredLanguageCodeIso2","disabledForEnglishLangSwedes","areLanguageCodesIso2Equal","selectAutomaticTranslationPreferred","descriptionLanguageCodeIso2","shouldTranslateDescriptionOnLoad","setCurrentDescriptionLanguageCodeIso2","loadTranslatedDescription","_selectTranslatedDesc","isOnDemandItemDescriptionTranslation","selectIsFeatureEnabled","selectTranslatedDescriptionState","translatedDescriptionStates","selectTranslatedDescription","beginLoadingTranslatedDescription","fetchDescription","translations","isTranslationOnDemandDisabled","setTranslationOnDemandDisabled","setTranslatedDescription","additionalDescriptions","failedLoadingTranslatedDescription","fetchItemsFromSeller","searchResultLanguageCodeIso2","_result$data$result","getItemsFromSeller","itemsMatched","setSellerItems","traderaShopSlice","mapItemDetails","sellerItems","currentDescriptionLanguageCodeIso2","translatedDescription","translatedDescriptionState","TRANSLATION_ON_DEMAND_DISABLED","resetTranslatedDescription","SERVER_ERROR","_traderaShopSlice$act","selectTraderaShop","selectCurrentDescriptionLanguageCodeIso2","cancelTokenId","initialPlaceBidResponse","info","isSuccessful","validationResult","bidToasterData","isBidding","categoryItems","shopItems","combinedShippingItems","viewItemState","myMaxBidAmount","placeBidResponse","purchaseInfo","serverSecondsLeft","isWishlistPending","viewItemSlice","resetPlaceBidResponse","setShowBiddingToaster","setIsRestricted","isRestricted","setIsInternationalWacko","wackoInfo","isInternationalWacko","setPayment","setPurchaseInfo","setBreadCrumbs","setIsBidding","setPlaceBidResponse","setBidInfo","_state$itemDetails","_state$bidInfo$bidId","_state$bidInfo","_bidInfo$bidId","_state$bidInfo2","_state$bidInfo3","_state$bidInfo4","_state$itemDetails2","contexts","currentItemId","bidInfoItemId","isFirstBidInfo","isBinPurchase","TRANSACTION_TYPES","BIN","bidId","bidStatus","getLeadingBidStatus","existingBidCount","incomingBidCount","newBidInfo","leadingBidMemberAlias","setMyMaxBidAmount","setItemState","setViewItemState","setServerSecondsLeft","setCategoryItems","setShopItems","setCombinedShippingItems","setIsWishlistPending","setPaymentAmountForBid","paymentCalculations","paymentAmountForBid","_itemDetails$descript","_itemDetails$images","img","thumbnail","multiThumbnail","normal","smallFit","mediumFit","largeFit","video","previousBidInfo","hadLeadingBid","hasLeadingBid","hasLostLeadingBid","toggleWishList","forceAdd","_itemDetails$wishList","viewItem","inWishListOldValue","wishListItemIds","inWishListNewValue","wishListCountOldValue","wishListCount","wishListCountNewValue","Number","isInteger","itemActions","shouldNotTrackEventBecauseNeedsToBeSameAsLegacyVip","showWishlistModals","sectionGaName","gaSourceScreen","SOURCE_SCREEN","VIP","gaWishlistType","analytics","finally","_viewItemSlice$action","isInternationalShippingToCountryAllowed","region","isSwedenCountryCode","isNordicCountryCode","isEuCountryCode","isCountryCode","containsCode","nordicCountryCodes","euCountryCodes","codes","c","c1","c2","toUpperCase"],"sourceRoot":""}