@salla.sa/twilight-components 2.11.48 → 2.11.50

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 (76) hide show
  1. package/dist/cjs/index-1d2b3370.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/salla-add-product-button.cjs.entry.js +4 -13
  4. package/dist/cjs/salla-button_36.cjs.entry.js +94 -27
  5. package/dist/cjs/salla-comment-form.cjs.entry.js +43 -0
  6. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-product-options.cjs.entry.js +64 -16
  8. package/dist/cjs/twilight.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +4 -13
  11. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +26 -3
  12. package/dist/collection/components/salla-count-down/salla-count-down.css +0 -0
  13. package/dist/collection/components/salla-count-down/salla-count-down.js +253 -0
  14. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  15. package/dist/collection/components/salla-gifting/salla-gifting.js +8 -1
  16. package/dist/collection/components/salla-installment/salla-installment.css +4 -0
  17. package/dist/collection/components/salla-login-modal/salla-login-modal.js +4 -3
  18. package/dist/collection/components/salla-modal/salla-modal.js +10 -0
  19. package/dist/collection/components/salla-product-options/salla-product-options.js +86 -20
  20. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  21. package/dist/components/index.d.ts +1 -0
  22. package/dist/components/index.js +1 -0
  23. package/dist/components/salla-add-product-button.js +4 -13
  24. package/dist/components/salla-cart-summary.js +4 -1
  25. package/dist/components/salla-count-down.d.ts +11 -0
  26. package/dist/components/salla-count-down.js +122 -0
  27. package/dist/components/salla-gifting.js +8 -1
  28. package/dist/components/salla-installment.js +1 -1
  29. package/dist/components/salla-login-modal.js +4 -3
  30. package/dist/components/salla-modal2.js +10 -0
  31. package/dist/components/salla-product-options.js +67 -16
  32. package/dist/components/salla-scopes.js +1 -1
  33. package/dist/esm/index-f1d446ac.js +4 -0
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/salla-add-product-button.entry.js +4 -13
  36. package/dist/esm/salla-button_36.entry.js +94 -27
  37. package/dist/esm/salla-comment-form.entry.js +39 -0
  38. package/dist/esm/salla-installment.entry.js +1 -1
  39. package/dist/esm/salla-product-options.entry.js +64 -16
  40. package/dist/esm/twilight.js +1 -1
  41. package/dist/esm-es5/index-f1d446ac.js +1 -1
  42. package/dist/esm-es5/loader.js +1 -1
  43. package/dist/esm-es5/salla-add-product-button.entry.js +2 -2
  44. package/dist/esm-es5/salla-button_36.entry.js +3 -3
  45. package/dist/esm-es5/salla-comment-form.entry.js +4 -0
  46. package/dist/esm-es5/salla-installment.entry.js +1 -1
  47. package/dist/esm-es5/salla-product-options.entry.js +2 -2
  48. package/dist/esm-es5/twilight.js +1 -1
  49. package/dist/twilight/{p-a6821ab8.system.entry.js → p-295d0d13.entry.js} +1 -1
  50. package/dist/twilight/p-4192bf33.system.entry.js +4 -0
  51. package/dist/twilight/p-7d966812.entry.js +4 -0
  52. package/dist/twilight/p-9fda3312.system.js +1 -1
  53. package/dist/twilight/p-b540cfc6.system.entry.js +4 -0
  54. package/dist/twilight/p-c537eb89.system.entry.js +53 -0
  55. package/dist/twilight/p-cdb6aa9e.entry.js +4 -0
  56. package/dist/twilight/p-d9579b04.system.entry.js +4 -0
  57. package/dist/twilight/p-e0a12040.entry.js +4 -0
  58. package/dist/twilight/p-fb2533e0.entry.js +36 -0
  59. package/dist/twilight/p-fb863c38.system.entry.js +4 -0
  60. package/dist/twilight/twilight.esm.js +1 -1
  61. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +0 -1
  62. package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +5 -0
  63. package/dist/types/components/salla-count-down/salla-count-down.d.ts +53 -0
  64. package/dist/types/components/salla-gifting/salla-gifting.d.ts +1 -0
  65. package/dist/types/components/salla-modal/salla-modal.d.ts +1 -0
  66. package/dist/types/components/salla-product-options/interfaces.d.ts +4 -0
  67. package/dist/types/components/salla-product-options/salla-product-options.d.ts +14 -1
  68. package/dist/types/components.d.ts +85 -0
  69. package/package.json +3 -3
  70. package/dist/twilight/p-14fd987d.system.entry.js +0 -53
  71. package/dist/twilight/p-3c98b71d.entry.js +0 -4
  72. package/dist/twilight/p-7e9e675f.entry.js +0 -4
  73. package/dist/twilight/p-85c55961.system.entry.js +0 -4
  74. package/dist/twilight/p-984370cd.entry.js +0 -4
  75. package/dist/twilight/p-d2c63efe.entry.js +0 -36
  76. package/dist/twilight/p-e22d9712.system.entry.js +0 -4
