@ikas/storefront 0.0.158 → 0.0.159

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.
Files changed (31) hide show
  1. package/build/__generated__/global-types.d.ts +44 -0
  2. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +9 -1
  3. package/build/api/country/__generated__/listCountry.d.ts +1 -0
  4. package/build/api/country/index.d.ts +1 -1
  5. package/build/api/customer/__generated__/customerLogin.d.ts +2 -1
  6. package/build/api/customer/__generated__/getLastViewedProducts.d.ts +15 -0
  7. package/build/api/customer/__generated__/saveLastViewedProducts.d.ts +11 -0
  8. package/build/api/customer/index.d.ts +13 -1
  9. package/build/components/checkout/components/address-form/index.d.ts +3 -0
  10. package/build/components/checkout/components/address-form/model.d.ts +9 -0
  11. package/build/components/checkout/components/form-item/model.d.ts +7 -0
  12. package/build/components/checkout/model.d.ts +1 -0
  13. package/build/index.es.js +1615 -663
  14. package/build/index.js +1615 -662
  15. package/build/models/data/category/index.d.ts +5 -0
  16. package/build/models/data/checkout/index.d.ts +3 -0
  17. package/build/models/data/order/line-item/index.d.ts +1 -0
  18. package/build/models/data/payment-gateway/index.d.ts +25 -2
  19. package/build/models/data/product/attribute-value/index.d.ts +4 -0
  20. package/build/models/theme/component/prop/index.d.ts +5 -1
  21. package/build/models/theme/custom-data/index.d.ts +10 -0
  22. package/build/models/theme/page/component/prop-value/attribute-list.d.ts +7 -0
  23. package/build/models/ui/product-list/index.d.ts +8 -5
  24. package/build/store/base.d.ts +0 -1
  25. package/build/store/customer.d.ts +19 -6
  26. package/build/utils/helper.d.ts +1 -0
  27. package/build/utils/providers/page-data.d.ts +7 -1
  28. package/build/utils/providers/prop-value/attribute-list.d.ts +9 -0
  29. package/build/utils/providers/prop-value/boolean.d.ts +1 -1
  30. package/build/utils/providers/prop-value/custom.d.ts +4 -0
  31. package/package.json +1 -1
package/build/index.js CHANGED
@@ -11075,6 +11075,8 @@ var IkasCategoryPath = /** @class */ (function () {
11075
11075
  }());
