@salla.sa/twilight-components 2.14.492 → 2.14.494

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 (367) hide show
  1. package/dist/cjs/{filepond-CMzI_Zn9.js → filepond-CYww4tEC.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-ChvDhRiZ.js → filepond-plugin-file-poster-DPW9mW_l.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BM0ckfFB.js → filepond-plugin-file-validate-size-CK2KIHil.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CgTEjruH.js → filepond-plugin-file-validate-type-CPvzHnlO.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BEAVKR6v.js → filepond-plugin-image-edit-DfYj0utx.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CSPPm2wZ.js → filepond-plugin-image-exif-orientation-BPH4xTYe.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DfOg_WnI.js → filepond-plugin-image-preview-BbB7wI4M.js} +1 -1
  8. package/dist/cjs/{functions-NX0FxE-j.js → functions-C3W0O3Qh.js} +1 -1
  9. package/dist/cjs/{index-BLRU4abB.js → index-BQKhP5JS.js} +14 -14
  10. package/dist/cjs/{index-A4KCMRpm.js → index-CQRzEmek.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +23 -11
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  31. package/dist/cjs/{salla-count-down.cjs.entry.js → salla-count-down_2.cjs.entry.js} +204 -1
  32. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +3 -3
  46. package/dist/cjs/{salla-reward-action_4.cjs.entry.js → salla-loyalty-exchange-product-card_5.cjs.entry.js} +63 -21
  47. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +11 -11
  48. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +6 -5
  49. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-program.cjs.entry.js +6 -5
  53. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +5 -5
  54. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  82. package/dist/cjs/{salla-order-options-modal_3.cjs.entry.js → salla-product-card_2.cjs.entry.js} +1 -204
  83. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  105. package/dist/cjs/{tracked-promise-g2hwsJdv.js → tracked-promise-DYGNjn0V.js} +1 -1
  106. package/dist/cjs/twilight.cjs.js +2 -2
  107. package/dist/cjs/{vanilla-picker-ETt83j-1.js → vanilla-picker-CVraU_Ic.js} +1 -1
  108. package/dist/collection/collection-manifest.json +1 -0
  109. package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +72 -0
  110. package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
  111. package/dist/collection/components/salla-loyalty-program/salla-loyalty-panel.js +4 -2
  112. package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
  113. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.css +48 -0
  114. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +3 -1
  115. package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
  116. package/dist/collection/components/salla-loyalty-program/salla-reward-action.js +1 -4
  117. package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
  118. package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +58 -5
  119. package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -5
  120. package/dist/collection/components/salla-product-options/salla-product-options.js +22 -10
  121. package/dist/components/index.js +2 -2
  122. package/dist/components/salla-loyalty-banner.js +8 -2
  123. package/dist/components/salla-loyalty-exchange-product-card.d.ts +11 -0
  124. package/dist/components/salla-loyalty-exchange-product-card.js +9 -0
  125. package/dist/components/salla-loyalty-exchange-product-card2.js +151 -0
  126. package/dist/components/salla-loyalty-hero2.js +4 -4
  127. package/dist/components/salla-loyalty-panel.js +33 -25
  128. package/dist/components/salla-loyalty-point2.js +5 -5
  129. package/dist/components/salla-loyalty-program.js +30 -22
  130. package/dist/components/salla-loyalty-reward.js +3 -3
  131. package/dist/components/salla-product-options2.js +22 -10
  132. package/dist/components/salla-reward-action2.js +9 -6
  133. package/dist/components/salla-reward-card2.js +2 -2
  134. package/dist/components/salla-reward-details2.js +63 -27
  135. package/dist/components/salla-reward-exchange2.js +5 -9
  136. package/dist/esm/{filepond-DpAz9cLe.js → filepond-V-9YwoVf.js} +1 -1
  137. package/dist/esm/{filepond-plugin-file-poster-CG1OGxGU.js → filepond-plugin-file-poster-BBE8fAHq.js} +1 -1
  138. package/dist/esm/{filepond-plugin-file-validate-size-D19g-XYh.js → filepond-plugin-file-validate-size-CR9iK259.js} +1 -1
  139. package/dist/esm/{filepond-plugin-file-validate-type-CXHLmRma.js → filepond-plugin-file-validate-type-B4eStrHv.js} +1 -1
  140. package/dist/esm/{filepond-plugin-image-edit-Ba-AftT1.js → filepond-plugin-image-edit-B84jjo8b.js} +1 -1
  141. package/dist/esm/{filepond-plugin-image-exif-orientation-BRkxatOj.js → filepond-plugin-image-exif-orientation-BAaD5wJD.js} +1 -1
  142. package/dist/esm/{filepond-plugin-image-preview-BXud5dzw.js → filepond-plugin-image-preview-Bn4GgIpr.js} +1 -1
  143. package/dist/esm/{functions-cqVnlaVs.js → functions-Btrtoght.js} +1 -1
  144. package/dist/esm/{index-BpMToHtv.js → index-3omad4sF.js} +14 -14
  145. package/dist/esm/{index-CNDZOGrc.js → index-Co4ZrgLC.js} +1 -1
  146. package/dist/esm/loader.js +3 -3
  147. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  148. package/dist/esm/salla-accordion_6.entry.js +1 -1
  149. package/dist/esm/salla-add-product-button_5.entry.js +23 -11
  150. package/dist/esm/salla-advertisement.entry.js +1 -1
  151. package/dist/esm/salla-alert_2.entry.js +1 -1
  152. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  153. package/dist/esm/salla-apps-icons.entry.js +1 -1
  154. package/dist/esm/salla-badge.entry.js +1 -1
  155. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  156. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  157. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  158. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  159. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  160. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  161. package/dist/esm/salla-comment-factors.entry.js +1 -1
  162. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  163. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  164. package/dist/esm/salla-contacts.entry.js +1 -1
  165. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  166. package/dist/esm/{salla-count-down.entry.js → salla-count-down_2.entry.js} +204 -2
  167. package/dist/esm/salla-custom-fields.entry.js +1 -1
  168. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  169. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  170. package/dist/esm/salla-filters-widget.entry.js +1 -1
  171. package/dist/esm/salla-filters.entry.js +1 -1
  172. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  173. package/dist/esm/salla-gifting.entry.js +1 -1
  174. package/dist/esm/salla-hook.entry.js +1 -1
  175. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  176. package/dist/esm/salla-installment.entry.js +1 -1
  177. package/dist/esm/salla-list-tile.entry.js +1 -1
  178. package/dist/esm/salla-localization-modal.entry.js +1 -1
  179. package/dist/esm/salla-login-modal.entry.js +1 -1
  180. package/dist/esm/salla-loyalty-banner.entry.js +3 -3
  181. package/dist/esm/{salla-reward-action_4.entry.js → salla-loyalty-exchange-product-card_5.entry.js} +63 -22
  182. package/dist/esm/salla-loyalty-hero_2.entry.js +11 -11
  183. package/dist/esm/salla-loyalty-panel.entry.js +6 -5
  184. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  186. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  187. package/dist/esm/salla-loyalty-program.entry.js +6 -5
  188. package/dist/esm/salla-loyalty-reward.entry.js +5 -5
  189. package/dist/esm/salla-loyalty.entry.js +1 -1
  190. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  191. package/dist/esm/salla-map_2.entry.js +1 -1
  192. package/dist/esm/salla-menu.entry.js +1 -1
  193. package/dist/esm/salla-metadata.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  195. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  196. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  197. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  198. package/dist/esm/salla-notification-item.entry.js +1 -1
  199. package/dist/esm/salla-notifications.entry.js +1 -1
  200. package/dist/esm/salla-offer-modal.entry.js +1 -1
  201. package/dist/esm/salla-offer.entry.js +1 -1
  202. package/dist/esm/salla-order-branch.entry.js +1 -1
  203. package/dist/esm/salla-order-cancel.entry.js +1 -1
  204. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  205. package/dist/esm/salla-order-details-options.entry.js +1 -1
  206. package/dist/esm/salla-order-details.entry.js +1 -1
  207. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  208. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  209. package/dist/esm/salla-order-edit.entry.js +1 -1
  210. package/dist/esm/salla-order-summary.entry.js +1 -1
  211. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  212. package/dist/esm/salla-orders.entry.js +1 -1
  213. package/dist/esm/salla-payments.entry.js +1 -1
  214. package/dist/esm/salla-placeholder.entry.js +1 -1
  215. package/dist/esm/salla-price-range.entry.js +1 -1
  216. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  217. package/dist/esm/{salla-order-options-modal_3.entry.js → salla-product-card_2.entry.js} +2 -204
  218. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  219. package/dist/esm/salla-products-list.entry.js +1 -1
  220. package/dist/esm/salla-quick-order.entry.js +1 -1
  221. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  222. package/dist/esm/salla-rating-modal.entry.js +1 -1
  223. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  224. package/dist/esm/salla-scopes.entry.js +1 -1
  225. package/dist/esm/salla-search.entry.js +1 -1
  226. package/dist/esm/salla-skeleton.entry.js +1 -1
  227. package/dist/esm/salla-slider.entry.js +1 -1
  228. package/dist/esm/salla-social-share.entry.js +1 -1
  229. package/dist/esm/salla-social.entry.js +1 -1
  230. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  231. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  232. package/dist/esm/salla-tooltip.entry.js +1 -1
  233. package/dist/esm/salla-trust-badges.entry.js +1 -1
  234. package/dist/esm/salla-user-menu.entry.js +1 -1
  235. package/dist/esm/salla-user-profile.entry.js +1 -1
  236. package/dist/esm/salla-user-settings.entry.js +1 -1
  237. package/dist/esm/salla-verify.entry.js +1 -1
  238. package/dist/esm/salla-wallet.entry.js +1 -1
  239. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  240. package/dist/esm/{tracked-promise-DOcrdjBg.js → tracked-promise-BPB6hr9g.js} +1 -1
  241. package/dist/esm/twilight.js +3 -3
  242. package/dist/esm/{vanilla-picker-BkRDjm_J.js → vanilla-picker-CN8ge6Yh.js} +1 -1
  243. package/dist/twilight/p-03d231a1.entry.js +4 -0
  244. package/dist/twilight/p-07b25f79.entry.js +4 -0
  245. package/dist/twilight/{p-2720c2b7.entry.js → p-07cd3153.entry.js} +1 -1
  246. package/dist/twilight/{p-1d5f98eb.entry.js → p-07feb752.entry.js} +1 -1
  247. package/dist/twilight/p-0838e0cc.entry.js +4 -0
  248. package/dist/twilight/{p-749b88a6.entry.js → p-08a065d6.entry.js} +1 -1
  249. package/dist/twilight/{p-0251d899.entry.js → p-0a0f2340.entry.js} +1 -1
  250. package/dist/twilight/{p-cc394677.entry.js → p-0c55c5ed.entry.js} +1 -1
  251. package/dist/twilight/{p-12cf0042.entry.js → p-1072161d.entry.js} +1 -1
  252. package/dist/twilight/{p-269711db.entry.js → p-12d180be.entry.js} +1 -1
  253. package/dist/twilight/{p-461bc0b5.entry.js → p-13e1c331.entry.js} +1 -1
  254. package/dist/twilight/{p-7cf65f99.entry.js → p-16d6ee9b.entry.js} +1 -1
  255. package/dist/twilight/{p-67ff151d.entry.js → p-18005312.entry.js} +1 -1
  256. package/dist/twilight/{p-824ca27d.entry.js → p-185a97f2.entry.js} +1 -1
  257. package/dist/twilight/{p-17337fed.entry.js → p-19c8a5d5.entry.js} +1 -1
  258. package/dist/twilight/{p-d0941265.entry.js → p-1beb481d.entry.js} +1 -1
  259. package/dist/twilight/{p-CDfz5a3h.js → p-1qlEgGio.js} +1 -1
  260. package/dist/twilight/{p-bf21567e.entry.js → p-2c86bd20.entry.js} +1 -1
  261. package/dist/twilight/{p-d1877684.entry.js → p-30b7deca.entry.js} +1 -1
  262. package/dist/twilight/{p-962596fd.entry.js → p-3157e3dd.entry.js} +1 -1
  263. package/dist/twilight/{p-3c4cbc49.entry.js → p-32467a9d.entry.js} +1 -1
  264. package/dist/twilight/{p-9fc02a58.entry.js → p-342dad15.entry.js} +1 -1
  265. package/dist/twilight/{p-2704b823.entry.js → p-34741bf4.entry.js} +1 -1
  266. package/dist/twilight/{p-b0ec4004.entry.js → p-3a54d785.entry.js} +1 -1
  267. package/dist/twilight/{p-4c5afcea.entry.js → p-3ae98980.entry.js} +1 -1
  268. package/dist/twilight/{p-5e3fa632.entry.js → p-3d005581.entry.js} +1 -1
  269. package/dist/twilight/{p-eeb9b7ec.entry.js → p-3e01a221.entry.js} +1 -1
  270. package/dist/twilight/{p-BpMToHtv.js → p-3omad4sF.js} +1 -1
  271. package/dist/twilight/{p-b0bb526f.entry.js → p-44d95774.entry.js} +1 -1
  272. package/dist/twilight/{p-6c3654f7.entry.js → p-52556f85.entry.js} +1 -1
  273. package/dist/twilight/p-56a74d0a.entry.js +4 -0
  274. package/dist/twilight/{p-4f330750.entry.js → p-574c57c6.entry.js} +1 -1
  275. package/dist/twilight/{p-14ee219d.entry.js → p-57ace49d.entry.js} +1 -1
  276. package/dist/twilight/{p-d76e3af1.entry.js → p-57b87240.entry.js} +1 -1
  277. package/dist/twilight/p-5877797d.entry.js +4 -0
  278. package/dist/twilight/{p-64181bed.entry.js → p-59cf3d1c.entry.js} +1 -1
  279. package/dist/twilight/{p-c8778468.entry.js → p-59cf6efb.entry.js} +1 -1
  280. package/dist/twilight/{p-376f5734.entry.js → p-5acaee73.entry.js} +1 -1
  281. package/dist/twilight/{p-5d1b5a04.entry.js → p-6740cfb1.entry.js} +1 -1
  282. package/dist/twilight/{p-c77a657b.entry.js → p-67a304d4.entry.js} +1 -1
  283. package/dist/twilight/{p-5b474463.entry.js → p-6a7d7c6f.entry.js} +1 -1
  284. package/dist/twilight/{p-2d009c5d.entry.js → p-6aad9abe.entry.js} +1 -1
  285. package/dist/twilight/{p-bc9d30a6.entry.js → p-6c4d7933.entry.js} +1 -1
  286. package/dist/twilight/{p-97045b36.entry.js → p-6e9b255e.entry.js} +1 -1
  287. package/dist/twilight/p-729e2abe.entry.js +4 -0
  288. package/dist/twilight/{p-c6fcc9f5.entry.js → p-754d042b.entry.js} +1 -1
  289. package/dist/twilight/p-77676a5d.entry.js +4 -0
  290. package/dist/twilight/p-783d1a70.entry.js +4 -0
  291. package/dist/twilight/{p-5e2e12a0.entry.js → p-7971bc45.entry.js} +1 -1
  292. package/dist/twilight/{p-9ef89918.entry.js → p-7bb21315.entry.js} +1 -1
  293. package/dist/twilight/{p-36330e95.entry.js → p-7bb28f60.entry.js} +1 -1
  294. package/dist/twilight/{p-37e5f516.entry.js → p-7fae4a20.entry.js} +1 -1
  295. package/dist/twilight/{p-398f5f2d.entry.js → p-82b38a08.entry.js} +1 -1
  296. package/dist/twilight/{p-85f447f3.entry.js → p-842e61d7.entry.js} +1 -1
  297. package/dist/twilight/{p-0d945324.entry.js → p-85f9d064.entry.js} +1 -1
  298. package/dist/twilight/{p-59133a6d.entry.js → p-927448a3.entry.js} +1 -1
  299. package/dist/twilight/{p-e171f81f.entry.js → p-92d68ba1.entry.js} +1 -1
  300. package/dist/twilight/{p-e3625ea8.entry.js → p-94af7c15.entry.js} +1 -1
  301. package/dist/twilight/{p-1daddc57.entry.js → p-9a862593.entry.js} +1 -1
  302. package/dist/twilight/p-9c302701.entry.js +4 -0
  303. package/dist/twilight/{p-8571999e.entry.js → p-9d734c16.entry.js} +1 -1
  304. package/dist/twilight/{p-1db56957.entry.js → p-9d745f77.entry.js} +1 -1
  305. package/dist/twilight/{p-52c9ccff.entry.js → p-9f1c78ac.entry.js} +1 -1
  306. package/dist/twilight/{p-ed7486a5.entry.js → p-9f6081d4.entry.js} +1 -1
  307. package/dist/twilight/{p-BVzq9WqP.js → p-B1S798Uj.js} +1 -1
  308. package/dist/twilight/{p-BVeQloEV.js → p-BlJJbPc3.js} +2 -2
  309. package/dist/twilight/{p-BziVRCve.js → p-CAqUTN8N.js} +1 -1
  310. package/dist/twilight/{p-BUS6LvNX.js → p-CXp5fcIv.js} +1 -1
  311. package/dist/twilight/{p-GW15OFUZ.js → p-CwlNfhff.js} +1 -1
  312. package/dist/twilight/{p-C0DMTlx5.js → p-DnsL3smj.js} +1 -1
  313. package/dist/twilight/{p-D4AyNYj-.js → p-DzgGIUvs.js} +1 -1
  314. package/dist/twilight/{p-CizzR_38.js → p-MT8XYsK6.js} +2 -2
  315. package/dist/twilight/{p-BpU_apUf.js → p-RH6Ze2WQ.js} +1 -1
  316. package/dist/twilight/{p-BcEAswfu.js → p-YpsE7YiS.js} +1 -1
  317. package/dist/twilight/{p-e320738a.entry.js → p-a65a1d76.entry.js} +1 -1
  318. package/dist/twilight/p-b25643cf.entry.js +4 -0
  319. package/dist/twilight/{p-4cc5a4d9.entry.js → p-bddef859.entry.js} +1 -1
  320. package/dist/twilight/{p-55ae56af.entry.js → p-bdef80a3.entry.js} +1 -1
  321. package/dist/twilight/{p-56484fe4.entry.js → p-c2ab62c6.entry.js} +1 -1
  322. package/dist/twilight/{p-5a0ea7fd.entry.js → p-c6e28a21.entry.js} +1 -1
  323. package/dist/twilight/{p-f20ed887.entry.js → p-c842401c.entry.js} +1 -1
  324. package/dist/twilight/{p-8b61f79a.entry.js → p-c850756e.entry.js} +1 -1
  325. package/dist/twilight/{p-123a4b64.entry.js → p-d00c74c3.entry.js} +1 -1
  326. package/dist/twilight/{p-2cfd0c46.entry.js → p-d20eb5fe.entry.js} +1 -1
  327. package/dist/twilight/{p-6696f1fd.entry.js → p-d30dc29a.entry.js} +1 -1
  328. package/dist/twilight/{p-ec1dc1a4.entry.js → p-d5f7fc7c.entry.js} +1 -1
  329. package/dist/twilight/{p-0c21cbb0.entry.js → p-d5ffbaa7.entry.js} +1 -1
  330. package/dist/twilight/{p-44286c9c.entry.js → p-d63d41cc.entry.js} +1 -1
  331. package/dist/twilight/{p-b9492720.entry.js → p-d71e3ca9.entry.js} +1 -1
  332. package/dist/twilight/{p-c8dfa6d9.entry.js → p-d7c3072b.entry.js} +1 -1
  333. package/dist/twilight/{p-9f0fe98b.entry.js → p-d9685d52.entry.js} +1 -1
  334. package/dist/twilight/{p-b2847d8f.entry.js → p-dda98c7a.entry.js} +1 -1
  335. package/dist/twilight/{p-fa7577e6.entry.js → p-df605d75.entry.js} +1 -1
  336. package/dist/twilight/{p-292767bc.entry.js → p-e03e1c15.entry.js} +1 -1
  337. package/dist/twilight/{p-5b207505.entry.js → p-e260af73.entry.js} +1 -1
  338. package/dist/twilight/{p-fac12fc6.entry.js → p-e58f50ac.entry.js} +1 -1
  339. package/dist/twilight/{p-fd842648.entry.js → p-ec7b9c48.entry.js} +1 -1
  340. package/dist/twilight/{p-28dd3b59.entry.js → p-ef15918c.entry.js} +1 -1
  341. package/dist/twilight/p-f06c0fe7.entry.js +4 -0
  342. package/dist/twilight/{p-6926ae7c.entry.js → p-f2ba00a7.entry.js} +1 -1
  343. package/dist/twilight/{p-13f968e6.entry.js → p-fb94ea64.entry.js} +1 -1
  344. package/dist/twilight/{p-573c54b0.entry.js → p-fdc41755.entry.js} +1 -1
  345. package/dist/twilight/{p-9f7d6e66.entry.js → p-fdd6cba3.entry.js} +1 -1
  346. package/dist/twilight/{p-bf321bdd.entry.js → p-feebbd16.entry.js} +1 -1
  347. package/dist/twilight/{p-ad5b0b69.entry.js → p-ff5240b5.entry.js} +1 -1
  348. package/dist/twilight/twilight.esm.js +1 -1
  349. package/dist/types/components/salla-loyalty-program/salla-loyalty-exchange-product-card.d.ts +10 -0
  350. package/dist/types/components/salla-loyalty-program/salla-loyalty-panel.d.ts +1 -0
  351. package/dist/types/components/salla-loyalty-program/salla-loyalty-program.d.ts +1 -0
  352. package/dist/types/components/salla-loyalty-program/salla-reward-details.d.ts +9 -0
  353. package/dist/types/components/salla-product-options/interfaces.d.ts +1 -0
  354. package/dist/types/components/salla-product-options/salla-product-options.d.ts +1 -1
  355. package/dist/types/components.d.ts +33 -0
  356. package/package.json +5 -5
  357. package/dist/twilight/p-15630397.entry.js +0 -4
  358. package/dist/twilight/p-31218883.entry.js +0 -4
  359. package/dist/twilight/p-6e464d52.entry.js +0 -4
  360. package/dist/twilight/p-718d6984.entry.js +0 -4
  361. package/dist/twilight/p-7c18a647.entry.js +0 -4
  362. package/dist/twilight/p-886db7dd.entry.js +0 -4
  363. package/dist/twilight/p-9dab82e9.entry.js +0 -4
  364. package/dist/twilight/p-ac1a08b3.entry.js +0 -4
  365. package/dist/twilight/p-b27551b5.entry.js +0 -4
  366. package/dist/twilight/p-cb17f82a.entry.js +0 -4
  367. package/dist/twilight/p-f3b98523.entry.js +0 -4
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}.s-cookies-bar-btn--active{box-shadow:0 0 0 2px rgba(0, 0, 0, 0.08)}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaCountDownCss = ".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";
9
9
 