@@ -68,37 +68,46 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
68
68
  exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
69
69
  txt: 'text/plain',
70
70
  };
71
- this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
71
+ this.outOfStockText = '';
72
72
  this.donationAmount = salla.lang.get('pages.products.donation_amount');
73
73
  this.selectedOptions = [];
74
+ this.outSkus = [];
74
75
  /**
75
76
  * The id of the product to which the options are going to be fetched for.
76
77
  */
77
78
  this.productId = salla.config.get('page.id');
78
- this.canDisabled = !salla.config.get('store.settings.products.notify_options_availability');
79
+ this.canDisabled = salla.config.get('store.settings.products.notify_options_availability');
79
80
  salla.lang.onLoaded(() => {
80
81
  this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
81
82
  this.donationAmount = salla.lang.get('pages.products.donation_amount');
82
83
  });
83
84
  if (this.options) {
84
85
  try {
85
- this.optionsData = JSON.parse(this.options);
86
+ this.setOptionsData(JSON.parse(this.options));
86
87
  return;
87
88
  }
88
89
  catch (e) {
89
90
  salla.log('Bad json passed via options prop');
90
91
  }
91
92
  }
92
- if (Array.isArray(this.optionsData)) {
93
+ if (!Array.isArray(this.optionsData)) {
93
94
  salla.log('Options is not an array[] ---> ', this.optionsData);
94
- this.optionsData = [];
95
+ this.setOptionsData([]);
95
96
  }
96
97
  if (this.productId && !salla.url.is_page('cart')) {
97
- salla.api.product.getDetails(this.productId, ['options']).then((resp) => {
98
- this.optionsData = resp.data.options;
99
- });
98
+ salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));
100
99
  }
101
100
  }
101
+ setOptionsData(optionsData) {
102
+ var _a, _b;
103
+ this.optionsData = optionsData;
104
+ let that = this;
105
+ (_b = (_a = this.optionsData[0]) === null || _a === void 0 ? void 0 : _a.details) === null || _b === void 0 ? void 0 : _b.forEach(function (detail) {
106
+ Object.entries(detail.skus_availability || {})
107
+ .filter(sku => !sku[1])
108
+ .map(sku => that.outSkus.push(Number(sku[0])));
109
+ });
110
+ }
102
111
  /**
103
112
  * Get the id's of the selected options.
104
113
  * */
@@ -110,6 +119,12 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
110
119
  });
111
120
  return selectedOptions;
112
121
  }
122
+ /**
123
+ * Return true if there is any out of stock options are selected and vise versa.
124
+ * */
125
+ async hasOutOfStockOption() {
126
+ return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus.length && this.selectedSkus.every(sku => this.outSkus.includes(sku)));
127
+ }
113
128
  /**
114
129
  * Get selected options.
115
130
  * */
@@ -132,10 +147,19 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
132
147
  }
133
148
  const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);
134
149
  index > -1 ? this.selectedOptions[index] = Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }) : this.selectedOptions.push(Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }));
150
+ this.setSelectedSkus();
135
151
  this.handleRequiredMultipleOptions(option);
136
152
  this.changed.emit(data);
137
153
  salla.event.emit('product-options::change', data);
138
154
  }