11076
11076
  var IkasFilterCategory = /** @class */ (function () {
11077
11077
  function IkasFilterCategory(data) {
11078
+ // Extra
11079
+ this._isSelected = false;
11078
11080
  this.id = data.id || "";
11079
11081
  this.name = data.name || "";
11080
11082
  this.slug = data.slug || "";
@@ -11082,8 +11084,16 @@ var IkasFilterCategory = /** @class */ (function () {
11082
11084
  data.resultCount !== undefined && data.resultCount !== null
11083
11085
  ? data.resultCount
11084
11086
  : null;
11087
+ this._isSelected = data.isSelected || false;
11085
11088
  mobx.makeAutoObservable(this);
11086
11089
  }
11090
+ Object.defineProperty(IkasFilterCategory.prototype, "isSelected", {
11091
+ get: function () {
11092
+ return this._isSelected;
11093
+ },
11094
+ enumerable: false,
11095
+ configurable: true
11096
+ });
11087
11097
  Object.defineProperty(IkasFilterCategory.prototype, "href", {
11088
11098
  get: function () {
11089
11099
  if (!this.slug)
@@ -11093,6 +11103,9 @@ var IkasFilterCategory = /** @class */ (function () {
11093
11103
  enumerable: false,
11094
11104
  configurable: true
11095
11105
  });
11106
+ IkasFilterCategory.prototype.toJSON = function () {
11107
+ return __assign(__assign({}, this), { isSelected: this._isSelected });
11108
+ };
11096
11109
  return IkasFilterCategory;
11097
11110
  }());
11098
11111
 
@@ -11185,7 +11198,7 @@ var IkasOrderAddress = /** @class */ (function () {
11185
11198
  });
11186
11199
  Object.defineProperty(IkasOrderAddress.prototype, "validationResult", {
11187
11200
  get: function () {
11188
- var _a, _b, _c, _d, _e;
11201
+ var _a, _b, _c, _d;
11189
11202
  var isValidPhone = !!this.phone &&
11190
11203
  this.phone.length >= 10 &&
11191
11204
  validatePhoneNumber(this.phone);
@@ -11206,10 +11219,7 @@ var IkasOrderAddress = /** @class */ (function () {
11206
11219
  ? isValidPhone
11207
11220
  : true,
11208
11221
  identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
11209
- IkasCheckoutRequirementEnum.MANDATORY ||
11210
- (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.identityNumberRequirement) ===
11211
- IkasCheckoutRequirementEnum.OPTIONAL &&
11212
- this.phone)
11222
+ IkasCheckoutRequirementEnum.MANDATORY
11213
11223
  ? !!this.identityNumber
11214
11224
  : true,
11215
11225
  };
@@ -11340,9 +11350,18 @@ var IkasOrderLineItem = /** @class */ (function () {
11340
11350
  this.status = data.status || OrderLineItemStatusEnum.FULFILLED;
11341
11351
  mobx.makeAutoObservable(this);
11342
11352
  }
11353
+ Object.defineProperty(IkasOrderLineItem.prototype, "priceWithQuantity", {
11354
+ get: function () {
11355
+ return this.price * this.quantity;
11356
+ },
11357
+ enumerable: false,
11358
+ configurable: true
11359
+ });
11343
11360
  Object.defineProperty(IkasOrderLineItem.prototype, "finalPriceWithQuantity", {
11344
11361
  get: function () {
11345
- return this.finalPrice * this.quantity;
11362
+ return ((this.discountPrice !== undefined && this.discountPrice !== null
11363
+ ? this.discountPrice
11364
+ : this.price) * this.quantity);
11346
11365
  },
11347
11366
  enumerable: false,
11348
11367
  configurable: true
@@ -11350,7 +11369,7 @@ var IkasOrderLineItem = /** @class */ (function () {
11350
11369
  Object.defineProperty(IkasOrderLineItem.prototype, "tax", {
11351
11370
  get: function () {
11352
11371
  var taxValue = this.taxValue || 0;
11353
- return (this.finalPriceWithQuantity / (100 + taxValue)) * taxValue;
11372
+ return ((this.finalPrice * this.quantity) / (100 + taxValue)) * taxValue;
11354
11373
  },
11355
11374
  enumerable: false,
11356
11375
  configurable: true
@@ -11428,6 +11447,81 @@ var IkasCart = /** @class */ (function () {
11428
11447
  return IkasCart;
11429
11448
  }());
11430
11449
 
11450
+ var IkasPaymentGateway = /** @class */ (function () {
11451
+ function IkasPaymentGateway(data) {
11452
+ var _a;
11453
+ this.paymentMethods = data.paymentMethods || [];
11454
+ this.paymentMethodType =
11455
+ data.paymentMethodType || IkasPaymentMethodType.OTHER;
11456
+ this.id = data.id || null;
11457
+ this.name = data.name || "";
11458
+ this.testMode = data.testMode || null;
11459
+ this.description = data.description || null;
11460
+ this.additionalPrices =
11461
+ ((_a = data.additionalPrices) === null || _a === void 0 ? void 0 : _a.map(function (ap) { return new IkasPaymentGatewayAdditionalPrice(ap); })) || null;
11462
+ mobx.makeAutoObservable(this);
11463
+ }
11464
+ IkasPaymentGateway.prototype.getCalculatedAdditionalPrices = function (totalFinalPrice, shippingLines) {
11465
+ var _this = this;
11466
+ if (this.additionalPrices) {
11467
+ var shippingPrice = (shippingLines === null || shippingLines === void 0 ? void 0 : shippingLines.reduce(function (sum, item) { return sum + item.price; }, 0)) || 0;
11468
+ totalFinalPrice -= shippingPrice;
11469
+ return this.additionalPrices.map(function (additionalPrice) {
11470
+ var amount = 0;
11471
+ if (additionalPrice.amountType ===
11472
+ IkasPaymentGatewayAdditionalPriceAmountType.RATIO) {
11473
+ amount = ((totalFinalPrice || 0) * additionalPrice.amount) / 100;
11474
+ }
11475
+ else {
11476
+ amount = additionalPrice.amount;
11477
+ }
11478
+ if (additionalPrice.type ===
11479
+ IkasPaymentMethodAdditionalPriceType.DECREMENT)
11480
+ totalFinalPrice -= amount;
11481
+ else
11482
+ totalFinalPrice += amount;
11483
+ return {
11484
+ name: additionalPrice.name || _this.name,
11485
+ amount: amount,
11486
+ type: additionalPrice.type,
11487
+ };
11488
+ });
11489
+ }
11490
+ };
11491
+ return IkasPaymentGateway;
11492
+ }());
11493
+ var IkasPaymentGatewayAdditionalPrice = /** @class */ (function () {
11494
+ function IkasPaymentGatewayAdditionalPrice(data) {
11495
+ this.amount = data.amount || 0;
11496
+ this.amountType =
11497
+ data.amountType || IkasPaymentGatewayAdditionalPriceAmountType.AMOUNT;
11498
+ this.name = data.name || "";
11499
+ this.type = data.type || IkasPaymentMethodAdditionalPriceType.INCREMENT;
11500
+ mobx.makeAutoObservable(this);
11501
+ }
11502
+ return IkasPaymentGatewayAdditionalPrice;
11503
+ }());
11504
+ var IkasPaymentMethodType;
11505
+ (function (IkasPaymentMethodType) {
11506
+ IkasPaymentMethodType["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
11507
+ IkasPaymentMethodType["CASH"] = "CASH";
11508
+ IkasPaymentMethodType["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
11509
+ IkasPaymentMethodType["CREDIT_CARD"] = "CREDIT_CARD";
11510
+ IkasPaymentMethodType["GIFT_CARD"] = "GIFT_CARD";
11511
+ IkasPaymentMethodType["MONEY_ORDER"] = "MONEY_ORDER";
11512
+ IkasPaymentMethodType["OTHER"] = "OTHER";
11513
+ })(IkasPaymentMethodType || (IkasPaymentMethodType = {}));
11514
+ var IkasPaymentMethodAdditionalPriceType;
11515
+ (function (IkasPaymentMethodAdditionalPriceType) {
11516
+ IkasPaymentMethodAdditionalPriceType["DECREMENT"] = "DECREMENT";
11517
+ IkasPaymentMethodAdditionalPriceType["INCREMENT"] = "INCREMENT";
11518
+ })(IkasPaymentMethodAdditionalPriceType || (IkasPaymentMethodAdditionalPriceType = {}));
11519
+ var IkasPaymentGatewayAdditionalPriceAmountType;
11520
+ (function (IkasPaymentGatewayAdditionalPriceAmountType) {
11521
+ IkasPaymentGatewayAdditionalPriceAmountType["AMOUNT"] = "AMOUNT";
11522
+ IkasPaymentGatewayAdditionalPriceAmountType["RATIO"] = "RATIO";
11523
+ })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
11524
+
11431
11525
  var IkasCheckout = /** @class */ (function () {
11432
11526
  function IkasCheckout(data) {
11433
11527
  if (data === void 0) { data = {}; }
@@ -11455,6 +11549,7 @@ var IkasCheckout = /** @class */ (function () {
11455
11549
  this.note = null;
11456
11550
  // Extra
11457
11551
  this.appliedCouponCode = null;
11552
+ this.selectedPaymentGateway = null;
11458
11553
  this.id = data.id;
11459
11554
  this.createdAt = data.createdAt;
11460
11555
  this.updatedAt = data.updatedAt;
@@ -11526,6 +11621,22 @@ var IkasCheckout = /** @class */ (function () {
11526
11621
  enumerable: false,
11527
11622
  configurable: true
11528
11623
  });
11624
+ Object.defineProperty(IkasCheckout.prototype, "$totalFinalPrice", {
11625
+ get: function () {
11626
+ var _a;
11627
+ var calculatedAdditionalPrices = (_a = this.selectedPaymentGateway) === null || _a === void 0 ? void 0 : _a.getCalculatedAdditionalPrices(this.totalFinalPrice || 0, this.shippingLines || null);
11628
+ var total = this.totalFinalPrice || 0;
11629
+ calculatedAdditionalPrices === null || calculatedAdditionalPrices === void 0 ? void 0 : calculatedAdditionalPrices.forEach(function (additionalPrice) {
11630
+ if (additionalPrice.type === IkasPaymentMethodAdditionalPriceType.DECREMENT)
11631
+ total -= additionalPrice.amount;
11632
+ else
11633
+ total += additionalPrice.amount;
11634
+ });
11635
+ return total;
11636
+ },
11637
+ enumerable: false,
11638
+ configurable: true
11639
+ });
11529
11640
  return IkasCheckout;
11530
11641
  }());
11531
11642
  (function (IkasShippingMethod) {
@@ -16153,17 +16264,6 @@ var sortBy = _baseRest(function(collection, iteratees) {
16153
16264
 
16154
16265
  var sortBy_1 = sortBy;
16155
16266
 
16156
- var IkasPaymentMethodType;
16157
- (function (IkasPaymentMethodType) {
16158
- IkasPaymentMethodType["BUY_ONLINE_PAY_AT_STORE"] = "BUY_ONLINE_PAY_AT_STORE";
16159
- IkasPaymentMethodType["CASH"] = "CASH";
16160
- IkasPaymentMethodType["CASH_ON_DELIVERY"] = "CASH_ON_DELIVERY";
16161
- IkasPaymentMethodType["CREDIT_CARD"] = "CREDIT_CARD";
16162
- IkasPaymentMethodType["GIFT_CARD"] = "GIFT_CARD";
16163
- IkasPaymentMethodType["MONEY_ORDER"] = "MONEY_ORDER";
16164
- IkasPaymentMethodType["OTHER"] = "OTHER";
16165
- })(IkasPaymentMethodType || (IkasPaymentMethodType = {}));
16166
-
16167
16267
  var CreditCardData = /** @class */ (function () {
16168
16268
  function CreditCardData(data) {
16169
16269
  var _this = this;
@@ -16807,6 +16907,7 @@ var CheckoutViewModel = /** @class */ (function () {
16807
16907
  if (paymentGateway.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD) {
16808
16908
  _this.cardData = new CreditCardData();
16809
16909
  }
16910
+ _this.checkout.selectedPaymentGateway = paymentGateway;
16810
16911
  _this.installmentInfo = undefined;
16811
16912
  };
16812
16913
  this.setInstallmentCount = function (count) {
@@ -16927,6 +17028,13 @@ var CheckoutViewModel = /** @class */ (function () {
16927
17028
  enumerable: false,
16928
17029
  configurable: true
16929
17030
  });
17031
+ Object.defineProperty(CheckoutViewModel.prototype, "finalPrice", {
17032
+ get: function () {
17033
+ return this.installmentPrice || this.checkout.$totalFinalPrice;
17034
+ },
17035
+ enumerable: false,
17036
+ configurable: true
17037
+ });
16930
17038
  Object.defineProperty(CheckoutViewModel.prototype, "canProceedToShipping", {
16931
17039
  // VALIDATIONS
16932
17040
  get: function () {
@@ -17469,11 +17577,260 @@ var AnalyticsBody = function () {
17469
17577
  } }))));
17470
17578
  };
17471
17579
 
17580
+ /**
17581
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
17582
+ * support for iteratee shorthands.
17583
+ *
17584
+ * @private
17585
+ * @param {Array} array The array to inspect.
17586
+ * @param {Function} predicate The function invoked per iteration.
17587
+ * @param {number} fromIndex The index to search from.
17588
+ * @param {boolean} [fromRight] Specify iterating from right to left.
17589
+ * @returns {number} Returns the index of the matched value, else `-1`.
17590
+ */
17591
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
17592
+ var length = array.length,
17593
+ index = fromIndex + (fromRight ? 1 : -1);
17594
+
17595
+ while ((fromRight ? index-- : ++index < length)) {
17596
+ if (predicate(array[index], index, array)) {
17597
+ return index;
17598
+ }
17599
+ }
17600
+ return -1;
17601
+ }
17602
+
17603
+ var _baseFindIndex = baseFindIndex;
17604
+
17605
+ /**
17606
+ * The base implementation of `_.isNaN` without support for number objects.
17607
+ *
17608
+ * @private
17609
+ * @param {*} value The value to check.
17610
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
17611
+ */
17612
+ function baseIsNaN(value) {
17613
+ return value !== value;
17614
+ }
17615
+
17616
+ var _baseIsNaN = baseIsNaN;
17617
+
17618
+ /**
17619
+ * A specialized version of `_.indexOf` which performs strict equality
17620
+ * comparisons of values, i.e. `===`.
17621
+ *
17622
+ * @private
17623
+ * @param {Array} array The array to inspect.
17624
+ * @param {*} value The value to search for.
17625
+ * @param {number} fromIndex The index to search from.
17626
+ * @returns {number} Returns the index of the matched value, else `-1`.
17627
+ */
17628
+ function strictIndexOf(array, value, fromIndex) {
17629
+ var index = fromIndex - 1,
17630
+ length = array.length;
17631
+
17632
+ while (++index < length) {
17633
+ if (array[index] === value) {
17634
+ return index;
17635
+ }
17636
+ }
17637
+ return -1;
17638
+ }
17639
+
17640
+ var _strictIndexOf = strictIndexOf;
17641
+
17642
+ /**
17643
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
17644
+ *
17645
+ * @private
17646
+ * @param {Array} array The array to inspect.
17647
+ * @param {*} value The value to search for.
17648
+ * @param {number} fromIndex The index to search from.
17649
+ * @returns {number} Returns the index of the matched value, else `-1`.
17650
+ */
17651
+ function baseIndexOf(array, value, fromIndex) {
17652
+ return value === value
17653
+ ? _strictIndexOf(array, value, fromIndex)
17654
+ : _baseFindIndex(array, _baseIsNaN, fromIndex);
17655
+ }
17656
+
17657
+ var _baseIndexOf = baseIndexOf;
17658
+
17659
+ /**
17660
+ * A specialized version of `_.includes` for arrays without support for
17661
+ * specifying an index to search from.
17662
+ *
17663
+ * @private
17664
+ * @param {Array} [array] The array to inspect.
17665
+ * @param {*} target The value to search for.
17666
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
17667
+ */
17668
+ function arrayIncludes(array, value) {
17669
+ var length = array == null ? 0 : array.length;
17670
+ return !!length && _baseIndexOf(array, value, 0) > -1;
17671
+ }
17672
+
17673
+ var _arrayIncludes = arrayIncludes;
17674
+
17675
+ /**
17676
+ * This function is like `arrayIncludes` except that it accepts a comparator.
17677
+ *
17678
+ * @private
17679
+ * @param {Array} [array] The array to inspect.
17680
+ * @param {*} target The value to search for.
17681
+ * @param {Function} comparator The comparator invoked per element.
17682
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
17683
+ */
17684
+ function arrayIncludesWith(array, value, comparator) {
17685
+ var index = -1,
17686
+ length = array == null ? 0 : array.length;
17687
+
17688
+ while (++index < length) {
17689
+ if (comparator(value, array[index])) {
17690
+ return true;
17691
+ }
17692
+ }
17693
+ return false;
17694
+ }
17695
+
17696
+ var _arrayIncludesWith = arrayIncludesWith;
17697
+
17698
+ /**
17699
+ * This method returns `undefined`.
17700
+ *
17701
+ * @static
17702
+ * @memberOf _
17703
+ * @since 2.3.0
17704
+ * @category Util
17705
+ * @example
17706
+ *
17707
+ * _.times(2, _.noop);
17708
+ * // => [undefined, undefined]
17709
+ */
17710
+ function noop() {
17711
+ // No operation performed.
17712
+ }
17713
+
17714
+ var noop_1 = noop;
17715
+
17716
+ /** Used as references for various `Number` constants. */
17717
+ var INFINITY$2 = 1 / 0;
17718
+
17719
+ /**
17720
+ * Creates a set object of `values`.
17721
+ *
17722
+ * @private
17723
+ * @param {Array} values The values to add to the set.
17724
+ * @returns {Object} Returns the new set.
17725
+ */
17726
+ var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
17727
+ return new _Set(values);
17728
+ };
17729
+
17730
+ var _createSet = createSet;
17731
+
17732
+ /** Used as the size to enable large array optimizations. */
17733
+ var LARGE_ARRAY_SIZE$1 = 200;
17734
+
17735
+ /**
17736
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
17737
+ *
17738
+ * @private
17739
+ * @param {Array} array The array to inspect.
17740
+ * @param {Function} [iteratee] The iteratee invoked per element.
17741
+ * @param {Function} [comparator] The comparator invoked per element.
17742
+ * @returns {Array} Returns the new duplicate free array.
17743
+ */
17744
+ function baseUniq(array, iteratee, comparator) {
17745
+ var index = -1,
17746
+ includes = _arrayIncludes,
17747
+ length = array.length,
17748
+ isCommon = true,
17749
+ result = [],
17750
+ seen = result;
17751
+
17752
+ if (comparator) {
17753
+ isCommon = false;
17754
+ includes = _arrayIncludesWith;
17755
+ }
17756
+ else if (length >= LARGE_ARRAY_SIZE$1) {
17757
+ var set = iteratee ? null : _createSet(array);
17758
+ if (set) {
17759
+ return _setToArray(set);
17760
+ }
17761
+ isCommon = false;
17762
+ includes = _cacheHas;
17763
+ seen = new _SetCache;
17764
+ }
17765
+ else {
17766
+ seen = iteratee ? [] : result;
17767
+ }
17768
+ outer:
17769
+ while (++index < length) {
17770
+ var value = array[index],
17771
+ computed = iteratee ? iteratee(value) : value;
17772
+
17773
+ value = (comparator || value !== 0) ? value : 0;
17774
+ if (isCommon && computed === computed) {
17775
+ var seenIndex = seen.length;
17776
+ while (seenIndex--) {
17777
+ if (seen[seenIndex] === computed) {
17778
+ continue outer;
17779
+ }
17780
+ }
17781
+ if (iteratee) {
17782
+ seen.push(computed);
17783
+ }
17784
+ result.push(value);
17785
+ }
17786
+ else if (!includes(seen, computed, comparator)) {
17787
+ if (seen !== result) {
17788
+ seen.push(computed);
17789
+ }
17790
+ result.push(value);
17791
+ }
17792
+ }
17793
+ return result;
17794
+ }
17795
+
17796
+ var _baseUniq = baseUniq;
17797
+
17798
+ /**
17799
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
17800
+ * invoked for each element in `array` to generate the criterion by which
17801
+ * uniqueness is computed. The order of result values is determined by the
17802
+ * order they occur in the array. The iteratee is invoked with one argument:
17803
+ * (value).
17804
+ *
17805
+ * @static
17806
+ * @memberOf _
17807
+ * @since 4.0.0
17808
+ * @category Array
17809
+ * @param {Array} array The array to inspect.
17810
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17811
+ * @returns {Array} Returns the new duplicate free array.
17812
+ * @example
17813
+ *
17814
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
17815
+ * // => [2.1, 1.2]
17816
+ *
17817
+ * // The `_.property` iteratee shorthand.
17818
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
17819
+ * // => [{ 'x': 1 }, { 'x': 2 }]
17820
+ */
17821
+ function uniqBy(array, iteratee) {
17822
+ return (array && array.length) ? _baseUniq(array, _baseIteratee(iteratee)) : [];
17823
+ }
17824
+
17825
+ var uniqBy_1 = uniqBy;
17826
+
17472
17827
  var isServer$3 = typeof localStorage === "undefined";
17473
17828
  var LS_TOKEN_KEY = "customerToken";
17474
17829
  var LS_TOKEN_EXPIRY = "customerTokenExpiry";
17475
17830
  var LS_CUSTOMER_KEY = "customer";
17476
17831
  var LS_CUSTOMER_SUB_KEY = "customerEmailSubscription";
17832
+ var LS_LAST_VIEWED_PRODUCTS_KEY = "lastViewedProducts";
17833
+ var LS_CUSTOMER_CONSENT = "customerConsent";
17477
17834
  var IkasCustomerStore = /** @class */ (function () {
17478
17835
  function IkasCustomerStore(baseStore) {
17479
17836
  var _this = this;
@@ -17483,6 +17840,8 @@ var IkasCustomerStore = /** @class */ (function () {
17483
17840
  this.baseStore = null;
17484
17841
  this._initialized = false;
17485
17842
  this._visitorSubscribedEmail = false;
17843
+ this._lastViewedProducts = [];
17844
+ this._customerConsentGranted = false;
17486
17845
  this.login = function (email, password) { return __awaiter(_this, void 0, void 0, function () {
17487
17846
  var response, cart;
17488
17847
  var _a;
@@ -17502,7 +17861,9 @@ var IkasCustomerStore = /** @class */ (function () {
17502
17861
  case 2:
17503
17862
  _b.sent();
17504
17863
  _b.label = 3;
17505
- case 3: return [2 /*return*/, true];
17864
+ case 3:
17865
+ this.saveLocalLastViewedProducts();
17866
+ return [2 /*return*/, true];
17506
17867
  case 4: return [2 /*return*/, false];
17507
17868
  }
17508
17869
  });
@@ -17517,6 +17878,7 @@ var IkasCustomerStore = /** @class */ (function () {
17517
17878
  if (response) {
17518
17879
  this.setToken(response.token, response.tokenExpiry);
17519
17880
  this.setCustomer(response.customer);
17881
+ this.saveLocalLastViewedProducts();
17520
17882
  return [2 /*return*/, true];
17521
17883
  }
17522
17884
  return [2 /*return*/, false];
@@ -17732,6 +18094,9 @@ var IkasCustomerStore = /** @class */ (function () {
17732
18094
  }
17733
18095
  });
17734
18096
  }); };
18097
+ this.onCustomerConsentGrant = function () {
18098
+ _this.saveCustomerConsent();
18099
+ };
17735
18100
  this.baseStore = baseStore;
17736
18101
  this.init();
17737
18102
  mobx.makeAutoObservable(this);
@@ -17754,6 +18119,13 @@ var IkasCustomerStore = /** @class */ (function () {
17754
18119
  enumerable: false,
17755
18120
  configurable: true
17756
18121
  });
18122
+ Object.defineProperty(IkasCustomerStore.prototype, "customerConsentGranted", {
18123
+ get: function () {
18124
+ return this._customerConsentGranted;
18125
+ },
18126
+ enumerable: false,
18127
+ configurable: true
18128
+ });
17757
18129
  IkasCustomerStore.prototype.init = function () {
17758
18130
  return __awaiter(this, void 0, void 0, function () {
17759
18131
  return __generator(this, function (_a) {
@@ -17761,6 +18133,8 @@ var IkasCustomerStore = /** @class */ (function () {
17761
18133
  case 0:
17762
18134
  this.loadToken();
17763
18135
  this.loadCustomer();
18136
+ this.loadLastViewedProducts();
18137
+ this.loadCustomerConsent();
17764
18138
  return [4 /*yield*/, this.refreshToken()];
17765
18139
  case 1:
17766
18140
  _a.sent();
@@ -17831,35 +18205,158 @@ var IkasCustomerStore = /** @class */ (function () {
17831
18205
  }
17832
18206
  catch (err) { }
17833
18207
  };
17834
- IkasCustomerStore.prototype.setToken = function (token, tokenExpiry) {
18208
+ IkasCustomerStore.prototype.getLastViewedProducts = function () {
18209
+ return __awaiter(this, void 0, void 0, function () {
18210
+ var _a;
18211
+ return __generator(this, function (_b) {
18212
+ switch (_b.label) {
18213
+ case 0:
18214
+ if (!this.customer) return [3 /*break*/, 2];
18215
+ _a = this;
18216
+ return [4 /*yield*/, IkasCustomerAPI.getLastViewedProducts(this.customer.id)];
18217
+ case 1:
18218
+ _a._lastViewedProducts = _b.sent();
18219
+ return [3 /*break*/, 3];
18220
+ case 2:
18221
+ this.loadLastViewedProducts();
18222
+ _b.label = 3;
18223
+ case 3: return [2 /*return*/, this._lastViewedProducts];
18224
+ }
18225
+ });
18226
+ });
18227
+ };
18228
+ IkasCustomerStore.prototype.saveLastViewedProducts = function () {
17835
18229
  if (isServer$3)
17836
18230
  return;
17837
- this.token = token;
17838
- this.tokenExpiry = tokenExpiry;
17839
- localStorage.setItem(LS_TOKEN_KEY, token);
17840
- localStorage.setItem(LS_TOKEN_EXPIRY, tokenExpiry + "");
17841
- apollo.setCustomerToken(token);
18231
+ window.localStorage.setItem(LS_LAST_VIEWED_PRODUCTS_KEY, JSON.stringify(this._lastViewedProducts));
17842
18232
  };
17843
- IkasCustomerStore.prototype.loadToken = function () {
18233
+ IkasCustomerStore.prototype.loadLastViewedProducts = function () {
17844
18234
  if (isServer$3)
17845
18235
  return;
17846
- var token = localStorage.getItem(LS_TOKEN_KEY);
17847
- var tokenExpiry = localStorage.getItem(LS_TOKEN_EXPIRY);
17848
- if (token && tokenExpiry) {
17849
- this.setToken(token, parseInt(tokenExpiry));
18236
+ try {
18237
+ var lvpStr = window.localStorage.getItem(LS_LAST_VIEWED_PRODUCTS_KEY);
18238
+ if (lvpStr) {
18239
+ this._lastViewedProducts = JSON.parse(lvpStr);
18240
+ this._lastViewedProducts = this._lastViewedProducts.reverse();
18241
+ this._lastViewedProducts = uniqBy_1(this._lastViewedProducts, "variantId");
18242
+ }
17850
18243
  }
18244
+ catch (err) { }
17851
18245
  };
17852
- IkasCustomerStore.prototype.clearLocalData = function () {
17853
- localStorage.removeItem(LS_TOKEN_KEY);
17854
- localStorage.removeItem(LS_TOKEN_EXPIRY);
17855
- localStorage.removeItem(LS_CUSTOMER_KEY);
17856
- this.customer = undefined;
17857
- this.token = undefined;
17858
- this.tokenExpiry = undefined;
18246
+ IkasCustomerStore.prototype.removeLastViewedProducts = function () {
18247
+ if (isServer$3)
18248
+ return;
18249
+ window.localStorage.removeItem(LS_LAST_VIEWED_PRODUCTS_KEY);
17859
18250
  };
17860
- return IkasCustomerStore;
17861
- }());
17862
-
18251
+ IkasCustomerStore.prototype.onProductView = function (productId, variantId) {
18252
+ return __awaiter(this, void 0, void 0, function () {
18253
+ var isSuccess;
18254
+ return __generator(this, function (_a) {
18255
+ switch (_a.label) {
18256
+ case 0:
18257
+ if (!this.customer) return [3 /*break*/, 2];
18258
+ return [4 /*yield*/, IkasCustomerAPI.saveLastViewedProducts({
18259
+ customerId: this.customer.id,
18260
+ products: [
18261
+ {
18262
+ productId: productId,
18263
+ variantId: variantId,
18264
+ },
18265
+ ],
18266
+ })];
18267
+ case 1:
18268
+ isSuccess = _a.sent();
18269
+ if (isSuccess)
18270
+ this._lastViewedProducts.push({ productId: productId, variantId: variantId });
18271
+ return [3 /*break*/, 3];
18272
+ case 2:
18273
+ this._lastViewedProducts.push({ productId: productId, variantId: variantId });
18274
+ this._lastViewedProducts = this._lastViewedProducts.slice(0, 20);
18275
+ this._lastViewedProducts = uniqBy_1(this._lastViewedProducts, "variantId");
18276
+ this.saveLastViewedProducts();
18277
+ _a.label = 3;
18278
+ case 3: return [2 /*return*/];
18279
+ }
18280
+ });
18281
+ });
18282
+ };
18283
+ IkasCustomerStore.prototype.saveLocalLastViewedProducts = function () {
18284
+ return __awaiter(this, void 0, void 0, function () {
18285
+ var isSuccess;
18286
+ return __generator(this, function (_a) {
18287
+ switch (_a.label) {
18288
+ case 0:
18289
+ if (isServer$3)
18290
+ return [2 /*return*/];
18291
+ _a.label = 1;
18292
+ case 1:
18293
+ _a.trys.push([1, 4, , 5]);
18294
+ this.loadLastViewedProducts();
18295
+ if (!this._lastViewedProducts.length) return [3 /*break*/, 3];
18296
+ return [4 /*yield*/, IkasCustomerAPI.saveLastViewedProducts({
18297
+ customerId: this.customer.id,
18298
+ products: this._lastViewedProducts,
18299
+ })];
18300
+ case 2:
18301
+ isSuccess = _a.sent();
18302
+ if (isSuccess) {
18303
+ this.removeLastViewedProducts();
18304
+ }
18305
+ _a.label = 3;
18306
+ case 3: return [3 /*break*/, 5];
18307
+ case 4:
18308
+ _a.sent();
18309
+ return [3 /*break*/, 5];
18310
+ case 5: return [2 /*return*/];
18311
+ }
18312
+ });
18313
+ });
18314
+ };
18315
+ IkasCustomerStore.prototype.saveCustomerConsent = function () {
18316
+ if (isServer$3)
18317
+ return;
18318
+ this._customerConsentGranted = true;
18319
+ window.localStorage.setItem(LS_CUSTOMER_CONSENT, "true");
18320
+ };
18321
+ IkasCustomerStore.prototype.loadCustomerConsent = function () {
18322
+ if (isServer$3)
18323
+ return;
18324
+ this._customerConsentGranted = !!window.localStorage.getItem(LS_CUSTOMER_CONSENT);
18325
+ };
18326
+ IkasCustomerStore.prototype.removeCustomerConsent = function () {
18327
+ if (isServer$3)
18328
+ return;
18329
+ window.localStorage.removeItem(LS_CUSTOMER_CONSENT);
18330
+ };
18331
+ IkasCustomerStore.prototype.setToken = function (token, tokenExpiry) {
18332
+ if (isServer$3)
18333
+ return;
18334
+ this.token = token;
18335
+ this.tokenExpiry = tokenExpiry;
18336
+ localStorage.setItem(LS_TOKEN_KEY, token);
18337
+ localStorage.setItem(LS_TOKEN_EXPIRY, tokenExpiry + "");
18338
+ apollo.setCustomerToken(token);
18339
+ };
18340
+ IkasCustomerStore.prototype.loadToken = function () {
18341
+ if (isServer$3)
18342
+ return;
18343
+ var token = localStorage.getItem(LS_TOKEN_KEY);
18344
+ var tokenExpiry = localStorage.getItem(LS_TOKEN_EXPIRY);
18345
+ if (token && tokenExpiry) {
18346
+ this.setToken(token, parseInt(tokenExpiry));
18347
+ }
18348
+ };
18349
+ IkasCustomerStore.prototype.clearLocalData = function () {
18350
+ localStorage.removeItem(LS_TOKEN_KEY);
18351
+ localStorage.removeItem(LS_TOKEN_EXPIRY);
18352
+ localStorage.removeItem(LS_CUSTOMER_KEY);
18353
+ this.customer = undefined;
18354
+ this.token = undefined;
18355
+ this.tokenExpiry = undefined;
18356
+ };
18357
+ return IkasCustomerStore;
18358
+ }());
18359
+
17863
18360
  var IkasOrder = /** @class */ (function () {
17864
18361
  function IkasOrder(data) {
17865
18362
  var _this = this;
@@ -18731,6 +19228,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
18731
19228
  this.type = data.type || exports.IkasThemeComponentPropType.TEXT;
18732
19229
  this.isRequired = data.isRequired || false;
18733
19230
  this.customDataId = data.customDataId || null;
19231
+ this.attributeTypes = data.attributeTypes || null;
18734
19232
  mobx.makeAutoObservable(this);
18735
19233
  }
18736
19234
  return IkasThemeComponentProp;
@@ -18746,6 +19244,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
18746
19244
  IkasThemeComponentPropType["PRODUCT_DETAIL"] = "PRODUCT_DETAIL";
18747
19245
  IkasThemeComponentPropType["PRODUCT_LIST"] = "PRODUCT_LIST";
18748
19246
  IkasThemeComponentPropType["PRODUCT_ATTRIBUTE"] = "PRODUCT_ATTRIBUTE";
19247
+ IkasThemeComponentPropType["PRODUCT_ATTRIBUTE_LIST"] = "PRODUCT_ATTRIBUTE_LIST";
18749
19248
  IkasThemeComponentPropType["BRAND"] = "BRAND";
18750
19249
  IkasThemeComponentPropType["BRAND_LIST"] = "BRAND_LIST";
18751
19250
  IkasThemeComponentPropType["CATEGORY"] = "CATEGORY";
@@ -18759,6 +19258,7 @@ var IkasThemeComponentProp = /** @class */ (function () {
18759
19258
  IkasThemeComponentPropType["OBJECT"] = "OBJECT";
18760
19259
  IkasThemeComponentPropType["STATIC_LIST"] = "STATIC_LIST";
18761
19260
  IkasThemeComponentPropType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
19261
+ IkasThemeComponentPropType["ENUM"] = "ENUM";
18762
19262
  })(exports.IkasThemeComponentPropType || (exports.IkasThemeComponentPropType = {}));
18763
19263
 
18764
19264
  var IkasThemeComponent = /** @class */ (function () {
@@ -18780,6 +19280,8 @@ var IkasThemeCustomData = /** @class */ (function () {
18780
19280
  function IkasThemeCustomData(data) {
18781
19281
  var _this = this;
18782
19282
  if (data === void 0) { data = {}; }
19283
+ var _a;
19284
+ this.customDataId = null;
18783
19285
  this.id = data.id || "";
18784
19286
  this.name = data.name || null;
18785
19287
  this.type = data.type || exports.IkasThemeComponentPropType.TEXT;
@@ -18787,6 +19289,10 @@ var IkasThemeCustomData = /** @class */ (function () {
18787
19289
  this.key = data.key || null;
18788
19290
  this.parent = data.parent || null;
18789
19291
  this.itemCount = data.itemCount || null;
19292
+ this.attributeTypes = data.attributeTypes || null;
19293
+ this.enumOptions =
19294
+ ((_a = data.enumOptions) === null || _a === void 0 ? void 0 : _a.map(function (eo) { return new IkasThemeEnumOption(eo); })) || null;
19295
+ this.customDataId = data.customDataId || null;
18790
19296
  this.isRoot = data.isRoot || false;
18791
19297
  this.nestedData = data.nestedData
18792
19298
  ? data.nestedData.map(function (nd) {
@@ -18803,6 +19309,16 @@ var IkasThemeCustomData = /** @class */ (function () {
18803
19309
  return obj;
18804
19310
  };
18805
19311
  return IkasThemeCustomData;
19312
+ }());
19313
+ var IkasThemeEnumOption = /** @class */ (function () {
19314
+ function IkasThemeEnumOption(data) {
19315
+ if (data === void 0) { data = {}; }
19316
+ this.id = data.id || "";
19317
+ this.displayName = data.displayName || "";
19318
+ this.value = data.value || "";
19319
+ mobx.makeAutoObservable(this);
19320
+ }
19321
+ return IkasThemeEnumOption;
18806
19322
  }());
18807
19323
 
18808
19324
  var IkasThemePageComponent = /** @class */ (function () {
@@ -20045,6 +20561,8 @@ var IkasProductDetail = /** @class */ (function () {
20045
20561
  var newUrl = "/" + metaData.slug + "-" + this.selectedVariantValues
20046
20562
  .map(function (vv) { return vv.slug; })
20047
20563
  .join("-");
20564
+ if (newUrl === window.location.pathname)
20565
+ return;
20048
20566
  var isShallow = process.env.NODE_ENV !== "production";
20049
20567
  (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace(newUrl, undefined, {
20050
20568
  shallow: isShallow,
@@ -20919,6 +21437,15 @@ var CustomerAccountStatusesEnum;
20919
21437
  CustomerAccountStatusesEnum["DISABLED_ACCOUNT"] = "DISABLED_ACCOUNT";
20920
21438
  CustomerAccountStatusesEnum["INVITED_TO_CREATE_ACCOUNT"] = "INVITED_TO_CREATE_ACCOUNT";
20921
21439
  })(CustomerAccountStatusesEnum || (CustomerAccountStatusesEnum = {}));
21440
+ /**
21441
+ * Customer Email Subscription Statuses
21442
+ */
21443
+ var CustomerEmailSubscriptionStatusesEnum;
21444
+ (function (CustomerEmailSubscriptionStatusesEnum) {
21445
+ CustomerEmailSubscriptionStatusesEnum["NOT_SUBSCRIBED"] = "NOT_SUBSCRIBED";
21446
+ CustomerEmailSubscriptionStatusesEnum["PENDING_CONFIRMATION"] = "PENDING_CONFIRMATION";
21447
+ CustomerEmailSubscriptionStatusesEnum["SUBSCRIBED"] = "SUBSCRIBED";
21448
+ })(CustomerEmailSubscriptionStatusesEnum || (CustomerEmailSubscriptionStatusesEnum = {}));
20922
21449
  /**
20923
21450
  * Url Slug Target Type Enum Codes
20924
21451
  */
@@ -20998,6 +21525,22 @@ var OrderStatusEnum;
20998
21525
  OrderStatusEnum["REFUND_REJECTED"] = "REFUND_REJECTED";
20999
21526
  OrderStatusEnum["REFUND_REQUESTED"] = "REFUND_REQUESTED";
21000
21527
  })(OrderStatusEnum || (OrderStatusEnum = {}));
21528
+ /**
21529
+ * Payment Gateway Additional Price Type Enum
21530
+ */
21531
+ var PaymentGatewayAdditionalPriceTypeEnum;
21532
+ (function (PaymentGatewayAdditionalPriceTypeEnum) {
21533
+ PaymentGatewayAdditionalPriceTypeEnum["DECREMENT"] = "DECREMENT";
21534
+ PaymentGatewayAdditionalPriceTypeEnum["INCREMENT"] = "INCREMENT";
21535
+ })(PaymentGatewayAdditionalPriceTypeEnum || (PaymentGatewayAdditionalPriceTypeEnum = {}));
21536
+ /**
21537
+ * Payment Gateway Transaction Fee Type Enum
21538
+ */
21539
+ var PaymentGatewayTransactionFeeTypeEnum;
21540
+ (function (PaymentGatewayTransactionFeeTypeEnum) {
21541
+ PaymentGatewayTransactionFeeTypeEnum["AMOUNT"] = "AMOUNT";
21542
+ PaymentGatewayTransactionFeeTypeEnum["RATIO"] = "RATIO";
21543
+ })(PaymentGatewayTransactionFeeTypeEnum || (PaymentGatewayTransactionFeeTypeEnum = {}));
21001
21544
  /**
21002
21545
  * Payment Method Enum
21003
21546
  */
@@ -21070,6 +21613,12 @@ var ProductFilterTypeEnum;
21070
21613
  ProductFilterTypeEnum["TAG"] = "TAG";
21071
21614
  ProductFilterTypeEnum["VARIANT_TYPE"] = "VARIANT_TYPE";
21072
21615
  })(ProductFilterTypeEnum || (ProductFilterTypeEnum = {}));
21616
+ var ProductSearchShowStockOptionEnum;
21617
+ (function (ProductSearchShowStockOptionEnum) {
21618
+ ProductSearchShowStockOptionEnum["HIDE_OUT_OF_STOCK"] = "HIDE_OUT_OF_STOCK";
21619
+ ProductSearchShowStockOptionEnum["SHOW_ALL"] = "SHOW_ALL";
21620
+ ProductSearchShowStockOptionEnum["SHOW_OUT_OF_STOCK_AT_END"] = "SHOW_OUT_OF_STOCK_AT_END";
21621
+ })(ProductSearchShowStockOptionEnum || (ProductSearchShowStockOptionEnum = {}));
21073
21622
  /**
21074
21623
  * Shipping Method Enum
21075
21624
  */
@@ -21172,6 +21721,7 @@ var IkasProductList = /** @class */ (function () {
21172
21721
  var _this = this;
21173
21722
  this.filters = null;
21174
21723
  this._filterCategories = null;
21724
+ this._infiniteScrollPage = null;
21175
21725
  this._initialized = false;
21176
21726
  this._minPage = null;
21177
21727
  this._filterBrandId = null;
@@ -21182,12 +21732,12 @@ var IkasProductList = /** @class */ (function () {
21182
21732
  this.router = null;
21183
21733
  this.applyFilters = function () { return __awaiter(_this, void 0, void 0, function () {
21184
21734
  var resultsSet;
21185
- var _a, _b;
21186
- return __generator(this, function (_c) {
21187
- switch (_c.label) {
21735
+ var _a;
21736
+ return __generator(this, function (_b) {
21737
+ switch (_b.label) {
21188
21738
  case 0: return [4 /*yield*/, this.getInitial()];
21189
21739
  case 1:
21190
- resultsSet = _c.sent();
21740
+ resultsSet = _b.sent();
21191
21741
  if (![
21192
21742
  exports.IkasThemePageType.CATEGORY,
21193
21743
  exports.IkasThemePageType.BRAND,
@@ -21195,39 +21745,31 @@ var IkasProductList = /** @class */ (function () {
21195
21745
  ].includes(this._pageType))
21196
21746
  return [2 /*return*/];
21197
21747
  // Change url params
21198
- if (resultsSet && this.isBrowser()) {
21199
- if (this.isFiltered) {
21200
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (this.filterQueryParams ? "?" + this.filterQueryParams : ""), undefined, { shallow: true });
21201
- }
21202
- else {
21203
- (_b = this.router) === null || _b === void 0 ? void 0 : _b.replace("" + location.pathname, undefined, {
21204
- shallow: true,
21205
- });
21206
- }
21748
+ if (resultsSet && this.isBrowser() && !this.isSearch) {
21749
+ (_a = this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (this.filterQueryParams ? "?" + this.filterQueryParams : ""), undefined, { shallow: true });
21207
21750
  }
21208
21751
  return [2 /*return*/];
21209
21752
  }
21210
21753
  });
21211
21754
  }); };
21212
21755
  this.getInitial = function (queryParams, isInfiteScrollReturn) { return __awaiter(_this, void 0, void 0, function () {
21213
- var fetchRequestTime, page, limit, response_1, data, err_1;
21214
- var _a;
21215
- return __generator(this, function (_b) {
21216
- switch (_b.label) {
21756
+ var fetchRequestTime, page, limit, productIdList, lastViewedProducts, response_1, data, idList, err_1;
21757
+ return __generator(this, function (_a) {
21758
+ switch (_a.label) {
21217
21759
  case 0:
21218
21760
  this._isLoading = true;
21219
21761
  fetchRequestTime = Date.now();
21220
21762
  this._fetchRequestTime = fetchRequestTime;
21221
- _b.label = 1;
21763
+ _a.label = 1;
21222
21764
  case 1:
21223
- _b.trys.push([1, 5, 6, 7]);
21765
+ _a.trys.push([1, 12, 13, 14]);
21224
21766
  page = isInfiteScrollReturn ? this._page : 1;
21225
21767
  limit = this._limit;
21226
21768
  if (!(this.isFilterable && !this.filters)) return [3 /*break*/, 3];
21227
21769
  return [4 /*yield*/, this.getFilters()];
21228
21770
  case 2:
21229
- _b.sent();
21230
- _b.label = 3;
21771
+ _a.sent();
21772
+ _a.label = 3;
21231
21773
  case 3:
21232
21774
  this.applyQueryParamFilters(queryParams);
21233
21775
  if (this.isSearch && !this.hasAppliedfilter) {
@@ -21238,27 +21780,48 @@ var IkasProductList = /** @class */ (function () {
21238
21780
  this._initialized = true;
21239
21781
  return [2 /*return*/, true];
21240
21782
  }
21241
- if (this.isStatic) {
21242
- page = undefined;
21243
- limit = undefined;
21244
- }
21245
- else if (this.isDiscounted) {
21246
- page = 1;
21247
- limit = 10;
21248
- }
21249
- else if (this.isRecommended) {
21250
- page = 1;
21251
- limit = 10;
21252
- }
21253
- return [4 /*yield*/, this.searchProducts(page || 1, limit || 10)];
21783
+ productIdList = void 0;
21784
+ if (!this.isStatic) return [3 /*break*/, 4];
21785
+ page = undefined;
21786
+ limit = undefined;
21787
+ return [3 /*break*/, 10];
21254
21788
  case 4:
21255
- response_1 = _b.sent();
21789
+ if (!this.isDiscounted) return [3 /*break*/, 5];
21790
+ page = 1;
21791
+ limit = 10;
21792
+ return [3 /*break*/, 10];
21793
+ case 5:
21794
+ if (!this.isRecommended) return [3 /*break*/, 6];
21795
+ page = 1;
21796
+ limit = 10;
21797
+ return [3 /*break*/, 10];
21798
+ case 6:
21799
+ if (!this.isLastViewed) return [3 /*break*/, 10];
21800
+ if (!this.isBrowser()) return [3 /*break*/, 9];
21801
+ return [4 /*yield*/, this.waitForCustomerStoreInit()];
21802
+ case 7:
21803
+ _a.sent();
21804
+ return [4 /*yield*/, IkasStorefrontConfig.store.customerStore.getLastViewedProducts()];
21805
+ case 8:
21806
+ lastViewedProducts = _a.sent();
21807
+ if (lastViewedProducts && lastViewedProducts.length) {
21808
+ productIdList = lastViewedProducts.map(function (p) { return p.productId; });
21809
+ }
21810
+ return [3 /*break*/, 10];
21811
+ case 9: return [2 /*return*/];
21812
+ case 10: return [4 /*yield*/, this.searchProducts(page || 1, limit || 10, productIdList)];
21813
+ case 11:
21814
+ response_1 = _a.sent();
21256
21815
  if (!response_1 || this._fetchRequestTime !== fetchRequestTime)
21257
21816
  return [2 /*return*/];
21258
21817
  data = [];
21259
- if (this.isStatic) {
21818
+ if (this.isStatic || this.isLastViewed) {
21819
+ idList = this.isStatic
21820
+ ? this._productListPropValue.productIds
21821
+ : //@ts-ignore
21822
+ IkasStorefrontConfig.store.customerStore._lastViewedProducts;
21260
21823
  data =
21261
- ((_a = this._productListPropValue.productIds) === null || _a === void 0 ? void 0 : _a.map(function (pID) {
21824
+ (idList === null || idList === void 0 ? void 0 : idList.map(function (pID) {
21262
21825
  var product = response_1.data.find(function (p) { return p.id === pID.productId; });
21263
21826
  var variant = product === null || product === void 0 ? void 0 : product.variants.find(function (v) { return v.id === pID.variantId; });
21264
21827
  if (product && variant)
@@ -21276,16 +21839,18 @@ var IkasProductList = /** @class */ (function () {
21276
21839
  this._initialized = true;
21277
21840
  this._page = page || 1;
21278
21841
  this._minPage = this.page;
21842
+ if (!isInfiteScrollReturn)
21843
+ this._infiniteScrollPage = null;
21279
21844
  return [2 /*return*/, true];
21280
- case 5:
21281
- err_1 = _b.sent();
21845
+ case 12:
21846
+ err_1 = _a.sent();
21282
21847
  console.log(err_1);
21283
- return [3 /*break*/, 7];
21284
- case 6:
21848
+ return [3 /*break*/, 14];
21849
+ case 13:
21285
21850
  if (fetchRequestTime === this._fetchRequestTime)
21286
21851
  this._isLoading = false;
21287
21852
  return [7 /*endfinally*/];
21288
- case 7: return [2 /*return*/];
21853
+ case 14: return [2 /*return*/];
21289
21854
  }
21290
21855
  });
21291
21856
  }); };
@@ -21297,6 +21862,7 @@ var IkasProductList = /** @class */ (function () {
21297
21862
  if (this.isStatic ||
21298
21863
  this.isDiscounted ||
21299
21864
  this.isRecommended ||
21865
+ this.isLastViewed ||
21300
21866
  this._isLoading ||
21301
21867
  !this.hasPrev)
21302
21868
  return [2 /*return*/];
@@ -21336,6 +21902,7 @@ var IkasProductList = /** @class */ (function () {
21336
21902
  if (this.isStatic ||
21337
21903
  this.isDiscounted ||
21338
21904
  this.isRecommended ||
21905
+ this.isLastViewed ||
21339
21906
  this._isLoading ||
21340
21907
  !this.hasNext)
21341
21908
  return [2 /*return*/];
@@ -21374,7 +21941,8 @@ var IkasProductList = /** @class */ (function () {
21374
21941
  if (this._isLoading ||
21375
21942
  this.isStatic ||
21376
21943
  this.isDiscounted ||
21377
- this.isRecommended)
21944
+ this.isRecommended ||
21945
+ this.isLastViewed)
21378
21946
  return [2 /*return*/];
21379
21947
  this._isLoading = true;
21380
21948
  _a.label = 1;
@@ -21404,6 +21972,13 @@ var IkasProductList = /** @class */ (function () {
21404
21972
  }
21405
21973
  });
21406
21974
  }); };
21975
+ this.setVisibleInfiniteScrollPage = function (page) {
21976
+ var _a;
21977
+ if (_this._infiniteScrollPage === page)
21978
+ return;
21979
+ _this._infiniteScrollPage = page;
21980
+ (_a = _this.router) === null || _a === void 0 ? void 0 : _a.replace("" + location.pathname + (_this.filterQueryParams ? "?" + _this.filterQueryParams : ""), undefined, { shallow: true });
21981
+ };
21407
21982
  this.searchDebouncer = debounce_1(function () {
21408
21983
  _this.applyFilters();
21409
21984
  }, 100);
@@ -21444,7 +22019,7 @@ var IkasProductList = /** @class */ (function () {
21444
22019
  this.router = router;
21445
22020
  mobx.makeAutoObservable(this);
21446
22021
  if (this.isBrowser()) {
21447
- this.checkRestoreInfiniteScroll();
22022
+ this.restoreInfiniteScrollPage();
21448
22023
  if (location.search &&
21449
22024
  (this.isFilterable || this._type === exports.IkasProductListType.SEARCH)) {
21450
22025
  var queryParams = this.getQueryParams();
@@ -21453,6 +22028,9 @@ var IkasProductList = /** @class */ (function () {
21453
22028
  else if (this._page > 1) {
21454
22029
  this.getInitial(undefined, true);
21455
22030
  }
22031
+ else if (this.isLastViewed) {
22032
+ this.getInitial();
22033
+ }
21456
22034
  }
21457
22035
  }
21458
22036
  Object.defineProperty(IkasProductList.prototype, "sort", {
@@ -21535,11 +22113,11 @@ var IkasProductList = /** @class */ (function () {
21535
22113
  });
21536
22114
  Object.defineProperty(IkasProductList.prototype, "isFiltered", {
21537
22115
  get: function () {
21538
- var _a;
22116
+ var _a, _b;
21539
22117
  return (((_a = this.filters) === null || _a === void 0 ? void 0 : _a.some(function (f) { return !!f.valueList.length; })) ||
21540
22118
  !!this._searchKeyword ||
21541
22119
  (this._pageType !== exports.IkasThemePageType.CATEGORY &&
21542
- !!this._filterCategoryId));
22120
+ (!!this._filterCategoryId || ((_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.some(function (fc) { return fc.isSelected; })))));
21543
22121
  },
21544
22122
  enumerable: false,
21545
22123
  configurable: true
@@ -21565,6 +22143,13 @@ var IkasProductList = /** @class */ (function () {
21565
22143
  enumerable: false,
21566
22144
  configurable: true
21567
22145
  });
22146
+ Object.defineProperty(IkasProductList.prototype, "isLastViewed", {
22147
+ get: function () {
22148
+ return this._type === exports.IkasProductListType.LAST_VIEWED;
22149
+ },
22150
+ enumerable: false,
22151
+ configurable: true
22152
+ });
21568
22153
  Object.defineProperty(IkasProductList.prototype, "isSearch", {
21569
22154
  get: function () {
21570
22155
  return this._type === exports.IkasProductListType.SEARCH;
@@ -21603,18 +22188,27 @@ var IkasProductList = /** @class */ (function () {
21603
22188
  Object.defineProperty(IkasProductList.prototype, "filterQueryParams", {
21604
22189
  get: function () {
21605
22190
  var _this = this;
21606
- var _a, _b, _c;
22191
+ var _a, _b, _c, _d;
21607
22192
  var queryParams = {};
21608
22193
  (_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (f) {
21609
- queryParams[f.key] = f.keyList;
22194
+ if (f.keyList.length)
22195
+ queryParams[f.key] = f.keyList;
21610
22196
  });
21611
22197
  if (this._searchKeyword)
21612
22198
  queryParams.s = this._searchKeyword;
21613
- if (this._pageType !== exports.IkasThemePageType.CATEGORY &&
21614
- this._filterCategoryId) {
21615
- var slug = (_c = (_b = this.filterCategories) === null || _b === void 0 ? void 0 : _b.find(function (fc) { return fc.id === _this._filterCategoryId; })) === null || _c === void 0 ? void 0 : _c.slug;
21616
- if (slug)
21617
- queryParams.c = slug;
22199
+ if (this._infiniteScrollPage)
22200
+ queryParams.page = this._infiniteScrollPage;
22201
+ if (this._pageType !== exports.IkasThemePageType.CATEGORY) {
22202
+ var selectedCategories = (_b = this.filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; });
22203
+ var hasSelectedCategory = !!(selectedCategories === null || selectedCategories === void 0 ? void 0 : selectedCategories.length);
22204
+ if (hasSelectedCategory) {
22205
+ queryParams.c = selectedCategories === null || selectedCategories === void 0 ? void 0 : selectedCategories.map(function (sc) { return sc.slug; });
22206
+ }
22207
+ else if (this._filterCategoryId) {
22208
+ var slug = (_d = (_c = this.filterCategories) === null || _c === void 0 ? void 0 : _c.find(function (fc) { return fc.id === _this._filterCategoryId; })) === null || _d === void 0 ? void 0 : _d.slug;
22209
+ if (slug)
22210
+ queryParams.c = slug;
22211
+ }
21618
22212
  }
21619
22213
  return queryString.stringify(queryParams, { arrayFormat: "comma" });
21620
22214
  },
@@ -21679,12 +22273,12 @@ var IkasProductList = /** @class */ (function () {
21679
22273
  type: type,
21680
22274
  };
21681
22275
  };
21682
- IkasProductList.prototype.searchProducts = function (page, limit) {
21683
- var _a, _b;
22276
+ IkasProductList.prototype.searchProducts = function (page, limit, productIdList) {
22277
+ var _a, _b, _c;
21684
22278
  return __awaiter(this, void 0, void 0, function () {
21685
- var filterList;
21686
- return __generator(this, function (_c) {
21687
- switch (_c.label) {
22279
+ var filterList, selectedCategoryIds;
22280
+ return __generator(this, function (_d) {
22281
+ switch (_d.label) {
21688
22282
  case 0:
21689
22283
  filterList = [];
21690
22284
  if (this._filterBrandId) {
@@ -21703,40 +22297,51 @@ var IkasProductList = /** @class */ (function () {
21703
22297
  }));
21704
22298
  }
21705
22299
  });
22300
+ selectedCategoryIds = (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.filter(function (fc) { return fc.isSelected; }).map(function (fc) { return fc.id; });
21706
22301
  return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
21707
22302
  page: page,
21708
22303
  perPage: limit,
21709
22304
  productIdList: this.isStatic
21710
- ? (_b = this._productListPropValue.productIds) === null || _b === void 0 ? void 0 : _b.map(function (p) { return p.productId; }) : undefined,
22305
+ ? (_c = this._productListPropValue.productIds) === null || _c === void 0 ? void 0 : _c.map(function (p) { return p.productId; }) : productIdList,
21711
22306
  filterList: filterList,
21712
22307
  brandId: this._pageType === exports.IkasThemePageType.BRAND &&
21713
22308
  this._type !== exports.IkasProductListType.SEARCH
21714
22309
  ? this._filterBrandId
21715
22310
  : undefined,
21716
- categoryIdList: this._filterCategoryId
21717
- ? [this._filterCategoryId]
21718
- : undefined,
22311
+ categoryIdList: selectedCategoryIds && selectedCategoryIds.length
22312
+ ? selectedCategoryIds
22313
+ : this._filterCategoryId
22314
+ ? [this._filterCategoryId]
22315
+ : undefined,
21719
22316
  priceListId: IkasStorefrontConfig.priceListId,
21720
22317
  salesChannelId: IkasStorefrontConfig.salesChannelId,
21721
22318
  query: this._searchKeyword,
21722
22319
  order: [this.getSortParams()],
21723
22320
  })];
21724
- case 1: return [2 /*return*/, _c.sent()];
22321
+ case 1: return [2 /*return*/, _d.sent()];
21725
22322
  }
21726
22323
  });
21727
22324
  });
21728
22325
  };
21729
22326
  IkasProductList.prototype.getFilters = function () {
22327
+ var _a;
21730
22328
  return __awaiter(this, void 0, void 0, function () {
21731
- var getFiltersResponse;
22329
+ var getFiltersResponse, filterCategory;
21732
22330
  var _this = this;
21733
- return __generator(this, function (_a) {
21734
- switch (_a.label) {
22331
+ return __generator(this, function (_b) {
22332
+ switch (_b.label) {
21735
22333
  case 0: return [4 /*yield*/, IkasProductSearchAPI.getProductFilterData(this._filterCategoryId ? this._filterCategoryId : undefined)];
21736
22334
  case 1:
21737
- getFiltersResponse = _a.sent();
22335
+ getFiltersResponse = _b.sent();
21738
22336
  this.filters = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.filters.map(function (f) { return new IkasProductFilter(f, _this); });
21739
22337
  this._filterCategories = getFiltersResponse === null || getFiltersResponse === void 0 ? void 0 : getFiltersResponse.categories;
22338
+ if (this.pageType !== exports.IkasThemePageType.CATEGORY &&
22339
+ this._filterCategoryId) {
22340
+ filterCategory = (_a = this._filterCategories) === null || _a === void 0 ? void 0 : _a.find(function (fc) { return fc.id === _this._filterCategoryId; });
22341
+ //@ts-ignore
22342
+ if (filterCategory)
22343
+ filterCategory._isSelected = true;
22344
+ }
21740
22345
  if (this.filters)
21741
22346
  this.filters.sort(function (f1, f2) { return (f1.order > f2.order ? 1 : -1); });
21742
22347
  return [2 /*return*/];
@@ -21759,12 +22364,13 @@ var IkasProductList = /** @class */ (function () {
21759
22364
  if (querySearch)
21760
22365
  this._searchKeyword = querySearch;
21761
22366
  if (this._pageType !== exports.IkasThemePageType.CATEGORY) {
21762
- var queryCategory_1 = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("c");
21763
- if (queryCategory_1) {
21764
- var filterCategory = (_a = this.filterCategories) === null || _a === void 0 ? void 0 : _a.find(function (fc) { return fc.slug === queryCategory_1; });
21765
- if (filterCategory) {
21766
- this._filterCategoryId = filterCategory.id;
21767
- }
22367
+ var queryCategory = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("c");
22368
+ var categorySlugs_1 = queryCategory === null || queryCategory === void 0 ? void 0 : queryCategory.split(",");
22369
+ if (categorySlugs_1 && categorySlugs_1.length) {
22370
+ (_a = this.filterCategories) === null || _a === void 0 ? void 0 : _a.forEach(function (fc) {
22371
+ //@ts-ignore
22372
+ fc._isSelected = categorySlugs_1.some(function (slug) { return slug === fc.slug; });
22373
+ });
21768
22374
  }
21769
22375
  }
21770
22376
  }
@@ -21810,11 +22416,13 @@ var IkasProductList = /** @class */ (function () {
21810
22416
  }
21811
22417
  };
21812
22418
  IkasProductList.prototype.clearFilters = function () {
21813
- var _a;
22419
+ var _a, _b;
21814
22420
  (_a = this.filters) === null || _a === void 0 ? void 0 : _a.forEach(function (filter) { return filter.clear(); });
21815
22421
  this._searchKeyword = "";
21816
22422
  if (this._pageType !== exports.IkasThemePageType.CATEGORY) {
21817
22423
  this._filterCategoryId = undefined;
22424
+ //@ts-ignore
22425
+ (_b = this._filterCategories) === null || _b === void 0 ? void 0 : _b.forEach(function (fc) { return (fc._isSelected = false); });
21818
22426
  }
21819
22427
  this.applyFilters();
21820
22428
  };
@@ -21833,32 +22441,32 @@ var IkasProductList = /** @class */ (function () {
21833
22441
  });
21834
22442
  };
21835
22443
  IkasProductList.prototype.onFilterCategoryClick = function (filterCategory, disableRoute) {
21836
- var _a;
22444
+ var _a, _b;
21837
22445
  if (disableRoute === void 0) { disableRoute = false; }
21838
22446
  return __awaiter(this, void 0, void 0, function () {
21839
- return __generator(this, function (_b) {
21840
- switch (_b.label) {
22447
+ return __generator(this, function (_c) {
22448
+ switch (_c.label) {
21841
22449
  case 0:
21842
22450
  if (!disableRoute) return [3 /*break*/, 2];
21843
- this._filterCategoryId = filterCategory.id;
22451
+ (_a = this._filterCategories) === null || _a === void 0 ? void 0 : _a.forEach(function (fc) {
22452
+ if (fc.id === filterCategory.id) {
22453
+ //@ts-ignore
22454
+ fc._isSelected = !fc.isSelected;
22455
+ }
22456
+ });
21844
22457
  return [4 /*yield*/, this.applyFilters()];
21845
22458
  case 1:
21846
- _b.sent();
22459
+ _c.sent();
21847
22460
  return [3 /*break*/, 3];
21848
22461
  case 2:
21849
- (_a = this.router) === null || _a === void 0 ? void 0 : _a.push(filterCategory.href +
22462
+ (_b = this.router) === null || _b === void 0 ? void 0 : _b.push(filterCategory.href +
21850
22463
  (this.filterQueryParams ? "?" + this.filterQueryParams : ""));
21851
- _b.label = 3;
22464
+ _c.label = 3;
21852
22465
  case 3: return [2 /*return*/];
21853
22466
  }
21854
22467
  });
21855
22468
  });
21856
22469
  };
21857
- IkasProductList.prototype.setVisibleInfiniteScrollPage = function (page) {
21858
- //@ts-ignore
21859
- var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
21860
- infiniteScrollPages[this._productListPropValue.id] = page;
21861
- };
21862
22470
  IkasProductList.prototype.toJSON = function () {
21863
22471
  return {
21864
22472
  data: this.data,
@@ -21879,22 +22487,17 @@ var IkasProductList = /** @class */ (function () {
21879
22487
  productListPropValue: this._productListPropValue,
21880
22488
  };
21881
22489
  };
21882
- IkasProductList.prototype.checkRestoreInfiniteScroll = function () {
21883
- //@ts-ignore
21884
- var infiniteScrollPages = IkasStorefrontConfig.store.infiniteScrollPages;
21885
- var page = infiniteScrollPages[this._productListPropValue.id];
21886
- if (page) {
21887
- if (this.hasForwardRoute()) {
22490
+ IkasProductList.prototype.restoreInfiniteScrollPage = function () {
22491
+ var queryParams = this.getQueryParams();
22492
+ var pageStr = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get("page");
22493
+ if (pageStr) {
22494
+ var page = parseInt(pageStr);
22495
+ if (!isNaN(page)) {
21888
22496
  this._page = page;
21889
- }
21890
- else {
21891
- delete infiniteScrollPages[this._productListPropValue.id];
22497
+ this._infiniteScrollPage = page;
21892
22498
  }
21893
22499
  }
21894
22500
  };
21895
- IkasProductList.prototype.hasForwardRoute = function () {
21896
- return this.isBrowser() && !!window.history.forward;
21897
- };
21898
22501
  IkasProductList.prototype.getQueryParams = function () {
21899
22502
  if (!this.isBrowser())
21900
22503
  return;
@@ -21903,6 +22506,16 @@ var IkasProductList = /** @class */ (function () {
21903
22506
  IkasProductList.prototype.isBrowser = function () {
21904
22507
  return typeof window !== "undefined";
21905
22508
  };
22509
+ IkasProductList.prototype.waitForCustomerStoreInit = function () {
22510
+ return new Promise(function (resolve) {
22511
+ var interval = setInterval(function () {
22512
+ if (IkasStorefrontConfig.store.customerStore.initialized) {
22513
+ clearInterval(interval);
22514
+ resolve(null);
22515
+ }
22516
+ }, 1000);
22517
+ });
22518
+ };
21906
22519
  return IkasProductList;
21907
22520
  }());
21908
22521
  (function (IkasProductListType) {
@@ -21912,6 +22525,7 @@ var IkasProductList = /** @class */ (function () {
21912
22525
  IkasProductListType["RECOMMENDED"] = "RECOMMENDED";
21913
22526
  IkasProductListType["CATEGORY"] = "CATEGORY";
21914
22527
  IkasProductListType["SEARCH"] = "SEARCH";
22528
+ IkasProductListType["LAST_VIEWED"] = "LAST_VIEWED";
21915
22529
  })(exports.IkasProductListType || (exports.IkasProductListType = {}));
21916
22530
  (function (IkasProductListSortType) {
21917
22531
  // A_Z = "A_Z",
@@ -24100,74 +24714,99 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
24100
24714
  IkasLinkPropValueProvider.prototype.getNavigationLink = function (linkPropValue) {
24101
24715
  var _a, _b;
24102
24716
  return __awaiter(this, void 0, void 0, function () {
24103
- var navigationLink, themePage, metaDataList, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
24717
+ var navigationLink, themePage, metaDataList, metaDataList, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
24104
24718
  var _this = this;
24105
24719
  return __generator(this, function (_d) {
24106
24720
  switch (_d.label) {
24107
24721
  case 0:
24108
- if (!(linkPropValue.linkType === exports.IkasLinkType.PAGE)) return [3 /*break*/, 12];
24722
+ if (!(linkPropValue.linkType === exports.IkasLinkType.PAGE)) return [3 /*break*/, 18];
24109
24723
  if (!(linkPropValue.pageType === exports.IkasThemePageType.INDEX)) return [3 /*break*/, 1];
24110
24724
  navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
24111
- return [3 /*break*/, 11];
24725
+ return [3 /*break*/, 17];
24112
24726
  case 1:
24113
24727
  if (!(linkPropValue.pageType === exports.IkasThemePageType.ACCOUNT)) return [3 /*break*/, 2];
24114
24728
  navigationLink = new IkasNavigationLink("/account/info", linkPropValue.label || "", []);
24115
- return [3 /*break*/, 11];
24729
+ return [3 /*break*/, 17];
24116
24730
  case 2:
24117
24731
  if (!(linkPropValue.pageType === exports.IkasThemePageType.ADDRESSES)) return [3 /*break*/, 3];
24118
24732
  navigationLink = new IkasNavigationLink("/account/addresses", linkPropValue.label || "", []);
24119
- return [3 /*break*/, 11];
24733
+ return [3 /*break*/, 17];
24120
24734
  case 3:
24121
24735
  if (!(linkPropValue.pageType === exports.IkasThemePageType.ORDERS)) return [3 /*break*/, 4];
24122
24736
  navigationLink = new IkasNavigationLink("/account/orders", linkPropValue.label || "", []);
24123
- return [3 /*break*/, 11];
24737
+ return [3 /*break*/, 17];
24124
24738
  case 4:
24125
- if (!(linkPropValue.pageType === exports.IkasThemePageType.LOGIN)) return [3 /*break*/, 5];
24126
- navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
24127
- return [3 /*break*/, 11];
24739
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.FAVORITE_PRODUCTS)) return [3 /*break*/, 5];
24740
+ navigationLink = new IkasNavigationLink("/account/favorite-products", linkPropValue.label || "", []);
24741
+ return [3 /*break*/, 17];
24128
24742
  case 5:
24129
- if (!(linkPropValue.pageType === exports.IkasThemePageType.REGISTER)) return [3 /*break*/, 6];
24130
- navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
24131
- return [3 /*break*/, 11];
24743
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.LOGIN)) return [3 /*break*/, 6];
24744
+ navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
24745
+ return [3 /*break*/, 17];
24132
24746
  case 6:
24133
- if (!(linkPropValue.pageType === exports.IkasThemePageType.FORGOT_PASSWORD)) return [3 /*break*/, 7];
24134
- navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
24135
- return [3 /*break*/, 11];
24747
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.REGISTER)) return [3 /*break*/, 7];
24748
+ navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
24749
+ return [3 /*break*/, 17];
24136
24750
  case 7:
24137
- if (!(linkPropValue.pageType === exports.IkasThemePageType.RECOVER_PASSWORD)) return [3 /*break*/, 8];
24138
- navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
24139
- return [3 /*break*/, 11];
24751
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.FORGOT_PASSWORD)) return [3 /*break*/, 8];
24752
+ navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
24753
+ return [3 /*break*/, 17];
24140
24754
  case 8:
24141
- if (!(linkPropValue.pageType === exports.IkasThemePageType.CUSTOM)) return [3 /*break*/, 9];
24755
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.RECOVER_PASSWORD)) return [3 /*break*/, 9];
24756
+ navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
24757
+ return [3 /*break*/, 17];
24758
+ case 9:
24759
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.BLOG_INDEX)) return [3 /*break*/, 10];
24760
+ navigationLink = new IkasNavigationLink("/blog", linkPropValue.label || "", []);
24761
+ return [3 /*break*/, 17];
24762
+ case 10:
24763
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.CART)) return [3 /*break*/, 11];
24764
+ navigationLink = new IkasNavigationLink("/cart", linkPropValue.label || "", []);
24765
+ return [3 /*break*/, 17];
24766
+ case 11:
24767
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.SEARCH)) return [3 /*break*/, 12];
24768
+ navigationLink = new IkasNavigationLink("/search", linkPropValue.label || "", []);
24769
+ return [3 /*break*/, 17];
24770
+ case 12:
24771
+ if (!(linkPropValue.pageType === exports.IkasThemePageType.CUSTOM)) return [3 /*break*/, 13];
24142
24772
  themePage = this.theme.pages.find(function (p) { return p.id === linkPropValue.pageId; });
24143
24773
  if (themePage) {
24144
24774
  navigationLink = new IkasNavigationLink("/pages/" + themePage.slug, linkPropValue.label || "", []);
24145
24775
  }
24146
- return [3 /*break*/, 11];
24147
- case 9:
24776
+ return [3 /*break*/, 17];
24777
+ case 13:
24148
24778
  if (![
24149
24779
  exports.IkasThemePageType.PRODUCT,
24150
24780
  exports.IkasThemePageType.BRAND,
24151
24781
  exports.IkasThemePageType.CATEGORY,
24152
- ].includes(linkPropValue.pageType)) return [3 /*break*/, 11];
24782
+ ].includes(linkPropValue.pageType)) return [3 /*break*/, 15];
24153
24783
  return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, linkPropValue.itemId || undefined)];
24154
- case 10:
24784
+ case 14:
24155
24785
  metaDataList = _d.sent();
24156
24786
  if (metaDataList.length) {
24157
24787
  navigationLink = new IkasNavigationLink("/" + metaDataList[0].slug, linkPropValue.label || "", []);
24158
24788
  }
24159
- _d.label = 11;
24160
- case 11: return [3 /*break*/, 13];
24161
- case 12:
24789
+ return [3 /*break*/, 17];
24790
+ case 15:
24791
+ if (![exports.IkasThemePageType.BLOG, exports.IkasThemePageType.BLOG_CATEGORY].includes(linkPropValue.pageType)) return [3 /*break*/, 17];
24792
+ return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(undefined, linkPropValue.itemId || undefined)];
24793
+ case 16:
24794
+ metaDataList = _d.sent();
24795
+ if (metaDataList.length) {
24796
+ navigationLink = new IkasNavigationLink("/blog/" + metaDataList[0].slug, linkPropValue.label || "", []);
24797
+ }
24798
+ _d.label = 17;
24799
+ case 17: return [3 /*break*/, 19];
24800
+ case 18:
24162
24801
  if (linkPropValue.linkType === exports.IkasLinkType.EXTERNAL) {
24163
24802
  navigationLink = new IkasNavigationLink(linkPropValue.externalLink || "", linkPropValue.label || "", [], true);
24164
24803
  }
24165
- _d.label = 13;
24166
- case 13:
24167
- if (!navigationLink) return [3 /*break*/, 15];
24804
+ _d.label = 19;
24805
+ case 19:
24806
+ if (!navigationLink) return [3 /*break*/, 21];
24168
24807
  _c = navigationLink;
24169
24808
  return [4 /*yield*/, Promise.all(linkPropValue.subLinks.map(function (sl) { return _this.getNavigationLink(sl); }))];
24170
- case 14:
24809
+ case 20:
24171
24810
  _c.subLinks = _d.sent();
24172
24811
  // ADD HASH LINK
24173
24812
  if (linkPropValue.pageComponentId && linkPropValue.pageId) {
@@ -24184,7 +24823,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
24184
24823
  }
24185
24824
  }
24186
24825
  return [2 /*return*/, navigationLink];
24187
- case 15: return [2 /*return*/, new IkasNavigationLink("", "", [])];
24826
+ case 21: return [2 /*return*/, new IkasNavigationLink("", "", [])];
24188
24827
  }
24189
24828
  });
24190
24829
  });
@@ -24250,13 +24889,13 @@ var IkasColorPropValueProvider = /** @class */ (function () {
24250
24889
  }());
24251
24890
 
24252
24891
  var IkasBooleanPropValueProvider = /** @class */ (function () {
24253
- function IkasBooleanPropValueProvider(textPropValue) {
24254
- this.bool = textPropValue;
24892
+ function IkasBooleanPropValueProvider(boolPropValue) {
24893
+ this.bool = boolPropValue;
24255
24894
  }
24256
24895
  IkasBooleanPropValueProvider.prototype.getValue = function () {
24257
24896
  return __awaiter(this, void 0, void 0, function () {
24258
24897
  return __generator(this, function (_a) {
24259
- return [2 /*return*/, this.bool];
24898
+ return [2 /*return*/, this.bool || false];
24260
24899
  });
24261
24900
  });
24262
24901
  };
@@ -24427,130 +25066,276 @@ var IkasBlogListPropValueProvider = /** @class */ (function () {
24427
25066
  return IkasBlogListPropValueProvider;
24428
25067
  }());
24429
25068
 
24430
- var IkasCustomPropValueProvider = /** @class */ (function () {
24431
- function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
24432
- this.value = value;
24433
- this.customData = customData;
24434
- this.theme = theme;
24435
- this.pageType = pageType;
24436
- this.pageDataProvider = pageDataProvider;
25069
+ var IkasAttributePropValueProvider = /** @class */ (function () {
25070
+ function IkasAttributePropValueProvider(prop, pageSpecificData) {
25071
+ this.attributePropValue = prop;
24437
25072
  this.pageSpecificData = pageSpecificData;
24438
- this.pageParams = pageParams;
24439
25073
  }
24440
- IkasCustomPropValueProvider.prototype.getValue = function () {
25074
+ IkasAttributePropValueProvider.prototype.getValue = function () {
25075
+ var _a;
24441
25076
  return __awaiter(this, void 0, void 0, function () {
24442
- var customDataValue, _a;
25077
+ var productDetail, productSearchResponse, productList, product, variant;
25078
+ var _this = this;
24443
25079
  return __generator(this, function (_b) {
24444
25080
  switch (_b.label) {
24445
25081
  case 0:
24446
- if (this.value === undefined || this.value === null)
24447
- return [2 /*return*/];
24448
- _b.label = 1;
24449
- case 1:
24450
- _b.trys.push([1, 40, , 41]);
24451
- _a = this.customData.type;
24452
- switch (_a) {
24453
- case exports.IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
24454
- case exports.IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 4];
24455
- case exports.IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 6];
24456
- case exports.IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 8];
24457
- case exports.IkasThemeComponentPropType.BRAND: return [3 /*break*/, 10];
24458
- case exports.IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
24459
- case exports.IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 14];
24460
- case exports.IkasThemeComponentPropType.COLOR: return [3 /*break*/, 16];
24461
- case exports.IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 18];
24462
- case exports.IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 20];
24463
- case exports.IkasThemeComponentPropType.LINK: return [3 /*break*/, 22];
24464
- case exports.IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 22];
24465
- case exports.IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 24];
24466
- case exports.IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 26];
24467
- case exports.IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 28];
24468
- case exports.IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 30];
24469
- case exports.IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 30];
24470
- case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 32];
24471
- case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 32];
24472
- case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 34];
24473
- case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 36];
24474
- }
24475
- return [3 /*break*/, 38];
25082
+ if (!this.attributePropValue.attributeId ||
25083
+ (this.attributePropValue.usePageData && !this.pageSpecificData) ||
25084
+ (!this.attributePropValue.usePageData &&
25085
+ !this.attributePropValue.variantId)) {
25086
+ return [2 /*return*/, []];
25087
+ }
25088
+ if (!((_a = this.attributePropValue) === null || _a === void 0 ? void 0 : _a.usePageData)) return [3 /*break*/, 1];
25089
+ productDetail = this.pageSpecificData;
25090
+ return [3 /*break*/, 3];
25091
+ case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25092
+ productIdList: [this.attributePropValue.productId],
25093
+ priceListId: IkasStorefrontConfig.priceListId,
25094
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
25095
+ })];
25096
+ case 2:
25097
+ productSearchResponse = _b.sent();
25098
+ if (productSearchResponse) {
25099
+ productList = productSearchResponse.data;
25100
+ if (productList.length) {
25101
+ product = productList[0];
25102
+ if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25103
+ variant = product.variants.find(function (v) { return v.id === _this.attributePropValue.variantId; });
25104
+ if (variant) {
25105
+ productDetail = new IkasProductDetail(product, variant.variantValues);
25106
+ }
25107
+ }
25108
+ else {
25109
+ productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25110
+ }
25111
+ }
25112
+ }
25113
+ _b.label = 3;
25114
+ case 3:
25115
+ if (!productDetail)
25116
+ return [2 /*return*/, []];
25117
+ return [2 /*return*/, productDetail.product.hasVariant
25118
+ ? productDetail.selectedVariant.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })
25119
+ : productDetail.product.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })];
25120
+ }
25121
+ });
25122
+ });
25123
+ };
25124
+ return IkasAttributePropValueProvider;
25125
+ }());
25126
+
25127
+ var IkasAttributeListPropValueProvider = /** @class */ (function () {
25128
+ function IkasAttributeListPropValueProvider(prop, pageSpecificData) {
25129
+ this.attributeListPropValue = prop;
25130
+ this.pageSpecificData = pageSpecificData;
25131
+ }
25132
+ IkasAttributeListPropValueProvider.prototype.getValue = function () {
25133
+ var _a, _b;
25134
+ return __awaiter(this, void 0, void 0, function () {
25135
+ var productDetail, productSearchResponse, productList, product, variant, groupedValues;
25136
+ var _this = this;
25137
+ return __generator(this, function (_c) {
25138
+ switch (_c.label) {
25139
+ case 0:
25140
+ if (!((_a = this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.length) ||
25141
+ (this.attributeListPropValue.usePageData && !this.pageSpecificData) ||
25142
+ (!this.attributeListPropValue.usePageData &&
25143
+ !this.attributeListPropValue.variantId)) {
25144
+ return [2 /*return*/, []];
25145
+ }
25146
+ if (!((_b = this.attributeListPropValue) === null || _b === void 0 ? void 0 : _b.usePageData)) return [3 /*break*/, 1];
25147
+ productDetail = this.pageSpecificData;
25148
+ return [3 /*break*/, 3];
25149
+ case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25150
+ productIdList: [this.attributeListPropValue.productId],
25151
+ priceListId: IkasStorefrontConfig.priceListId,
25152
+ salesChannelId: IkasStorefrontConfig.salesChannelId,
25153
+ })];
25154
+ case 2:
25155
+ productSearchResponse = _c.sent();
25156
+ if (productSearchResponse) {
25157
+ productList = productSearchResponse.data;
25158
+ if (productList.length) {
25159
+ product = productList[0];
25160
+ if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25161
+ variant = product.variants.find(function (v) { return v.id === _this.attributeListPropValue.variantId; });
25162
+ if (variant) {
25163
+ productDetail = new IkasProductDetail(product, variant.variantValues);
25164
+ }
25165
+ }
25166
+ else {
25167
+ productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25168
+ }
25169
+ }
25170
+ }
25171
+ _c.label = 3;
25172
+ case 3:
25173
+ if (!productDetail)
25174
+ return [2 /*return*/, []];
25175
+ groupedValues = productDetail.product.hasVariant
25176
+ ? groupBy_1(productDetail.selectedVariant.attributes.filter(function (a) { var _a; return (_a = _this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.includes(a.productAttributeId || ""); }), "productAttributeId")
25177
+ : groupBy_1(productDetail.product.attributes.filter(function (a) { var _a; return (_a = _this.attributeListPropValue.attributeIds) === null || _a === void 0 ? void 0 : _a.includes(a.productAttributeId || ""); }), "productAttributeId");
25178
+ return [2 /*return*/, this.attributeListPropValue.attributeIds
25179
+ .map(function (attributeId) {
25180
+ var values = groupedValues[attributeId];
25181
+ if ((values === null || values === void 0 ? void 0 : values.length) && values[0].productAttribute)
25182
+ return {
25183
+ attribute: values[0].productAttribute,
25184
+ values: values,
25185
+ };
25186
+ })
25187
+ .filter(function (v) { return !!v; })];
25188
+ }
25189
+ });
25190
+ });
25191
+ };
25192
+ return IkasAttributeListPropValueProvider;
25193
+ }());
25194
+
25195
+ var IkasCustomPropValueProvider = /** @class */ (function () {
25196
+ function IkasCustomPropValueProvider(value, customData, theme, pageType, pageDataProvider, pageSpecificData, pageParams) {
25197
+ this.value = value;
25198
+ this.customData = customData;
25199
+ this.theme = theme;
25200
+ this.pageType = pageType;
25201
+ this.pageDataProvider = pageDataProvider;
25202
+ this.pageSpecificData = pageSpecificData;
25203
+ this.pageParams = pageParams;
25204
+ }
25205
+ IkasCustomPropValueProvider.prototype.getValue = function () {
25206
+ return __awaiter(this, void 0, void 0, function () {
25207
+ var customDataValue, _a;
25208
+ return __generator(this, function (_b) {
25209
+ switch (_b.label) {
25210
+ case 0:
25211
+ if (this.value === undefined || this.value === null)
25212
+ return [2 /*return*/];
25213
+ _b.label = 1;
25214
+ case 1:
25215
+ _b.trys.push([1, 48, , 49]);
25216
+ _a = this.customData.type;
25217
+ switch (_a) {
25218
+ case exports.IkasThemeComponentPropType.TEXT: return [3 /*break*/, 2];
25219
+ case exports.IkasThemeComponentPropType.RICH_TEXT: return [3 /*break*/, 4];
25220
+ case exports.IkasThemeComponentPropType.BOOLEAN: return [3 /*break*/, 6];
25221
+ case exports.IkasThemeComponentPropType.BRAND_LIST: return [3 /*break*/, 8];
25222
+ case exports.IkasThemeComponentPropType.BRAND: return [3 /*break*/, 10];
25223
+ case exports.IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
25224
+ case exports.IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 14];
25225
+ case exports.IkasThemeComponentPropType.COLOR: return [3 /*break*/, 16];
25226
+ case exports.IkasThemeComponentPropType.IMAGE_LIST: return [3 /*break*/, 18];
25227
+ case exports.IkasThemeComponentPropType.IMAGE: return [3 /*break*/, 20];
25228
+ case exports.IkasThemeComponentPropType.LINK: return [3 /*break*/, 22];
25229
+ case exports.IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 22];
25230
+ case exports.IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 24];
25231
+ case exports.IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 26];
25232
+ case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE: return [3 /*break*/, 28];
25233
+ case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST: return [3 /*break*/, 30];
25234
+ case exports.IkasThemeComponentPropType.OBJECT: return [3 /*break*/, 32];
25235
+ case exports.IkasThemeComponentPropType.DYNAMIC_LIST: return [3 /*break*/, 34];
25236
+ case exports.IkasThemeComponentPropType.STATIC_LIST: return [3 /*break*/, 34];
25237
+ case exports.IkasThemeComponentPropType.ENUM: return [3 /*break*/, 36];
25238
+ case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 38];
25239
+ case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 40];
25240
+ case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 40];
25241
+ case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 42];
25242
+ case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 44];
25243
+ }
25244
+ return [3 /*break*/, 46];
24476
25245
  case 2: return [4 /*yield*/, this.getTextValue()];
24477
25246
  case 3:
24478
25247
  customDataValue = _b.sent();
24479
- return [3 /*break*/, 39];
25248
+ return [3 /*break*/, 47];
24480
25249
  case 4: return [4 /*yield*/, this.getRichTextPropValue()];
24481
25250
  case 5:
24482
25251
  customDataValue = _b.sent();
24483
- return [3 /*break*/, 39];
25252
+ return [3 /*break*/, 47];
24484
25253
  case 6: return [4 /*yield*/, this.getBooleanValue()];
24485
25254
  case 7:
24486
25255
  customDataValue = _b.sent();
24487
- return [3 /*break*/, 39];
25256
+ return [3 /*break*/, 47];
24488
25257
  case 8: return [4 /*yield*/, this.getBrandListPropValue()];
24489
25258
  case 9:
24490
25259
  customDataValue = _b.sent();
24491
- return [3 /*break*/, 39];
25260
+ return [3 /*break*/, 47];
24492
25261
  case 10: return [4 /*yield*/, this.getBrandPropValue()];
24493
25262
  case 11:
24494
25263
  customDataValue = _b.sent();
24495
- return [3 /*break*/, 39];
25264
+ return [3 /*break*/, 47];
24496
25265
  case 12: return [4 /*yield*/, this.getCategoryListPropValue()];
24497
25266
  case 13:
24498
25267
  customDataValue = _b.sent();
24499
- return [3 /*break*/, 39];
25268
+ return [3 /*break*/, 47];
24500
25269
  case 14: return [4 /*yield*/, this.getCategoryPropValue()];
24501
25270
  case 15:
24502
25271
  customDataValue = _b.sent();
24503
- return [3 /*break*/, 39];
25272
+ return [3 /*break*/, 47];
24504
25273
  case 16: return [4 /*yield*/, this.getColorPropValue()];
24505
25274
  case 17:
24506
25275
  customDataValue = _b.sent();
24507
- return [3 /*break*/, 39];
25276
+ return [3 /*break*/, 47];
24508
25277
  case 18: return [4 /*yield*/, this.getImageListPropValue()];
24509
25278
  case 19:
24510
25279
  customDataValue = _b.sent();
24511
- return [3 /*break*/, 39];
25280
+ return [3 /*break*/, 47];
24512
25281
  case 20: return [4 /*yield*/, this.getImagePropValue()];
24513
25282
  case 21:
24514
25283
  customDataValue = _b.sent();
24515
- return [3 /*break*/, 39];
25284
+ return [3 /*break*/, 47];
24516
25285
  case 22: return [4 /*yield*/, this.getLinkPropValue()];
24517
25286
  case 23:
24518
25287
  customDataValue = _b.sent();
24519
- return [3 /*break*/, 39];
25288
+ return [3 /*break*/, 47];
24520
25289
  case 24: return [4 /*yield*/, this.getProductDetailPropValue()];
24521
25290
  case 25:
24522
25291
  customDataValue = _b.sent();
24523
- return [3 /*break*/, 39];
25292
+ return [3 /*break*/, 47];
24524
25293
  case 26: return [4 /*yield*/, this.getProductListPropValue()];
24525
25294
  case 27:
24526
25295
  customDataValue = _b.sent();
24527
- return [3 /*break*/, 39];
24528
- case 28: return [4 /*yield*/, this.getObjectValue()];
25296
+ return [3 /*break*/, 47];
25297
+ case 28: return [4 /*yield*/, this.getProductAttributePropValue()];
24529
25298
  case 29:
24530
25299
  customDataValue = _b.sent();
24531
- return [3 /*break*/, 39];
24532
- case 30: return [4 /*yield*/, this.getArrayValue()];
25300
+ return [3 /*break*/, 47];
25301
+ case 30: return [4 /*yield*/, this.getProductAttributeListPropValue()];
24533
25302
  case 31:
24534
25303
  customDataValue = _b.sent();
24535
- return [3 /*break*/, 39];
24536
- case 32: return [4 /*yield*/, this.getComponentListValue()];
25304
+ return [3 /*break*/, 47];
25305
+ case 32: return [4 /*yield*/, this.getObjectValue()];
24537
25306
  case 33:
24538
25307
  customDataValue = _b.sent();
24539
- return [3 /*break*/, 39];
24540
- case 34: return [4 /*yield*/, this.getBlogValue()];
25308
+ return [3 /*break*/, 47];
25309
+ case 34: return [4 /*yield*/, this.getArrayValue()];
24541
25310
  case 35:
24542
25311
  customDataValue = _b.sent();
24543
- return [3 /*break*/, 39];
24544
- case 36: return [4 /*yield*/, this.getBlogListValue()];
25312
+ return [3 /*break*/, 47];
25313
+ case 36: return [4 /*yield*/, this.getEnumValue()];
24545
25314
  case 37:
24546
25315
  customDataValue = _b.sent();
24547
- return [3 /*break*/, 39];
24548
- case 38: return [3 /*break*/, 39];
24549
- case 39: return [3 /*break*/, 41];
24550
- case 40:
25316
+ return [3 /*break*/, 47];
25317
+ case 38: return [4 /*yield*/, this.getCustomDataValue()];
25318
+ case 39:
25319
+ customDataValue = _b.sent();
25320
+ return [3 /*break*/, 47];
25321
+ case 40: return [4 /*yield*/, this.getComponentListValue()];
25322
+ case 41:
25323
+ customDataValue = _b.sent();
25324
+ return [3 /*break*/, 47];
25325
+ case 42: return [4 /*yield*/, this.getBlogValue()];
25326
+ case 43:
25327
+ customDataValue = _b.sent();
25328
+ return [3 /*break*/, 47];
25329
+ case 44: return [4 /*yield*/, this.getBlogListValue()];
25330
+ case 45:
25331
+ customDataValue = _b.sent();
25332
+ return [3 /*break*/, 47];
25333
+ case 46: return [3 /*break*/, 47];
25334
+ case 47: return [3 /*break*/, 49];
25335
+ case 48:
24551
25336
  _b.sent();
24552
25337
  return [2 /*return*/];
24553
- case 41:
25338
+ case 49:
24554
25339
  if (this.customData.isRequired &&
24555
25340
  ((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
24556
25341
  return [2 /*return*/];
@@ -24775,6 +25560,42 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
24775
25560
  });
24776
25561
  });
24777
25562
  };
25563
+ IkasCustomPropValueProvider.prototype.getProductAttributePropValue = function () {
25564
+ return __awaiter(this, void 0, void 0, function () {
25565
+ var provider, value;
25566
+ return __generator(this, function (_a) {
25567
+ switch (_a.label) {
25568
+ case 0:
25569
+ provider = new IkasAttributePropValueProvider(this.value, this.pageSpecificData);
25570
+ return [4 /*yield*/, provider.getValue()];
25571
+ case 1:
25572
+ value = _a.sent();
25573
+ return [2 /*return*/, {
25574
+ value: value,
25575
+ customData: this.customData,
25576
+ }];
25577
+ }
25578
+ });
25579
+ });
25580
+ };
25581
+ IkasCustomPropValueProvider.prototype.getProductAttributeListPropValue = function () {
25582
+ return __awaiter(this, void 0, void 0, function () {
25583
+ var provider, value;
25584
+ return __generator(this, function (_a) {
25585
+ switch (_a.label) {
25586
+ case 0:
25587
+ provider = new IkasAttributeListPropValueProvider(this.value, this.pageSpecificData);
25588
+ return [4 /*yield*/, provider.getValue()];
25589
+ case 1:
25590
+ value = _a.sent();
25591
+ return [2 /*return*/, {
25592
+ value: value,
25593
+ customData: this.customData,
25594
+ }];
25595
+ }
25596
+ });
25597
+ });
25598
+ };
24778
25599
  IkasCustomPropValueProvider.prototype.getTextValue = function () {
24779
25600
  return __awaiter(this, void 0, void 0, function () {
24780
25601
  var provider, value;
@@ -24871,6 +25692,36 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
24871
25692
  });
24872
25693
  });
24873
25694
  };
25695
+ IkasCustomPropValueProvider.prototype.getEnumValue = function () {
25696
+ return __awaiter(this, void 0, void 0, function () {
25697
+ return __generator(this, function (_a) {
25698
+ return [2 /*return*/, {
25699
+ value: this.value,
25700
+ customData: this.customData,
25701
+ }];
25702
+ });
25703
+ });
25704
+ };
25705
+ IkasCustomPropValueProvider.prototype.getCustomDataValue = function () {
25706
+ return __awaiter(this, void 0, void 0, function () {
25707
+ var selectedCustomData, nestedProvider;
25708
+ var _this = this;
25709
+ return __generator(this, function (_a) {
25710
+ switch (_a.label) {
25711
+ case 0:
25712
+ selectedCustomData = this.theme.customData.find(function (c) { return c.id === _this.customData.customDataId; });
25713
+ if (!selectedCustomData)
25714
+ return [2 /*return*/, {
25715
+ value: null,
25716
+ customData: this.customData,
25717
+ }];
25718
+ nestedProvider = new IkasCustomPropValueProvider(this.value, selectedCustomData, this.theme, this.pageType, this.pageDataProvider, this.pageSpecificData);
25719
+ return [4 /*yield*/, nestedProvider.getValue()];
25720
+ case 1: return [2 /*return*/, _a.sent()];
25721
+ }
25722
+ });
25723
+ });
25724
+ };
24874
25725
  IkasCustomPropValueProvider.prototype.getComponentListValue = function () {
24875
25726
  return __awaiter(this, void 0, void 0, function () {
24876
25727
  var pageComponents;
@@ -24958,7 +25809,23 @@ var pascalCase = function (str) {
24958
25809
  var decodeBase64 = function (base64) {
24959
25810
  var buffer = Buffer.from(base64, "base64");
24960
25811
  return buffer.toString("ascii");
24961
- };
25812
+ };
25813
+ function stringSorter(atitle, btitle) {
25814
+ var alphabet = "0123456789AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpQqRrSsŞşTtUuÜüVvWwXxYyZz";
25815
+ var _atitle = atitle || "";
25816
+ var _btitle = btitle || "";
25817
+ if (_atitle.length === 0 || _btitle.length === 0) {
25818
+ return _atitle.length - _btitle.length;
25819
+ }
25820
+ for (var i = 0; i < _atitle.length && i < _btitle.length; i++) {
25821
+ var ai = alphabet.indexOf(_atitle[i].toUpperCase());
25822
+ var bi = alphabet.indexOf(_btitle[i].toUpperCase());
25823
+ if (ai !== bi) {
25824
+ return ai - bi;
25825
+ }
25826
+ }
25827
+ return 0;
25828
+ }
24962
25829
 
24963
25830
  var ThemeComponent = mobxReactLite.observer(function (_a) {
24964
25831
  var pageComponentPropValue = _a.pageComponentPropValue, index = _a.index, settings = _a.settings;
@@ -25192,6 +26059,37 @@ function createCategoryBreadcrumbSchema(pageSpecificDataStr) {
25192
26059
  catch (_a) { }
25193
26060
  }
25194
26061
 
26062
+ function styleInject(css, ref) {
26063
+ if ( ref === void 0 ) ref = {};
26064
+ var insertAt = ref.insertAt;
26065
+
26066
+ if (!css || typeof document === 'undefined') { return; }
26067
+
26068
+ var head = document.head || document.getElementsByTagName('head')[0];
26069
+ var style = document.createElement('style');
26070
+ style.type = 'text/css';
26071
+
26072
+ if (insertAt === 'top') {
26073
+ if (head.firstChild) {
26074
+ head.insertBefore(style, head.firstChild);
26075
+ } else {
26076
+ head.appendChild(style);
26077
+ }
26078
+ } else {
26079
+ head.appendChild(style);
26080
+ }
26081
+
26082
+ if (style.styleSheet) {
26083
+ style.styleSheet.cssText = css;
26084
+ } else {
26085
+ style.appendChild(document.createTextNode(css));
26086
+ }
26087
+ }
26088
+
26089
+ var css_248z = ".style-module_IkasPage__ATOib {\n position: relative;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n visibility: hidden; }\n .style-module_IkasPage__ATOib.style-module_Visible__gfjnC {\n visibility: visible; }\n";
26090
+ var styles = {"IkasPage":"style-module_IkasPage__ATOib","Visible":"style-module_Visible__gfjnC"};
26091
+ styleInject(css_248z);
26092
+
25195
26093
  var IkasPage = mobxReactLite.observer(function (_a) {
25196
26094
  var propValues = _a.propValues, page = _a.page, pageSpecificDataStr = _a.pageSpecificDataStr, settingsStr = _a.settingsStr, merchantSettings = _a.merchantSettings, addOgpMetas = _a.addOgpMetas;
25197
26095
  var store = IkasStorefrontConfig.store;
@@ -25211,12 +26109,11 @@ var IkasPage = mobxReactLite.observer(function (_a) {
25211
26109
  var headerComponentPropValue = propValues.find(function (pv) { return pv.component.isHeader; });
25212
26110
  var footerComponentPropValue = propValues.find(function (pv) { return pv.component.isFooter; });
25213
26111
  var others = propValues.filter(function (pv) { return !pv.component.isHeader && !pv.component.isFooter; }) || [];
25214
- var _pageStyle = __assign(__assign({}, pageStyle), { visibility: mounted ? "visible" : "hidden" });
25215
26112
  if (!page)
25216
26113
  return null;
25217
26114
  return (React.createElement(React.Fragment, null,
25218
26115
  React.createElement(IkasPageHead, { page: page, pageTitle: page.pageTitle, description: page.description, pageSpecificDataStr: pageSpecificDataStr, merchantSettings: merchantSettings, addOgpMetas: addOgpMetas }),
25219
- React.createElement("div", { style: _pageStyle },
26116
+ React.createElement("div", { className: [styles.IkasPage, mounted ? styles.Visible : ""].join(" ") },
25220
26117
  React.createElement("div", null,
25221
26118
  headerComponentPropValue &&
25222
26119
  renderComponent(headerComponentPropValue, settings, -1),
@@ -25228,74 +26125,8 @@ var IkasPage = mobxReactLite.observer(function (_a) {
25228
26125
  });
25229
26126
  var renderComponent = function (pageComponentPropValue, settings, index) {
25230
26127
  return (React.createElement(ThemeComponent, { key: pageComponentPropValue.pageComponent.id, index: index, pageComponentPropValue: pageComponentPropValue, settings: settings }));
25231
- };
25232
- var pageStyle = {
25233
- position: "relative",
25234
- minHeight: "100vh",
25235
- width: "100vw",
25236
- display: "flex",
25237
- flexDirection: "column",
25238
- justifyContent: "space-between",
25239
26128
  };
25240
26129
 
25241
- var IkasAttributePropValueProvider = /** @class */ (function () {
25242
- function IkasAttributePropValueProvider(prop, pageSpecificData) {
25243
- this.attributePropValue = prop;
25244
- this.pageSpecificData = pageSpecificData;
25245
- }
25246
- IkasAttributePropValueProvider.prototype.getValue = function () {
25247
- var _a;
25248
- return __awaiter(this, void 0, void 0, function () {
25249
- var productDetail, productSearchResponse, productList, product, variant;
25250
- var _this = this;
25251
- return __generator(this, function (_b) {
25252
- switch (_b.label) {
25253
- case 0:
25254
- if (!this.attributePropValue.attributeId ||
25255
- (this.attributePropValue.usePageData && !this.pageSpecificData) ||
25256
- (!this.attributePropValue.usePageData &&
25257
- !this.attributePropValue.variantId)) {
25258
- return [2 /*return*/, []];
25259
- }
25260
- if (!((_a = this.attributePropValue) === null || _a === void 0 ? void 0 : _a.usePageData)) return [3 /*break*/, 1];
25261
- productDetail = this.pageSpecificData;
25262
- return [3 /*break*/, 3];
25263
- case 1: return [4 /*yield*/, IkasProductSearchAPI.searchProducts({
25264
- productIdList: [this.attributePropValue.productId],
25265
- priceListId: IkasStorefrontConfig.priceListId,
25266
- salesChannelId: IkasStorefrontConfig.salesChannelId,
25267
- })];
25268
- case 2:
25269
- productSearchResponse = _b.sent();
25270
- if (productSearchResponse) {
25271
- productList = productSearchResponse.data;
25272
- if (productList.length) {
25273
- product = productList[0];
25274
- if (product === null || product === void 0 ? void 0 : product.hasVariant) {
25275
- variant = product.variants.find(function (v) { return v.id === _this.attributePropValue.variantId; });
25276
- if (variant) {
25277
- productDetail = new IkasProductDetail(product, variant.variantValues);
25278
- }
25279
- }
25280
- else {
25281
- productDetail = new IkasProductDetail(product, product.variants[0].variantValues);
25282
- }
25283
- }
25284
- }
25285
- _b.label = 3;
25286
- case 3:
25287
- if (!productDetail)
25288
- return [2 /*return*/, []];
25289
- return [2 /*return*/, productDetail.product.hasVariant
25290
- ? productDetail.selectedVariant.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })
25291
- : productDetail.product.attributes.filter(function (a) { return a.productAttributeId === _this.attributePropValue.attributeId; })];
25292
- }
25293
- });
25294
- });
25295
- };
25296
- return IkasAttributePropValueProvider;
25297
- }());
25298
-
25299
26130
  var IkasPageDataProvider = /** @class */ (function () {
25300
26131
  function IkasPageDataProvider(theme, pageParams, pageType) {
25301
26132
  this.pageType = null;
@@ -25685,79 +26516,83 @@ var IkasPageDataProvider = /** @class */ (function () {
25685
26516
  case exports.IkasThemeComponentPropType.PRODUCT_LIST: return [3 /*break*/, 8];
25686
26517
  case exports.IkasThemeComponentPropType.PRODUCT_DETAIL: return [3 /*break*/, 9];
25687
26518
  case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE: return [3 /*break*/, 10];
25688
- case exports.IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 11];
25689
- case exports.IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 12];
25690
- case exports.IkasThemeComponentPropType.LINK: return [3 /*break*/, 13];
25691
- case exports.IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 13];
25692
- case exports.IkasThemeComponentPropType.COLOR: return [3 /*break*/, 14];
25693
- case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 15];
25694
- case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 16];
25695
- case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 16];
25696
- case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 18];
25697
- case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 19];
26519
+ case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST: return [3 /*break*/, 11];
26520
+ case exports.IkasThemeComponentPropType.CATEGORY: return [3 /*break*/, 12];
26521
+ case exports.IkasThemeComponentPropType.CATEGORY_LIST: return [3 /*break*/, 13];
26522
+ case exports.IkasThemeComponentPropType.LINK: return [3 /*break*/, 14];
26523
+ case exports.IkasThemeComponentPropType.LIST_OF_LINK: return [3 /*break*/, 14];
26524
+ case exports.IkasThemeComponentPropType.COLOR: return [3 /*break*/, 15];
26525
+ case exports.IkasThemeComponentPropType.CUSTOM: return [3 /*break*/, 16];
26526
+ case exports.IkasThemeComponentPropType.COMPONENT: return [3 /*break*/, 17];
26527
+ case exports.IkasThemeComponentPropType.COMPONENT_LIST: return [3 /*break*/, 17];
26528
+ case exports.IkasThemeComponentPropType.BLOG: return [3 /*break*/, 19];
26529
+ case exports.IkasThemeComponentPropType.BLOG_LIST: return [3 /*break*/, 20];
25698
26530
  }
25699
- return [3 /*break*/, 20];
26531
+ return [3 /*break*/, 21];
25700
26532
  case 1:
25701
26533
  propValueProvider = new IkasTextPropValueProvider(propValue);
25702
- return [3 /*break*/, 21];
26534
+ return [3 /*break*/, 22];
25703
26535
  case 2:
25704
26536
  propValueProvider = new IkasRichTextPropValueProvider(propValue);
25705
- return [3 /*break*/, 21];
26537
+ return [3 /*break*/, 22];
25706
26538
  case 3:
25707
26539
  propValueProvider = new IkasBooleanPropValueProvider(propValue);
25708
- return [3 /*break*/, 21];
26540
+ return [3 /*break*/, 22];
25709
26541
  case 4:
25710
26542
  propValueProvider = new IkasImagePropValueProvider(propValue);
25711
- return [3 /*break*/, 21];
26543
+ return [3 /*break*/, 22];
25712
26544
  case 5:
25713
26545
  propValueProvider = new IkasImageListPropValueProvider(propValue);
25714
- return [3 /*break*/, 21];
26546
+ return [3 /*break*/, 22];
25715
26547
  case 6:
25716
26548
  propValueProvider = new IkasBrandPropValueProvider(propValue, this.pageSpecificData);
25717
- return [3 /*break*/, 21];
26549
+ return [3 /*break*/, 22];
25718
26550
  case 7:
25719
26551
  propValueProvider = new IkasBrandListPropValueProvider(propValue);
25720
- return [3 /*break*/, 21];
26552
+ return [3 /*break*/, 22];
25721
26553
  case 8:
25722
26554
  propValueProvider = new IkasProductListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25723
- return [3 /*break*/, 21];
26555
+ return [3 /*break*/, 22];
25724
26556
  case 9:
25725
26557
  propValueProvider = new IkasProductDetailPropValueProvider(propValue, this.pageSpecificData);
25726
- return [3 /*break*/, 21];
26558
+ return [3 /*break*/, 22];
25727
26559
  case 10:
25728
26560
  propValueProvider = new IkasAttributePropValueProvider(propValue, this.pageSpecificData);
25729
- return [3 /*break*/, 21];
26561
+ return [3 /*break*/, 22];
25730
26562
  case 11:
25731
- propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
25732
- return [3 /*break*/, 21];
26563
+ propValueProvider = new IkasAttributeListPropValueProvider(propValue, this.pageSpecificData);
26564
+ return [3 /*break*/, 22];
25733
26565
  case 12:
25734
- propValueProvider = new IkasCategoryListPropValueProvider(propValue);
25735
- return [3 /*break*/, 21];
26566
+ propValueProvider = new IkasCategoryPropValueProvider(propValue, this.pageSpecificData);
26567
+ return [3 /*break*/, 22];
25736
26568
  case 13:
25737
- propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
25738
- return [3 /*break*/, 21];
26569
+ propValueProvider = new IkasCategoryListPropValueProvider(propValue);
26570
+ return [3 /*break*/, 22];
25739
26571
  case 14:
25740
- propValueProvider = new IkasColorPropValueProvider(propValue);
25741
- return [3 /*break*/, 21];
26572
+ propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
26573
+ return [3 /*break*/, 22];
25742
26574
  case 15:
26575
+ propValueProvider = new IkasColorPropValueProvider(propValue);
26576
+ return [3 /*break*/, 22];
26577
+ case 16:
25743
26578
  customData = this.theme.customData.find(function (cd) { return cd.id === prop.customDataId; });
25744
26579
  if (!customData)
25745
26580
  return [2 /*return*/];
25746
26581
  propValueProvider = new IkasCustomPropValueProvider(propValue, customData, this.theme, this.pageType, this, this.pageSpecificData, this.pageParams);
25747
- return [3 /*break*/, 21];
25748
- case 16:
26582
+ return [3 /*break*/, 22];
26583
+ case 17:
25749
26584
  pageComponents = propValue;
25750
26585
  return [4 /*yield*/, Promise.all(pageComponents.map(function (tp) { return _this.getPageComponentPropValues(tp); }))];
25751
- case 17: return [2 /*return*/, _b.sent()];
25752
- case 18:
25753
- propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
25754
- return [3 /*break*/, 21];
26586
+ case 18: return [2 /*return*/, _b.sent()];
25755
26587
  case 19:
26588
+ propValueProvider = new IkasBlogPropValueProvider(propValue, this.pageSpecificData);
26589
+ return [3 /*break*/, 22];
26590
+ case 20:
25756
26591
  propValueProvider = new IkasBlogListPropValueProvider(this.pageType, propValue, this.pageSpecificData);
25757
- return [3 /*break*/, 21];
25758
- case 20: return [3 /*break*/, 21];
25759
- case 21: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
25760
- case 22: return [2 /*return*/, _b.sent()];
26592
+ return [3 /*break*/, 22];
26593
+ case 21: return [3 /*break*/, 22];
26594
+ case 22: return [4 /*yield*/, (propValueProvider === null || propValueProvider === void 0 ? void 0 : propValueProvider.getValue())];
26595
+ case 23: return [2 /*return*/, _b.sent()];
25761
26596
  }
25762
26597
  });
25763
26598
  });
@@ -25812,6 +26647,9 @@ var IkasPageDataProvider = /** @class */ (function () {
25812
26647
  case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE:
25813
26648
  IkasPageDataProvider.initAttributePropValue(prop, propValue, pageComponentPropValue);
25814
26649
  break;
26650
+ case exports.IkasThemeComponentPropType.PRODUCT_ATTRIBUTE_LIST:
26651
+ IkasPageDataProvider.initAttributeListPropValue(prop, propValue, pageComponentPropValue);
26652
+ break;
25815
26653
  case exports.IkasThemeComponentPropType.LINK:
25816
26654
  case exports.IkasThemeComponentPropType.LIST_OF_LINK:
25817
26655
  IkasPageDataProvider.initLinkPropValue(prop, propValue, pageComponentPropValue);
@@ -25893,6 +26731,17 @@ var IkasPageDataProvider = /** @class */ (function () {
25893
26731
  ? propValue.map(function (p) { return new IkasProductAttributeValue(p); })
25894
26732
  : [];
25895
26733
  };
26734
+ IkasPageDataProvider.initAttributeListPropValue = function (prop, propValue, pageComponentPropValue) {
26735
+ pageComponentPropValue.propValues[prop.name] = IkasPageDataProvider._initAttributeListPropValue(propValue);
26736
+ };
26737
+ IkasPageDataProvider._initAttributeListPropValue = function (propValue) {
26738
+ return propValue
26739
+ ? propValue.map(function (p) { return ({
26740
+ attribute: new IkasProductAttribute(p.attribute),
26741
+ values: p.values.map(function (v) { return new IkasProductAttributeValue(v); }),
26742
+ }); })
26743
+ : [];
26744
+ };
25896
26745
  IkasPageDataProvider.initLinkPropValue = function (prop, propValue, pageComponentPropValue) {
25897
26746
  pageComponentPropValue.propValues[prop.name] = this._initLinkPropValue(propValue);
25898
26747
  };
@@ -25958,7 +26807,11 @@ var IkasPageDataProvider = /** @class */ (function () {
25958
26807
  for (var _i = 0, _a = customData.nestedData || []; _i < _a.length; _i++) {
25959
26808
  var nestedCustomData = _a[_i];
25960
26809
  var value = propValue[nestedCustomData.key];
25961
- objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, nestedCustomData, router, settings, isBrowser);
26810
+ var selectedCustomData = void 0;
26811
+ if (nestedCustomData.customDataId) {
26812
+ selectedCustomData = value.customData;
26813
+ }
26814
+ objectValue[nestedCustomData.key] = this._initCustomDataPropValue(value, selectedCustomData || nestedCustomData, router, settings, isBrowser);
25962
26815
  }
25963
26816
  return objectValue;
25964
26817
  case exports.IkasThemeComponentPropType.DYNAMIC_LIST:
@@ -25969,7 +26822,11 @@ var IkasPageDataProvider = /** @class */ (function () {
25969
26822
  var listValue_1 = [];
25970
26823
  var nestedCustomData_1 = customData.nestedData[0];
25971
26824
  propValue.forEach(function (itemValue) {
25972
- listValue_1.push(_this._initCustomDataPropValue(itemValue, nestedCustomData_1, router, settings, isBrowser));
26825
+ var selectedCustomData;
26826
+ if (nestedCustomData_1.customDataId) {
26827
+ selectedCustomData = itemValue.customData;
26828
+ }
26829
+ listValue_1.push(_this._initCustomDataPropValue(itemValue, selectedCustomData || nestedCustomData_1, router, settings, isBrowser));
25973
26830
  });
25974
26831
  return listValue_1;
25975
26832
  }
@@ -26936,7 +27793,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26936
27793
  return __generator(this, function (_b) {
26937
27794
  switch (_b.label) {
26938
27795
  case 0:
26939
- QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "])));
27796
+ QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n additionalPrices {\n amount\n amountType\n name\n type\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput) {\n listPaymentGateway(id: $id) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n additionalPrices {\n amount\n amountType\n name\n type\n }\n }\n }\n "])));
26940
27797
  _b.label = 1;
26941
27798
  case 1:
26942
27799
  _b.trys.push([1, 3, , 4]);
@@ -26954,7 +27811,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26954
27811
  console.log(errors);
26955
27812
  }
26956
27813
  if (data)
26957
- return [2 /*return*/, data.listPaymentGateway];
27814
+ return [2 /*return*/, data.listPaymentGateway.map(function (pg) { return new IkasPaymentGateway(pg); })];
26958
27815
  return [3 /*break*/, 4];
26959
27816
  case 3:
26960
27817
  err_5 = _b.sent();
@@ -27130,20 +27987,23 @@ var templateObject_1$5;
27130
27987
  var IkasCountryAPI = /** @class */ (function () {
27131
27988
  function IkasCountryAPI() {
27132
27989
  }
27133
- IkasCountryAPI.listCountries = function (iso2List) {
27990
+ IkasCountryAPI.listCountries = function (iso2List, idList) {
27134
27991
  return __awaiter(this, void 0, void 0, function () {
27135
27992
  var QUERY, _a, data, errors, err_1;
27136
27993
  return __generator(this, function (_b) {
27137
27994
  switch (_b.label) {
27138
27995
  case 0:
27139
- QUERY = src(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "], ["\n query listCountry($iso2: StringFilterInput) {\n listCountry(iso2: $iso2) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "])));
27996
+ QUERY = src(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query listCountry($iso2: StringFilterInput, $id: StringFilterInput) {\n listCountry(iso2: $iso2, id: $id) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "], ["\n query listCountry($iso2: StringFilterInput, $id: StringFilterInput) {\n listCountry(iso2: $iso2, id: $id) {\n id\n name\n native\n iso2\n iso3\n phoneCode\n locationTranslations {\n tr\n en\n }\n }\n }\n "])));
27140
27997
  _b.label = 1;
27141
27998
  case 1:
27142
27999
  _b.trys.push([1, 3, , 4]);
27143
- return [4 /*yield*/, apollo.getClient().query({
28000
+ return [4 /*yield*/, apollo
28001
+ .getClient()
28002
+ .query({
27144
28003
  query: QUERY,
27145
28004
  variables: {
27146
28005
  iso2: iso2List ? { in: iso2List } : undefined,
28006
+ id: idList ? { in: idList } : undefined,
27147
28007
  },
27148
28008
  })];
27149
28009
  case 2:
@@ -27665,9 +28525,73 @@ var IkasCustomerAPI = /** @class */ (function () {
27665
28525
  });
27666
28526
  });
27667
28527
  };
28528
+ IkasCustomerAPI.getLastViewedProducts = function (customerId) {
28529
+ return __awaiter(this, void 0, void 0, function () {
28530
+ var QUERY, _a, data, errors, error_2;
28531
+ return __generator(this, function (_b) {
28532
+ switch (_b.label) {
28533
+ case 0:
28534
+ QUERY = src(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "], ["\n query getLastViewedProducts($customerId: String) {\n getLastViewedProducts(customerId: $customerId) {\n products {\n productId\n variantId\n }\n }\n }\n "])));
28535
+ _b.label = 1;
28536
+ case 1:
28537
+ _b.trys.push([1, 3, , 4]);
28538
+ return [4 /*yield*/, apollo
28539
+ .getClient()
28540
+ .query({
28541
+ query: QUERY,
28542
+ variables: {
28543
+ customerId: customerId,
28544
+ },
28545
+ })];
28546
+ case 2:
28547
+ _a = _b.sent(), data = _a.data, errors = _a.errors;
28548
+ if (errors && errors.length)
28549
+ return [2 /*return*/, []];
28550
+ return [2 /*return*/, data.getLastViewedProducts.products];
28551
+ case 3:
28552
+ error_2 = _b.sent();
28553
+ console.log(error_2);
28554
+ return [2 /*return*/, []];
28555
+ case 4: return [2 /*return*/];
28556
+ }
28557
+ });
28558
+ });
28559
+ };
28560
+ IkasCustomerAPI.saveLastViewedProducts = function (input) {
28561
+ return __awaiter(this, void 0, void 0, function () {
28562
+ var MUTATION, errors, err_12;
28563
+ return __generator(this, function (_a) {
28564
+ switch (_a.label) {
28565
+ case 0:
28566
+ MUTATION = src(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "], ["\n mutation saveLastViewedProducts($input: ProductLastViewedInput!) {\n saveLastViewedProducts(input: $input) {\n id\n }\n }\n "])));
28567
+ _a.label = 1;
28568
+ case 1:
28569
+ _a.trys.push([1, 3, , 4]);
28570
+ return [4 /*yield*/, apollo
28571
+ .getClient()
28572
+ .mutate({
28573
+ mutation: MUTATION,
28574
+ variables: {
28575
+ input: input,
28576
+ },
28577
+ })];
28578
+ case 2:
28579
+ errors = (_a.sent()).errors;
28580
+ if (errors && errors.length)
28581
+ return [2 /*return*/, false];
28582
+ return [3 /*break*/, 4];
28583
+ case 3:
28584
+ err_12 = _a.sent();
28585
+ console.log(err_12);
28586
+ return [2 /*return*/, false];
28587
+ case 4: return [2 /*return*/, true];
28588
+ }
28589
+ });
28590
+ });
28591
+ };
27668
28592
  return IkasCustomerAPI;
27669
28593
  }());
27670
- var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
28594
+ var templateObject_1$7, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
27671
28595
 
27672
28596
  var IkasDistrictAPI = /** @class */ (function () {
27673
28597
  function IkasDistrictAPI() {
@@ -28335,36 +29259,9 @@ var IkasVariantTypeAPI = /** @class */ (function () {
28335
29259
  }());
28336
29260
  var templateObject_1$g;
28337
29261
 
28338
- function styleInject(css, ref) {
28339
- if ( ref === void 0 ) ref = {};
28340
- var insertAt = ref.insertAt;
28341
-
28342
- if (!css || typeof document === 'undefined') { return; }
28343
-
28344
- var head = document.head || document.getElementsByTagName('head')[0];
28345
- var style = document.createElement('style');
28346
- style.type = 'text/css';
28347
-
28348
- if (insertAt === 'top') {
28349
- if (head.firstChild) {
28350
- head.insertBefore(style, head.firstChild);
28351
- } else {
28352
- head.appendChild(style);
28353
- }
28354
- } else {
28355
- head.appendChild(style);
28356
- }
28357
-
28358
- if (style.styleSheet) {
28359
- style.styleSheet.cssText = css;
28360
- } else {
28361
- style.appendChild(document.createTextNode(css));
28362
- }
28363
- }
28364
-
28365
- var css_248z = ".style-module_FormSectionTitle__2LxF2 {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0 {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0.style-module_WithSubTitle__36X7i {\n line-height: auto;\n padding-bottom: 0; }\n\n.style-module_SubTitle__2UOsH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.style-module_Grid__1eODF {\n display: grid;\n grid-gap: 0.7em; }\n .style-module_Grid__1eODF.style-module_Grid2__1HTRV {\n grid-template-columns: repeat(2, 1fr); }\n .style-module_Grid__1eODF.style-module_Grid3__uN7io {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .style-module_Grid__1eODF {\n grid-template-columns: 1fr !important; } }\n\n.style-module_FormContainer__2IVCZ {\n padding: 0 0.7em; }\n\n.style-module_mtFormRow__2YwG- {\n margin-top: 0.7em; }\n\n.style-module_mt1__1OQuA {\n margin-top: 1em; }\n\n.style-module_mt2__Yumkn {\n margin-top: 2em; }\n\n@keyframes style-module_fadeInFromRight__L_PAx {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n\n.style-module_FormItem__1o0fc {\n width: 100%; }\n .style-module_FormItemWrapper__2NOxU {\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ {\n position: relative;\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabel__2Tx0b {\n color: #737373;\n position: absolute;\n top: 0;\n left: 0.7em;\n width: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n transition: transform .1s;\n transform: translateY(70%);\n font-size: 0.85em; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabelTop__1nOBq {\n transform: translateY(6px);\n font-size: 0.7em; }\n .style-module_FormItemInputWrapper__2eOdJ input,\n .style-module_FormItemInputWrapper__2eOdJ select,\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n border: 1px solid #d9d9d9;\n background-color: white;\n color: #333333;\n background-clip: padding-box;\n border-radius: 6px;\n display: block;\n width: 100%;\n height: 3em;\n padding: 0.5em;\n outline: none;\n transition: padding .1s, border-color .5s, box-shadow .5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none; }\n .style-module_FormItemInputWrapper__2eOdJ input:focus,\n .style-module_FormItemInputWrapper__2eOdJ select:focus,\n .style-module_FormItemInputWrapper__2eOdJ textarea:focus {\n box-shadow: 0 0 0 1px #111111;\n border-color: #111111; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Bottom__3s4pZ {\n padding-top: 1.2em;\n padding-bottom: 0.2em; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Error__nif12 {\n box-shadow: 0 0 0 1px #ff6d6d;\n border-color: #ff6d6d; }\n .style-module_FormItemInputWrapper__2eOdJ input::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ select::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ textarea::-ms-expand {\n display: none; }\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n min-height: 120px; }\n .style-module_FormItemInputWrapper__2eOdJ .style-module_ArrowContainer__27ejm {\n position: absolute;\n right: 1px;\n padding-right: 0.5em;\n top: 1px;\n height: calc(100% - 2px);\n display: flex;\n align-items: center;\n color: #737373;\n background-color: white;\n z-index: 2;\n border-radius: 6px; }\n .style-module_FormItem__1o0fc .style-module_ErrorMsg__3How6 {\n color: #ff6d6d;\n font-size: 0.8em;\n margin: 0.5em 0.25em;\n animation-name: style-module_fadeInFromRight__L_PAx;\n animation-duration: .3s; }\n";
28366
- var styles = {"FormSectionTitle":"style-module_FormSectionTitle__2LxF2","Title":"style-module_Title__2PxW0","WithSubTitle":"style-module_WithSubTitle__36X7i","SubTitle":"style-module_SubTitle__2UOsH","Grid":"style-module_Grid__1eODF","Grid2":"style-module_Grid2__1HTRV","Grid3":"style-module_Grid3__uN7io","FormContainer":"style-module_FormContainer__2IVCZ","mtFormRow":"style-module_mtFormRow__2YwG-","mt1":"style-module_mt1__1OQuA","mt2":"style-module_mt2__Yumkn","FormItem":"style-module_FormItem__1o0fc","FormItemWrapper":"style-module_FormItemWrapper__2NOxU","FormItemInputWrapper":"style-module_FormItemInputWrapper__2eOdJ","FieldLabel":"style-module_FieldLabel__2Tx0b","FieldLabelTop":"style-module_FieldLabelTop__1nOBq","Bottom":"style-module_Bottom__3s4pZ","Error":"style-module_Error__nif12","ArrowContainer":"style-module_ArrowContainer__27ejm","ErrorMsg":"style-module_ErrorMsg__3How6","fadeInFromRight":"style-module_fadeInFromRight__L_PAx"};
28367
- styleInject(css_248z);
29262
+ var css_248z$1 = ".style-module_FormSectionTitle__2LxF2 {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0 {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .style-module_FormSectionTitle__2LxF2 .style-module_Title__2PxW0.style-module_WithSubTitle__36X7i {\n line-height: auto;\n padding-bottom: 0; }\n\n.style-module_SubTitle__2UOsH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.style-module_Grid__1eODF {\n display: grid;\n grid-gap: 0.7em; }\n .style-module_Grid__1eODF.style-module_Grid2__1HTRV {\n grid-template-columns: repeat(2, 1fr); }\n .style-module_Grid__1eODF.style-module_Grid3__uN7io {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .style-module_Grid__1eODF {\n grid-template-columns: 1fr !important; } }\n\n.style-module_FormContainer__2IVCZ {\n padding: 0 0.7em; }\n\n.style-module_mtFormRow__2YwG- {\n margin-top: 0.7em; }\n\n.style-module_mt1__1OQuA {\n margin-top: 1em; }\n\n.style-module_mt2__Yumkn {\n margin-top: 2em; }\n\n@keyframes style-module_fadeInFromRight__L_PAx {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n\n.style-module_FormItem__1o0fc {\n width: 100%; }\n .style-module_FormItemWrapper__2NOxU {\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ {\n position: relative;\n width: 100%; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabel__2Tx0b {\n color: #737373;\n position: absolute;\n top: 0;\n left: 0.7em;\n width: 100%;\n z-index: 1;\n user-select: none;\n pointer-events: none;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n transition: transform .1s;\n transform: translateY(70%);\n font-size: 0.85em; }\n .style-module_FormItemInputWrapper__2eOdJ label.style-module_FieldLabelTop__1nOBq {\n transform: translateY(6px);\n font-size: 0.7em; }\n .style-module_FormItemInputWrapper__2eOdJ input,\n .style-module_FormItemInputWrapper__2eOdJ select,\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n border: 1px solid #d9d9d9;\n background-color: white;\n color: #333333;\n background-clip: padding-box;\n border-radius: 6px;\n display: block;\n width: 100%;\n height: 3em;\n padding: 0.5em;\n outline: none;\n transition: padding .1s, border-color .5s, box-shadow .5s;\n box-shadow: 0 0 0 1px transparent;\n -moz-appearance: none;\n -webkit-appearance: none; }\n .style-module_FormItemInputWrapper__2eOdJ input:focus,\n .style-module_FormItemInputWrapper__2eOdJ select:focus,\n .style-module_FormItemInputWrapper__2eOdJ textarea:focus {\n box-shadow: 0 0 0 1px #111111;\n border-color: #111111; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Bottom__3s4pZ,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Bottom__3s4pZ {\n padding-top: 1.2em;\n padding-bottom: 0.2em; }\n .style-module_FormItemInputWrapper__2eOdJ input.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ select.style-module_Error__nif12,\n .style-module_FormItemInputWrapper__2eOdJ textarea.style-module_Error__nif12 {\n box-shadow: 0 0 0 1px #ff6d6d;\n border-color: #ff6d6d; }\n .style-module_FormItemInputWrapper__2eOdJ input::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ select::-ms-expand,\n .style-module_FormItemInputWrapper__2eOdJ textarea::-ms-expand {\n display: none; }\n .style-module_FormItemInputWrapper__2eOdJ textarea {\n min-height: 120px; }\n .style-module_FormItemInputWrapper__2eOdJ .style-module_ArrowContainer__27ejm {\n position: absolute;\n right: 1px;\n padding-right: 0.5em;\n top: 1px;\n height: calc(100% - 2px);\n display: flex;\n align-items: center;\n color: #737373;\n background-color: white;\n z-index: 2;\n border-radius: 6px; }\n .style-module_FormItem__1o0fc .style-module_ErrorMsg__3How6 {\n color: #ff6d6d;\n font-size: 0.8em;\n margin: 0.5em 0.25em;\n animation-name: style-module_fadeInFromRight__L_PAx;\n animation-duration: .3s; }\n";
29263
+ var styles$1 = {"FormSectionTitle":"style-module_FormSectionTitle__2LxF2","Title":"style-module_Title__2PxW0","WithSubTitle":"style-module_WithSubTitle__36X7i","SubTitle":"style-module_SubTitle__2UOsH","Grid":"style-module_Grid__1eODF","Grid2":"style-module_Grid2__1HTRV","Grid3":"style-module_Grid3__uN7io","FormContainer":"style-module_FormContainer__2IVCZ","mtFormRow":"style-module_mtFormRow__2YwG-","mt1":"style-module_mt1__1OQuA","mt2":"style-module_mt2__Yumkn","FormItem":"style-module_FormItem__1o0fc","FormItemWrapper":"style-module_FormItemWrapper__2NOxU","FormItemInputWrapper":"style-module_FormItemInputWrapper__2eOdJ","FieldLabel":"style-module_FieldLabel__2Tx0b","FieldLabelTop":"style-module_FieldLabelTop__1nOBq","Bottom":"style-module_Bottom__3s4pZ","Error":"style-module_Error__nif12","ArrowContainer":"style-module_ArrowContainer__27ejm","ErrorMsg":"style-module_ErrorMsg__3How6","fadeInFromRight":"style-module_fadeInFromRight__L_PAx"};
29264
+ styleInject(css_248z$1);
28368
29265
 
28369
29266
  var FormItemViewModel = /** @class */ (function () {
28370
29267
  function FormItemViewModel(props) {
@@ -28379,6 +29276,7 @@ var FormItemViewModel = /** @class */ (function () {
28379
29276
  _this.onChange(e.target.value);
28380
29277
  };
28381
29278
  this.type = props.type;
29279
+ this.inputType = props.inputType;
28382
29280
  this.options = props.options;
28383
29281
  this.label = props.label;
28384
29282
  this.value = props.value;
@@ -28389,7 +29287,7 @@ var FormItemViewModel = /** @class */ (function () {
28389
29287
  }
28390
29288
  Object.defineProperty(FormItemViewModel.prototype, "formItemStyle", {
28391
29289
  get: function () {
28392
- var s = [styles.FormItem];
29290
+ var s = [styles$1.FormItem];
28393
29291
  return s.join(" ");
28394
29292
  },
28395
29293
  enumerable: false,
@@ -28398,10 +29296,10 @@ var FormItemViewModel = /** @class */ (function () {
28398
29296
  Object.defineProperty(FormItemViewModel.prototype, "labelStyle", {
28399
29297
  get: function () {
28400
29298
  if (this.value) {
28401
- return [styles.FieldLabel, styles.FieldLabelTop].join(" ");
29299
+ return [styles$1.FieldLabel, styles$1.FieldLabelTop].join(" ");
28402
29300
  }
28403
29301
  else {
28404
- return [styles.FieldLabel].join(" ");
29302
+ return [styles$1.FieldLabel].join(" ");
28405
29303
  }
28406
29304
  },
28407
29305
  enumerable: false,
@@ -28411,10 +29309,10 @@ var FormItemViewModel = /** @class */ (function () {
28411
29309
  get: function () {
28412
29310
  var classes = [];
28413
29311
  if (this.value) {
28414
- classes.push(styles.Bottom);
29312
+ classes.push(styles$1.Bottom);
28415
29313
  }
28416
29314
  if (this.hasError) {
28417
- classes.push(styles.Error);
29315
+ classes.push(styles$1.Error);
28418
29316
  }
28419
29317
  return classes.join(" ");
28420
29318
  },
@@ -28429,7 +29327,13 @@ var FormItemType;
28429
29327
  FormItemType[FormItemType["TEXT_AREA"] = 1] = "TEXT_AREA";
28430
29328
  FormItemType[FormItemType["SELECT"] = 2] = "SELECT";
28431
29329
  FormItemType[FormItemType["TEL"] = 3] = "TEL";
28432
- })(FormItemType || (FormItemType = {}));
29330
+ })(FormItemType || (FormItemType = {}));
29331
+ var FormItemInputType;
29332
+ (function (FormItemInputType) {
29333
+ FormItemInputType["NUMERIC"] = "numeric";
29334
+ FormItemInputType["TEL"] = "tel";
29335
+ FormItemInputType["EMAIL"] = "email";
29336
+ })(FormItemInputType || (FormItemInputType = {}));
28433
29337
 
28434
29338
  var SVGCaretDown = function (_a) {
28435
29339
  var className = _a.className;
@@ -28445,6 +29349,11 @@ var FormItem = mobxReactLite.observer(function (props) {
28445
29349
  vm.type = props.type;
28446
29350
  });
28447
29351
  }, [props.type]);
29352
+ React.useEffect(function () {
29353
+ mobx.runInAction(function () {
29354
+ vm.inputType = props.inputType;
29355
+ });
29356
+ }, [props.inputType]);
28448
29357
  React.useEffect(function () {
28449
29358
  mobx.runInAction(function () {
28450
29359
  vm.value = props.value;
@@ -28476,18 +29385,18 @@ var FormItem = mobxReactLite.observer(function (props) {
28476
29385
  });
28477
29386
  }, [props.onChange]);
28478
29387
  return (React.createElement("div", { className: vm.formItemStyle },
28479
- React.createElement("div", { className: styles.FormItemWrapper },
28480
- React.createElement("div", { className: styles.FormItemInputWrapper },
29388
+ React.createElement("div", { className: styles$1.FormItemWrapper },
29389
+ React.createElement("div", { className: styles$1.FormItemInputWrapper },
28481
29390
  React.createElement("label", { className: vm.labelStyle }, vm.label),
28482
29391
  vm.type === FormItemType.TEXT && (React.createElement(Input, { vm: vm, autocomplete: props.autocomplete })),
28483
29392
  vm.type === FormItemType.TEL && (React.createElement(Input, { vm: vm, type: "tel", autocomplete: props.autocomplete })),
28484
29393
  vm.type === FormItemType.TEXT_AREA && React.createElement(TextArea, { vm: vm }),
28485
29394
  vm.type === FormItemType.SELECT && (React.createElement(Select, { vm: vm, autocomplete: props.autocomplete }))),
28486
- !!vm.hasError && (React.createElement("div", { className: styles.ErrorMsg }, vm.errorText || "")))));
29395
+ !!vm.hasError && (React.createElement("div", { className: styles$1.ErrorMsg }, vm.errorText || "")))));
28487
29396
  });
28488
29397
  var Input = mobxReactLite.observer(function (_a) {
28489
29398
  var vm = _a.vm, autocomplete = _a.autocomplete, type = _a.type;
28490
- return (React.createElement("input", { type: type || "text", autoComplete: autocomplete, className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
29399
+ return (React.createElement("input", { type: type || "text", autoComplete: autocomplete, inputMode: vm.inputType || "text", className: vm.inputStyle, value: vm.value, onChange: vm.onValueChange }));
28491
29400
  });
28492
29401
  var TextArea = mobxReactLite.observer(function (_a) {
28493
29402
  var vm = _a.vm;
@@ -28500,7 +29409,7 @@ var Select = mobxReactLite.observer(function (_a) {
28500
29409
  React.createElement("select", { className: vm.inputStyle, autoComplete: autocomplete, onChange: vm.onSelectChange },
28501
29410
  !vm.value && React.createElement("option", { selected: true, disabled: true, key: -1 }), (_b = vm.options) === null || _b === void 0 ? void 0 :
28502
29411
  _b.map(function (o, index) { return (React.createElement("option", { key: index + o.value, value: o.value, selected: vm.value === o.value }, o.label)); })),
28503
- React.createElement("div", { className: styles.ArrowContainer },
29412
+ React.createElement("div", { className: styles$1.ArrowContainer },
28504
29413
  React.createElement(SVGCaretDown, null))));
28505
29414
  });
28506
29415
 
@@ -28510,26 +29419,26 @@ var SVGCheck = function (_a) {
28510
29419
  React.createElement("path", { fill: "currentColor", d: "M12.6 8.1l-3.7-3.8 1-1.1 2.7 2.7 5.5-5.4 1 1z" })));
28511
29420
  };
28512
29421
 
28513
- var css_248z$1 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabelError__FmdxF {\n color: #ff6d6d; }\n";
28514
- var styles$1 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC","CheckboxLabelError":"style-module_CheckboxLabelError__FmdxF"};
28515
- styleInject(css_248z$1);
29422
+ var css_248z$2 = ".style-module_CheckboxWrapper__2tSbx {\n width: 100%;\n display: flex;\n padding: 0.5em;\n cursor: pointer;\n user-select: none;\n align-items: center; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxContainer__1zRvT {\n position: relative;\n width: 20px;\n height: 20px;\n margin-right: 0.75em; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3 {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n position: absolute;\n top: 0;\n left: 0;\n transition: border-width .2s ease-in-out; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxBorder__281X3.style-module_Checked__3-ZM4 {\n border: 10px solid #111111; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ- {\n width: 20px;\n height: 20px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n color: white;\n z-index: 2;\n transition: all 0.2s ease-in-out;\n transition-delay: .1s;\n opacity: 0;\n transform: scale(0.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxTick__2LpQ-.style-module_Visible__2Ng5Q {\n opacity: 1;\n transform: scale(1.2); }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabel__30uMC {\n flex: 1 1 auto;\n font-weight: normal;\n font-size: 0.85em;\n color: #545454; }\n .style-module_CheckboxWrapper__2tSbx .style-module_CheckboxLabelError__FmdxF {\n color: #ff6d6d; }\n";
29423
+ var styles$2 = {"CheckboxWrapper":"style-module_CheckboxWrapper__2tSbx","CheckboxContainer":"style-module_CheckboxContainer__1zRvT","CheckboxBorder":"style-module_CheckboxBorder__281X3","Checked":"style-module_Checked__3-ZM4","CheckboxTick":"style-module_CheckboxTick__2LpQ-","Visible":"style-module_Visible__2Ng5Q","CheckboxLabel":"style-module_CheckboxLabel__30uMC","CheckboxLabelError":"style-module_CheckboxLabelError__FmdxF"};
29424
+ styleInject(css_248z$2);
28516
29425
 
28517
29426
  var Checkbox = mobxReactLite.observer(function (_a) {
28518
29427
  var value = _a.value, label = _a.label, hasError = _a.hasError, onChange = _a.onChange;
28519
29428
  var _onChange = function () {
28520
29429
  onChange(!value);
28521
29430
  };
28522
- var checkboxBorderClasses = [styles$1.CheckboxBorder];
28523
- var labelClasses = [styles$1.CheckboxLabel];
28524
- var tickClasses = [styles$1.CheckboxTick];
29431
+ var checkboxBorderClasses = [styles$2.CheckboxBorder];
29432
+ var labelClasses = [styles$2.CheckboxLabel];
29433
+ var tickClasses = [styles$2.CheckboxTick];
28525
29434
  if (value) {
28526
- checkboxBorderClasses.push(styles$1.Checked);
28527
- tickClasses.push(styles$1.Visible);
29435
+ checkboxBorderClasses.push(styles$2.Checked);
29436
+ tickClasses.push(styles$2.Visible);
28528
29437
  }
28529
29438
  if (hasError)
28530
- labelClasses.push(styles$1.CheckboxLabelError);
28531
- return (React.createElement("div", { className: styles$1.CheckboxWrapper, onClick: _onChange },
28532
- React.createElement("div", { className: styles$1.CheckboxContainer },
29439
+ labelClasses.push(styles$2.CheckboxLabelError);
29440
+ return (React.createElement("div", { className: styles$2.CheckboxWrapper, onClick: _onChange },
29441
+ React.createElement("div", { className: styles$2.CheckboxContainer },
28533
29442
  React.createElement("div", { className: checkboxBorderClasses.join(" ") }),
28534
29443
  React.createElement("div", { className: tickClasses.join(" ") },
28535
29444
  React.createElement(SVGCheck, null))),
@@ -28545,6 +29454,7 @@ var AddressFormViewModel = /** @class */ (function () {
28545
29454
  this.cities = [];
28546
29455
  this.districts = [];
28547
29456
  this.allowedCountryIds = null;
29457
+ this.isCorporate = false;
28548
29458
  this.fillDropdownOptions = function () { return __awaiter(_this, void 0, void 0, function () {
28549
29459
  return __generator(this, function (_a) {
28550
29460
  switch (_a.label) {
@@ -28565,24 +29475,25 @@ var AddressFormViewModel = /** @class */ (function () {
28565
29475
  });
28566
29476
  }); };
28567
29477
  this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
28568
- var countries;
28569
- var _this = this;
28570
- return __generator(this, function (_a) {
28571
- switch (_a.label) {
29478
+ var countries, currentRouting_1;
29479
+ var _a, _b;
29480
+ return __generator(this, function (_c) {
29481
+ switch (_c.label) {
28572
29482
  case 0:
28573
- _a.trys.push([0, 2, , 3]);
28574
- return [4 /*yield*/, IkasCountryAPI.listCountries()];
29483
+ _c.trys.push([0, 2, , 3]);
29484
+ return [4 /*yield*/, IkasCountryAPI.listCountries(undefined, ((_a = this.allowedCountryIds) === null || _a === void 0 ? void 0 : _a.length) ? this.allowedCountryIds : undefined)];
28575
29485
  case 1:
28576
- countries = _a.sent();
28577
- if (this.allowedCountryIds) {
28578
- countries = countries.filter(function (c) { var _a; return (_a = _this.allowedCountryIds) === null || _a === void 0 ? void 0 : _a.includes(c.id); });
29486
+ countries = _c.sent();
29487
+ currentRouting_1 = IkasStorefrontConfig.routings.find(function (r) { return r.id === IkasStorefrontConfig.storefrontRoutingId; });
29488
+ if ((_b = currentRouting_1 === null || currentRouting_1 === void 0 ? void 0 : currentRouting_1.countryCodes) === null || _b === void 0 ? void 0 : _b.length) {
29489
+ countries = countries.filter(function (c) { var _a; return c.iso2 && ((_a = currentRouting_1.countryCodes) === null || _a === void 0 ? void 0 : _a.includes(c.iso2)); });
28579
29490
  }
28580
29491
  this.countries = countries;
28581
29492
  if (this.countries.length === 1 && !this.country)
28582
29493
  this.onCountryChange(this.countries[0].id);
28583
29494
  return [3 /*break*/, 3];
28584
29495
  case 2:
28585
- _a.sent();
29496
+ _c.sent();
28586
29497
  return [3 /*break*/, 3];
28587
29498
  case 3: return [2 /*return*/];
28588
29499
  }
@@ -28763,6 +29674,24 @@ var AddressFormViewModel = /** @class */ (function () {
28763
29674
  name: value,
28764
29675
  };
28765
29676
  };
29677
+ this.onCorporateChange = function (value) {
29678
+ _this.isCorporate = value;
29679
+ if (!value) {
29680
+ _this.address.company = null;
29681
+ _this.address.taxNumber = null;
29682
+ _this.address.taxOffice = null;
29683
+ }
29684
+ };
29685
+ this.onCompanyChange = function (value) {
29686
+ _this.address.company = value;
29687
+ };
29688
+ this.onTaxNumberChange = function (value) {
29689
+ _this.address.taxNumber = value;
29690
+ };
29691
+ this.onTaxOfficeChange = function (value) {
29692
+ _this.address.taxOffice = value;
29693
+ };
29694
+ this.vm = data.vm;
28766
29695
  this.address = data.address;
28767
29696
  this.customer = data.customer;
28768
29697
  this.allowedCountryIds = data.allowedCountryIds;
@@ -28829,11 +29758,7 @@ var AddressFormViewModel = /** @class */ (function () {
28829
29758
  Object.defineProperty(AddressFormViewModel.prototype, "countryOptions", {
28830
29759
  get: function () {
28831
29760
  var list = this.countries.map(this.modelToOption);
28832
- list.sort(function (a, b) {
28833
- return a.label.toLocaleLowerCase("tr-TR") > b.label.toLocaleLowerCase("tr-TR")
28834
- ? 1
28835
- : -1;
28836
- });
29761
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
28837
29762
  return list;
28838
29763
  },
28839
29764
  enumerable: false,
@@ -28841,14 +29766,18 @@ var AddressFormViewModel = /** @class */ (function () {
28841
29766
  });
28842
29767
  Object.defineProperty(AddressFormViewModel.prototype, "stateOptions", {
28843
29768
  get: function () {
28844
- return this.states.map(this.modelToOption);
29769
+ var list = this.states.map(this.modelToOption);
29770
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
29771
+ return list;
28845
29772
  },
28846
29773
  enumerable: false,
28847
29774
  configurable: true
28848
29775
  });
28849
29776
  Object.defineProperty(AddressFormViewModel.prototype, "cityOptions", {
28850
29777
  get: function () {
28851
- return this.cities.map(this.modelToOption);
29778
+ var list = this.cities.map(this.modelToOption);
29779
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
29780
+ return list;
28852
29781
  },
28853
29782
  enumerable: false,
28854
29783
  configurable: true
@@ -28856,11 +29785,7 @@ var AddressFormViewModel = /** @class */ (function () {
28856
29785
  Object.defineProperty(AddressFormViewModel.prototype, "districtOptions", {
28857
29786
  get: function () {
28858
29787
  var list = this.districts.map(this.modelToOption);
28859
- list.sort(function (a, b) {
28860
- return a.label.toLocaleLowerCase("tr-TR") > b.label.toLocaleLowerCase("tr-TR")
28861
- ? 1
28862
- : -1;
28863
- });
29788
+ list.sort(function (a, b) { return stringSorter(a.label, b.label); });
28864
29789
  return list;
28865
29790
  },
28866
29791
  enumerable: false,
@@ -28877,18 +29802,20 @@ var AddressFormViewModel = /** @class */ (function () {
28877
29802
  return AddressFormViewModel;
28878
29803
  }());
28879
29804
 
28880
- var css_248z$2 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt.common-module_WithSubTitle__1VHWv {\n line-height: auto;\n padding-bottom: 0; }\n\n.common-module_SubTitle__1H4kH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.common-module_Grid__2CuvH {\n display: grid;\n grid-gap: 0.7em; }\n .common-module_Grid__2CuvH.common-module_Grid2__9CCag {\n grid-template-columns: repeat(2, 1fr); }\n .common-module_Grid__2CuvH.common-module_Grid3__3p0jJ {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .common-module_Grid__2CuvH {\n grid-template-columns: 1fr !important; } }\n\n.common-module_FormContainer__2I_Lj {\n padding: 0 0.7em; }\n\n.common-module_mtFormRow__2tsDn {\n margin-top: 0.7em; }\n\n.common-module_mt1__3tpC1 {\n margin-top: 1em; }\n\n.common-module_mt2__2bl5q {\n margin-top: 2em; }\n\n@keyframes common-module_fadeInFromRight__3RYk5 {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n";
29805
+ var css_248z$3 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 1.5em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt {\n flex: 1 1 auto;\n padding-bottom: 0.7em;\n color: #333333;\n font-size: 1.15em;\n line-height: 1.15em; }\n .common-module_FormSectionTitle___Mykh .common-module_Title__3JTHt.common-module_WithSubTitle__1VHWv {\n line-height: auto;\n padding-bottom: 0; }\n\n.common-module_SubTitle__1H4kH {\n color: #737373;\n font-size: 0.8em;\n padding-bottom: 0.7em;\n padding-top: 0.3em; }\n\n.common-module_Grid__2CuvH {\n display: grid;\n grid-gap: 0.7em; }\n .common-module_Grid__2CuvH.common-module_Grid2__9CCag {\n grid-template-columns: repeat(2, 1fr); }\n .common-module_Grid__2CuvH.common-module_Grid3__3p0jJ {\n grid-template-columns: repeat(3, 1fr); }\n @media only screen and (max-width: 768px) {\n .common-module_Grid__2CuvH {\n grid-template-columns: 1fr !important; } }\n\n.common-module_FormContainer__2I_Lj {\n padding: 0 0.7em; }\n\n.common-module_mtFormRow__2tsDn {\n margin-top: 0.7em; }\n\n.common-module_mt1__3tpC1 {\n margin-top: 1em; }\n\n.common-module_mt2__2bl5q {\n margin-top: 2em; }\n\n@keyframes common-module_fadeInFromRight__3RYk5 {\n from {\n opacity: 0;\n transform: translateY(10px); }\n to {\n opacity: 1;\n transform: translateY(0); } }\n";
28881
29806
  var commonStyles = {"FormSectionTitle":"common-module_FormSectionTitle___Mykh","Title":"common-module_Title__3JTHt","WithSubTitle":"common-module_WithSubTitle__1VHWv","SubTitle":"common-module_SubTitle__1H4kH","Grid":"common-module_Grid__2CuvH","Grid2":"common-module_Grid2__9CCag","Grid3":"common-module_Grid3__3p0jJ","FormContainer":"common-module_FormContainer__2I_Lj","mtFormRow":"common-module_mtFormRow__2tsDn","mt1":"common-module_mt1__3tpC1","mt2":"common-module_mt2__2bl5q","fadeInFromRight":"common-module_fadeInFromRight__3RYk5"};
28882
- styleInject(css_248z$2);
28883
-
28884
- var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: 1.5em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28885
- var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
28886
29807
  styleInject(css_248z$3);
28887
29808
 
29809
+ var css_248z$4 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: 1.5em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
29810
+ var styles$3 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
29811
+ styleInject(css_248z$4);
29812
+
28888
29813
  var AddressForm$1 = mobxReactLite.observer(function (_a) {
28889
- var _b, _c, _d, _e, _f;
28890
- var isErrorsVisible = _a.isErrorsVisible, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "validationResult"]);
28891
- var vm = React.useState(function () { return new AddressFormViewModel(props); })[0];
29814
+ var _b, _c, _d, _e, _f, _g, _h;
29815
+ var isErrorsVisible = _a.isErrorsVisible, isBilling = _a.isBilling, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "isBilling", "validationResult"]);
29816
+ var vm = React.useState(function () {
29817
+ return new AddressFormViewModel(__assign({}, props));
29818
+ })[0];
28892
29819
  React.useEffect(function () {
28893
29820
  Object.entries(props).forEach(function (entry) {
28894
29821
  return mobx.runInAction(function () {
@@ -28902,7 +29829,7 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
28902
29829
  React.createElement(FormItem, { type: FormItemType.TEXT, label: "Soyad", autocomplete: "family-name", value: vm.lastName || "", onChange: vm.onLastNameChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.lastName), errorText: "Soyad girin" }),
28903
29830
  React.createElement("div", null),
28904
29831
  " "),
28905
- React.createElement("div", { className: styles$2.RowPB },
29832
+ React.createElement("div", { className: styles$3.RowPB },
28906
29833
  React.createElement(FormItem, { type: FormItemType.TEXT, label: "Adres", autocomplete: "address-line1", value: vm.address.addressLine1 || "", onChange: vm.onAddressLine1Change, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.addressLine1), errorText: "Adres girin" })),
28907
29834
  React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
28908
29835
  React.createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-line2", label: "Apartman, daire, vb.", value: vm.address.addressLine2 || "", onChange: vm.onAddressLine2Change }),
@@ -28912,43 +29839,49 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
28912
29839
  React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
28913
29840
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u00DClke", autocomplete: "country-name", value: ((_b = vm.country) === null || _b === void 0 ? void 0 : _b.id) || "", onChange: vm.onCountryChange, options: vm.countryOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.country), errorText: "Ülke seçin" }),
28914
29841
  vm.hasState && (React.createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
28915
- React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
28916
- vm.districtOptions.length ? (React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (React.createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
29842
+ React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", autocomplete: "off", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
29843
+ vm.districtOptions.length ? (React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", autocomplete: "off", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.district), errorText: "İlçe seçin" })) : (React.createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-level3", label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
28917
29844
  !!vm.address.checkoutSettings &&
28918
29845
  vm.address.checkoutSettings.phoneRequirement !==
28919
- IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
29846
+ IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.TEL, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
28920
29847
  !!vm.address.checkoutSettings &&
28921
29848
  vm.address.checkoutSettings.identityNumberRequirement !==
28922
- IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" })))));
29849
+ IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" }))),
29850
+ !!isBilling && (React.createElement("div", { style: { marginTop: "12px" } },
29851
+ React.createElement(Checkbox, { value: vm.isCorporate, label: "Kurumsal fatura", onChange: vm.onCorporateChange }))),
29852
+ !!vm.isCorporate && (React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" "), style: { marginTop: "12px" } },
29853
+ React.createElement(FormItem, { type: FormItemType.TEXT, label: "\u015Eirket \u00DCnvan\u0131", value: vm.address.company || "", onChange: vm.onCompanyChange }),
29854
+ React.createElement(FormItem, { type: FormItemType.TEXT, label: "Vergi Numaras\u0131", value: ((_g = vm.address) === null || _g === void 0 ? void 0 : _g.taxNumber) || "", onChange: vm.onTaxNumberChange }),
29855
+ React.createElement(FormItem, { type: FormItemType.TEXT, label: "Vergi Dairesi", value: ((_h = vm.address) === null || _h === void 0 ? void 0 : _h.taxOffice) || "", onChange: vm.onTaxOfficeChange })))));
28923
29856
  });
28924
29857
 
28925
- var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28926
- var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28927
- styleInject(css_248z$4);
29858
+ var css_248z$5 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
29859
+ var styles$4 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
29860
+ styleInject(css_248z$5);
28928
29861
 
28929
29862
  var Button = mobxReactLite.observer(function (_a) {
28930
29863
  var text = _a.text, style = _a.style, onClick = _a.onClick, size = _a.size, isLoading = _a.isLoading, isDisabled = _a.isDisabled;
28931
29864
  return (React.createElement("button", { style: style, type: "button", className: [
28932
- styles$3.Button,
28933
- styles$3.Dark,
28934
- size === "medium" ? styles$3.Medium : styles$3.Large,
28935
- isDisabled ? styles$3.Disabled : "",
28936
- styles$3.FullWidthMobile,
28937
- ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (React.createElement("div", { className: styles$3.loader })) : (React.createElement("span", null, text))));
29865
+ styles$4.Button,
29866
+ styles$4.Dark,
29867
+ size === "medium" ? styles$4.Medium : styles$4.Large,
29868
+ isDisabled ? styles$4.Disabled : "",
29869
+ styles$4.FullWidthMobile,
29870
+ ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (React.createElement("div", { className: styles$4.loader })) : (React.createElement("span", null, text))));
28938
29871
  });
28939
29872
 
28940
- var css_248z$5 = ".style-module_BackButtonContainer__263Fp {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__263Fp a {\n line-height: 0.9em; }\n\n.style-module_Actions__EdBBN {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__EdBBN {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__EdBBN a {\n margin-top: 1em; } }\n";
28941
- var styles$4 = {"BackButtonContainer":"style-module_BackButtonContainer__263Fp","Actions":"style-module_Actions__EdBBN"};
28942
- styleInject(css_248z$5);
28943
-
28944
- var css_248z$6 = ".style-module_TextButton__XicpL {\n display: inline-flex;\n align-items: center;\n font-size: 0.8em;\n cursor: pointer;\n user-select: none; }\n .style-module_TextButton__XicpL .style-module_Icon__1W8cY {\n height: 24px;\n margin-right: 0.1em; }\n";
28945
- var styles$5 = {"TextButton":"style-module_TextButton__XicpL","Icon":"style-module_Icon__1W8cY"};
29873
+ var css_248z$6 = ".style-module_BackButtonContainer__263Fp {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__263Fp a {\n line-height: 0.9em; }\n\n.style-module_Actions__EdBBN {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__EdBBN {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__EdBBN a {\n margin-top: 1em; } }\n";
29874
+ var styles$5 = {"BackButtonContainer":"style-module_BackButtonContainer__263Fp","Actions":"style-module_Actions__EdBBN"};
28946
29875
  styleInject(css_248z$6);
28947
29876
 
29877
+ var css_248z$7 = ".style-module_TextButton__XicpL {\n display: inline-flex;\n align-items: center;\n font-size: 0.8em;\n cursor: pointer;\n user-select: none; }\n .style-module_TextButton__XicpL .style-module_Icon__1W8cY {\n height: 24px;\n margin-right: 0.1em; }\n";
29878
+ var styles$6 = {"TextButton":"style-module_TextButton__XicpL","Icon":"style-module_Icon__1W8cY"};
29879
+ styleInject(css_248z$7);
29880
+
28948
29881
  var TextButton = mobxReactLite.observer(function (_a) {
28949
29882
  var text = _a.text, leftIcon = _a.leftIcon;
28950
- return (React.createElement("div", { className: styles$5.TextButton },
28951
- !!leftIcon && React.createElement("div", { className: styles$5.Icon }, leftIcon),
29883
+ return (React.createElement("div", { className: styles$6.TextButton },
29884
+ !!leftIcon && React.createElement("div", { className: styles$6.Icon }, leftIcon),
28952
29885
  React.createElement("span", null, text)));
28953
29886
  });
28954
29887
 
@@ -28962,15 +29895,15 @@ var SVGArrowLeft = function (_a) {
28962
29895
  var StepActionButtons = mobxReactLite.observer(function (_a) {
28963
29896
  var mainBtnText = _a.mainBtnText, mainBtnOnClick = _a.mainBtnOnClick, backBtnText = _a.backBtnText, backBtnOnClick = _a.backBtnOnClick, isLoading = _a.isLoading;
28964
29897
  var MainButton = mobxReactLite.observer(function () { return (React.createElement(Button, { text: mainBtnText, isLoading: isLoading, onClick: mainBtnOnClick })); });
28965
- return (React.createElement("div", { className: [styles$4.Actions, commonStyles.mt1].join(" ") },
28966
- React.createElement("div", { className: styles$4.BackButtonContainer }, !!backBtnText && (React.createElement("a", { onClick: backBtnOnClick },
29898
+ return (React.createElement("div", { className: [styles$5.Actions, commonStyles.mt1].join(" ") },
29899
+ React.createElement("div", { className: styles$5.BackButtonContainer }, !!backBtnText && (React.createElement("a", { onClick: backBtnOnClick },
28967
29900
  React.createElement(TextButton, { text: backBtnText, leftIcon: React.createElement(SVGArrowLeft, null) })))),
28968
29901
  React.createElement(MainButton, null)));
28969
29902
  });
28970
29903
 
28971
- var css_248z$7 = ".style-module_LoginText__3cWRW {\n font-size: 0.8em;\n padding-bottom: 0.7em;\n text-align: right; }\n\n.style-module_LoginBtn__1BIyI {\n margin-left: 0.2em;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500; }\n\n.style-module_CustomerInfo__3py5O {\n display: flex;\n align-items: center; }\n .style-module_CustomerInfo__3py5O .style-module_ProfilePic__2fNqg {\n width: 50px;\n height: 50px;\n border-radius: 6px;\n background-color: #737373;\n margin-right: 1em; }\n .style-module_CustomerInfo__3py5O .style-module_CustonerText__1sYEW {\n font-size: 0.9em; }\n .style-module_CustomerInfo__3py5O .style-module_Logout__1bzMp {\n font-weight: 500;\n font-size: 0.8em;\n user-select: none;\n cursor: pointer; }\n";
28972
- var styles$6 = {"LoginText":"style-module_LoginText__3cWRW","LoginBtn":"style-module_LoginBtn__1BIyI","CustomerInfo":"style-module_CustomerInfo__3py5O","ProfilePic":"style-module_ProfilePic__2fNqg","CustonerText":"style-module_CustonerText__1sYEW","Logout":"style-module_Logout__1bzMp"};
28973
- styleInject(css_248z$7);
29904
+ var css_248z$8 = ".style-module_LoginText__3cWRW {\n font-size: 0.8em;\n padding-bottom: 0.7em;\n text-align: right; }\n\n.style-module_LoginBtn__1BIyI {\n margin-left: 0.2em;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500; }\n\n.style-module_CustomerInfo__3py5O {\n display: flex;\n align-items: center; }\n .style-module_CustomerInfo__3py5O .style-module_ProfilePic__2fNqg {\n width: 50px;\n height: 50px;\n border-radius: 6px;\n background-color: #737373;\n margin-right: 1em; }\n .style-module_CustomerInfo__3py5O .style-module_CustonerText__1sYEW {\n font-size: 0.9em; }\n .style-module_CustomerInfo__3py5O .style-module_Logout__1bzMp {\n font-weight: 500;\n font-size: 0.8em;\n user-select: none;\n cursor: pointer; }\n";
29905
+ var styles$7 = {"LoginText":"style-module_LoginText__3cWRW","LoginBtn":"style-module_LoginBtn__1BIyI","CustomerInfo":"style-module_CustomerInfo__3py5O","ProfilePic":"style-module_ProfilePic__2fNqg","CustonerText":"style-module_CustonerText__1sYEW","Logout":"style-module_Logout__1bzMp"};
29906
+ styleInject(css_248z$8);
28974
29907
 
28975
29908
  var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
28976
29909
  var _b, _c;
@@ -28996,20 +29929,20 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
28996
29929
  return (React.createElement("div", { className: commonStyles.FormContainer },
28997
29930
  React.createElement("div", { className: commonStyles.FormSectionTitle },
28998
29931
  React.createElement("div", { className: commonStyles.Title }, "\u0130leti\u015Fim Bilgileri"),
28999
- !vm.checkout.hasCustomer && (React.createElement("div", { className: styles$6.LoginText },
29932
+ !vm.checkout.hasCustomer && (React.createElement("div", { className: styles$7.LoginText },
29000
29933
  React.createElement("span", null, "Zaten hesab\u0131n\u0131z var m\u0131?"),
29001
29934
  React.createElement(Link__default['default'], { href: "/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl), passHref: true },
29002
- React.createElement("a", { className: styles$6.LoginBtn }, "Oturum A\u00E7"))))),
29003
- !vm.checkout.hasCustomer ? (React.createElement(FormItem, { type: FormItemType.TEXT, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (React.createElement("div", { className: styles$6.CustomerInfo },
29935
+ React.createElement("a", { className: styles$7.LoginBtn }, "Oturum A\u00E7"))))),
29936
+ !vm.checkout.hasCustomer ? (React.createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.EMAIL, label: "E-Posta", autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: vm.onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: "Geçerli bir e-posta girin" })) : (React.createElement("div", { className: styles$7.CustomerInfo },
29004
29937
  React.createElement("div", null,
29005
- React.createElement("div", { className: styles$6.CustonerText }, vm.checkout.customerText),
29006
- React.createElement("div", { className: styles$6.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
29938
+ React.createElement("div", { className: styles$7.CustonerText }, vm.checkout.customerText),
29939
+ React.createElement("div", { className: styles$7.Logout, onClick: vm.logout }, "Oturumu Kapat")))),
29007
29940
  React.createElement("div", { className: commonStyles.FormSectionTitle },
29008
29941
  React.createElement("div", { className: commonStyles.Title }, "Kargo Adresi")),
29009
29942
  !!vm.customerStore.customer &&
29010
- !!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$2.RowPB },
29943
+ !!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$3.RowPB },
29011
29944
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedShippingAddressId, onChange: vm.onSelectedShippingAddressIdChange, options: vm.customerAddressOptions }))),
29012
- React.createElement(AddressForm$1, { address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
29945
+ React.createElement(AddressForm$1, { vm: vm, address: vm.checkout.shippingAddress, customer: vm.checkout.customer && vm.checkout.customer.id
29013
29946
  ? undefined
29014
29947
  : vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, allowedCountryIds: vm.shippingCountryIds || undefined, validationResult: vm.checkout.shippingAddress.validationResult }),
29015
29948
  !!vm.customerStore.customer && vm.selectedShippingAddressId === "-1" && (React.createElement("div", { style: { marginTop: "12px" } },
@@ -29019,51 +29952,51 @@ var CheckoutStepInfo = mobxReactLite.observer(function (_a) {
29019
29952
  React.createElement(StepActionButtons, { mainBtnText: "Kargo ile devam et", mainBtnOnClick: proceed, backBtnText: "Alışverişe dön", backBtnOnClick: vm.onBackToShoppingClick, isLoading: vm.isStepLoading })));
29020
29953
  });
29021
29954
 
29022
- var css_248z$8 = ".style-module_InfoBox__2ejTN {\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n padding: 0.4em 1em;\n font-size: 0.8em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 {\n display: flex;\n padding: 0.8em 0;\n width: 100%; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: flex;\n flex: 1 1 auto;\n align-items: center; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n color: #737373;\n flex: 0 0 auto;\n width: 5em;\n padding-right: 1em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Text__3UHTQ {\n flex: 1 1 auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: block; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n width: auto; } }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_Action__2MjM2 {\n flex: 0 0 auto;\n padding-left: 1em;\n user-select: none;\n cursor: pointer; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5.style-module_BorderTop__1RCLf {\n border-top: 1px solid #d9d9d9; }\n";
29023
- var styles$7 = {"InfoBox":"style-module_InfoBox__2ejTN","InfoRow":"style-module_InfoRow__3PsC5","TitleAndText":"style-module_TitleAndText__1Or7p","Title":"style-module_Title__1UpwW","Text":"style-module_Text__3UHTQ","Action":"style-module_Action__2MjM2","BorderTop":"style-module_BorderTop__1RCLf"};
29024
- styleInject(css_248z$8);
29955
+ var css_248z$9 = ".style-module_InfoBox__2ejTN {\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n padding: 0.4em 1em;\n font-size: 0.8em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 {\n display: flex;\n padding: 0.8em 0;\n width: 100%; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: flex;\n flex: 1 1 auto;\n align-items: center; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n color: #737373;\n flex: 0 0 auto;\n width: 5em;\n padding-right: 1em; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Text__3UHTQ {\n flex: 1 1 auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p {\n display: block; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_TitleAndText__1Or7p .style-module_Title__1UpwW {\n width: auto; } }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5 .style-module_Action__2MjM2 {\n flex: 0 0 auto;\n padding-left: 1em;\n user-select: none;\n cursor: pointer; }\n .style-module_InfoBox__2ejTN .style-module_InfoRow__3PsC5.style-module_BorderTop__1RCLf {\n border-top: 1px solid #d9d9d9; }\n";
29956
+ var styles$8 = {"InfoBox":"style-module_InfoBox__2ejTN","InfoRow":"style-module_InfoRow__3PsC5","TitleAndText":"style-module_TitleAndText__1Or7p","Title":"style-module_Title__1UpwW","Text":"style-module_Text__3UHTQ","Action":"style-module_Action__2MjM2","BorderTop":"style-module_BorderTop__1RCLf"};
29957
+ styleInject(css_248z$9);
29025
29958
 
29026
29959
  var InfoBox = mobxReactLite.observer(function (_a) {
29027
29960
  var _b, _c;
29028
29961
  var vm = _a.vm, showShipping = _a.showShipping;
29029
- return (React.createElement("div", { className: styles$7.InfoBox },
29030
- React.createElement("div", { className: styles$7.InfoRow },
29031
- React.createElement("div", { className: styles$7.TitleAndText },
29032
- React.createElement("div", { className: styles$7.Title }, "\u0130leti\u015Fim"),
29033
- React.createElement("div", { className: styles$7.Text }, ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "")),
29034
- React.createElement("div", { className: styles$7.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29035
- React.createElement("div", { className: [styles$7.InfoRow, styles$7.BorderTop].join(" ") },
29036
- React.createElement("div", { className: styles$7.TitleAndText },
29037
- React.createElement("div", { className: styles$7.Title }, "Kargo Adresi"),
29038
- React.createElement("div", { className: styles$7.Text }, (_c = vm.checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.addressText)),
29039
- React.createElement("div", { className: styles$7.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29040
- showShipping && (React.createElement("div", { className: [styles$7.InfoRow, styles$7.BorderTop].join(" ") },
29041
- React.createElement("div", { className: styles$7.TitleAndText },
29042
- React.createElement("div", { className: styles$7.Title }, "Y\u00F6ntem"),
29043
- React.createElement("div", { className: styles$7.Text }, vm.checkout.shippingLines && !!vm.checkout.shippingLines.length
29962
+ return (React.createElement("div", { className: styles$8.InfoBox },
29963
+ React.createElement("div", { className: styles$8.InfoRow },
29964
+ React.createElement("div", { className: styles$8.TitleAndText },
29965
+ React.createElement("div", { className: styles$8.Title }, "\u0130leti\u015Fim"),
29966
+ React.createElement("div", { className: styles$8.Text }, ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "")),
29967
+ React.createElement("div", { className: styles$8.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29968
+ React.createElement("div", { className: [styles$8.InfoRow, styles$8.BorderTop].join(" ") },
29969
+ React.createElement("div", { className: styles$8.TitleAndText },
29970
+ React.createElement("div", { className: styles$8.Title }, "Kargo Adresi"),
29971
+ React.createElement("div", { className: styles$8.Text }, (_c = vm.checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.addressText)),
29972
+ React.createElement("div", { className: styles$8.Action, onClick: vm.onBackToInfoClick }, "De\u011Fi\u015Ftir")),
29973
+ showShipping && (React.createElement("div", { className: [styles$8.InfoRow, styles$8.BorderTop].join(" ") },
29974
+ React.createElement("div", { className: styles$8.TitleAndText },
29975
+ React.createElement("div", { className: styles$8.Title }, "Y\u00F6ntem"),
29976
+ React.createElement("div", { className: styles$8.Text }, vm.checkout.shippingLines && !!vm.checkout.shippingLines.length
29044
29977
  ? vm.checkout.shippingLines[0].title
29045
29978
  : "Standart Kargo"))))));
29046
29979
  });
29047
29980
 
29048
- var css_248z$9 = ".style-module_Toggle__xQUYz {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n border: 1px solid #d9d9d9;\n transition: all .2s ease-in-out; }\n .style-module_Toggle__xQUYz.style-module_Checked__2kb9S {\n border: 8px solid #111111; }\n";
29049
- var styles$8 = {"Toggle":"style-module_Toggle__xQUYz","Checked":"style-module_Checked__2kb9S"};
29050
- styleInject(css_248z$9);
29981
+ var css_248z$a = ".style-module_Toggle__xQUYz {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n border: 1px solid #d9d9d9;\n transition: all .2s ease-in-out; }\n .style-module_Toggle__xQUYz.style-module_Checked__2kb9S {\n border: 8px solid #111111; }\n";
29982
+ var styles$9 = {"Toggle":"style-module_Toggle__xQUYz","Checked":"style-module_Checked__2kb9S"};
29983
+ styleInject(css_248z$a);
29051
29984
 
29052
29985
  var Toggle = mobxReactLite.observer(function (_a) {
29053
29986
  var value = _a.value, onChange = _a.onChange;
29054
29987
  var _onChange = function () {
29055
29988
  onChange && onChange(!value);
29056
29989
  };
29057
- var classes = [styles$8.Toggle];
29990
+ var classes = [styles$9.Toggle];
29058
29991
  if (value) {
29059
- classes.push(styles$8.Checked);
29992
+ classes.push(styles$9.Checked);
29060
29993
  }
29061
29994
  return React.createElement("div", { className: classes.join(" "), onClick: _onChange });
29062
29995
  });
29063
29996
 
29064
- var css_248z$a = ".style-module_BackButtonContainer__2bAOw {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__2bAOw a {\n line-height: 0.9em; }\n\n.style-module_Actions__3fU7l {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__3fU7l {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__3fU7l a {\n margin-top: 1em; } }\n\n.style-module_StepShipping__3nOPT {\n margin-top: 1em; }\n\n.style-module_InfoBox__kyrCZ {\n border: 1px solid #d9d9d9;\n border-radius: 6px; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV {\n display: flex;\n padding: 1em;\n width: 100%;\n align-items: center; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingTitle__3db0q {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingPrice__KaEps {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_BorderTop__2d5TO {\n border-top: 1px solid #d9d9d9; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_Clickable__AkuRd {\n user-select: none;\n cursor: pointer; }\n";
29065
- var styles$9 = {"BackButtonContainer":"style-module_BackButtonContainer__2bAOw","Actions":"style-module_Actions__3fU7l","StepShipping":"style-module_StepShipping__3nOPT","InfoBox":"style-module_InfoBox__kyrCZ","InfoRow":"style-module_InfoRow__3RoAV","ShippingTitle":"style-module_ShippingTitle__3db0q","ShippingPrice":"style-module_ShippingPrice__KaEps","BorderTop":"style-module_BorderTop__2d5TO","Clickable":"style-module_Clickable__AkuRd"};
29066
- styleInject(css_248z$a);
29997
+ var css_248z$b = ".style-module_BackButtonContainer__2bAOw {\n display: flex;\n justify-content: center;\n position: relative; }\n .style-module_BackButtonContainer__2bAOw a {\n line-height: 0.9em; }\n\n.style-module_Actions__3fU7l {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n @media only screen and (max-width: 1000px) {\n .style-module_Actions__3fU7l {\n flex-direction: column-reverse;\n justify-content: flex-start; }\n .style-module_Actions__3fU7l a {\n margin-top: 1em; } }\n\n.style-module_StepShipping__3nOPT {\n margin-top: 1em; }\n\n.style-module_InfoBox__kyrCZ {\n border: 1px solid #d9d9d9;\n border-radius: 6px; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV {\n display: flex;\n padding: 1em;\n width: 100%;\n align-items: center; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingTitle__3db0q {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV .style-module_ShippingPrice__KaEps {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_BorderTop__2d5TO {\n border-top: 1px solid #d9d9d9; }\n .style-module_InfoBox__kyrCZ .style-module_InfoRow__3RoAV.style-module_Clickable__AkuRd {\n user-select: none;\n cursor: pointer; }\n";
29998
+ var styles$a = {"BackButtonContainer":"style-module_BackButtonContainer__2bAOw","Actions":"style-module_Actions__3fU7l","StepShipping":"style-module_StepShipping__3nOPT","InfoBox":"style-module_InfoBox__kyrCZ","InfoRow":"style-module_InfoRow__3RoAV","ShippingTitle":"style-module_ShippingTitle__3db0q","ShippingPrice":"style-module_ShippingPrice__KaEps","BorderTop":"style-module_BorderTop__2d5TO","Clickable":"style-module_Clickable__AkuRd"};
29999
+ styleInject(css_248z$b);
29067
30000
 
29068
30001
  var CheckoutStepShipping = mobxReactLite.observer(function (_a) {
29069
30002
  var vm = _a.vm;
@@ -29085,42 +30018,42 @@ var CheckoutStepShipping = mobxReactLite.observer(function (_a) {
29085
30018
  }
29086
30019
  });
29087
30020
  }); };
29088
- return (React.createElement("div", { className: [styles$9.StepShipping, commonStyles.FormContainer].join(" ") },
30021
+ return (React.createElement("div", { className: [styles$a.StepShipping, commonStyles.FormContainer].join(" ") },
29089
30022
  React.createElement(InfoBox, { vm: vm, showShipping: false }),
29090
30023
  React.createElement("div", { className: commonStyles.FormSectionTitle },
29091
30024
  React.createElement("div", { className: commonStyles.Title }, "Kargo Y\u00F6ntemi")),
29092
- React.createElement("div", { className: styles$9.InfoBox }, vm.checkout.availableShippingMethods.map(function (asm, index) { return (React.createElement("div", { className: [
29093
- styles$9.InfoRow,
29094
- styles$9.Clickable,
29095
- index > 0 ? styles$9.BorderTop : "",
30025
+ React.createElement("div", { className: styles$a.InfoBox }, vm.checkout.availableShippingMethods.map(function (asm, index) { return (React.createElement("div", { className: [
30026
+ styles$a.InfoRow,
30027
+ styles$a.Clickable,
30028
+ index > 0 ? styles$a.BorderTop : "",
29096
30029
  ].join(" "), key: asm.shippingSettingsId + asm.shippingZoneRateId, onClick: function () { return vm.onShippingMethodChange(asm); } },
29097
30030
  React.createElement(Toggle, { value: vm.checkout.shippingSettingsId === asm.shippingSettingsId &&
29098
30031
  vm.checkout.shippingZoneRateId === asm.shippingZoneRateId }),
29099
- React.createElement("div", { className: styles$9.ShippingTitle }, asm.rateName),
29100
- React.createElement("div", { className: styles$9.ShippingPrice }, asm.price === 0
30032
+ React.createElement("div", { className: styles$a.ShippingTitle }, asm.rateName),
30033
+ React.createElement("div", { className: styles$a.ShippingPrice }, asm.price === 0
29101
30034
  ? "Ücretsiz"
29102
30035
  : formatMoney(asm.price, vm.checkout.cart.currencyCode)))); })),
29103
30036
  React.createElement(StepActionButtons, { mainBtnText: "Ödeme ile devam et", mainBtnOnClick: proceed, backBtnText: "Bilgilere Geri Dön", backBtnOnClick: vm.onBackToInfoClick, isLoading: vm.isStepLoading })));
29104
30037
  });
29105
30038
 
29106
- var css_248z$b = ".style-module_ExpandableList__20vYy {\n width: 100%;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n overflow: hidden; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN {\n display: flex;\n flex-wrap: wrap;\n padding: 1em;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px solid #d9d9d9;\n cursor: pointer;\n overflow: hidden;\n user-select: none; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_LeftContainer__tkYOm {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_RightContainer__dtzrC {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN.style-module_HiddenBorderTop__EHL4B {\n border-top: none; }\n .style-module_ExpandableList__20vYy .style-module_ExpandContainer__3fGdr {\n width: 100%;\n padding: 1em;\n background-color: #FAFAFA;\n border-top: 1px solid #d9d9d9; }\n";
29107
- var styles$a = {"ExpandableList":"style-module_ExpandableList__20vYy","Row":"style-module_Row__2yFvN","LeftContainer":"style-module_LeftContainer__tkYOm","RightContainer":"style-module_RightContainer__dtzrC","HiddenBorderTop":"style-module_HiddenBorderTop__EHL4B","ExpandContainer":"style-module_ExpandContainer__3fGdr"};
29108
- styleInject(css_248z$b);
30039
+ var css_248z$c = ".style-module_ExpandableList__20vYy {\n width: 100%;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n overflow: hidden; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN {\n display: flex;\n flex-wrap: wrap;\n padding: 1em;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px solid #d9d9d9;\n cursor: pointer;\n overflow: hidden;\n user-select: none; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_LeftContainer__tkYOm {\n flex: 1 1 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN .style-module_RightContainer__dtzrC {\n flex: 0 0 auto;\n margin-left: 1em; }\n .style-module_ExpandableList__20vYy .style-module_Row__2yFvN.style-module_HiddenBorderTop__EHL4B {\n border-top: none; }\n .style-module_ExpandableList__20vYy .style-module_ExpandContainer__3fGdr {\n width: 100%;\n padding: 1em;\n background-color: #FAFAFA;\n border-top: 1px solid #d9d9d9; }\n";
30040
+ var styles$b = {"ExpandableList":"style-module_ExpandableList__20vYy","Row":"style-module_Row__2yFvN","LeftContainer":"style-module_LeftContainer__tkYOm","RightContainer":"style-module_RightContainer__dtzrC","HiddenBorderTop":"style-module_HiddenBorderTop__EHL4B","ExpandContainer":"style-module_ExpandContainer__3fGdr"};
30041
+ styleInject(css_248z$c);
29109
30042
 
29110
30043
  var ExpandableList = mobxReactLite.observer(function (_a) {
29111
30044
  var options = _a.options, selectedIndex = _a.selectedIndex, onRowSelect = _a.onRowSelect;
29112
30045
  var getRowClasses = function (index) {
29113
- var classes = [styles$a.Row];
30046
+ var classes = [styles$b.Row];
29114
30047
  if (index === 0)
29115
- classes.push(styles$a.HiddenBorderTop);
30048
+ classes.push(styles$b.HiddenBorderTop);
29116
30049
  return classes.join(" ");
29117
30050
  };
29118
- return (React.createElement("div", { className: styles$a.ExpandableList }, options.map(function (o, index) { return (React.createElement("div", { key: index },
30051
+ return (React.createElement("div", { className: styles$b.ExpandableList }, options.map(function (o, index) { return (React.createElement("div", { key: index },
29119
30052
  React.createElement("div", { className: getRowClasses(index), onClick: function () { return onRowSelect(index); } },
29120
30053
  React.createElement(Toggle, { value: selectedIndex === index }),
29121
- React.createElement("div", { className: styles$a.LeftContainer }, o.leftContent),
29122
- !!o.rightContent && (React.createElement("div", { className: styles$a.RightContainer }, o.rightContent))),
29123
- selectedIndex === index && !!o.expandContent && (React.createElement("div", { className: styles$a.ExpandContainer }, o.expandContent)))); })));
30054
+ React.createElement("div", { className: styles$b.LeftContainer }, o.leftContent),
30055
+ !!o.rightContent && (React.createElement("div", { className: styles$b.RightContainer }, o.rightContent))),
30056
+ selectedIndex === index && !!o.expandContent && (React.createElement("div", { className: styles$b.ExpandContainer }, o.expandContent)))); })));
29124
30057
  });
29125
30058
 
29126
30059
  var CreditCardForm = mobxReactLite.observer(function (_a) {
@@ -29132,41 +30065,41 @@ var CreditCardForm = mobxReactLite.observer(function (_a) {
29132
30065
  cardData.threeDSecure = value;
29133
30066
  });
29134
30067
  return (React.createElement("div", null,
29135
- React.createElement("div", { className: styles$2.RowPB },
29136
- React.createElement(FormItem, { autocomplete: "cc-number", type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
29137
- React.createElement("div", { className: styles$2.RowPB },
30068
+ React.createElement("div", { className: styles$3.RowPB },
30069
+ React.createElement(FormItem, { autocomplete: "cc-number", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Kart numarası", value: cardData.cardNumber, onChange: vm.onCardNumberChange, errorText: "Geçerli bir kart numarası girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardNumber })),
30070
+ React.createElement("div", { className: styles$3.RowPB },
29138
30071
  React.createElement(FormItem, { autocomplete: "cc-name", type: FormItemType.TEXT, label: "Karttaki ad", value: cardData.cardHolderName, onChange: vm.onCardHolderNameChange, errorText: "Ad soyad girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cardHolderName })),
29139
30072
  React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
29140
- React.createElement(FormItem, { autocomplete: "cc-exp", type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
29141
- React.createElement(FormItem, { autocomplete: "cc-csc", type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
30073
+ React.createElement(FormItem, { autocomplete: "cc-exp", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Son kullanma tarihi (AA/YY)", value: cardData.expirationDate, onChange: vm.onExpirationDateChange, errorText: "Geçerli bir tarih girin", hasError: vm.isErrorsVisible && !cardData.validationResult.expirationDate }),
30074
+ React.createElement(FormItem, { autocomplete: "cc-csc", inputType: FormItemInputType.NUMERIC, type: FormItemType.TEXT, label: "Güvenlik kodu", value: cardData.cvv, onChange: vm.onCvcChange, errorText: "Geçerli bir güvenlik kodu girin", hasError: vm.isErrorsVisible && !cardData.validationResult.cvv })),
29142
30075
  React.createElement("div", { style: { marginTop: "0.4em" } },
29143
30076
  React.createElement(Checkbox, { value: cardData.threeDSecure, onChange: onThreeDSecureChange, label: "3D Secure kullan" }))));
29144
30077
  });
29145
30078
 
29146
- var css_248z$c = ".style-module_PaymentLogoContainer__224HZ {\n margin-left: 10px;\n font-size: 0.7em; }\n .style-module_PaymentLogoContainer__224HZ img {\n height: 20px; }\n";
29147
- var styles$b = {"PaymentLogoContainer":"style-module_PaymentLogoContainer__224HZ"};
29148
- styleInject(css_248z$c);
29149
-
29150
- var css_248z$d = ".style-module_Installments__aM2lS {\n background: white; }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH {\n display: flex;\n flex-direction: column;\n min-height: 42px;\n justify-content: center; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentCount__22FOH {\n font-size: 0.9em; } }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentPrice__1cJHw {\n font-size: 0.78em;\n color: #545454; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Right__38yQx {\n font-size: 0.9em; } }\n";
29151
- var styles$c = {"Installments":"style-module_Installments__aM2lS","Left":"style-module_Left__b5nmH","InstallmentCount":"style-module_InstallmentCount__22FOH","InstallmentPrice":"style-module_InstallmentPrice__1cJHw","Right":"style-module_Right__38yQx"};
30079
+ var css_248z$d = ".style-module_PaymentLogoContainer__224HZ {\n margin-left: 10px;\n font-size: 0.7em; }\n .style-module_PaymentLogoContainer__224HZ img {\n height: 20px; }\n";
30080
+ var styles$c = {"PaymentLogoContainer":"style-module_PaymentLogoContainer__224HZ"};
29152
30081
  styleInject(css_248z$d);
29153
30082
 
30083
+ var css_248z$e = ".style-module_Installments__aM2lS {\n background: white; }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH {\n display: flex;\n flex-direction: column;\n min-height: 42px;\n justify-content: center; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentCount__22FOH {\n font-size: 0.9em; } }\n .style-module_Installments__aM2lS .style-module_Left__b5nmH .style-module_InstallmentPrice__1cJHw {\n font-size: 0.78em;\n color: #545454; }\n @media only screen and (max-width: 1000px) {\n .style-module_Installments__aM2lS .style-module_Right__38yQx {\n font-size: 0.9em; } }\n";
30084
+ var styles$d = {"Installments":"style-module_Installments__aM2lS","Left":"style-module_Left__b5nmH","InstallmentCount":"style-module_InstallmentCount__22FOH","InstallmentPrice":"style-module_InstallmentPrice__1cJHw","Right":"style-module_Right__38yQx"};
30085
+ styleInject(css_248z$e);
30086
+
29154
30087
  var Installments = mobxReactLite.observer(function (_a) {
29155
30088
  var _b;
29156
30089
  var vm = _a.vm;
29157
30090
  var expandableListOptionsInstallment = ((_b = vm.installmentInfo) === null || _b === void 0 ? void 0 : _b.installmentPrices.map(function (i) { return ({
29158
- leftContent: (React.createElement("div", { className: styles$c.Left },
29159
- React.createElement("div", { className: styles$c.InstallmentCount }, i.installmentCount === 1
30091
+ leftContent: (React.createElement("div", { className: styles$d.Left },
30092
+ React.createElement("div", { className: styles$d.InstallmentCount }, i.installmentCount === 1
29160
30093
  ? "Tek Çekim"
29161
30094
  : i.installmentCount + " Taksit"),
29162
- i.installmentCount > 1 && (React.createElement("div", { className: styles$c.InstallmentPrice }, "Aylık " +
30095
+ i.installmentCount > 1 && (React.createElement("div", { className: styles$d.InstallmentPrice }, "Aylık " +
29163
30096
  formatMoney(i.installmentPrice, vm.checkout.cart.currencyCode))))),
29164
- rightContent: (React.createElement("div", { className: styles$c.Right }, formatMoney(i.totalPrice, vm.checkout.cart.currencyCode))),
30097
+ rightContent: (React.createElement("div", { className: styles$d.Right }, formatMoney(i.totalPrice, vm.checkout.cart.currencyCode))),
29165
30098
  }); })) || [];
29166
30099
  return (React.createElement(React.Fragment, null,
29167
30100
  React.createElement("div", { className: commonStyles.FormSectionTitle },
29168
30101
  React.createElement("div", { className: [commonStyles.Title].join(" ") }, "Taksit Se\u00E7enekleri")),
29169
- React.createElement("div", { className: styles$c.Installments },
30102
+ React.createElement("div", { className: styles$d.Installments },
29170
30103
  React.createElement(ExpandableList, { options: expandableListOptionsInstallment, selectedIndex: vm.selectedInstallmentIndex, onRowSelect: function (index) {
29171
30104
  var _a;
29172
30105
  return vm.setInstallmentCount((_a = vm.installmentInfo) === null || _a === void 0 ? void 0 : _a.installmentPrices[index].installmentCount);
@@ -29189,8 +30122,8 @@ var PaymentGateways = mobxReactLite.observer(function (_a) {
29189
30122
  React.createElement(CreditCardForm, { vm: vm }),
29190
30123
  vm.installmentInfo && React.createElement(Installments, { vm: vm }))) : pg.description ? (React.createElement("div", null, pg.description)) : undefined,
29191
30124
  rightContent: (React.createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
29192
- return pm.logoUrl ? (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
29193
- React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
30125
+ return pm.logoUrl ? (React.createElement("div", { className: styles$c.PaymentLogoContainer, key: index },
30126
+ React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$c.PaymentLogoContainer, key: index }));
29194
30127
  }))),
29195
30128
  }); });
29196
30129
  return (React.createElement(React.Fragment, null,
@@ -29222,9 +30155,9 @@ var BillingAddress = mobxReactLite.observer(function (_a) {
29222
30155
  leftContent: React.createElement("div", null, "Farkl\u0131 bir fatura adresi kullan"),
29223
30156
  expandContent: (React.createElement(React.Fragment, null,
29224
30157
  !!vm.customerStore.customer &&
29225
- !!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$2.RowPB },
30158
+ !!vm.customerStore.customer.addresses.length && (React.createElement("div", { className: styles$3.RowPB },
29226
30159
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "Kaydedilen adresler", value: vm.selectedBillingAddressId, onChange: vm.onSelectedBillingAddressIdChange, options: vm.customerAddressOptions }))),
29227
- React.createElement(AddressForm$1, { address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult }))),
30160
+ React.createElement(AddressForm$1, { vm: vm, address: vm.checkout.billingAddress, customer: vm.checkout.customer || undefined, isErrorsVisible: vm.isErrorsVisible, validationResult: vm.checkout.billingAddress.validationResult, isBilling: true }))),
29228
30161
  },
29229
30162
  ]; });
29230
30163
  return (React.createElement(React.Fragment, null,
@@ -29234,9 +30167,9 @@ var BillingAddress = mobxReactLite.observer(function (_a) {
29234
30167
  React.createElement(ExpandableList, { options: expandableListOptionsBilling.get(), selectedIndex: selectedBillingRowIndex, onRowSelect: onSelectedBillingRowIndexChange })));
29235
30168
  });
29236
30169
 
29237
- var css_248z$e = ".style-module_StepPayment__3STxe {\n margin-top: 1em; }\n .style-module_StepPayment__3STxe .style-module_TermsLabelSpan__35xVC {\n text-decoration: underline; }\n";
29238
- var styles$d = {"StepPayment":"style-module_StepPayment__3STxe","TermsLabelSpan":"style-module_TermsLabelSpan__35xVC"};
29239
- styleInject(css_248z$e);
30170
+ var css_248z$f = ".style-module_StepPayment__3STxe {\n margin-top: 1em; }\n .style-module_StepPayment__3STxe .style-module_TermsLabelSpan__35xVC {\n text-decoration: underline; }\n";
30171
+ var styles$e = {"StepPayment":"style-module_StepPayment__3STxe","TermsLabelSpan":"style-module_TermsLabelSpan__35xVC"};
30172
+ styleInject(css_248z$f);
29240
30173
 
29241
30174
  var CheckoutStepPayment = mobxReactLite.observer(function (_a) {
29242
30175
  var vm = _a.vm;
@@ -29245,7 +30178,7 @@ var CheckoutStepPayment = mobxReactLite.observer(function (_a) {
29245
30178
  vm.policyModalTitle = "Mesafeli Satış Sözleşmesi";
29246
30179
  vm.policyModalText = vm.termsOfService;
29247
30180
  };
29248
- return (React.createElement("div", { className: [styles$d.StepPayment, commonStyles.FormContainer].join(" ") },
30181
+ return (React.createElement("div", { className: [styles$e.StepPayment, commonStyles.FormContainer].join(" ") },
29249
30182
  React.createElement(InfoBox, { vm: vm, showShipping: true }),
29250
30183
  React.createElement(PaymentGateways, { vm: vm }),
29251
30184
  React.createElement(BillingAddress, { vm: vm }),
@@ -29255,34 +30188,34 @@ var CheckoutStepPayment = mobxReactLite.observer(function (_a) {
29255
30188
  React.createElement(FormItem, { type: FormItemType.TEXT_AREA, label: "", value: vm.checkout.note || "", onChange: vm.onCheckoutNoteChange }))),
29256
30189
  vm.checkoutSettings.showTermsAndConditionsCheckbox && (React.createElement("div", { style: { marginTop: "12px" } },
29257
30190
  React.createElement(Checkbox, { value: vm.isTermsAndConditionsChecked, hasError: vm.isErrorsVisible && !vm.isTermsAndConditionsChecked, label: React.createElement(React.Fragment, null,
29258
- React.createElement("span", { className: styles$d.TermsLabelSpan, onClick: onShowTermsClick }, "Mesafeli sat\u0131\u015F s\u00F6zle\u015Fmesini"),
30191
+ React.createElement("span", { className: styles$e.TermsLabelSpan, onClick: onShowTermsClick }, "Mesafeli sat\u0131\u015F s\u00F6zle\u015Fmesini"),
29259
30192
  " ",
29260
30193
  "okudum ve onayl\u0131yorum"), onChange: vm.onTermsAndConditionsCheckedChange }))),
29261
30194
  React.createElement(StepActionButtons, { mainBtnText: "Şimdi öde", mainBtnOnClick: vm.performPayment, backBtnText: "Kargoya Geri Dön", backBtnOnClick: vm.onBackToShippingClick, isLoading: vm.isStepLoading })));
29262
30195
  });
29263
30196
 
29264
- var css_248z$f = ".style-module_CheckoutItem__2JjSt {\n display: flex;\n width: 100%;\n padding: 2em 0; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG {\n flex: 0 0 auto;\n width: 64px;\n height: 64px;\n position: relative;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Image__w2Q_P {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n border: 1px solid #d9d9d9; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Quantity__2lxki {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #737373;\n color: white;\n user-select: none;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2;\n font-size: 0.7em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX {\n flex: 1 1 auto;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 0.8em;\n font-weight: 500;\n color: #111111; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.8em;\n color: #737373; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n flex: 0 0 auto;\n font-size: 0.8em;\n height: 64px;\n display: flex;\n align-items: center; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.9em; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n font-size: 0.9em; } }\n";
29265
- var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Quantity":"style-module_Quantity__2lxki","Info":"style-module_Info__vt8mX","Name":"style-module_Name__nPgw1","VariantName":"style-module_VariantName__317OV","Price":"style-module_Price__1Vw31"};
29266
- styleInject(css_248z$f);
30197
+ var css_248z$g = ".style-module_CheckoutItem__2JjSt {\n display: flex;\n width: 100%;\n padding: 2em 0; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG {\n flex: 0 0 auto;\n width: 64px;\n height: 64px;\n position: relative;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Image__w2Q_P {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n border: 1px solid #d9d9d9; }\n .style-module_CheckoutItem__2JjSt .style-module_ImageContainer__2K2RG .style-module_Quantity__2lxki {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: #737373;\n color: white;\n user-select: none;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2;\n font-size: 0.7em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX {\n flex: 1 1 auto;\n margin-right: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 0.8em;\n font-weight: 500;\n color: #111111; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.8em;\n color: #737373; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n flex: 0 0 auto;\n font-size: 0.8em;\n height: 64px;\n display: flex;\n align-items: center; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_Name__nPgw1 {\n font-size: 1em; }\n .style-module_CheckoutItem__2JjSt .style-module_Info__vt8mX .style-module_VariantName__317OV {\n font-size: 0.9em; }\n .style-module_CheckoutItem__2JjSt .style-module_Price__1Vw31 {\n font-size: 0.9em; } }\n";
30198
+ var styles$f = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Quantity":"style-module_Quantity__2lxki","Info":"style-module_Info__vt8mX","Name":"style-module_Name__nPgw1","VariantName":"style-module_VariantName__317OV","Price":"style-module_Price__1Vw31"};
30199
+ styleInject(css_248z$g);
29267
30200
 
29268
30201
  var CartItem = mobxReactLite.observer(function (_a) {
29269
30202
  var _b;
29270
30203
  var currencyCode = _a.currencyCode, cartItem = _a.cartItem;
29271
- return (React.createElement("div", { className: styles$e.CheckoutItem },
29272
- React.createElement("div", { className: styles$e.ImageContainer },
29273
- React.createElement("img", { className: styles$e.Image, src: (_b = cartItem.variant.mainImage) === null || _b === void 0 ? void 0 : _b.thumbnailSrc }),
29274
- React.createElement("div", { className: styles$e.Quantity }, cartItem.quantity)),
29275
- React.createElement("div", { className: styles$e.Info },
29276
- React.createElement("div", { className: styles$e.Name }, cartItem.variant.name),
29277
- React.createElement("div", { className: styles$e.VariantName }, cartItem.variant.variantValues
30204
+ return (React.createElement("div", { className: styles$f.CheckoutItem },
30205
+ React.createElement("div", { className: styles$f.ImageContainer },
30206
+ React.createElement("img", { className: styles$f.Image, src: (_b = cartItem.variant.mainImage) === null || _b === void 0 ? void 0 : _b.thumbnailSrc }),
30207
+ React.createElement("div", { className: styles$f.Quantity }, cartItem.quantity)),
30208
+ React.createElement("div", { className: styles$f.Info },
30209
+ React.createElement("div", { className: styles$f.Name }, cartItem.variant.name),
30210
+ React.createElement("div", { className: styles$f.VariantName }, cartItem.variant.variantValues
29278
30211
  .map(function (vv) { return vv.variantValueName; })
29279
30212
  .join(", "))),
29280
- React.createElement("div", { className: styles$e.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
30213
+ React.createElement("div", { className: styles$f.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
29281
30214
  });
29282
30215
 
29283
- var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
29284
- var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
29285
- styleInject(css_248z$g);
30216
+ var css_248z$h = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
30217
+ var styles$g = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
30218
+ styleInject(css_248z$h);
29286
30219
 
29287
30220
  var SVGArrowDown = function (_a) {
29288
30221
  var className = _a.className;
@@ -29313,13 +30246,13 @@ var SVGCross = function (_a) {
29313
30246
  };
29314
30247
 
29315
30248
  var CartSummary = mobxReactLite.observer(function (_a) {
29316
- var _b;
30249
+ var _b, _c;
29317
30250
  var vm = _a.vm, allowExpand = _a.allowExpand;
29318
30251
  var cart = vm.cart;
29319
30252
  var checkout = vm.checkout;
29320
- var _c = React.useState(!allowExpand), isExpanded = _c[0], setExpanded = _c[1];
29321
- var _d = React.useState(0), detailsHeight = _d[0], setDetailsHeight = _d[1];
29322
- var _e = React.useState(null), detailsContainer = _e[0], setDetailsContainer = _e[1];
30253
+ var _d = React.useState(!allowExpand), isExpanded = _d[0], setExpanded = _d[1];
30254
+ var _e = React.useState(0), detailsHeight = _e[0], setDetailsHeight = _e[1];
30255
+ var _f = React.useState(null), detailsContainer = _f[0], setDetailsContainer = _f[1];
29323
30256
  React.useEffect(function () {
29324
30257
  if (!allowExpand)
29325
30258
  return;
@@ -29335,13 +30268,13 @@ var CartSummary = mobxReactLite.observer(function (_a) {
29335
30268
  ? "Sipariş özetini gizle"
29336
30269
  : "Sipariş özetini göster";
29337
30270
  var cartSummaryClasses = [
29338
- styles$f.CartSummary,
29339
- isExpanded ? styles$f.Visible : "",
29340
- allowExpand ? styles$f.AllowExpand : "",
30271
+ styles$g.CartSummary,
30272
+ isExpanded ? styles$g.Visible : "",
30273
+ allowExpand ? styles$g.AllowExpand : "",
29341
30274
  ].join(" ");
29342
30275
  var expandHeaderClasses = [
29343
- styles$f.ExpandHeader,
29344
- isExpanded ? styles$f.Expanded : "",
30276
+ styles$g.ExpandHeader,
30277
+ isExpanded ? styles$g.Expanded : "",
29345
30278
  ].join(" ");
29346
30279
  var detailsContainerStyle = allowExpand
29347
30280
  ? {
@@ -29349,53 +30282,57 @@ var CartSummary = mobxReactLite.observer(function (_a) {
29349
30282
  }
29350
30283
  : {};
29351
30284
  var arrowDownClasses = [
29352
- styles$f.ArrowDown,
29353
- isExpanded ? styles$f.Rotated : "",
30285
+ styles$g.ArrowDown,
30286
+ isExpanded ? styles$g.Rotated : "",
29354
30287
  ].join(" ");
29355
30288
  if (!cart)
29356
30289
  return null;
29357
30290
  return (React.createElement("div", { className: cartSummaryClasses },
29358
30291
  !!allowExpand && (React.createElement("div", { className: expandHeaderClasses, onClick: function () { return setExpanded(!isExpanded); } },
29359
- React.createElement("div", { className: styles$f.Left },
30292
+ React.createElement("div", { className: styles$g.Left },
29360
30293
  React.createElement(SVGShoppingBag, null),
29361
- React.createElement("span", { className: styles$f.Label }, expandHeaderLabel),
30294
+ React.createElement("span", { className: styles$g.Label }, expandHeaderLabel),
29362
30295
  React.createElement("div", { className: arrowDownClasses },
29363
30296
  React.createElement(SVGArrowDown, null))),
29364
- React.createElement("div", { className: styles$f.Price }, formatMoney(vm.installmentPrice ||
29365
- vm.checkout.totalFinalPrice ||
29366
- cart.totalPrice, cart.currencyCode)))),
29367
- React.createElement("div", { className: styles$f.DetailsContainer, style: detailsContainerStyle },
29368
- React.createElement("div", { className: styles$f.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
30297
+ React.createElement("div", { className: styles$g.Price }, formatMoney(vm.finalPrice, cart.currencyCode)))),
30298
+ React.createElement("div", { className: styles$g.DetailsContainer, style: detailsContainerStyle },
30299
+ React.createElement("div", { className: styles$g.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
29369
30300
  cart.items.map(function (item, index) { return (React.createElement("div", { key: index },
29370
30301
  React.createElement(CartItem, { cartItem: item, currencyCode: cart.currencyCode }),
29371
- React.createElement("div", { className: styles$f.Divider }))); }),
30302
+ React.createElement("div", { className: styles$g.Divider }))); }),
29372
30303
  React.createElement(Coupon, { vm: vm }),
29373
- React.createElement("div", { className: styles$f.SubTotalInfo },
29374
- React.createElement("div", { className: styles$f.InfoRow },
29375
- React.createElement("div", { className: styles$f.Label }, "Alt Toplam"),
29376
- React.createElement("div", { className: styles$f.Value }, formatMoney(cart.totalPrice, cart.currencyCode))),
29377
- !!((_b = checkout.shippingLines) === null || _b === void 0 ? void 0 : _b.length) && (React.createElement("div", { className: styles$f.InfoRow },
29378
- React.createElement("div", { className: styles$f.Label }, "Kargo"),
29379
- React.createElement("div", { className: styles$f.Value }, checkout.shippingTotal
30304
+ React.createElement("div", { className: styles$g.SubTotalInfo },
30305
+ React.createElement("div", { className: styles$g.InfoRow },
30306
+ React.createElement("div", { className: styles$g.Label }, "Alt Toplam"),
30307
+ React.createElement("div", { className: styles$g.Value }, formatMoney(cart.totalPrice, cart.currencyCode))),
30308
+ !!((_b = checkout.shippingLines) === null || _b === void 0 ? void 0 : _b.length) && (React.createElement("div", { className: styles$g.InfoRow },
30309
+ React.createElement("div", { className: styles$g.Label }, "Kargo"),
30310
+ React.createElement("div", { className: styles$g.Value }, checkout.shippingTotal
29380
30311
  ? formatMoney(checkout.shippingTotal, cart.currencyCode)
29381
30312
  : "Ücretsiz"))),
29382
- !!vm.installmentExtraPrice && (React.createElement("div", { className: styles$f.InfoRow },
29383
- React.createElement("div", { className: styles$f.Label }, "Vade Fark\u0131"),
29384
- React.createElement("div", { className: styles$f.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
29385
- sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (React.createElement("div", { className: styles$f.InfoRow, key: index },
29386
- React.createElement("div", { className: styles$f.Label }, adjustment.name),
29387
- React.createElement("div", { className: styles$f.Value },
30313
+ !!vm.installmentExtraPrice && (React.createElement("div", { className: styles$g.InfoRow },
30314
+ React.createElement("div", { className: styles$g.Label }, "Vade Fark\u0131"),
30315
+ React.createElement("div", { className: styles$g.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
30316
+ sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (React.createElement("div", { className: styles$g.InfoRow, key: index },
30317
+ React.createElement("div", { className: styles$g.Label }, adjustment.name),
30318
+ React.createElement("div", { className: styles$g.Value },
30319
+ React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
30320
+ " ",
30321
+ React.createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); }),
30322
+ (((_c = vm.selectedPaymentGateway) === null || _c === void 0 ? void 0 : _c.getCalculatedAdditionalPrices(vm.checkout.totalFinalPrice || 0, vm.checkout.shippingLines || null)) || [])
30323
+ .filter(function (adjustment) { return adjustment.amount !== 0; })
30324
+ .map(function (adjustment, index) { return (React.createElement("div", { className: styles$g.InfoRow, key: index },
30325
+ React.createElement("div", { className: styles$g.Label }, adjustment.name),
30326
+ React.createElement("div", { className: styles$g.Value },
29388
30327
  React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
29389
30328
  " ",
29390
30329
  React.createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); })),
29391
- React.createElement("div", { className: styles$f.TotalContainer },
29392
- React.createElement("div", { className: styles$f.TitleContainer },
29393
- React.createElement("div", { className: styles$f.Title }, "Toplam"),
29394
- !!(cart === null || cart === void 0 ? void 0 : cart.totalTax) && (React.createElement("div", { className: styles$f.Tax }, formatMoney(cart.totalTax, cart.currencyCode) +
30330
+ React.createElement("div", { className: styles$g.TotalContainer },
30331
+ React.createElement("div", { className: styles$g.TitleContainer },
30332
+ React.createElement("div", { className: styles$g.Title }, "Toplam"),
30333
+ !!(cart === null || cart === void 0 ? void 0 : cart.totalTax) && (React.createElement("div", { className: styles$g.Tax }, formatMoney(cart.totalTax, cart.currencyCode) +
29395
30334
  " vergi dahil"))),
29396
- React.createElement("div", { className: styles$f.TotalPrice }, formatMoney(vm.installmentPrice ||
29397
- vm.checkout.totalFinalPrice ||
29398
- cart.totalPrice, cart.currencyCode)))))));
30335
+ React.createElement("div", { className: styles$g.TotalPrice }, formatMoney(vm.finalPrice, cart.currencyCode)))))));
29399
30336
  });
29400
30337
  var Coupon = mobxReactLite.observer(function (_a) {
29401
30338
  var vm = _a.vm;
@@ -29432,34 +30369,34 @@ var Coupon = mobxReactLite.observer(function (_a) {
29432
30369
  }); };
29433
30370
  if (vm.step === CheckoutStep.SUCCESS)
29434
30371
  return null;
29435
- return (React.createElement("div", { className: styles$f.CouponContainer },
29436
- React.createElement("div", { className: styles$f.Coupon },
30372
+ return (React.createElement("div", { className: styles$g.CouponContainer },
30373
+ React.createElement("div", { className: styles$g.Coupon },
29437
30374
  React.createElement(FormItem, { type: FormItemType.TEXT, label: "Hediye kartı veya indirim kodu", value: couponCode, onChange: function (value) { return setCouponCode(value); } }),
29438
30375
  React.createElement(Button, { text: "Uygula", onClick: onCouponApply, isDisabled: !couponCode, isLoading: isLoadingCoupon, size: "medium", style: { marginLeft: "0.5em", maxWidth: "80px" } })),
29439
- !!vm.checkout.appliedCouponCode && (React.createElement("div", { className: styles$f.AppliedCoupon },
30376
+ !!vm.checkout.appliedCouponCode && (React.createElement("div", { className: styles$g.AppliedCoupon },
29440
30377
  React.createElement(SVGTag, null),
29441
- React.createElement("div", { className: styles$f.AppliedCouponCode }, vm.checkout.appliedCouponCode),
29442
- React.createElement("div", { className: styles$f.Cross, onClick: onClearCouponCode },
30378
+ React.createElement("div", { className: styles$g.AppliedCouponCode }, vm.checkout.appliedCouponCode),
30379
+ React.createElement("div", { className: styles$g.Cross, onClick: onClearCouponCode },
29443
30380
  React.createElement(SVGCross, null))))));
29444
30381
  });
29445
30382
 
29446
- var css_248z$h = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
29447
- var styles$g = {"Breadcrumbs":"style-module_Breadcrumbs__1jIPZ","Breadcrumb":"style-module_Breadcrumb__2qdy3","icon":"style-module_icon__3Rq6w","Active":"style-module_Active__3KwX8"};
29448
- styleInject(css_248z$h);
30383
+ var css_248z$i = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
30384
+ var styles$h = {"Breadcrumbs":"style-module_Breadcrumbs__1jIPZ","Breadcrumb":"style-module_Breadcrumb__2qdy3","icon":"style-module_icon__3Rq6w","Active":"style-module_Active__3KwX8"};
30385
+ styleInject(css_248z$i);
29449
30386
 
29450
30387
  var Breadcrumbs = mobxReactLite.observer(function (_a) {
29451
30388
  var vm = _a.vm;
29452
- var infoClasses = [styles$g.Breadcrumb];
29453
- var shippingClasses = [styles$g.Breadcrumb];
29454
- var paymentClasses = [styles$g.Breadcrumb];
30389
+ var infoClasses = [styles$h.Breadcrumb];
30390
+ var shippingClasses = [styles$h.Breadcrumb];
30391
+ var paymentClasses = [styles$h.Breadcrumb];
29455
30392
  if (vm.step === CheckoutStep.INFO) {
29456
- infoClasses.push(styles$g.Active);
30393
+ infoClasses.push(styles$h.Active);
29457
30394
  }
29458
30395
  if (vm.step === CheckoutStep.SHIPPING) {
29459
- shippingClasses.push(styles$g.Active);
30396
+ shippingClasses.push(styles$h.Active);
29460
30397
  }
29461
30398
  if (vm.step === CheckoutStep.PAYMENT) {
29462
- paymentClasses.push(styles$g.Active);
30399
+ paymentClasses.push(styles$h.Active);
29463
30400
  }
29464
30401
  var onShippingClick = function () {
29465
30402
  try {
@@ -29470,18 +30407,18 @@ var Breadcrumbs = mobxReactLite.observer(function (_a) {
29470
30407
  }
29471
30408
  catch (err) { }
29472
30409
  };
29473
- return (React.createElement("div", { className: styles$g.Breadcrumbs },
29474
- React.createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onGoToCartClick },
30410
+ return (React.createElement("div", { className: styles$h.Breadcrumbs },
30411
+ React.createElement("div", { className: styles$h.Breadcrumb, onClick: vm.onGoToCartClick },
29475
30412
  React.createElement("span", null, "Sepet"),
29476
- React.createElement("span", { className: styles$g.icon },
30413
+ React.createElement("span", { className: styles$h.icon },
29477
30414
  React.createElement(SVGArrowLeft, null))),
29478
30415
  React.createElement("div", { className: infoClasses.join(" "), onClick: vm.onBackToInfoClick },
29479
30416
  React.createElement("span", null, "Bilgi"),
29480
- React.createElement("span", { className: styles$g.icon },
30417
+ React.createElement("span", { className: styles$h.icon },
29481
30418
  React.createElement(SVGArrowLeft, null))),
29482
30419
  React.createElement("div", { className: shippingClasses.join(" "), onClick: onShippingClick },
29483
30420
  React.createElement("span", null, "Kargo"),
29484
- React.createElement("span", { className: styles$g.icon },
30421
+ React.createElement("span", { className: styles$h.icon },
29485
30422
  React.createElement(SVGArrowLeft, null))),
29486
30423
  React.createElement("div", { className: paymentClasses.join(" "), onClick: vm.onProceedToPaymentClick },
29487
30424
  React.createElement("span", null, "\u00D6deme"))));
@@ -29494,9 +30431,9 @@ var SVGHamburger = function (_a) {
29494
30431
  React.createElement("path", { fill: "currentColor", d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" })));
29495
30432
  };
29496
30433
 
29497
- var css_248z$i = ".style-module_ErrorContainer__3sK_- {\n width: calc(100% - 1.4em);\n padding: 1em;\n margin: 0 0.7em;\n background-color: rgba(255, 109, 109, 0.2);\n border-radius: 6px;\n margin-bottom: 1em;\n color: #ff6d6d;\n padding-bottom: 0;\n margin-top: 0.7em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 1em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb .style-module_Close__12wrg {\n padding: 0.2em 0;\n cursor: pointer; }\n .style-module_ErrorContainer__3sK_- .style-module_Body__3XZo- {\n width: 100%;\n padding: 1em 0;\n border-top: 1px solid rgba(255, 109, 109, 0.4); }\n";
29498
- var styles$h = {"ErrorContainer":"style-module_ErrorContainer__3sK_-","Header":"style-module_Header__SyLrb","Close":"style-module_Close__12wrg","Body":"style-module_Body__3XZo-"};
29499
- styleInject(css_248z$i);
30434
+ var css_248z$j = ".style-module_ErrorContainer__3sK_- {\n width: calc(100% - 1.4em);\n padding: 1em;\n margin: 0 0.7em;\n background-color: rgba(255, 109, 109, 0.2);\n border-radius: 6px;\n margin-bottom: 1em;\n color: #ff6d6d;\n padding-bottom: 0;\n margin-top: 0.7em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 1em; }\n .style-module_ErrorContainer__3sK_- .style-module_Header__SyLrb .style-module_Close__12wrg {\n padding: 0.2em 0;\n cursor: pointer; }\n .style-module_ErrorContainer__3sK_- .style-module_Body__3XZo- {\n width: 100%;\n padding: 1em 0;\n border-top: 1px solid rgba(255, 109, 109, 0.4); }\n";
30435
+ var styles$i = {"ErrorContainer":"style-module_ErrorContainer__3sK_-","Header":"style-module_Header__SyLrb","Close":"style-module_Close__12wrg","Body":"style-module_Body__3XZo-"};
30436
+ styleInject(css_248z$j);
29500
30437
 
29501
30438
  var ErrorContainer = mobxReactLite.observer(function (_a) {
29502
30439
  var children = _a.children, onClose = _a.onClose;
@@ -29505,24 +30442,24 @@ var ErrorContainer = mobxReactLite.observer(function (_a) {
29505
30442
  if (elem)
29506
30443
  elem.scrollTop = 0;
29507
30444
  });
29508
- return (React.createElement("div", { id: "checkoutError", className: styles$h.ErrorContainer },
29509
- React.createElement("div", { className: styles$h.Header },
30445
+ return (React.createElement("div", { id: "checkoutError", className: styles$i.ErrorContainer },
30446
+ React.createElement("div", { className: styles$i.Header },
29510
30447
  React.createElement("span", null, "Hata!"),
29511
- React.createElement("div", { className: styles$h.Close, onClick: onClose },
30448
+ React.createElement("div", { className: styles$i.Close, onClick: onClose },
29512
30449
  React.createElement(SVGHamburger, null))),
29513
- !!children && React.createElement("div", { className: styles$h.Body }, children)));
30450
+ !!children && React.createElement("div", { className: styles$i.Body }, children)));
29514
30451
  });
29515
30452
 
29516
- var css_248z$j = ".style-module_Product__2LsSV {\n padding-bottom: 1em; }\n .style-module_Product__2LsSV .style-module_Stock__1xKk6 {\n font-size: 0.9em; }\n";
29517
- var styles$i = {"Product":"style-module_Product__2LsSV","Stock":"style-module_Stock__1xKk6"};
29518
- styleInject(css_248z$j);
30453
+ var css_248z$k = ".style-module_Product__2LsSV {\n padding-bottom: 1em; }\n .style-module_Product__2LsSV .style-module_Stock__1xKk6 {\n font-size: 0.9em; }\n";
30454
+ var styles$j = {"Product":"style-module_Product__2LsSV","Stock":"style-module_Stock__1xKk6"};
30455
+ styleInject(css_248z$k);
29519
30456
 
29520
30457
  var StockError = mobxReactLite.observer(function (_a) {
29521
30458
  var error = _a.error, onClose = _a.onClose;
29522
30459
  var data = error.data;
29523
30460
  return (React.createElement(ErrorContainer, { onClose: onClose },
29524
30461
  React.createElement("div", null, "Sat\u0131n almak istedi\u011Finiz baz\u0131 \u00FCr\u00FCnlerin stok say\u0131s\u0131 yetersizdir."),
29525
- React.createElement("div", { style: { marginTop: "1em" } }, data.map(function (d, index) { return (React.createElement("div", { className: styles$i.Product, key: index },
30462
+ React.createElement("div", { style: { marginTop: "1em" } }, data.map(function (d, index) { return (React.createElement("div", { className: styles$j.Product, key: index },
29526
30463
  React.createElement("div", null, d.variant.name))); }))));
29527
30464
  });
29528
30465
 
@@ -29782,9 +30719,9 @@ var IkasCartStore = /** @class */ (function () {
29782
30719
  return IkasCartStore;
29783
30720
  }());
29784
30721
 
29785
- var css_248z$k = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
29786
- var styles$j = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
29787
- styleInject(css_248z$k);
30722
+ var css_248z$l = ".style-module_StepSuccess__36Zg4 .style-module_SuccessTitle__2cVxj {\n font-size: 2em;\n font-weight: 400;\n margin-bottom: 0.3em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n color: #737373;\n margin: auto;\n margin-bottom: 2em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n display: flex;\n align-items: center;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 .style-module_OrderNumber__1A_xg {\n font-weight: bold;\n margin-left: 0.4em; }\n\n.style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: 3em;\n margin-bottom: 2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTitle__2Whku {\n font-weight: 500;\n margin-bottom: 0.2em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoText__1LHFw {\n color: #737373;\n letter-spacing: 0.02em; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk .style-module_InfoTextBold__21977 {\n font-weight: 500;\n color: #737373; }\n\n.style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n width: 100%;\n display: flex;\n margin: auto; }\n\n@media only screen and (max-width: 1000px) {\n .style-module_StepSuccess__36Zg4 {\n text-align: center;\n margin-top: 3em; }\n .style-module_StepSuccess__36Zg4 .style-module_SuccessSubTitle__2UvWI {\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_OrderNumberContainer__1TWG3 {\n justify-content: center; }\n .style-module_StepSuccess__36Zg4 .style-module_Actions__3ZXaJ {\n justify-content: center;\n max-width: 400px; }\n .style-module_StepSuccess__36Zg4 .style-module_InfoGrid__2VYXk {\n grid-template-columns: 1fr;\n grid-gap: 1.5em; } }\n";
30723
+ var styles$k = {"StepSuccess":"style-module_StepSuccess__36Zg4","SuccessTitle":"style-module_SuccessTitle__2cVxj","SuccessSubTitle":"style-module_SuccessSubTitle__2UvWI","OrderNumberContainer":"style-module_OrderNumberContainer__1TWG3","OrderNumber":"style-module_OrderNumber__1A_xg","InfoGrid":"style-module_InfoGrid__2VYXk","InfoTitle":"style-module_InfoTitle__2Whku","InfoText":"style-module_InfoText__1LHFw","InfoTextBold":"style-module_InfoTextBold__21977","Actions":"style-module_Actions__3ZXaJ"};
30724
+ styleInject(css_248z$l);
29788
30725
 
29789
30726
  var StepSuccess = mobxReactLite.observer(function (_a) {
29790
30727
  var _b, _c, _d;
@@ -29797,28 +30734,28 @@ var StepSuccess = mobxReactLite.observer(function (_a) {
29797
30734
  var customerName = (((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.firstName) || "") +
29798
30735
  " " +
29799
30736
  (((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.lastName) || "");
29800
- return (React.createElement("div", { className: [styles$j.StepSuccess, commonStyles.FormContainer].join(" ") },
29801
- React.createElement("div", { className: styles$j.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
29802
- React.createElement("div", { className: styles$j.SuccessSubTitle },
30737
+ return (React.createElement("div", { className: [styles$k.StepSuccess, commonStyles.FormContainer].join(" ") },
30738
+ React.createElement("div", { className: styles$k.SuccessTitle }, "Sipari\u015Finiz i\u00E7in te\u015Fekk\u00FCr ederiz!"),
30739
+ React.createElement("div", { className: styles$k.SuccessSubTitle },
29803
30740
  "Sevgili ",
29804
30741
  customerName,
29805
30742
  ", sipari\u015Finiz bize ula\u015Fm\u0131\u015Ft\u0131r. Sipari\u015Finiz kargoya verildi\u011Finde sizi e-posta ile bilgilendirece\u011Fiz."),
29806
- React.createElement("div", { className: styles$j.InfoGrid },
30743
+ React.createElement("div", { className: styles$k.InfoGrid },
29807
30744
  React.createElement("div", null,
29808
- React.createElement("div", { className: styles$j.InfoTitle }, "Sipari\u015F No / Tarih"),
29809
- React.createElement("div", { className: styles$j.InfoText }, "#" + (vm.checkout.orderNumber || "")),
29810
- React.createElement("div", { className: styles$j.InfoText }, vm.checkout.dateStr)),
30745
+ React.createElement("div", { className: styles$k.InfoTitle }, "Sipari\u015F No / Tarih"),
30746
+ React.createElement("div", { className: styles$k.InfoText }, "#" + (vm.checkout.orderNumber || "")),
30747
+ React.createElement("div", { className: styles$k.InfoText }, vm.checkout.dateStr)),
29811
30748
  React.createElement("div", null,
29812
- React.createElement("div", { className: styles$j.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
29813
- React.createElement("div", { className: styles$j.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
29814
- React.createElement("div", { className: styles$j.InfoText }, customerName))),
29815
- React.createElement("div", { className: styles$j.Actions },
30749
+ React.createElement("div", { className: styles$k.InfoTitle }, "\u0130leti\u015Fim Bilgileri"),
30750
+ React.createElement("div", { className: styles$k.InfoText }, (_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.email),
30751
+ React.createElement("div", { className: styles$k.InfoText }, customerName))),
30752
+ React.createElement("div", { className: styles$k.Actions },
29816
30753
  React.createElement(Button, { text: "Alışverişe Dön", onClick: vm.onBackToShoppingClick }))));
29817
30754
  });
29818
30755
 
29819
- var css_248z$l = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
29820
- var styles$k = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
29821
- styleInject(css_248z$l);
30756
+ var css_248z$m = ".style-module_PolicyModal__3GidE {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n backdrop-filter: blur(6px);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n border-radius: 8px;\n background-color: white;\n color: #545454;\n min-width: 400px;\n max-width: 750px;\n max-height: 90%;\n display: flex;\n flex-direction: column;\n overflow: hidden; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n flex: 0 0 auto;\n padding: 1.5em;\n font-size: 1.2em;\n border-bottom: 1px solid #d9d9d9;\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 .style-module_CloseButton__1loXc {\n cursor: pointer; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalContent__271So {\n flex: 1 1 auto;\n padding: 1.5em;\n overflow-y: auto; }\n @media only screen and (max-width: 1000px) {\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde {\n max-width: unset;\n max-height: unset;\n width: 100%;\n height: 100%;\n margin: 0;\n border-radius: 0; }\n .style-module_PolicyModal__3GidE .style-module_Modal__2xsde .style-module_ModalHeader__3tVz1 {\n padding: 1.5em; } }\n";
30757
+ var styles$l = {"PolicyModal":"style-module_PolicyModal__3GidE","Modal":"style-module_Modal__2xsde","ModalHeader":"style-module_ModalHeader__3tVz1","CloseButton":"style-module_CloseButton__1loXc","ModalContent":"style-module_ModalContent__271So"};
30758
+ styleInject(css_248z$m);
29822
30759
 
29823
30760
  var PolicyModal = mobxReactLite.observer(function (_a) {
29824
30761
  var title = _a.title, onClose = _a.onClose, modalContent = _a.modalContent;
@@ -29833,13 +30770,13 @@ var PolicyModal = mobxReactLite.observer(function (_a) {
29833
30770
  document.removeEventListener("keydown", escFunction, false);
29834
30771
  };
29835
30772
  }, []);
29836
- return (React.createElement("div", { className: styles$k.PolicyModal, onClick: onClose },
29837
- React.createElement("div", { className: styles$k.Modal, onClick: function (e) { return e.stopPropagation(); } },
29838
- React.createElement("div", { className: styles$k.ModalHeader },
30773
+ return (React.createElement("div", { className: styles$l.PolicyModal, onClick: onClose },
30774
+ React.createElement("div", { className: styles$l.Modal, onClick: function (e) { return e.stopPropagation(); } },
30775
+ React.createElement("div", { className: styles$l.ModalHeader },
29839
30776
  React.createElement("div", null, title),
29840
- React.createElement("div", { className: styles$k.CloseButton, onClick: onClose },
30777
+ React.createElement("div", { className: styles$l.CloseButton, onClick: onClose },
29841
30778
  React.createElement(SVGHamburger, null))),
29842
- React.createElement("div", { className: styles$k.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
30779
+ React.createElement("div", { className: styles$l.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } }))));
29843
30780
  });
29844
30781
 
29845
30782
  var CustomerLoginRequiredError = mobxReactLite.observer(function (_a) {
@@ -29897,11 +30834,11 @@ var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
29897
30834
  };
29898
30835
  var onPrivacyPolicyClick = function () {
29899
30836
  vm.policyModalTitle = "Gizlilik Politikası";
29900
- vm.policyModalText = vm.returnPolicy;
30837
+ vm.policyModalText = vm.privacyPolicy;
29901
30838
  };
29902
30839
  var onTermsOfServiceClick = function () {
29903
30840
  vm.policyModalTitle = "Hizmet Şartları";
29904
- vm.policyModalText = vm.returnPolicy;
30841
+ vm.policyModalText = vm.termsOfService;
29905
30842
  };
29906
30843
  var onErrorClose = function () {
29907
30844
  vm.error = undefined;
@@ -29943,25 +30880,25 @@ var IkasCheckoutPage = mobxReactLite.observer(function (_a) {
29943
30880
  return null;
29944
30881
  return (React.createElement(React.Fragment, null,
29945
30882
  React.createElement(IkasPageHead, { pageTitle: (((_b = vm.merchantSettings) === null || _b === void 0 ? void 0 : _b.merchantName) || "") + " - Güvenli Ödeme", description: "Güvenli ödeme" }),
29946
- React.createElement("div", { id: "Checkout", className: styles$2.CheckoutPage },
29947
- React.createElement("div", { className: styles$2.Left },
29948
- React.createElement("div", { className: styles$2.LeftContent },
30883
+ React.createElement("div", { id: "Checkout", className: styles$3.CheckoutPage },
30884
+ React.createElement("div", { className: styles$3.Left },
30885
+ React.createElement("div", { className: styles$3.LeftContent },
29949
30886
  React.createElement("div", null,
29950
- React.createElement("div", { className: styles$2.Header },
29951
- React.createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (React.createElement("div", { className: styles$2.Logo },
30887
+ React.createElement("div", { className: styles$3.Header },
30888
+ React.createElement("a", { href: "/" }, !!((_c = vm.merchantSettings) === null || _c === void 0 ? void 0 : _c.logoId) ? (React.createElement("div", { className: styles$3.Logo },
29952
30889
  React.createElement(Image, { layout: "fill", image: vm.merchantSettings.logo, sizes: "64px" }))) : (((_d = vm.merchantSettings) === null || _d === void 0 ? void 0 : _d.merchantName) || ""))),
29953
30890
  vm.step !== CheckoutStep.SUCCESS && React.createElement(Breadcrumbs, { vm: vm }),
29954
30891
  !!vm.error && renderError(),
29955
- React.createElement("div", { className: styles$2.MobileCartSummary },
30892
+ React.createElement("div", { className: styles$3.MobileCartSummary },
29956
30893
  React.createElement(CartSummary, { vm: vm, allowExpand: true })),
29957
30894
  step,
29958
- React.createElement("div", { className: styles$2.Space })),
29959
- React.createElement("div", { className: styles$2.Footer },
29960
- React.createElement("div", { className: styles$2.FooterItem, onClick: onReturnPolicyClick }, "Para iade politikas\u0131"),
29961
- React.createElement("div", { className: styles$2.FooterItem, onClick: onPrivacyPolicyClick }, "Gizlilik politikas\u0131"),
29962
- React.createElement("div", { className: styles$2.FooterItem, onClick: onTermsOfServiceClick }, "Hizmet \u015Fartlar\u0131")))),
29963
- React.createElement("div", { className: styles$2.Right },
29964
- React.createElement("div", { className: styles$2.RightContent },
30895
+ React.createElement("div", { className: styles$3.Space })),
30896
+ React.createElement("div", { className: styles$3.Footer },
30897
+ React.createElement("div", { className: styles$3.FooterItem, onClick: onReturnPolicyClick }, "Para iade politikas\u0131"),
30898
+ React.createElement("div", { className: styles$3.FooterItem, onClick: onPrivacyPolicyClick }, "Gizlilik politikas\u0131"),
30899
+ React.createElement("div", { className: styles$3.FooterItem, onClick: onTermsOfServiceClick }, "Hizmet \u015Fartlar\u0131")))),
30900
+ React.createElement("div", { className: styles$3.Right },
30901
+ React.createElement("div", { className: styles$3.RightContent },
29965
30902
  React.createElement(CartSummary, { vm: vm }))),
29966
30903
  !!vm.policyModalText && (React.createElement(PolicyModal, { title: vm.policyModalTitle, modalContent: vm.policyModalText, onClose: onPolicyModalClose })))));
29967
30904
  });
@@ -29982,7 +30919,7 @@ var style = {
29982
30919
  backgroundColor: "rgba(255, 0, 0, 0.5)",
29983
30920
  };
29984
30921
 
29985
- var PACKAGE_VERSION = "0.0.139";
30922
+ var PACKAGE_VERSION = "0.0.158";
29986
30923
  var PageViewModel = /** @class */ (function () {
29987
30924
  function PageViewModel(router) {
29988
30925
  var _this = this;
@@ -30444,13 +31381,13 @@ var IkasPageEditor = mobxReactLite.observer(function () {
30444
31381
  });
30445
31382
  return (React.createElement(React.Fragment, null,
30446
31383
  !!vm.page && (React.createElement(IkasPageHead, { pageTitle: vm.page.pageTitle, description: vm.page.description })),
30447
- React.createElement("div", { style: pageStyle$1 },
31384
+ React.createElement("div", { style: pageStyle },
30448
31385
  React.createElement("div", null,
30449
31386
  !!headerPageComponent && (React.createElement(ThemeEditorComponent, { key: headerPageComponent.id, vm: vm, pageComponent: headerPageComponent })), others === null || others === void 0 ? void 0 :
30450
31387
  others.map(function (pageComponent) { return (React.createElement(ThemeEditorComponent, { key: pageComponent.id, vm: vm, pageComponent: pageComponent })); })),
30451
31388
  !!footerPageComponent && (React.createElement(ThemeEditorComponent, { key: footerPageComponent.id, vm: vm, pageComponent: footerPageComponent })))));
30452
31389
  });
30453
- var pageStyle$1 = {
31390
+ var pageStyle = {
30454
31391
  minHeight: "100vh",
30455
31392
  width: "100vw",
30456
31393
  display: "flex",
@@ -30873,6 +31810,20 @@ var Page$1 = function (_a) {
30873
31810
  React.useEffect(function () {
30874
31811
  setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr, isBrowser));
30875
31812
  }, [isBrowser, propValuesStr]);
31813
+ // If the user clicks a link for the same page, we need this logic to re-render the page
31814
+ React.useEffect(function () {
31815
+ router$1.events.on("routeChangeComplete", handleRouteChange);
31816
+ return function () {
31817
+ router$1.events.off("routeChangeComplete", handleRouteChange);
31818
+ };
31819
+ }, []);
31820
+ var handleRouteChange = function (url, options) {
31821
+ var shallow = options.shallow;
31822
+ if (!shallow &&
31823
+ [exports.IkasThemePageType.CATEGORY, exports.IkasThemePageType.BRAND].includes(page.type)) {
31824
+ setPropValues(IkasPageDataProvider.initPropValues(propValuesStr, router$1, settingsStr, isBrowser));
31825
+ }
31826
+ };
30876
31827
  return (React.createElement(IkasPage, { page: page, propValues: propValues, pageSpecificDataStr: pageSpecificDataStr, settingsStr: settingsStr, merchantSettings: merchantSettings, addOgpMetas: true }));
30877
31828
  };
30878
31829
  var index$1 = mobxReactLite.observer(Page$1);
@@ -30920,6 +31871,8 @@ function handleAnalytics(page, pageSpecificDataStr) {
30920
31871
  var productDetailParsed = JSON.parse(pageSpecificDataStr);
30921
31872
  var productDetail = new IkasProductDetail(productDetailParsed.product, productDetailParsed.selectedVariantValues);
30922
31873
  Analytics.productView(productDetail);
31874
+ // @ts-ignore
31875
+ IkasStorefrontConfig.store.customerStore.onProductView(productDetail.product.id, productDetail.selectedVariant.id);
30923
31876
  }
30924
31877
  if (page.type === exports.IkasThemePageType.CATEGORY) {
30925
31878
  var category = JSON.parse(pageSpecificDataStr);
@@ -31521,7 +32474,6 @@ var IkasBaseStore = /** @class */ (function () {
31521
32474
  this.showLocaleOptions = false;
31522
32475
  this.localeChecked = false;
31523
32476
  this.settingsSet = false;
31524
- this.infiniteScrollPages = {}; // key is productListPropValueId
31525
32477
  this.customerStore = new IkasCustomerStore(this);
31526
32478
  this.cartStore = new IkasCartStore(this);
31527
32479
  mobx.makeObservable(this, {
@@ -31749,5 +32701,6 @@ exports.getPlaceholderCategory = getPlaceholderCategory;
31749
32701
  exports.getPlaceholderProduct = getPlaceholderProduct;
31750
32702
  exports.parseRangeStr = parseRangeStr;
31751
32703
  exports.pascalCase = pascalCase;
32704
+ exports.stringSorter = stringSorter;
31752
32705
  exports.stringToSlug = stringToSlug;
31753
32706
  exports.validatePhoneNumber = validatePhoneNumber;