{"version":3,"sources":["query/ProductList.query.js","../node_modules/@scandipwa/scandipwa/src/route/SearchPage/SearchPage.config.js","../node_modules/@scandipwa/scandipwa/src/store/Breadcrumbs/Breadcrumbs.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/query/ProductList.query.js","../node_modules/@scandipwa/scandipwa/src/store/Breadcrumbs/Breadcrumbs.action.js","../packages/scandipwa-storefinder/src/store/StoreFinder/StoreFinder.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/LinkedProducts/LinkedProducts.dispatcher.js","../packages/scandipwa-storefinder/src/store/StoreFinder/index.js","../packages/scandipwa-storefinder/src/query/StoreFinder.query.js","../node_modules/@scandipwa/scandipwa/src/store/LinkedProducts/LinkedProducts.action.js","../node_modules/@scandipwa/scandipwa/src/store/Category/Category.action.js","../node_modules/@scandipwa/scandipwa/src/store/ProductListInfo/ProductListInfo.dispatcher.js","query/Cart.query.js","../node_modules/@scandipwa/scandipwa/src/query/Config.query.js","../node_modules/@scandipwa/scandipwa/src/query/Wishlist.query.js","../node_modules/@scandipwa/scandipwa/src/query/Review.query.js","../node_modules/@scandipwa/scandipwa/src/store/Product/Product.action.js","../node_modules/@scandipwa/scandipwa/src/query/Cart.query.js","../node_modules/@scandipwa/scandipwa/src/query/Region.query.js","../packages/blog/src/store/PostsDetails/PostsDetails.dispatcher.js","../packages/blog/src/store/Categories/Categories.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Category/Category.dispatcher.js","store/NewsletterSubscription/NewsletterSubscription.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Meta/Meta.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Order/Order.action.js","../node_modules/@scandipwa/scandipwa/src/query/ContactForm.query.js","../packages/blog/src/query/BlogPost.query.js","../packages/blog/src/query/BlogComments.query.js","../packages/blog/src/query/BlogCategories.query.js","../node_modules/@scandipwa/scandipwa/src/store/Checkout/Checkout.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/SearchBar/SearchBar.action.js","../node_modules/@scandipwa/scandipwa/src/query/Order.query.js","../node_modules/@scandipwa/scandipwa/src/store/Order/Order.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/util/Wishlist/Wishlist.js","../node_modules/@scandipwa/scandipwa/src/query/ProductCompare.query.js","../node_modules/@scandipwa/scandipwa/src/store/ProductList/ProductList.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Product/Product.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/SearchBar/SearchBar.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Cart/Cart.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Wishlist/Wishlist.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/util/Wishlist/index.js","../node_modules/@scandipwa/scandipwa/src/store/ProductCompare/ProductCompare.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/query/UrlRewrites.query.js","../packages/@scandipwa/flexibleforms/src/query/FlexibleForms.query.js","../packages/scandipwa-amasty-labels/src/query/ProductLabelSetting.query.js","../node_modules/@scandipwa/scandipwa/src/query/CheckEmail.query.js","query/NewsletterSubscription.query.js","../node_modules/@scandipwa/scandipwa/src/query/Category.query.js","../node_modules/@scandipwa/scandipwa/src/store/ContactForm/ContactForm.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Review/Review.dispatcher.js","../packages/blog/src/store/PostComments/PostComments.dispatcher.js","store/Cart/Cart.dispatcher.js","store/Wishlist/Wishlist.dispatcher.js","store/ProductCompare/ProductCompare.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/NoMatch/NoMatch.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/Config/Config.dispatcher.js","../packages/blog/src/store/Posts/Posts.dispatcher.js","../node_modules/@scandipwa/scandipwa/src/store/UrlRewrites/UrlRewrites.dispatcher.js","../packages/@scandipwa/flexibleforms/src/store/FlexibleForms/FlexibleForms.dispatcher.js","../packages/scandipwa-amasty-labels/src/store/ProductLabel/ProductLabelSetting/ProductLabelSetting.dispatcher.js"],"names":["Field","addField","this","_getReservationPriceField","_getTransportationPriceField","_getRegistrationPriceField","_getProductSmallField","SourceProductListQuery","ProductListQuery","NONE_SORT_OPTION_VALUE","BEST_MATCH_SORT_OPTION_VALUE","NONE_SORT_OPTION","label","__","value","breadcrumbs","dispatch","toggleBreadcrumbs","updateBreadcrumbs","category","_getCategoryBreadcrumbs","product","prevCategoryId","_getProductBreadcrumbs","title","url","name","breadcrumbsList","sort","a","b","category_level","forEach","crumb","category_url","category_name","category_is_active","push","pathname","state","reverse","categories","categoryId","find","id","reduce","acc","longestBreadcrumbsLength","breadcrumbsLength","length","breadcrumbsCategory","findCategoryById","findLongestBreadcrumbs","BreadcrumbsDispatcher","options","Error","_getProductsField","products","addFieldList","_getProductFields","_getProductArguments","arg","addArgument","key","split","from","to","filters","Object","entries","attribute","_getPriceFilter","in","categoryIds","category_id","eq","categoryUrlPath","category_url_path","priceRange","min","max","price","productsSkuArray","sku","productSKU","productID","productUrlPath","url_key","customFilters","_getCustomFilters","bind","newToDate","date","news_to_date","gteq","conditions","customerGroupId","customer_group_id","requireInfo","filterArgumentMap","_getFilterArgumentMap","currentPage","type","pageSize","handler","option","search","replace","sortKey","sortDirection","SORT_DIRECTION_TYPE","asc","filter","initialOptions","BrowserDatabase","getItem","CUSTOMER","group_id","undefined","parsedOptions","args","argumentMap","_getArgumentsMap","isSingleProduct","notRequireInfo","_getItemsField","_getSortField","_getAggregationsField","_getPageInfoField","_getStockItemField","_getProductThumbnailField","_getCartConfigurableProductFragment","_getAttributesField","_getProductLinksField","Fragment","_getConfigurableOptionsField","_getCartVariantsField","setAlias","_getCartVariantFields","_getCartProductField","isVariant","isForLinkedProducts","isForWishlist","isPlp","noAttributes","noVariants","noVariantAttributes","fields","_getPriceRangeField","_getProductImageField","_getShortDescriptionField","_getTierPricesField","_getUrlRewritesFields","_getReviewCountField","_getRatingSummaryField","_getCustomizableProductFragment","_getConfigurableProductFragment","_getBundleProductFragment","_getGroupedProductItems","_getDescriptionField","_getMediaGalleryField","_getSimpleProductFragment","_getCategoriesField","_getReviewsField","_getVirtualProductFragment","_getProductField","_getGroupedProductItemFields","_getDownloadableProductLinks","_getDownloadableProductLinkField","_getDownloadableProductSampleField","_getDownloadableProductLinksRequiredFields","_getDownloadableProductLinkFields","_getDownloadableProductSampleFields","items","_getProductInterfaceFields","_getDownloadableProductFields","_getDownloadableProductLinksRequired","_getShortDescriptionFields","_getStockItemFields","_getBreadcrumbFields","_getBreadcrumbsField","_getCategoryFields","_getDiscountField","_getFinalPriceField","_getFinalPriceExclTaxField","_getRegularPriceField","_getRegularPriceExclTaxField","_getDefaultPriceField","_getDefaultFinalPriceField","_getDefaultFinalPriceExclTaxField","_getMinimalPriceFields","_getMinimalPriceField","_getMaximalPriceField","_getPriceRangeFields","_getProductThumbnailFields","_getProductSmallFields","noSwatches","_getSwatchDataField","_getAttributeOptionField","isCart","_getAttributeOptionsField","_getAdditionalAttributeFields","_getAttributeOptionsFields","_getAttributeFields","_getVideoContentField","_getMediaThumbnailField","_getMediaBaseField","_getMediaLargeField","_getMediaGalleryFields","_getProductLinkFields","_getDescriptionFields","_getRatingsBreakdownFields","_getRatingsBreakdownField","_getReviewItemsFields","_getReviewItemsField","_getReviewsFields","_getProductBundleOptionField","_getProductBundleOptionFields","_getBundleOptionsFields","_getBundleOptionsField","_getBundleItemsFields","_getBundlePriceOptionSelectionFields","_getBundlePriceOptionFields","_getBundleItemsField","_getBundlePriceOptionsField","_getValueFields","_getValuesField","_getConfigurableOptionFields","variantsField","_getVariantFields","_getVariantsField","alias","_getCustomizableTextValueFields","_getCustomizableTextValueField","_getCustomizableTextFields","_getCustomizableFileValueField","_getCustomizableDateValueFields","_getCustomizableDateValueField","_getCustomizableDateFields","_getCustomizableSelectionValueFields","_getCustomizableSelectionValueField","_getCustomizableDropdownOption","_getCustomizableRadioOption","_getCustomizableCheckboxOption","_getCustomizableMultiOption","_getCustomizableFieldOption","_getCustomizableAreaOption","_getCustomizableFileOption","_getCustomizableDateOption","_getCustomizableProductFragmentOptionsFields","_getCustomizableProductFragmentOptionsField","_getTierPricesFields","_getBundleProductFragmentFields","_getConfigurableProductFragmentFields","_getSimpleProductFragmentFields","_getVirtualProductFragmentFields","_getSortOptionFields","_getSortOptionsField","_getSortFields","_getSwatchDataFields","_getAggregationsFields","_getAggregationsOptionsField","_getAggregationsOptionsFields","UPDATE_BREADCRUMBS","TOGGLE_BREADCRUMBS","areBreadcrumbsVisible","getStores","updateStoreFinder","error","updateNoMatch","query","StoreFinderQuery","getQuery","executePost","prepareQuery","then","showNotification","message","QueryDispatcher","StoreFinderDispatcher","LINKED_PRODUCTS","ONE_MONTH_IN_SECONDS","data","product_links","linkedProducts","_processResponse","setItem","updateLinkedProducts","relatedSKUs","links","link","linked_product_sku","updateCrossSell","upsell","total_count","related","crosssell","prepareRequest","fetchQuery","assign","indexedBySku","item","getIndexedProduct","link_type","associated","LinkedProductsDispatcher","UPDATE_LINKED_PRODUCTS","UPDATE_CURRENT_CATEGORY","updateCurrentCategory","updateProductListInfo","updateInfoLoadStatus","ProductListInfoDispatcher","SourceCartQuery","CartQuery","_getStoreListFields","_getCheckoutAgreementFields","getCurrencyField","newCurrency","getCurrencyData","_getStoreConfigFields","_getTimeDateFormatFields","getPriceDisplayTypeField","ConfigQuery","wishlistId","wishlistItems","_getWishlistErrorsField","_getWishlistErrorsFields","sharingCode","field","_getWishlistFields","input","isSignedIn","guestQuoteId","getGuestQuoteId","item_id","_getItemOptionsFields","_getItemOptionsField","_getWishlistItemsFields","_getItemsFields","WishlistQuery","reviewItem","_getRatingFields","_getRatingItemsField","_getRatingItemsFields","_getRatingOptionsField","_getRatingOptionFields","ReviewQuery","UPDATE_PRODUCT_DETAILS","updateProductDetails","cartId","cartItems","_getUserErrorsField","_getCartUpdateField","quoteId","_getCartTotalsFields","_getUserErrorsFields","mutation","_getRemoveCartItemFields","couponCode","getCartQuery","_getCartDisplayConfigFields","sourceCartId","destinationCartId","_getCartItemsField","_getAppliedTaxesField","_getBundleOptionValuesFields","_getBundleOptionValuesField","_getCustomizableOptionValueFields","_getCustomizableOptionValueField","_getDownloadableLinksFields","_getCustomizableOptionsFields","_getDownloadableLinksField","_getCartProductInterfaceFields","_getCartItemFields","_getAppliedTaxesRatesField","_getAppliedTaxesRatesFields","_getCountryFields","_getAvailableRegionsField","_getAvailableRegionFields","RegionQuery","post","keys","postLinks","related_products","map","buildProductLink","default","handleData","updateSinglePost","BlogPostQuery","index","position","PostsDetailsDispatcher","updateCategories","BlogCategories","CategoriesDispatcher","isSearchPage","CategoryQuery","CategoryDispatcher","NOT_ACTIVE","email","newsletterOptions","fetchMutation","NewsletterSubscriptionQuery","getSubscribeToNewsletterMutation","status","subscribeEmailToNewsletter","getErrorMessage","NewsletterSubscriptionDispatcher","meta","_getCategoryMeta","updateMeta","_getProductMeta","meta_title","meta_keyword","canonical_url","description","meta_description","keywords","window","location","origin","appendWithStoreCode","meta_keywords","meta_robots","robots","MetaDispatcher","GET_ORDER_LIST","SET_ORDER_LOADING_STATUS","getOrderList","orderList","setLoadingStatus","_addSendContactFormMutationArguments","_getSendContactFormMutationResponse","_getContactPageConfigFields","ContactFormQuery","postField","getBasicDetails","getDescription","getMedia","getRelated","author","authorField","relatedPosts","relatedPostsField","metaFields","tagField","replyDepth","getCommentsItemField","getCommentsItemFields","commentData","getCommentsField","BlogCommentsQuery","itemField","page","pageField","BlogCategoriesQuery","is_email_available","isEmailAvailable","updateEmailAvailable","CheckEmailQuery","getIsEmailAvailableQuery","CheckoutDispatcher","UPDATE_SEARCH_BAR","UPDATE_SEARCH_LOAD_STATUS","CLEAR_SEARCH_RESULTS","updateSearchBar","result","updateLoadStatus","isLoading","clearSearchResults","incrementId","_getReorderField","_getSubscribeToOrderStatusOutputFields","_getOrderListFields","_getOrdersField","orderId","ordersField","entity_id","_getOrdersFields","isSingleOrder","_getOrderItemsField","_getSearchResultPageInfoField","_getSearchResultPageInfoFields","_getOrderItemsFields","basicFields","_getOrderItemTotalField","_getSingleOrderFields","_getOrderShipmentsField","_getOrderItemsProductsField","_getOrderInvoicesField","_getOrderRefundsField","_getOrderShippingAddressField","_getOrderBillingAddressField","_getOrderPaymentMethodsField","_getOrderShippingMethodField","_getOrderCommentsField","_getOrderCommentsFields","_getOrderItemTotalFields","_getOrderGrandTotalField","_getOrderDiscountsField","_getOrderBaseGrantTotalField","_getOrderSubtotalField","_getOrderTotalShippingField","_getOrderTotalTaxField","_getOrderShippingHandlingField","_getOrderTaxesField","_getOrderTaxesFields","_getOrderAmountField","_getOrderShippingHandlingFields","_getOrderShippingAmountExclTaxField","_getOrderShippingAmountInclTaxField","_getOrderShippingDiscountsField","_getOrderShippingHandlingTotalField","_getOrderShippingDiscountsFields","_getOrderPriceFields","_getOrderShipmentsFields","_getOrderShipmentTrackingField","_getShipmentsItemsProductsField","_getShipmentsItemsProductsFields","_getBaseOrderItemProductsFields","_getOrderShipmentTrackingFields","_getOrderRefundsFields","_getRefundsItemsProductsField","_getOrderDiscountsFields","_getRefundsItemsProductsFields","_getRefundsItemInformationField","_getOrderProductRowSubtotalField","_getOrderItemProductsFields","_getOrderInvoicesFields","_getInvoiceItemsProductsField","_getInvoiceItemProductsFields","_getOrderProductEnteredOptionsField","_getOrderProductSelectedOptionsField","_getOrderProductSalePriceField","_getOrderProductOptionsFields","_getOrderProductBundleOptionItemsField","_getOrderProductBundleOptionItemsFields","_getReorderFields","_getOrderAddressFields","_getOrderAddressStreetField","_getOrderPaymentMethodsFields","_getOrderPaymentMethodAdditionalField","_getOrderPaymentMethodAdditionalFields","_getDownloadableField","_getOrderByIdField","customerEmail","_getDownloadableFields","OrderQuery","CartDispatcher","getOrderListQuery","orders","customer","handleReorderMutation","reorderItems","userInputErrors","updateInitialCartData","history","getReorder","OrderDispatcher","getPriceRange","priceWithoutTax","currency","price_range","minimum_price","regular_price","priceCurrencyValue","priceCurrencyValueExclTax","priceSection","final_price","final_price_excl_tax","regular_price_excl_tax","default_final_price_excl_tax","maximum_price","_getCompareListFields","uid","_getAssignFields","_getAssignCompareListField","_getComparableItemIdsField","_getCompareAttributeField","_getComparableItemField","_getCompareAttributeFields","_getComparableItemAttributeFields","_getCompareProductField","_getComparableItemAttributeField","_getProductIdsField","_getProductIdsFields","_getComparableItemFields","_getComparableItemIdsFields","ProductCompareQuery","page_info","total_pages","isNext","appendPage","updateProductListItems","updatePageLoadingStatus","ProductListDispatcher","values","dispatcher","clearLinkedProducts","_","ProductDispatcher","SearchBarDispatcher","_getGuestQuoteId","cartData","_updateCartData","createGuestEmptyCart","getCreateEmptyCartMutation","createEmptyCart","setGuestQuoteId","getMergeCartQuery","mergeCarts","quantity","originalCartId","Promise","reject","getUpdateCartItemsMutation","cart_id","cart_items","cart_item_uid","userCartId","Array","isArray","getAddProductToCartMutation","addProductsToCart","user_errors","errors","resolve","isCustomerSignedIn","getRemoveCartItemMutation","removeCartItem","getApplyCouponMutation","applyCoupon","getRemoveCouponMutation","removeCoupon","variants","variantSku","childProductLinks","fetchCrossSellProducts","clearCrossSellProducts","updateTotals","configurableVariantIndex","attributeValue","isWishlistEnabled","getStore","getState","ConfigReducer","wishlist_general_active","_syncWishlistWithBE","updateAllProductsInWishlist","getWishlistQuery","wishlist","productsToAdd","prev","wishlistItem","price_without_tax","buy_request","qty","updateIsLoading","addProductsToWishlist","updateProductsInWishlist","getClearWishlist","clearWishlist","catch","getMoveWishlistToCart","noMessages","getRemoveProductFromWishlistMutation","removeItemFromWishlist","itemIdMap","WishlistDispatcher","getUid","toggleLoader","getCompareList","compareList","setCompareList","productId","getCreateCompareList","createCompareList","setUid","getAddProductsToCompareList","addProductsToCompareList","addToCompareList","getRemoveProductsFromCompareList","removeProductsFromCompareList","getCreateEmptyCompareList","fetchCustomersList","removeUid","getAssignCompareList","assignCompareListToCustomer","compare_list","newUid","getDeleteCompareList","clearComparedProducts","getCompareListIds","compareIds","setCompareListIds","updateCompareTotals","ProductCompareDispatcher","urlParam","_getUrlResolverFields","UrlRewritesQuery","getConfigField","getAllFormsData","form_id","getForm","getConfigFields","getAllFormsFields","getFormFields","getSelectOptionsField","FlexibleFormsQuery","ProductLabelSettingQuery","_getPageFields","_getConditionalArguments","_getDefaultFields","_getChildrenFields","_getCmsBlockFields","_getCmsBlockField","form","getSendContactFormMutation","updateContactForm","contactForm","reset","ContactFormDispatcher","rating_data","product_sku","detail","nickname","summary","text","ratings","value_id","getAddProductReviewMutation","prepareReviewData","ReviewDispatcher","blogComments","updateComments","PostCommentsDispatcher","SourceCartDispatcher","SourceWishlistDispatcher","SourceProductCompareDispatcher","noMatch","NoMatchDispatcher","updateConfig","getCountriesQuery","getRatingQuery","getCheckoutAgreements","getCartDisplayConfig","currencyCode","getSaveSelectedCurrencyMutation","setCurrency","ConfigDispatcher","posts","updatePosts","postsException","BlogPostsQuery","PostsDispatcher","urlResolver","updateUrlRewrite","notFound","setIsUrlRewritesLoading","processUrlOptions","trimmedParam","RegExp","storeRegexText","UrlRewritesDispatcher","promise","rawQueries","queries","cancel","makeCancelable","onSuccess","onError","listenForBroadCast","onUpdate","updateFlexibleForms","getFormQuery","FlexibleFormsDispatcher","updateProductLabelSetting","ProductLabelSettingDispatcher"],"mappings":"kOAIO,iIAAP,OAAO,sDACH,WACI,OAAO,IAAIA,IAAM,qBACZC,SAAS,YACTA,SAAS,WAJtB,0CAOI,WACI,OAAO,IAAID,IAAM,wBACZC,SAAS,YACTA,SAAS,WAVtB,wCAaI,WACI,OAAO,IAAID,IAAM,sBACZC,SAAS,YACTA,SAAS,WAhBtB,oCAmBI,WACI,MAAM,GAAN,oGAEIC,KAAKC,4BACLD,KAAKE,+BACLF,KAAKG,iCAxBjB,oCA4BI,WACI,MAAM,GAAN,oGAEIH,KAAKE,+BACLF,KAAKG,iCAhCjB,4CAoCI,WACI,MAAM,GAAN,4GAEIH,KAAKI,8BAvCjB,EAAO,CAAP,aAAsCC,MAAtC,qCA4Ce,QAAIC,I,4DChDnB,kHAYO,IAAMC,EAAyB,OACzBC,EAA+B,WAE/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as SourceProductListQuery } from 'SourceQuery/ProductList.query';\nimport { Field } from 'Util/Query';\n\n/** @namespace Scandipwa/Query/ProductList/Query */\nexport class ProductListQuery extends SourceProductListQuery {\n _getReservationPriceField() {\n return new Field('reservation_price')\n .addField('currency')\n .addField('value');\n }\n\n _getTransportationPriceField() {\n return new Field('transportation_price')\n .addField('currency')\n .addField('value');\n }\n\n _getRegistrationPriceField() {\n return new Field('registration_price')\n .addField('currency')\n .addField('value');\n }\n\n _getMinimalPriceFields() {\n return [\n ...super._getMinimalPriceFields(),\n this._getReservationPriceField(),\n this._getTransportationPriceField(),\n this._getRegistrationPriceField()\n ];\n }\n\n _getMaximalPriceFields() {\n return [\n ...super._getMaximalPriceFields(),\n this._getTransportationPriceField(),\n this._getRegistrationPriceField()\n ];\n }\n\n _getCartProductInterfaceFields() {\n return [\n ...super._getCartProductInterfaceFields(),\n this._getProductSmallField()\n ];\n }\n}\n\nexport default new ProductListQuery();\n","/* eslint-disable import/prefer-default-export */\n/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const NONE_SORT_OPTION_VALUE = 'none';\nexport const BEST_MATCH_SORT_OPTION_VALUE = 'position';\n\nexport const NONE_SORT_OPTION = {\n label: __('None'),\n value: NONE_SORT_OPTION_VALUE\n};\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { toggleBreadcrumbs, updateBreadcrumbs } from 'Store/Breadcrumbs/Breadcrumbs.action';\n\n/**\n * Breadcrumbs Dispatcher\n * @class BreadcrumbsDispatcher\n * @namespace Store/Breadcrumbs/Dispatcher\n */\nexport class BreadcrumbsDispatcher {\n /**\n * Set breadcrumbs\n * @param {Array} breadcrumbs Breadcrumbs array\n * @param {Function} dispatch\n * @memberof BreadcrumbsDispatcher\n */\n update(breadcrumbs, dispatch) {\n dispatch(toggleBreadcrumbs(true));\n dispatch(updateBreadcrumbs(breadcrumbs));\n }\n\n /**\n * Set breadcrumbs for category\n * @param {Array} category Category breadcumbs items\n * @param {Function} dispatch\n * @memberof BreadcrumbsDispatcher\n */\n updateWithCategory(category, dispatch) {\n const breadcrumbs = this._getCategoryBreadcrumbs(category);\n dispatch(toggleBreadcrumbs(true));\n dispatch(updateBreadcrumbs(breadcrumbs));\n }\n\n /**\n * Set breadcrumbs for category\n * @param product\n * @param prevCategoryId\n * @param {Function} dispatch\n * @memberof BreadcrumbsDispatcher\n */\n updateWithProduct(product, prevCategoryId, dispatch) {\n const breadcrumbs = this._getProductBreadcrumbs(product, prevCategoryId);\n dispatch(toggleBreadcrumbs(true));\n dispatch(updateBreadcrumbs(breadcrumbs));\n }\n\n /**\n * Set breadcrumbs for category\n * @param {Array} category Category breadcumbs items\n * @param {Function} dispatch\n * @memberof BreadcrumbsDispatcher\n */\n updateWithCmsPage({ title }, dispatch) {\n const breadcrumbs = title\n ? [\n {\n url: '',\n name: title\n }\n ]\n : [];\n\n dispatch(updateBreadcrumbs(breadcrumbs));\n }\n\n /**\n * Get breadcrumbs for category\n * @param {Object} category Category breadcumbs items\n * @return {Array} Breadcrumbs array\n * @memberof BreadcrumbsDispatcher\n */\n _getCategoryBreadcrumbs(category) {\n const { url, name, breadcrumbs } = category;\n const breadcrumbsList = [];\n\n if (breadcrumbs) {\n breadcrumbs\n .sort((a, b) => a.category_level - b.category_level)\n .forEach((crumb) => {\n const { category_url, category_name, category_is_active } = crumb;\n\n // do not add link to inactive categories\n if (category_is_active) {\n breadcrumbsList.push({\n name: category_name,\n url: {\n pathname: category_url,\n state: { category: true }\n }\n });\n } else {\n breadcrumbsList.push({\n url: '',\n name: category_name\n });\n }\n });\n }\n\n return [\n { url, name },\n ...breadcrumbsList.reverse()\n ];\n }\n\n findCategoryById(categories, categoryId) {\n return categories.find(({ id }) => id === categoryId);\n }\n\n findLongestBreadcrumbs(categories) {\n const { breadcrumbsCategory = {} } = categories.reduce((acc, category) => {\n const { longestBreadcrumbsLength } = acc;\n const { breadcrumbs } = category;\n const breadcrumbsLength = (breadcrumbs || []).length;\n\n if (!breadcrumbsLength && longestBreadcrumbsLength !== 0) {\n return acc;\n }\n\n if (longestBreadcrumbsLength === 0) {\n return { ...acc, breadcrumbsCategory: category };\n }\n\n if (breadcrumbsLength <= longestBreadcrumbsLength) {\n return acc;\n }\n\n return {\n breadcrumbsCategory: category,\n longestBreadcrumbsLength: breadcrumbsLength\n };\n }, {\n breadcrumbsCategory: {},\n longestBreadcrumbsLength: 0\n });\n\n return breadcrumbsCategory;\n }\n\n /**\n * Get breadcrumbs for product\n *\n * @param {Object} product Product breadcumbs items\n * @param prevCategoryId\n * @return {Array} Breadcrumbs array\n * @memberof BreadcrumbsDispatcher\n */\n _getProductBreadcrumbs(product, prevCategoryId = null) {\n const { categories, url, name } = product;\n\n if (!categories) {\n return [];\n }\n\n if (!categories.length) {\n return [{ url, name }];\n }\n\n return [\n { url, name },\n ...this._getCategoryBreadcrumbs(\n this.findCategoryById(categories, prevCategoryId)\n || this.findLongestBreadcrumbs(categories)\n )\n ];\n }\n}\n\nexport default new BreadcrumbsDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { SORT_DIRECTION_TYPE } from 'Route/CategoryPage/CategoryPage.config';\nimport { NONE_SORT_OPTION_VALUE } from 'Route/SearchPage/SearchPage.config';\nimport { CUSTOMER } from 'Store/MyAccount/MyAccount.dispatcher';\nimport BrowserDatabase from 'Util/BrowserDatabase';\nimport { Field, Fragment } from 'Util/Query';\n\n/**\n * Product List Query\n * @class ProductListQuery\n * @namespace Query/ProductList/Query */\nexport class ProductListQuery {\n __construct() {\n super.__construct();\n this.options = {};\n }\n\n getQuery(options) {\n if (!options) {\n throw new Error('Missing argument `options`');\n }\n\n this.options = options;\n\n return this._getProductsField();\n }\n\n _getProductsField() {\n const products = new Field('products')\n .addFieldList(this._getProductFields());\n\n this._getProductArguments().forEach((arg) => products.addArgument(...arg));\n\n return products;\n }\n\n _getPriceFilter(key, value) {\n const [from, to] = value[0].split('_');\n\n if (from === '*') {\n return { [key]: { to } };\n }\n\n if (to === '*') {\n return { [key]: { from } };\n }\n\n return {\n [key]: { from, to }\n };\n }\n\n _getCustomFilters(filters = {}) {\n return Object.entries(filters)\n .reduce((acc, [key, attribute]) => {\n if (!attribute.length) {\n return acc;\n }\n\n if (key === 'price') {\n return {\n ...acc,\n ...this._getPriceFilter(key, attribute)\n };\n }\n\n return {\n ...acc,\n [key]: { in: attribute }\n };\n }, {});\n }\n\n _getFilterArgumentMap() {\n return {\n categoryIds: (id) => ({ category_id: { eq: id } }),\n categoryUrlPath: (url) => ({ category_url_path: { eq: url } }),\n priceRange: ({ min, max }) => {\n const price = {};\n\n if (min) {\n price.from = min;\n }\n\n if (max) {\n price.to = max;\n }\n\n return { price };\n },\n productsSkuArray: (sku) => ({ sku: { in: sku } }),\n productSKU: (sku) => ({ sku: { eq: sku } }),\n productID: (id) => ({ id: { eq: id } }),\n productUrlPath: (url) => ({ url_key: { eq: url } }),\n customFilters: this._getCustomFilters.bind(this),\n newToDate: (date) => ({ news_to_date: { gteq: date } }),\n conditions: (conditions) => ({ conditions: { eq: conditions } }),\n customerGroupId: (id) => ({ customer_group_id: { eq: id } })\n };\n }\n\n _getArgumentsMap() {\n const { requireInfo } = this.options;\n const filterArgumentMap = this._getFilterArgumentMap();\n\n return {\n currentPage: { type: 'Int!' },\n pageSize: {\n type: 'Int!',\n handler: (option) => (requireInfo ? 1 : option)\n },\n search: {\n type: 'String!',\n handler: (option) => option.replace(/\\+/g, ' ')\n },\n sort: {\n type: 'ProductAttributeSortInput!',\n handler: ({ sortKey, sortDirection }) => {\n if (sortKey === NONE_SORT_OPTION_VALUE) {\n return {};\n }\n\n return { [sortKey]: sortDirection || SORT_DIRECTION_TYPE.asc };\n }\n },\n filter: {\n type: 'ProductAttributeFilterInput!',\n handler: (initialOptions = {}) => {\n // add customer group by default to all requests\n const { group_id } = BrowserDatabase.getItem(CUSTOMER) || {};\n\n const options = {\n ...initialOptions,\n customerGroupId: group_id || '0'\n };\n\n const {\n customFilters: { category_id } = {}\n } = options;\n\n /**\n * Remove category ID from select, if there is a custom filter\n * of category already selected in filtering options.\n */\n if (category_id) {\n // eslint-disable-next-line fp/no-delete\n options.categoryIds = undefined;\n }\n\n const parsedOptions = Object.entries(options).reduce(\n (acc, [key, option]) => {\n // if there is no value, or if the key is just not present in options object\n if (!option || !filterArgumentMap[key]) {\n return acc;\n }\n\n return { ...acc, ...filterArgumentMap[key](option) };\n },\n {}\n );\n\n return parsedOptions;\n }\n }\n };\n }\n\n _getProductArguments() {\n const { args } = this.options;\n const argumentMap = this._getArgumentsMap();\n\n return Object.entries(args).reduce((acc, [key, arg]) => {\n if (!arg) {\n return acc;\n }\n const { type, handler = (option) => option } = argumentMap[key];\n\n return [...acc, [key, type, handler(arg)]];\n }, []);\n }\n\n _getProductFields() {\n const { requireInfo, isSingleProduct, notRequireInfo } = this.options;\n\n // do not request total count for PDP\n if (isSingleProduct || notRequireInfo) {\n return [\n this._getItemsField()\n ];\n }\n\n // for filters only request\n if (requireInfo) {\n return [\n this._getSortField(),\n this._getAggregationsField()\n ];\n }\n\n return [\n 'total_count',\n this._getItemsField(),\n this._getPageInfoField()\n ];\n }\n\n _getCartProductInterfaceFields() {\n return [\n 'uid',\n 'id',\n 'sku',\n 'name',\n 'type_id',\n 'stock_status',\n 'url',\n 'salable_qty',\n this._getStockItemField(),\n this._getProductThumbnailField(),\n this._getCartConfigurableProductFragment(),\n this._getAttributesField(false, true),\n this._getProductLinksField()\n ];\n }\n\n _getCartConfigurableProductFragment() {\n return new Fragment('ConfigurableProduct')\n .addFieldList([\n this._getConfigurableOptionsField(),\n this._getCartVariantsField()\n ]);\n }\n\n _getCartVariantsField() {\n return new Field('variants')\n .setAlias('variants')\n .addFieldList(this._getCartVariantFields());\n }\n\n _getCartVariantFields() {\n return [\n this._getCartProductField()\n ];\n }\n\n _getCartProductField() {\n return new Field('product')\n .addFieldList([\n 'id',\n 'sku',\n 'stock_status',\n 'salable_qty',\n this._getStockItemField(),\n this._getProductThumbnailField(),\n this._getAttributesField(true, true)\n ]);\n }\n\n _getProductInterfaceFields(isVariant, isForLinkedProducts = false, isForWishlist = false) {\n const {\n isPlp = false,\n isSingleProduct,\n noAttributes = false,\n noVariants = false,\n noVariantAttributes = false\n } = this.options;\n\n // set option to always request images for product variants if they're requested for wishlist\n if (isForWishlist) {\n this.options.isForWishlist = true;\n }\n\n // Basic fields returned always\n const fields = [\n 'uid',\n 'id',\n 'sku',\n 'name',\n 'type_id',\n 'stock_status',\n 'salable_qty',\n this._getStockItemField(),\n this._getPriceRangeField()\n ];\n\n // Additional fields, which we want to return always, except when it's variants on PLP (due to hugh number of items)\n if (!(isPlp && isVariant) || isForWishlist) {\n fields.push(\n this._getProductImageField(),\n this._getProductThumbnailField(),\n this._getProductSmallField(),\n this._getShortDescriptionField(),\n 'special_from_date',\n 'special_to_date',\n this._getTierPricesField()\n );\n }\n\n // if it is normal product and we need attributes\n // or if, it is variant, but we need variant attributes or variants them-self\n if ((!isVariant && !noAttributes) || (isVariant && !noVariantAttributes && !noVariants)) {\n fields.push(this._getAttributesField(isVariant));\n }\n\n // to all products (non-variants)\n if (!isVariant) {\n fields.push(\n 'url',\n this._getUrlRewritesFields(),\n this._getReviewCountField(),\n this._getRatingSummaryField(),\n this._getCustomizableProductFragment()\n );\n\n // if variants are not needed\n if (!noVariants) {\n fields.push(\n this._getConfigurableProductFragment(),\n this._getBundleProductFragment(),\n this._getGroupedProductItems()\n );\n }\n }\n\n // prevent linked products from looping\n if (isForLinkedProducts) {\n fields.push(this._getProductLinksField());\n }\n\n // additional information to PDP loads\n if (isSingleProduct) {\n fields.push(\n 'stock_status',\n this._getDescriptionField(),\n this._getMediaGalleryField(),\n this._getSimpleProductFragment()\n );\n\n // for variants of PDP requested product\n if (!isVariant) {\n fields.push(\n 'canonical_url',\n 'meta_title',\n 'meta_keyword',\n 'meta_description',\n this._getCategoriesField(),\n this._getReviewsField(),\n this._getVirtualProductFragment(),\n this._getCustomizableProductFragment(),\n this._getProductLinksField()\n );\n }\n }\n\n return fields;\n }\n\n /**\n * For grouped products, returns the subfields of the elements of the `items` field\n * @returns {*[]}\n * @private\n */\n _getGroupedProductItemFields() {\n return [\n this._getProductField(),\n 'position',\n 'qty'\n ];\n }\n\n /**\n * A GroupedProduct-specific field that queries the products that are grouped under this product\n * @returns {Field}\n * @private\n */\n _getGroupedProductItems() {\n return new Fragment('GroupedProduct').addField(\n new Field('items')\n .addFieldList(this._getGroupedProductItemFields())\n );\n }\n\n /**\n * A DownloadableProduct-specific field that queries the links and samples\n * @returns {Field}\n * @private\n */\n _getDownloadableProductFields() {\n return new Fragment('DownloadableProduct')\n .addFieldList(this._getDownloadableProductLinks());\n }\n\n _getDownloadableProductLinks() {\n return [\n 'links_title',\n 'samples_title',\n 'links_purchased_separately',\n this._getDownloadableProductLinkField(),\n this._getDownloadableProductSampleField()\n ];\n }\n\n _getDownloadableProductLinksRequired() {\n return new Fragment('DownloadableProduct')\n .addFieldList(this._getDownloadableProductLinksRequiredFields());\n }\n\n _getDownloadableProductLinksRequiredFields() {\n return [\n 'links_purchased_separately'\n ];\n }\n\n _getDownloadableProductLinkField() {\n return new Field('downloadable_product_links')\n .addFieldList(this._getDownloadableProductLinkFields());\n }\n\n _getDownloadableProductLinkFields() {\n return [\n 'sample_url',\n 'sort_order',\n 'title',\n 'id',\n 'uid',\n 'price'\n ];\n }\n\n _getDownloadableProductSampleField() {\n return new Field('downloadable_product_samples')\n .addFieldList(this._getDownloadableProductSampleFields());\n }\n\n _getDownloadableProductSampleFields() {\n return [\n 'title',\n 'sort_order',\n 'sample_url'\n ];\n }\n\n _getItemsField() {\n const { isSingleProduct } = this.options;\n\n const items = new Field('items')\n .addFieldList(this._getProductInterfaceFields());\n\n if (isSingleProduct) {\n // items.addField(this._getGroupedProductItems());\n items.addField(this._getDownloadableProductFields());\n } else {\n items.addField(this._getDownloadableProductLinksRequired());\n }\n\n return items;\n }\n\n _getProductField() {\n const { isForLinkedProducts, isForWishlist = false } = this.options;\n\n return new Field('product')\n .addFieldList(this._getProductInterfaceFields(true, isForLinkedProducts, isForWishlist));\n }\n\n _getShortDescriptionFields() {\n return [\n 'html'\n ];\n }\n\n _getShortDescriptionField() {\n return new Field('short_description')\n .addFieldList(this._getShortDescriptionFields());\n }\n\n _getStockItemField() {\n return new Field('stock_item')\n .addFieldList(this._getStockItemFields());\n }\n\n _getStockItemFields() {\n return [\n 'in_stock',\n 'min_sale_qty',\n 'max_sale_qty',\n 'qty_increments'\n ];\n }\n\n _getBreadcrumbFields() {\n return [\n 'category_id',\n 'category_name',\n 'category_level',\n 'category_url',\n 'category_is_active'\n ];\n }\n\n _getBreadcrumbsField() {\n return new Field('breadcrumbs')\n .addFieldList(this._getBreadcrumbFields());\n }\n\n _getCategoryFields() {\n return [\n 'id',\n 'name',\n 'url',\n this._getBreadcrumbsField()\n ];\n }\n\n _getCategoriesField() {\n return new Field('categories')\n .addFieldList(this._getCategoryFields());\n }\n\n _getMinimalPriceFields() {\n return [\n this._getDiscountField(),\n this._getFinalPriceField(),\n this._getFinalPriceExclTaxField(),\n this._getRegularPriceField(),\n this._getRegularPriceExclTaxField(),\n this._getDefaultPriceField(),\n this._getDefaultFinalPriceField(),\n this._getDefaultFinalPriceExclTaxField()\n ];\n }\n\n _getMinimalPriceField() {\n return new Field('minimum_price')\n .addFieldList(this._getMinimalPriceFields());\n }\n\n _getMaximalPriceField() {\n return new Field('maximum_price')\n .addFieldList(this._getMinimalPriceFields());\n }\n\n _getPriceRangeFields() {\n // Using an array as potentially would want to add maximum price\n return [\n this._getMinimalPriceField(),\n this._getMaximalPriceField()\n ];\n }\n\n _getPriceRangeField() {\n return new Field('price_range')\n .addFieldList(this._getPriceRangeFields());\n }\n\n /**\n * @returns {[string]} an array representing the subfields of the product thumbnail\n * @private\n */\n _getProductThumbnailFields() {\n return [\n 'path',\n 'url'\n ];\n }\n\n _getProductSmallFields() {\n return this._getProductThumbnailFields();\n }\n\n /**\n * Returns the field for fetching the thumbnail of a product.\n * Not to be confused with the media thumbnail field, which has the same name but is a subfield of media_gallery_entries\n * @returns {Field}\n * @private\n */\n _getProductThumbnailField() {\n return new Field('thumbnail')\n .addFieldList(this._getProductThumbnailFields());\n }\n\n _getProductSmallField() {\n return new Field('small_image')\n .addFieldList(this._getProductSmallFields());\n }\n\n _getProductImageField() {\n return new Field('image')\n .addFieldList(this._getProductThumbnailFields());\n }\n\n _getAttributeOptionField(noSwatches) {\n return [\n 'label',\n 'value',\n !noSwatches && this._getSwatchDataField()\n ];\n }\n\n _getAttributeOptionsField(noSwatches) {\n return new Field('attribute_options')\n .addFieldList(this._getAttributeOptionField(noSwatches));\n }\n\n _getAdditionalAttributeFields(isCart) {\n if (isCart) {\n return [];\n }\n\n return [\n 'attribute_type',\n 'attribute_group_id',\n 'attribute_group_name'\n ];\n }\n\n _getAttributeOptionsFields(isVariant) {\n if (isVariant) {\n return [];\n }\n\n return [\n this._getAttributeOptionsField()\n ];\n }\n\n _getAttributeFields(isVariant = false, isCart = false) {\n return [\n 'attribute_id',\n 'attribute_value',\n 'attribute_code',\n 'attribute_label',\n ...this._getAdditionalAttributeFields(isCart),\n ...this._getAttributeOptionsFields(isVariant)\n ];\n }\n\n _getAttributesField(isVariant, isCart) {\n return new Field('s_attributes')\n .setAlias('attributes')\n .addFieldList(this._getAttributeFields(isVariant, isCart));\n }\n\n _getMediaGalleryFields() {\n return [\n 'id',\n 'file',\n 'label',\n 'position',\n 'disabled',\n 'media_type',\n 'types',\n this._getVideoContentField(),\n this._getMediaThumbnailField(),\n this._getMediaBaseField(),\n this._getMediaLargeField()\n ];\n }\n\n /**\n * Returns a field querying video-specific data for a media gallery entry.\n * @returns {Field} the video_content field\n * @private\n */\n _getVideoContentField() {\n return new Field('video_content').addFieldList([\n 'media_type',\n 'video_description',\n 'video_metadata',\n 'video_provider',\n 'video_title',\n 'video_url'\n ]);\n }\n\n /**\n * Returns a field querying the thumbnail of a media gallery entry.\n * Not to be confused with the product thumbnail field, which has the same name but is a direct subfield of the product\n * @returns {Field}\n * @private\n */\n _getMediaThumbnailField() {\n return new Field('thumbnail').addField('url');\n }\n\n _getMediaBaseField() {\n return new Field('base').addField('url');\n }\n\n _getMediaLargeField() {\n return new Field('large').addField('url');\n }\n\n _getMediaGalleryField() {\n return new Field('media_gallery_entries')\n .addFieldList(this._getMediaGalleryFields());\n }\n\n _getProductLinksField() {\n return new Field('product_links')\n .addFieldList(this._getProductLinkFields());\n }\n\n _getDescriptionFields() {\n return [\n 'html'\n ];\n }\n\n _getDescriptionField() {\n return new Field('description')\n .addFieldList(this._getDescriptionFields());\n }\n\n _getUrlRewritesFields() {\n return new Field('url_rewrites')\n .addFieldList(['url']);\n }\n\n _getProductLinkFields() {\n return [\n 'position',\n 'link_type',\n 'linked_product_sku'\n ];\n }\n\n _getRatingsBreakdownFields() {\n return [\n new Field('name').setAlias('rating_code'),\n 'value'\n ];\n }\n\n _getRatingsBreakdownField() {\n return new Field('ratings_breakdown')\n .setAlias('rating_votes')\n .addFieldList(this._getRatingsBreakdownFields());\n }\n\n _getReviewItemsFields() {\n return [\n 'average_rating',\n 'nickname',\n new Field('summary').setAlias('title'),\n new Field('text').setAlias('detail'),\n 'created_at',\n this._getRatingsBreakdownField()\n ];\n }\n\n _getReviewItemsField() {\n return new Field('items')\n .addFieldList(this._getReviewItemsFields());\n }\n\n _getReviewsFields() {\n return [\n this._getReviewItemsField()\n ];\n }\n\n _getReviewsField() {\n return new Field('reviews')\n // Hard-coded pages, it will be very hard to\n // paginate using current implementation\n // eslint-disable-next-line no-magic-numbers\n .addArgument('pageSize', 'Int', 20)\n .addArgument('currentPage', 'Int', 1)\n .addFieldList(this._getReviewsFields());\n }\n\n _getReviewCountField() {\n return new Field('review_count');\n }\n\n _getRatingSummaryField() {\n return new Field('rating_summary');\n }\n\n _getBundleOptionsFields() {\n return [\n 'uid',\n 'label',\n 'quantity',\n 'position',\n 'is_default',\n 'price',\n 'price_type',\n 'can_change_quantity',\n this._getProductBundleOptionField()\n ];\n }\n\n _getProductBundleOptionField() {\n return new Field('product')\n .addFieldList(this._getProductBundleOptionFields());\n }\n\n _getProductBundleOptionFields() {\n return [\n 'name',\n 'stock_status',\n this._getPriceRangeField()\n ];\n }\n\n _getBundleOptionsField() {\n return new Field('options')\n .addFieldList(this._getBundleOptionsFields());\n }\n\n _getBundleItemsFields() {\n return [\n 'uid',\n 'option_id',\n 'title',\n 'required',\n 'type',\n 'position',\n 'sku',\n this._getBundleOptionsField()\n ];\n }\n\n _getBundleItemsField() {\n return new Field('items')\n .addFieldList(this._getBundleItemsFields());\n }\n\n _getBundlePriceOptionSelectionFields() {\n return [\n 'selection_id',\n 'final_option_price',\n 'final_option_price_excl_tax',\n 'regular_option_price',\n 'regular_option_price_excl_tax'\n ];\n }\n\n _getBundlePriceOptionFields() {\n return [\n 'option_id',\n new Field('selection_details')\n .addFieldList(this._getBundlePriceOptionSelectionFields())\n ];\n }\n\n _getBundlePriceOptionsField() {\n return new Field('bundle_options')\n .addFieldList(this._getBundlePriceOptionFields());\n }\n\n _getBundleProductFragmentFields() {\n return [\n 'dynamic_price',\n 'dynamic_sku',\n 'ship_bundle_items',\n 'dynamic_weight',\n this._getBundleItemsField(),\n this._getBundlePriceOptionsField()\n ];\n }\n\n _getValueFields() {\n return [\n 'value_index'\n ];\n }\n\n _getValuesField() {\n return new Field('values')\n .addFieldList(this._getValueFields());\n }\n\n _getConfigurableOptionFields() {\n return [\n 'attribute_code',\n this._getValuesField()\n ];\n }\n\n _getConfigurableOptionsField() {\n return new Field('configurable_options')\n .addFieldList(this._getConfigurableOptionFields());\n }\n\n _getVariantFields() {\n return [\n this._getProductField()\n ];\n }\n\n _getVariantsField() {\n const { isPlp = false, isForWishlist = false } = this.options;\n\n // For PLP page we have optimized variants graphql field\n const variantsField = isPlp && !isForWishlist ? 'variants_plp' : 'variants';\n\n return new Field(variantsField)\n .setAlias('variants')\n .addFieldList(this._getVariantFields());\n }\n\n _getConfigurableProductFragmentFields() {\n return [\n this._getConfigurableOptionsField(),\n this._getVariantsField()\n ];\n }\n\n _getCustomizableTextValueFields() {\n return [\n 'price',\n 'priceInclTax',\n 'priceExclTax',\n 'price_type',\n 'currency',\n 'sku',\n 'max_characters'\n ];\n }\n\n _getCustomizableTextValueField(alias) {\n return new Field('value')\n .addFieldList(this._getCustomizableTextValueFields())\n .setAlias(alias);\n }\n\n _getCustomizableTextFields(alias) {\n return [\n this._getCustomizableTextValueField(alias),\n 'product_sku'\n ];\n }\n\n _getCustomizableFileValueField(alias) {\n return new Field('value')\n .addFieldList([\n 'price',\n 'priceInclTax',\n 'priceExclTax',\n 'price_type',\n 'currency',\n 'sku',\n 'file_extension'\n ])\n .setAlias(alias);\n }\n\n _getCustomizableAreaOption() {\n return new Fragment('CustomizableAreaOption')\n .addFieldList(this._getCustomizableTextFields('areaValues'));\n }\n\n _getCustomizableFieldOption() {\n return new Fragment('CustomizableFieldOption')\n .addFieldList(this._getCustomizableTextFields('fieldValues'));\n }\n\n _getCustomizableFileOption() {\n return new Fragment('CustomizableFileOption')\n .addFieldList([this._getCustomizableFileValueField('fileValues')]);\n }\n\n _getCustomizableDateValueFields() {\n return [\n 'price',\n 'priceInclTax',\n 'priceExclTax',\n 'price_type',\n 'currency',\n 'sku'\n ];\n }\n\n _getCustomizableDateValueField() {\n return new Field('value')\n .addFieldList(this._getCustomizableDateValueFields());\n }\n\n _getCustomizableDateFields(alias) {\n return [\n this._getCustomizableDateValueField(alias),\n 'product_sku'\n ];\n }\n\n _getCustomizableDateOption() {\n return new Fragment('CustomizableDateOption')\n .addFieldList(this._getCustomizableDateFields());\n }\n\n _getCustomizableSelectionValueFields() {\n return [\n 'uid',\n 'option_type_id',\n 'price',\n 'priceInclTax',\n 'priceExclTax',\n 'price_type',\n 'currency',\n 'sku',\n 'title',\n 'sort_order'\n ];\n }\n\n _getCustomizableSelectionValueField(alias) {\n return new Field('value')\n .addFieldList(this._getCustomizableSelectionValueFields())\n .setAlias(alias);\n }\n\n _getCustomizableCheckboxOption() {\n return new Fragment('CustomizableCheckboxOption')\n .addFieldList([this._getCustomizableSelectionValueField('checkboxValues')]);\n }\n\n _getCustomizableMultiOption() {\n return new Fragment('CustomizableMultipleOption')\n .addFieldList([this._getCustomizableSelectionValueField('checkboxValues')]); // same as checkbox\n }\n\n _getCustomizableDropdownOption() {\n return new Fragment('CustomizableDropDownOption')\n .addFieldList([this._getCustomizableSelectionValueField('dropdownValues')]);\n }\n\n _getCustomizableRadioOption() {\n return new Fragment('CustomizableRadioOption')\n .addFieldList([this._getCustomizableSelectionValueField('dropdownValues')]); // same as dropdown\n }\n\n _getCustomizableProductFragmentOptionsFields() {\n return [\n this._getCustomizableDropdownOption(),\n this._getCustomizableRadioOption(),\n this._getCustomizableCheckboxOption(),\n this._getCustomizableMultiOption(),\n this._getCustomizableFieldOption(),\n this._getCustomizableAreaOption(),\n this._getCustomizableFileOption(),\n this._getCustomizableDateOption(),\n 'title',\n 'required',\n 'sort_order',\n 'type',\n 'uid'\n ];\n }\n\n _getCustomizableProductFragmentOptionsField() {\n return new Field('options')\n .addFieldList(this._getCustomizableProductFragmentOptionsFields());\n }\n\n _getCustomizableProductFragment() {\n return new Fragment('CustomizableProductInterface')\n .addFieldList([this._getCustomizableProductFragmentOptionsField()]);\n }\n\n _getSimpleProductFragmentFields() {\n return [\n this._getTierPricesField()\n ];\n }\n\n _getVirtualProductFragmentFields() {\n return [\n this._getTierPricesField()\n ];\n }\n\n _getTierPricesField() {\n return new Field('price_tiers')\n .addFieldList(this._getTierPricesFields());\n }\n\n _getTierPricesFields() {\n return [\n this._getDiscountField(),\n this._getFinalPriceField(),\n 'quantity'\n ];\n }\n\n _getDiscountField() {\n return new Field('discount')\n .addField('amount_off')\n .addField('percent_off');\n }\n\n _getFinalPriceField() {\n return new Field('final_price')\n .addField('currency')\n .addField('value');\n }\n\n _getFinalPriceExclTaxField() {\n return new Field('final_price_excl_tax')\n .addField('currency')\n .addField('value');\n }\n\n _getRegularPriceField() {\n return new Field('regular_price')\n .addField('currency')\n .addField('value');\n }\n\n _getRegularPriceExclTaxField() {\n return new Field('regular_price_excl_tax')\n .addField('currency')\n .addField('value');\n }\n\n _getDefaultFinalPriceExclTaxField() {\n return new Field('default_final_price_excl_tax')\n .addField('currency')\n .addField('value');\n }\n\n _getDefaultPriceField() {\n return new Field('default_price')\n .addField('currency')\n .addField('value');\n }\n\n _getDefaultFinalPriceField() {\n return new Field('default_final_price')\n .addField('currency')\n .addField('value');\n }\n\n _getBundleProductFragment() {\n return new Fragment('BundleProduct')\n .addFieldList(this._getBundleProductFragmentFields());\n }\n\n _getConfigurableProductFragment() {\n return new Fragment('ConfigurableProduct')\n .addFieldList(this._getConfigurableProductFragmentFields());\n }\n\n _getSimpleProductFragment() {\n return new Fragment('SimpleProduct')\n .addFieldList(this._getSimpleProductFragmentFields());\n }\n\n _getVirtualProductFragment() {\n return new Fragment('VirtualProduct')\n .addFieldList(this._getVirtualProductFragmentFields());\n }\n\n _getSortOptionFields() {\n return [\n 'value',\n 'label'\n ];\n }\n\n _getSortOptionsField() {\n return new Field('options')\n .addFieldList(this._getSortOptionFields());\n }\n\n _getSortFields() {\n return [\n this._getSortOptionsField()\n ];\n }\n\n _getSortField() {\n return new Field('sort_fields')\n .addFieldList(this._getSortFields());\n }\n\n _getSwatchDataFields() {\n return [\n 'type',\n 'value'\n ];\n }\n\n _getSwatchDataField() {\n return new Field('swatch_data')\n .addFieldList(this._getSwatchDataFields());\n }\n\n _getAggregationsField() {\n return new Field('aggregations')\n .setAlias('filters')\n .addFieldList(this._getAggregationsFields());\n }\n\n _getAggregationsFields() {\n return [\n new Field('label').setAlias('name'),\n new Field('attribute_code').setAlias('request_var'),\n 'is_boolean',\n 'has_swatch',\n 'position',\n this._getAggregationsOptionsField()\n ];\n }\n\n _getAggregationsOptionsField() {\n return new Field('options')\n .setAlias('filter_items')\n .addFieldList(this._getAggregationsOptionsFields());\n }\n\n _getAggregationsOptionsFields() {\n return [\n 'label',\n 'count',\n new Field('value').setAlias('value_string'),\n this._getSwatchDataField()\n ];\n }\n\n _getPageInfoField() {\n return new Field('page_info')\n .addField('current_page')\n .addField('total_pages');\n }\n}\n\nexport default new ProductListQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const UPDATE_BREADCRUMBS = 'UPDATE_BREADCRUMBS';\nexport const TOGGLE_BREADCRUMBS = 'TOGGLE_BREADCRUMBS';\n\n/**\n * Update current breadcrumbs with new breadcrumbs (rewrite if already exists).\n * @param {Array} breadcrumbs List of breadcrumbs\n * @return {void}\n * @namespace Store/Breadcrumbs/Action/updateBreadcrumbs\n */\nexport const updateBreadcrumbs = (breadcrumbs) => ({\n type: UPDATE_BREADCRUMBS,\n breadcrumbs\n});\n\n/**\n * Toggle breadcrumbs display/hide\n * @param {Boolean} areBreadcrumbsVisible\n * @return {void}\n * @namespace Store/Breadcrumbs/Action/toggleBreadcrumbs\n */\nexport const toggleBreadcrumbs = (areBreadcrumbsVisible) => ({\n type: TOGGLE_BREADCRUMBS,\n areBreadcrumbsVisible\n});\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n/* eslint-disable */\nimport { QueryDispatcher, executePost } from \"Util/Request\";\nimport { updateNoMatch } from \"Store/NoMatch/NoMatch.action\";\n\nimport { showNotification } from \"Store/Notification/Notification.action\";\nimport { prepareQuery } from \"Util/Query/PrepareDocument\";\nimport { updateStoreFinder } from \".\";\nimport StoreFinderQuery from \"../../query/StoreFinder.query\";\n\n/**\n * Store Finder Dispatcher\n * @class StoreFinderDispatcher\n * @extends QueryDispatcher\n * @namespace Store/StoreFinder/Dispatcher\n */\nexport class StoreFinderDispatcher extends QueryDispatcher {\n constructor() {\n super('StoreFinder');\n }\n\n onSuccess({ getStores }, dispatch) {\n dispatch(updateStoreFinder(getStores));\n }\n\n onError(error, dispatch) {\n dispatch(updateNoMatch(true));\n }\n\n requestStoreData(dispatch) {\n const query = StoreFinderQuery.getQuery();\n\n return executePost(prepareQuery([query])).then(\n /** @namespace Scandiweb/StoreFinderGraphQl/Store/StoreFinder/Dispatcher/executePostThen */\n ({ getStores }) => {\n dispatch(updateStoreFinder(getStores));\n },\n /** @namespace Scandiweb/StoreFinderGraphQl/Store/StoreFinder/Dispatcher/executePostThen */\n (error) => dispatch(showNotification(\"error\", error[0].message))\n );\n }\n}\n\nexport default new StoreFinderDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { updateLinkedProducts } from 'Store/LinkedProducts/LinkedProducts.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport BrowserDatabase from 'Util/BrowserDatabase';\nimport { getIndexedProduct } from 'Util/Product';\nimport { fetchQuery, QueryDispatcher } from 'Util/Request';\nimport { ONE_MONTH_IN_SECONDS } from 'Util/Request/QueryDispatcher';\n\nexport const LINKED_PRODUCTS = 'LINKED_PRODUCTS';\n\n/**\n * Linked Prodcts List Dispatcher\n * @class LinkedProductsDispatcher\n * @extends QueryDispatcher\n * @namespace Store/LinkedProducts/Dispatcher\n */\nexport class LinkedProductsDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('LinkedProducts', ONE_MONTH_IN_SECONDS);\n }\n\n onSuccess(data, dispatch, product_links) {\n const linkedProducts = this._processResponse(data, product_links);\n\n BrowserDatabase.setItem(linkedProducts, LINKED_PRODUCTS);\n dispatch(updateLinkedProducts(linkedProducts));\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching LinkedProducts!'), error));\n }\n\n /**\n * Prepare LinkedProducts query\n * @return {Query} ProductList query\n * @memberof LinkedProductsDispatcher\n * @param product_links\n */\n prepareRequest(product_links) {\n const relatedSKUs = product_links.reduce((links, link) => {\n const { linked_product_sku } = link;\n\n return [...links, `${ linked_product_sku.replace(/ /g, '%20') }`];\n }, []);\n\n return [\n ProductListQuery.getQuery({\n args: {\n filter: {\n productsSkuArray: relatedSKUs\n }\n },\n notRequireInfo: true\n })\n ];\n }\n\n /**\n * Clear linked products list\n * @param {{productsSkuArray: Array}} options A object containing different aspects of query, each item can be omitted\n * @return {Query} ProductList query\n * @memberof LinkedProductsDispatcher\n */\n clearLinkedProducts(dispatch, updateCrossSell = false) {\n const linkedProducts = {\n upsell: { total_count: 0, items: [] },\n related: { total_count: 0, items: [] },\n crosssell: { total_count: 0, items: [] }\n };\n\n BrowserDatabase.setItem(linkedProducts, LINKED_PRODUCTS);\n\n dispatch(updateLinkedProducts({\n ...linkedProducts,\n updateCrossSell\n }));\n }\n\n async fetchCrossSellProducts(dispatch, product_links) {\n const query = this.prepareRequest(product_links);\n const data = await fetchQuery(query);\n const { crosssell } = this._processResponse(data, product_links);\n const linkedProducts = BrowserDatabase.getItem(LINKED_PRODUCTS) || {};\n\n Object.assign(linkedProducts, {\n crosssell,\n updateCrossSell: true\n });\n\n dispatch(updateLinkedProducts(linkedProducts));\n }\n\n clearCrossSellProducts(dispatch) {\n const linkedProducts = BrowserDatabase.getItem(LINKED_PRODUCTS) || {};\n\n Object.assign(linkedProducts, {\n crosssell: { total_count: 0, items: [] },\n updateCrossSell: true\n });\n\n dispatch(updateLinkedProducts(linkedProducts));\n }\n\n _processResponse(data, product_links) {\n const { products: { items } } = data;\n\n const indexedBySku = items.reduce((acc, item) => {\n const { sku } = item;\n acc[sku] = getIndexedProduct(item);\n\n return acc;\n }, {});\n\n const linkedProducts = product_links.reduce((acc, link) => {\n const { linked_product_sku, link_type } = link;\n\n if (indexedBySku[linked_product_sku] && acc[link_type]) {\n acc[link_type].items.push(\n indexedBySku[linked_product_sku]\n );\n\n acc[link_type].total_count++;\n }\n\n return acc;\n }, {\n upsell: { total_count: 0, items: [] },\n related: { total_count: 0, items: [] },\n crosssell: { total_count: 0, items: [] },\n associated: { total_count: 0, items: [] }\n });\n\n return linkedProducts;\n }\n}\n\nexport default new LinkedProductsDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n/* eslint-disable */\nimport StoreFinderReducer from './StoreFinder.reducer';\nimport StoreFinderDispatcher from './StoreFinder.dispatcher';\n\nimport {\n UPDATE_STORE_FINDER,\n updateStoreFinder\n} from './StoreFinder.action';\n\nexport {\n StoreFinderReducer,\n StoreFinderDispatcher,\n UPDATE_STORE_FINDER,\n updateStoreFinder\n};\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * Store Finder Query\n * @class StoreFinderQuery\n * @namespace Storefinder/Query/StoreFinder/Query/StoreFinderQuery */\nexport class StoreFinderQuery {\n /**\n * get Stores query\n * @return {Query} Store finder query\n * @memberof StoreFinderQuery\n */\n getQuery() {\n return new Field('getStores')\n .addFieldList([\n 'store_name',\n 'address',\n 'city',\n 'phone_number',\n 'latitude',\n 'longitude',\n 'store_hours',\n 'working_days',\n 'image',\n 'description',\n 'identifier',\n 'has_store_page',\n 'store_email',\n 'position',\n 'country',\n 'phone_number_used_cars',\n 'directions_search_query'\n ]);\n }\n}\n\nexport default new (StoreFinderQuery)();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const UPDATE_LINKED_PRODUCTS = 'UPDATE_LINKED_PRODUCTS';\n/**\n * Update upsell products list (rewrite if already exists).\n * @param {Array} upsell List of products returned from fetch\n * @return {void}\n * @namespace Store/LinkedProducts/Action/updateLinkedProducts\n */\nexport const updateLinkedProducts = (linkedProducts) => ({\n type: UPDATE_LINKED_PRODUCTS,\n linkedProducts\n});\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const UPDATE_CURRENT_CATEGORY = 'UPDATE_CURRENT_CATEGORY';\n\n/**\n * Update Current Category\n * @param {String} categoryUrlPath url path Main Category object\n * @return {void}\n * @namespace Store/Category/Action/updateCurrentCategory\n */\nexport const updateCurrentCategory = (category) => ({\n type: UPDATE_CURRENT_CATEGORY,\n category\n});\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport {\n updateInfoLoadStatus,\n updateProductListInfo\n} from 'Store/ProductListInfo/ProductListInfo.action';\nimport { QueryDispatcher } from 'Util/Request';\n\n/**\n * Product List Info Dispatcher\n * @class ProductListInfoDispatcher\n * @extends QueryDispatcher\n * @namespace Store/ProductListInfo/Dispatcher\n */\nexport class ProductListInfoDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('ProductListInfo');\n }\n\n onSuccess({ products }, dispatch, options) {\n const {\n args: {\n filter\n }\n } = options;\n\n dispatch(updateProductListInfo(products, filter));\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching Product List Information!'), error));\n dispatch(updateNoMatch(true));\n }\n\n prepareRequest(options, dispatch) {\n dispatch(updateInfoLoadStatus(true));\n\n return ProductListQuery.getQuery({\n ...options,\n requireInfo: true\n });\n }\n}\n\nexport default new ProductListInfoDispatcher();\n","import { CartQuery as SourceCartQuery } from 'SourceQuery/Cart.query';\n\n/** @namespace Scandipwa/Query/Cart/Query */\nexport class CartQuery extends SourceCartQuery {\n _getCartItemFields() {\n return [\n ...super._getCartItemFields(),\n 'final_price'\n ];\n }\n\n _getCartTotalsFields() {\n return [\n ...super._getCartTotalsFields(),\n 'registration_costs',\n 'transportation_costs',\n 'vat_costs'\n ];\n }\n}\n\nexport default new CartQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/Config/Query */\nexport class ConfigQuery {\n getStoreListField() {\n return new Field('storeList')\n .addFieldList(this._getStoreListFields());\n }\n\n getCheckoutAgreements() {\n return new Field('checkoutAgreements')\n .addFieldList(this._getCheckoutAgreementFields());\n }\n\n getCurrencyField() {\n return new Field('available_currencies_data')\n .addFieldList([\n 'id',\n 'label',\n 'value'\n ]);\n }\n\n getCurrencyData() {\n return new Field('currencyData')\n .addFieldList([\n this.getCurrencyField(),\n 'current_currency_code'\n ]);\n }\n\n getPriceDisplayTypeField() {\n return new Field('priceTaxDisplay')\n .addFieldList([\n 'product_price_display_type',\n 'shipping_price_display_type'\n ]);\n }\n\n getSaveSelectedCurrencyMutation(newCurrency) {\n return new Field('saveSelectedCurrency')\n .addArgument('currency', 'String', newCurrency)\n .addFieldList([\n this.getCurrencyData()\n ]);\n }\n\n _getCheckoutAgreementFields() {\n return [\n 'agreement_id',\n 'checkbox_text',\n 'content',\n 'content_height',\n 'is_html',\n 'mode',\n 'name'\n ];\n }\n\n _getStoreListFields() {\n return [\n 'name',\n 'is_active',\n 'base_url',\n 'base_link_url',\n 'code'\n ];\n }\n\n getQuery() {\n return new Field('storeConfig')\n .addFieldList(this._getStoreConfigFields());\n }\n\n _getTimeDateFormatFields() {\n return [\n 'use_calendar',\n 'year_range',\n 'date_fields_order',\n 'time_format'\n ];\n }\n\n _getStoreConfigFields() {\n return [\n 'code',\n 'is_active',\n 'cms_home_page',\n 'cms_no_route',\n 'copyright',\n 'timezone',\n 'header_logo_src',\n 'timezone',\n 'title_prefix',\n 'title_suffix',\n 'default_display_currency_code',\n 'default_keywords',\n 'default_title',\n 'default_description',\n 'default_country',\n 'downloadable_links_target_new_window',\n 'secure_base_media_url',\n 'logo_alt',\n 'logo_height',\n 'logo_width',\n 'cookie_text',\n 'cookie_link',\n 'terms_are_enabled',\n 'address_lines_quantity',\n 'base_url',\n 'pagination_frame',\n 'pagination_frame_skip',\n 'anchor_text_for_previous',\n 'anchor_text_for_next',\n 'reviews_are_enabled',\n 'reviews_allow_guest',\n 'wishlist_general_active',\n 'demo_notice',\n 'guest_checkout',\n 'is_email_confirmation_required',\n 'display_product_stock_status',\n 'base_link_url',\n 'show_vat_number_on_storefront',\n 'show_tax_vat_number',\n 'product_use_categories',\n 'category_url_suffix',\n 'cookie_lifetime',\n 'plp_list_mode',\n 'layered_navigation_product_count_enabled',\n 'region_display_all',\n 'redirect_dashboard',\n 'product_alert_allow_price',\n 'product_alert_allow_stock',\n 'newsletter_general_active',\n 'newsletter_subscription_allow_guest_subscribe',\n 'newsletter_subscription_confirm',\n 'delivery_instore_active',\n 'access_token_lifetime',\n 'is_allowed_reorder',\n 'rss_order_subscribe_allow',\n 'downloadable_disable_guest_checkout',\n ...this._getTimeDateFormatFields(),\n this.getPriceDisplayTypeField()\n ];\n }\n}\n\nexport default new ConfigQuery();\n","/* eslint-disable spaced-comment */\n/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { isSignedIn } from 'Util/Auth';\nimport { getGuestQuoteId } from 'Util/Cart';\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/Wishlist/Query */\nexport class WishlistQuery {\n //#region MUTATION\n addProductsToWishlist(wishlistId, wishlistItems) {\n return new Field('addProductsToWishlist')\n .addArgument('wishlistId', 'ID!', wishlistId)\n .addArgument('wishlistItems', '[WishlistItemInput!]!', wishlistItems)\n .addField(this._getWishlistErrorsField());\n }\n\n updateProductsInWishlist(wishlistId, wishlistItems) {\n return new Field('updateProductsInWishlist')\n .addArgument('wishlistId', 'ID!', wishlistId)\n .addArgument('wishlistItems', '[WishlistItemUpdateInput!]!', wishlistItems)\n .addField(this._getWishlistErrorsField());\n }\n //#endregion\n\n //#region ERROR\n _getWishlistErrorsFields() {\n return [\n 'message',\n 'code'\n ];\n }\n\n _getWishlistErrorsField() {\n return new Field('user_errors')\n .addFieldList(this._getWishlistErrorsFields());\n }\n //#endregion\n\n getWishlistQuery(sharingCode) {\n const field = new Field('s_wishlist')\n .setAlias('wishlist')\n .addFieldList(this._getWishlistFields());\n\n if (sharingCode) {\n field.addArgument('sharing_code', 'ID', sharingCode);\n }\n\n return field;\n }\n\n getShareWishlistMutation(input) {\n return new Field('s_shareWishlist')\n .setAlias('shareWishlist')\n .addArgument('input', 'ShareWishlistInput!', input);\n }\n\n getClearWishlist() {\n return new Field('s_clearWishlist')\n .setAlias('clearWishlist');\n }\n\n getMoveWishlistToCart(sharingCode) {\n const field = new Field('s_moveWishlistToCart')\n .setAlias('moveWishlistToCart');\n\n if (sharingCode) {\n field.addArgument('sharingCode', 'ID', sharingCode);\n\n if (!isSignedIn()) {\n const guestQuoteId = getGuestQuoteId();\n field.addArgument('guestCartId', 'ID', guestQuoteId);\n }\n }\n\n return field;\n }\n\n getRemoveProductFromWishlistMutation(item_id) {\n return new Field('s_removeProductFromWishlist')\n .setAlias('removeProductFromWishlist')\n .addArgument('itemId', 'ID!', item_id);\n }\n\n _getWishlistFields() {\n return [\n 'id',\n 'updated_at',\n 'items_count',\n 'creators_name',\n this._getItemsField()\n ];\n }\n\n _getItemOptionsFields() {\n return [\n 'label',\n 'value'\n ];\n }\n\n _getItemOptionsField() {\n return new Field('options')\n .addFieldList(this._getItemOptionsFields());\n }\n\n _getWishlistItemsFields() {\n return [\n 'id',\n 'sku',\n 'qty',\n 'description',\n 'price',\n 'price_without_tax',\n 'buy_request',\n this._getItemOptionsField()\n ];\n }\n\n _getItemsFields() {\n return [\n ...this._getWishlistItemsFields(),\n this._getProductField()\n ];\n }\n\n _getProductField() {\n return new Field('product')\n .addFieldList(ProductListQuery._getProductInterfaceFields(false, false, true));\n }\n\n _getItemsField() {\n return new Field('items')\n .addFieldList(this._getItemsFields());\n }\n}\n\nexport default new WishlistQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/Review/Query */\nexport class ReviewQuery {\n getAddProductReviewMutation(reviewItem) {\n return new Field('createProductReview')\n .setAlias('addProductReview')\n .addArgument('input', 'CreateProductReviewInput!', reviewItem)\n .addField(new Field('review').addField('nickname'));\n }\n\n getRatingQuery() {\n return new Field('productReviewRatingsMetadata')\n .setAlias('reviewRatings')\n .addFieldList(this._getRatingFields());\n }\n\n _getRatingFields() {\n return [\n this._getRatingItemsField()\n ];\n }\n\n _getRatingItemsField() {\n return new Field('items')\n .addFieldList(this._getRatingItemsFields());\n }\n\n _getRatingItemsFields() {\n return [\n new Field('id').setAlias('rating_id'),\n new Field('name').setAlias('rating_code'),\n this._getRatingOptionsField()\n ];\n }\n\n _getRatingOptionFields() {\n return [\n new Field('value_id').setAlias('option_id'),\n 'value'\n ];\n }\n\n _getRatingOptionsField() {\n return new Field('values')\n .setAlias('rating_options')\n .addFieldList(this._getRatingOptionFields());\n }\n}\n\nexport default new ReviewQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const UPDATE_PRODUCT_DETAILS = 'UPDATE_PRODUCT_DETAILS';\n\n/**\n * Update product list with new list (rewrite if already exists).\n * @param {Array} items List of products returned from fetch\n * @param {Number} totalItems Total number of products in this filter\n * @return {void}\n * @namespace Store/Product/Action/updateProductDetails\n */\nexport const updateProductDetails = (product) => ({\n type: UPDATE_PRODUCT_DETAILS,\n product\n});\n","/* eslint-disable spaced-comment */\n/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { isSignedIn } from 'Util/Auth';\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/Cart/Query */\nexport class CartQuery {\n //#region MUTATIONS\n getAddProductToCartMutation(cartId, cartItems) {\n return new Field('addProductsToCart')\n .addArgument('cartId', 'String!', cartId)\n .addArgument('cartItems', '[CartItemInput!]!', cartItems)\n .addField(this._getUserErrorsField());\n }\n\n getUpdateCartItemsMutation(input) {\n return new Field('updateCartItems')\n .addArgument('input', 'UpdateCartItemsInput', input)\n .addField(this._getCartUpdateField());\n }\n\n getCreateEmptyCartMutation() {\n return new Field('createEmptyCart');\n }\n //#endregion\n\n //#region QUERIES\n getCartQuery(quoteId) {\n const query = new Field('getCartForCustomer')\n .addFieldList(this._getCartTotalsFields())\n .setAlias('cartData');\n\n if (!isSignedIn()) {\n query.addArgument('guestCartId', 'String', quoteId);\n }\n\n return query;\n }\n //#endregion\n\n //#region ERROR\n _getUserErrorsFields() {\n return [\n 'message',\n 'code'\n ];\n }\n\n _getUserErrorsField() {\n return new Field('user_errors')\n .addFieldList(this._getUserErrorsFields());\n }\n //#endregion\n\n _getCartUpdateField() {\n return new Field('cart')\n .addField('id');\n }\n\n getRemoveCartItemMutation(item_id, quoteId) {\n const mutation = new Field('removeCartItem')\n .addArgument('item_id', 'Int!', item_id)\n .addFieldList(this._getRemoveCartItemFields(quoteId));\n\n if (!isSignedIn()) {\n mutation.addArgument('guestCartId', 'String', quoteId);\n }\n\n return mutation;\n }\n\n getApplyCouponMutation(couponCode, quoteId) {\n const mutation = new Field('applyCoupon')\n .addArgument('coupon_code', 'String!', couponCode)\n .addField(this.getCartQuery(quoteId));\n\n if (!isSignedIn()) {\n mutation.addArgument('guestCartId', 'String', quoteId);\n }\n\n return mutation;\n }\n\n getRemoveCouponMutation(quoteId) {\n const mutation = new Field('removeCoupon')\n .addField(this.getCartQuery(quoteId));\n\n if (!isSignedIn()) {\n mutation.addArgument('guestCartId', 'String', quoteId);\n }\n\n return mutation;\n }\n\n getCartDisplayConfig() {\n return new Field('getCartDisplayConfig')\n .setAlias('cartDisplayConfig')\n .addFieldList(this._getCartDisplayConfigFields());\n }\n\n getMergeCartQuery(sourceCartId, destinationCartId) {\n return new Field('mergeCarts')\n .addArgument('source_cart_id', 'String!', sourceCartId)\n .addArgument('destination_cart_id', 'String!', destinationCartId)\n .addField('id');\n }\n\n _getSaveCartItemFields(quoteId) {\n return [\n this.getCartQuery(quoteId)\n ];\n }\n\n _getRemoveCartItemFields(quoteId) {\n return [\n this.getCartQuery(quoteId)\n ];\n }\n\n _getCartTotalsFields() {\n return [\n 'id',\n 'subtotal',\n 'subtotal_incl_tax',\n 'items_qty',\n 'tax_amount',\n 'grand_total',\n 'discount_amount',\n 'quote_currency_code',\n 'subtotal_with_discount',\n 'coupon_code',\n 'shipping_amount',\n 'shipping_incl_tax',\n 'shipping_tax_amount',\n 'is_virtual',\n 'applied_rule_ids',\n 'shipping_amount',\n 'shipping_incl_tax',\n 'shipping_tax_amount',\n 'shipping_method',\n 'is_in_store_pickup_available',\n this._getCartItemsField(),\n this._getAppliedTaxesField()\n ];\n }\n\n _getBundleOptionValuesFields() {\n return [\n 'id',\n 'label',\n 'quantity',\n 'price'\n ];\n }\n\n _getBundleOptionValuesField() {\n return new Field('values')\n .addFieldList(this._getBundleOptionValuesFields());\n }\n\n _getBundleOptionsFields() {\n return [\n 'id',\n 'label',\n this._getBundleOptionValuesField()\n ];\n }\n\n _getBundleOptionsField() {\n return new Field('bundle_options')\n .addFieldList(this._getBundleOptionsFields());\n }\n\n _getCustomizableOptionValueFields() {\n return [\n 'id',\n 'label',\n 'value'\n ];\n }\n\n _getCustomizableOptionValueField() {\n return new Field('values')\n .addFieldList(this._getCustomizableOptionValueFields());\n }\n\n _getCustomizableOptionsFields() {\n return new Field('customizable_options')\n .addFieldList([\n 'id',\n 'label',\n this._getCustomizableOptionValueField()\n ]);\n }\n\n _getDownloadableLinksField() {\n return new Field('downloadable_links')\n .addFieldList(this._getDownloadableLinksFields());\n }\n\n _getDownloadableLinksFields() {\n return [\n 'id',\n 'label'\n ];\n }\n\n _getCartItemFields() {\n return [\n 'qty',\n 'sku',\n 'price',\n 'item_id',\n 'row_total',\n 'row_total_incl_tax',\n 'tax_amount',\n 'tax_percent',\n 'discount_amount',\n 'discount_percent',\n this._getCustomizableOptionsFields(),\n this._getDownloadableLinksField(),\n this._getBundleOptionsField(),\n this._getProductField()\n ];\n }\n\n _getProductField() {\n return new Field('product')\n .addFieldList(ProductListQuery._getCartProductInterfaceFields());\n }\n\n _getCartItemsField() {\n return new Field('items')\n .addFieldList(this._getCartItemFields());\n }\n\n _getCartDisplayConfigFields() {\n return [\n 'display_tax_in_price',\n 'display_tax_in_subtotal',\n 'display_tax_in_shipping_amount',\n 'include_tax_in_order_total',\n 'display_full_tax_summary',\n 'display_zero_tax_subtotal'\n ];\n }\n\n _getAppliedTaxesField() {\n return new Field('applied_taxes')\n .addField(this._getAppliedTaxesRatesField());\n }\n\n _getAppliedTaxesRatesField() {\n return new Field('rates')\n .addFieldList(this._getAppliedTaxesRatesFields());\n }\n\n _getAppliedTaxesRatesFields() {\n return [\n 'percent',\n 'title'\n ];\n }\n}\n\nexport default new CartQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * RegionQuery Mutations\n * @class RegionQuery\n * @namespace Query/Region/Query */\nexport class RegionQuery {\n getCountriesQuery() {\n return new Field('countries')\n .addFieldList(this._getCountryFields());\n }\n\n _getCountryFields() {\n return [\n 'id',\n 'is_state_required',\n this._getAvailableRegionsField(),\n new Field('full_name_locale').setAlias('label')\n ];\n }\n\n _getAvailableRegionFields() {\n return [\n 'code',\n 'name',\n 'id'\n ];\n }\n\n _getAvailableRegionsField() {\n return new Field('available_regions')\n .addFieldList(this._getAvailableRegionFields());\n }\n}\n\nexport default new RegionQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport BlogPostQuery from '../../query/BlogPost.query';\nimport { updateSinglePost } from './PostsDetails.action';\n\nexport const LinkedProductsDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/LinkedProducts/LinkedProducts.dispatcher'\n);\n\n/** @namespace Blog/Store/PostsDetails/Dispatcher/PostsDetailsDispatcher */\nexport class PostsDetailsDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('BlogPostsDetails');\n }\n\n onSuccess(data, dispatch) {\n const { post } = data;\n\n if (Object.keys(post).length !== 0) {\n const { related_products: relatedProducts } = post;\n const postLinks = relatedProducts.map(this.buildProductLink);\n\n if (postLinks.length) {\n LinkedProductsDispatcher.then(({ default: dispatcher }) => {\n dispatcher.handleData(dispatch, postLinks);\n });\n }\n }\n\n dispatch(updateSinglePost(post));\n }\n\n onError({ message }, dispatch) {\n dispatch(showNotification('error', 'Error fetching post details!', message));\n dispatch(updateNoMatch(true));\n }\n\n prepareRequest(options) {\n return BlogPostQuery.getQuery(options);\n }\n\n buildProductLink(productSKU, index) {\n return {\n link_type: 'related',\n linked_product_sku: productSKU,\n position: index\n };\n }\n}\n\nexport default new PostsDetailsDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport BlogCategories from '../../query/BlogCategories.query';\nimport { updateCategories } from './Categories.action';\n\n/** @namespace Blog/Store/Categories/Dispatcher/CategoriesDispatcher */\nexport class CategoriesDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('BlogCategories');\n }\n\n onSuccess({ categories }, dispatch) {\n dispatch(updateCategories(categories));\n }\n\n onError({ message }, dispatch) {\n dispatch(showNotification('error', 'Error fetching Categories!', message));\n }\n\n prepareRequest(options) {\n return BlogCategories.getQuery(options);\n }\n}\n\nexport default new CategoriesDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport CategoryQuery from 'Query/Category.query';\nimport { updateCurrentCategory } from 'Store/Category/Category.action';\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { QueryDispatcher } from 'Util/Request';\n\n/**\n * Category Dispatcher\n * @class CategoryDispatcher\n * @extends QueryDispatcher\n * @namespace Store/Category/Dispatcher\n */\nexport class CategoryDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('Category');\n }\n\n onSuccess(data, dispatch, { isSearchPage }) {\n const { category = {}, category: { id } } = data;\n\n if (!id && !isSearchPage) {\n dispatch(updateNoMatch(true));\n }\n\n dispatch(updateCurrentCategory(category));\n }\n\n onError(error, dispatch, { isSearchPage }) {\n if (!isSearchPage) {\n dispatch(updateNoMatch(true));\n dispatch(showNotification('error', __('Error fetching Category!'), error));\n } else {\n dispatch(updateCurrentCategory({ id: 'all-products' }));\n }\n }\n\n prepareRequest(options) {\n return CategoryQuery.getQuery(options);\n }\n}\n\nexport default new CategoryDispatcher();\n","/* eslint-disable max-len */\n/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport NewsletterSubscriptionQuery from 'Query/NewsletterSubscription.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { fetchMutation, getErrorMessage } from 'Util/Request';\n\nexport const NOT_ACTIVE = 'NOT_ACTIVE';\n\n/**\n * Product Cart Dispatcher\n * @class NewsletterSubscriptionDispatcher\n * @namespace Scandipwa/Store/NewsletterSubscription/Dispatcher */\nexport class NewsletterSubscriptionDispatcher {\n subscribeToNewsletter(dispatch, email, newsletterOptions) {\n return fetchMutation(NewsletterSubscriptionQuery.getSubscribeToNewsletterMutation(email, newsletterOptions)).then(\n /** @namespace Scandipwa/Store/NewsletterSubscription/Dispatcher/NewsletterSubscriptionDispatcher/subscribeToNewsletter/fetchMutation/then */\n ({ subscribeEmailToNewsletter: { status } }) => {\n // `NOT_ACTIVE` response status corresponds to `newsletter_subscription_confirm` magento setting\n const message = status === NOT_ACTIVE\n ? __('Confirmation request has been sent.')\n : __('Thank you for your subscription.');\n\n return dispatch(showNotification('success', message));\n },\n /** @namespace Scandipwa/Store/NewsletterSubscription/Dispatcher/NewsletterSubscriptionDispatcher/subscribeToNewsletter/fetchMutation/then/dispatch/catch */\n (error) => dispatch(showNotification('error', getErrorMessage(error)))\n );\n }\n}\n\nexport default new NewsletterSubscriptionDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\nimport { updateMeta } from 'Store/Meta/Meta.action';\nimport { appendWithStoreCode } from 'Util/Url';\n\n/**\n * Meta Dispatcher\n * @class MetaDispatcher\n * @namespace Store/Meta/Dispatcher */\nexport class MetaDispatcher {\n /**\n * Set meta for category\n * @param {Object} category\n * @param {Function} dispatch\n * @memberof MetaDispatcher\n */\n updateWithCategory(category, dispatch) {\n const meta = this._getCategoryMeta(category);\n dispatch(updateMeta(meta));\n }\n\n /**\n * Set meta for product\n * @param {Object} product\n * @param {Function} dispatch\n * @memberof MetaDispatcher\n */\n updateWithProduct(product, dispatch) {\n const meta = this._getProductMeta(product);\n dispatch(updateMeta(meta));\n }\n\n /**\n * Get meta for product\n * @param {Object} product\n * @return {Object} Meta object\n * @memberof MetaDispatcher\n */\n _getProductMeta(product) {\n const {\n name,\n meta_title,\n meta_keyword,\n canonical_url,\n meta_description\n } = product;\n\n return {\n description: meta_description,\n keywords: meta_keyword,\n title: meta_title || name,\n canonical_url: `${window.location.origin}${appendWithStoreCode(canonical_url)}`\n };\n }\n\n /**\n * Get meta for category\n * @param {Object} category\n * @return {Object} Meta object\n * @memberof MetaDispatcher\n */\n _getCategoryMeta(category) {\n const {\n description, name, canonical_url,\n meta_title, meta_keywords, meta_description,\n meta_robots = 'follow, index'\n } = category;\n\n return {\n description: meta_description || description,\n title: meta_title || name,\n keywords: meta_keywords,\n canonical_url: `${window.location.origin}${appendWithStoreCode(canonical_url)}`,\n robots: meta_robots\n };\n }\n}\n\nexport default new MetaDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const GET_ORDER_LIST = 'GET_ORDER_LIST';\nexport const SET_ORDER_LOADING_STATUS = 'SET_ORDER_LOADING_STATUS';\n\n/** @namespace Store/Order/Action/getOrderList */\nexport const getOrderList = (orderList, status) => ({\n type: GET_ORDER_LIST,\n orderList,\n status\n});\n\n/** @namespace Store/Order/Action/setLoadingStatus */\nexport const setLoadingStatus = (status) => ({\n type: SET_ORDER_LOADING_STATUS,\n status\n});\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/ContactForm/Query */\nexport class ContactFormQuery {\n getSendContactFormMutation(options) {\n const mutation = new Field('contactForm');\n this._addSendContactFormMutationArguments(mutation, options);\n mutation.addFieldList(this._getSendContactFormMutationResponse());\n\n return mutation;\n }\n\n getContactPageConfigQuery() {\n return new Field('contactPageConfig')\n .addFieldList(this._getContactPageConfigFields());\n }\n\n _addSendContactFormMutationArguments(mutation, options) {\n return mutation.addArgument('contact', 'ContactForm!', options);\n }\n\n _getSendContactFormMutationResponse() {\n return ['message'];\n }\n\n _getContactPageConfigFields() {\n return ['enabled'];\n }\n}\n\nexport default new ContactFormQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Blog/Query/BlogPost/Query */\nexport class BlogPostQuery {\n getQuery(options) {\n const post = this.postField(options);\n\n const { id = 'hello-world' } = options;\n\n return new Field('blogPost')\n .addArgument('id', 'String', id)\n .addFieldList(post)\n .setAlias('post');\n }\n\n postField(options) {\n const {\n getBasicDetails = true,\n getDescription,\n getMedia,\n getRelated\n } = options;\n\n const fields = [];\n const author = this.authorField();\n const relatedPosts = this.relatedPostsField();\n\n if (getBasicDetails) {\n fields.push('post_id', 'identifier', 'title', 'publish_time', ...this.metaFields());\n fields.push(new Field('tags').addFieldList(this.tagField()))\n }\n\n if (getDescription) {\n fields.push('short_content', author, 'content');\n }\n\n if (getMedia) {\n fields.push('og_image', 'first_image', 'media_gallery');\n }\n\n if (getRelated) {\n fields.push(relatedPosts, 'related_products');\n }\n\n return fields;\n }\n\n tagField() {\n return ['title', 'tag_id', 'identifier', 'content', ...this.metaFields()];\n }\n\n authorField() {\n return new Field('author').addField('name');\n }\n\n relatedPostsField() {\n return new Field('related_posts')\n .addFieldList(['post_id', 'identifier', 'title', 'publish_time', 'first_image']);\n }\n\n metaFields() {\n return ['meta_title', 'meta_description', 'meta_keywords'];\n }\n}\n\nexport default new BlogPostQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Blog/Query/BlogComments/Query/BlogCommentsQuery */\nexport class BlogCommentsQuery {\n getQuery(options, replyDepth = 1) {\n const { pageSize, currentPage = 1, filter } = options;\n\n return new Field('blogComments')\n .addArgument('pageSize', 'Int!', pageSize)\n .addArgument('currentPage', 'Int!', currentPage)\n .addArgument('filter', 'BlogCommentsFilterInput!', filter)\n .addField(this.getCommentsItemField(replyDepth))\n .addFieldList([\n 'total_count',\n 'total_pages'\n ]);\n }\n\n getCommentsItemField(replyDepth) {\n return new Field('items')\n .addFieldList(this.getCommentsItemFields(replyDepth));\n }\n\n getCommentsItemFields(replyDepth) {\n if (replyDepth <= 0) {\n return [\n 'author_email',\n 'author_nickname',\n 'comment_id',\n 'creation_time',\n 'text'\n ];\n }\n\n return [\n 'author_email',\n 'author_nickname',\n 'comment_id',\n 'creation_time',\n 'text',\n new Field('replies')\n .addFieldList(this.getCommentsItemFields(replyDepth - 1))\n ];\n }\n\n getMutation(options, replyDepth = 1) {\n const { pageSize, commentData } = options;\n\n return new Field('addCommentToPost')\n .addArgument('pageSize', 'Int!', pageSize)\n .addArgument('input', 'addCommentToPostInput!', commentData)\n .addField(this.getCommentsField(replyDepth))\n .addFieldList([\n 'total_count',\n 'total_pages'\n ]);\n }\n\n getCommentsField(replyDepth) {\n return new Field('comments')\n .addFieldList(this.getCommentsItemFields(replyDepth));\n }\n}\n\nexport default new BlogCommentsQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace Blog/Query/BlogCategories/Query */\nexport class BlogCategoriesQuery {\n getQuery() {\n const items = this.itemField();\n const page = this.pageField();\n\n return new Field('blogCategories')\n .addField(items)\n .addFieldList(page)\n .setAlias('categories');\n }\n\n itemField() {\n const fields = [];\n\n fields.push('category_id', 'identifier', 'title', 'meta_title', 'meta_keywords', 'meta_description');\n\n return new Field('items').addFieldList(fields);\n }\n\n /**\n * Prepare the pages field\n */\n pageField() {\n return ['total_count'];\n }\n}\n\nexport default new BlogCategoriesQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport CheckEmailQuery from 'Query/CheckEmail.query';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport { updateEmailAvailable } from './Checkout.action';\n\n/**\n * Checkout Dispatcher\n * @class CheckoutDispatcher\n * @extends QueryDispatcher\n * @namespace Store/Checkout/Dispatcher\n */\nexport class CheckoutDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('Checkout');\n }\n\n onSuccess(data, dispatch) {\n const { isEmailAvailable: { is_email_available } } = data;\n dispatch(updateEmailAvailable(is_email_available));\n }\n\n onError(error, dispatch) {\n dispatch(updateEmailAvailable(true));\n\n return error;\n }\n\n prepareRequest(email) {\n return CheckEmailQuery.getIsEmailAvailableQuery(email);\n }\n}\n\nexport default new CheckoutDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport const UPDATE_SEARCH_BAR = 'UPDATE_SEARCH_BAR';\nexport const UPDATE_SEARCH_LOAD_STATUS = 'UPDATE_SEARCH_LOAD_STATUS';\nexport const CLEAR_SEARCH_RESULTS = 'CLEAR_SEARCH_RESULTS';\n\n/** @namespace Store/SearchBar/Action/updateSearchBar */\nexport const updateSearchBar = (result) => ({\n type: UPDATE_SEARCH_BAR,\n result\n});\n\n/** @namespace Store/SearchBar/Action/updateLoadStatus */\nexport const updateLoadStatus = (status) => ({\n type: UPDATE_SEARCH_LOAD_STATUS,\n isLoading: status\n});\n\n/** @namespace Store/SearchBar/Action/clearSearchResults */\nexport const clearSearchResults = () => ({\n type: CLEAR_SEARCH_RESULTS\n});\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * Order Query\n * @class OrderQuery\n * @namespace Query/Order/Query */\nexport class OrderQuery {\n getReorder(incrementId) {\n return new Field('reorderItems')\n .addArgument('orderNumber', 'String!', incrementId)\n .addField(this._getReorderField());\n }\n\n getSubscribeToOrderStatus(incrementId) {\n return new Field('subscribeToOrderStatus')\n .addArgument('orderNumber', 'String!', incrementId)\n .addFieldList(this._getSubscribeToOrderStatusOutputFields());\n }\n\n getOrderListQuery(options) {\n return new Field('customer')\n .addFieldList(this._getOrderListFields(options));\n }\n\n _getOrderListFields(options) {\n return [\n this._getOrdersField(options)\n ];\n }\n\n _getOrdersField(options) {\n const { orderId, page = 1 } = options || {};\n const ordersField = new Field('orders');\n\n if (orderId) {\n return ordersField\n .addArgument('filter', 'CustomerOrdersFilterInput', { entity_id: { eq: orderId } })\n .addFieldList(this._getOrdersFields(true));\n }\n\n return ordersField\n .addArgument('currentPage', 'Int', page)\n .addFieldList(this._getOrdersFields());\n }\n\n _getOrdersFields(isSingleOrder = false) {\n return [\n 'total_count',\n this._getOrderItemsField(isSingleOrder),\n this._getSearchResultPageInfoField()\n ];\n }\n\n _getSearchResultPageInfoField() {\n return new Field('page_info')\n .addFieldList(this._getSearchResultPageInfoFields());\n }\n\n _getSearchResultPageInfoFields() {\n return [\n 'current_page',\n 'page_size',\n 'total_pages'\n ];\n }\n\n _getOrderItemsField(isSingleOrder) {\n return new Field('items')\n .addFieldList(this._getOrderItemsFields(isSingleOrder));\n }\n\n _getOrderItemsFields(isSingleOrder) {\n const basicFields = [\n 'id',\n 'increment_id',\n 'order_date',\n 'status',\n 'can_reorder',\n 'rss_link',\n this._getOrderItemTotalField()\n ];\n\n if (isSingleOrder) {\n return [...basicFields, ...this._getSingleOrderFields()];\n }\n\n return basicFields;\n }\n\n _getSingleOrderFields() {\n return [\n 'carrier',\n this._getOrderShipmentsField(),\n this._getOrderItemsProductsField(),\n this._getOrderInvoicesField(),\n this._getOrderRefundsField(),\n this._getOrderShippingAddressField(),\n this._getOrderBillingAddressField(),\n this._getOrderPaymentMethodsField(),\n this._getOrderShippingMethodField(),\n this._getOrderCommentsField()\n ];\n }\n\n _getOrderCommentsField() {\n return new Field('comments')\n .addFieldList(this._getOrderCommentsFields());\n }\n\n _getOrderCommentsFields() {\n return [\n 'timestamp',\n 'message'\n ];\n }\n\n _getOrderItemTotalField() {\n return new Field('total')\n .addFieldList(this._getOrderItemTotalFields());\n }\n\n _getOrderItemTotalFields() {\n return [\n this._getOrderGrandTotalField(),\n this._getOrderDiscountsField(),\n this._getOrderBaseGrantTotalField(),\n this._getOrderSubtotalField(),\n this._getOrderTotalShippingField(),\n this._getOrderTotalTaxField(),\n this._getOrderShippingHandlingField(),\n this._getOrderTaxesField()\n ];\n }\n\n _getOrderTaxesField() {\n return new Field('taxes')\n .addFieldList(this._getOrderTaxesFields());\n }\n\n _getOrderTaxesFields() {\n return [\n 'rate',\n 'title',\n this._getOrderAmountField()\n ];\n }\n\n _getOrderShippingHandlingField() {\n return new Field('shipping_handling')\n .addFieldList(this._getOrderShippingHandlingFields());\n }\n\n _getOrderShippingHandlingFields() {\n return [\n this._getOrderShippingAmountExclTaxField(),\n this._getOrderShippingAmountInclTaxField(),\n this._getOrderShippingDiscountsField(),\n this._getOrderShippingHandlingTotalField(),\n this._getOrderTaxesField()\n ];\n }\n\n _getOrderShippingDiscountsField() {\n return new Field('discounts')\n .addFieldList(this._getOrderShippingDiscountsFields());\n }\n\n _getOrderShippingDiscountsFields() {\n return [\n this._getOrderAmountField()\n ];\n }\n\n _getOrderShippingAmountExclTaxField() {\n return new Field('amount_excluding_tax')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderShippingAmountInclTaxField() {\n return new Field('amount_including_tax')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderShippingHandlingTotalField() {\n return new Field('total_amount')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderTotalTaxField() {\n return new Field('total_tax')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderTotalShippingField() {\n return new Field('total_shipping')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderBaseGrantTotalField() {\n return new Field('base_grand_total')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderSubtotalField() {\n return new Field('subtotal')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderGrandTotalField() {\n return new Field('grand_total')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderPriceFields() {\n return [\n 'value',\n 'currency'\n ];\n }\n\n _getOrderShipmentsField() {\n return new Field('shipments')\n .addFieldList(this._getOrderShipmentsFields());\n }\n\n _getOrderShipmentsFields() {\n return [\n 'id',\n 'number',\n this._getOrderCommentsField(),\n this._getOrderShipmentTrackingField(),\n this._getShipmentsItemsProductsField()\n ];\n }\n\n _getShipmentsItemsProductsField() {\n return new Field('items')\n .addFieldList(this._getShipmentsItemsProductsFields());\n }\n\n _getShipmentsItemsProductsFields() {\n return [\n 'quantity_shipped',\n ...this._getBaseOrderItemProductsFields()\n ];\n }\n\n _getOrderShipmentTrackingField() {\n return new Field('tracking')\n .addFieldList(this._getOrderShipmentTrackingFields());\n }\n\n _getOrderShipmentTrackingFields() {\n return [\n 'carrier',\n 'number',\n 'title'\n ];\n }\n\n _getOrderRefundsField() {\n return new Field('credit_memos')\n .addFieldList(this._getOrderRefundsFields());\n }\n\n _getOrderRefundsFields() {\n return [\n 'id',\n 'number',\n this._getOrderCommentsField(),\n this._getRefundsItemsProductsField(),\n this._getOrderItemTotalField()\n ];\n }\n\n _getOrderDiscountsField() {\n return new Field('discounts')\n .addFieldList(this._getOrderDiscountsFields());\n }\n\n _getOrderDiscountsFields() {\n return [\n 'label',\n this._getOrderAmountField()\n ];\n }\n\n _getOrderAmountField() {\n return new Field('amount')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getRefundsItemsProductsField() {\n return new Field('items')\n .addFieldList(this._getRefundsItemsProductsFields());\n }\n\n _getRefundsItemsProductsFields() {\n return [\n 'quantity_refunded',\n ...this._getBaseOrderItemProductsFields(),\n this._getRefundsItemInformationField(),\n this._getOrderProductRowSubtotalField(),\n this._getOrderDiscountsField()\n ];\n }\n\n _getRefundsItemInformationField() {\n return new Field('order_item')\n .addFieldList(this._getOrderItemProductsFields());\n }\n\n _getOrderInvoicesField() {\n return new Field('invoices')\n .addFieldList(this._getOrderInvoicesFields());\n }\n\n _getOrderInvoicesFields() {\n return [\n 'id',\n 'number',\n this._getOrderCommentsField(),\n this._getInvoiceItemsProductsField(),\n this._getOrderItemTotalField()\n ];\n }\n\n _getInvoiceItemsProductsField() {\n return new Field('items')\n .addFieldList(this._getInvoiceItemProductsFields());\n }\n\n _getInvoiceItemProductsFields() {\n return [\n 'quantity_invoiced',\n this._getOrderProductRowSubtotalField(),\n ...this._getBaseOrderItemProductsFields()\n ];\n }\n\n _getOrderItemsProductsField() {\n return new Field('items')\n .addFieldList(this._getOrderItemProductsFields());\n }\n\n _getOrderItemProductsFields() {\n return [\n 'product_url_key',\n 'quantity_ordered',\n 'quantity_shipped',\n 'quantity_refunded',\n 'quantity_canceled',\n this._getOrderProductEnteredOptionsField(),\n this._getOrderProductSelectedOptionsField(),\n this._getOrderProductRowSubtotalField(),\n ...this._getBaseOrderItemProductsFields()\n ];\n }\n\n _getBaseOrderItemProductsFields() {\n return [\n 'product_name',\n 'product_sku',\n this._getOrderProductSalePriceField()\n ];\n }\n\n _getOrderProductRowSubtotalField() {\n return new Field('row_subtotal')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderProductRowSubtotalInclTaxField() {\n return new Field('row_subtotal_incl_tax')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getOrderProductEnteredOptionsField() {\n return new Field('entered_options')\n .addFieldList(this._getOrderProductOptionsFields());\n }\n\n _getOrderProductSelectedOptionsField() {\n return new Field('selected_options')\n .addFieldList(this._getOrderProductOptionsFields());\n }\n\n _getOrderProductOptionsFields() {\n return [\n 'label',\n 'value',\n this._getOrderProductBundleOptionItemsField(),\n 'linkItems'\n ];\n }\n\n _getOrderProductBundleOptionItemsField() {\n return new Field('items')\n .addFieldList(this._getOrderProductBundleOptionItemsFields());\n }\n\n _getOrderProductBundleOptionItemsFields() {\n return [\n 'title',\n 'qty',\n 'price'\n ];\n }\n\n _getOrderProductSalePriceField() {\n return new Field('product_sale_price')\n .addFieldList(this._getOrderPriceFields());\n }\n\n _getReorderField() {\n return new Field('userInputErrors')\n .addFieldList(this._getReorderFields());\n }\n\n _getReorderFields() {\n return [\n 'code',\n 'message',\n 'path'\n ];\n }\n\n _getOrderShippingAddressField() {\n return new Field('shipping_address')\n .addFieldList(this._getOrderAddressFields());\n }\n\n _getOrderBillingAddressField() {\n return new Field('billing_address')\n .addFieldList(this._getOrderAddressFields());\n }\n\n _getOrderAddressFields() {\n return [\n 'city',\n 'country_id',\n 'firstname',\n 'lastname',\n 'postcode',\n 'region',\n 'region_id',\n 'telephone',\n 'vat_id',\n this._getOrderAddressStreetField()\n ];\n }\n\n _getOrderAddressStreetField() {\n return new Field('street');\n }\n\n _getOrderPaymentMethodsField() {\n return new Field('payment_methods')\n .addFieldList(this._getOrderPaymentMethodsFields());\n }\n\n _getOrderPaymentMethodsFields() {\n return [\n 'name',\n 'type',\n 'purchase_number',\n this._getOrderPaymentMethodAdditionalField()\n ];\n }\n\n _getOrderPaymentMethodAdditionalField() {\n return new Field('additional_data')\n .addFieldList(this._getOrderPaymentMethodAdditionalFields());\n }\n\n _getOrderPaymentMethodAdditionalFields() {\n return [\n 'name',\n 'value'\n ];\n }\n\n _getOrderShippingMethodField() {\n return new Field('shipping_method');\n }\n\n getDownloadableQuery() {\n return new Field('customerDownloadableProducts')\n .addField(this._getDownloadableField());\n }\n\n getOrderByIdQuery(orderId) {\n return this._getOrderByIdField(orderId);\n }\n\n linkOrderMutation(customerEmail) {\n return new Field('linkOrder')\n .addArgument('customer_email', 'String!', customerEmail);\n }\n\n _getOrderByIdField(orderId) {\n return new Field('Customer')\n .addArgument('id', 'Int!', orderId)\n .addFieldList(this._getOrderItemsFields());\n }\n\n _getDownloadableField() {\n return new Field('items')\n .addFieldList(this._getDownloadableFields());\n }\n\n _getDownloadableFields() {\n return [\n 'order_id',\n 'order_increment_id',\n 'date',\n 'status',\n 'download_url',\n 'link_title',\n 'remaining_downloads',\n 'title'\n ];\n }\n}\n\nexport default new OrderQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport OrderQuery from 'Query/Order.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { getOrderList, setLoadingStatus } from 'Store/Order/Order.action';\nimport history from 'Util/History';\nimport { fetchMutation, fetchQuery, getErrorMessage } from 'Util/Request';\nimport { appendWithStoreCode } from 'Util/Url';\n\nexport const CartDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/Cart/Cart.dispatcher'\n);\n\n/** @namespace Store/Order/Dispatcher */\nexport class OrderDispatcher {\n requestOrders(dispatch, page = 1) {\n const query = OrderQuery.getOrderListQuery({ page });\n dispatch(setLoadingStatus(true));\n\n return fetchQuery(query).then(\n /** @namespace Store/Order/Dispatcher/OrderDispatcher/requestOrders/fetchQuery/then */\n ({ customer: { orders } }) => {\n dispatch(getOrderList(orders, false));\n },\n /** @namespace Store/Order/Dispatcher/OrderDispatcher/requestOrders/fetchQuery/then/catch */\n (error) => {\n dispatch(showNotification('error', getErrorMessage(error)));\n dispatch(setLoadingStatus(false));\n }\n );\n }\n\n async reorder(dispatch, incrementId) {\n const {\n reorderItems: {\n userInputErrors = []\n } = {}\n } = await this.handleReorderMutation(dispatch, incrementId);\n\n const cartDispatcher = (await CartDispatcher).default;\n cartDispatcher.updateInitialCartData(dispatch);\n\n history.push(appendWithStoreCode('/cart'));\n\n if (userInputErrors.length) {\n userInputErrors.map(({ message }) => dispatch(showNotification('error', message)));\n }\n }\n\n handleReorderMutation(dispatch, incrementId) {\n try {\n return fetchMutation(OrderQuery.getReorder(incrementId));\n } catch (error) {\n return dispatch(showNotification('error', getErrorMessage(error)));\n }\n }\n\n async getOrderById(dispatch, orderId) {\n try {\n const {\n customer: {\n orders: {\n items\n }\n }\n } = await fetchQuery(OrderQuery.getOrderListQuery({ orderId }));\n\n return items[0];\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n\n return null;\n }\n }\n}\n\nexport default new OrderDispatcher();\n","/**\n* ScandiPWA - Progressive Web App for Magento\n*\n* Copyright © Scandiweb, Inc. All rights reserved.\n* See LICENSE for license details.\n*\n* @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n* @package scandipwa/base-theme\n* @link https://github.com/scandipwa/base-theme\n*/\n\n/**\n * Updates wishlist item price for option based products\n * @param {Object} product\n * @namespace Util/Wishlist/getPriceRange\n */\nexport const getPriceRange = (product, price, priceWithoutTax) => {\n if (!price) {\n return {};\n }\n\n const {\n price_range: {\n minimum_price: {\n regular_price: { currency }\n }\n }\n } = product;\n\n const priceCurrencyValue = { value: price, currency };\n const priceCurrencyValueExclTax = { value: priceWithoutTax, currency };\n const priceSection = {\n final_price: priceCurrencyValue,\n regular_price: priceCurrencyValue,\n final_price_excl_tax: priceCurrencyValueExclTax,\n regular_price_excl_tax: priceCurrencyValueExclTax,\n default_final_price_excl_tax: priceCurrencyValueExclTax\n };\n\n return {\n price_range: {\n minimum_price: priceSection,\n maximum_price: priceSection\n }\n };\n};\n\nexport default getPriceRange;\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { ProductListQuery } from 'Query/ProductList.query';\nimport { Field } from 'Util/Query';\n\n/** @namespace Query/ProductCompare/Query */\nexport class ProductCompareQuery extends ProductListQuery {\n getCreateEmptyCompareList() {\n return new Field('createCompareList')\n .addArgument('input', 'CreateCompareListInput', {})\n .addFieldList(this._getCompareListFields());\n }\n\n getCreateCompareList(products) {\n return new Field('createCompareList')\n .addArgument('input', 'CreateCompareListInput', { products })\n .addFieldList(this._getCompareListFields());\n }\n\n getDeleteCompareList(uid) {\n return new Field('deleteCompareList')\n .addArgument('uid', 'ID!', uid)\n .addField('result');\n }\n\n getAddProductsToCompareList(uid, products) {\n return new Field('addProductsToCompareList')\n .addArgument('input', 'AddProductsToCompareListInput', { uid, products })\n .addFieldList(this._getCompareListFields());\n }\n\n getRemoveProductsFromCompareList(uid, products) {\n return new Field('removeProductsFromCompareList')\n .addArgument('input', 'RemoveProductsFromCompareListInput', { uid, products })\n .addFieldList(this._getCompareListFields());\n }\n\n getAssignCompareList(uid) {\n return new Field('assignCompareListToCustomer')\n .addArgument('uid', 'ID!', uid)\n .addFieldList(this._getAssignFields());\n }\n\n _getAssignFields() {\n return [\n 'result',\n this._getAssignCompareListField()\n ];\n }\n\n _getAssignCompareListField() {\n return new Field('compare_list')\n .addFieldList(this._getCompareListFields());\n }\n\n getCompareList(uid) {\n return new Field('compareList')\n .addArgument('uid', 'ID!', uid)\n .addFieldList(this._getCompareListFields());\n }\n\n getCompareListIds(uid) {\n return new Field('compareList')\n .addArgument('uid', 'ID!', uid)\n .addField(this._getComparableItemIdsField());\n }\n\n _getCompareListFields() {\n return [\n 'uid',\n 'item_count',\n // 'review_count',\n // 'rating_summary',\n this._getCompareAttributeField(),\n this._getComparableItemField()\n ];\n }\n\n _getCompareAttributeField() {\n return new Field('attributes')\n .addFieldList(this._getCompareAttributeFields());\n }\n\n _getCompareAttributeFields() {\n return [\n 'label',\n 'code'\n ];\n }\n\n _getComparableItemAttributeField() {\n return new Field('attributes')\n .addFieldList(this._getComparableItemAttributeFields());\n }\n\n _getComparableItemAttributeFields() {\n return [\n 'value',\n 'code'\n ];\n }\n\n _getComparableItemFields() {\n return [\n this._getCompareProductField(),\n this._getComparableItemAttributeField()\n ];\n }\n\n _getComparableItemIdsFields() {\n return [\n this._getProductIdsField()\n ];\n }\n\n _getCompareProductField() {\n return new Field('product')\n .addFieldList(this._getProductInterfaceFields(true, false))\n .addFieldList(['url'])\n .addField(this._getReviewCountField())\n .addField(this._getRatingSummaryField())\n .addField(this._getDescriptionField())\n .addField(this._getGroupedProductItems());\n }\n\n _getProductIdsField() {\n return new Field('product')\n .addFieldList(this._getProductIdsFields());\n }\n\n _getComparableItemField() {\n return new Field('items')\n .addFieldList(this._getComparableItemFields());\n }\n\n _getComparableItemIdsField() {\n return new Field('items')\n .addFieldList(this._getComparableItemIdsFields());\n }\n\n _getProductIdsFields() {\n return [\n 'id'\n ];\n }\n}\n\nexport default new ProductCompareQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport {\n appendPage,\n updateLoadStatus,\n updatePageLoadingStatus,\n updateProductListItems\n} from 'Store/ProductList/ProductList.action';\nimport { QueryDispatcher } from 'Util/Request';\n\n/**\n * Product List Dispatcher\n * @class ProductListDispatcher\n * @extends QueryDispatcher\n * @namespace Store/ProductList/Dispatcher\n */\nexport class ProductListDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('ProductList');\n }\n\n onSuccess(data, dispatch, options) {\n const {\n products: {\n items,\n total_count,\n page_info: { total_pages } = {}\n } = {}\n } = data;\n\n const { args, isNext } = options;\n const { currentPage } = args;\n\n if (isNext) {\n return dispatch(\n appendPage(\n items,\n currentPage\n )\n );\n }\n\n return dispatch(\n updateProductListItems(\n items,\n currentPage,\n total_count,\n total_pages,\n args\n )\n );\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching Product List!'), error));\n dispatch(updateNoMatch(true));\n }\n\n prepareRequest(options, dispatch) {\n const { isNext } = options;\n\n if (!isNext) {\n dispatch(updateLoadStatus(true));\n } else {\n dispatch(updatePageLoadingStatus());\n }\n\n return ProductListQuery.getQuery(options);\n }\n}\n\nexport default new ProductListDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { updateProductDetails } from 'Store/Product/Product.action';\nimport { QueryDispatcher } from 'Util/Request';\n\nexport const LinkedProductsDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/LinkedProducts/LinkedProducts.dispatcher'\n);\n\n/**\n * Product List Dispatcher\n * @class ProductDispatcher\n * @extends ProductDispatcher\n * @namespace Store/Product/Dispatcher\n */\nexport class ProductDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('Product');\n }\n\n onSuccess(data, dispatch) {\n const { products: { items } } = data;\n\n /**\n * In case there are no items, or item count is\n * smaller then 0 => the product was not found.\n */\n if (!items || items.length <= 0) {\n dispatch(updateNoMatch(true));\n\n return;\n }\n\n const [product] = items;\n\n const product_links = items.reduce((links, product) => {\n const { product_links } = product;\n\n if (product_links) {\n Object.values(product_links).forEach((item) => {\n links.push(item);\n });\n }\n\n return links;\n }, []);\n\n LinkedProductsDispatcher.then(\n ({ default: dispatcher }) => {\n if (product_links.length > 0) {\n dispatcher.handleData(dispatch, product_links);\n } else {\n dispatcher.clearLinkedProducts(dispatch);\n }\n }\n );\n\n dispatch(updateProductDetails(product));\n }\n\n onError(_, dispatch) {\n dispatch(updateNoMatch(true));\n }\n\n prepareRequest(options) {\n return ProductListQuery.getQuery(options);\n }\n}\n\nexport default new ProductDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductListQuery from 'Query/ProductList.query';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport { clearSearchResults, updateLoadStatus, updateSearchBar } from './SearchBar.action';\n\n/**\n * Search Bar Dispatcher\n * @class SearchBarDispatcher\n * @extends QueryDispatcher\n * @namespace Store/SearchBar/Dispatcher\n */\nexport class SearchBarDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('SearchBar');\n }\n\n onSuccess(data, dispatch) {\n dispatch(updateLoadStatus(false));\n dispatch(updateSearchBar(data));\n }\n\n onError(_, dispatch) {\n dispatch(updateLoadStatus(false));\n }\n\n clearSearchResults(dispatch) {\n dispatch(clearSearchResults());\n }\n\n prepareRequest(options, dispatch) {\n dispatch(updateLoadStatus(true));\n\n return ProductListQuery.getQuery({\n ...options,\n notRequireInfo: true,\n noVariants: true\n });\n }\n}\n\nexport default new SearchBarDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport CartQuery from 'Query/Cart.query';\nimport { updateTotals } from 'Store/Cart/Cart.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { isSignedIn } from 'Util/Auth';\nimport { getGuestQuoteId, setGuestQuoteId } from 'Util/Cart';\nimport { fetchMutation, fetchQuery, getErrorMessage } from 'Util/Request';\n\nexport const LinkedProductsDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/LinkedProducts/LinkedProducts.dispatcher'\n);\n\n/**\n * Product Cart Dispatcher\n * @class CartDispatcher\n * @namespace Store/Cart/Dispatcher\n */\nexport class CartDispatcher {\n async updateInitialCartData(dispatch) {\n // Need to get current cart from BE, update cart\n try {\n // ! Get quote token first (local or from the backend) just to make sure it exists\n const quoteId = await this._getGuestQuoteId(dispatch);\n const { cartData = {} } = await fetchQuery(\n CartQuery.getCartQuery(\n quoteId\n )\n );\n\n return this._updateCartData(cartData, dispatch);\n } catch (error) {\n return this.createGuestEmptyCart(dispatch);\n }\n }\n\n async createGuestEmptyCart(dispatch) {\n try {\n const {\n createEmptyCart: quoteId = ''\n } = await fetchMutation(CartQuery.getCreateEmptyCartMutation());\n\n setGuestQuoteId(quoteId);\n this._updateCartData({}, dispatch);\n\n return quoteId;\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n\n return null;\n }\n }\n\n async mergeCarts(sourceCartId, destinationCartId, dispatch) {\n try {\n const {\n mergeCarts: {\n id = ''\n } = {}\n } = await fetchMutation(\n CartQuery.getMergeCartQuery(sourceCartId, destinationCartId)\n );\n\n return id;\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n\n return null;\n }\n }\n\n resetGuestCart(dispatch) {\n return this._updateCartData({}, dispatch);\n }\n\n async changeItemQty(dispatch, options) {\n const { uid, quantity = 1, cartId: originalCartId } = options;\n\n const cartId = !originalCartId ? getGuestQuoteId() : originalCartId;\n\n try {\n if (!cartId) {\n return Promise.reject();\n }\n\n await fetchMutation(\n CartQuery.getUpdateCartItemsMutation({\n cart_id: cartId,\n cart_items: [\n {\n cart_item_uid: uid,\n quantity\n }\n ]\n })\n );\n\n return this.updateInitialCartData(dispatch);\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n\n return Promise.reject();\n }\n }\n\n async addProductToCart(dispatch, options = {}) {\n const { products = [], cartId: userCartId } = options;\n\n const cartId = userCartId || getGuestQuoteId();\n\n if (!Array.isArray(products) || products.length === 0) {\n dispatch(showNotification('error', __('No product data!')));\n return Promise.reject();\n }\n\n try {\n if (!cartId) {\n return Promise.reject();\n }\n\n const { addProductsToCart: { user_errors: errors = [] } = {} } = await fetchMutation(\n CartQuery.getAddProductToCartMutation(cartId, products)\n );\n\n if (Array.isArray(errors) && errors.length > 0) {\n errors.forEach((error) => {\n dispatch(showNotification('error', getErrorMessage(error)));\n });\n\n return Promise.reject();\n }\n\n await this.updateInitialCartData(dispatch);\n dispatch(showNotification('success', __('Product was added to cart!')));\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n return Promise.reject();\n }\n\n return Promise.resolve();\n }\n\n async removeProductFromCart(dispatch, item_id) {\n try {\n const isCustomerSignedIn = isSignedIn();\n const guestQuoteId = !isCustomerSignedIn && getGuestQuoteId();\n\n if (!isCustomerSignedIn && !guestQuoteId) {\n return null;\n }\n\n const { removeCartItem: { cartData = {} } = {} } = await fetchMutation(\n CartQuery.getRemoveCartItemMutation(item_id, guestQuoteId)\n );\n\n this._updateCartData(cartData, dispatch);\n\n return cartData;\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n\n return null;\n }\n }\n\n async applyCouponToCart(dispatch, couponCode) {\n try {\n const isCustomerSignedIn = isSignedIn();\n const guestQuoteId = !isCustomerSignedIn && getGuestQuoteId();\n\n if (!isCustomerSignedIn && !guestQuoteId) {\n return;\n }\n\n const { applyCoupon: { cartData = {} } = {} } = await fetchMutation(\n CartQuery.getApplyCouponMutation(couponCode, guestQuoteId)\n );\n\n this._updateCartData(cartData, dispatch);\n dispatch(showNotification('success', __('Coupon was applied!')));\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n }\n }\n\n async removeCouponFromCart(dispatch) {\n try {\n const isCustomerSignedIn = isSignedIn();\n const guestQuoteId = !isCustomerSignedIn && getGuestQuoteId();\n\n if (!isCustomerSignedIn && !guestQuoteId) {\n return;\n }\n\n const { removeCoupon: { cartData = {} } = {} } = await fetchMutation(\n CartQuery.getRemoveCouponMutation(guestQuoteId)\n );\n\n this._updateCartData(cartData, dispatch);\n dispatch(showNotification('success', __('Coupon was removed!')));\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n }\n }\n\n updateCrossSellProducts(items, dispatch) {\n if (items && items.length) {\n const product_links = items.reduce((links, product) => {\n const { product: { product_links, variants = [] }, sku: variantSku } = product;\n\n const { product_links: childProductLinks } = variants.find(({ sku }) => sku === variantSku) || {};\n\n if (childProductLinks) {\n Object.values(childProductLinks).filter(({ link_type }) => link_type === 'crosssell')\n .map((item) => links.push(item));\n }\n\n if (product_links) {\n Object.values(product_links).filter(({ link_type }) => link_type === 'crosssell')\n .map((item) => links.push(item));\n }\n\n return links;\n }, []);\n\n if (product_links.length !== 0) {\n LinkedProductsDispatcher.then(\n ({ default: dispatcher }) => dispatcher.fetchCrossSellProducts(dispatch, product_links)\n );\n } else {\n LinkedProductsDispatcher.then(\n ({ default: dispatcher }) => dispatcher.clearCrossSellProducts(dispatch)\n );\n }\n } else {\n LinkedProductsDispatcher.then(\n ({ default: dispatcher }) => dispatcher.clearCrossSellProducts(dispatch)\n );\n }\n }\n\n _updateCartData(cartData, dispatch) {\n dispatch(updateTotals(cartData));\n }\n\n /**\n * @param {*} attribute\n * @param {*} product\n */\n _getProductAttribute(attribute, product) {\n const { variants, configurableVariantIndex, [attribute]: attributeValue } = product;\n\n return configurableVariantIndex >= 0\n ? variants[configurableVariantIndex][attribute]\n : attributeValue;\n }\n\n /**\n * Check if it is allowed to add product to cart\n * @param {Object} options Cart options\n * @return {Boolean} Indicates is allowed or not\n * @memberof CartDispatcher\n */\n _canBeAdded(options) {\n if (options.product && options.quantity && (options.product.quantity + options.quantity) < 1) {\n return false;\n }\n\n if (options.quantity === 0) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Get quote id. If quote id is missing, fetch it from the BE.\n * @param Dispatch dispatch\n * @return string quote id\n */\n _getGuestQuoteId(dispatch) {\n const guestQuoteId = getGuestQuoteId();\n\n if (guestQuoteId) {\n return guestQuoteId;\n }\n\n return this.createGuestEmptyCart(dispatch);\n }\n}\n\nexport default new CartDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport WishlistQuery from 'Query/Wishlist.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport {\n clearWishlist,\n removeItemFromWishlist,\n updateAllProductsInWishlist,\n updateIsLoading\n} from 'Store/Wishlist/Wishlist.action';\nimport { isSignedIn } from 'Util/Auth';\nimport { fetchMutation, fetchQuery, getErrorMessage } from 'Util/Request';\nimport getStore from 'Util/Store';\nimport { getPriceRange } from 'Util/Wishlist';\n\nexport const CartDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/Cart/Cart.dispatcher'\n);\n\n/**\n * Get wishlist setting.\n * @namespace Store/Wishlist/Dispatcher/isWishlistEnabled */\nexport const isWishlistEnabled = () => {\n const state = getStore().getState();\n const {\n wishlist_general_active = false\n } = state.ConfigReducer;\n\n return wishlist_general_active;\n};\n\n/**\n * Product Wishlist Dispatcher\n * @class WishlistDispatcher\n * @namespace Store/Wishlist/Dispatcher\n */\nexport class WishlistDispatcher {\n updateInitialWishlistData(dispatch) {\n if (isSignedIn() && isWishlistEnabled()) {\n this._syncWishlistWithBE(dispatch);\n } else {\n dispatch(updateAllProductsInWishlist({}));\n }\n }\n\n _syncWishlistWithBE(dispatch) {\n // Need to get current wishlist from BE, update wishlist\n return fetchQuery(WishlistQuery.getWishlistQuery()).then(\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/_syncWishlistWithBE/fetchQuery/then */\n (data) => {\n if (data && data.wishlist) {\n const { wishlist } = data;\n const productsToAdd = wishlist.items.reduce((prev, wishlistItem) => {\n const {\n id,\n sku,\n product,\n description,\n price,\n price_without_tax,\n buy_request,\n options,\n qty: quantity\n } = wishlistItem;\n\n const priceRange = getPriceRange(product, price, price_without_tax);\n\n return {\n ...prev,\n [id]: {\n ...product,\n ...priceRange,\n quantity,\n wishlist: {\n id,\n sku,\n quantity,\n description,\n buy_request,\n options\n }\n }\n };\n }, {});\n\n dispatch(updateAllProductsInWishlist(productsToAdd));\n } else {\n dispatch(updateIsLoading(false));\n }\n },\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/_syncWishlistWithBE/fetchQuery/then/catch */\n () => {\n dispatch(updateIsLoading(false));\n }\n );\n }\n\n async addItemToWishlist(dispatch, options) {\n if (!isSignedIn()) {\n return;\n }\n\n try {\n const { items = [], wishlistId = '' } = options;\n dispatch(updateIsLoading(true));\n await fetchMutation(WishlistQuery.addProductsToWishlist(wishlistId, items));\n dispatch(showNotification('success', __('Product added to wish-list!')));\n await this._syncWishlistWithBE(dispatch);\n } catch {\n dispatch(showNotification('error', __('Error updating wish list!')));\n } finally {\n dispatch(updateIsLoading(false));\n }\n }\n\n updateWishlistItem(dispatch, options) {\n if (!isSignedIn()) {\n return Promise.reject();\n }\n\n const { wishlistItems = [], wishlistId = '' } = options;\n\n return fetchMutation(WishlistQuery.updateProductsInWishlist(wishlistId, wishlistItems)).then(\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/updateWishlistItem/fetchMutation/then */\n () => {\n this._syncWishlistWithBE(dispatch);\n }\n );\n }\n\n clearWishlist(dispatch) {\n if (!isSignedIn()) {\n return Promise.reject();\n }\n\n return fetchMutation(WishlistQuery.getClearWishlist())\n .then(\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/clearWishlist/then/catch/fetchMutation/then/dispatch */\n () => dispatch(clearWishlist())\n )\n .catch(\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/clearWishlist/then/catch/dispatch */\n () => dispatch(showNotification('error', __('Error clearing wish list!')))\n );\n }\n\n async moveWishlistToCart(dispatch, sharingCode) {\n if (!isSignedIn()) {\n await Promise.reject();\n }\n\n try {\n await fetchMutation(WishlistQuery.getMoveWishlistToCart(sharingCode));\n } finally {\n await this._syncWishlistWithBE(dispatch);\n CartDispatcher.then(\n ({ default: dispatcher }) => dispatcher.updateInitialCartData(dispatch)\n );\n dispatch(showNotification('success', __('Available items moved to cart')));\n }\n }\n\n async removeItemFromWishlist(dispatch, { item_id, noMessages }) {\n if (!item_id || !isSignedIn()) {\n return Promise.reject();\n }\n\n dispatch(updateIsLoading(true));\n\n try {\n await fetchMutation(WishlistQuery.getRemoveProductFromWishlistMutation(item_id));\n } catch (e) {\n if (!noMessages) {\n dispatch(showNotification('error', __('Error updating wish list!')));\n }\n\n return Promise.reject();\n }\n\n dispatch(removeItemFromWishlist(item_id));\n\n if (!noMessages) {\n dispatch(showNotification('success', __('Product has been removed from your Wish List!')));\n }\n\n return Promise.resolve();\n }\n\n // TODO: Need to make it in one request\n removeItemsFromWishlist(dispatch, itemIdMap) {\n if (!itemIdMap.length || !isSignedIn()) {\n return Promise.reject();\n }\n\n return itemIdMap.map((id) => (\n fetchMutation(WishlistQuery.getRemoveProductFromWishlistMutation(id)).then(\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/removeItemsFromWishlist/itemIdMap/map/fetchMutation/then */\n () => {\n dispatch(removeItemFromWishlist(id));\n dispatch(showNotification('success', __('Product has been removed from your Wish List!')));\n },\n /** @namespace Store/Wishlist/Dispatcher/WishlistDispatcher/removeItemsFromWishlist/itemIdMap/map/fetchMutation/then/catch */\n (error) => {\n dispatch(showNotification('error', getErrorMessage(error, __('Error updating wishlist!'))));\n }\n )\n ));\n }\n\n resetWishlist(dispatch) {\n dispatch(clearWishlist());\n }\n}\n\nexport default new WishlistDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nexport * from './Wishlist';\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ProductCompareQuery from 'Query/ProductCompare.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport {\n clearComparedProducts,\n setCompareList,\n setCompareListIds,\n toggleLoader,\n updateCompareTotals\n} from 'Store/ProductCompare/ProductCompare.action';\nimport { getUid, removeUid, setUid } from 'Util/Compare';\nimport { fetchMutation, fetchQuery } from 'Util/Request';\n\nexport const CartDispatcher = import(\n /* webpackMode: \"lazy\", webpackChunkName: \"dispatchers\" */\n 'Store/Cart/Cart.dispatcher'\n);\n\n/** @namespace Store/ProductCompare/Dispatcher */\nexport class ProductCompareDispatcher {\n async getCompareList(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const { compareList } = await fetchQuery(\n ProductCompareQuery.getCompareList(uid)\n );\n\n dispatch(toggleLoader(false));\n dispatch(setCompareList(compareList));\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to fetch compare list'), error));\n\n return false;\n }\n\n return true;\n }\n\n async createCompareList(productId) {\n const {\n createCompareList,\n createCompareList: {\n uid\n }\n } = await fetchMutation(\n ProductCompareQuery.getCreateCompareList(\n [productId]\n )\n );\n\n if (uid) {\n setUid(uid);\n }\n\n return createCompareList;\n }\n\n async addToCompareList(uid, productId) {\n const {\n addProductsToCompareList\n } = await fetchMutation(\n ProductCompareQuery.getAddProductsToCompareList(\n uid,\n [productId]\n )\n );\n\n return addProductsToCompareList;\n }\n\n async addProductToCompare(productId, dispatch) {\n const uid = getUid();\n\n try {\n const result = (uid)\n ? await this.addToCompareList(uid, productId)\n : await this.createCompareList(productId);\n\n dispatch(setCompareList(result));\n dispatch(showNotification('success', __('Product is added to the compare list')));\n\n return result;\n } catch (error) {\n dispatch(showNotification('error', __('Unable to add product to the compare list'), error));\n\n return false;\n }\n }\n\n async removeComparedProduct(productId, dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n try {\n const {\n removeProductsFromCompareList\n } = await fetchMutation(\n ProductCompareQuery.getRemoveProductsFromCompareList(\n uid,\n [productId]\n )\n );\n\n dispatch(setCompareList(removeProductsFromCompareList));\n dispatch(showNotification('success', __('Product is removed from the compare list')));\n\n return removeProductsFromCompareList;\n } catch (error) {\n dispatch(showNotification('error', __('Unable to remove product from the compare list'), error));\n\n return false;\n }\n }\n\n async fetchCustomersList(dispatch) {\n const {\n createCompareList,\n createCompareList: {\n uid\n }\n } = await fetchMutation(\n ProductCompareQuery.getCreateEmptyCompareList()\n );\n\n if (uid) {\n setUid(uid);\n }\n\n dispatch(setCompareList(createCompareList));\n }\n\n async assignCompareList(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n await this.fetchCustomersList(dispatch);\n\n return false;\n }\n\n removeUid();\n\n try {\n const {\n assignCompareListToCustomer: {\n result,\n compare_list,\n compare_list: {\n uid: newUid\n }\n }\n } = await fetchMutation(\n ProductCompareQuery.getAssignCompareList(uid)\n );\n\n if (result) {\n setUid(newUid);\n dispatch(setCompareList(compare_list));\n }\n\n return result;\n } catch (error) {\n dispatch(toggleLoader(false));\n\n return false;\n }\n }\n\n async clearComparedProducts(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const result = await fetchMutation(\n ProductCompareQuery.getDeleteCompareList(uid)\n );\n\n removeUid();\n dispatch(clearComparedProducts());\n dispatch(showNotification('success', __('Compare list is cleared')));\n dispatch(toggleLoader(false));\n\n return result;\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to clear product compare list'), error));\n\n return false;\n }\n }\n\n async updateInitialProductCompareData(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const { compareList } = await fetchQuery(\n ProductCompareQuery.getCompareListIds(uid)\n );\n const { items = [] } = compareList || {};\n const compareIds = items.map(({ product: { id } }) => id);\n\n dispatch(toggleLoader(false));\n dispatch(setCompareListIds(compareIds));\n dispatch(updateCompareTotals(compareIds.length));\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to fetch compare list'), error));\n\n return false;\n }\n\n return true;\n }\n\n resetComparedProducts(dispatch) {\n dispatch(clearComparedProducts());\n }\n}\n\nexport default new ProductCompareDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n/**\n * UrlRewrites Query\n * @class UrlRewritesQuery\n * @namespace Query/UrlRewrites/Query */\nexport class UrlRewritesQuery {\n getQuery({ urlParam }) {\n return new Field('urlResolver')\n .addArgument('url', 'String!', urlParam)\n .addFieldList(this._getUrlResolverFields());\n }\n\n _getUrlResolverFields() {\n return [\n 'id',\n 'sku',\n 'type'\n ];\n }\n}\n\nexport default new UrlRewritesQuery();\n","import { Field } from 'Util/Query';\n\n/** @namespace Scandiweb/Flexibleforms/Query/FlexibleForms/Query */\nexport class FlexibleFormsQuery {\n getQuery() {\n return new Field('flexibleForms')\n .addField(this.getConfigField())\n .addField(this.getAllFormsData());\n }\n\n getFormQuery(form_id) {\n return new Field('flexibleForms')\n .addField(this.getConfigField())\n .addField(this.getForm(form_id)).addArgument('form_id', 'Int', form_id);\n }\n\n getConfigField() {\n return new Field('flexibleFormsConfig')\n .addFieldList(this.getConfigFields());\n }\n\n getConfigFields() {\n return [\n 'enable',\n 'enable_footer_link',\n 'enable_breadcrumbs',\n 'recaptcha_enabled',\n 'enable_loggedin_users',\n 'frontend_flexibleforms_title',\n 'frontend_title',\n 'form_url_prefix',\n 'form_url_suffix',\n 'redirect_url',\n 'enable_store_result_database',\n 'enable_to_admin',\n 'admin_email_name',\n 'admin_email_address',\n 'admin_from_email_address',\n 'admin_email_subject',\n 'enable_to_customer',\n 'customer_email_name',\n 'customer_email_subject',\n 'site_key',\n 'secret_key'\n ];\n }\n\n getAllFormsData() {\n return new Field('getAllFormsData')\n .addFieldList(this.getAllFormsFields());\n }\n\n getAllFormsFields() {\n return [\n 'form_id',\n 'store_id',\n 'form_title',\n 'form_top_description',\n 'form_bottom_description',\n 'form_success_description',\n 'form_fail_description',\n 'form_button_text',\n 'form_status',\n 'total_fields',\n 'enable_captcha',\n new Field('fields').addFieldList([\n 'field_id',\n 'fieldset_id',\n 'field_title',\n 'field_type',\n 'field_style',\n 'field_value',\n 'field_tooltip',\n 'field_note',\n 'field_class',\n 'field_layout',\n 'field_options',\n 'field_options_value',\n 'field_position',\n 'field_required',\n 'field_custom_validation',\n 'field_status'\n ])\n ];\n }\n\n getForm() {\n return new Field('getForm')\n .addFieldList(this.getFormFields());\n }\n\n getSelectOptionsField() {\n return new Field('field_options').addFieldList([\n 'id',\n 'value',\n 'label',\n 'parent_id',\n 'allowed_car_manufacturer'\n ]);\n }\n\n getFormFields() {\n return [\n 'form_id',\n 'form_key',\n 'store_id',\n 'form_title',\n 'form_top_description',\n 'form_bottom_description',\n 'form_success_description',\n 'form_fail_description',\n 'form_button_text',\n 'form_status',\n 'total_fields',\n 'enable_captcha',\n new Field('field_sets').addFieldList([\n new Field('fields').addFieldList([\n 'field_id',\n 'fieldset_id',\n 'field_title',\n 'field_type',\n 'field_style',\n 'field_value',\n 'field_tooltip',\n 'field_note',\n 'field_class',\n 'field_layout',\n 'field_options_value',\n 'field_position',\n 'field_required',\n 'field_custom_validation',\n 'field_status'\n ]).addField(this.getSelectOptionsField()),\n 'fieldset_id',\n 'fieldset_description',\n 'fieldset_title',\n 'fieldset_status',\n 'fieldset_class'\n ])\n ];\n }\n}\n\nexport default new FlexibleFormsQuery();\n","/**\n * @category ScandiPWA\n * @author Kristers Cams \n * @license http://opensource.org/licenses/OSL-3.0 The Open Software License 3.0 (OSL-3.0)\n * @copyright Copyright (c) 2021 Scandiweb, Inc (https://scandiweb.com)\n */\n\nimport { Field } from 'Util/Query';\n\n/** @namespace ScandipwaAmastyLabels/Query/ProductLabelSetting/Query */\nexport class ProductLabelSettingQuery {\n getQuery() {\n return new Field('amLabelSetting')\n .addFieldList(['product_container', 'category_container', 'max_labels',\n 'show_several_on_place', 'labels_alignment', 'margin_between']);\n }\n}\n\nexport default new ProductLabelSettingQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * Email availability check Query\n * @class CheckEmailQuery\n * @namespace Query/CheckEmail/Query */\nexport class CheckEmailQuery {\n getIsEmailAvailableQuery(email) {\n const query = new Field('isEmailAvailable')\n .addArgument('email', 'String!', email)\n .addField('is_email_available');\n\n return query;\n }\n}\n\nexport default new CheckEmailQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * NewsletterSubscription Mutations\n * @class NewsletterSubscriptionQuery\n * @namespace Scandipwa/Query/NewsletterSubscription/Query */\nexport class NewsletterSubscriptionQuery {\n getSubscribeToNewsletterMutation(email, newsletterOptions) {\n return new Field('subscribeEmailToNewsletter')\n .addArgument('email', 'String!', email)\n .addArgument('newsletterOptions', 'NewsletterOptions!', newsletterOptions)\n .addFieldList(this._getPageFields());\n }\n\n _getPageFields() {\n return [\n 'status'\n ];\n }\n}\n\nexport default new NewsletterSubscriptionQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { Field } from 'Util/Query';\n\n/**\n * Category Query\n * @class CategoryQuery\n * @namespace Query/Category/Query\n */\nexport class CategoryQuery {\n __construct() {\n super.__construct();\n this.options = {};\n }\n\n getQuery(options = {}) {\n this.options = options;\n\n return new Field('category')\n .addArgument(...this._getConditionalArguments())\n .addFieldList(this._getDefaultFields())\n .addField(this._getChildrenFields());\n }\n\n _getConditionalArguments() {\n const { categoryIds } = this.options;\n\n if (categoryIds) {\n return ['id', 'Int!', categoryIds];\n }\n\n throw new Error(__('There was an error requesting the category'));\n }\n\n _getChildrenFields() {\n return new Field('children')\n .addFieldList(this._getDefaultFields());\n }\n\n _getBreadcrumbsField() {\n return new Field('breadcrumbs')\n .addFieldList(this._getBreadcrumbFields());\n }\n\n _getBreadcrumbFields() {\n return [\n 'category_name',\n 'category_level',\n 'category_url',\n 'category_is_active'\n ];\n }\n\n _getCmsBlockFields() {\n return [\n 'content',\n 'disabled',\n 'title',\n 'identifier'\n ];\n }\n\n _getCmsBlockField() {\n return new Field('cms_block')\n .addFieldList(this._getCmsBlockFields());\n }\n\n _getDefaultFields() {\n return [\n 'id',\n 'url',\n 'name',\n 'image',\n 'url_key',\n 'url_path',\n 'is_active',\n 'meta_title',\n 'description',\n 'canonical_url',\n 'product_count',\n 'meta_keywords',\n 'default_sort_by',\n 'meta_description',\n 'landing_page',\n 'display_mode',\n 'is_anchor',\n this._getCmsBlockField(),\n this._getBreadcrumbsField()\n ];\n }\n}\n\nexport default new CategoryQuery();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ContactFormQuery from 'Query/ContactForm.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { fetchMutation, getErrorMessage } from 'Util/Request';\n\nimport { updateContactForm } from './ContactForm.action';\n\n/**\n * ContactForm Dispatcher\n * @class ContactFormDispatcher\n * @extends QueryDispatcher\n * @namespace Store/ContactForm/Dispatcher\n */\nexport class ContactFormDispatcher {\n prepareRequest(options, dispatch) {\n const { form = {}, fields = {} } = options;\n\n const mutation = ContactFormQuery.getSendContactFormMutation(fields);\n\n dispatch(updateContactForm({\n isLoading: true\n }));\n\n return fetchMutation(mutation)\n .then(\n /** @namespace Store/ContactForm/Dispatcher/ContactFormDispatcher/prepareRequest/fetchMutation/then */\n (data) => {\n dispatch(showNotification('success', data.contactForm.message));\n dispatch(updateContactForm({\n isLoading: false\n }));\n\n // Clears form\n if (typeof form.reset === 'function') {\n form.reset();\n }\n },\n /** @namespace Store/ContactForm/Dispatcher/ContactFormDispatcher/prepareRequest/fetchMutation/then/catch */\n (error) => {\n dispatch(showNotification('error', getErrorMessage(error)));\n dispatch(updateContactForm({\n isLoading: false\n }));\n }\n );\n }\n}\n\nexport default new ContactFormDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport ReviewQuery from 'Query/Review.query';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { fetchMutation } from 'Util/Request';\n\n/**\n * Product Review Dispatcher\n * @class WishlistDispatcher\n * @namespace Store/Review/Dispatcher\n */\nexport class ReviewDispatcher {\n prepareReviewData(reviewItem) {\n const {\n rating_data,\n product_sku,\n detail,\n title,\n nickname\n } = reviewItem;\n\n return {\n nickname,\n sku: product_sku,\n summary: title,\n text: detail,\n ratings: Object.keys(rating_data).map(\n (key) => ({\n id: key,\n value_id: rating_data[key]\n })\n )\n };\n }\n\n async submitProductReview(dispatch, options) {\n await fetchMutation(ReviewQuery.getAddProductReviewMutation(this.prepareReviewData(options)));\n dispatch(showNotification('success', 'You submitted your review for moderation.'));\n }\n}\n\nexport default new ReviewDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport BlogCommentsQuery from '../../query/BlogComments.query';\nimport { appendComments, updateComments } from '../PostsDetails/PostsDetails.action';\n\n/** @namespace Blog/Store/PostComments/Dispatcher/PostCommentsDispatcher */\nexport class PostCommentsDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('BlogPostComments');\n }\n\n onSuccess(data, dispatch) {\n const { blogComments: { items = [], total_pages } = {} } = data;\n\n dispatch(updateComments(items, total_pages));\n }\n\n onError({ message }, dispatch) {\n dispatch(showNotification('error', 'Error fetching post comments!', message));\n }\n\n prepareRequest(options) {\n return BlogCommentsQuery.getQuery(options);\n }\n\n clearComments(dispatch) {\n dispatch(updateComments([], 0));\n }\n}\n\nexport default new PostCommentsDispatcher();\n","import CartQuery from 'Query/Cart.query';\nimport { CartDispatcher as SourceCartDispatcher } from 'SourceStore/Cart/Cart.dispatcher';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { getGuestQuoteId } from 'Util/Cart';\nimport { fetchMutation, getErrorMessage } from 'Util/Request';\n\n/** @namespace Scandipwa/Store/Cart/Dispatcher */\nexport class CartDispatcher extends SourceCartDispatcher {\n /**\n * Overridden to empty cart before adding new products (only allow to reserve 1 product at a time)\n */\n async addProductToCart(dispatch, options = {}) {\n const { products = [], cartId: userCartId } = options;\n await this.createGuestEmptyCart(dispatch);\n\n const cartId = userCartId || getGuestQuoteId();\n\n if (!Array.isArray(products) || products.length === 0) {\n dispatch(showNotification('error', __('No product data!')));\n return Promise.reject();\n }\n\n try {\n if (!cartId) {\n return Promise.reject();\n }\n\n const { addProductsToCart: { user_errors: errors = [] } = {} } = await fetchMutation(\n CartQuery.getAddProductToCartMutation(cartId, products)\n );\n\n if (Array.isArray(errors) && errors.length > 0) {\n errors.forEach((error) => {\n dispatch(showNotification('error', getErrorMessage(error)));\n });\n\n return Promise.reject();\n }\n\n await this.updateInitialCartData(dispatch);\n } catch (error) {\n dispatch(showNotification('error', getErrorMessage(error)));\n return Promise.reject();\n }\n\n return Promise.resolve();\n }\n}\n\nexport default new CartDispatcher();\n","import {\n WishlistDispatcher as SourceWishlistDispatcher\n} from 'SourceStore/Wishlist/Wishlist.dispatcher';\n\n/**\n * Override to disable wishlist\n */\n/** @namespace Scandipwa/Store/Wishlist/Dispatcher/isWishlistEnabled */\nexport const isWishlistEnabled = () => false;\n\n/**\n * Override methods to disable wishlist functionality\n */\n/** @namespace Scandipwa/Store/Wishlist/Dispatcher */\nexport class WishlistDispatcher extends SourceWishlistDispatcher {\n updateInitialWishlistData() {\n return false;\n }\n\n _syncWishlistWithBE() {\n return false;\n }\n\n async addItemToWishlist() {\n return false;\n }\n\n updateWishlistItem() {\n return false;\n }\n\n clearWishlist() {\n return false;\n }\n\n async moveWishlistToCart() {\n return false;\n }\n\n async removeItemFromWishlist() {\n return false;\n }\n\n removeItemsFromWishlist() {\n return false;\n }\n\n resetWishlist() {\n return false;\n }\n}\n\nexport default new WishlistDispatcher();\n","import ProductCompareQuery from 'Query/ProductCompare.query';\n// eslint-disable-next-line max-len\nimport { ProductCompareDispatcher as SourceProductCompareDispatcher } from 'SourceStore/ProductCompare/ProductCompare.dispatcher';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport {\n clearComparedProducts,\n setCompareList,\n setCompareListIds,\n toggleLoader,\n updateCompareTotals\n} from 'Store/ProductCompare/ProductCompare.action';\nimport { getUid, removeUid, setUid } from 'Util/Compare';\nimport { fetchMutation, fetchQuery } from 'Util/Request';\n\n/** @namespace Scandipwa/Store/ProductCompare/Dispatcher */\nexport class ProductCompareDispatcher extends SourceProductCompareDispatcher {\n async getCompareList(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const { compareList } = await fetchQuery(\n ProductCompareQuery.getCompareList(uid)\n );\n\n dispatch(toggleLoader(false));\n dispatch(setCompareList(compareList));\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to fetch Favorites'), error));\n\n return false;\n }\n\n return true;\n }\n\n async createCompareList(productId) {\n const {\n createCompareList,\n createCompareList: {\n uid\n }\n } = await fetchMutation(\n ProductCompareQuery.getCreateCompareList(\n [productId]\n )\n );\n\n if (uid) {\n setUid(uid);\n }\n\n return createCompareList;\n }\n\n async addToCompareList(uid, productId) {\n const {\n addProductsToCompareList\n } = await fetchMutation(\n ProductCompareQuery.getAddProductsToCompareList(\n uid,\n [productId]\n )\n );\n\n return addProductsToCompareList;\n }\n\n async addProductToCompare(productId, dispatch) {\n const uid = getUid();\n\n try {\n const result = (uid)\n ? await this.addToCompareList(uid, productId)\n : await this.createCompareList(productId);\n\n dispatch(setCompareList(result));\n dispatch(showNotification('success', __('Car Added to Favorites')));\n\n return result;\n } catch (error) {\n dispatch(showNotification('error', __('Unable to add car to the Favorites'), error));\n\n return false;\n }\n }\n\n async removeComparedProduct(productId, dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n try {\n const {\n removeProductsFromCompareList\n } = await fetchMutation(\n ProductCompareQuery.getRemoveProductsFromCompareList(\n uid,\n [productId]\n )\n );\n\n dispatch(setCompareList(removeProductsFromCompareList));\n dispatch(showNotification('success', __('Car Removed from Favorites')));\n\n return removeProductsFromCompareList;\n } catch (error) {\n dispatch(showNotification('error', __('Unable to remove Car from the Favorites'), error));\n\n return false;\n }\n }\n\n async fetchCustomersList(dispatch) {\n const {\n createCompareList,\n createCompareList: {\n uid\n }\n } = await fetchMutation(\n ProductCompareQuery.getCreateEmptyCompareList()\n );\n\n if (uid) {\n setUid(uid);\n }\n\n dispatch(setCompareList(createCompareList));\n }\n\n async assignCompareList(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n await this.fetchCustomersList(dispatch);\n\n return false;\n }\n\n removeUid();\n\n try {\n const {\n assignCompareListToCustomer: {\n result,\n compare_list,\n compare_list: {\n uid: newUid\n }\n }\n } = await fetchMutation(\n ProductCompareQuery.getAssignCompareList(uid)\n );\n\n if (result) {\n setUid(newUid);\n dispatch(setCompareList(compare_list));\n }\n\n return result;\n } catch (error) {\n dispatch(toggleLoader(false));\n\n return false;\n }\n }\n\n async clearComparedProducts(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const result = await fetchMutation(\n ProductCompareQuery.getDeleteCompareList(uid)\n );\n\n removeUid();\n dispatch(clearComparedProducts());\n dispatch(showNotification('success', __('Favorites is cleared')));\n dispatch(toggleLoader(false));\n\n return result;\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to clear car Favorites'), error));\n\n return false;\n }\n }\n\n async updateInitialProductCompareData(dispatch) {\n const uid = getUid();\n\n if (!uid) {\n return false;\n }\n\n dispatch(toggleLoader(true));\n\n try {\n const { compareList } = await fetchQuery(\n ProductCompareQuery.getCompareListIds(uid)\n );\n const { items = [] } = compareList || {};\n const compareIds = items.map(({ product: { id } }) => id);\n\n dispatch(toggleLoader(false));\n dispatch(setCompareListIds(compareIds));\n dispatch(updateCompareTotals(compareIds.length));\n } catch (error) {\n dispatch(toggleLoader(false));\n dispatch(showNotification('error', __('Unable to fetch Favorites'), error));\n\n return false;\n }\n\n return true;\n }\n\n resetComparedProducts(dispatch) {\n dispatch(clearComparedProducts());\n }\n}\n\nexport default new ProductCompareDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\n/**\n * NoMatch Dispatcher\n * @class NoMatchDispatcher\n * @namespace Store/NoMatch/Dispatcher\n */\nexport class NoMatchDispatcher {\n updateNoMatch(dispatch, options) {\n const { noMatch } = options;\n dispatch(updateNoMatch(noMatch));\n }\n}\n\nexport default new NoMatchDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport CartQuery from 'Query/Cart.query';\nimport ConfigQuery from 'Query/Config.query';\nimport RegionQuery from 'Query/Region.query';\nimport ReviewQuery from 'Query/Review.query';\nimport { updateConfig } from 'Store/Config/Config.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport BrowserDatabase from 'Util/BrowserDatabase';\nimport { setCurrency } from 'Util/Currency';\nimport { fetchMutation, QueryDispatcher } from 'Util/Request';\nimport { ONE_MONTH_IN_SECONDS } from 'Util/Request/QueryDispatcher';\n\n/** @namespace Store/Config/Dispatcher */\nexport class ConfigDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('Config');\n }\n\n static updateCurrency(dispatch, options) {\n const { currencyCode } = options;\n\n return fetchMutation(ConfigQuery.getSaveSelectedCurrencyMutation(\n currencyCode\n )).then(\n setCurrency(currencyCode),\n dispatch(updateConfig())\n );\n }\n\n onSuccess(data, dispatch) {\n if (data) {\n BrowserDatabase.setItem(data, 'config', ONE_MONTH_IN_SECONDS);\n dispatch(updateConfig(data));\n }\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching Config!'), error));\n }\n\n prepareRequest() {\n return [\n RegionQuery.getCountriesQuery(),\n ReviewQuery.getRatingQuery(),\n ConfigQuery.getQuery(),\n ConfigQuery.getCheckoutAgreements(),\n ConfigQuery.getCurrencyData(),\n CartQuery.getCartDisplayConfig()\n ];\n }\n}\n\nexport default new ConfigDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { QueryDispatcher } from 'Util/Request';\n\nimport BlogPostsQuery from '../../query/BlogPosts.query';\nimport { postsException, updatePosts } from './Posts.action';\n\n/**\n * Posts Dispatcher\n * @extends QueryDispatcher\n * @namespace Blog/Store/Posts/Dispatcher/PostsDispatcher\n */\nexport class PostsDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('BlogPosts');\n }\n\n onSuccess(data, dispatch) {\n const { posts } = data;\n dispatch(updatePosts(posts));\n }\n\n onError([{ message }], dispatch) {\n dispatch(postsException(message));\n dispatch(showNotification('error', 'Error fetching Posts!', message));\n }\n\n prepareRequest(options) {\n return BlogPostsQuery.getQuery(options);\n }\n}\n\nexport default new PostsDispatcher();\n","/**\n * ScandiPWA - Progressive Web App for Magento\n *\n * Copyright © Scandiweb, Inc. All rights reserved.\n * See LICENSE for license details.\n *\n * @license OSL-3.0 (Open Software License (\"OSL\") v. 3.0)\n * @package scandipwa/base-theme\n * @link https://github.com/scandipwa/base-theme\n */\n\nimport UrlRewritesQuery from 'Query/UrlRewrites.query';\nimport { updateNoMatch } from 'Store/NoMatch/NoMatch.action';\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport { setIsUrlRewritesLoading, updateUrlRewrite } from 'Store/UrlRewrites/UrlRewrites.action';\nimport { QueryDispatcher } from 'Util/Request';\n\n/**\n * Url Rewrite Dispathcer\n * @class UrlRewritesDispatcher\n * @extends RequestDispatcher\n * @namespace Store/UrlRewrites/Dispatcher\n */\nexport class UrlRewritesDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('UrlRewrites');\n }\n\n onSuccess({ urlResolver }, dispatch, { urlParam }) {\n dispatch(updateUrlRewrite(urlResolver || { notFound: true }, urlParam));\n dispatch(updateNoMatch(!urlResolver));\n }\n\n onError(error, dispatch, { urlParam }) {\n dispatch(setIsUrlRewritesLoading(false));\n dispatch(updateUrlRewrite({ notFound: true }, urlParam));\n dispatch(updateNoMatch(true));\n dispatch(showNotification('error', __('Error fetching URL-rewrites!'), error));\n }\n\n /**\n * Prepare UrlRewrite requests\n * @param {Object} options A object containing different aspects of query, each item can be omitted\n * @return {Query} UrlRewrite query\n * @memberof UrlRewritesDispatcher\n */\n prepareRequest(options, dispatch) {\n dispatch(setIsUrlRewritesLoading(true));\n\n return [\n UrlRewritesQuery.getQuery(this.processUrlOptions(options))\n ];\n }\n\n processUrlOptions(options) {\n const { urlParam } = options;\n\n // FAILSAFE: Trim index.php if someone forgot to set \"Use Web Server Rewrites\" to \"Yes\"\n const trimmedParam = urlParam.replace('index.php/', '');\n\n return {\n ...options,\n urlParam: trimmedParam.replace(new RegExp(window.storeRegexText), '')\n };\n }\n}\n\nexport default new UrlRewritesDispatcher();\n","import { showNotification } from 'Store/Notification/Notification.action';\nimport BrowserDatabase from 'Util/BrowserDatabase';\nimport { makeCancelable } from 'Util/Promise';\nimport { Field, prepareQuery } from 'Util/Query';\nimport { ONE_MONTH_IN_SECONDS } from 'Util/Request/QueryDispatcher';\nimport { executePost, listenForBroadCast } from 'Util/Request/Request';\n\nimport FlexibleFormsQuery from '../../query/FlexibleForms.query';\nimport { updateFlexibleForms } from './FlexibleForms.action';\n\n/** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher */\nexport class FlexibleFormsDispatcher {\n __construct() {\n this.name = 'FlexibleForms';\n this.promise = null;\n }\n\n /**\n * Overriden to use a POST (executePost) request instead of GET (executeGet)\n *\n * Is responsible for request routing and manages `onError`, `onSuccess`, `onUpdate` functions triggers.\n * @param {Function} dispatch Store changing function from Redux (dispatches actions)\n * @param {any} options Any options received from Container\n * @return {void}@memberof QueryDispatcher\n */\n handleData(dispatch, options) {\n const { name } = this;\n\n const rawQueries = this.prepareRequest(options, dispatch);\n\n if (!rawQueries) {\n return;\n }\n\n const queries = rawQueries instanceof Field ? [rawQueries] : rawQueries;\n\n if (this.promise) {\n this.promise.cancel();\n }\n\n this.promise = makeCancelable(\n new Promise((resolve, reject) => {\n executePost(prepareQuery(queries))\n .then(\n /** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher/FlexibleFormsDispatcher/handleData/makeCancelable/executePost/then/resolve */\n (data) => resolve(data),\n /** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher/FlexibleFormsDispatcher/handleData/makeCancelable/executePost/then/reject/catch */\n (error) => reject(error)\n );\n })\n );\n\n this.promise.promise.then(\n /** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher/FlexibleFormsDispatcher/handleData/then */\n (data) => this.onSuccess(data, dispatch, options),\n /** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher/FlexibleFormsDispatcher/handleData/then/catch */\n (error) => this.onError(error, dispatch, options),\n );\n\n listenForBroadCast(name).then(\n /** @namespace Scandiweb/Flexibleforms/Store/FlexibleForms/Dispatcher/FlexibleFormsDispatcher/handleData/listenForBroadCast/then */\n (data) => this.onUpdate(data, dispatch, options),\n );\n }\n\n onSuccess(data, dispatch) {\n if (data) {\n BrowserDatabase.setItem(data, 'FlexibleForms', ONE_MONTH_IN_SECONDS);\n dispatch(updateFlexibleForms(data));\n }\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching FlexibleForms!'), error));\n }\n\n prepareRequest(form_id) {\n return [\n FlexibleFormsQuery.getFormQuery(form_id)\n ];\n }\n}\n\nexport default new FlexibleFormsDispatcher();\n","/**\n * @category ScandiPWA\n * @author Kristers Cams \n * @license http://opensource.org/licenses/OSL-3.0 The Open Software License 3.0 (OSL-3.0)\n * @copyright Copyright (c) 2021 Scandiweb, Inc (https://scandiweb.com)\n */\n\nimport { showNotification } from 'Store/Notification/Notification.action';\nimport BrowserDatabase from 'Util/BrowserDatabase';\nimport { QueryDispatcher } from 'Util/Request';\nimport { ONE_MONTH_IN_SECONDS } from 'Util/Request/QueryDispatcher';\n\nimport ProductLabelSettingQuery from '../../../query/ProductLabelSetting.query';\nimport { updateProductLabelSetting } from './ProductLabelSetting.action';\n\n/** @namespace ScandipwaAmastyLabels/Store/ProductLabel/ProductLabelSetting/Dispatcher */\nexport class ProductLabelSettingDispatcher extends QueryDispatcher {\n __construct() {\n super.__construct('amLabelSetting');\n }\n\n onSuccess(data, dispatch) {\n if (data) {\n BrowserDatabase.setItem(data, 'amLabelSetting', ONE_MONTH_IN_SECONDS);\n dispatch(updateProductLabelSetting(data));\n }\n }\n\n onError(error, dispatch) {\n dispatch(showNotification('error', __('Error fetching configuration, please refresh!'), error));\n }\n\n prepareRequest() {\n return [\n ProductLabelSettingQuery.getQuery()\n ];\n }\n}\n\nexport default new ProductLabelSettingDispatcher();\n"],"sourceRoot":""}