155
+ /**
156
+ * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;
157
+ */
158
+ setSelectedSkus() {
159
+ this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))
160
+ .reduce((p, c) => p.filter(e => c.includes(e)))
161
+ .map(sku => Number(sku));
162
+ }
139
163
  handleRequiredMultipleOptions(option) {
140
164
  if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {
141
165
  return;
@@ -187,7 +211,7 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
187
211
  donationOption(option, product) {
188
212
  return h("div", { class: "s-product-options-donation-wrapper" }, option.donation ?
189
213
  h("div", { class: "s-product-options-donation-progress" }, h("salla-progress-bar", { donation: option.donation }))
190
- : '', h("div", { class: "s-product-options-donation-input-group" }, h("input", { type: "text", id: "donating-amount", name: "donating_amount", class: "s-form-control", value: option.value, placeholder: option.placeholder, onInput: e => salla.helpers.inputDigitsOnly(e.target), onBlur: e => this.changedHandler(e, option) }), h("span", { class: "s-product-options-donation-amount-currency" }, salla.config.currency(salla.config.get('user.currency_code')).symbol)));
214
+ : '', h("div", { class: "s-product-options-donation-input-group" }, h("input", { type: "text", id: "donating-amount", name: "donating_amount", class: "s-form-control", value: option.value, required: true, placeholder: option.placeholder, onInput: e => salla.helpers.inputDigitsOnly(e.target), onBlur: e => this.changedHandler(e, option) }), h("span", { class: "s-product-options-donation-amount-currency" }, salla.config.currency(salla.config.get('user.currency_code')).symbol)));
191
215
  }
192
216
  fileUploader(option, additions = null) {
193
217
  return h("salla-file-upload", Object.assign({}, (additions || {}), { "payload-name": "file", value: option.value, "instant-upload": true, name: `options[${option.id}]`, required: option.required, height: "120px", url: salla.cart.api.getUploadImageEndpoint(), "form-data": { cart_item_id: this.productId, product_id: this.productId }, class: { "s-product-options-image-input": true, required: option.required } }), h("div", { class: "s-product-options-filepond-placeholder" }, h("span", { class: "s-product-options-filepond-placeholder-icon", innerHTML: additions.accept && additions.accept.split(',').every(type => type.includes('image'))
@@ -239,7 +263,7 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
239
263
  //@ts-ignore
240
264
  dateOption(option) {
241
265
  //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
242
- return h("div", { class: "s-product-options-date-element" }, h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: option.required, name: `options[${option.id}]`, onPicked: e => this.changedHandler(e, option) }));
266
+ return h("div", { class: "s-product-options-date-element" }, h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: option.required, minDate: new Date(), name: `options[${option.id}]`, onPicked: e => this.changedHandler(e, option) }));
243
267
  }
244
268
  //@ts-ignore
245
269
  datetimeOption(option) {
@@ -249,30 +273,54 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
249
273
  /**
250
274
  * ============= Advanced options =============
251
275
  */
252
- getOptionDetailName(detail, outOfStock = true) {
276
+ // <<<<<<< HEAD
277
+ getOptionDetailName(detail, outOfStock = true, optionType) {
278
+ if (optionType && optionType == DisplayType.COLOR) {
279
+ return detail.name
280
+ + ((outOfStock && this.isOptionDetailOut(detail)) ? ` <br/> <p> ${this.outOfStockText} </p>` : '')
281
+ + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price)}) </p>` : '');
282
+ }
253
283
  return detail.name
254
- + ((outOfStock && detail.is_out) ? ` - ${this.outOfStockText}` : '')
284
+ + ((outOfStock && this.isOptionDetailOut(detail)) ? ` - ${this.outOfStockText}` : '')
255
285
  + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');
256
286
  }
287
+ isOptionDetailOut(detail) {
288
+ var _a;
289
+ if (detail.is_out || !detail.skus_availability || !((_a = this.selectedSkus) === null || _a === void 0 ? void 0 : _a.length)) {
290
+ return detail.is_out;
291
+ }
292
+ let isDetailSelected = this.selectedOptions.filter(option => option.id == detail.id).length;
293
+ //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet
294
+ if (isDetailSelected && this.selectedOptions.length == 1) {
295
+ return false;
296
+ }
297
+ //if current details has sku in the possible outSkus it's out for sure
298
+ if (isDetailSelected) {
299
+ //here we will get the possible outSkus for current selected options
300
+ let outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));
301
+ return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)));
302
+ }
303
+ return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id);
304
+ }
257
305
  singleOption(option) {
258
306
  return h("div", null, h("select", { name: `options[${option.id}]`, required: option.required, class: "s-form-control", onChange: e => this.changedHandler(e, option) }, h("option", { value: "" }, option.placeholder), option === null || option === void 0 ? void 0 :
259
307
  option.details.map((detail) => {
260
- return h("option", { value: detail.id, disabled: this.canDisabled && detail.is_out, selected: detail.is_selected }, this.getOptionDetailName(detail));
308
+ return h("option", { value: detail.id, disabled: this.canDisabled && this.isOptionDetailOut(detail), selected: detail.is_selected }, this.getOptionDetailName(detail));
261
309
  })));
262
310
  }
263
311
  multipleOptions(option) {
264
312
  return h("div", { class: { "s-product-options-multiple-options-wrapper": true, 'required': option.required } }, option === null || option === void 0 ? void 0 : option.details.map((detail) => {
265
- return h("div", null, h("input", { type: "checkbox", value: detail.id, disabled: detail.is_out, checked: detail.is_selected, required: option.required, name: `options[${option.id}][]`, id: `field-${option.id}-${detail.id}`, onChange: (e) => this.changedHandler(e, option), "aria-describedby": `options[${option.id}]-description` }), h("label", { htmlFor: `field-${option.id}-${detail.id}` }, this.getOptionDetailName(detail)));
313
+ return h("div", null, h("input", { type: "checkbox", value: detail.id, disabled: this.isOptionDetailOut(detail), checked: detail.is_selected, required: option.required, name: `options[${option.id}][]`, id: `field-${option.id}-${detail.id}`, onChange: (e) => this.changedHandler(e, option), "aria-describedby": `options[${option.id}]-description` }), h("label", { htmlFor: `field-${option.id}-${detail.id}` }, this.getOptionDetailName(detail)));
266
314
  }));
267
315
  }
268
316
  //@ts-ignore
269
317
  colorOption(option) {
270
- return h("fieldset", { class: "s-product-options-colors-wrapper" }, option === null || option === void 0 ? void 0 : option.details.map((detail) => h("div", null, h("input", { type: "radio", value: detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, disabled: this.canDisabled && detail.is_out, id: `color-${this.productId}-${option.id}-${detail.id}`, onChange: e => this.changedHandler(e, option) }), h("label", { htmlFor: `color-${this.productId}-${option.id}-${detail.id}` }, h("span", { style: { "background-color": detail.color } }), h("p", null, this.getOptionDetailName(detail))))));
318
+ return h("fieldset", { class: "s-product-options-colors-wrapper" }, option === null || option === void 0 ? void 0 : option.details.map((detail) => h("div", { class: "s-product-options-colors-item" }, h("input", { type: "radio", value: detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: `color-${this.productId}-${option.id}-${detail.id}`, onChange: e => this.changedHandler(e, option) }), h("label", { htmlFor: `color-${this.productId}-${option.id}-${detail.id}` }, h("span", { style: { "background-color": detail.color } }), h("div", { innerHTML: this.getOptionDetailName(detail, true, option.type) })))));
271
319
  }
272
320
  //@ts-ignore
273
321
  thumbnailOption(option) {
274
322
  return h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
275
- return h("div", null, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, "data-img-id": detail.option_value, disabled: this.canDisabled && detail.is_out, id: `option_${this.productId}-${option.id}_${detail.id}`, onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: `option_${this.productId}-${option.id}_${detail.id}`, "data-img-id": detail.option_value, class: "go-to-slide" }, h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), detail.is_out ?
323
+ return h("div", null, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, "data-img-id": detail.option_value, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: `option_${this.productId}-${option.id}_${detail.id}`, onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: `option_${this.productId}-${option.id}_${detail.id}`, "data-img-id": detail.option_value, class: "go-to-slide" }, h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), this.isOptionDetailOut(detail) ?
276
324
  [
277
325
  h("small", { class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
278
326
  this.canDisabled ? h("div", { class: "s-product-options-thumbnails-badge-overlay" }) : '',
@@ -290,7 +338,10 @@ const SallaProductOptions$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
290
338
  "donationAmount": [32],
291
339
  "selectedOptions": [32],
292
340
  "canDisabled": [32],
341
+ "selectedSkus": [32],
342
+ "selectedOutSkus": [32],
293
343
  "getSelectedOptionsData": [64],
344
+ "hasOutOfStockOption": [64],
294
345
  "getSelectedOptions": [64],
295
346
  "getOption": [64]
296
347
  }]);
@@ -169,7 +169,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
169
169
  :
170
170
  [h("salla-list-tile", { class: ((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.length) ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!((_b = this.originalScopesList) === null || _b === void 0 ? void 0 : _b.length) && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), ((_c = this.originalScopesList) === null || _c === void 0 ? void 0 : _c.length) > this.searchDisplayLimit ?
171
171
  h("div", { class: "s-scopes-search-wrapper" }, h("div", { class: "s-scopes-search-icon", innerHTML: Search }), h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), enterkeyhint: "search", placeholder: salla.lang.get('blocks.scope.searching_for_a_branch') }))
172
- : "", this.hasError || ((_d = this.scopes) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
172
+ : "", this.hasError || ((_d = this.originalScopesList) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
173
173
  this.placeholderContent()
174
174
  : this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
175
175
  }
@@ -1894,6 +1894,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1894
1894
  return import(
1895
1895
  /* webpackMode: "lazy" */
1896
1896
  './salla-add-product-button.entry.js').then(processMod, consoleError);
1897
+ case 'salla-comment-form':
1898
+ return import(
1899
+ /* webpackMode: "lazy" */
1900
+ './salla-comment-form.entry.js').then(processMod, consoleError);
1897
1901
  case 'salla-installment':
1898
1902
  return import(
1899
1903
  /* webpackMode: "lazy" */
@@ -30,7 +30,7 @@ const defineCustomElements = (win, options) => {
30
30
  if (typeof window === 'undefined') return Promise.resolve();
31
31
  return patchEsm().then(() => {
32
32
  globalScripts();
33
- return bootstrapLazy(JSON.parse("[[\"salla-button_36\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"getSelectedOptionsData\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-installment\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
33
+ return bootstrapLazy(JSON.parse("[[\"salla-button_36\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"endCountDown\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-add-product-button\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32]}]]],[\"salla-comment-form\",[[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}]]],[\"salla-installment\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
34
34
  });
35
35
  };
36
36
 
@@ -77,16 +77,6 @@ const SallaAddProductButton = class {
77
77
  }
78
78
  return this.hostAttributes;
79
79
  }
80
- pushSelectedOption(data) {
81
- const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);
82
- if (index > -1) {
83
- this.selectedOptions[index] = Object.assign(Object.assign({}, data.detail), { option_id: data.option.id });
84
- }
85
- else {
86
- this.selectedOptions.push(Object.assign(Object.assign({}, data.detail), { option_id: data.option.id }));
87
- }
88
- this.hasOutOfStockOption = this.selectedOptions.some(option => option.is_out);
89
- }
90
80
  componentWillLoad() {
91
81
  this.hasLabel = !!this.host.innerHTML.replace('<!---->', '').trim();
92
82
  }
@@ -102,17 +92,18 @@ const SallaAddProductButton = class {
102
92
  if ((this.productStatus === 'out-and-notify' && this.channels) || this.hasOutOfStockOption) {
103
93
  return h(Host, null, h("salla-product-availability", Object.assign({}, this.getBtnAttributes())));
104
94
  }
105
- return h(Host, null, h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center", type: "button" }), h("slot", null)));
95
+ return h(Host, null, h("salla-button", Object.assign({ color: this.productStatus === 'sale' ? 'primary' : 'light', type: "button", fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale' }, this.getBtnAttributes(), { "loader-position": "center" }), h("slot", null)));
106
96
  }
107
97
  componentDidLoad() {
108
98
  if (!this.notifyOptionsAvailability) {
109
99
  return;
110
100
  }
111
- salla.event.on('product-options::change', data => {
101
+ salla.event.on('product-options::change', async (data) => {
102
+ var _a;
112
103
  if (!['thumbnail', 'color', 'single-option'].includes(data.option.type)) {
113
104
  return;
114
105
  }
115
- this.pushSelectedOption(data);
106
+ this.hasOutOfStockOption = await ((_a = document.querySelector(`salla-product-options[product-id="${this.productId}"]`)) === null || _a === void 0 ? void 0 : _a.hasOutOfStockOption());
116
107
  this.hasLabel = false;
117
108
  if (!this.subscribedOptions || this.subscribedOptions === 'null') {
118
109
  return;
@@ -1440,6 +1440,7 @@ const SallaCartSummary = class {
1440
1440
  registerInstance(this, hostRef);
1441
1441
  this.cartSummaryCount = salla.storage.get('cart.summary.count') || 0;
1442
1442
  this.cartSummaryTotal = salla.storage.get('cart.summary.total') || 0;
1443
+ this.cartLabel = salla.config.get('user.language_code') === 'ar' ? 'السلة' : 'Cart';
1443
1444
  salla.cart.event.onUpdated((response) => {
1444
1445
  this.cartSummaryCount = response.count || 0;
1445
1446
  this.cartSummaryTotal = response.total || 0;
@@ -1495,7 +1496,7 @@ const SallaCartSummary = class {
1495
1496
  }, '-=1700');
1496
1497
  }
1497
1498
  render() {
1498
- return (h(Host, null, h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, h("div", { id: "s-cart-icon" }, h("slot", { name: "icon" }, h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal)))));
1499
+ return (h(Host, null, h("a", { class: "s-cart-summary-wrapper", href: salla.url.get('cart') }, h("div", { id: "s-cart-icon" }, h("slot", { name: "icon" }, h("i", { class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { class: "s-cart-summary-content" }, this.showCartLabel && h("span", { class: "s-cart-summary-label" }, this.cartLabel), h("b", { class: "s-cart-summary-total" }, salla.money(this.cartSummaryTotal))))));
1499
1500
  }
1500
1501
  get host() { return getElement(this); }
1501
1502
  };
@@ -2663,38 +2664,86 @@ const SallaColorPicker = class {
2663
2664
  };
2664
2665
  SallaColorPicker.style = sallaColorPickerCss;
2665
2666
 
2666
- const sallaCommentFormCss = ":host{display:block}";
2667
+ const sallaCountDownCss = "";
2667
2668
 
2668
- const SallaCommentForm = class {
2669
+ const SallaCountDown = class {
2669
2670
  constructor(hostRef) {
2670
2671
  registerInstance(this, hostRef);
2671
- this.placeholder = salla.lang.get('blocks.comments.placeholder');
2672
- this.submitText = salla.lang.get('blocks.comments.submit');
2672
+ /**
2673
+ * The size of the count down
2674
+ * */
2675
+ this.size = 'md';
2676
+ /**
2677
+ * The color of the count down
2678
+ * */
2679
+ this.color = 'dark';
2680
+ /**
2681
+ * The digits lang to show in the count down
2682
+ * */
2683
+ this.digits = 'auto';
2684
+ this.daysLabel = '';
2685
+ this.hoursLabel = '';
2686
+ this.minutesLabel = '';
2687
+ this.secondsLabel = '';
2688
+ this.endLabel = '';
2689
+ this.invalidDate = '';
2690
+ this.offerEnded = false;
2673
2691
  salla.lang.onLoaded(() => {
2674
- this.placeholder = salla.lang.get('blocks.comments.placeholder');
2675
- this.submitText = salla.lang.get('blocks.comments.submit');
2676
- });
2677
- salla.onReady(() => {
2678
- this.canComment = salla.config.get('user.can_comment');
2679
- this.itemId = salla.config.get('page.id');
2680
- this.type = salla.url.is_page('page-single') ? 'page' : 'product';
2692
+ this.daysLabel = salla.lang.get('pages.checkout.day');
2693
+ this.hoursLabel = salla.lang.get('pages.checkout.hour');
2694
+ this.minutesLabel = salla.lang.get('pages.checkout.minute');
2695
+ this.invalidDate = salla.lang.get('blocks.buy_as_gift.incorrect_date');
2696
+ this.secondsLabel = salla.lang.get('pages.checkout.second');
2697
+ this.endLabel = salla.lang.get('pages.checkout.offer_ended');
2681
2698
  });
2682
2699
  }
2683
- submit() {
2684
- if (!this.commentForm.reportValidity()) {
2685
- salla.log('CommentForm:: validation error!');
2700
+ /**
2701
+ * End the count down
2702
+ * */
2703
+ async endCountDown() {
2704
+ clearInterval(this.countInterval);
2705
+ this.offerEnded = true;
2706
+ this.daysEl.innerHTML = this.number(0);
2707
+ this.hoursEl.innerHTML = this.number(0);
2708
+ this.minutesEl.innerHTML = this.number(0);
2709
+ this.secondsEl.innerHTML = this.number(0);
2710
+ }
2711
+ isValidDate(date) {
2712
+ return !isNaN(Date.parse(date));
2713
+ }
2714
+ number(digit) {
2715
+ return salla.helpers.number(digit, this.digits === 'en');
2716
+ }
2717
+ startCountDown() {
2718
+ let countDownDate = new Date(this.date);
2719
+ countDownDate.setHours(23, 59, 59, 999);
2720
+ let countDownTime = countDownDate.getTime();
2721
+ this.countInterval = setInterval(() => {
2722
+ let now = new Date().getTime();
2723
+ let distance = countDownTime - now;
2724
+ this.daysEl.innerHTML = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));
2725
+ this.hoursEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
2726
+ this.minutesEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
2727
+ this.secondsEl.innerHTML = this.number(Math.floor((distance % (1000 * 60)) / 1000));
2728
+ if (distance < 0) {
2729
+ this.endCountDown();
2730
+ }
2731
+ }, 1000);
2732
+ }
2733
+ componentDidLoad() {
2734
+ if (!this.date) {
2686
2735
  return;
2687
2736
  }
2688
- this.submitBtn.load()
2689
- .then(() => salla.comment.add({ id: this.itemId, comment: this.commentField.value, type: this.type }))
2690
- .finally(() => this.submitBtn.stop);
2737
+ this.startCountDown();
2691
2738
  }
2692
2739
  render() {
2693
- return (h(Host, null, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
2694
- h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', h("div", { class: "s-comment-form-content" }, h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), h("br", null), h("div", { class: "s-comment-form-action" }, h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
2740
+ if (!this.isValidDate(this.date)) {
2741
+ return h("div", null, this.invalidDate);
2742
+ }
2743
+ return (h(Host, { class: "s-count-down-wrapper" }, h("ul", { class: `s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}` }, h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.secondsEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.secondsLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.minutesEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.minutesLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.hoursEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.hoursLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value", ref: el => this.daysEl = el }, this.number(0)), this.labeled && h("div", { class: "s-count-down-item-label" }, this.daysLabel))), this.offerEnded && h("div", { class: "s-count-down-end-text" }, this.endText || this.endLabel)));
2695
2744
  }
2696
2745
  };
2697
- SallaCommentForm.style = sallaCommentFormCss;
2746
+ SallaCountDown.style = sallaCountDownCss;
2698
2747
 
2699
2748
  var HOOKS = [
2700
2749
  "onChange",
@@ -20986,6 +21035,13 @@ const SallaGifting = class {
20986
21035
  this.currentLang = salla.lang.locale;
20987
21036
  });
20988
21037
  }
21038
+ componentDidLoad() {
21039
+ salla.event.product.onPriceUpdated(() => {
21040
+ const quantityInput = document.querySelector('.s-quantity-input-input');
21041
+ // @ts-ignore
21042
+ this.quantity = quantityInput.value;
21043
+ });
21044
+ }
20989
21045
  /**
20990
21046
  * Show / Open the gifting modal window
20991
21047
  */
@@ -21222,7 +21278,7 @@ const SallaGifting = class {
21222
21278
  let payload = {
21223
21279
  text: this.selectedText,
21224
21280
  sender_name: this.senderName,
21225
- quantity: 1,
21281
+ quantity: this.quantity,
21226
21282
  deliver_at: this.showCalendar ? this.deliveryDate : null,
21227
21283
  image_url: (_a = this.uploadedImage) !== null && _a !== void 0 ? _a : this.selectedImage,
21228
21284
  receiver: {
@@ -21769,9 +21825,10 @@ const SallaLoginModal = class {
21769
21825
  if ([this.mobileTab, this.emailTab].includes(tab)) {
21770
21826
  this.regType = tab === this.mobileTab ? 'phone' : 'email';
21771
21827
  }
21772
- // this.loginTelInput.focus();
21773
- // tab.querySelector('input')?.focus();
21774
- // setTimeout(() =>this.loginTelInput.focus(), 100);
21828
+ const input = tab.querySelector('input[type="tel"], input[type="email"]');
21829
+ input && setTimeout(() => {
21830
+ input.focus();
21831
+ }, 100);
21775
21832
  (_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.currentTabName === 'registration' ? salla.lang.get('common.titles.registration') : this.title);
21776
21833
  return this;
21777
21834
  }
@@ -22855,6 +22912,7 @@ const SallaModal = class {
22855
22912
  */
22856
22913
  async open() {
22857
22914
  this.host.setAttribute('visible', '');
22915
+ this.handleAutoFocus();
22858
22916
  return this.host;
22859
22917
  }
22860
22918
  /**
@@ -22886,6 +22944,15 @@ const SallaModal = class {
22886
22944
  this.isLoading = false;
22887
22945
  return this.host;
22888
22946
  }
22947
+ handleAutoFocus() {
22948
+ const firstFocusableElement = this.host.querySelector('input, textarea, select');
22949
+ if (!firstFocusableElement) {
22950
+ return;
22951
+ }
22952
+ setTimeout(() => {
22953
+ firstFocusableElement.focus();
22954
+ }, 100);
22955
+ }
22889
22956
  toggleModal(isOpen) {
22890
22957
  const body = this.host.querySelector('.s-modal-body');
22891
22958
  Helper$1.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
@@ -24051,7 +24118,7 @@ const SallaScopees = class {
24051
24118
  :
24052
24119
  [h("salla-list-tile", { class: ((_a = this.originalScopesList) === null || _a === void 0 ? void 0 : _a.length) ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!((_b = this.originalScopesList) === null || _b === void 0 ? void 0 : _b.length) && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), ((_c = this.originalScopesList) === null || _c === void 0 ? void 0 : _c.length) > this.searchDisplayLimit ?
24053
24120
  h("div", { class: "s-scopes-search-wrapper" }, h("div", { class: "s-scopes-search-icon", innerHTML: Search }), h("input", { type: "text", class: "s-scopes-search-input", onInput: e => this.handleSearchFieldTyping(e), enterkeyhint: "search", placeholder: salla.lang.get('blocks.scope.searching_for_a_branch') }))
24054
- : "", this.hasError || ((_d = this.scopes) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
24121
+ : "", this.hasError || ((_d = this.originalScopesList) === null || _d === void 0 ? void 0 : _d.length) < 2 ?
24055
24122
  this.placeholderContent()
24056
24123
  : this.mode === ModeType.DEFAULT ? this.defaultContent() : this.availabilityContent())])));
24057
24124
  }
@@ -26828,4 +26895,4 @@ const SallaVerify = class {
26828
26895
  };
26829
26896
  SallaVerify.style = sallaVerifyCss;
26830
26897
 
26831
- export { SallaButton as salla_button, SallaCartSummary as salla_cart_summary, SallaColorPicker as salla_color_picker, SallaCommentForm as salla_comment_form, SallaDatetimePicker as salla_datetime_picker, SallaFileUpload as salla_file_upload, SallaGifting as salla_gifting, SallaInfiniteScroll as salla_infinite_scroll, SallaListTile as salla_list_tile, SallaLoading as salla_loading, SallaLocalizationModal as salla_localization_modal, SallaLoginModal as salla_login_modal, SallaLoyalty as salla_loyalty, SallaMap as salla_map, SallaModal as salla_modal, SallaOfferModal as salla_offer_modal, SallaPlaceholder as salla_placeholder, SallaProductAvailability as salla_product_availability, SallaProductSizeGuide as salla_product_size_guide, SallaProgressBar as salla_progress_bar, SallaQuantityInput as salla_quantity_input, SallaQuickOrder as salla_quick_order, SallaRatingModal as salla_rating_modal, SallaRatingStars as salla_rating_stars, SallaScopees as salla_scopes, SallaSearch as salla_search, SallaSkeleton as salla_skeleton, SallaSwiper as salla_slider, SallaSocialShare as salla_social_share, SallaTabContent as salla_tab_content, SallaTabHeader as salla_tab_header, SallaTabs as salla_tabs, SallaTelInput as salla_tel_input, SallaUserMenu as salla_user_menu, SallaUserSettings as salla_user_settings, SallaVerify as salla_verify };
26898
+ export { SallaButton as salla_button, SallaCartSummary as salla_cart_summary, SallaColorPicker as salla_color_picker, SallaCountDown as salla_count_down, SallaDatetimePicker as salla_datetime_picker, SallaFileUpload as salla_file_upload, SallaGifting as salla_gifting, SallaInfiniteScroll as salla_infinite_scroll, SallaListTile as salla_list_tile, SallaLoading as salla_loading, SallaLocalizationModal as salla_localization_modal, SallaLoginModal as salla_login_modal, SallaLoyalty as salla_loyalty, SallaMap as salla_map, SallaModal as salla_modal, SallaOfferModal as salla_offer_modal, SallaPlaceholder as salla_placeholder, SallaProductAvailability as salla_product_availability, SallaProductSizeGuide as salla_product_size_guide, SallaProgressBar as salla_progress_bar, SallaQuantityInput as salla_quantity_input, SallaQuickOrder as salla_quick_order, SallaRatingModal as salla_rating_modal, SallaRatingStars as salla_rating_stars, SallaScopees as salla_scopes, SallaSearch as salla_search, SallaSkeleton as salla_skeleton, SallaSwiper as salla_slider, SallaSocialShare as salla_social_share, SallaTabContent as salla_tab_content, SallaTabHeader as salla_tab_header, SallaTabs as salla_tabs, SallaTelInput as salla_tel_input, SallaUserMenu as salla_user_menu, SallaUserSettings as salla_user_settings, SallaVerify as salla_verify };
@@ -0,0 +1,39 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host } from './index-f1d446ac.js';
5
+
6
+ const sallaCommentFormCss = ":host{display:block}";
7
+
8
+ const SallaCommentForm = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.placeholder = salla.lang.get('blocks.comments.placeholder');
12
+ this.submitText = salla.lang.get('blocks.comments.submit');
13
+ salla.lang.onLoaded(() => {
14
+ this.placeholder = salla.lang.get('blocks.comments.placeholder');
15
+ this.submitText = salla.lang.get('blocks.comments.submit');
16
+ });
17
+ salla.onReady(() => {
18
+ this.canComment = salla.config.get('user.can_comment');
19
+ this.itemId = salla.config.get('page.id');
20
+ this.type = salla.url.is_page('page-single') ? 'page' : 'product';
21
+ });
22
+ }
23
+ submit() {
24
+ if (!this.commentForm.reportValidity()) {
25
+ salla.log('CommentForm:: validation error!');
26
+ return;
27
+ }
28
+ this.submitBtn.load()
29
+ .then(() => salla.comment.add({ id: this.itemId, comment: this.commentField.value, type: this.type }))
30
+ .finally(() => this.submitBtn.stop);
31
+ }
32
+ render() {
33
+ return (h(Host, null, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
34
+ h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', h("div", { class: "s-comment-form-content" }, h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), h("br", null), h("div", { class: "s-comment-form-action" }, h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
35
+ }
36
+ };
37
+ SallaCommentForm.style = sallaCommentFormCss;
38
+
39
+ export { SallaCommentForm as salla_comment_form };