@salla.sa/twilight-components 2.14.291 → 2.14.293

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 (146) hide show
  1. package/dist/cjs/{filepond-l0In8JzI.js → filepond-GN4oGQxJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster--TMslLdw.js → filepond-plugin-file-poster-DaAJLtpt.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-asc4GviL.js → filepond-plugin-file-validate-size-DtX2_kZJ.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-MAcIW_lX.js → filepond-plugin-file-validate-type-CzQ5UyCl.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-8yC2fM_b.js → filepond-plugin-image-edit-C0VI2c3u.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-D2TaYNJz.js → filepond-plugin-image-exif-orientation-CjLoSY29.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-ZhHJTUGt.js → filepond-plugin-image-preview-D_SXc0A0.js} +1 -1
  8. package/dist/cjs/{index-CD__TuQ1.js → index-BZReV_Mc.js} +2 -2
  9. package/dist/cjs/{index-BCqSMje8.js → index-MsFtsujX.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion_62.cjs.entry.js +168 -83
  12. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  44. package/dist/cjs/twilight.cjs.js +2 -2
  45. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +20 -5
  46. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +84 -67
  47. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +75 -5
  48. package/dist/components/index.js +2 -2
  49. package/dist/components/keyboard_arrow_right.js +3 -3
  50. package/dist/components/salla-breadcrumb.js +2 -2
  51. package/dist/components/salla-multiple-bundle-product-details2.js +20 -5
  52. package/dist/components/salla-multiple-bundle-product-options-modal2.js +82 -65
  53. package/dist/components/salla-multiple-bundle-product-slider2.js +62 -6
  54. package/dist/components/salla-slider2.js +3 -3
  55. package/dist/esm/{filepond-D-hh7StM.js → filepond-KedxObdz.js} +1 -1
  56. package/dist/esm/{filepond-plugin-file-poster-B9peApDJ.js → filepond-plugin-file-poster--IuYz1v_.js} +1 -1
  57. package/dist/esm/{filepond-plugin-file-validate-size-Clsj6zmt.js → filepond-plugin-file-validate-size-DS9CqEa6.js} +1 -1
  58. package/dist/esm/{filepond-plugin-file-validate-type-NUNR5wrE.js → filepond-plugin-file-validate-type-Df7JBQ_H.js} +1 -1
  59. package/dist/esm/{filepond-plugin-image-edit-D9mIu1qc.js → filepond-plugin-image-edit-DuiTbZRo.js} +1 -1
  60. package/dist/esm/{filepond-plugin-image-exif-orientation-DjJUiKBi.js → filepond-plugin-image-exif-orientation-DptV88l9.js} +1 -1
  61. package/dist/esm/{filepond-plugin-image-preview-Dqa9Qh69.js → filepond-plugin-image-preview-CCEGmtL7.js} +1 -1
  62. package/dist/esm/{index-BdPAI7KX.js → index-BcEkcgy-.js} +2 -2
  63. package/dist/esm/{index-r_fPtAzd.js → index-CKeax2nk.js} +1 -1
  64. package/dist/esm/loader.js +3 -3
  65. package/dist/esm/salla-accordion_62.entry.js +168 -83
  66. package/dist/esm/salla-advertisement.entry.js +1 -1
  67. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  68. package/dist/esm/salla-apps-icons.entry.js +1 -1
  69. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  70. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  71. package/dist/esm/salla-contacts.entry.js +1 -1
  72. package/dist/esm/salla-filters-widget.entry.js +1 -1
  73. package/dist/esm/salla-filters.entry.js +1 -1
  74. package/dist/esm/salla-installment.entry.js +1 -1
  75. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  76. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  77. package/dist/esm/salla-metadata.entry.js +1 -1
  78. package/dist/esm/salla-notification-item.entry.js +1 -1
  79. package/dist/esm/salla-notifications.entry.js +1 -1
  80. package/dist/esm/salla-offer.entry.js +1 -1
  81. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  82. package/dist/esm/salla-order-details-options.entry.js +1 -1
  83. package/dist/esm/salla-order-details.entry.js +1 -1
  84. package/dist/esm/salla-order-summary.entry.js +1 -1
  85. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  86. package/dist/esm/salla-orders.entry.js +1 -1
  87. package/dist/esm/salla-payments.entry.js +1 -1
  88. package/dist/esm/salla-price-range.entry.js +1 -1
  89. package/dist/esm/salla-review-card.entry.js +1 -1
  90. package/dist/esm/salla-reviews-page.entry.js +1 -1
  91. package/dist/esm/salla-reviews.entry.js +1 -1
  92. package/dist/esm/salla-social.entry.js +1 -1
  93. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  94. package/dist/esm/salla-tooltip.entry.js +1 -1
  95. package/dist/esm/salla-trust-badges.entry.js +1 -1
  96. package/dist/esm/salla-verify.entry.js +1 -1
  97. package/dist/esm/salla-wallet.entry.js +1 -1
  98. package/dist/esm/twilight.js +3 -3
  99. package/dist/twilight/{p-9b001f92.entry.js → p-0505e20e.entry.js} +1 -1
  100. package/dist/twilight/{p-9706a388.entry.js → p-083721bc.entry.js} +1 -1
  101. package/dist/twilight/{p-2e338f09.entry.js → p-0fb744b7.entry.js} +1 -1
  102. package/dist/twilight/{p-9e190a6a.entry.js → p-194fb1ef.entry.js} +1 -1
  103. package/dist/twilight/{p-23541825.entry.js → p-1d51eaba.entry.js} +1 -1
  104. package/dist/twilight/{p-2684045e.entry.js → p-21adb8a6.entry.js} +1 -1
  105. package/dist/twilight/{p-2a4d5b5a.entry.js → p-21f46237.entry.js} +1 -1
  106. package/dist/twilight/p-35d860e0.entry.js +11 -0
  107. package/dist/twilight/{p-85d33ec2.entry.js → p-371211e8.entry.js} +1 -1
  108. package/dist/twilight/{p-0c5e2e36.entry.js → p-378f1163.entry.js} +1 -1
  109. package/dist/twilight/{p-54a6b727.entry.js → p-5598db68.entry.js} +1 -1
  110. package/dist/twilight/{p-aa85a960.entry.js → p-62f02f0c.entry.js} +1 -1
  111. package/dist/twilight/{p-b609c0a3.entry.js → p-69606709.entry.js} +1 -1
  112. package/dist/twilight/{p-efdf02d5.entry.js → p-6e4b766e.entry.js} +1 -1
  113. package/dist/twilight/{p-8110e635.entry.js → p-752052fe.entry.js} +1 -1
  114. package/dist/twilight/{p-025d49de.entry.js → p-77a8b14b.entry.js} +1 -1
  115. package/dist/twilight/{p-5bff3464.entry.js → p-83e30449.entry.js} +1 -1
  116. package/dist/twilight/{p-2d7377e6.entry.js → p-841674b0.entry.js} +1 -1
  117. package/dist/twilight/{p-0a7758ed.entry.js → p-8490063c.entry.js} +1 -1
  118. package/dist/twilight/{p-ef28a883.entry.js → p-8aac6c56.entry.js} +1 -1
  119. package/dist/twilight/{p-3420836d.entry.js → p-8b0c6963.entry.js} +1 -1
  120. package/dist/twilight/{p-362bbc51.entry.js → p-9abdcebc.entry.js} +1 -1
  121. package/dist/twilight/{p-TjgJW4j-.js → p-BHo8Lu9B.js} +1 -1
  122. package/dist/twilight/{p-DuzBFC4S.js → p-BQYRtcKc.js} +1 -1
  123. package/dist/twilight/{p-BUxBV1_U.js → p-B_AAuZS_.js} +1 -1
  124. package/dist/twilight/{p-BdPAI7KX.js → p-BcEkcgy-.js} +1 -1
  125. package/dist/twilight/{p-DVxWyl5d.js → p-C-jGs3o8.js} +1 -1
  126. package/dist/twilight/{p-CJ4oSd-N.js → p-CFelPn0c.js} +1 -1
  127. package/dist/twilight/{p-Dkl8u_H6.js → p-DCjc1XMn.js} +1 -1
  128. package/dist/twilight/{p-BOK_dArT.js → p-Dcv1lfjK.js} +1 -1
  129. package/dist/twilight/{p-oMzSzsXO.js → p-DukOL2_o.js} +1 -1
  130. package/dist/twilight/{p-7ce146ac.entry.js → p-a6f21afd.entry.js} +1 -1
  131. package/dist/twilight/{p-b2378248.entry.js → p-ab6eb94e.entry.js} +1 -1
  132. package/dist/twilight/{p-5b2567af.entry.js → p-acfee2fb.entry.js} +1 -1
  133. package/dist/twilight/{p-84f7d6ff.entry.js → p-adce81de.entry.js} +1 -1
  134. package/dist/twilight/{p-2d563fd2.entry.js → p-b84f1767.entry.js} +1 -1
  135. package/dist/twilight/{p-0230315b.entry.js → p-bc8b7a34.entry.js} +1 -1
  136. package/dist/twilight/{p-4b2e8325.entry.js → p-bf3d685c.entry.js} +1 -1
  137. package/dist/twilight/{p-62f6d935.entry.js → p-cd95b196.entry.js} +1 -1
  138. package/dist/twilight/{p-2ebf898f.entry.js → p-dac9c90f.entry.js} +1 -1
  139. package/dist/twilight/{p-c96ebac7.entry.js → p-e22d9fe8.entry.js} +1 -1
  140. package/dist/twilight/{p-b354fb32.entry.js → p-fb1f3508.entry.js} +1 -1
  141. package/dist/twilight/twilight.esm.js +1 -1
  142. package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.d.ts +9 -0
  143. package/dist/types/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.d.ts +11 -1
  144. package/dist/types/components.d.ts +12 -2
  145. package/package.json +5 -5
  146. package/dist/twilight/p-70567b55.entry.js +0 -11
@@ -1,18 +1,18 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- var ArrowLeftIcon = `<!-- Generated by IcoMoon.io -->
4
+ var KeyBoardArrowLeftIcon = `<!-- Generated by IcoMoon.io -->
5
5
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
6
  <title>keyboard_arrow_left</title>
7
7
  <path d="M20.563 22.104l-1.875 1.875-8-8 8-8 1.875 1.875-6.125 6.125z"></path>
8
8
  </svg>
9
9
  `;
10
10
 
11
- var ArrowRightIcon = `<!-- Generated by IcoMoon.io -->
11
+ var KeyBoardArrowRightIcon = `<!-- Generated by IcoMoon.io -->
12
12
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
13
13
  <title>keyboard_arrow_right</title>
14
14
  <path d="M11.438 22.479l6.125-6.125-6.125-6.125 1.875-1.875 8 8-8 8z"></path>
15
15
  </svg>
16
16
  `;
17
17
 
18
- export { ArrowLeftIcon as A, ArrowRightIcon as a };
18
+ export { KeyBoardArrowLeftIcon as K, KeyBoardArrowRightIcon as a };
@@ -2,7 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
5
- import { A as ArrowLeftIcon, a as ArrowRightIcon } from './keyboard_arrow_right.js';
5
+ import { K as KeyBoardArrowLeftIcon, a as KeyBoardArrowRightIcon } from './keyboard_arrow_right.js';
6
6
 
7
7
  const sallaBreadcrumbCss = ":host{display:block}";
8
8
 
@@ -180,7 +180,7 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
180
180
  if (item.is_last) {
181
181
  return '';
182
182
  }
183
- let iconDom = this.iconSlot || (salla.config.get('theme.is_rtl', true) ? ArrowLeftIcon : ArrowRightIcon);
183
+ let iconDom = this.iconSlot || (salla.config.get('theme.is_rtl', true) ? KeyBoardArrowLeftIcon : KeyBoardArrowRightIcon);
184
184
  return h("li", { class: "s-breadcrumb-arrow" }, h("div", { class: { "s-breadcrumb-icon-slot": true, "s-breadcrumb-default-icon": !this.iconSlot }, innerHTML: iconDom }));
185
185
  }