@@ -239,4 +239,207 @@ const SallaCountDown = class {
239
239
  };
240
240
  SallaCountDown.style = sallaCountDownCss;
241
241
 
242
+ const sallaOrderOptionsModalCss = ".s-order-options-modal-host .s-modal-header-inner,.s-order-options-modal-host .s-modal-header-content,.s-order-options-modal-host .s-modal-title{text-align:start !important}.s-order-options-modal-apple-pay{display:block;width:100%;--apple-pay-button-width:100%;--apple-pay-button-height:44px;--apple-pay-button-border-radius:0.75rem}.s-order-options-modal-apple-pay-wrap{display:flex;flex-direction:column;gap:0.75rem;width:100%}.s-order-options-modal-apple-pay-total{display:flex;align-items:center;justify-content:space-between;gap:0.5rem}.s-order-options-modal-apple-pay-label,.s-order-options-modal-apple-pay-amount{font-size:1.125rem;line-height:1.5rem;font-weight:700;color:#111827}";
243
+
244
+ const SallaOrderOptionsModal = class {
245
+ constructor(hostRef) {
246
+ index.registerInstance(this, hostRef);
247
+ this.resolveFn = null;
248
+ this.rejectFn = null;
249
+ this.optionsRefs = new Map();
250
+ this.changeHandler = null;
251
+ /** Sync hook for callers that need to act under the submit user gesture (Apple Pay). */
252
+ this.submitCallback = null;
253
+ this.orderOptions = [];
254
+ this.basePrice = 0;
255
+ this.liveTotal = 0;
256
+ this.isSubmitting = false;
257
+ /** Bumped each open() so the inner <salla-product-options> remounts. */
258
+ this.sessionId = 0;
259
+ this.paymentMode = 'default';
260
+ this.title = '';
261
+ this.subtitle = '';
262
+ this.submitLabel = '';
263
+ this.totalLabel = '';
264
+ this.requiredMessage = '';
265
+ this.handleClose = () => {
266
+ if (this.isSubmitting)
267
+ return;
268
+ this.rejectFn?.({ reason: 'dismissed' });
269
+ this.resolveFn = null;
270
+ this.rejectFn = null;
271
+ this.detachChangeListener();
272
+ this.reset();
273
+ };
274
+ salla.lang.onLoaded(() => this.loadTranslations());
275
+ }
276
+ componentWillLoad() {
277
+ this.loadTranslations();
278
+ }
279
+ loadTranslations() {
280
+ this.title = salla.lang.get('blocks.order_options.title');
281
+ this.subtitle = salla.lang.get('blocks.order_options.subtitle');
282
+ this.submitLabel = salla.lang.get('blocks.order_options.continue');
283
+ this.totalLabel = salla.lang.get('blocks.order_options.total');
284
+ this.requiredMessage = salla.lang.get('blocks.order_options.required_message');
285
+ }
286
+ /**
287
+ * Open the modal. Resolves with selections on submit; rejects on dismiss.
288
+ * `onSubmit` fires sync in the submit click (for Apple Pay user-gesture).
289
+ * `paymentMode: 'apple-pay'` swaps the footer button for <apple-pay-button>.
290
+ */
291
+ async open(payload) {
292
+ // Normalize here, not in the shared salla-product-options: text/number order options ship no
293
+ // `details`, which product-options dereferences unguarded.
294
+ this.orderOptions = (Array.isArray(payload.orderOptions) ? payload.orderOptions : [])
295
+ .map((o) => ({ ...o, details: o.details ?? [] }));
296
+ this.basePrice = Number(payload.basePrice) || 0;
297
+ this.liveTotal = this.basePrice + this.seedOptionsPrice(this.orderOptions);
298
+ this.isSubmitting = false;
299
+ this.sessionId++;
300
+ this.optionsRefs.clear();
301
+ this.submitCallback = payload.onSubmit ?? null;
302
+ this.paymentMode = payload.paymentMode ?? 'default';
303
+ await this.modal?.open();
304
+ this.attachChangeListener();
305
+ return new Promise((resolve, reject) => {
306
+ this.resolveFn = resolve;
307
+ this.rejectFn = reject;
308
+ });
309
+ }
310
+ async close() {
311
+ await this.modal?.close();
312
+ }
313
+ /** Sync walk of inputs — avoids `await` through the @Method that would consume the AP user gesture. */
314
+ collectOrderOptionsSync() {
315
+ const result = [];
316
+ for (const [, el] of this.optionsRefs) {
317
+ if (!el)
318
+ continue;
319
+ const inputs = el.querySelectorAll('[name^="options["],[name*="[options]["]');
320
+ inputs.forEach((input) => {
321
+ if (input instanceof HTMLInputElement && (input.type === 'radio' || input.type === 'checkbox') && !input.checked) {
322
+ return;
323
+ }
324
+ const match = input.name.match(/(?:^|\[)options\]?\[(\d+)\]/);
325
+ if (!match)
326
+ return;
327
+ const raw = input.value;
328
+ if (raw === '' || raw === null || raw === undefined)
329
+ return;
330
+ const numeric = Number(raw);
331
+ result.push({
332
+ id: Number(match[1]),
333
+ value: Number.isFinite(numeric) && raw === String(numeric) ? numeric : raw,
334
+ });
335
+ });
336
+ }
337
+ return result;
338
+ }
339
+ /** Sync native validity — keeps the AP user gesture intact. */
340
+ validateSync() {
341
+ let pass = true;
342
+ for (const [, el] of this.optionsRefs) {
343
+ if (!el)
344
+ continue;
345
+ const requiredInputs = el.querySelectorAll('[required]');
346
+ requiredInputs.forEach((input) => {
347
+ // Mirror salla-product-options.reportValidity(): skip hidden/disabled inputs so a
348
+ // required field in a `.hidden` conditional container can't silently block submit.
349
+ if (input.disabled || input.closest('.hidden'))
350
+ return;
351
+ if ('reportValidity' in input && !input.reportValidity())
352
+ pass = false;
353
+ });
354
+ }
355
+ return pass;
356
+ }
357
+ /** Sum the additional_price of any pre-selected details. */
358
+ seedOptionsPrice(orderOptions) {
359
+ let sum = 0;
360
+ orderOptions.forEach((opt) => {
361
+ (opt.details || []).forEach((d) => {
362
+ if (d.is_selected)
363
+ sum += Number(d.additional_price) || 0;
364
+ });
365
+ });
366
+ return sum;
367
+ }
368
+ /** salla.event.on is global — attach per open, detach on close to avoid stacking. */
369
+ attachChangeListener() {
370
+ this.detachChangeListener();
371
+ this.changeHandler = () => this.recomputeTotal();
372
+ salla.event.on('product-options::change', this.changeHandler);
373
+ }
374
+ detachChangeListener() {
375
+ if (!this.changeHandler)
376
+ return;
377
+ salla.event.off('product-options::change', this.changeHandler);
378
+ this.changeHandler = null;
379
+ }
380
+ async recomputeTotal() {
381
+ let selectedPrice = 0;
382
+ for (const [, el] of this.optionsRefs) {
383
+ if (!el)
384
+ continue;
385
+ const selected = typeof el.getSelectedOptions === 'function'
386
+ ? await el.getSelectedOptions()
387
+ : [];
388
+ (selected || []).forEach((s) => {
389
+ selectedPrice += Number(s.additional_price) || 0;
390
+ });
391
+ }
392
+ this.liveTotal = this.basePrice + selectedPrice;
393
+ }
394
+ handleSubmit() {
395
+ if (this.isSubmitting)
396
+ return;
397
+ if (!this.validateSync()) {
398
+ salla.notify?.error?.(this.requiredMessage);
399
+ return;
400
+ }
401
+ this.isSubmitting = true;
402
+ const orderOptions = this.collectOrderOptionsSync();
403
+ const total = Math.round(this.liveTotal * 100) / 100;
404
+ // Fire onSubmit BEFORE any await — Apple Pay needs the user gesture.
405
+ try {
406
+ this.submitCallback?.(orderOptions, total);
407
+ }
408
+ catch (err) {
409
+ salla?.logger?.warn?.('order-options modal onSubmit threw', err);
410
+ }
411
+ this.resolveFn?.({ orderOptions });
412
+ this.resolveFn = null;
413
+ this.rejectFn = null;
414
+ this.submitCallback = null;
415
+ this.detachChangeListener();
416
+ this.modal?.close().then(() => this.reset());
417
+ this.isSubmitting = false;
418
+ }
419
+ /** Clear options on close so the inner <salla-product-options> unmounts. */
420
+ reset() {
421
+ this.orderOptions = [];
422
+ this.optionsRefs.clear();
423
+ this.liveTotal = 0;
424
+ }
425
+ render() {
426
+ // salla.money returns HTML (sicon-sar icon) → render via innerHTML. Round
427
+ // first so floating-point sum doesn't show as 1174.3799999999999.
428
+ const totalHtml = salla.money(Math.round(this.liveTotal * 100) / 100);
429
+ return (index.h("salla-modal", { key: 'a7b7c31da2f5fd9f5f3ee601052f84e512368cee', ref: el => (this.modal = el), class: "s-order-options-modal-host", width: "md", "modal-title": this.title, onModalVisibilityChanged: (e) => {
430
+ if (!e.detail)
431
+ this.handleClose();
432
+ } }, index.h("div", { key: '9a44c4dcec6f0e49a65217b1e1e2cd19ccc80c76', class: "s-order-options-modal-body" }, index.h("p", { key: '66c41a32e2130db4dc1aa402a31cfd6d519544b3', class: "s-order-options-modal-subtitle" }, this.subtitle), index.h("div", { key: 'fffe868427973b6426b8a2f8f33f48c017dfb7fb', class: "s-order-options-modal-fields" }, this.orderOptions.length > 0 && (index.h("salla-product-options", { key: this.sessionId, ref: el => {
433
+ if (!el)
434
+ return;
435
+ this.optionsRefs.set('order-options', el);
436
+ // Without seeding, first multi-select toggle wipes pre-selected defaults.
437
+ el.seedSelectedOptions?.();
438
+ }, "product-id": `order-options-${this.orderOptions[0]?.id}`, "unique-key": "order-options", options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), index.h("div", { key: '36f3a18380f05a8420d4bc32fa643bf596ac16fb', slot: "footer", class: "s-order-options-modal-footer" }, this.paymentMode === 'apple-pay' ? (index.h("div", { class: "s-order-options-modal-apple-pay-wrap" }, index.h("div", { class: "s-order-options-modal-apple-pay-total" }, index.h("span", { class: "s-order-options-modal-apple-pay-label" }, this.totalLabel), index.h("span", { class: "s-order-options-modal-apple-pay-amount", innerHTML: totalHtml })), index.h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', buttonstyle: "black", type: "buy", class: "s-order-options-modal-apple-pay", onClick: () => this.handleSubmit() }))) : (index.h("salla-button", { type: "button", color: "primary", fill: "solid", width: "wide", loading: this.isSubmitting, onClick: () => this.handleSubmit() }, index.h("span", { class: "s-order-options-modal-cta-content" }, index.h("span", { class: "s-order-options-modal-cta-text" }, this.submitLabel), index.h("span", { class: "s-order-options-modal-cta-total", innerHTML: totalHtml })))))));
439
+ }
440
+ get host() { return index.getElement(this); }
441
+ };
442
+ SallaOrderOptionsModal.style = sallaOrderOptionsModalCss;
443
+
242
444
  exports.salla_count_down = SallaCountDown;
445
+ exports.salla_order_options_modal = SallaOrderOptionsModal;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var camera = require('./camera-DytepEoK.js');
8
8
  var interfaces = require('./interfaces-CRqrf5RX.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const DEBUG_KEY = 'salla-delivery-promise-debug';
9
9
  function log(message, data) {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaEditOrderButtonCss = ":host{display:block}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var Helper = require('./Helper-B2B-kxAI.js');
8
8
  var interfaces = require('./interfaces-DZDQwN6-.js');
9
9
  require('./anime.es-BqW8JHZi.js');
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var interfaces = require('./interfaces-DZDQwN6-.js');
8
8
  var Helper = require('./Helper-B2B-kxAI.js');
9
9
  require('./anime.es-BqW8JHZi.js');
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const SallaFulfillmentMethods = class {
9
9
  constructor(hostRef) {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var anime_es = require('./anime.es-BqW8JHZi.js');
8
8
  var arrowLeft = require('./arrow-left-xSEmRpp6.js');
9
9
  var cancel = require('./cancel-B5SbMYEk.js');
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const SallaHook = class {
9
9
  constructor(hostRef) {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var Helper = require('./Helper-B2B-kxAI.js');
8
8
  require('./anime.es-BqW8JHZi.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:flex;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:flex;flex-direction:row-reverse;width:100%;justify-content:space-between;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}.s-installment-klarna-wrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;padding:10px}.salla-y .s-installment-klarna-wrapper{border:1px solid var(--color-grey-dark);border-radius:12px}.s-installment-klarna-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaListTileCss = "";
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const SallaLocalizationModal = class {
9
9
  constructor(hostRef) {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
 
8
8
  const sallaLoginModalCss = "iframe{-moz-transition:height 0.3s;-ms-transition:height 0.3s;-o-transition:height 0.3s;-webkit-transition:height 0.3s;transition:height 0.3s;width:100%}";
9
9
 
@@ -3,11 +3,11 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
7
  var gift = require('./gift-DbNivqYO.js');
8
- var trackedPromise = require('./tracked-promise-g2hwsJdv.js');
8
+ var trackedPromise = require('./tracked-promise-DYGNjn0V.js');
9
9
 
10
- const sallaLoyaltyProgramCss = "";
10
+ const sallaLoyaltyProgramCss = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
11
11
 
12
12
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13
13
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3,15 +3,34 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-BLRU4abB.js');
7
- var functions = require('./functions-NX0FxE-j.js');
6
+ var index = require('./index-BQKhP5JS.js');
7
+ var functions = require('./functions-C3W0O3Qh.js');
8
8
  var gift = require('./gift-DbNivqYO.js');
9
9
  var tag = require('./tag-D-PcUR33.js');
10
10
  var check = require('./check-BnVBPQNp.js');
11
11
  var cancel = require('./cancel-B5SbMYEk.js');
12
- var trackedPromise = require('./tracked-promise-g2hwsJdv.js');
12
+ var trackedPromise = require('./tracked-promise-DYGNjn0V.js');
13
13
 
14
- const sallaLoyaltyProgramCss$3 = "";
14
+ const sallaLoyaltyProgramCss$4 = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
15
+
16
+ const SallaLoyaltyExchangeProductCard = class {
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.loyaltyProductExchange = index.createEvent(this, "loyaltyProductExchange");
20
+ }
21
+ componentWillLoad() {
22
+ this.hasCustomCard = !!customElements.get('custom-salla-product-card');
23
+ }
24
+ render() {
25
+ const product = typeof this.product === 'string' ? JSON.parse(this.product) : this.product;
26
+ return (index.h("div", { key: 'a60d337ebcf226318d449a4319906a71a9ab1e92', class: "s-loyalty-exchange-card" }, this.hasCustomCard
27
+ ? index.h("custom-salla-product-card", { product: product, hideAddBtn: true })
28
+ : index.h("salla-product-card", { "hide-add-btn": true, product: product }), index.h("div", { key: '77a0cff2bf5fce5c017493a0769e266eeeaaa01c', class: "s-loyalty-exchange-card-btn" }, index.h("salla-button", { key: '941c82bb35bfd116a13292ddf5425645c3d61ad7', fill: "outline", width: "wide", onClick: () => this.loyaltyProductExchange.emit({ productId: product.id }) }, salla.lang.get('pages.loyalty_program.redeem_reward')))));
29
+ }
30
+ };
31
+ SallaLoyaltyExchangeProductCard.style = sallaLoyaltyProgramCss$4;
32
+
33
+ const sallaLoyaltyProgramCss$3 = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
15
34
 
16
35
  const SallaRewardAction = class {
17
36
  constructor(hostRef) {
@@ -38,10 +57,7 @@ const SallaRewardAction = class {
38
57
  if (!this.isClickable(this.prize)) {
39
58
  return null;
40
59
  }
41
- return (index.h("div", { class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (index.h("a", { href: this.prize.prize_url || salla.url.get(''), class: {
42
- 's-loyalty-program-rewards-action-base': true,
43
- 's-loyalty-program-rewards-action-on': true,
44
- } }, salla.lang.get('pages.loyalty_program.shop_now'))) : (index.h("button", { onClick: this.handleClick, class: {
60
+ return (index.h("div", { class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (index.h("salla-button", { fill: "outline", color: "light", class: "s-loyalty-program-rewards-action-base", onClick: () => functions.closeModals() }, salla.lang.get('common.elements.cancel'))) : (index.h("button", { onClick: this.handleClick, class: {
45
61
  's-loyalty-program-rewards-action-base': true,
46
62
  's-loyalty-program-rewards-action-on': true,
47
63
  } }, salla.lang.get('pages.loyalty_program.redeem_reward')))));
@@ -49,7 +65,7 @@ const SallaRewardAction = class {
49
65
  };
50
66
  SallaRewardAction.style = sallaLoyaltyProgramCss$3;
51
67
 
52
- const sallaLoyaltyProgramCss$2 = "";
68
+ const sallaLoyaltyProgramCss$2 = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
53
69
 
54
70
  const SallaRewardCard = class {
55
71
  constructor(hostRef) {
@@ -58,12 +74,12 @@ const SallaRewardCard = class {
58
74
  this.actionClick = index.createEvent(this, "actionClick");
59
75
  }
60
76
  render() {
61
- return (index.h(index.Host, { key: 'b27c707b6ac03d037d2f019131a654bcda65dd6e', class: "s-loyalty-program-reward-host" }, index.h("div", { key: '9606c3ad2ea7ead1f4ab2db8e148a90d43c69902', class: "s-loyalty-program-reward-container" }, index.h("div", { key: 'f7b6f60847b86dbb6f2b05209ab2db8eabbbd931', onClick: (e) => this.areaClick.emit(e), role: "button" }, index.h("div", { key: '6cd912d2c6b5c2b12ab5b4ba431ca0c965d0518b', class: "s-loyalty-program-reward-img" }, index.h("img", { key: 'b4f844fe1064b8ca6f5666765d92a7924fe2ad74', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), index.h("div", { key: 'fd61d1ff64f2097fe2f696dacbb57f6c84db5339', class: "s-loyalty-program-reward-content" }, index.h("div", { key: 'fa1d404d5b02fe0027cef018f2eeb6e0bd109c2c', class: "s-loyalty-program-reward-points" }, index.h("salla-badge", { key: '29dad65f9b1f41a1698da49d113a0f9b0086210e', size: "xs" }, index.h("span", { key: '99526fabe82feef8ef777bfbcde868399c44e2db', innerHTML: gift.SIGift }), index.h("span", { key: '94a3ed106aad1b14438227d8914695b1a18e8f64', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), index.h("div", { key: '1e8e12541bfd7acd303f89008f2e48c9f183c83a', class: "s-loyalty-program-reward-title" }, index.h("span", { key: '746377627b01443a712a52f1016c29b41eaa1ad5' }, this.prize.group_title)), index.h("div", { key: '1f09736c18b0be21b67e1713a44f94722bbdb09d', class: "s-loyalty-program-reward-name" }, index.h("div", { key: '18c26f3fe19b4e6ff28bda4d18cdb253f795792b', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), index.h("div", { key: '7a814db57ae3bfad6aaba12cdab17b0e900e9080', class: "p-4" }, index.h("slot", { key: '0ce627f221262d54f4cda4d1a50cb2d1a6197d06', name: "action" }, index.h("button", { key: '10f0e39d0ecc79d84674efb0a7389430da979160', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
77
+ return (index.h(index.Host, { key: '9b1eecb431ab26fc6bfbd89d511294a230dd2aa9', class: "s-loyalty-program-reward-host" }, index.h("div", { key: '0793104978291566c136eb0e5b841224f97f25b6', class: "s-loyalty-program-reward-container" }, index.h("div", { key: 'f4572e5480d51f041af3e3b95bdfcc3a952c395e', onClick: (e) => this.areaClick.emit(e), role: "button" }, index.h("div", { key: 'ba3e6d1583219bfba80903d8b45a02c6f862efd2', class: "s-loyalty-program-reward-img" }, index.h("img", { key: '36e26b8fcf8d2f094b0ab990ad96c3722e23d4fd', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), index.h("div", { key: 'b7f042b124044e8ca7eee15341d08ef175013b18', class: "s-loyalty-program-reward-content" }, index.h("div", { key: 'd3274d9bf3f53dfdc87e4f11cddd2abae5288333', class: "s-loyalty-program-reward-points" }, index.h("salla-badge", { key: '4db76994541536d16e11a7e34bce9e06ce9aff4b', size: "xs" }, index.h("span", { key: 'a565b786c683bc5b076036c81494137ccaef0c18', innerHTML: gift.SIGift }), index.h("span", { key: '481a4016c7ccea49a860df2a7b3a322302a2e5ad', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), index.h("div", { key: '5820431c80d0eee99da2592ef29685710b73a048', class: "s-loyalty-program-reward-title" }, index.h("span", { key: '82b99ec1244890b19930686c228ca56ecee7191b' }, this.prize.group_title)), index.h("div", { key: '08bc6a5f88365c23e07a20b858b4cda5430eb363', class: "s-loyalty-program-reward-name" }, index.h("div", { key: 'dd4ce5ed0097a746b91c74cdab38ca557c55194d', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), index.h("div", { key: 'ae7cd30ae6794f0957db6cfca3a69403b5996183', class: "p-4" }, index.h("slot", { key: '41a4cce4cb28d91d038754f69ea42b25fda6427a', name: "action" }, index.h("button", { key: '353da11c1197ed3dafd85282cd3343c21f55c80b', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
62
78
  }
63
79
  };
64
80
  SallaRewardCard.style = sallaLoyaltyProgramCss$2;
65
81
 
66
- const sallaLoyaltyProgramCss$1 = "";
82
+ const sallaLoyaltyProgramCss$1 = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
67
83
 
68
84
  var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
69
85
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -80,10 +96,16 @@ const SallaRewardDetails = class {
80
96
  constructor(hostRef) {
81
97
  index.registerInstance(this, hostRef);
82
98
  this.actionClick = index.createEvent(this, "actionClick");
99
+ this.productActionClick = index.createEvent(this, "productActionClick");
83
100
  this.refreshKey = Date.now();
101
+ this.includedProductsData = [];
102
+ }
103
+ handleProductExchange(e) {
104
+ this.productActionClick.emit({ productId: e.detail.productId });
84
105
  }
85
106
  handlePrizeChange() {
86
107
  this.refreshKey = Date.now();
108
+ this.fetchIncludedProducts();
87
109
  }
88
110
  componentWillLoad() {
89
111
  if (this.category.status === 'idle') {
@@ -92,6 +114,23 @@ const SallaRewardDetails = class {
92
114
  if (this.brand.status === 'idle') {
93
115
  this.brand();
94
116
  }
117
+ this.fetchIncludedProducts();
118
+ }
119
+ async fetchIncludedProducts() {
120
+ this.includedProductsData = [];
121
+ const ids = this.prize?.included_product_ids;
122
+ if (!ids?.length)
123
+ return;
124
+ const requestedPrize = this.prize;
125
+ try {
126
+ const response = await salla.api.withoutNotifier(() => salla.product.api.fetch({ source: 'selected', source_value: ids }));
127
+ if (this.prize === requestedPrize) {
128
+ this.includedProductsData = response.data || [];
129
+ }
130
+ }
131
+ catch {
132
+ this.includedProductsData = [];
133
+ }
95
134
  }
96
135
  getTermsAndConditions() {
97
136
  const minimumAmount = Number((this.prize.order_minimum_amount || '0').split('.')[0]) || 0;
@@ -170,23 +209,29 @@ const SallaRewardDetails = class {
170
209
  getProductsJsx(items, title) {
171
210
  return !items?.length ? '' : index.h("div", { class: "s-loyalty-program-reward-details-items-products s-loyalty-program-slider-arrows-edges" }, index.h("h2", null, title), index.h("salla-products-slider", { source: "selected", sourceValue: JSON.stringify(items), "slider-config": '{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":0,"breakpoints":{"768":{"slidesPerView":3,"freeMode":false,"speed":300}}}' }));
172
211
  }
212
+ getIncludedProductsJsx(title) {
213
+ const products = this.includedProductsData;
214
+ if (!products?.length)
215
+ return '';
216
+ return (index.h("div", { class: c('reward-details-items-products') }, index.h("h2", null, title), index.h("div", { class: c('reward-details-products-grid') }, products.map(product => index.h("salla-loyalty-exchange-product-card", { product: product })))));
217
+ }
173
218
  render() {
174
219
  const termsAndConditions = this.getTermsAndConditions();
175
- return (index.h("div", { key: 'b448be9380e1b0226e0e1bf4f2383190769de152', class: "s-loyalty-program-reward-modal" }, index.h("div", { key: '16087a27ea5cef2738f07745ac2b830ea07ab4ce', class: "s-loyalty-program-points-modal-header" }, index.h("h1", { key: 'f03dde8a72339ce561298cf27b524f9a69a1fd3c', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
220
+ return (index.h("div", { key: 'e75387a83bdf558f087bfda4f8c7db15bf97ac5d', class: "s-loyalty-program-reward-modal" }, index.h("div", { key: '89caf02d9b28996177b5bc23a711986ad9da9208', class: "s-loyalty-program-points-modal-header" }, index.h("h1", { key: '455d0a2e6f5c08dbbdf063c1f243e7e041deb788', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
176
221
  : index.h("button", { class: "s-loyalty-program-back-btn", onClick: () => functions.closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, index.h("span", { class: {
177
222
  'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
178
223
  'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
179
- } })), this.prize.name)), index.h("div", { key: '94e4c042eda800d4127e98af05399aefd8cf162c', class: "s-loyalty-program-modal-scrollable-content" }, index.h("div", { key: '5e847cbfd2aefe88baaddd991ac9a3c9d5be4318', class: "s-loyalty-program-reward-details-header" }, index.h("div", { key: '67fa2b255a10ada08cd780f204d8bc958b2562df', class: "s-loyalty-program-aspect-container" }, index.h("img", { key: '06298fbe666f161ace6f8bd70ead43ff4647f912', src: this.prize.image, alt: this.prize.name })), index.h("salla-badge", { key: '2d5fb82811dfced1eb558baa01ddb83bf8271312', size: "sm", bg: "light" }, index.h("span", { key: 'bb9d7cf72ea6bc88eaed97e62465c85b3628de0d', innerHTML: gift.SIGift }), index.h("span", { key: '87bd5622040b555ab70de43ffb7a6fa06cb4b45a', class: "s-loyalty-program-points-badge-points" }, functions.formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : index.h("div", { class: "s-loyalty-program-terms-and-conditions" }, index.h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), index.h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (index.h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, index.h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), index.h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), index.h("div", { key: '8b9ae2745e2134b41c8bc1c9bce8bc449774fd48', class: "s-loyalty-program-reward-info-message" }, index.h("h1", { key: 'd5e6f1f591a09144d9d15bf32457ca22f8438b82', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), index.h("p", { key: '00c63a4b0dafecd45141b2627f3cf00df9b77e83', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : index.h("div", { class: "s-loyalty-program-reward-details" }, index.h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
224
+ } })), this.prize.name)), index.h("div", { key: '1e65d03e52071802ec396cc4838bdaf135303494', class: "s-loyalty-program-modal-scrollable-content" }, index.h("div", { key: 'f6869249b21464296725644acd9a593fb6c5ea30', class: "s-loyalty-program-reward-details-header" }, index.h("div", { key: 'c93dfe4c362421f7f7d5938a86d043e6ee0f2369', class: "s-loyalty-program-aspect-container" }, index.h("img", { key: '0c86bde982fd627939e47b9cf1eed02285a041f1', src: this.prize.image, alt: this.prize.name })), index.h("salla-badge", { key: '2be3695ee888ef65e0fec106e4b7845abc25491b', size: "sm", bg: "light" }, index.h("span", { key: '193ce34305780ecc2fd78d4e2d8572da06a0ebda', innerHTML: gift.SIGift }), index.h("span", { key: 'aee708c7b484afa29392fe25768ae48051c8b211', class: "s-loyalty-program-points-badge-points" }, functions.formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : index.h("div", { class: "s-loyalty-program-terms-and-conditions" }, index.h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), index.h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (index.h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, index.h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), index.h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), index.h("div", { key: 'add5d8a427511f9554f5d13a88bc5a4994021477', class: "s-loyalty-program-reward-info-message" }, index.h("h1", { key: '723dd37428176057e6d9e315e2a29528df9b8b1f', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), index.h("p", { key: 'ef1d7ea6af657ff4810c257d378aac35c106de66', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : index.h("div", { class: "s-loyalty-program-reward-details" }, index.h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
180
225
  index.h("salla-tab-header", { slot: "header", name: "included", style: {
181
226
  display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
182
227
  } }, index.h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: check.SICheck }), index.h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
183
- index.h("salla-tab-content", { slot: "content", name: "included" }, index.h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.categories, this.prize.included_category_ids), salla.lang.get('pages.loyalty_program.included_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.brands, this.prize.included_brand_ids), salla.lang.get('pages.loyalty_program.included_brands')), this.getProductsJsx(this.getProductIds(this.prize.included_product_ids), salla.lang.get('pages.loyalty_program.included_products')))),
228
+ index.h("salla-tab-content", { slot: "content", name: "included" }, index.h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.categories, this.prize.included_category_ids), salla.lang.get('pages.loyalty_program.included_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.brands, this.prize.included_brand_ids), salla.lang.get('pages.loyalty_program.included_brands')), this.getIncludedProductsJsx(salla.lang.get('pages.loyalty_program.included_products')))),
184
229
  ], this.getItemsMarkers('excluded') === '000' ? '' : [
185
230
  index.h("salla-tab-header", { slot: "header", name: "excluded", style: {
186
231
  display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
187
232
  } }, index.h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: cancel.SICancel }), index.h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
188
233
  index.h("salla-tab-content", { slot: "content", name: "excluded" }, index.h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
189
- ]))), index.h("salla-reward-action", { key: 'd4ccecb2463fd6c06957f40e7865b1d12158b4bd', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
234
+ ]))), index.h("salla-reward-action", { key: 'd1a0304c5229958d4a135affae27bb62c7419cd8', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
190
235
  }
191
236
  static get watchers() { return {
192
237
  "prize": ["handlePrizeChange"]
@@ -204,7 +249,7 @@ __decorate$1([
204
249
  ], SallaRewardDetails.prototype, "brand", void 0);
205
250
  SallaRewardDetails.style = sallaLoyaltyProgramCss$1;
206
251
 
207
- const sallaLoyaltyProgramCss = "";
252
+ const sallaLoyaltyProgramCss = "@media (max-width: 639px){.s-loyalty-program-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;max-height:100dvh;overflow-y:auto !important}}.s-loyalty-exchange-card salla-product-card .s-product-card-image,.s-loyalty-exchange-card custom-salla-product-card .s-product-card-image{flex:none;aspect-ratio:1;overflow:hidden}.s-loyalty-exchange-card-btn{padding:0 1.25rem 1.25rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid{display:flex;flex-wrap:wrap;gap:1rem;margin-top:0.75rem}.s-loyalty-program-reward-details-products-grid>*{flex:1 1 100%;min-width:0;touch-action:pan-y}@media (min-width: 640px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 1rem) / 2)}}@media (min-width: 768px){.s-loyalty-program-reward-details-products-grid>*{flex-basis:calc((100% - 2rem) / 3)}}.s-loyalty-program-reward-details-products-grid>*:only-child{max-width:320px;margin-inline:auto}.s-loyalty-program-reward-details-products-grid:has(>*:nth-child(3))>*{flex-grow:0}";
208
253
 
209
254
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
210
255
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -245,11 +290,7 @@ const SallaRewardExchange = class {
245
290
  this.reset(0);
246
291
  }
247
292
  render() {
248
- return (index.h(index.Host, { key: 'b1e4fe9368655f389e403b2676191b46f71d49b7' }, index.h("div", { key: '19b8bbffa591f22608d56e8e932d7f013f6cd868', class: "s-loyalty-program-exchange-heading" }, index.h("div", { key: '290214db26895ba481de364299afd115b3a501cc', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, index.h("span", { key: 'd59c1b1f7683db554856950b6ec919bb48c402dd', innerHTML: gift.SIGift })), index.h("h2", { key: '51a4abff2e593279cc5c9ce9dd47f7ed05533325' }, salla.lang.get('pages.loyalty_program.redeem_reward')), index.h("p", { key: '8a16577bce81552878cdcae4e60ce8e8719b3ed0' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", index.h("span", { key: 'c05bdc04cbac8dc530c49bb49eca6119d2653b63' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", index.h("span", { key: 'ce3e88fde9f2434cabf75f7a3f622da539b5d310' }, "(", this.prize.name, ")"))), index.h("div", { key: 'ac51de5c34119eb79c1a8c2d06c201e4da3d7a0d', class: "s-loyalty-program-exchange-btns" }, index.h("button", { key: '9386b4a3d43a05fe9141561c7421b2b23ddb5a1e', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-confirm", onClick: () => this.handleConfirm() }, index.h("span", { key: '88d7658b7715932ff8200f79de5dd8864b00db15', style: {
249
- opacity: this.exchange.status !== 'pending' ? '1' : '0',
250
- } }, salla.lang.get('common.elements.confirm')), index.h("span", { key: '80c30140959693b3d98dc2162e45d4089e81eb6b', class: "s-loyalty-program-exchange-loading", style: {
251
- opacity: this.exchange.status === 'pending' ? '1' : '0',
252
- } }, index.h("salla-loading", { key: '516e36b4271d8da0ad711732aa991a45633edea5', color: "primary", size: 24 }))), index.h("button", { key: '4642c008c656a662bd277829ef80db37cffa0b1a', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
293
+ return (index.h(index.Host, { key: '12288db4227af2c833b80a0a4b4df9192c56a9f4' }, index.h("div", { key: '0bb5b3037fb091e9f4b96e709ad6df3f97b7d7af', class: "s-loyalty-program-exchange-heading" }, index.h("div", { key: '5161c1961bd08e626e33780cf01efe5000d8e939', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, index.h("span", { key: '83429d754f37b2112ba2201b54a51349a98947df', innerHTML: gift.SIGift })), index.h("h2", { key: '0437972cf3b853271042de844cb70bc49dd04abf' }, salla.lang.get('pages.loyalty_program.redeem_reward')), index.h("p", { key: '14c0dbd4b29d73082ee71703c0a794447f9ee40e' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", index.h("span", { key: '9128f2c88f20536ca5ddae84b2160024bb8b2fe9' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", index.h("span", { key: 'e323f1dbb02caf7e385ac68d3cb74b84a5e062da' }, "(", this.prize.name, ")"))), index.h("div", { key: 'e5895bd3e62bacf86077fe85932e85f4a313e9f6', class: "s-loyalty-program-exchange-btns" }, index.h("salla-button", { key: 'df88cc68a2a265fc5a0e9a84be7159d028cc22a9', width: "wide", loading: this.exchange.status === 'pending', onClick: () => this.handleConfirm() }, salla.lang.get('common.elements.confirm')), index.h("salla-button", { key: 'a99305e2bcde52b63da0b1102f3bd626d256ebbf', width: "wide", fill: "outline", color: "danger", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
253
294
  }
254
295
  };
255
296
  __decorate([
@@ -257,6 +298,7 @@ __decorate([
257
298
  ], SallaRewardExchange.prototype, "exchange", void 0);
258
299
  SallaRewardExchange.style = sallaLoyaltyProgramCss;
259
300
 
301
+ exports.salla_loyalty_exchange_product_card = SallaLoyaltyExchangeProductCard;
260
302
  exports.salla_reward_action = SallaRewardAction;
261
303
  exports.salla_reward_card = SallaRewardCard;
262
304
  exports.salla_reward_details = SallaRewardDetails;