@ikas/storefront 5.0.12 → 5.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/error/argument-validation-error/index.d.ts +8 -0
- package/build/components/checkout/components/error/argument-validation-error/index.js +1 -0
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/master-pass/modal-otp/index.js +1 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +2 -2
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/modelMasterPass.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/components/popup/index.d.ts +2 -0
- package/build/components/popup/index.js +1 -0
- package/build/components/popup/renderer/index.d.ts +11 -0
- package/build/components/popup/renderer/index.js +1 -0
- package/build/components/popup/renderer/model.d.ts +21 -0
- package/build/components/popup/renderer/model.js +1 -0
- package/build/components/popup/utils/index.d.ts +8 -0
- package/build/components/popup/utils/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/tslib/tslib.es6.mjs.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/left-arrow.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/right-arrow.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/assets/x-close.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/divider-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/date-item-view/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/gender-item-view/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/space-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/text-element-renderer/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-birthday/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-email/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-name/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-phone/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-surname/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/window-settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-time/index.js +1 -0
- package/build/ext/mobx-react/dist/mobxreact.esm.js +1 -0
- package/build/ext/swiper/modules/navigation.css.js +1 -0
- package/build/ext/swiper/modules/navigation.mjs.js +1 -0
- package/build/ext/swiper/modules/pagination.css.js +1 -0
- package/build/ext/swiper/modules/scrollbar.mjs.js +1 -0
- package/build/ext/swiper/shared/classes-to-selector.mjs.js +1 -0
- package/build/ext/swiper/shared/create-element-if-not-defined.mjs.js +1 -0
- package/build/ext/swiper/shared/ssr-window.esm.mjs.js +1 -0
- package/build/ext/swiper/shared/swiper-core.mjs.js +1 -0
- package/build/ext/swiper/shared/update-on-virtual-data.mjs.js +1 -0
- package/build/ext/swiper/shared/update-swiper.mjs.js +1 -0
- package/build/ext/swiper/shared/utils.mjs.js +1 -0
- package/build/ext/swiper/swiper-react.mjs.js +1 -0
- package/build/ext/swiper/swiper.css.js +1 -0
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/hooks/useStore.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/customer/index.d.ts +8 -1
- package/build/models/data/customer/index.js +1 -1
- package/build/models/data/customer-form-data-input/customer-register-subscription-input/index.d.ts +7 -0
- package/build/models/data/customer-form-data-input/customer-register-subscription-input/index.js +1 -0
- package/build/models/data/customer-form-data-input/index.d.ts +19 -0
- package/build/models/data/customer-form-data-input/index.js +1 -0
- package/build/models/data/index.d.ts +2 -0
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/storefront-popup/index.d.ts +40 -0
- package/build/models/data/storefront-popup/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-analytics/index.d.ts +7 -0
- package/build/models/data/storefront-popup/storefront-popup-analytics/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-date-f/304/261lter/index.d.ts +6 -0
- package/build/models/data/storefront-popup/storefront-popup-date-f/304/261lter/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-display-filter/index.d.ts +11 -0
- package/build/models/data/storefront-popup/storefront-popup-display-filter/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-display-settings/index.d.ts +16 -0
- package/build/models/data/storefront-popup/storefront-popup-display-settings/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-page-filter/index.d.ts +16 -0
- package/build/models/data/storefront-popup/storefront-popup-page-filter/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-page-filter/storefront-popup-page-filter-data/index.d.ts +12 -0
- package/build/models/data/storefront-popup/storefront-popup-page-filter/storefront-popup-page-filter-data/index.js +1 -0
- package/build/models/data/storefront-popup/storefront-popup-routing/index.d.ts +6 -0
- package/build/models/data/storefront-popup/storefront-popup-routing/index.js +1 -0
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.d.ts +3 -0
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/store/blog/index.js +1 -1
- package/build/store/brand/index.js +1 -1
- package/build/store/cart/index.js +1 -1
- package/build/store/category/index.js +1 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.d.ts +2 -1
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +2 -0
- package/build/store/customer/index.js +1 -1
- package/build/store/html-meta-data/index.js +1 -1
- package/build/store/location/index.js +1 -1
- package/build/store/product/index.js +1 -1
- package/build/store/storefront-popup/index.d.ts +74 -0
- package/build/store/storefront-popup/index.js +1 -0
- package/package.json +18 -12
- package/build/components/checkout/components/epaykolay-button/index.d.ts +0 -5
- package/build/components/checkout/components/epaykolay-button/index.js +0 -1
- package/build/components/checkout/components/epaykolay-button/style.module.scss.js +0 -1
- package/build/components/checkout/components/svg/epaykolay.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import s from"lodash/xorBy";import o from"lodash/cloneDeep";import n from"./api.js";import{IkasCustomer as a}from"../../models/data/customer/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCustomerEmailSubscriptionStatus as c}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasRaffleParticipant as d}from"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import u from"../raffle/index.js";import'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import l from"../product/index.js";import{Analytics as h}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{IkasLoginError as p,IkasRegisterError as f,SaveMyCustomerInput as v}from"@ikas/storefront-api";import{populateRaffleParticipantProducts as g}from"@ikas/storefront-providers";import w from"../checkout/index.js";var k="undefined"==typeof localStorage,b=function(){function b(s){var a=this;this.customer=null,this.token=null,this.tokenExpiry=null,this.baseStore=null,this._initialized=!1,this._visitorSubscribedEmail=!1,this._lastViewedProducts=[],this._customerConsentGranted=!1,this._refundSettings=null,this._captchaToken=null,this._savedLastViewedProducts=[],this._savedLastViewedProductsResponse=null,this.toAnalyticsCustomer=function(t){return r(r({},t),{consentGranted:a._customerConsentGranted})},this.login=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,!0]):[2,!1]}}))}))},this.customerLogin=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(p).includes(t)?t:p.UNKOWN}))}]}}))}))},this.logout=function(){var t;a.clearLocalData(),null===(t=a.baseStore)||void 0===t||t.cartStore.removeCart(),h.customerLogout()},this.register=function(r,i,s,o,c,d,u){return t(a,void 0,void 0,(function(){var t,a;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.register({email:s,password:o,firstName:r,lastName:i,isAcceptMarketing:c,attributes:d,captchaToken:this._captchaToken,phone:u})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&(null===(a=t.data)||void 0===a?void 0:a.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.saveLocalLastViewedProducts(),h.completeRegistration(this.toAnalyticsCustomer(this.customer)),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(f).includes(t)?t:f.UNKOWN}))}]}}))}))},this.activateCustomer=function(){return t(a,void 0,void 0,(function(){var t,r,i;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("token"))?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.activateCustomer({token:r,captchaToken:this._captchaToken})];case 2:return i=e.sent(),this.clearCaptchaToken(),[2,i.isSuccess];case 3:return[2,!1]}}))}))},this.resendCustomerActivationMail=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerActivationMail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess];case 3:return[2,!1]}}))}))},this.validateCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.validateCustomerPhoneVerificationCode({verificationCode:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.resendCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerPhoneVerificationCode({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.saveContactForm=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return h.contactForm(i),[4,this.getCaptcha()];case 1:return e.sent(),[4,n.sendContactFormToMerchant(r(r({},i),{captchaToken:this._captchaToken}))];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.checkEmail=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.checkEmail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&!!(null===(i=t.data)||void 0===i?void 0:i.exists)]}}))}))},this.forgotPassword=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.forgotPassword({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&t.data]}}))}))},this.recoverPassword=function(r,i,s){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.recoverPassword({password:r,passwordAgain:i,token:s,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.saveCustomer=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.saveCustomer({input:new v(r)})];case 1:return(t=e.sent()).isSuccess&&t.data?(this.setCustomer(t.data),[2,!0]):[2,!1]}}))}))},this.getOrders=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getOrders({})];case 1:return[2,t.sent().data||[]]}}))}))},this.getOrder=function(r){return t(a,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrders({orderId:r})];case 1:return(t=e.sent()).isSuccess&&(null===(s=t.data)||void 0===s?void 0:s.length)?(i=t.data[0],[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),i.refundSettings=this._refundSettings,[2,i]}}))}))},this.getOrderByEmail=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrderByEmail({email:r,orderNumber:i})];case 1:return(t=e.sent()).isSuccess&&t.data?(s=t.data,[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),s.refundSettings=this._refundSettings,[2,s]}}))}))},this.getOrderTransactions=function(r){return void 0===r&&(r={}),t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.listOrderTransactions({checkoutId:{eq:r.checkoutId},id:{eq:r.checkoutId},orderId:{eq:r.orderId}})];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProductsIds=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProducts=function(){return t(a,void 0,void 0,(function(){var t,r,i,s,o,a;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return(t=e.sent()).isSuccess&&(null===(i=t.data)||void 0===i?void 0:i.length)?[4,l.searchProducts({input:{productIdList:t.data.map((function(t){return t.productId})),priceListId:m.getPriceListId(),salesChannelId:m.getSalesChannelId()}})]:[2,[]];case 2:return r=e.sent(),null===(o=null===(s=r.data)||void 0===s?void 0:s.data)||void 0===o||o.forEach((function(t){t.selectedVariantValues=t.variants[0].variantValues})),[2,(null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.data)||[]]}}))}))},this.addProductToFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!0,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r),[2,t.data||!1]}}))}))},this.removeProductFromFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!1,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r,!0),[2,t.data||!1]}}))}))},this.isProductFavorite=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(t=this.customer)||void 0===t?void 0:t.id))throw Error("Unauthorized");return[4,n.isFavoriteProduct({productId:r})];case 1:return[2,e.sent().data||!1]}}))}))},this.createEmailSubscription=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.subscribeToMarketingNotifications({input:{email:r,captchaToken:this._captchaToken}})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(r)),[2,t.isSuccess]}}))}))},this.sendReview=function(i){return t(a,void 0,void 0,(function(){var t,s,o,a,c;return e(this,(function(e){switch(e.label){case 0:if(t=m.getCustomerReviewSettings(),s=m.getSalesChannelId(),o=m.getCurrentLocale(),!t)return[2];if(!(a=null===(c=this.customer)||void 0===c?void 0:c.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,n.createCustomerReview({input:r(r({},i),{customerId:t.customerLoginRequired?a:void 0,salesChannelId:s||"",locale:o})})];case 1:return[2,e.sent().data]}}))}))},this.onCustomerConsentGrant=function(){a.saveCustomerConsent()},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a.initialized&&(clearInterval(e),t(null))}),100)}))},this.waitUntilCaptchaTokenInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a._captchaToken&&(clearInterval(e),t(null))}),100)}))},this.getRaffles=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,u.listRaffleParticipants()];case 1:return(t=e.sent())&&t.data?[4,g(t.data)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2,null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new d(t)}))]}}))}))},this.getCustomerAttributes=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,n.listCustomerAttribute()];case 1:return t=e.sent(),this.customer&&(null===(r=this.customer.attributes)||void 0===r||r.forEach((function(e){var r,i,s;e.customerAttribute=(null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.id===e.customerAttributeId})))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(s=null===(i=e.customerAttribute)||void 0===i?void 0:i.options)||void 0===s?void 0:s.find((function(t){return t.id===e.customerAttributeOptionId})))||null)}))),[2,t.data||[]]}}))}))},this.getOrderProductFiles=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return r.length?[4,w.listProductFile({id:{in:r}})]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getDigitalProductFileDownloadUrl=function(r,i){return t(a,void 0,void 0,(function(){var t,s,o,n,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(t=r.orderLineItems.find((function(t){return t.variant.id===i.variantId})))?[4,w.getDigitalProductFileDownloadUrl({orderId:r.id,orderLineItemId:t.id})]:[3,2];case 1:s=e.sent(),(o=s.data)&&((n=document.createElement("a")).href=o,n.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",n.click(),n.remove()),e.label=2;case 2:return[3,4];case 3:return a=e.sent(),console.error(a),[3,4];case 4:return[2]}}))}))},this.getOrderRefundSettings=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return this._refundSettings?[3,2]:[4,n.listOrderRefundSettings({})];case 1:(t=e.sent()).isSuccess&&(null===(r=t.data)||void 0===r?void 0:r.length)&&(this._refundSettings=t.data[0]),e.label=2;case 2:return[2]}}))}))},this.setSavedLastViewedProductsResponse=function(t){a._savedLastViewedProducts=o(a._lastViewedProducts),a._savedLastViewedProductsResponse=t},this.setCaptchaToken=function(t){a._captchaToken=t},this.baseStore=s,i(this)}return Object.defineProperty(b.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"canCreateEmailSubscription",{get:function(){var t;return!((null===(t=this.customer)||void 0===t?void 0:t.isSubscribed)||k||this._visitorSubscribedEmail)&&!window.localStorage.getItem("customerEmailSubscription")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"customerConsentGranted",{get:function(){return this._customerConsentGranted},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isCaptchaRequired",{get:function(){var t;return(null===(t=m.getCustomerSettings())||void 0===t?void 0:t.requireCaptchaValidation)||!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"useLastViewedProductResponse",{get:function(){var t;return(null===(t=this._savedLastViewedProducts)||void 0===t?void 0:t.length)&&this._savedLastViewedProductsResponse&&0===s(this._lastViewedProducts,this._savedLastViewedProducts,"productId").length},enumerable:!1,configurable:!0}),b.prototype.socialLogin=function(r){return t(this,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",i="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/ms/").concat(r,"/login/authenticate?redirect=").concat(t),[4,fetch(i,{headers:{"x-api-key":m.getApiKey()||"","x-sfid":m.getStorefrontId()||"","x-sfrid":m.getStorefrontRoutingId()||""}})]);case 1:return[4,e.sent().json()];case 2:return s=e.sent(),window.location.href=s.redirectUrl,[2]}}))}))},b.prototype.socialLoginToken=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.socialLogin({code:r})];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(i=t.data)||void 0===i?void 0:i.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.customer&&h.customerLogin(),[2,!0]):[2,!1]}}))}))},b.prototype.refundOrder=function(r,i){return t(this,void 0,void 0,(function(){var t,s,o=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=[],r.orderLineItems.map((function(e){null!==e.refundQuantity&&(null==t||t.push({orderLineItemId:e.id,quantity:e.refundQuantity?e.refundQuantity:0}))})),[4,n.createOrderRefundRequest({input:{email:i,orderId:r.id,orderLineItems:t}})];case 1:return(s=e.sent()).isSuccess&&s.data?(Object.entries(s.data).forEach((function(t){var e=t[0],r=t[1];o[e]=r})),[2,!0]):[3,3];case 2:return e.sent(),[3,3];case 3:return[2,!1]}}))}))},b.prototype.init=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.loadToken(),this.loadLastViewedProducts(),this.loadCustomerConsent(),[4,this.refreshToken()];case 1:return t.sent(),[4,this.getCustomer()];case 2:return t.sent(),this._initialized=!0,this.customer&&h.customerVisit(),[2]}}))}))},b.prototype.routeChangeInit=function(){this.loadToken(),!this.token&&this.customer&&this.clearLocalData(),this.token&&!this.customer&&this.getCustomer()},b.prototype.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return k||!this.token?[2]:[4,n.getCustomer()];case 1:return(t=e.sent()).data&&this.setCustomer(t.data),[2]}}))}))},b.prototype.refreshToken=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.token?[4,n.refreshToken({token:this.token})]:[2];case 1:return(t=e.sent()).isSuccess&&t.data?this.setToken(t.data.token,t.data.tokenExpiry):(this.token=null,this.tokenExpiry=null,this.clearLocalData()),[2]}}))}))},b.prototype.setCustomer=function(t){this.customer=new a(t)},b.prototype.getLastViewedProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.getLastViewedProducts({customerId:this.customer.id})]:[3,2];case 1:return t=e.sent(),this._lastViewedProducts=(null===(r=o(t.data))||void 0===r?void 0:r.reverse())||[],[3,3];case 2:this.loadLastViewedProducts(),e.label=3;case 3:return[2,this._lastViewedProducts]}}))}))},b.prototype.saveLastViewedProducts=function(){k||window.localStorage.setItem("lastViewedProducts",JSON.stringify(this._lastViewedProducts))},b.prototype.loadLastViewedProducts=function(){k||(this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=o(this._lastViewedProducts).reverse())},b.prototype.getLocalLastViewedProducts=function(){if(k)return[];try{var t=window.localStorage.getItem("lastViewedProducts");if(t)return JSON.parse(t)}catch(t){}return[]},b.prototype.removeLastViewedProducts=function(){k||window.localStorage.removeItem("lastViewedProducts")},b.prototype.onProductView=function(r,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?this._lastViewedProducts.find((function(t){return t.productId===r}))?[2]:[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:[{productId:r,variantId:i}]}})]:[3,2];case 1:return t.sent()&&this._lastViewedProducts.push({productId:r,variantId:i}),[3,3];case 2:this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=this._lastViewedProducts.filter((function(t){return t.productId!==r})),this._lastViewedProducts.push({productId:r,variantId:i}),this._lastViewedProducts=this._lastViewedProducts.slice(-20),this.saveLastViewedProducts(),t.label=3;case 3:return[2]}}))}))},b.prototype.saveLocalLastViewedProducts=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(k)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),(t=this.getLocalLastViewedProducts()).length?[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:t}})]:[3,3];case 2:e.sent()&&this.removeLastViewedProducts(),e.label=3;case 3:return[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},b.prototype.saveCustomerConsent=function(){k||(this._customerConsentGranted=!0,window.localStorage.setItem("customerConsent","true"))},b.prototype.loadCustomerConsent=function(){k||(this._customerConsentGranted=!!window.localStorage.getItem("customerConsent"))},b.prototype.removeCustomerConsent=function(){k||window.localStorage.removeItem("customerConsent")},b.prototype.setToken=function(t,e){k||(this.token=t,this.tokenExpiry=e,localStorage.setItem("customerToken",t),localStorage.setItem("customerTokenExpiry",e+""),m.init({customerToken:t}))},b.prototype.loadToken=function(){if(!k){var t=localStorage.getItem("customerToken"),e=localStorage.getItem("customerTokenExpiry");t&&e?this.setToken(t,parseInt(e)):this.clearLocalTokenData()}},b.prototype.clearLocalTokenData=function(){localStorage.removeItem("customerToken"),localStorage.removeItem("customerTokenExpiry"),this.token=void 0,this.tokenExpiry=void 0},b.prototype.clearLocalData=function(){this.clearLocalTokenData(),this.customer=void 0,m.init({customerToken:""}),this.clearCaptchaToken()},b.prototype.clearCaptchaToken=function(){this._captchaToken=null},b.prototype.getCaptcha=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),this.isCaptchaRequired?(window.grecaptcha.execute(),[4,this.waitUntilCaptchaTokenInitialized()]):[3,2];case 1:e.sent(),window.grecaptcha.reset(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}}))}))},b}();export{b as IkasCustomerStore};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import s from"lodash/xorBy";import o from"lodash/cloneDeep";import n from"./api.js";import{IkasCustomer as a}from"../../models/data/customer/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCustomerEmailSubscriptionStatus as c}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasRaffleParticipant as u}from"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import d from"../raffle/index.js";import'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import l from"../product/index.js";import{Analytics as h}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{IkasLoginError as p,IkasRegisterError as f,SaveMyCustomerInput as v}from"@ikas/storefront-api";import{populateRaffleParticipantProducts as g}from"@ikas/storefront-providers";import w from"../checkout/index.js";var k="undefined"==typeof localStorage,b=function(){function b(s){var a=this;this.customer=null,this.token=null,this.tokenExpiry=null,this.baseStore=null,this._initialized=!1,this._visitorSubscribedEmail=!1,this._lastViewedProducts=[],this._customerConsentGranted=!1,this._refundSettings=null,this._captchaToken=null,this._savedLastViewedProducts=[],this._savedLastViewedProductsResponse=null,this.toAnalyticsCustomer=function(t){return r(r({},t),{consentGranted:a._customerConsentGranted})},this.login=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,!0]):[2,!1]}}))}))},this.customerLogin=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(p).includes(t)?t:p.UNKOWN}))}]}}))}))},this.logout=function(){var t;a.clearLocalData(),null===(t=a.baseStore)||void 0===t||t.cartStore.removeCart(),h.customerLogout()},this.register=function(r,i,s,o,c,u,d){return t(a,void 0,void 0,(function(){var t,a;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.register({email:s,password:o,firstName:r,lastName:i,isAcceptMarketing:c,attributes:u,captchaToken:this._captchaToken,phone:d})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&(null===(a=t.data)||void 0===a?void 0:a.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.saveLocalLastViewedProducts(),h.completeRegistration(this.toAnalyticsCustomer(this.customer)),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(f).includes(t)?t:f.UNKOWN}))}]}}))}))},this.activateCustomer=function(){return t(a,void 0,void 0,(function(){var t,r,i;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("token"))?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.activateCustomer({token:r,captchaToken:this._captchaToken})];case 2:return i=e.sent(),this.clearCaptchaToken(),[2,i.isSuccess];case 3:return[2,!1]}}))}))},this.resendCustomerActivationMail=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerActivationMail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess];case 3:return[2,!1]}}))}))},this.validateCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.validateCustomerPhoneVerificationCode({verificationCode:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.resendCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerPhoneVerificationCode({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.saveContactForm=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return h.contactForm(i),[4,this.getCaptcha()];case 1:return e.sent(),[4,n.sendContactFormToMerchant(r(r({},i),{captchaToken:this._captchaToken}))];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.checkEmail=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.checkEmail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&!!(null===(i=t.data)||void 0===i?void 0:i.exists)]}}))}))},this.forgotPassword=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.forgotPassword({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&t.data]}}))}))},this.recoverPassword=function(r,i,s){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.recoverPassword({password:r,passwordAgain:i,token:s,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.saveCustomer=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.saveCustomer({input:new v(r)})];case 1:return(t=e.sent()).isSuccess&&t.data?(this.setCustomer(t.data),[2,!0]):[2,!1]}}))}))},this.getOrders=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getOrders({})];case 1:return[2,t.sent().data||[]]}}))}))},this.getOrder=function(r){return t(a,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrders({orderId:r})];case 1:return(t=e.sent()).isSuccess&&(null===(s=t.data)||void 0===s?void 0:s.length)?(i=t.data[0],[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),i.refundSettings=this._refundSettings,[2,i]}}))}))},this.getOrderByEmail=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrderByEmail({email:r,orderNumber:i})];case 1:return(t=e.sent()).isSuccess&&t.data?(s=t.data,[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),s.refundSettings=this._refundSettings,[2,s]}}))}))},this.getOrderTransactions=function(r){return void 0===r&&(r={}),t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.listOrderTransactions({checkoutId:{eq:r.checkoutId},id:{eq:r.checkoutId},orderId:{eq:r.orderId}})];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProductsIds=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProducts=function(){return t(a,void 0,void 0,(function(){var t,r,i,s,o,a;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return(t=e.sent()).isSuccess&&(null===(i=t.data)||void 0===i?void 0:i.length)?[4,l.searchProducts({input:{productIdList:t.data.map((function(t){return t.productId})),priceListId:m.getPriceListId(),salesChannelId:m.getSalesChannelId(),perPage:100}})]:[2,[]];case 2:return r=e.sent(),null===(o=null===(s=r.data)||void 0===s?void 0:s.data)||void 0===o||o.forEach((function(t){t.selectedVariantValues=t.variants[0].variantValues})),[2,(null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.data)||[]]}}))}))},this.addProductToFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!0,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r),[2,t.data||!1]}}))}))},this.removeProductFromFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!1,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r,!0),[2,t.data||!1]}}))}))},this.isProductFavorite=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(t=this.customer)||void 0===t?void 0:t.id))throw Error("Unauthorized");return[4,n.isFavoriteProduct({productId:r})];case 1:return[2,e.sent().data||!1]}}))}))},this.createEmailSubscription=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.subscribeToMarketingNotifications({input:{email:r,captchaToken:this._captchaToken}})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(r)),[2,t.isSuccess]}}))}))},this.saveCustomerFormData=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.saveCustomerFormData({input:r(r({},i),{captchaToken:this._captchaToken})})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(i.email)),[2,t.isSuccess]}}))}))},this.sendReview=function(i){return t(a,void 0,void 0,(function(){var t,s,o,a,c;return e(this,(function(e){switch(e.label){case 0:if(t=m.getCustomerReviewSettings(),s=m.getSalesChannelId(),o=m.getCurrentLocale(),!t)return[2];if(!(a=null===(c=this.customer)||void 0===c?void 0:c.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,n.createCustomerReview({input:r(r({},i),{customerId:t.customerLoginRequired?a:void 0,salesChannelId:s||"",locale:o})})];case 1:return[2,e.sent().data]}}))}))},this.onCustomerConsentGrant=function(){a.saveCustomerConsent()},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a.initialized&&(clearInterval(e),t(null))}),100)}))},this.waitUntilCaptchaTokenInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a._captchaToken&&(clearInterval(e),t(null))}),100)}))},this.getRaffles=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,d.listRaffleParticipants()];case 1:return(t=e.sent())&&t.data?[4,g(t.data)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2,null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new u(t)}))]}}))}))},this.getCustomerAttributes=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,n.listCustomerAttribute()];case 1:return t=e.sent(),this.customer&&(null===(r=this.customer.attributes)||void 0===r||r.forEach((function(e){var r,i,s;e.customerAttribute=(null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.id===e.customerAttributeId})))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(s=null===(i=e.customerAttribute)||void 0===i?void 0:i.options)||void 0===s?void 0:s.find((function(t){return t.id===e.customerAttributeOptionId})))||null)}))),[2,t.data||[]]}}))}))},this.getOrderProductFiles=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return r.length?[4,w.listProductFile({id:{in:r}})]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getDigitalProductFileDownloadUrl=function(r,i){return t(a,void 0,void 0,(function(){var t,s,o,n,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(t=r.orderLineItems.find((function(t){return t.variant.id===i.variantId})))?[4,w.getDigitalProductFileDownloadUrl({orderId:r.id,orderLineItemId:t.id})]:[3,2];case 1:s=e.sent(),(o=s.data)&&((n=document.createElement("a")).href=o,n.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",n.click(),n.remove()),e.label=2;case 2:return[3,4];case 3:return a=e.sent(),console.error(a),[3,4];case 4:return[2]}}))}))},this.getOrderRefundSettings=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return this._refundSettings?[3,2]:[4,n.listOrderRefundSettings({})];case 1:(t=e.sent()).isSuccess&&(null===(r=t.data)||void 0===r?void 0:r.length)&&(this._refundSettings=t.data[0]),e.label=2;case 2:return[2]}}))}))},this.setSavedLastViewedProductsResponse=function(t){a._savedLastViewedProducts=o(a._lastViewedProducts),a._savedLastViewedProductsResponse=t},this.setCaptchaToken=function(t){a._captchaToken=t},this.baseStore=s,i(this)}return Object.defineProperty(b.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"canCreateEmailSubscription",{get:function(){var t;return!((null===(t=this.customer)||void 0===t?void 0:t.isSubscribed)||k||this._visitorSubscribedEmail)&&!window.localStorage.getItem("customerEmailSubscription")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"customerConsentGranted",{get:function(){return this._customerConsentGranted},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isCaptchaRequired",{get:function(){var t;return(null===(t=m.getCustomerSettings())||void 0===t?void 0:t.requireCaptchaValidation)||!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"useLastViewedProductResponse",{get:function(){var t;return(null===(t=this._savedLastViewedProducts)||void 0===t?void 0:t.length)&&this._savedLastViewedProductsResponse&&0===s(this._lastViewedProducts,this._savedLastViewedProducts,"productId").length},enumerable:!1,configurable:!0}),b.prototype.socialLogin=function(r){return t(this,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",i="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/ms/").concat(r,"/login/authenticate?redirect=").concat(t),[4,fetch(i,{headers:{"x-api-key":m.getApiKey()||"","x-sfid":m.getStorefrontId()||"","x-sfrid":m.getStorefrontRoutingId()||""}})]);case 1:return[4,e.sent().json()];case 2:return s=e.sent(),window.location.href=s.redirectUrl,[2]}}))}))},b.prototype.socialLoginToken=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.socialLogin({code:r})];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(i=t.data)||void 0===i?void 0:i.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.customer&&h.customerLogin(),[2,!0]):[2,!1]}}))}))},b.prototype.refundOrder=function(r,i){return t(this,void 0,void 0,(function(){var t,s,o=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=[],r.orderLineItems.map((function(e){null!==e.refundQuantity&&(null==t||t.push({orderLineItemId:e.id,quantity:e.refundQuantity?e.refundQuantity:0}))})),[4,n.createOrderRefundRequest({input:{email:i,orderId:r.id,orderLineItems:t}})];case 1:return(s=e.sent()).isSuccess&&s.data?(Object.entries(s.data).forEach((function(t){var e=t[0],r=t[1];o[e]=r})),[2,!0]):[3,3];case 2:return e.sent(),[3,3];case 3:return[2,!1]}}))}))},b.prototype.init=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.loadToken(),this.loadLastViewedProducts(),this.loadCustomerConsent(),[4,this.refreshToken()];case 1:return t.sent(),[4,this.getCustomer()];case 2:return t.sent(),this._initialized=!0,this.customer&&h.customerVisit(),[2]}}))}))},b.prototype.routeChangeInit=function(){this.loadToken(),!this.token&&this.customer&&this.clearLocalData(),this.token&&!this.customer&&this.getCustomer()},b.prototype.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return k||!this.token?[2]:[4,n.getCustomer()];case 1:return(t=e.sent()).data&&this.setCustomer(t.data),[2]}}))}))},b.prototype.refreshToken=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.token?[4,n.refreshToken({token:this.token})]:[2];case 1:return(t=e.sent()).isSuccess&&t.data?this.setToken(t.data.token,t.data.tokenExpiry):(this.token=null,this.tokenExpiry=null,this.clearLocalData()),[2]}}))}))},b.prototype.setCustomer=function(t){this.customer=new a(t)},b.prototype.getLastViewedProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.getLastViewedProducts({customerId:this.customer.id})]:[3,2];case 1:return t=e.sent(),this._lastViewedProducts=(null===(r=o(t.data))||void 0===r?void 0:r.reverse())||[],[3,3];case 2:this.loadLastViewedProducts(),e.label=3;case 3:return[2,this._lastViewedProducts]}}))}))},b.prototype.saveLastViewedProducts=function(){k||window.localStorage.setItem("lastViewedProducts",JSON.stringify(this._lastViewedProducts))},b.prototype.loadLastViewedProducts=function(){k||(this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=o(this._lastViewedProducts).reverse())},b.prototype.getLocalLastViewedProducts=function(){if(k)return[];try{var t=window.localStorage.getItem("lastViewedProducts");if(t)return JSON.parse(t)}catch(t){}return[]},b.prototype.removeLastViewedProducts=function(){k||window.localStorage.removeItem("lastViewedProducts")},b.prototype.onProductView=function(r,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?this._lastViewedProducts.find((function(t){return t.productId===r}))?[2]:[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:[{productId:r,variantId:i}]}})]:[3,2];case 1:return t.sent()&&this._lastViewedProducts.push({productId:r,variantId:i}),[3,3];case 2:this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=this._lastViewedProducts.filter((function(t){return t.productId!==r})),this._lastViewedProducts.push({productId:r,variantId:i}),this._lastViewedProducts=this._lastViewedProducts.slice(-20),this.saveLastViewedProducts(),t.label=3;case 3:return[2]}}))}))},b.prototype.saveLocalLastViewedProducts=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(k)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),(t=this.getLocalLastViewedProducts()).length?[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:t}})]:[3,3];case 2:e.sent()&&this.removeLastViewedProducts(),e.label=3;case 3:return[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},b.prototype.saveCustomerConsent=function(){k||(this._customerConsentGranted=!0,window.localStorage.setItem("customerConsent","true"))},b.prototype.loadCustomerConsent=function(){k||(this._customerConsentGranted=!!window.localStorage.getItem("customerConsent"))},b.prototype.removeCustomerConsent=function(){k||window.localStorage.removeItem("customerConsent")},b.prototype.setToken=function(t,e){k||(this.token=t,this.tokenExpiry=e,localStorage.setItem("customerToken",t),localStorage.setItem("customerTokenExpiry",e+""),m.init({customerToken:t}))},b.prototype.loadToken=function(){if(!k){var t=localStorage.getItem("customerToken"),e=localStorage.getItem("customerTokenExpiry");t&&e?this.setToken(t,parseInt(e)):this.clearLocalTokenData()}},b.prototype.clearLocalTokenData=function(){localStorage.removeItem("customerToken"),localStorage.removeItem("customerTokenExpiry"),this.token=void 0,this.tokenExpiry=void 0},b.prototype.clearLocalData=function(){this.clearLocalTokenData(),this.customer=void 0,m.init({customerToken:""}),this.clearCaptchaToken()},b.prototype.clearCaptchaToken=function(){this._captchaToken=null},b.prototype.getCaptcha=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),this.isCaptchaRequired?(window.grecaptcha.execute(),[4,this.waitUntilCaptchaTokenInitialized()]):[3,2];case 1:e.sent(),window.grecaptcha.reset(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}}))}))},b}();export{b as IkasCustomerStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as d}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listHTMLMetaData as o}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import{IkasHTMLMetaData as a}from"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var i=function(){function i(){}return i.listHTMLMetaData=function(i){var s;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(i)];case 1:return t=e.sent(),[2,new d(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return new a(t)})),t.graphQLErrors)]}}))}))},i}();export{i as default};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as d}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listHTMLMetaData as o}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import{IkasHTMLMetaData as a}from"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var i=function(){function i(){}return i.listHTMLMetaData=function(i){var s;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(i)];case 1:return t=e.sent(),[2,new d(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return new a(t)})),t.graphQLErrors)]}}))}))},i}();export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{getMyCountry as o,APIResponse as i,listCountry as r,listCity as a,listDistrict as d,listState as s,getAvailableShippingZones as n}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import{IkasCity as m}from"../../models/data/city/index.js";import{IkasCountry as l}from"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import{IkasDistrict as p}from"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import{IkasState as u}from"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var c=function(){function c(){}return c.getMyCountry=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,o()];case 1:return[2,t.sent()]}}))}))},c.listCountry=function(o){var a;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,r(o)];case 1:return t=e.sent(),[2,new i(null===(a=t.data)||void 0===a?void 0:a.map((function(t){return new l(t)})),t.graphQLErrors)]}}))}))},c.listCity=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new m(t)})),t.graphQLErrors)]}}))}))},c.listDistrict=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new p(t)})),t.graphQLErrors)]}}))}))},c.listState=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new u(t)})),t.graphQLErrors)]}}))}))},c.getAvailableShippingZones=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))},c}();export{c as default};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{getMyCountry as o,APIResponse as i,listCountry as r,listCity as a,listDistrict as d,listState as s,getAvailableShippingZones as n}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import{IkasCity as m}from"../../models/data/city/index.js";import{IkasCountry as l}from"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import{IkasDistrict as p}from"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import{IkasState as u}from"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var c=function(){function c(){}return c.getMyCountry=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,o()];case 1:return[2,t.sent()]}}))}))},c.listCountry=function(o){var a;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,r(o)];case 1:return t=e.sent(),[2,new i(null===(a=t.data)||void 0===a?void 0:a.map((function(t){return new l(t)})),t.graphQLErrors)]}}))}))},c.listCity=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new m(t)})),t.graphQLErrors)]}}))}))},c.listDistrict=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new p(t)})),t.graphQLErrors)]}}))}))},c.listState=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new u(t)})),t.graphQLErrors)]}}))}))},c.getAvailableShippingZones=function(o){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n(o)];case 1:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))},c}();export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r,__assign as
|
|
1
|
+
import{__awaiter as t,__generator as r,__assign as o}from'./../../ext/tslib/tslib.es6.js';import{listProductBackInStockRemind as e,saveProductBackInStockRemind as i,APIResponse as a,searchProducts as d,getProductFilterData as s,getRelatedProducts as n,getSuggestedProducts as m,listProductAttribute as u,getProductCampaigns as l,getVariantStockLocations as c,getOrderLineFile as p,listProductOptionSet as f,listCampaignOffer as v}from"@ikas/storefront-api";import{IkasProduct as j}from"../../models/data/product/index.js";import{IkasProductAttribute as x}from"../../models/data/product/attribute/index.js";import{IkasProductCampaign as h}from"../../models/data/product/campaign/index.js";import{IkasProductFilter as g}from"../../models/data/product/filter/index.js";import{IkasProductOptionSet as w}from"../../models/data/product/option-set/index.js";import{IkasFilterCategory as b}from"../../models/data/filter-category/index.js";import{IkasStorefrontConfig as y}from"@ikas/storefront-config";import{IkasProductStockLocations as k}from"../../models/data/product/stock-location/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import{IkasCampaignOffer as L}from"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/ikas-address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";var P=function(){function P(){}return P.listProductBackInStockRemind=function(o){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,e(o)];case 1:return[2,t.sent()]}}))}))},P.saveProductBackInStockRemind=function(o){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,i(o)];case 1:return[2,t.sent()]}}))}))},P.searchProducts=function(e,i){var s,n;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,d(e,i)];case 1:return t=r.sent(),[2,new a(o(o({locale:y.getCurrentLocale()},t.data),{data:null===(n=null===(s=t.data)||void 0===s?void 0:s.data)||void 0===n?void 0:n.map((function(t){return new j(t)}))}))]}}))}))},P.getProductFilterData=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,s(o)];case 1:return t=r.sent(),[2,new a(t.data?{filters:t.data.filters.map((function(t){return new g(t)})),categories:null===(e=t.data.categories)||void 0===e?void 0:e.map((function(t){return new b(t)})),disabledSortTypes:t.data.disabledSortTypes}:null,t.graphQLErrors)]}}))}))},P.getRelatedProducts=function(e){var i,d;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,n(e)];case 1:return t=r.sent(),[2,new a(o(o({},t.data),{data:null===(d=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===d?void 0:d.map((function(t){return new j(t)}))}),t.graphQLErrors)]}}))}))},P.getSuggestedProducts=function(e){var i,d;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,m(e)];case 1:return t=r.sent(),[2,new a(o(o({},t.data),{data:null===(d=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===d?void 0:d.map((function(t){return new j(t)}))}),t.graphQLErrors)]}}))}))},P.listProductAttribute=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,u(o)];case 1:return t=r.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new x(t)})),t.graphQLErrors)]}}))}))},P.getProductCampaigns=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,l(o)];case 1:return t=r.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new h(t)})),t.graphQLErrors)]}}))}))},P.getVariantStockLocations=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,c(o)];case 1:return t=r.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new k(t)})),t.graphQLErrors)]}}))}))},P.getOrderLineFile=function(o){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,p(o)];case 1:return[2,t.sent()]}}))}))},P.listProductOptionSet=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,f(o)];case 1:return t=r.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new w(t)})),t.graphQLErrors)]}}))}))},P.listCampaignOffer=function(o){var e;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,v(o)];case 1:return t=r.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new L(t)})),t.graphQLErrors)]}}))}))},P}();export{P as default};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
import { ListStorefrontPopupParams } from "@ikas/storefront-api";
|
|
3
|
+
import { IkasStorefrontPopup } from "../../models/data/storefront-popup";
|
|
4
|
+
export default class StorefrontPopupStore {
|
|
5
|
+
static listStorefrontPopup(params: ListStorefrontPopupParams): Promise<APIResponse<{
|
|
6
|
+
data: IkasStorefrontPopup[] | undefined;
|
|
7
|
+
length?: number | undefined;
|
|
8
|
+
toString?: (() => string) | undefined;
|
|
9
|
+
toLocaleString?: (() => string) | undefined;
|
|
10
|
+
pop?: (() => import("@ikas/storefront-models").IkasStorefrontPopup | undefined) | undefined;
|
|
11
|
+
push?: ((...items: import("@ikas/storefront-models").IkasStorefrontPopup[]) => number) | undefined;
|
|
12
|
+
concat?: {
|
|
13
|
+
(...items: ConcatArray<import("@ikas/storefront-models").IkasStorefrontPopup>[]): import("@ikas/storefront-models").IkasStorefrontPopup[];
|
|
14
|
+
(...items: (import("@ikas/storefront-models").IkasStorefrontPopup | ConcatArray<import("@ikas/storefront-models").IkasStorefrontPopup>)[]): import("@ikas/storefront-models").IkasStorefrontPopup[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
join?: ((separator?: string | undefined) => string) | undefined;
|
|
17
|
+
reverse?: (() => import("@ikas/storefront-models").IkasStorefrontPopup[]) | undefined;
|
|
18
|
+
shift?: (() => import("@ikas/storefront-models").IkasStorefrontPopup | undefined) | undefined;
|
|
19
|
+
slice?: ((start?: number | undefined, end?: number | undefined) => import("@ikas/storefront-models").IkasStorefrontPopup[]) | undefined;
|
|
20
|
+
sort?: ((compareFn?: ((a: import("@ikas/storefront-models").IkasStorefrontPopup, b: import("@ikas/storefront-models").IkasStorefrontPopup) => number) | undefined) => import("@ikas/storefront-models").IkasStorefrontPopup[]) | undefined;
|
|
21
|
+
splice?: {
|
|
22
|
+
(start: number, deleteCount?: number | undefined): import("@ikas/storefront-models").IkasStorefrontPopup[];
|
|
23
|
+
(start: number, deleteCount: number, ...items: import("@ikas/storefront-models").IkasStorefrontPopup[]): import("@ikas/storefront-models").IkasStorefrontPopup[];
|
|
24
|
+
} | undefined;
|
|
25
|
+
unshift?: ((...items: import("@ikas/storefront-models").IkasStorefrontPopup[]) => number) | undefined;
|
|
26
|
+
indexOf?: ((searchElement: import("@ikas/storefront-models").IkasStorefrontPopup, fromIndex?: number | undefined) => number) | undefined;
|
|
27
|
+
lastIndexOf?: ((searchElement: import("@ikas/storefront-models").IkasStorefrontPopup, fromIndex?: number | undefined) => number) | undefined;
|
|
28
|
+
every?: {
|
|
29
|
+
<S extends import("@ikas/storefront-models").IkasStorefrontPopup>(predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => value is S, thisArg?: any): this is S[];
|
|
30
|
+
(predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => unknown, thisArg?: any): boolean;
|
|
31
|
+
} | undefined;
|
|
32
|
+
some?: ((predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => unknown, thisArg?: any) => boolean) | undefined;
|
|
33
|
+
forEach?: ((callbackfn: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => void, thisArg?: any) => void) | undefined;
|
|
34
|
+
map?: (<U>(callbackfn: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => U, thisArg?: any) => U[]) | undefined;
|
|
35
|
+
filter?: {
|
|
36
|
+
<S_1 extends import("@ikas/storefront-models").IkasStorefrontPopup>(predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => value is S_1, thisArg?: any): S_1[];
|
|
37
|
+
(predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => unknown, thisArg?: any): import("@ikas/storefront-models").IkasStorefrontPopup[];
|
|
38
|
+
} | undefined;
|
|
39
|
+
reduce?: {
|
|
40
|
+
(callbackfn: (previousValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => import("@ikas/storefront-models").IkasStorefrontPopup): import("@ikas/storefront-models").IkasStorefrontPopup;
|
|
41
|
+
(callbackfn: (previousValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => import("@ikas/storefront-models").IkasStorefrontPopup, initialValue: import("@ikas/storefront-models").IkasStorefrontPopup): import("@ikas/storefront-models").IkasStorefrontPopup;
|
|
42
|
+
<U_1>(callbackfn: (previousValue: U_1, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => U_1, initialValue: U_1): U_1;
|
|
43
|
+
} | undefined;
|
|
44
|
+
reduceRight?: {
|
|
45
|
+
(callbackfn: (previousValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => import("@ikas/storefront-models").IkasStorefrontPopup): import("@ikas/storefront-models").IkasStorefrontPopup;
|
|
46
|
+
(callbackfn: (previousValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => import("@ikas/storefront-models").IkasStorefrontPopup, initialValue: import("@ikas/storefront-models").IkasStorefrontPopup): import("@ikas/storefront-models").IkasStorefrontPopup;
|
|
47
|
+
<U_2>(callbackfn: (previousValue: U_2, currentValue: import("@ikas/storefront-models").IkasStorefrontPopup, currentIndex: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => U_2, initialValue: U_2): U_2;
|
|
48
|
+
} | undefined;
|
|
49
|
+
find?: {
|
|
50
|
+
<S_2 extends import("@ikas/storefront-models").IkasStorefrontPopup>(predicate: (this: void, value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, obj: import("@ikas/storefront-models").IkasStorefrontPopup[]) => value is S_2, thisArg?: any): S_2 | undefined;
|
|
51
|
+
(predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, obj: import("@ikas/storefront-models").IkasStorefrontPopup[]) => unknown, thisArg?: any): import("@ikas/storefront-models").IkasStorefrontPopup | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
findIndex?: ((predicate: (value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, obj: import("@ikas/storefront-models").IkasStorefrontPopup[]) => unknown, thisArg?: any) => number) | undefined;
|
|
54
|
+
fill?: ((value: import("@ikas/storefront-models").IkasStorefrontPopup, start?: number | undefined, end?: number | undefined) => import("@ikas/storefront-models").IkasStorefrontPopup[]) | undefined;
|
|
55
|
+
copyWithin?: ((target: number, start: number, end?: number | undefined) => import("@ikas/storefront-models").IkasStorefrontPopup[]) | undefined;
|
|
56
|
+
entries?: (() => IterableIterator<[number, import("@ikas/storefront-models").IkasStorefrontPopup]>) | undefined;
|
|
57
|
+
keys?: (() => IterableIterator<number>) | undefined;
|
|
58
|
+
values?: (() => IterableIterator<import("@ikas/storefront-models").IkasStorefrontPopup>) | undefined;
|
|
59
|
+
includes?: ((searchElement: import("@ikas/storefront-models").IkasStorefrontPopup, fromIndex?: number | undefined) => boolean) | undefined;
|
|
60
|
+
flatMap?: (<U_3, This = undefined>(callback: (this: This, value: import("@ikas/storefront-models").IkasStorefrontPopup, index: number, array: import("@ikas/storefront-models").IkasStorefrontPopup[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
|
|
61
|
+
flat?: (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[]) | undefined;
|
|
62
|
+
[Symbol.iterator]?: (() => IterableIterator<import("@ikas/storefront-models").IkasStorefrontPopup>) | undefined;
|
|
63
|
+
[Symbol.unscopables]?: (() => {
|
|
64
|
+
copyWithin: boolean;
|
|
65
|
+
entries: boolean;
|
|
66
|
+
fill: boolean;
|
|
67
|
+
find: boolean;
|
|
68
|
+
findIndex: boolean;
|
|
69
|
+
keys: boolean;
|
|
70
|
+
values: boolean;
|
|
71
|
+
}) | undefined;
|
|
72
|
+
at?: ((index: number) => import("@ikas/storefront-models").IkasStorefrontPopup | undefined) | undefined;
|
|
73
|
+
}>>;
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as o,__assign as i}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as t}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listStorefrontPopup as s}from"@ikas/storefront-api";import{IkasStorefrontPopup as n}from"../../models/data/storefront-popup/index.js";var a=function(){function a(){}return a.listStorefrontPopup=function(a){var r;return e(this,void 0,void 0,(function(){var e;return o(this,(function(o){switch(o.label){case 0:return[4,s(a)];case 1:return e=o.sent(),[2,new t(i(i({},e.data),{data:null===(r=e.data)||void 0===r?void 0:r.map((function(e){return new n(e)}))}))]}}))}))},a}();export{a as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -16,12 +16,16 @@
|
|
|
16
16
|
"release": "npm publish",
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@ikas/popup-renderer": "^1.0.94",
|
|
21
|
+
"swiper": "11.0.6"
|
|
22
|
+
},
|
|
19
23
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^5.0.
|
|
21
|
-
"@ikas/storefront-config": "^5.0.
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
23
|
-
"@ikas/storefront-models": "^5.0.
|
|
24
|
-
"@ikas/storefront-providers": "^5.0.
|
|
24
|
+
"@ikas/storefront-api": "^5.0.13",
|
|
25
|
+
"@ikas/storefront-config": "^5.0.13",
|
|
26
|
+
"@ikas/storefront-model-functions": "^5.0.13",
|
|
27
|
+
"@ikas/storefront-models": "^5.0.13",
|
|
28
|
+
"@ikas/storefront-providers": "^5.0.13",
|
|
25
29
|
"@ikas/localized-address": "1.0.0-beta.3",
|
|
26
30
|
"@adyen/adyen-web": "^5.57.0",
|
|
27
31
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -29,6 +33,7 @@
|
|
|
29
33
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
30
34
|
"rollup-plugin-rename-node-modules": "^1.2.0",
|
|
31
35
|
"@types/react-phone-number-input": "^3.0.10",
|
|
36
|
+
"react-date-picker": "^10.6.0",
|
|
32
37
|
"mobx": "^6.1.3",
|
|
33
38
|
"mobx-react-lite": "^3.1.5",
|
|
34
39
|
"next": "12.2.0",
|
|
@@ -55,11 +60,11 @@
|
|
|
55
60
|
},
|
|
56
61
|
"peerDependencies": {
|
|
57
62
|
"@ikas/localized-address": "1.0.0-beta.3",
|
|
58
|
-
"@ikas/storefront-api": "^5.0.
|
|
59
|
-
"@ikas/storefront-config": "^5.0.
|
|
60
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
61
|
-
"@ikas/storefront-models": "^5.0.
|
|
62
|
-
"@ikas/storefront-providers": "^5.0.
|
|
63
|
+
"@ikas/storefront-api": "^5.0.13",
|
|
64
|
+
"@ikas/storefront-config": "^5.0.13",
|
|
65
|
+
"@ikas/storefront-model-functions": "^5.0.13",
|
|
66
|
+
"@ikas/storefront-models": "^5.0.13",
|
|
67
|
+
"@ikas/storefront-providers": "^5.0.13",
|
|
63
68
|
"mobx": "^6.1.3",
|
|
64
69
|
"mobx-react-lite": "^3.1.5",
|
|
65
70
|
"next": "12.2.0",
|
|
@@ -73,6 +78,7 @@
|
|
|
73
78
|
"react-tooltip": "^4.2.21",
|
|
74
79
|
"libphonenumber-js": "^1.10.6",
|
|
75
80
|
"@adyen/adyen-web": "^5.57.0",
|
|
76
|
-
"@paypal/react-paypal-js": "^7.8.2"
|
|
81
|
+
"@paypal/react-paypal-js": "^7.8.2",
|
|
82
|
+
"react-date-picker": "^10.6.0"
|
|
77
83
|
}
|
|
78
84
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import a from"./style.module.scss.js";import t from"../svg/epaykolay.js";var l=function(l){return e.createElement("div",{className:a.Container},e.createElement("div",{className:a.LeftContent},e.createElement("strong",null,"Bi' tıkla gerisi e-Pay Kolay!"),e.createElement("div",{className:a.Description},"Kart ve adres bilgilerini her defasında girmeden, birden fazla ödeme seçeneğiyle alışveriş kolaylığını e-Pay Kolay ile yaşayın.")),e.createElement("div",{className:a.RightContent},e.createElement("div",{className:a.EPayKolayButton,onClick:l.onClick},e.createElement("div",{className:a.Icon},e.createElement(t,null)),e.createElement("div",{className:a.ButtonText}," ile Al")),e.createElement("div",{className:a.EPayKolayDescription},"e-Pay Kolay bir Türkiye İş Bankası markasıdır.")))};export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var t={Container:"style-module_Container__oDKWq",LeftContent:"style-module_LeftContent__97sbP",Description:"style-module_Description__XDDJ8",RightContent:"style-module_RightContent__-jdoh",EPayKolayButton:"style-module_EPayKolayButton__c8OjL",Icon:"style-module_Icon__0t3CD",ButtonText:"style-module_ButtonText__G12-2",EPayKolayDescription:"style-module_EPayKolayDescription__xxQ58"};n(".style-module_Container__oDKWq {\n width: calc(100% - 50px);\n margin-left: 50px;\n padding: 20px 24px;\n background-color: rgb(237, 238, 240);\n border-radius: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.style-module_Container__oDKWq .style-module_LeftContent__97sbP {\n flex: 1 1 auto;\n}\n.style-module_Container__oDKWq .style-module_LeftContent__97sbP strong {\n font-size: 14px;\n color: #4c556c;\n font-weight: 700;\n margin-bottom: 2px;\n line-height: 20px;\n}\n.style-module_Container__oDKWq .style-module_LeftContent__97sbP .style-module_Description__XDDJ8 {\n font-size: 14px;\n color: #4c556c;\n line-height: 20px;\n}\n.style-module_Container__oDKWq .style-module_RightContent__-jdoh {\n width: 192px;\n flex: 0 0 auto;\n margin-left: 31px;\n position: relative;\n}\n.style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayButton__c8OjL {\n height: 50px;\n width: 190px;\n display: flex;\n background-color: #013682;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.3s;\n padding: 13px 22px 13px 22px;\n}\n.style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayButton__c8OjL .style-module_Icon__0t3CD {\n margin-top: 2px;\n}\n.style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayButton__c8OjL .style-module_ButtonText__G12-2 {\n color: white;\n margin-left: 4.36px;\n font-weight: 600;\n font-size: 16px;\n line-height: 22.79px;\n}\n.style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayDescription__xxQ58 {\n color: #013682;\n font-size: 9.1px;\n margin-top: 4px;\n font-style: italic;\n letter-spacing: -0.02em;\n position: absolute;\n bottom: -19px;\n}\n@media only screen and (max-width: 1440px) {\n .style-module_Container__oDKWq .style-module_RightContent__-jdoh {\n margin-left: 16px;\n }\n .style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayButton__c8OjL .style-module_ButtonText__G12-2 {\n margin-top: 0px;\n }\n}\n@media only screen and (max-width: 1280px) {\n .style-module_Container__oDKWq {\n flex-direction: column;\n }\n .style-module_Container__oDKWq .style-module_RightContent__-jdoh {\n margin-left: 0;\n margin-top: 12px;\n }\n .style-module_Container__oDKWq .style-module_RightContent__-jdoh .style-module_EPayKolayDescription__xxQ58 {\n position: static;\n }\n}\n@media only screen and (max-width: 1024px) {\n .style-module_Container__oDKWq {\n margin: 0 12px;\n margin-top: 20px;\n width: calc(100% - 24px);\n margin-bottom: 24px;\n }\n}");export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as C from"react";var e=function(e){return e.className,C.createElement("svg",{width:"104",height:"22",viewBox:"0 0 104 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:"M34.1927 10.98L34.5334 9.08674H38.2822L37.9414 10.98H34.1927Z",fill:"white"}),C.createElement("path",{d:"M27.8314 11.0179C27.8314 11.0558 27.8314 11.0937 27.8314 11.1694C27.8314 11.3587 27.8693 11.5481 27.9828 11.7374C28.0586 11.8889 28.21 12.0403 28.3615 12.1539C28.513 12.2675 28.7023 12.3432 28.8916 12.419C29.081 12.4947 29.2703 12.4947 29.4975 12.4947C29.8761 12.4947 30.2169 12.419 30.482 12.3054C30.5577 12.2675 30.6713 12.2297 30.747 12.1539C31.0878 11.9267 31.5044 11.9646 31.8452 12.1918C32.3374 12.5704 32.3374 13.4035 31.7694 13.7064C31.5801 13.82 31.3908 13.9336 31.1636 14.0093C30.5956 14.2365 29.9519 14.3501 29.2703 14.3501C28.7402 14.3501 28.2858 14.2744 27.8314 14.1229C27.377 13.9715 26.9983 13.7821 26.6954 13.4792C26.3546 13.2142 26.1274 12.8355 25.9381 12.419C25.7488 12.0025 25.673 11.5102 25.673 10.9801C25.673 10.3364 25.7866 9.76838 26.0138 9.20039C26.241 8.6324 26.5439 8.17801 26.9226 7.76149C27.3013 7.34497 27.7935 7.04204 28.3236 6.81485C28.8538 6.58765 29.4596 6.47406 30.1033 6.47406C30.5956 6.47406 31.05 6.54979 31.4286 6.66339C31.8452 6.81485 32.1859 7.00418 32.451 7.26924C32.7539 7.5343 32.9433 7.83722 33.1326 8.25375C33.284 8.6324 33.3598 9.08679 33.3598 9.57905C33.3598 9.76838 33.3598 9.99557 33.3219 10.2606C33.284 10.715 32.8675 11.0179 32.451 11.0179H27.8314ZM31.2014 9.54118C31.2014 9.50331 31.2014 9.42759 31.2014 9.38972C31.2014 9.35185 31.2014 9.27612 31.2014 9.23826C31.2014 8.89747 31.0878 8.6324 30.8606 8.40521C30.6334 8.17801 30.2927 8.06442 29.8761 8.06442C29.6111 8.06442 29.3839 8.10228 29.1567 8.21588C28.9295 8.29161 28.7402 8.44308 28.5887 8.55667C28.4372 8.70814 28.2858 8.8596 28.21 9.01106C28.0964 9.16253 28.0586 9.35186 28.0207 9.50332H31.2014V9.54118Z",fill:"white"}),C.createElement("path",{d:"M44.0378 3.82358C45.2874 3.82358 46.234 4.08864 46.8778 4.58089C47.5215 5.11101 47.8623 5.83046 47.8623 6.73924C47.8623 7.34509 47.7487 7.91308 47.5215 8.36747C47.2943 8.82186 46.9914 9.20051 46.5748 9.50344C46.1583 9.80637 45.6661 9.99569 45.0981 10.1472C44.5301 10.2986 43.8864 10.3365 43.2048 10.3365H41.8416L41.3115 13.3279C41.1979 13.8959 40.7056 14.3124 40.1377 14.3124H38.8124C38.7366 14.3124 38.6988 14.2745 38.7366 14.1988L40.4406 4.54302C40.5163 4.08863 40.895 3.78571 41.3494 3.78571H44.0378V3.82358ZM43.2805 8.40533C43.9242 8.40533 44.4544 8.29174 44.833 8.10241C45.2117 7.91308 45.401 7.53442 45.401 7.0043C45.401 6.7771 45.3631 6.58777 45.2874 6.43631C45.2117 6.28485 45.0981 6.17125 44.9466 6.05765C44.7951 5.98192 44.6058 5.90619 44.4165 5.86832C44.2272 5.83046 43.9621 5.83046 43.7349 5.83046H42.7125L42.2581 8.40533H43.2805Z",fill:"white"}),C.createElement("path",{d:"M54.7539 8.8218C54.7539 8.97326 54.7539 9.12473 54.716 9.27619C54.716 9.42765 54.6782 9.57911 54.6403 9.73058L54.148 12.6084C54.1102 12.8734 54.0723 13.1385 54.0345 13.4036C53.9966 13.7822 53.6937 14.0473 53.315 14.0473H51.8761C51.8761 13.9337 51.8761 13.8201 51.8761 13.6686C51.8761 13.5172 51.914 13.4036 51.914 13.2521H51.8761C51.346 13.8958 50.5887 14.1987 49.6042 14.1987C49.3391 14.1987 49.074 14.1609 48.809 14.0851C48.5439 14.0094 48.2789 13.8958 48.0517 13.7443C47.8245 13.5929 47.6351 13.4036 47.5215 13.1385C47.3701 12.8734 47.3322 12.5705 47.3322 12.1919C47.3322 11.586 47.4837 11.1316 47.7866 10.753C48.0895 10.3743 48.4682 10.0714 48.9604 9.88204C49.4527 9.69271 49.9828 9.54125 50.5887 9.46552C51.1945 9.38979 51.8004 9.35192 52.4062 9.35192C52.4441 9.27619 52.4441 9.20046 52.4441 9.16259C52.4441 9.12472 52.4441 9.08686 52.4441 9.01113C52.4441 8.7082 52.3305 8.51888 52.1412 8.36741C51.9518 8.21595 51.6489 8.17808 51.2703 8.17808C50.9295 8.17808 50.5887 8.25382 50.2479 8.36741C50.1343 8.40528 50.0207 8.44314 49.9071 8.51887C49.5284 8.7082 49.1119 8.59461 48.8847 8.29168L48.809 8.21595C48.5439 7.83729 48.6575 7.26931 49.074 7.04211C49.3012 6.92851 49.5663 6.81491 49.8692 6.70132C50.4372 6.51199 51.0052 6.3984 51.5732 6.3984C52.0276 6.3984 52.4441 6.43626 52.8227 6.54986C53.2014 6.62559 53.5043 6.77705 53.8073 7.00424C54.0723 7.19357 54.2995 7.45863 54.451 7.76156C54.6782 8.06449 54.7539 8.40528 54.7539 8.8218ZM52.1033 10.8287C51.8004 10.8287 51.4974 10.8287 51.1945 10.8665C50.8916 10.9044 50.6265 10.9423 50.3615 11.018C50.1343 11.0937 49.9071 11.2073 49.7556 11.3588C49.6042 11.5103 49.5284 11.6617 49.5284 11.9268C49.5284 12.2297 49.642 12.419 49.8314 12.5326C50.0207 12.6462 50.2479 12.6841 50.5129 12.6841C50.9673 12.6841 51.346 12.5326 51.6489 12.2676C51.9518 12.0025 52.1412 11.6239 52.2169 11.2073L52.2926 10.8665H52.1033V10.8287Z",fill:"white"}),C.createElement("path",{d:"M59.1463 15.183C58.9191 15.5616 58.7298 15.9024 58.5026 16.2054C58.2754 16.5083 58.0482 16.7733 57.821 16.9627C57.5559 17.152 57.2909 17.3413 56.9501 17.4549C56.6093 17.5685 56.2306 17.6064 55.8141 17.6064C55.7005 17.6064 55.5491 17.6064 55.4355 17.6064C54.9811 17.5685 54.6403 17.1141 54.716 16.6597L54.7917 16.2811C54.8675 15.9024 55.2083 15.6374 55.6248 15.6374C55.9656 15.6374 56.2306 15.5616 56.42 15.3723C56.6093 15.183 56.7986 14.9558 56.988 14.6529L57.3288 14.047L55.6248 6.70105H56.8744C57.6695 6.70105 58.3133 7.26903 58.4269 8.06421L58.957 11.5479H58.9948L61.0017 7.57196C61.2668 7.04184 61.8348 6.70105 62.4028 6.70105H63.9553L59.1463 15.183Z",fill:"white"}),C.createElement("path",{d:"M78.1931 14.2756C77.6629 14.2756 77.1707 14.1999 76.7163 14.0484C76.2619 13.8969 75.8454 13.6697 75.5425 13.4047C75.2017 13.1396 74.9366 12.7988 74.7473 12.3823C74.5579 11.9658 74.4443 11.5114 74.4443 11.0191C74.4443 10.4133 74.5579 9.80743 74.7473 9.27731C74.9366 8.70932 75.2395 8.25493 75.656 7.83841C76.0347 7.42189 76.527 7.0811 77.0571 6.8539C77.6251 6.58884 78.2309 6.47525 78.9504 6.47525C79.4805 6.47525 80.0106 6.55097 80.465 6.70244C80.9194 6.8539 81.3359 7.0811 81.6767 7.34616C82.0175 7.61122 82.2826 7.95201 82.4719 8.36853C82.6612 8.78506 82.7748 9.23944 82.7748 9.7317C82.7748 10.3375 82.6612 10.9434 82.4719 11.5114C82.2826 12.0794 81.9796 12.5338 81.5631 12.9503C81.1844 13.3668 80.6922 13.7076 80.1242 13.9348C79.5562 14.162 78.9125 14.2756 78.1931 14.2756ZM80.4271 9.95889C80.4271 9.50451 80.2757 9.12585 80.0106 8.86079C79.7455 8.55786 79.3669 8.4064 78.8746 8.4064C78.5717 8.4064 78.2688 8.48213 78.0037 8.59572C77.7387 8.70932 77.5115 8.89865 77.36 9.12585C77.1707 9.35304 77.0571 9.58024 76.9435 9.88316C76.8299 10.1861 76.792 10.489 76.792 10.7919C76.792 11.2463 76.9435 11.625 77.2085 11.89C77.4736 12.193 77.8523 12.3444 78.3445 12.3444C78.6474 12.3444 78.9504 12.2687 79.2154 12.1551C79.4805 12.0415 79.7077 11.8522 79.8591 11.625C80.0485 11.3978 80.1999 11.1706 80.2757 10.8677C80.3893 10.5647 80.4271 10.2618 80.4271 9.95889Z",fill:"white"}),C.createElement("path",{d:"M83.2291 14.047L84.8573 4.7699C84.933 4.27765 85.3874 3.89899 85.8797 3.89899H87.4322L85.6525 14.047H83.2291Z",fill:"white"}),C.createElement("path",{d:"M94.3996 8.82299C94.3996 8.97445 94.3996 9.12591 94.3617 9.27738C94.3617 9.42884 94.3239 9.5803 94.286 9.73177L93.7937 12.6096C93.7559 12.8746 93.718 13.1397 93.6801 13.4047C93.6423 13.7834 93.3394 14.0485 92.9607 14.0485H91.5218C91.5218 13.9349 91.5218 13.8213 91.5218 13.6698C91.5218 13.5183 91.5597 13.4047 91.5597 13.2533H91.5218C90.9917 13.897 90.2344 14.1999 89.2499 14.1999C88.9848 14.1999 88.7197 14.1621 88.4547 14.0863C88.1896 14.0106 87.9245 13.897 87.6974 13.7455C87.4702 13.5941 87.2808 13.4047 87.1672 13.1397C87.0158 12.8746 86.9779 12.5717 86.9779 12.193C86.9779 11.5872 87.1294 11.1328 87.4323 10.7541C87.7352 10.3755 88.1139 10.0726 88.6061 9.88323C89.0984 9.6939 89.6285 9.54244 90.2344 9.46671C90.8402 9.39097 91.4461 9.35311 92.0519 9.35311C92.0898 9.27738 92.0898 9.20164 92.0898 9.16378C92.0898 9.12591 92.0898 9.08805 92.0898 9.01232C92.0898 8.70939 91.9762 8.52006 91.7869 8.3686C91.5975 8.21714 91.2946 8.17927 90.9159 8.17927C90.5751 8.17927 90.2344 8.255 89.8936 8.3686C89.78 8.40647 89.6664 8.44433 89.5528 8.52006C89.1741 8.70939 88.7576 8.5958 88.5304 8.29287L88.4547 8.21714C88.1896 7.83848 88.3032 7.27049 88.7197 7.0433C88.9469 6.9297 89.212 6.8161 89.5149 6.70251C90.0829 6.51318 90.6509 6.39958 91.2189 6.39958C91.6733 6.39958 92.0898 6.43745 92.4684 6.55104C92.8471 6.62678 93.15 6.77824 93.453 7.00543C93.718 7.19476 93.9452 7.45982 94.0967 7.76275C94.3239 8.06567 94.3996 8.40647 94.3996 8.82299ZM91.7869 10.8299C91.4839 10.8299 91.181 10.8299 90.8781 10.8677C90.5752 10.9056 90.3101 10.9435 90.045 11.0192C89.8178 11.0949 89.5906 11.2085 89.4392 11.36C89.2877 11.5115 89.212 11.6629 89.212 11.928C89.212 12.2309 89.3256 12.4202 89.5149 12.5338C89.7042 12.6474 89.9314 12.6853 90.1965 12.6853C90.6509 12.6853 91.0295 12.5338 91.3325 12.2688C91.6354 12.0037 91.8247 11.6251 91.9005 11.2085L91.9762 10.8677H91.7869V10.8299Z",fill:"white"}),C.createElement("path",{d:"M98.7919 15.2215C98.5647 15.6002 98.3753 15.941 98.1482 16.2439C97.921 16.5468 97.6938 16.8119 97.4666 17.0012C97.2015 17.1905 96.9364 17.3799 96.5957 17.4935C96.2549 17.6071 95.8762 17.6449 95.4597 17.6449C95.3461 17.6449 95.1946 17.6449 95.081 17.6449C94.6266 17.6071 94.2858 17.1527 94.3616 16.6983L94.4373 16.3196C94.513 15.941 94.8538 15.6759 95.2704 15.6759C95.6111 15.6759 95.8762 15.6002 96.0655 15.4109C96.2549 15.2215 96.4442 14.9943 96.6335 14.6914L96.9743 14.0856L95.2704 6.7396H96.8229C97.4287 6.7396 97.9588 7.19399 98.0346 7.79984L98.6025 11.5864H98.6404L100.761 7.42118C100.988 7.00466 101.405 6.7396 101.859 6.7396H103.639L98.7919 15.2215Z",fill:"white"}),C.createElement("path",{d:"M72.8159 14.1232C72.3616 14.1232 71.945 13.896 71.7178 13.5174L69.143 9.3143H69.1051L68.4614 13.063C68.3478 13.6689 67.8177 14.1232 67.2118 14.1232H65.9244L67.5526 4.95974C67.6662 4.35388 68.1963 3.89949 68.8022 3.89949H70.0896L69.3323 8.17832H69.3702L73.0431 4.27815C73.2703 4.01309 73.6111 3.86163 73.9898 3.86163H76.4889L71.4906 8.74631L75.1258 14.0854H72.8159V14.1232Z",fill:"white"}),C.createElement("path",{d:"M20.8262 3.52151L12.0034 0.227195C12.0034 0.227195 12.0034 0.227195 11.9656 0.227195C11.0568 -0.0757315 10.1102 -0.0757315 9.20138 0.227195H9.16351L0.454391 3.52151C0.227196 3.59725 0.0757315 3.82444 0 4.05163C0 4.0895 0 4.12737 0 4.2031V14.8434C0 16.6609 1.09811 18.2892 2.80207 18.9707L10.3752 21.9621C10.4509 22 10.5645 22 10.6403 22C10.716 22 10.7917 22 10.8675 21.9621L14.2754 20.599C14.5405 20.4854 14.6919 20.2203 14.6919 19.9552V15.7522L18.4406 14.2754C20.1446 13.5938 21.2427 12.0034 21.2427 10.148V4.24096V4.2031C21.2806 3.90017 21.0912 3.63511 20.8262 3.52151Z",fill:"white"}),C.createElement("path",{d:"M20.5611 4.16482L10.6403 8.10286L0.719482 4.16482L9.42861 0.8705C10.1859 0.605439 11.019 0.643305 11.7763 0.8705L20.5611 4.16482Z",fill:"#44C0E8"}),C.createElement("path",{d:"M10.6404 8.10277V21.28H10.6782L14.0483 19.9169V10.6019L18.0999 8.86009V10.6776L14.8056 12.1165V14.9186L18.2135 13.5554C19.6524 12.9875 20.5612 11.6243 20.5612 10.0718V4.12687L10.6404 8.10277Z",fill:"#E0006D"}),C.createElement("path",{d:"M3.938 14.049C3.938 14.049 10.0344 16.6239 10.6402 16.8889V8.14194H10.6024L0.681549 4.24176V14.882C0.681549 16.4345 1.62819 17.7977 3.02922 18.3657L10.5645 21.3571H10.6024V17.8734L3.90014 14.9578L3.938 14.049ZM3.938 9.20218L7.91391 10.8683V12.7994L3.938 11.0576V9.20218Z",fill:"#004385"}))};export{e as default};
|