186
186
  /**
@@ -45,7 +45,7 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
45
45
  this.selectedProducts[sectionId].delete(productId);
46
46
  // Clear form data and modal options for this product in this specific section
47
47
  this.clearProductFormData(productId, sectionId);
48
- this.clearProductModalOptions(productId);
48
+ this.clearProductModalOptions(productId, sectionId);
49
49
  }
50
50
  else {
51
51
  // Product is being selected
@@ -124,10 +124,25 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
124
124
  }
125
125
  }
126
126
  // Clear modal options state for a specific product
127
- clearProductModalOptions(productId) {
127
+ clearProductModalOptions(productId, sectionId) {
128
+ let sectionIndex = null;
129
+ let productIndex = null;
130
+ if (sectionId != null) {
131
+ sectionIndex = this.sections.findIndex(section => section.id == sectionId);
132
+ if (sectionIndex > -1) {
133
+ const section = this.sections[sectionIndex];
134
+ if (section) {
135
+ const foundIndex = section.products?.findIndex(product => product.id == productId);
136
+ productIndex = typeof foundIndex === 'number' && foundIndex > -1 ? foundIndex : null;
137
+ }
138
+ }
139
+ }
128
140
  // Emit event to notify modal to reset its state for this product
129
141
  salla.event.dispatch('multiple-bundle-product-modal::clear-options', {
130
142
  productId,
143
+ sectionId,
144
+ sectionIndex,
145
+ productIndex,
131
146
  });
132
147
  }
133
148
  renderAccordionHeader(section, selectedCount) {
@@ -164,10 +179,10 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
164
179
  }
165
180
  }
166
181
  render() {
167
- return (h(Host, { key: '01b95de8e1add5136b0fbaa0ceff430acff73f63', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '7736f0ab829921931872dc817815344fff90efe6', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
182
+ return (h(Host, { key: '118e5c2badcec4329da881ba87ce6c6771175c14', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '6c2033af8d144c39cfa4f6b67ffd91d38fcd7bdf', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
168
183
  const selectedCount = this.selectedProducts[section.id]?.size || 0;
169
- return (h("salla-accordion", { key: section.id, collapsed: index === 1 ? true : false }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
170
- })), h("salla-multiple-bundle-product-options-modal", { key: '1cf3eb8fdce83b3ebbdfa13f422490b20e370e8e' })));
184
+ return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
185
+ })), h("salla-multiple-bundle-product-options-modal", { key: 'a5d0c1fb53d38015eebbcb3a203aefb6b9b540af' })));
171
186
  }
172
187
  get host() { return this; }
173
188
  static get style() { return sallaMultipleBundleProductDetailsCss; }
@@ -30,6 +30,7 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
30
30
  this.sectionIndex = 0;
31
31
  this.productIndex = 0;
32
32
  this.selectedOptions = {};
33
+ this.optionsResetTokens = {};
33
34
  this.isLoading = false;
34
35
  this.hasUnsavedChanges = false;
35
36
  this.validationErrors = [];
@@ -86,17 +87,21 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
86
87
  this.selectedOptions = { ...this.selectedOptions };
87
88
  }
88
89
  componentDidLoad() {
89
- salla.event.on('multiple-bundle-product-modal::open', (data) => {
90
+ this.modalOpenListener = (data) => {
90
91
  this.product = data.product;
91
92
  this.sectionId = data.sectionId || null;
92
93
  this.sectionIndex = data.sectionIndex || 0;
93
94
  this.productIndex = data.productIndex || 0;
94
95
  this.open();
95
- });
96
+ };
97
+ salla.event.on('multiple-bundle-product-modal::open', this.modalOpenListener);
96
98
  // Listen for clear-options event when a product is deselected
97
- salla.event.on('multiple-bundle-product-modal::clear-options', (data) => {
98
- this.clearProductOptions(data.productId);
99
- });
99
+ this.clearOptionsListener = (data) => {
100
+ if (!data || !data.productId)
101
+ return;
102
+ this.clearProductOptions(data.productId, data.sectionId, data.productIndex);
103
+ };
104
+ salla.event.on('multiple-bundle-product-modal::clear-options', this.clearOptionsListener);
100
105
  // Create and store the option change listener for proper cleanup
101
106
  this.optionChangeListener = (e) => {
102
107
  const { productId, option, detail } = e.detail;
@@ -121,60 +126,16 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
121
126
  // Extract section info from the checkbox name: bundle[sectionId][productIndex][id]
122
127
  const nameMatch = target.name.match(/^bundle\[([^\]]+)\]\[([^\]]+)\]\[id\]$/);
123
128
  if (nameMatch && !target.checked) {
124
- // Product was deselected, clear its cached options
125
129
  const [, sectionId, productIndex] = nameMatch;
126
130
  const productId = target.value;
127
- // Prevent the immediate event to ensure cleanup happens first
128
- e.preventDefault();
129
- e.stopPropagation();
130
- // Ensure the checkbox is actually unchecked
131
- target.checked = false;
132
- // Generate the same cache key used by the modal
133
- const cacheKey = this.generateCacheKey(sectionId, parseInt(productIndex), productId);
134
- // Clear the cached options for this product
135
- const updatedSelectedOptions = { ...this.selectedOptions };
136
- delete updatedSelectedOptions[cacheKey];
137
- this.selectedOptions = updatedSelectedOptions;
138
- // Force re-render of the modal if it's currently open for this product
139
- if (this.product && this.product.id == productId) {
140
- this.selectedOptions = { ...this.selectedOptions };
141
- }
142
131
  const form = this.host.closest('form');
143
- if (form) {
144
- const productInputPattern = `bundle[${sectionId}][${productIndex}]`;
145
- // Get all form inputs and filter manually
146
- const allInputs = Array.from(form.querySelectorAll('input'));
147
- const matchingInputs = allInputs.filter(input => input.name && input.name.startsWith(productInputPattern));
148
- // Process matching inputs for removal
149
- matchingInputs.forEach(el => {
150
- // Don't remove the visible checkbox that was just unchecked
151
- if (el !== target && (el.type === 'hidden' || el.hasAttribute('data-product-id'))) {
152
- el.remove();
153
- }
154
- });
155
- // Method 2: Find inputs by data-product-id BUT only within the same section/productIndex
156
- const dataProductInputs = allInputs.filter(input => {
157
- // Must have data-product-id matching the productId
158
- if (input.getAttribute('data-product-id') !== String(productId)) {
159
- return false;
160
- }
161
- // Must also be within the same section/productIndex pattern
162
- return input.name && input.name.startsWith(productInputPattern);
163
- });
164
- // Process inputs with matching section/productIndex and productId for removal
165
- dataProductInputs.forEach(el => {
166
- if (el !== target) {
167
- el.remove();
168
- }
169
- });
170
- // Method 3: Removed broader search to prevent removing inputs from other products
171
- // The cleanup is now more precise and only removes inputs for the specific product
172
- // Trigger form change event after cleanup is complete
173
- setTimeout(() => {
174
- const changeEvent = new window.Event('change', { bubbles: true });
175
- form.dispatchEvent(changeEvent);
176
- }, 50); // Small delay to ensure cleanup is complete
177
- }
132
+ this.cleanupProductDeselection({
133
+ sectionId,
134
+ productIndex: parseInt(productIndex, 10),
135
+ productId,
136
+ form,
137
+ uncheckedInput: target,
138
+ });
178
139
  }
179
140
  }
180
141
  };
@@ -186,6 +147,37 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
186
147
  if (this.checkboxChangeListener) {
187
148
  document.removeEventListener('change', this.checkboxChangeListener);
188
149
  }
150
+ if (this.optionChangeListener) {
151
+ salla.event.off('product-options::change', this.optionChangeListener);
152
+ }
153
+ if (this.modalOpenListener) {
154
+ salla.event.off('multiple-bundle-product-modal::open', this.modalOpenListener);
155
+ }
156
+ if (this.clearOptionsListener) {
157
+ salla.event.off('multiple-bundle-product-modal::clear-options', this.clearOptionsListener);
158
+ }
159
+ }
160
+ cleanupProductDeselection(params) {
161
+ const { sectionId, productIndex, productId, form, uncheckedInput } = params;
162
+ this.clearProductOptions(productId, sectionId, productIndex);
163
+ if (form) {
164
+ const productInputPattern = `bundle[${sectionId}][${productIndex}]`;
165
+ Array.from(form.querySelectorAll(`input[name^="${productInputPattern}"]`)).forEach(input => {
166
+ if (input === uncheckedInput) {
167
+ return;
168
+ }
169
+ const shouldRemoveHidden = input.type === 'hidden';
170
+ const shouldRemoveByDataset = input.getAttribute('data-product-id') === String(productId) &&
171
+ input.name?.startsWith(productInputPattern);
172
+ if (shouldRemoveHidden || shouldRemoveByDataset) {
173
+ input.remove();
174
+ }
175
+ });
176
+ requestAnimationFrame(() => {
177
+ const changeEvent = new window.Event('change', { bubbles: true });
178
+ form.dispatchEvent(changeEvent);
179
+ });
180
+ }
189
181
  }
190
182
  generateFormInputName(sectionId, productIndex, optionParentId) {
191
183
  return `bundle[${sectionId}][${productIndex}][options][${optionParentId}]`;
@@ -212,17 +204,37 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
212
204
  }
213
205
  }
214
206
  // Clear options state for a specific product
215
- clearProductOptions(productId) {
216
- // Generate cache key for this specific product in current section context
217
- const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
218
- // Remove the product from selectedOptions using the cache key
207
+ clearProductOptions(productId, sectionId, productIndex) {
219
208
  const updatedSelectedOptions = { ...this.selectedOptions };
220
- delete updatedSelectedOptions[cacheKey];
209
+ if (sectionId != null && productIndex != null && !Number.isNaN(productIndex)) {
210
+ const cacheKey = this.generateCacheKey(sectionId, productIndex, productId);
211
+ delete updatedSelectedOptions[cacheKey];
212
+ this.bumpOptionsResetToken(cacheKey);
213
+ }
214
+ else {
215
+ const productSuffix = `-${String(productId)}`;
216
+ const affectedKeys = [];
217
+ Object.keys(updatedSelectedOptions).forEach(key => {
218
+ if (key.endsWith(productSuffix)) {
219
+ delete updatedSelectedOptions[key];
220
+ affectedKeys.push(key);
221
+ }
222
+ });
223
+ affectedKeys.forEach(key => this.bumpOptionsResetToken(key));
224
+ }
221
225
  this.selectedOptions = updatedSelectedOptions;
222
226
  // Reset validation errors and unsaved changes
223
227
  this.validationErrors = [];
224
228
  this.hasUnsavedChanges = false;
225
229
  }
230
+ bumpOptionsResetToken(cacheKey) {
231
+ if (!cacheKey)
232
+ return;
233
+ this.optionsResetTokens = {
234
+ ...this.optionsResetTokens,
235
+ [cacheKey]: (this.optionsResetTokens[cacheKey] || 0) + 1,
236
+ };
237
+ }
226
238
  async handleOptionChange(productId, option, detail) {
227
239
  const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
228
240
  // Get the current state from the component to ensure we have the latest selections
@@ -417,6 +429,8 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
417
429
  this.optionsSaved.emit({
418
430
  productId: Number(productId),
419
431
  selectedOptions,
432
+ sectionId: this.sectionId,
433
+ productIndex: this.productIndex,
420
434
  });
421
435
  // Emit product selected event to check the card
422
436
  if (this.sectionId) {
@@ -463,7 +477,9 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
463
477
  render() {
464
478
  const productId = this.product?.id;
465
479
  const optionsWithSelectedState = this.getOptionsWithSelectedState();
466
- return (h(Host, { key: 'f48867c1730d142b1e55ddb4442c7e7d789a35bb' }, h("salla-modal", { key: '62196cd41c3979ca5e71327d9aad450a819a45ec', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: 'feee0e09d5f1dbb19f02b8c109f43e7dc5d1dad8', slot: "loading" }, h("salla-skeleton", { key: '149debcb4852d4096613721a202f4079439abf0a', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: '591045fe1d3c9e30bb53a927d3e4d62b54623503', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
480
+ const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
481
+ const resetToken = this.optionsResetTokens[cacheKey] || 0;
482
+ return (h(Host, { key: 'ce4cec97975d0aef32b50a13237a2d64701d8e9f' }, h("salla-modal", { key: 'cda08db7768f0b987a9569ca1170b059a58a417e', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: 'd093204f6d85e7a874e0a69a826869e179aeafa4', slot: "loading" }, h("salla-skeleton", { key: '140608027bb0237b62eeb24d1eb5e47c5279c7e3', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: '807f2428e8219d9ab6e46163a5d03ad0b2e1b9a3', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
467
483
  centeredSlides: true,
468
484
  centeredSlidesBounds: true,
469
485
  slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
@@ -472,13 +488,13 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
472
488
  watchSlidesProgress: true,
473
489
  direction: 'vertical',
474
490
  spaceBetween: 10,
475
- } }, h("div", { key: '1c4163f6d60a89b12d681e3df2db87a523ab092b', slot: "items" }, this.product?.images &&
491
+ } }, h("div", { key: 'f287bea52aa1e3c68debd0b68d011025ea3f9157', slot: "items" }, this.product?.images &&
476
492
  this.product?.images.map((image, index) => (h("div", { key: index, class: "swiper-slide" }, h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index + 1}`, loading: "lazy", onError: e => {
477
493
  e.target.style.display = 'none';
478
- } }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '911fe5aad35ab3e733871bb185e7a89bb74b6da3', slot: "thumbs" }, this.product?.images &&
494
+ } }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '5d8064ef63c91a660a3b3267afb29e498ac76f4c', slot: "thumbs" }, this.product?.images &&
479
495
  this.product?.images.map((image, index) => (h("div", { key: index, "data-caption": `${this.product?.name} - Image ${index + 1}` }, h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index + 1}`, alt: image.alt || `${this.product?.name} - ${index + 1}`, onError: e => {
480
496
  e.target.style.display = 'none';
481
- } })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${this.sectionId}-${this.sectionIndex}-${productId}-persistent`, "product-id": productId }), h("div", { key: 'd107ebd058a3f349a5f2f05f4e2b685942d485d6', slot: "footer" }, h("div", { key: '01c7d37a91bb95eb830fcc3290a7cfde9ef7324b', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: '402b9d19c176ebaec8bd7396b9bafe74b81fa456', onClick: e => this.onSave(e), loading: this.isLoading, disabled: this.isLoading }, this.isLoading
497
+ } })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '2f6c7f133ccabd75bbb9e8649c056619ce754296', slot: "footer" }, h("div", { key: '1c04908511a480af63fc4e358393514c74967508', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: '49fbad4b1e71004dc8fd6df5d0f1a61b1ef25b8d', onClick: e => this.onSave(e), loading: this.isLoading, disabled: this.isLoading }, this.isLoading
482
498
  ? salla.lang.get('common.elements.saving')
483
499
  : salla.lang.get('common.elements.save')))))));
484
500
  }
@@ -493,6 +509,7 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
493
509
  "sectionIndex": [32],
494
510
  "productIndex": [32],
495
511
  "selectedOptions": [32],
512
+ "optionsResetTokens": [32],
496
513
  "isLoading": [32],
497
514
  "hasUnsavedChanges": [32],
498
515
  "validationErrors": [32],
@@ -2,6 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
+ import { K as KeyBoardArrowLeftIcon, a as KeyBoardArrowRightIcon } from './keyboard_arrow_right.js';
5
6
  import { d as defineCustomElement$1 } from './salla-slider2.js';
6
7
 
7
8
  const sallaMultipleBundleProductSliderCss = "";
@@ -13,6 +14,7 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
13
14
  this.productSelected = createEvent(this, "productSelected", 7);
14
15
  this.productOptionsSelected = createEvent(this, "productOptionsSelected", 7);
15
16
  this.selectedProducts = {};
17
+ this.savedOptionsByInstance = {};
16
18
  this.handleProductClick = (product, productIndex) => {
17
19
  // Find the checkbox input for this product
18
20
  const checkboxId = this.generateEventName(this.section.id, productIndex);
@@ -25,6 +27,10 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
25
27
  // Dispatch a change event to trigger form validation/submission
26
28
  const changeEvent = new window.Event('change', { bubbles: true });
27
29
  checkbox.dispatchEvent(changeEvent);
30
+ if (!checkbox.checked) {
31
+ this.clearSavedOptionsState(this.section.id, productIndex);
32
+ this.dispatchClearOptionsEvent(product, productIndex);
33
+ }
28
34
  }
29
35
  this.productSelected.emit({
30
36
  product,
@@ -38,17 +44,66 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
38
44
  });
39
45
  };
40
46
  }
47
+ getProductInstanceKey(sectionId, productIndex) {
48
+ return `${sectionId}::${productIndex}`;
49
+ }
50
+ dispatchClearOptionsEvent(product, productIndex) {
51
+ salla.event.dispatch('multiple-bundle-product-modal::clear-options', {
52
+ productId: product.id,
53
+ sectionId: this.section.id,
54
+ sectionIndex: this.sectionIndex,
55
+ productIndex,
56
+ });
57
+ }
58
+ handleOptionsSaved(event) {
59
+ const detail = event.detail;
60
+ if (!detail)
61
+ return;
62
+ const { sectionId, productIndex, selectedOptions } = detail;
63
+ if (sectionId == null || sectionId !== this.section?.id)
64
+ return;
65
+ if (productIndex == null || Number.isNaN(productIndex))
66
+ return;
67
+ const key = this.getProductInstanceKey(sectionId, productIndex);
68
+ const hasOptions = !!selectedOptions?.length;
69
+ if (hasOptions) {
70
+ this.savedOptionsByInstance = {
71
+ ...this.savedOptionsByInstance,
72
+ [key]: true,
73
+ };
74
+ }
75
+ else if (this.savedOptionsByInstance[key]) {
76
+ const updatedState = { ...this.savedOptionsByInstance };
77
+ delete updatedState[key];
78
+ this.savedOptionsByInstance = updatedState;
79
+ }
80
+ }
81
+ clearSavedOptionsState(sectionId, productIndex) {
82
+ const key = this.getProductInstanceKey(sectionId, productIndex);
83
+ if (!this.savedOptionsByInstance[key])
84
+ return;
85
+ const updatedState = { ...this.savedOptionsByInstance };
86
+ delete updatedState[key];
87
+ this.savedOptionsByInstance = updatedState;
88
+ }
41
89
  generateEventName(sectionId, productIndex) {
42
90
  return `bundle[${sectionId}][${productIndex}][id]`;
43
91
  }
44
92
  render() {
45
- return (h(Host, { key: 'ec6fb04196690c5299da565d852ec77bbee6b1e3' }, h("salla-slider", { key: 'a7e79c2f27a53135e55e2708b5aa60d05f9ad21b', type: "carousel", controlsOuter: false, showControls: false, id: "accordion-multiple-bundle-product", pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: {
93
+ return (h(Host, { key: '234e93258c3d7ca5d7dc08efb68743d042646706' }, h("salla-slider", { key: '451184823378e4ad0c9034d3af1b87373bcb7d20', type: "carousel", controlsOuter: false, showControls: false, id: "accordion-multiple-bundle-product", pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: {
46
94
  spaceBetween: 0,
47
- } }, h("div", { key: 'c07aa5a0ee4fe106764b47dfa6d9f6509fb659cf', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
95
+ } }, h("div", { key: '28c1acfd37a77059d4c177b787dca9deea47d123', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
48
96
  const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
49
- return (h("div", { class: `swiper-slide s-multiple-bundle-product-slide-one-third ${product.quantity == 0
97
+ const hasSavedOptions = this.savedOptionsByInstance[this.getProductInstanceKey(this.section.id, productIndex)];
98
+ const optionsButtonLabel = hasSavedOptions
99
+ ? salla.lang.getWithDefault('pages.products.edit_selected_options', 'تعديل الخيارات')
100
+ : salla.lang.get('pages.products.choose_from_options');
101
+ let optionsArrowIcon = salla.config.get('theme.is_rtl', true)
102
+ ? KeyBoardArrowLeftIcon
103
+ : KeyBoardArrowRightIcon;
104
+ return (h("div", { class: `s-multiple-bundle-product-slide-one-third ${product.quantity == 0
50
105
  ? 's-multiple-bundle-product-slide-one-third-disabled'
51
- : ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, product.name)), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, salla.lang.get('pages.products.choose_from_options'), h("i", { class: "sicon-keyboard_arrow_left s-multiple-bundle-product-button-icon" })))))));
106
+ : ''}`, key: product.id }, h("div", { class: "s-multiple-bundle-product-card" }, h("div", { class: "s-multiple-bundle-product-image-wrapper", onClick: () => this.handleProductClick(product, productIndex) }, h("input", { id: this.generateEventName(this.section.id, productIndex), type: "checkbox", class: "s-multiple-bundle-product-checkbox", checked: isChecked, name: this.generateEventName(this.section.id, productIndex), value: product.id }), h("img", { src: product.image.url || salla.url.cdn('images/s-empty.png'), loading: "lazy", alt: product.image.alt || product.name, class: "s-multiple-bundle-product-image" })), h("div", { class: "s-multiple-bundle-product-content-wrapper" }, h("div", { class: "s-multiple-bundle-product-content" }, h("div", { class: "s-multiple-bundle-product-details" }, h("div", { class: "s-multiple-bundle-product-title-wrapper" }, h("h2", { class: "s-multiple-bundle-product-title" }, product.name)), h("div", { class: "s-multiple-bundle-product-price-wrapper" }, h("span", { class: "s-multiple-bundle-product-price" }, h("span", { innerHTML: salla.money(product.price) })), product.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-price-discount" }, h("span", { innerHTML: salla.money(product.sale_price) }))))), product.quantity_in_group > 0 && product.quantity !== 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.pieces'), h("span", null, product.quantity_in_group))), product.quantity === 0 && (h("span", { class: "s-multiple-bundle-product-badge" }, salla.lang.get('pages.products.quantity_in_group_finished')))), product.options?.length > 0 && (h("button", { class: "s-multiple-bundle-product-button", onClick: () => this.handleOptionsClick(product), type: "button" }, optionsButtonLabel, h("span", { class: "s-multiple-bundle-product-button-icon", innerHTML: optionsArrowIcon })))))));
52
107
  })))));
53
108
  }
54
109
  get host() { return this; }
@@ -56,8 +111,9 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
56
111
  }, [0, "salla-multiple-bundle-product-slider", {
57
112
  "section": [16],
58
113
  "sectionIndex": [2, "section-index"],
59
- "selectedProducts": [16, "selected-products"]
60
- }]);
114
+ "selectedProducts": [16, "selected-products"],
115
+ "savedOptionsByInstance": [32]
116
+ }, [[4, "optionsSaved", "handleOptionsSaved"]]]);
61
117
  function defineCustomElement() {
62
118
  if (typeof customElements === "undefined") {
63
119
  return;
@@ -2,7 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
- import { a as ArrowRightIcon, A as ArrowLeftIcon } from './keyboard_arrow_right.js';
5
+ import { a as KeyBoardArrowRightIcon, K as KeyBoardArrowLeftIcon } from './keyboard_arrow_right.js';
6
6
 
7
7
  const sallaSliderCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA\") format(\"woff\");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px, 0, 0)}.swiper-pointer-events{touch-action:pan-y}.swiper-pointer-events.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform, height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:\"\";flex-shrink:0;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}:root{}.swiper-pagination{position:absolute;text-align:center;transition:300ms opacity;transform:translate3d(0, 0, 0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none !important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(0.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(0.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(0.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, 0.2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none !important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px, -50%, 0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:200ms transform, 200ms top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:200ms transform, 200ms left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:200ms transform, 200ms right}.swiper-pagination-progressbar{background:rgba(0, 0, 0, 0.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}:root{--swiper-navigation-size:44px;}.swiper-button-prev,.swiper-button-next{position:absolute;top:50%;width:calc(var(--swiper-navigation-size) / 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - var(--swiper-navigation-size) / 2);z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:0.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none !important}.swiper-button-prev:after,.swiper-button-next:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none !important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:\"prev\"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:\"next\"}.swiper-button-lock{display:none}";
8
8
 
@@ -529,10 +529,10 @@ const SallaSlider = /*@__PURE__*/ proxyCustomElement(class SallaSlider extends H
529
529
  : '', h("div", { class: "s-slider-block__title-left" }, this.displayAllUrl ?
530
530
  h("a", { href: this.displayAllUrl, class: "s-slider-block__display-all" }, this.displayAllTitle)
531
531
  : '', this.showControls ?
532
- h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
532
+ h("div", { class: "s-slider-block__title-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? KeyBoardArrowRightIcon : KeyBoardArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? KeyBoardArrowLeftIcon : KeyBoardArrowRightIcon })))
533
533
  : ''))
534
534
  : '', h("div", { key: 'e84fedf7c982d9c15a2b43631123ae42ecf98ab8', class: "swiper s-slider-container", ref: el => this.sliderContainer = el, dir: this.vertical ? "ltr" : this.direction }, h("slot", { key: 'b91356832a6d5e19134073400f19046c3372b403' }), h("div", { key: '21d21f8ec73eb27016a199272e4193456e2e3823', class: "swiper-wrapper s-slider-swiper-wrapper", ref: el => this.sliderWrapper = el }, h("slot", { key: 'e18cdeba693a383a75523836c761f33bbc5e115e', name: 'items' })), this.pagination ? h("div", { class: "swiper-pagination" }) : ''), this.type == 'thumbs' && this.hasThumbSlot ? h("div", { class: "s-slider-thumbs" }, h("div", { class: "swiper s-slider-thumbs-container", dir: this.getThumbsDirection(), ref: el => this.thumbsSliderContainer = el }, h("div", { class: { "s-slider-swiper-wrapper swiper-wrapper": true, "s-slider-grid-thumbs": this.gridThumbs }, ref: el => this.thumbsSliderWrapper = el }, h("slot", { name: "thumbs" })), this.showThumbsControls ?
535
- h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon })))
535
+ h("div", { class: "s-slider-thumbs-nav", dir: "rtl" }, h("button", { "aria-label": "Previous Slide", class: "s-slider-thumbs-prev s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? KeyBoardArrowRightIcon : KeyBoardArrowLeftIcon })), h("button", { "aria-label": "Next Slide", class: "s-slider-thumbs-next s-slider-nav-arrow" }, h("span", { class: "s-slider-button-icon", innerHTML: this.direction == 'rtl' ? KeyBoardArrowLeftIcon : KeyBoardArrowRightIcon })))
536
536
  : null))
537
537
  : null));
538
538
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-BdPAI7KX.js';
4
+ import { d as getDefaultExportFromCjs } from './index-BcEkcgy-.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {