@salla.sa/twilight-components 2.14.602 → 2.14.603

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 (326) hide show
  1. package/dist/cjs/{filepond-BK4nhdz7.js → filepond-BdnuOx4F.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-4fVYpLZW.js → filepond-plugin-file-poster-BWYzr6My.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-DD9PE5ii.js → filepond-plugin-file-validate-size-DhAUcECh.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-Cu_qPxNI.js → filepond-plugin-file-validate-type-DoNn9iGj.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DyMzowg7.js → filepond-plugin-image-edit-CNnXvpn8.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CWPAUAU8.js → filepond-plugin-image-exif-orientation-C8nakD3j.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-B4owEvvd.js → filepond-plugin-image-preview-B3F5bMA_.js} +1 -1
  8. package/dist/cjs/{index-B6jjt620.js → index-BxbaPm5U.js} +2 -2
  9. package/dist/cjs/{intlTelInput-DDKMbp8H.js → intlTelInput-DNLLW1NL.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -2
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  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.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-products-slider.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-review-order-item.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tiered-offer.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/salla-wishlist-summary.cjs.entry.js +1 -1
  106. package/dist/cjs/twilight.cjs.js +1 -1
  107. package/dist/cjs/{vanilla-picker-B1VZNdgU.js → vanilla-picker-CH_Iyxix.js} +1 -1
  108. package/dist/collection/components/salla-product-options/salla-product-options.js +2 -1
  109. package/dist/components/index.js +2 -2
  110. package/dist/components/salla-product-options2.js +2 -1
  111. package/dist/docs.json +1 -1
  112. package/dist/esm/{filepond-plugin-file-poster-jGgGDPBM.js → filepond-plugin-file-poster--16HTX86.js} +1 -1
  113. package/dist/esm/{filepond-plugin-file-validate-size-CMRY86Hb.js → filepond-plugin-file-validate-size-B5mzqY24.js} +1 -1
  114. package/dist/esm/{filepond-plugin-file-validate-type-BJT5d0-6.js → filepond-plugin-file-validate-type-I07woW17.js} +1 -1
  115. package/dist/esm/{filepond-plugin-image-edit-CUgUFKuf.js → filepond-plugin-image-edit-DXu1jmsW.js} +1 -1
  116. package/dist/esm/{filepond-plugin-image-exif-orientation-Cpgh0C9U.js → filepond-plugin-image-exif-orientation-Bc1VQAhJ.js} +1 -1
  117. package/dist/esm/{filepond-plugin-image-preview-Cdldbg2V.js → filepond-plugin-image-preview-BzP3T1zn.js} +1 -1
  118. package/dist/esm/{filepond-JvmG37vk.js → filepond-xXe4bB-l.js} +1 -1
  119. package/dist/esm/{index-DSmjBlMI.js → index-Z_0e-eaG.js} +2 -2
  120. package/dist/esm/{intlTelInput-rTSCUyZk.js → intlTelInput-BWfs2527.js} +1 -1
  121. package/dist/esm/loader.js +2 -2
  122. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  123. package/dist/esm/salla-accordion_6.entry.js +1 -1
  124. package/dist/esm/salla-add-product-button_5.entry.js +3 -2
  125. package/dist/esm/salla-advertisement.entry.js +1 -1
  126. package/dist/esm/salla-alert_2.entry.js +1 -1
  127. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  128. package/dist/esm/salla-applied-filters.entry.js +1 -1
  129. package/dist/esm/salla-apps-icons.entry.js +1 -1
  130. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  131. package/dist/esm/salla-badge.entry.js +1 -1
  132. package/dist/esm/salla-basket-gap.entry.js +1 -1
  133. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  134. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  135. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  136. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  137. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  138. package/dist/esm/salla-comment-factors.entry.js +1 -1
  139. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  140. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  141. package/dist/esm/salla-contacts.entry.js +1 -1
  142. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  143. package/dist/esm/salla-count-down.entry.js +1 -1
  144. package/dist/esm/salla-custom-fields.entry.js +1 -1
  145. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  146. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  147. package/dist/esm/salla-filters-widget.entry.js +1 -1
  148. package/dist/esm/salla-filters.entry.js +1 -1
  149. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  150. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  151. package/dist/esm/salla-gifting.entry.js +1 -1
  152. package/dist/esm/salla-hook.entry.js +1 -1
  153. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  154. package/dist/esm/salla-installment.entry.js +1 -1
  155. package/dist/esm/salla-list-tile.entry.js +1 -1
  156. package/dist/esm/salla-localization-modal.entry.js +1 -1
  157. package/dist/esm/salla-login-modal.entry.js +1 -1
  158. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  159. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  161. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  162. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  163. package/dist/esm/salla-loyalty.entry.js +1 -1
  164. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  165. package/dist/esm/salla-map_3.entry.js +1 -1
  166. package/dist/esm/salla-menu.entry.js +1 -1
  167. package/dist/esm/salla-metadata.entry.js +1 -1
  168. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  169. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  170. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  171. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  172. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  173. package/dist/esm/salla-offer-modal.entry.js +1 -1
  174. package/dist/esm/salla-offer.entry.js +1 -1
  175. package/dist/esm/salla-order-branch.entry.js +1 -1
  176. package/dist/esm/salla-order-cancel.entry.js +1 -1
  177. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  178. package/dist/esm/salla-order-details-options.entry.js +1 -1
  179. package/dist/esm/salla-order-details.entry.js +1 -1
  180. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  181. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  182. package/dist/esm/salla-order-edit.entry.js +1 -1
  183. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  184. package/dist/esm/salla-order-shipments.entry.js +1 -1
  185. package/dist/esm/salla-order-summary.entry.js +1 -1
  186. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  187. package/dist/esm/salla-orders.entry.js +1 -1
  188. package/dist/esm/salla-payments.entry.js +1 -1
  189. package/dist/esm/salla-placeholder.entry.js +1 -1
  190. package/dist/esm/salla-price-range.entry.js +1 -1
  191. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  192. package/dist/esm/salla-product-card.entry.js +1 -1
  193. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  194. package/dist/esm/salla-products-list.entry.js +1 -1
  195. package/dist/esm/salla-products-slider.entry.js +1 -1
  196. package/dist/esm/salla-quick-order.entry.js +1 -1
  197. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  198. package/dist/esm/salla-rating-modal.entry.js +1 -1
  199. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  200. package/dist/esm/salla-review-order-item.entry.js +1 -1
  201. package/dist/esm/salla-scopes.entry.js +1 -1
  202. package/dist/esm/salla-search-product-card.entry.js +1 -1
  203. package/dist/esm/salla-search.entry.js +1 -1
  204. package/dist/esm/salla-skeleton.entry.js +1 -1
  205. package/dist/esm/salla-social-share.entry.js +1 -1
  206. package/dist/esm/salla-social.entry.js +1 -1
  207. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  208. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  209. package/dist/esm/salla-trust-badges.entry.js +1 -1
  210. package/dist/esm/salla-user-menu.entry.js +1 -1
  211. package/dist/esm/salla-user-profile.entry.js +1 -1
  212. package/dist/esm/salla-user-settings.entry.js +1 -1
  213. package/dist/esm/salla-verify.entry.js +1 -1
  214. package/dist/esm/salla-wallet.entry.js +1 -1
  215. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  216. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  217. package/dist/esm/twilight.js +2 -2
  218. package/dist/esm/{vanilla-picker-iVAMFnQg.js → vanilla-picker-J18A-voz.js} +1 -1
  219. package/dist/twilight/{p-35c24f9b.entry.js → p-0b1e0a8d.entry.js} +1 -1
  220. package/dist/twilight/{p-5d6f3385.entry.js → p-0d4e0fb5.entry.js} +1 -1
  221. package/dist/twilight/{p-9bc7224c.entry.js → p-0fdf8008.entry.js} +1 -1
  222. package/dist/twilight/{p-b0fee4fb.entry.js → p-105f55a2.entry.js} +1 -1
  223. package/dist/twilight/{p-74adaa0a.entry.js → p-12e07c6c.entry.js} +1 -1
  224. package/dist/twilight/{p-abb407ae.entry.js → p-15319e31.entry.js} +1 -1
  225. package/dist/twilight/{p-eee8f72b.entry.js → p-1545c99f.entry.js} +1 -1
  226. package/dist/twilight/{p-f5b6fa9b.entry.js → p-19e9233d.entry.js} +1 -1
  227. package/dist/twilight/{p-ed565db7.entry.js → p-1acc6f56.entry.js} +1 -1
  228. package/dist/twilight/{p-755531d0.entry.js → p-1c5d0944.entry.js} +1 -1
  229. package/dist/twilight/{p-ee8320af.entry.js → p-225695d4.entry.js} +1 -1
  230. package/dist/twilight/{p-2f54b8ca.entry.js → p-238fb194.entry.js} +1 -1
  231. package/dist/twilight/{p-8ef1dc8b.entry.js → p-2aaa79f0.entry.js} +1 -1
  232. package/dist/twilight/{p-5350007d.entry.js → p-2b10a3ab.entry.js} +1 -1
  233. package/dist/twilight/{p-f0deaa3e.entry.js → p-2cf6fb59.entry.js} +1 -1
  234. package/dist/twilight/{p-f77eb8de.entry.js → p-2eb4c7be.entry.js} +1 -1
  235. package/dist/twilight/{p-b0c853b7.entry.js → p-377ba8f8.entry.js} +1 -1
  236. package/dist/twilight/{p-ae44240d.entry.js → p-3c5142ca.entry.js} +1 -1
  237. package/dist/twilight/{p-553c0419.entry.js → p-3d2a0139.entry.js} +1 -1
  238. package/dist/twilight/{p-41f562d9.entry.js → p-3d515755.entry.js} +1 -1
  239. package/dist/twilight/{p-92465380.entry.js → p-43d646ab.entry.js} +1 -1
  240. package/dist/twilight/{p-c4e8176e.entry.js → p-4c10d596.entry.js} +1 -1
  241. package/dist/twilight/{p-7907b963.entry.js → p-4c93fe19.entry.js} +1 -1
  242. package/dist/twilight/{p-2b7369bc.entry.js → p-4d734cab.entry.js} +1 -1
  243. package/dist/twilight/{p-31e7a0e2.entry.js → p-4eefd6ce.entry.js} +1 -1
  244. package/dist/twilight/{p-6a575b79.entry.js → p-51e83443.entry.js} +1 -1
  245. package/dist/twilight/{p-16e37ff7.entry.js → p-5304544d.entry.js} +1 -1
  246. package/dist/twilight/{p-62385bca.entry.js → p-53da81e4.entry.js} +1 -1
  247. package/dist/twilight/{p-13cdee67.entry.js → p-54e43cb7.entry.js} +1 -1
  248. package/dist/twilight/{p-bcdcd436.entry.js → p-5765a016.entry.js} +1 -1
  249. package/dist/twilight/{p-deea89b5.entry.js → p-5ba22cda.entry.js} +1 -1
  250. package/dist/twilight/{p-8980ba07.entry.js → p-5db3ccda.entry.js} +1 -1
  251. package/dist/twilight/{p-b76f6fc0.entry.js → p-60c4fcd8.entry.js} +1 -1
  252. package/dist/twilight/{p-13f398a0.entry.js → p-66a54ce6.entry.js} +1 -1
  253. package/dist/twilight/{p-f8dab034.entry.js → p-670a6d5d.entry.js} +1 -1
  254. package/dist/twilight/{p-5b34d547.entry.js → p-67c14cd2.entry.js} +1 -1
  255. package/dist/twilight/{p-198cb6fe.entry.js → p-6a4c670e.entry.js} +1 -1
  256. package/dist/twilight/{p-454937a1.entry.js → p-6a5cac73.entry.js} +1 -1
  257. package/dist/twilight/{p-1705a030.entry.js → p-6b0aacca.entry.js} +1 -1
  258. package/dist/twilight/{p-816f0d62.entry.js → p-74145595.entry.js} +1 -1
  259. package/dist/twilight/{p-9cfeb373.entry.js → p-7573f352.entry.js} +1 -1
  260. package/dist/twilight/{p-1f694f35.entry.js → p-75f4a9ef.entry.js} +1 -1
  261. package/dist/twilight/p-766fa83f.entry.js +4 -0
  262. package/dist/twilight/{p-dc2ec98d.entry.js → p-7849b724.entry.js} +1 -1
  263. package/dist/twilight/{p-f94f0b87.entry.js → p-795066f7.entry.js} +1 -1
  264. package/dist/twilight/{p-3efbe99f.entry.js → p-7aa443f6.entry.js} +1 -1
  265. package/dist/twilight/{p-7171284c.entry.js → p-7eaf3217.entry.js} +1 -1
  266. package/dist/twilight/{p-ae6681e4.entry.js → p-82887781.entry.js} +1 -1
  267. package/dist/twilight/{p-c0990882.entry.js → p-845fc00b.entry.js} +1 -1
  268. package/dist/twilight/{p-d960fb5d.entry.js → p-85bf3602.entry.js} +1 -1
  269. package/dist/twilight/{p-fc601cb7.entry.js → p-88838f90.entry.js} +1 -1
  270. package/dist/twilight/{p-49f793f5.entry.js → p-8fd45966.entry.js} +1 -1
  271. package/dist/twilight/{p-79d531c1.entry.js → p-8fdb99e3.entry.js} +1 -1
  272. package/dist/twilight/{p-10173408.entry.js → p-9439a31c.entry.js} +1 -1
  273. package/dist/twilight/{p-49f9674d.entry.js → p-95b9f420.entry.js} +1 -1
  274. package/dist/twilight/{p-d385497e.entry.js → p-9be52d88.entry.js} +1 -1
  275. package/dist/twilight/{p-91d886a4.entry.js → p-9c9cfc5b.entry.js} +1 -1
  276. package/dist/twilight/{p-BZAgJW8r.js → p-ARTVPDpi.js} +1 -1
  277. package/dist/twilight/{p-Cwn0juZl.js → p-C7e4koVc.js} +2 -2
  278. package/dist/twilight/{p-kJZlJJjc.js → p-CJQ21QXm.js} +1 -1
  279. package/dist/twilight/{p-DKq36Aat.js → p-CVAB0Gy1.js} +1 -1
  280. package/dist/twilight/{p-lcuQmP0A.js → p-CZ7D9I3L.js} +1 -1
  281. package/dist/twilight/{p-H48_b2OW.js → p-DBG3-uK6.js} +1 -1
  282. package/dist/twilight/{p-BdfIR_j4.js → p-DnaxNcAS.js} +1 -1
  283. package/dist/twilight/{p-CiToackV.js → p-DskB2ZaU.js} +1 -1
  284. package/dist/twilight/{p-DSmjBlMI.js → p-Z_0e-eaG.js} +1 -1
  285. package/dist/twilight/{p-bdc6aaf3.entry.js → p-a250d588.entry.js} +1 -1
  286. package/dist/twilight/{p-4b398039.entry.js → p-a2523582.entry.js} +1 -1
  287. package/dist/twilight/{p-e345dcc6.entry.js → p-a40faf66.entry.js} +1 -1
  288. package/dist/twilight/{p-f17570e7.entry.js → p-ae2df76a.entry.js} +1 -1
  289. package/dist/twilight/{p-3ab4a96c.entry.js → p-b5d49886.entry.js} +1 -1
  290. package/dist/twilight/{p-b996fb98.entry.js → p-b9eea7b7.entry.js} +1 -1
  291. package/dist/twilight/{p-1bca57e0.entry.js → p-ba33e7d0.entry.js} +1 -1
  292. package/dist/twilight/{p-f0812a46.entry.js → p-baa27a89.entry.js} +1 -1
  293. package/dist/twilight/{p-8db01cb9.entry.js → p-bda08bda.entry.js} +1 -1
  294. package/dist/twilight/{p-b8dcc622.entry.js → p-be4d41b6.entry.js} +1 -1
  295. package/dist/twilight/{p-3337976e.entry.js → p-c082649d.entry.js} +1 -1
  296. package/dist/twilight/{p-94f05c52.entry.js → p-c0c24914.entry.js} +1 -1
  297. package/dist/twilight/{p-9d458fdc.entry.js → p-c4b8d829.entry.js} +1 -1
  298. package/dist/twilight/{p-f7d7ffa2.entry.js → p-c6f8e7b2.entry.js} +1 -1
  299. package/dist/twilight/{p-754b773f.entry.js → p-c7680554.entry.js} +1 -1
  300. package/dist/twilight/{p-de8ff550.entry.js → p-cbdd7190.entry.js} +1 -1
  301. package/dist/twilight/{p-3af02a2e.entry.js → p-cc325559.entry.js} +1 -1
  302. package/dist/twilight/{p-106e4c00.entry.js → p-cd8c3792.entry.js} +1 -1
  303. package/dist/twilight/{p-269aaae6.entry.js → p-d08d194a.entry.js} +1 -1
  304. package/dist/twilight/{p-f220b5b5.entry.js → p-d11cd0e5.entry.js} +1 -1
  305. package/dist/twilight/{p-819ecf01.entry.js → p-d249e166.entry.js} +1 -1
  306. package/dist/twilight/{p-b90cc416.entry.js → p-d53bdb65.entry.js} +1 -1
  307. package/dist/twilight/{p-22d7efce.entry.js → p-d65485cf.entry.js} +1 -1
  308. package/dist/twilight/{p-7a3de00e.entry.js → p-d7d9bcf1.entry.js} +1 -1
  309. package/dist/twilight/{p-1e48420f.entry.js → p-d8dd3737.entry.js} +1 -1
  310. package/dist/twilight/{p-d9eb567c.entry.js → p-da6f9fcf.entry.js} +1 -1
  311. package/dist/twilight/{p-3deaae96.entry.js → p-de3548d9.entry.js} +1 -1
  312. package/dist/twilight/{p-2291b12c.entry.js → p-dffa5133.entry.js} +1 -1
  313. package/dist/twilight/{p-2b82b2e7.entry.js → p-e29a5e11.entry.js} +1 -1
  314. package/dist/twilight/{p-2f7cced2.entry.js → p-e83c621c.entry.js} +1 -1
  315. package/dist/twilight/{p-4deebc34.entry.js → p-e8ba21c3.entry.js} +1 -1
  316. package/dist/twilight/{p-b753bcde.entry.js → p-f1c0631e.entry.js} +1 -1
  317. package/dist/twilight/{p-5541311c.entry.js → p-f3400329.entry.js} +1 -1
  318. package/dist/twilight/{p-b3b5b350.entry.js → p-f9f758e6.entry.js} +1 -1
  319. package/dist/twilight/{p-c884d66b.entry.js → p-f9f89c27.entry.js} +1 -1
  320. package/dist/twilight/{p-DAZtN2b7.js → p-fYZlWuHl.js} +1 -1
  321. package/dist/twilight/{p-285e3792.entry.js → p-fb505973.entry.js} +1 -1
  322. package/dist/twilight/{p-b9c70014.entry.js → p-fd020871.entry.js} +1 -1
  323. package/dist/twilight/{p-7e65d967.entry.js → p-fded2f48.entry.js} +1 -1
  324. package/dist/twilight/twilight.esm.js +1 -1
  325. package/package.json +5 -5
  326. package/dist/twilight/p-3204cc50.entry.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, f as forceUpdate, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, f as forceUpdate, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { S as ShippingFast, a as Star } from './star-cq6TcfoH.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { H as Helper } from './Helper-BQ-wOE14.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { I as ImageIcon } from './image-C-tzSDxw.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
  import { f as fetchOrder, r as resolveReviewFactors } from './helpers-DqXpn47Z.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
  import { f as fetchOrder, g as getProductRatings } from './helpers-DqXpn47Z.js';
6
6
 
7
7
  const SallaReviewOrderItem = class {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, f as forceUpdate, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, f as forceUpdate, h, H as Host } from './index-Z_0e-eaG.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
 
7
7
  var StoreAlt = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
  import { C as Cart } from './cart-gFG8By9O.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
  import { C as Cancel } from './cancel-BsLF_HK7.js';
7
7
  import { A as ArrowLeftIcon, a as ArrowRightIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
 
6
6
  const sallaSkeletonCss = "/*!twlt*/:host{display:block}.s-loyalty-skeleton .s-loyalty-prize-item .s-skeleton-wrapper{margin-left:auto;margin-right:auto}.s-skeleton-wrapper{display:block}@keyframes pulse{50%{opacity:.5}}.s-skeleton-wrapper{animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.s-skeleton-item{height:100%;width:100%;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-skeleton-item:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-skeleton-item-circular{border-radius:9999px}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
7
7
  import { M as MailIcon } from './mail-DmgxDvXL.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
6
6
 
7
7
  var instagram = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement, c as createEvent } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, a as getElement, c as createEvent } from './index-Z_0e-eaG.js';
5
5
 
6
6
  const sallaTabContentCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
  import { s as setTranslationDefault } from './translate-CxrJQ3Jf.js';
6
6
 
7
7
  const sallaTrustBadgesCss = "/*!twlt*/.s-trust-badges-image{width:55px;height:55px;flex-shrink:0}.s-trust-badges-wrapper{display:flex;align-items:center}.s-trust-badges-wrapper>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-trust-badges-wrapper:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-trust-badges-label{margin-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-trust-badges-number{font-size:0.875rem;line-height:1.25rem}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
6
6
  import { B as BellRing } from './bell-ring-D3mWkc-3.js';
7
7
  import { C as Cart } from './cart-gFG8By9O.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h } from './index-Z_0e-eaG.js';
5
5
  import { G as Genders } from './interfaces-OF8QcbMM.js';
6
6
 
7
7
  const sallaUserProfileCss = "/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
 
6
6
  var Bullhorn = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
  import { M as MailIcon } from './mail-DmgxDvXL.js';
6
6
 
7
7
  var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
 
6
6
  const sallaWalletCss = "/*!twlt*/@charset \"UTF-8\";.s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}.s-wallet-summary{display:flex;align-items:stretch;gap:16px;margin-bottom:28px}.s-wallet-balance-card{flex:0 0 34%;max-width:240px;background:#fff;border-radius:12px;padding:20px;box-sizing:border-box}.s-wallet-balance-mark{width:48px;height:48px;border-radius:9999px;background:var(--color-primary-reverse, #eaf7f0);color:var(--color-primary, #2e8b57);display:inline-flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:12px}.s-wallet-balance-figure{font-size:18px;font-weight:700;color:#1c1c1c}.s-wallet-balance-label{margin-top:2px;font-size:12px;color:#9aa0a6}.s-wallet-amount{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}.s-wallet-amount-credit{color:#00af6c}.s-wallet-amount-debit{color:#f55157}.s-wallet-transaction-type{display:flex;align-items:center;color:#4b5563}@media screen and (min-width: 768px){.s-wallet-balance-card{display:flex;flex-direction:column;justify-content:center}}@media screen and (max-width: 767px){.s-wallet-summary{gap:12px;margin-bottom:20px}.s-wallet-balance-card{flex:0 0 38%;padding:16px;text-align:center}.s-wallet-balance-mark{margin-bottom:8px}}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.items-center{align-items:center}.p-3{padding:0.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-wallet-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-wallet-mobile-title{display:none}}.s-wallet-reference-id{display:none}@media (min-width: 768px){.s-wallet-reference-id{display:inline-block}}.s-wallet-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-wallet-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-wallet-copy-to-clipboard-button{display:none}}.s-wallet-copy-to-clipboard-button salla-button{position:relative}.s-wallet-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:0.25rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0.25rem}@media (min-width: 768px){.s-wallet-status-container{margin-left:0px;margin-right:0px}}.s-wallet-status-container:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.s-wallet-status-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}.s-wallet-status-container i{margin-top:0.25rem}.s-wallet-status-container i:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.25rem}.s-wallet-status-container i:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.25rem}.s-wallet-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-wallet-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-wallet-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-wallet-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-wallet-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-wallet-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-wallet-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-wallet-table-head{display:table-header-group}}.s-wallet-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-wallet-table-head-tr-th:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:left}.s-wallet-table-head-tr-th:last-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:right}.s-wallet-table-head-tr-th:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-wallet-table-head-tr-th:last-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:left}.s-wallet-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-wallet-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-wallet-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-wallet-table-tbody-tr-td{height:5rem;width:auto}.s-wallet-table-tbody-tr-td:last-child{text-align:end}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}.s-wallet-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem}@media (min-width: 768px){.s-wallet-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-wallet-table-tbody-tr-td-content:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-right:0.5rem}.s-wallet-table-tbody-tr-td-content:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0.5rem}.s-wallet-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-wallet-table-tbody-tr a:where([dir=\"ltr\"],[dir=\"ltr\"] *){left:0px}.s-wallet-table-tbody-tr a:where([dir=\"rtl\"],[dir=\"rtl\"] *){right:0px}@media (min-width: 768px){.md\\:mx-0{margin-left:0px;margin-right:0px}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}}.ltr\\:ml-auto:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.ltr\\:mr-4:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:1rem}.rtl\\:ml-4:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:1rem}.rtl\\:mr-auto:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-Z_0e-eaG.js';
5
5
 
6
6
  const sallaWishlistActionsCss = "/*!twlt*/:host{display:block}.s-wishlist-actions-menu{min-width:200px;inset-inline-end:0;inset-inline-start:auto;list-style:none;margin:0;padding:4px 0;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}.s-wishlist-actions-menu-item{display:block;width:100%;padding:10px 16px;text-align:start;font-size:0.875rem;color:#374151;background:transparent;cursor:pointer;white-space:nowrap}.s-wishlist-actions-menu-item:hover{background-color:#f3f4f6;color:var(--color-primary)}.s-wishlist-actions-panel{box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.s-wishlist-actions-panel-select-all{user-select:none}.s-wishlist-actions-select-all:indeterminate,.s-wishlist-actions-select-all:indeterminate:hover,.s-wishlist-actions-select-all:indeterminate:focus{background-color:var(--color-primary);border-color:var(--color-primary)}.s-wishlist-actions-select-all:indeterminate::after{content:\"\";position:absolute;top:50%;left:50%;width:10px;height:2px;background:#fff;border:none;transform:translate(-50%, -50%)}.s-wishlist-actions-social-anchor{display:none}h1.s-wishlist-actions-page-title{text-align:start !important}.static{position:static}.absolute{position:absolute}.relative{position:relative}.z-20{z-index:20}.mb-3{margin-bottom:0.75rem}.mt-1{margin-top:0.25rem}.mt-3{margin-top:0.75rem}.flex{display:flex}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:0.5rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:0.5rem}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-4{padding:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DSmjBlMI.js';
4
+ import { r as registerInstance, h, H as Host } from './index-Z_0e-eaG.js';
5
5
  import { H as Heart } from './heart-00vBRoH3.js';
6
6
  import { H as Helper } from './Helper-BQ-wOE14.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-DSmjBlMI.js';
5
- export { s as setNonce } from './index-DSmjBlMI.js';
4
+ import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-Z_0e-eaG.js';
5
+ export { s as setNonce } from './index-Z_0e-eaG.js';
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DSmjBlMI.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Z_0e-eaG.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as e,H as s,a as l,F as i}from"./p-DSmjBlMI.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"f4a66dc2916ad42108b551790e1a1a581a55d6b1",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"fa96a2da58ee5be80c79c1a6fff66fbcf49cd87e",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"379725e546f6eeb670a23166de2a2d829e48da96",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"5939dfacd285738495dda3481d4974775152dc76",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"2270a07c784a748e7ffaf48164e5cc8b09116878"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
4
+ import{r as t,h as e,H as s,a as l,F as i}from"./p-Z_0e-eaG.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"f4a66dc2916ad42108b551790e1a1a581a55d6b1",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"fa96a2da58ee5be80c79c1a6fff66fbcf49cd87e",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"379725e546f6eeb670a23166de2a2d829e48da96",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"5939dfacd285738495dda3481d4974775152dc76",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"2270a07c784a748e7ffaf48164e5cc8b09116878"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,f as a,h as e}from"./p-DSmjBlMI.js";import{S as l}from"./p-D4oPi1Ov.js";import{C as s}from"./p-BsLF_HK7.js";const r=class{constructor(a){t(this,a),this.activeTabType="",this.tabsKey=0,this.selectedItem=void 0,this.allowEmail=!0,this.allowMobile=!0,this.requireEmail=!1,salla.event.on("loyalty::open",(()=>this.open())),salla.auth.event.onLoggedIn((()=>{this.is_loggedin=!0})),salla.onReady((()=>{this.is_loggedin=salla.config.isUser()})),salla.cart.event.onUpdated((t=>{this.prizePoints=t.loyalty.prize?.points,this.prizeTitle=t.loyalty.prize?.title,this.customerPoints=t.loyalty.customer_points||this.customerPoints}))}connectedCallback(){this.langUnsubscribe=salla.lang.subscribe((()=>{this.guestMessage=salla.lang.get("pages.loyalty_program.guest_message"),this.translationLoaded=!0,a(this)}))}disconnectedCallback(){this.langUnsubscribe?.()}onTabSelected(t){const a=this.loyaltyProgram?.prizes.find((a=>a.title===t.detail?.name));a&&(this.activeTabType=a.type)}setSelectedPrizeItem(t){this.selectedItem=this.selectedItem&&this.selectedItem?.id==t.id?void 0:t}handleLongText(t){return t.length>150?t.substring(0,150)+"...":t}prizeItem(t){return e("div",{onClick:()=>this.setSelectedPrizeItem(t),class:{"s-loyalty-prize-item-selected":!!this.selectedItem&&this.selectedItem?.id==t.id,"s-loyalty-prize-item":!0}},e("img",{class:"s-loyalty-prize-item-image",src:t.image,alt:t.name}),e("div",{class:"s-loyalty-prize-item-title"},t.name),e("div",{class:"s-loyalty-prize-item-subtitle"},this.handleLongText(t.description)),e("div",{class:"s-loyalty-prize-item-points"},t.cost_points," ",salla.lang.get("pages.loyalty_program.point"),e("div",{class:"s-loyalty-prize-item-check"},e("div",null))))}getConfirmationModal(){return[e("salla-placeholder",{alignment:"center",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">\n<title>star3</title>\n <defs>\n <style>\n .a {\n fill: none !important;\n }\n\n .b {\n fill: #ff9e01;\n }\n\n .c {\n fill: #fff;\n opacity: 0.1;\n }\n\n </style>\n </defs>\n <g transform="translate(-683 -269)">\n <rect class="a" width="80" height="80" transform="translate(683 269)" />\n <g transform="translate(684.539 261.216)">\n <path class="b"\n d="M110.117,37.062,90.024,35.2,82.043,16.665a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l17.351-10.3,17.351,10.3a1.61,1.61,0,0,0,2.393-1.739L95.871,53.192l15.16-13.318A1.61,1.61,0,0,0,110.117,37.062Z"\n transform="translate(-42.104 -4.011)" />\n <g transform="translate(0 10.971)">\n <path class="b"\n d="M93.54,12.016c1.024,1.423,3.915,7.533,5.568,11.094a.559.559,0,0,1-.891.641c-2.853-2.7-7.73-7.377-8.754-8.8a2.512,2.512,0,0,1,4.077-2.935Z"\n transform="translate(-75.621 -10.971)" />\n <path class="b"\n d="M360.909,12.016c-1.024,1.423-3.915,7.533-5.568,11.094a.559.559,0,0,0,.891.641c2.853-2.7,7.73-7.377,8.754-8.8a2.512,2.512,0,0,0-4.077-2.935Z"\n transform="translate(-301.908 -10.971)" />\n <path class="b"\n d="M427.538,284.659c-1.667-.543-8.366-1.441-12.261-1.934a.559.559,0,0,0-.34,1.044c3.436,1.9,9.377,5.123,11.044,5.666a2.512,2.512,0,0,0,1.558-4.776Z"\n transform="translate(-352.351 -241.894)" />\n <path class="b"\n d="M1.734,284.659c1.667-.543,8.366-1.441,12.261-1.934a.559.559,0,0,1,.34,1.044c-3.436,1.9-9.377,5.123-11.044,5.666a2.512,2.512,0,0,1-1.558-4.776Z"\n transform="translate(0 -241.894)" />\n <path class="b"\n d="M239.794,412.414c0-1.753,1.224-8.4,1.963-12.257a.559.559,0,0,1,1.1,0c.739,3.855,1.963,10.5,1.963,12.257a2.512,2.512,0,0,1-5.023,0Z"\n transform="translate(-203.768 -341.301)" />\n </g>\n <path class="c"\n d="M84.945,23.4l-2.9-6.74a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l2.309-1.371A125,125,0,0,1,84.945,23.4Z"\n transform="translate(-42.104 -4.011)" />\n </g>\n </g>\n</svg>\n',class:"s-loyalty-confirmation-modal-content"},e("div",{slot:"title",class:"s-loyalty-confirmation-title"},salla.lang.get("pages.loyalty_program.exchange_points")),e("div",{slot:"description"},salla.lang.get("pages.loyalty_program.are_you_sure_to_exchange")," ( ",e("strong",null,this.selectedItem?.cost_points)," ",salla.lang.get("pages.loyalty_program.point")," ) ",salla.lang.get("pages.loyalty_program.for")," ( ",e("strong",null,this.selectedItem?.name)," )")),e("div",{class:"s-loyalty-confirmation-actions"},e("salla-button",{fill:"outline",width:"wide",onClick:()=>this.cancelProcess()},salla.lang.get("pages.loyalty_program.cancellation")),e("salla-button",{loading:this.buttonLoading,width:"wide",onClick:()=>this.exchangeLoyaltyPoint()},salla.lang.get("pages.loyalty_program.confirm")))]}getAfterExchangeUI(){return e("slot",{name:"points-applied-widget"},e("salla-list-tile",{class:"s-loyalty-after-exchange"},e("div",{slot:"title",class:"s-loyalty-after-exchange-title"},this.prizeTitle,"   -   ",this.prizePoints," ",salla.lang.get("pages.loyalty_program.point")),e("div",{slot:"action",class:"s-loyalty-after-exchange-action"},e("salla-button",{class:"s-loyalty-after-exchange-reset",shape:"icon",fill:"outline",color:"danger",size:"small",onClick:()=>this.resetExchange()},e("span",{innerHTML:s})))))}async open(){return this.is_loggedin?(this.modal?.open(),await salla.loyalty.getProgram().then((t=>{this.loyaltyProgram=t.data,this.activeTabType=this.loyaltyProgram.prizes[0]?.type||"",this.tabsKey++})).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||t.response?.data})).finally((()=>this.modal?.stopLoading()))):salla.event.dispatch("login::open")}async close(){return this.modal.close()}async resetExchange(){return await salla.loyalty.reset()}getApiErrorMessage(t){return t?.response?.data?.error?.message||t?.response?.data?.message||("string"==typeof t?t:null)||salla.lang.get("common.errors.error_occurred")}async openConfirmation(){return await this.modal.close().then((()=>this.confirmationModal?.open())).catch((t=>console.log(t)))}async cancelProcess(){return await this.confirmationModal.close().then((()=>this.selectedItem=null)).catch((t=>console.log(t)))}async exchangeLoyaltyPoint(){this.buttonLoading=!0;const t=this.selectedItem;await salla.loyalty.exchange(t?.id).then((async()=>{"FREE_PRODUCT"==t?.key&&salla.url.is_page("cart")&&window.location.reload(),await this.cancelProcess()})).catch((t=>{salla.notify.error(this.getApiErrorMessage(t))})),this.buttonLoading=!1}render(){return this.prizePoints?this.getAfterExchangeUI():[e("slot",{name:"widget"},this.customerPoints?e("salla-list-tile",{class:"s-loyalty-widget"},e("div",{slot:"icon",class:"s-loyalty-widget-icon",innerHTML:l}),e("div",{slot:"subtitle"},this.customerPoints?salla.lang.get("pages.loyalty_program.cart_total_point_summary",{balance:this.customerPoints}):this.guestMessage,e("salla-button",{shape:"link",color:"primary",onClick:()=>salla.event.dispatch("loyalty::open")},this.customerPoints?salla.lang.get("pages.loyalty_program.cart_point_exchange_now"):salla.lang.get("blocks.header.login")))):""),e("salla-modal",{noPadding:!0,width:"sm",ref:t=>this.confirmationModal=t},this.getConfirmationModal()),e("salla-modal",{isLoading:!0,"has-skeleton":!0,width:"md",ref:t=>this.modal=t},e("div",{slot:"loading"},e("div",{class:"s-loyalty-skeleton"},e("salla-list-tile",{class:"s-loyalty-header"},e("div",{slot:"icon",class:"s-loyalty-header-icon"},e("salla-skeleton",{type:"circle",height:"6rem",width:"6rem"})),e("div",{slot:"title",class:"s-loyalty-header-title mb-5"},e("salla-skeleton",{height:"15px",width:"50%"})),e("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},e("salla-skeleton",{height:"10px"}),e("salla-skeleton",{height:"10px",width:"75%"}))),e("div",{class:"s-loyalty-skeleton-cards"},[...Array(3)].map((()=>e("div",{class:"s-loyalty-prize-item swiper-slide"},e("salla-skeleton",{height:"9rem"}),e("div",{class:"s-loyalty-prize-item-title"},e("salla-skeleton",{height:"15px",width:"75%"})),e("div",{class:"s-loyalty-prize-item-subtitle"},e("salla-skeleton",{height:"10px",width:"50%"}),e("salla-skeleton",{height:"10px",width:"25%"})),e("div",{class:"s-loyalty-prize-item-points"},e("salla-skeleton",{height:"15px",width:"100px"}),e("div",{class:"s-loyalty-prize-item-check"},e("salla-skeleton",{height:"1rem",width:"1rem",type:"circle"}))))))))),!this.hasError&&this.loyaltyProgram?[e("salla-list-tile",{id:"s-loyalty-header",class:"s-loyalty-header"},e("div",{slot:"icon",class:"s-loyalty-header-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="54.079" height="53.191" viewBox="0 0 54.079 53.191"><defs><style>.a{fill:#ee9d0d;}.b{fill:#c7830b;}.c{fill:#ea2b2d;}.d{fill:#cb2527;}.e{fill:#6699ce;}.f{fill:#faa6b2;}.g{fill:#a6deff;}.h{fill:#eeb436;}.i{fill:#f72d2f;}</style></defs><path class="a" d="M40,248H77.3v25.88a2.1,2.1,0,0,1-2.1,2.1H42.1a2.1,2.1,0,0,1-2.1-2.1Z" transform="translate(-38.135 -222.787)"/><path class="b" d="M250.632,248.711v12.755L236.2,248h13.67Z" transform="translate(-211.463 -222.787)"/><path class="b" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="c" d="M226.194,32.048l-.5.185a5.035,5.035,0,0,0-3.072,3.292l-.468,1.585-.759.414a5.035,5.035,0,0,0-2.422,3l8.865,8.271,5.09-5.456.262-6.205a5.191,5.191,0,0,0-7-5.083Z" transform="translate(-196.246 -31.722)"/><path class="c" d="M358.628,175.48l-.15.509a5.034,5.034,0,0,1-3.072,3.292l-1.55.577-.359.785a5.034,5.034,0,0,1-2.822,2.624L341.81,175l5.09-5.455,6.172-.69a5.191,5.191,0,0,1,5.555,6.629Z" transform="translate(-304.761 -152.837)"/><path class="d" d="M168,248h7.461v27.978H168Z" transform="translate(-151.213 -222.787)"/><path class="c" d="M40,336H77.3v7.461H40Z" transform="translate(-38.135 -300.528)"/><path class="d" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="a" d="M2.1,0H40.8a2.1,2.1,0,0,1,2.1,2.1V9.326H0V2.1A2.1,2.1,0,0,1,2.1,0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 18.641, 4.976)"/><path class="d" d="M0,0H9.326V9.326H0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 30.912, 16.424)"/><path class="d" d="M286.857,79.389a.931.931,0,0,1-.74-.365l-.615-.8a12.516,12.516,0,0,1-2.528-9,.933.933,0,0,1,1.855.2,10.66,10.66,0,0,0,2.153,7.667l.615.8a.933.933,0,0,1-.739,1.5Z" transform="translate(-252.718 -64.113)"/><path class="c" d="M185.485,178.151l-.039.014a30.78,30.78,0,0,1-12.034,1.906l-2.381-.1,4.092,3.817-1.181,4,3.728-1.206a30.775,30.775,0,0,0,9.833-5.315l.71-.572Z" transform="translate(-153.891 -161.081)"/><path class="d" d="M363.834,194.779a12.51,12.51,0,0,1-6.93-2.1l-.843-.559a.933.933,0,1,1,1.031-1.554l.842.558a10.659,10.659,0,0,0,7.8,1.618.933.933,0,1,1,.328,1.836A12.663,12.663,0,0,1,363.834,194.779Z" transform="translate(-316.982 -171.914)"/><path class="c" d="M275,202.524l-.012.04a30.776,30.776,0,0,0-1.069,12.137l.265,2.369-4.092-3.817-3.909,1.455.945-3.8a30.776,30.776,0,0,1,4.622-10.177l.521-.748Z" transform="translate(-237.949 -180.364)"/><circle class="e" cx="1.865" cy="1.865" r="1.865" transform="translate(10.259 0.032)"/><circle class="f" cx="1.865" cy="1.865" r="1.865" transform="translate(0 21.482)"/><path class="g" d="M36.663,36.663a.933.933,0,0,1-.885-.638l-.048-.143a2.946,2.946,0,0,0-2.8-2.017.933.933,0,1,1,0-1.865A4.808,4.808,0,0,1,37.5,35.292l.048.143a.933.933,0,0,1-.885,1.228Z" transform="translate(-31.067 -31.968)"/><path class="g" d="M79.493,194.438a.929.929,0,0,1-.506-.15l-.185-.12a2.074,2.074,0,0,0-2.192-.047.933.933,0,0,1-.947-1.607,3.929,3.929,0,0,1,4.153.088l.185.12a.933.933,0,0,1-.508,1.716Z" transform="translate(-69.235 -173.283)"/><path class="h" d="M27.751,85.141l2.88,2.644,3.811-.874-1.624,3.556,2.008,3.354-3.884-.446-2.569,2.946L27.6,92.49,24,90.957l3.4-1.922Z" transform="translate(-24 -78.914)"/><path class="h" d="M82.174,227.375l-.959,3.772,2.564,2.928-3.884.254L77.9,237.673l-1.442-3.615-3.8-.862,2.993-2.488-.353-3.876,3.291,2.078Z" transform="translate(-66.992 -204.086)"/><path class="i" d="M300.471,141.9l-5.455-5.09,5.09-5.456a8.342,8.342,0,0,1,5.455,5.09Z" transform="translate(-263.422 -119.737)"/></svg>'}),e("div",{slot:"title",class:"s-loyalty-header-title"},this.loyaltyProgram.prize_promotion_title),e("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},this.loyaltyProgram.prize_promotion_description)),e("salla-tabs",{key:this.tabsKey},this.loyaltyProgram.prizes.map((t=>e("salla-tab-header",{slot:"header",name:t.title},e("span",null,t.title)))),this.loyaltyProgram.prizes.map(((t,a)=>e("salla-tab-content",{slot:"content",name:t.title},e("salla-slider",{class:"s-loyalty-slider",loop:!1,"controls-outer":!0,id:"loyalty-popup-slider-"+a,type:"carousel"},e("div",{slot:"items"},t.items.map((t=>this.prizeItem(t))))))))),"FREE_PRODUCT"===this.activeTabType?.toUpperCase()&&(salla.config.get("store.features")||[]).includes("loyalty-system-v2")?e("a",{href:salla.url.get(""),class:"s-loyalty-program-redeem-btn s-button-element s-button-btn s-button-solid s-button-wide s-button-primary s-button-wrap"},salla.lang.get("pages.loyalty_program.shop_now")):e("salla-button",{disabled:!this.selectedItem,width:"wide",class:"s-loyalty-program-redeem-btn",onClick:()=>this.openConfirmation()},salla.lang.get("pages.loyalty_program.exchange_points"))]:e("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?e("span",{slot:"description"},this.errorMessage):""))]}};r.style='/*!twlt*/.mb-5{margin-bottom:1.25rem}.outline{outline-style:solid}.s-loyalty-placeholder{display:flex;align-items:center;justify-content:center}.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-wrap{pointer-events:none}.s-button-wrap svg{height:1.25rem;width:1.25rem;fill:currentColor}.s-button-element:not(:disabled):not([loading]){pointer-events:auto}.s-button-wide{width:100%}.s-loyalty-prize-item.swiper-slide{margin-left:5px;margin-right:5px;margin-bottom:0.5rem;display:flex;width:calc(33.33% - 10px);min-width:200px;cursor:pointer;flex-direction:column}.s-loyalty-prize-item.swiper-slide>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))}.s-loyalty-prize-item.swiper-slide{overflow:hidden;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));background-size:cover;padding:0px !important;text-align:center;font-size:1.875rem;line-height:2.25rem}.s-loyalty-prize-item-selected{--tw-translate-y:-0.125rem !important;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important;border-width:1px;border-style:solid;border-color:var(--color-primary);--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-loyalty-prize-item-selected .s-loyalty-prize-item-check{display:flex;align-items:center;justify-content:center;border-color:var(--color-primary)}.s-loyalty-prize-item-selected .s-loyalty-prize-item-check>div{height:0.625rem;width:0.625rem;border-radius:9999px;background-color:var(--color-primary)}.s-loyalty-prize-item-image{height:9rem;width:100%;background-size:cover;object-fit:cover}.s-loyalty-prize-item-title{padding-left:0.5rem;padding-right:0.5rem;font-size:1rem;line-height:1.5rem;font-weight:700}.s-loyalty-prize-item-subtitle{padding-left:0.5rem;padding-right:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-loyalty-prize-item-check{position:absolute;height:1rem;width:1rem;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-loyalty-prize-item-check:where([dir="ltr"],[dir="ltr"] *){left:1.25rem}.s-loyalty-prize-item-check:where([dir="rtl"],[dir="rtl"] *){right:1.25rem}.s-loyalty-prize-item-points{margin-top:auto !important;display:flex;width:100%;align-items:center;justify-content:center;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}.s-loyalty-program-redeem-btn{overflow:hidden;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-loyalty-header{margin-bottom:1.25rem;display:block}@media (max-width: 768px){.s-loyalty-modal .s-modal-body{max-height:100%;overflow-y:scroll}}.s-loyalty-skeleton .s-list-tile-item-content{display:block;width:100%}.s-loyalty-header-icon{position:relative;display:flex;height:6rem;width:6rem;align-items:center;justify-content:center;border-radius:9999px;background-color:#ff9e011a}.s-loyalty-header-icon>img{height:3rem;width:3rem}.s-loyalty-header-title{margin-bottom:0.5rem;font-size:1.25rem;line-height:1.75rem}.s-loyalty-header-subtitle{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-loyalty-activator-icon{display:flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.s-loyalty-activator-icon>svg{fill:#fff}.s-loyalty-confirmation-modal-content .s-placeholder-title{margin-bottom:0.75rem}.s-loyalty-confirmation-modal-content .s-placeholder-icon svg b{--tw-text-opacity:1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.s-loyalty-confirmation-modal-content .s-placeholder-description{padding-left:1.25rem;padding-right:1.25rem}.s-loyalty-confirmation-actions{margin-top:1.25rem;display:flex;align-items:center;justify-content:space-between}.s-loyalty-confirmation-actions>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-confirmation-actions{padding:1.25rem;padding-top:0.5rem}.s-loyalty-confirmation-actions:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-widget .s-list-tile-item{padding:0px !important}.s-loyalty-widget-icon{display:flex;height:4rem;width:4rem;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--color-primary)}.s-loyalty-widget-icon>svg{width:1.5rem;fill:#fff}.s-loyalty-after-exchange .s-list-tile-item{position:relative;justify-content:space-between;overflow:hidden;border-radius:var(--s-radius, 0.25rem);padding-top:0.75rem;padding-bottom:0.75rem}.s-loyalty-after-exchange .s-list-tile-item::after{pointer-events:none;position:absolute;inset:0px;display:block;height:100%;width:100%;background-color:var(--color-primary);opacity:.08;--tw-content:\'\';content:var(--tw-content)}.s-loyalty-after-exchange .s-list-tile-item .s-list-tile-item-title{font-size:15px}.s-loyalty-after-exchange-reset{height:1.5rem}.s-loyalty-after-exchange-reset button{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1));font-size:15px}.s-loyalty-after-exchange-reset button span{display:flex;--tw-scale-x:.75;--tw-scale-y:.75;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center}.s-loyalty-after-exchange-reset button svg{height:1.5rem !important;width:1.5rem !important;fill:#f87171}.s-loyalty-after-exchange-reset button:hover svg{fill:#fff}.s-loyalty-after-exchange-action{display:flex;align-items:center;justify-content:center}.s-loyalty-placeholder{display:flex;align-items:center;justify-content:center}.s-loyalty-skeleton .s-loyalty-header-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-loyalty-skeleton .s-loyalty-prize-item-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-loyalty-skeleton .s-loyalty-header-title{margin-bottom:1.25rem}.s-loyalty-skeleton-cards{display:flex;align-items:center}.s-loyalty-skeleton .s-loyalty-prize-item{position:relative;cursor:unset !important;text-align:center}.s-loyalty-skeleton .s-loyalty-prize-item .s-skeleton-wrapper{margin-left:auto;margin-right:auto}.s-loyalty-skeleton .s-loyalty-prize-item-check{border-width:0px}.s-loyalty-slider{margin-bottom:0.625rem;display:block}.s-loyalty-slider .swiper-wrapper{height:auto !important}.s-loyalty-container{padding:0.625rem}.s-loyalty-points-history-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}';export{r as salla_loyalty}
4
+ import{r as t,f as a,h as e}from"./p-Z_0e-eaG.js";import{S as l}from"./p-D4oPi1Ov.js";import{C as s}from"./p-BsLF_HK7.js";const r=class{constructor(a){t(this,a),this.activeTabType="",this.tabsKey=0,this.selectedItem=void 0,this.allowEmail=!0,this.allowMobile=!0,this.requireEmail=!1,salla.event.on("loyalty::open",(()=>this.open())),salla.auth.event.onLoggedIn((()=>{this.is_loggedin=!0})),salla.onReady((()=>{this.is_loggedin=salla.config.isUser()})),salla.cart.event.onUpdated((t=>{this.prizePoints=t.loyalty.prize?.points,this.prizeTitle=t.loyalty.prize?.title,this.customerPoints=t.loyalty.customer_points||this.customerPoints}))}connectedCallback(){this.langUnsubscribe=salla.lang.subscribe((()=>{this.guestMessage=salla.lang.get("pages.loyalty_program.guest_message"),this.translationLoaded=!0,a(this)}))}disconnectedCallback(){this.langUnsubscribe?.()}onTabSelected(t){const a=this.loyaltyProgram?.prizes.find((a=>a.title===t.detail?.name));a&&(this.activeTabType=a.type)}setSelectedPrizeItem(t){this.selectedItem=this.selectedItem&&this.selectedItem?.id==t.id?void 0:t}handleLongText(t){return t.length>150?t.substring(0,150)+"...":t}prizeItem(t){return e("div",{onClick:()=>this.setSelectedPrizeItem(t),class:{"s-loyalty-prize-item-selected":!!this.selectedItem&&this.selectedItem?.id==t.id,"s-loyalty-prize-item":!0}},e("img",{class:"s-loyalty-prize-item-image",src:t.image,alt:t.name}),e("div",{class:"s-loyalty-prize-item-title"},t.name),e("div",{class:"s-loyalty-prize-item-subtitle"},this.handleLongText(t.description)),e("div",{class:"s-loyalty-prize-item-points"},t.cost_points," ",salla.lang.get("pages.loyalty_program.point"),e("div",{class:"s-loyalty-prize-item-check"},e("div",null))))}getConfirmationModal(){return[e("salla-placeholder",{alignment:"center",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">\n<title>star3</title>\n <defs>\n <style>\n .a {\n fill: none !important;\n }\n\n .b {\n fill: #ff9e01;\n }\n\n .c {\n fill: #fff;\n opacity: 0.1;\n }\n\n </style>\n </defs>\n <g transform="translate(-683 -269)">\n <rect class="a" width="80" height="80" transform="translate(683 269)" />\n <g transform="translate(684.539 261.216)">\n <path class="b"\n d="M110.117,37.062,90.024,35.2,82.043,16.665a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l17.351-10.3,17.351,10.3a1.61,1.61,0,0,0,2.393-1.739L95.871,53.192l15.16-13.318A1.61,1.61,0,0,0,110.117,37.062Z"\n transform="translate(-42.104 -4.011)" />\n <g transform="translate(0 10.971)">\n <path class="b"\n d="M93.54,12.016c1.024,1.423,3.915,7.533,5.568,11.094a.559.559,0,0,1-.891.641c-2.853-2.7-7.73-7.377-8.754-8.8a2.512,2.512,0,0,1,4.077-2.935Z"\n transform="translate(-75.621 -10.971)" />\n <path class="b"\n d="M360.909,12.016c-1.024,1.423-3.915,7.533-5.568,11.094a.559.559,0,0,0,.891.641c2.853-2.7,7.73-7.377,8.754-8.8a2.512,2.512,0,0,0-4.077-2.935Z"\n transform="translate(-301.908 -10.971)" />\n <path class="b"\n d="M427.538,284.659c-1.667-.543-8.366-1.441-12.261-1.934a.559.559,0,0,0-.34,1.044c3.436,1.9,9.377,5.123,11.044,5.666a2.512,2.512,0,0,0,1.558-4.776Z"\n transform="translate(-352.351 -241.894)" />\n <path class="b"\n d="M1.734,284.659c1.667-.543,8.366-1.441,12.261-1.934a.559.559,0,0,1,.34,1.044c-3.436,1.9-9.377,5.123-11.044,5.666a2.512,2.512,0,0,1-1.558-4.776Z"\n transform="translate(0 -241.894)" />\n <path class="b"\n d="M239.794,412.414c0-1.753,1.224-8.4,1.963-12.257a.559.559,0,0,1,1.1,0c.739,3.855,1.963,10.5,1.963,12.257a2.512,2.512,0,0,1-5.023,0Z"\n transform="translate(-203.768 -341.301)" />\n </g>\n <path class="c"\n d="M84.945,23.4l-2.9-6.74a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l2.309-1.371A125,125,0,0,1,84.945,23.4Z"\n transform="translate(-42.104 -4.011)" />\n </g>\n </g>\n</svg>\n',class:"s-loyalty-confirmation-modal-content"},e("div",{slot:"title",class:"s-loyalty-confirmation-title"},salla.lang.get("pages.loyalty_program.exchange_points")),e("div",{slot:"description"},salla.lang.get("pages.loyalty_program.are_you_sure_to_exchange")," ( ",e("strong",null,this.selectedItem?.cost_points)," ",salla.lang.get("pages.loyalty_program.point")," ) ",salla.lang.get("pages.loyalty_program.for")," ( ",e("strong",null,this.selectedItem?.name)," )")),e("div",{class:"s-loyalty-confirmation-actions"},e("salla-button",{fill:"outline",width:"wide",onClick:()=>this.cancelProcess()},salla.lang.get("pages.loyalty_program.cancellation")),e("salla-button",{loading:this.buttonLoading,width:"wide",onClick:()=>this.exchangeLoyaltyPoint()},salla.lang.get("pages.loyalty_program.confirm")))]}getAfterExchangeUI(){return e("slot",{name:"points-applied-widget"},e("salla-list-tile",{class:"s-loyalty-after-exchange"},e("div",{slot:"title",class:"s-loyalty-after-exchange-title"},this.prizeTitle,"   -   ",this.prizePoints," ",salla.lang.get("pages.loyalty_program.point")),e("div",{slot:"action",class:"s-loyalty-after-exchange-action"},e("salla-button",{class:"s-loyalty-after-exchange-reset",shape:"icon",fill:"outline",color:"danger",size:"small",onClick:()=>this.resetExchange()},e("span",{innerHTML:s})))))}async open(){return this.is_loggedin?(this.modal?.open(),await salla.loyalty.getProgram().then((t=>{this.loyaltyProgram=t.data,this.activeTabType=this.loyaltyProgram.prizes[0]?.type||"",this.tabsKey++})).catch((t=>{this.hasError=!0,this.errorMessage=t.response?.data?.error?.message||t.response?.data})).finally((()=>this.modal?.stopLoading()))):salla.event.dispatch("login::open")}async close(){return this.modal.close()}async resetExchange(){return await salla.loyalty.reset()}getApiErrorMessage(t){return t?.response?.data?.error?.message||t?.response?.data?.message||("string"==typeof t?t:null)||salla.lang.get("common.errors.error_occurred")}async openConfirmation(){return await this.modal.close().then((()=>this.confirmationModal?.open())).catch((t=>console.log(t)))}async cancelProcess(){return await this.confirmationModal.close().then((()=>this.selectedItem=null)).catch((t=>console.log(t)))}async exchangeLoyaltyPoint(){this.buttonLoading=!0;const t=this.selectedItem;await salla.loyalty.exchange(t?.id).then((async()=>{"FREE_PRODUCT"==t?.key&&salla.url.is_page("cart")&&window.location.reload(),await this.cancelProcess()})).catch((t=>{salla.notify.error(this.getApiErrorMessage(t))})),this.buttonLoading=!1}render(){return this.prizePoints?this.getAfterExchangeUI():[e("slot",{name:"widget"},this.customerPoints?e("salla-list-tile",{class:"s-loyalty-widget"},e("div",{slot:"icon",class:"s-loyalty-widget-icon",innerHTML:l}),e("div",{slot:"subtitle"},this.customerPoints?salla.lang.get("pages.loyalty_program.cart_total_point_summary",{balance:this.customerPoints}):this.guestMessage,e("salla-button",{shape:"link",color:"primary",onClick:()=>salla.event.dispatch("loyalty::open")},this.customerPoints?salla.lang.get("pages.loyalty_program.cart_point_exchange_now"):salla.lang.get("blocks.header.login")))):""),e("salla-modal",{noPadding:!0,width:"sm",ref:t=>this.confirmationModal=t},this.getConfirmationModal()),e("salla-modal",{isLoading:!0,"has-skeleton":!0,width:"md",ref:t=>this.modal=t},e("div",{slot:"loading"},e("div",{class:"s-loyalty-skeleton"},e("salla-list-tile",{class:"s-loyalty-header"},e("div",{slot:"icon",class:"s-loyalty-header-icon"},e("salla-skeleton",{type:"circle",height:"6rem",width:"6rem"})),e("div",{slot:"title",class:"s-loyalty-header-title mb-5"},e("salla-skeleton",{height:"15px",width:"50%"})),e("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},e("salla-skeleton",{height:"10px"}),e("salla-skeleton",{height:"10px",width:"75%"}))),e("div",{class:"s-loyalty-skeleton-cards"},[...Array(3)].map((()=>e("div",{class:"s-loyalty-prize-item swiper-slide"},e("salla-skeleton",{height:"9rem"}),e("div",{class:"s-loyalty-prize-item-title"},e("salla-skeleton",{height:"15px",width:"75%"})),e("div",{class:"s-loyalty-prize-item-subtitle"},e("salla-skeleton",{height:"10px",width:"50%"}),e("salla-skeleton",{height:"10px",width:"25%"})),e("div",{class:"s-loyalty-prize-item-points"},e("salla-skeleton",{height:"15px",width:"100px"}),e("div",{class:"s-loyalty-prize-item-check"},e("salla-skeleton",{height:"1rem",width:"1rem",type:"circle"}))))))))),!this.hasError&&this.loyaltyProgram?[e("salla-list-tile",{id:"s-loyalty-header",class:"s-loyalty-header"},e("div",{slot:"icon",class:"s-loyalty-header-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="54.079" height="53.191" viewBox="0 0 54.079 53.191"><defs><style>.a{fill:#ee9d0d;}.b{fill:#c7830b;}.c{fill:#ea2b2d;}.d{fill:#cb2527;}.e{fill:#6699ce;}.f{fill:#faa6b2;}.g{fill:#a6deff;}.h{fill:#eeb436;}.i{fill:#f72d2f;}</style></defs><path class="a" d="M40,248H77.3v25.88a2.1,2.1,0,0,1-2.1,2.1H42.1a2.1,2.1,0,0,1-2.1-2.1Z" transform="translate(-38.135 -222.787)"/><path class="b" d="M250.632,248.711v12.755L236.2,248h13.67Z" transform="translate(-211.463 -222.787)"/><path class="b" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="c" d="M226.194,32.048l-.5.185a5.035,5.035,0,0,0-3.072,3.292l-.468,1.585-.759.414a5.035,5.035,0,0,0-2.422,3l8.865,8.271,5.09-5.456.262-6.205a5.191,5.191,0,0,0-7-5.083Z" transform="translate(-196.246 -31.722)"/><path class="c" d="M358.628,175.48l-.15.509a5.034,5.034,0,0,1-3.072,3.292l-1.55.577-.359.785a5.034,5.034,0,0,1-2.822,2.624L341.81,175l5.09-5.455,6.172-.69a5.191,5.191,0,0,1,5.555,6.629Z" transform="translate(-304.761 -152.837)"/><path class="d" d="M168,248h7.461v27.978H168Z" transform="translate(-151.213 -222.787)"/><path class="c" d="M40,336H77.3v7.461H40Z" transform="translate(-38.135 -300.528)"/><path class="d" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="a" d="M2.1,0H40.8a2.1,2.1,0,0,1,2.1,2.1V9.326H0V2.1A2.1,2.1,0,0,1,2.1,0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 18.641, 4.976)"/><path class="d" d="M0,0H9.326V9.326H0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 30.912, 16.424)"/><path class="d" d="M286.857,79.389a.931.931,0,0,1-.74-.365l-.615-.8a12.516,12.516,0,0,1-2.528-9,.933.933,0,0,1,1.855.2,10.66,10.66,0,0,0,2.153,7.667l.615.8a.933.933,0,0,1-.739,1.5Z" transform="translate(-252.718 -64.113)"/><path class="c" d="M185.485,178.151l-.039.014a30.78,30.78,0,0,1-12.034,1.906l-2.381-.1,4.092,3.817-1.181,4,3.728-1.206a30.775,30.775,0,0,0,9.833-5.315l.71-.572Z" transform="translate(-153.891 -161.081)"/><path class="d" d="M363.834,194.779a12.51,12.51,0,0,1-6.93-2.1l-.843-.559a.933.933,0,1,1,1.031-1.554l.842.558a10.659,10.659,0,0,0,7.8,1.618.933.933,0,1,1,.328,1.836A12.663,12.663,0,0,1,363.834,194.779Z" transform="translate(-316.982 -171.914)"/><path class="c" d="M275,202.524l-.012.04a30.776,30.776,0,0,0-1.069,12.137l.265,2.369-4.092-3.817-3.909,1.455.945-3.8a30.776,30.776,0,0,1,4.622-10.177l.521-.748Z" transform="translate(-237.949 -180.364)"/><circle class="e" cx="1.865" cy="1.865" r="1.865" transform="translate(10.259 0.032)"/><circle class="f" cx="1.865" cy="1.865" r="1.865" transform="translate(0 21.482)"/><path class="g" d="M36.663,36.663a.933.933,0,0,1-.885-.638l-.048-.143a2.946,2.946,0,0,0-2.8-2.017.933.933,0,1,1,0-1.865A4.808,4.808,0,0,1,37.5,35.292l.048.143a.933.933,0,0,1-.885,1.228Z" transform="translate(-31.067 -31.968)"/><path class="g" d="M79.493,194.438a.929.929,0,0,1-.506-.15l-.185-.12a2.074,2.074,0,0,0-2.192-.047.933.933,0,0,1-.947-1.607,3.929,3.929,0,0,1,4.153.088l.185.12a.933.933,0,0,1-.508,1.716Z" transform="translate(-69.235 -173.283)"/><path class="h" d="M27.751,85.141l2.88,2.644,3.811-.874-1.624,3.556,2.008,3.354-3.884-.446-2.569,2.946L27.6,92.49,24,90.957l3.4-1.922Z" transform="translate(-24 -78.914)"/><path class="h" d="M82.174,227.375l-.959,3.772,2.564,2.928-3.884.254L77.9,237.673l-1.442-3.615-3.8-.862,2.993-2.488-.353-3.876,3.291,2.078Z" transform="translate(-66.992 -204.086)"/><path class="i" d="M300.471,141.9l-5.455-5.09,5.09-5.456a8.342,8.342,0,0,1,5.455,5.09Z" transform="translate(-263.422 -119.737)"/></svg>'}),e("div",{slot:"title",class:"s-loyalty-header-title"},this.loyaltyProgram.prize_promotion_title),e("div",{slot:"subtitle",class:"s-loyalty-header-subtitle"},this.loyaltyProgram.prize_promotion_description)),e("salla-tabs",{key:this.tabsKey},this.loyaltyProgram.prizes.map((t=>e("salla-tab-header",{slot:"header",name:t.title},e("span",null,t.title)))),this.loyaltyProgram.prizes.map(((t,a)=>e("salla-tab-content",{slot:"content",name:t.title},e("salla-slider",{class:"s-loyalty-slider",loop:!1,"controls-outer":!0,id:"loyalty-popup-slider-"+a,type:"carousel"},e("div",{slot:"items"},t.items.map((t=>this.prizeItem(t))))))))),"FREE_PRODUCT"===this.activeTabType?.toUpperCase()&&(salla.config.get("store.features")||[]).includes("loyalty-system-v2")?e("a",{href:salla.url.get(""),class:"s-loyalty-program-redeem-btn s-button-element s-button-btn s-button-solid s-button-wide s-button-primary s-button-wrap"},salla.lang.get("pages.loyalty_program.shop_now")):e("salla-button",{disabled:!this.selectedItem,width:"wide",class:"s-loyalty-program-redeem-btn",onClick:()=>this.openConfirmation()},salla.lang.get("pages.loyalty_program.exchange_points"))]:e("salla-placeholder",{class:"s-loyalty-placeholder",alignment:"center"},this.errorMessage?e("span",{slot:"description"},this.errorMessage):""))]}};r.style='/*!twlt*/.mb-5{margin-bottom:1.25rem}.outline{outline-style:solid}.s-loyalty-placeholder{display:flex;align-items:center;justify-content:center}.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-wrap{pointer-events:none}.s-button-wrap svg{height:1.25rem;width:1.25rem;fill:currentColor}.s-button-element:not(:disabled):not([loading]){pointer-events:auto}.s-button-wide{width:100%}.s-loyalty-prize-item.swiper-slide{margin-left:5px;margin-right:5px;margin-bottom:0.5rem;display:flex;width:calc(33.33% - 10px);min-width:200px;cursor:pointer;flex-direction:column}.s-loyalty-prize-item.swiper-slide>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.75rem * var(--tw-space-y-reverse))}.s-loyalty-prize-item.swiper-slide{overflow:hidden;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));background-size:cover;padding:0px !important;text-align:center;font-size:1.875rem;line-height:2.25rem}.s-loyalty-prize-item-selected{--tw-translate-y:-0.125rem !important;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important;border-width:1px;border-style:solid;border-color:var(--color-primary);--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-loyalty-prize-item-selected .s-loyalty-prize-item-check{display:flex;align-items:center;justify-content:center;border-color:var(--color-primary)}.s-loyalty-prize-item-selected .s-loyalty-prize-item-check>div{height:0.625rem;width:0.625rem;border-radius:9999px;background-color:var(--color-primary)}.s-loyalty-prize-item-image{height:9rem;width:100%;background-size:cover;object-fit:cover}.s-loyalty-prize-item-title{padding-left:0.5rem;padding-right:0.5rem;font-size:1rem;line-height:1.5rem;font-weight:700}.s-loyalty-prize-item-subtitle{padding-left:0.5rem;padding-right:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-loyalty-prize-item-check{position:absolute;height:1rem;width:1rem;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-loyalty-prize-item-check:where([dir="ltr"],[dir="ltr"] *){left:1.25rem}.s-loyalty-prize-item-check:where([dir="rtl"],[dir="rtl"] *){right:1.25rem}.s-loyalty-prize-item-points{margin-top:auto !important;display:flex;width:100%;align-items:center;justify-content:center;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}.s-loyalty-program-redeem-btn{overflow:hidden;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-loyalty-header{margin-bottom:1.25rem;display:block}@media (max-width: 768px){.s-loyalty-modal .s-modal-body{max-height:100%;overflow-y:scroll}}.s-loyalty-skeleton .s-list-tile-item-content{display:block;width:100%}.s-loyalty-header-icon{position:relative;display:flex;height:6rem;width:6rem;align-items:center;justify-content:center;border-radius:9999px;background-color:#ff9e011a}.s-loyalty-header-icon>img{height:3rem;width:3rem}.s-loyalty-header-title{margin-bottom:0.5rem;font-size:1.25rem;line-height:1.75rem}.s-loyalty-header-subtitle{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-loyalty-activator-icon{display:flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.s-loyalty-activator-icon>svg{fill:#fff}.s-loyalty-confirmation-modal-content .s-placeholder-title{margin-bottom:0.75rem}.s-loyalty-confirmation-modal-content .s-placeholder-icon svg b{--tw-text-opacity:1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.s-loyalty-confirmation-modal-content .s-placeholder-description{padding-left:1.25rem;padding-right:1.25rem}.s-loyalty-confirmation-actions{margin-top:1.25rem;display:flex;align-items:center;justify-content:space-between}.s-loyalty-confirmation-actions>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-loyalty-confirmation-actions{padding:1.25rem;padding-top:0.5rem}.s-loyalty-confirmation-actions:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-loyalty-widget .s-list-tile-item{padding:0px !important}.s-loyalty-widget-icon{display:flex;height:4rem;width:4rem;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--color-primary)}.s-loyalty-widget-icon>svg{width:1.5rem;fill:#fff}.s-loyalty-after-exchange .s-list-tile-item{position:relative;justify-content:space-between;overflow:hidden;border-radius:var(--s-radius, 0.25rem);padding-top:0.75rem;padding-bottom:0.75rem}.s-loyalty-after-exchange .s-list-tile-item::after{pointer-events:none;position:absolute;inset:0px;display:block;height:100%;width:100%;background-color:var(--color-primary);opacity:.08;--tw-content:\'\';content:var(--tw-content)}.s-loyalty-after-exchange .s-list-tile-item .s-list-tile-item-title{font-size:15px}.s-loyalty-after-exchange-reset{height:1.5rem}.s-loyalty-after-exchange-reset button{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1));font-size:15px}.s-loyalty-after-exchange-reset button span{display:flex;--tw-scale-x:.75;--tw-scale-y:.75;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center}.s-loyalty-after-exchange-reset button svg{height:1.5rem !important;width:1.5rem !important;fill:#f87171}.s-loyalty-after-exchange-reset button:hover svg{fill:#fff}.s-loyalty-after-exchange-action{display:flex;align-items:center;justify-content:center}.s-loyalty-placeholder{display:flex;align-items:center;justify-content:center}.s-loyalty-skeleton .s-loyalty-header-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-loyalty-skeleton .s-loyalty-prize-item-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-loyalty-skeleton .s-loyalty-header-title{margin-bottom:1.25rem}.s-loyalty-skeleton-cards{display:flex;align-items:center}.s-loyalty-skeleton .s-loyalty-prize-item{position:relative;cursor:unset !important;text-align:center}.s-loyalty-skeleton .s-loyalty-prize-item .s-skeleton-wrapper{margin-left:auto;margin-right:auto}.s-loyalty-skeleton .s-loyalty-prize-item-check{border-width:0px}.s-loyalty-slider{margin-bottom:0.625rem;display:block}.s-loyalty-slider .swiper-wrapper{height:auto !important}.s-loyalty-container{padding:0.625rem}.s-loyalty-points-history-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}';export{r as salla_loyalty}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as i}from"./p-DSmjBlMI.js";import{G as s}from"./p-OF8QcbMM.js";const l=class{constructor(i){e(this,i),this.minAge=10,this.isEditable=!0,this.disableAction=!1,this.isLoading=!0,this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}connectedCallback(){this.langUnsubscribe=salla.lang.subscribe((()=>{this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}))}disconnectedCallback(){this.langUnsubscribe?.()}phoneNumberFieldEventHandler(e){e.detail.number?(this.userData.phone.number=Number.parseInt(e.detail.number),this.userData.phone.country=e.detail.country_code,this.disableAction=!1):this.disableAction=!0}handleFieldChange(e,i,s=!1){i.target.value?(this.userData[e]=i.target.value,this.disableAction=!1):s&&(this.disableAction=!0)}handleEmailInput(e,i){const s=document.getElementById("email-error"),l=i.target.value;if(!l)return this.disableAction=!0,void(s.textContent=this.email_required_trans);/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(l)||(this.disableAction=!0,s.textContent=this.invalid_email_trans),s.textContent="",this.userData[e]=l,this.disableAction=!1}submitForm(e){e.preventDefault(),this.disableAction=!0;const i=Object.assign({},this.userData);i.phone=void 0,i.phone=this.userData.phone.number,i.country_code=this.userData.phone.country,salla.api.profile.update(i).finally((()=>{this.disableAction=!1}))}getBirthDateRestriction(){const e=new Date,i=e.getFullYear()-this.minAge;return e.setFullYear(i),e}fetchData(){return salla.api.profile.info().then((e=>{this.userData=e.data})).finally((()=>{this.isLoading=!1,this.isEditable=!Salla.config.get("store.features").includes("sso-login")}))}renderLoadingSection(){return i("div",{class:"s-user-profile-skeleton-wrapper"},Array.from({length:6},((e,s)=>i("salla-skeleton",{class:"skeleton-item",width:"100%",height:"50px",key:s}))))}componentWillLoad(){Salla.onReady().then((()=>this.fetchData()))}render(){return this.isLoading?this.renderLoadingSection():i("form",{onSubmit:e=>this.submitForm(e)},i("div",{class:"s-user-profile-wrapper"},i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"first-name",class:"s-user-profile-field-label"},this.first_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"first_name",value:this.userData.first_name,id:"first-name",required:!0,autocomplete:"first_name",class:"form-input",onChange:e=>this.handleFieldChange("first_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"last-name",class:"s-user-profile-field-label"},this.last_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"last_name",value:this.userData.last_name,id:"last-name",required:!0,autocomplete:"last_name",class:"form-input",onChange:e=>this.handleFieldChange("last_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"birthday",class:"s-user-profile-field-label"},this.birthday_trans),i("salla-datetime-picker",{disabled:!this.isEditable,dateFormat:"Y-m-d",value:this.userData.birthday,placeholder:this.birthday_placeholder_trans,required:!0,maxDate:this.getBirthDateRestriction(),name:"birthday",onPicked:e=>this.handleFieldChange("birthday",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"gender",class:"s-user-profile-field-label"},this.gender_trans),i("select",{disabled:!this.isEditable,class:"form-input",name:"gender",required:!0,onChange:e=>this.handleFieldChange("gender",e)},i("option",{value:""},this.gender_placeholder_trans),i("option",{value:s.Male,selected:this.userData.gender===s.Male},this.male_trans),i("option",{value:s.Female,selected:this.userData.gender===s.Female},this.female_trans))),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"email",class:"s-user-profile-field-label"},this.email_trans),i("input",{disabled:!this.isEditable,type:"email",name:"email",value:this.userData.email,id:"email",class:"form-input",required:!0,onInput:e=>this.handleEmailInput("email",e)}),i("p",{id:"email-error",class:"s-user-profile-field-error"})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"international-mobile",class:"s-user-profile-field-label"},this.mobile_trans),i("salla-tel-input",{disabled:!this.isEditable,name:"international-mobile","country-code":this.userData.phone.country,phone:`${this.userData.phone.number}`,onPhoneEntered:e=>this.phoneNumberFieldEventHandler(e)}))),i("salla-button",{type:"submit",loading:this.disableAction,disabled:this.disableAction||!this.isEditable,"loader-position":"end",class:"s-user-profile-submit"},this.save_btn_trans))}};l.style="/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";export{l as salla_user_profile}
4
+ import{r as e,h as i}from"./p-Z_0e-eaG.js";import{G as s}from"./p-OF8QcbMM.js";const l=class{constructor(i){e(this,i),this.minAge=10,this.isEditable=!0,this.disableAction=!1,this.isLoading=!0,this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}connectedCallback(){this.langUnsubscribe=salla.lang.subscribe((()=>{this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}))}disconnectedCallback(){this.langUnsubscribe?.()}phoneNumberFieldEventHandler(e){e.detail.number?(this.userData.phone.number=Number.parseInt(e.detail.number),this.userData.phone.country=e.detail.country_code,this.disableAction=!1):this.disableAction=!0}handleFieldChange(e,i,s=!1){i.target.value?(this.userData[e]=i.target.value,this.disableAction=!1):s&&(this.disableAction=!0)}handleEmailInput(e,i){const s=document.getElementById("email-error"),l=i.target.value;if(!l)return this.disableAction=!0,void(s.textContent=this.email_required_trans);/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(l)||(this.disableAction=!0,s.textContent=this.invalid_email_trans),s.textContent="",this.userData[e]=l,this.disableAction=!1}submitForm(e){e.preventDefault(),this.disableAction=!0;const i=Object.assign({},this.userData);i.phone=void 0,i.phone=this.userData.phone.number,i.country_code=this.userData.phone.country,salla.api.profile.update(i).finally((()=>{this.disableAction=!1}))}getBirthDateRestriction(){const e=new Date,i=e.getFullYear()-this.minAge;return e.setFullYear(i),e}fetchData(){return salla.api.profile.info().then((e=>{this.userData=e.data})).finally((()=>{this.isLoading=!1,this.isEditable=!Salla.config.get("store.features").includes("sso-login")}))}renderLoadingSection(){return i("div",{class:"s-user-profile-skeleton-wrapper"},Array.from({length:6},((e,s)=>i("salla-skeleton",{class:"skeleton-item",width:"100%",height:"50px",key:s}))))}componentWillLoad(){Salla.onReady().then((()=>this.fetchData()))}render(){return this.isLoading?this.renderLoadingSection():i("form",{onSubmit:e=>this.submitForm(e)},i("div",{class:"s-user-profile-wrapper"},i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"first-name",class:"s-user-profile-field-label"},this.first_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"first_name",value:this.userData.first_name,id:"first-name",required:!0,autocomplete:"first_name",class:"form-input",onChange:e=>this.handleFieldChange("first_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"last-name",class:"s-user-profile-field-label"},this.last_name_trans),i("input",{disabled:!this.isEditable,type:"text",name:"last_name",value:this.userData.last_name,id:"last-name",required:!0,autocomplete:"last_name",class:"form-input",onChange:e=>this.handleFieldChange("last_name",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"birthday",class:"s-user-profile-field-label"},this.birthday_trans),i("salla-datetime-picker",{disabled:!this.isEditable,dateFormat:"Y-m-d",value:this.userData.birthday,placeholder:this.birthday_placeholder_trans,required:!0,maxDate:this.getBirthDateRestriction(),name:"birthday",onPicked:e=>this.handleFieldChange("birthday",e)})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"gender",class:"s-user-profile-field-label"},this.gender_trans),i("select",{disabled:!this.isEditable,class:"form-input",name:"gender",required:!0,onChange:e=>this.handleFieldChange("gender",e)},i("option",{value:""},this.gender_placeholder_trans),i("option",{value:s.Male,selected:this.userData.gender===s.Male},this.male_trans),i("option",{value:s.Female,selected:this.userData.gender===s.Female},this.female_trans))),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"email",class:"s-user-profile-field-label"},this.email_trans),i("input",{disabled:!this.isEditable,type:"email",name:"email",value:this.userData.email,id:"email",class:"form-input",required:!0,onInput:e=>this.handleEmailInput("email",e)}),i("p",{id:"email-error",class:"s-user-profile-field-error"})),i("div",{class:"s-user-profile-field"},i("label",{htmlFor:"international-mobile",class:"s-user-profile-field-label"},this.mobile_trans),i("salla-tel-input",{disabled:!this.isEditable,name:"international-mobile","country-code":this.userData.phone.country,phone:`${this.userData.phone.number}`,onPhoneEntered:e=>this.phoneNumberFieldEventHandler(e)}))),i("salla-button",{type:"submit",loading:this.disableAction,disabled:this.disableAction||!this.isEditable,"loader-position":"end",class:"s-user-profile-submit"},this.save_btn_trans))}};l.style="/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";export{l as salla_user_profile}