@salla.sa/twilight-components 2.14.259 → 2.14.260

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 (304) hide show
  1. package/dist/cjs/{app-globals-BaW1ktwu.js → app-globals-C-RMRzcr.js} +3 -3
  2. package/dist/cjs/{app-globals-BaW1ktwu.js.map → app-globals-C-RMRzcr.js.map} +1 -1
  3. package/dist/cjs/{index-BUbxVNrN.js → index-Cb0SQNc9.js} +4 -4
  4. package/dist/cjs/index-Cb0SQNc9.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion_4.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  39. package/dist/cjs/twilight.cjs.js +2 -2
  40. package/dist/components/index.js +2 -2
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/esm/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +3 -3
  43. package/dist/esm/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  44. package/dist/esm/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +4 -4
  45. package/dist/esm/index-DtlYcjlJ.js.map +1 -0
  46. package/dist/esm/loader.js +3 -3
  47. package/dist/esm/salla-accordion_4.entry.js +1 -1
  48. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  49. package/dist/esm/salla-advertisement.entry.js +1 -1
  50. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  51. package/dist/esm/salla-apps-icons.entry.js +1 -1
  52. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  53. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  54. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  55. package/dist/esm/salla-contacts.entry.js +1 -1
  56. package/dist/esm/salla-filters-widget.entry.js +1 -1
  57. package/dist/esm/salla-filters.entry.js +1 -1
  58. package/dist/esm/salla-installment.entry.js +1 -1
  59. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  60. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  61. package/dist/esm/salla-metadata.entry.js +1 -1
  62. package/dist/esm/salla-notification-item.entry.js +1 -1
  63. package/dist/esm/salla-notifications.entry.js +1 -1
  64. package/dist/esm/salla-offer.entry.js +1 -1
  65. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  66. package/dist/esm/salla-order-details.entry.js +1 -1
  67. package/dist/esm/salla-order-summary.entry.js +1 -1
  68. package/dist/esm/salla-orders.entry.js +1 -1
  69. package/dist/esm/salla-payments.entry.js +1 -1
  70. package/dist/esm/salla-price-range.entry.js +1 -1
  71. package/dist/esm/salla-product-options.entry.js +1 -1
  72. package/dist/esm/salla-review-card.entry.js +1 -1
  73. package/dist/esm/salla-reviews-page.entry.js +1 -1
  74. package/dist/esm/salla-reviews.entry.js +1 -1
  75. package/dist/esm/salla-social.entry.js +1 -1
  76. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  77. package/dist/esm/salla-tooltip.entry.js +1 -1
  78. package/dist/esm/salla-verify.entry.js +1 -1
  79. package/dist/esm/salla-wallet.entry.js +1 -1
  80. package/dist/esm/twilight.js +3 -3
  81. package/dist/esm-es5/{app-globals-wZyXu1Pt.js → app-globals-CYjWTTrt.js} +2 -2
  82. package/dist/esm-es5/{app-globals-wZyXu1Pt.js.map → app-globals-CYjWTTrt.js.map} +1 -1
  83. package/dist/esm-es5/{index-Dr_h0iSH.js → index-DtlYcjlJ.js} +3 -3
  84. package/dist/esm-es5/index-DtlYcjlJ.js.map +1 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/salla-accordion_4.entry.js +1 -1
  87. package/dist/esm-es5/salla-add-product-button_51.entry.js +4 -4
  88. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  89. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  90. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  91. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  92. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  93. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  94. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  95. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  96. package/dist/esm-es5/salla-filters.entry.js +1 -1
  97. package/dist/esm-es5/salla-installment.entry.js +1 -1
  98. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  99. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  100. package/dist/esm-es5/salla-metadata.entry.js +2 -2
  101. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  102. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  103. package/dist/esm-es5/salla-offer.entry.js +1 -1
  104. package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +1 -1
  105. package/dist/esm-es5/salla-order-details.entry.js +1 -1
  106. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  107. package/dist/esm-es5/salla-orders.entry.js +2 -2
  108. package/dist/esm-es5/salla-payments.entry.js +1 -1
  109. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  110. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  111. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  112. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  113. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  114. package/dist/esm-es5/salla-social.entry.js +1 -1
  115. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  116. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  117. package/dist/esm-es5/salla-verify.entry.js +1 -1
  118. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  119. package/dist/esm-es5/twilight.js +1 -1
  120. package/dist/twilight/{p-B3kEjtyr.system.js.map → p--178guyc.system.js.map} +1 -1
  121. package/dist/twilight/{p-3592b583.system.entry.js → p-007ca6d7.system.entry.js} +2 -2
  122. package/dist/twilight/{p-949a66c1.system.entry.js → p-0259d6cb.system.entry.js} +2 -2
  123. package/dist/twilight/{p-97dde580.system.entry.js → p-0303d452.system.entry.js} +2 -2
  124. package/dist/twilight/{p-d0ab3dbc.system.entry.js → p-04e33bba.system.entry.js} +2 -2
  125. package/dist/twilight/{p-6bde3b47.entry.js → p-099e8eb6.entry.js} +2 -2
  126. package/dist/twilight/{p-c1c17d0b.system.entry.js → p-0ba23365.system.entry.js} +2 -2
  127. package/dist/twilight/{p-e59edbdd.entry.js → p-109f5735.entry.js} +2 -2
  128. package/dist/twilight/{p-cd019bf1.system.entry.js → p-1362c93c.system.entry.js} +2 -2
  129. package/dist/twilight/{p-0769a6e0.entry.js → p-138b8ce7.entry.js} +2 -2
  130. package/dist/twilight/{p-db0cd840.entry.js → p-19061cec.entry.js} +2 -2
  131. package/dist/twilight/{p-ae051ea2.entry.js → p-1b42ce8a.entry.js} +2 -2
  132. package/dist/twilight/{p-d7304e82.entry.js → p-2323e473.entry.js} +2 -2
  133. package/dist/twilight/{p-0e3a43f5.system.entry.js → p-2bb3b70e.system.entry.js} +2 -2
  134. package/dist/twilight/{p-56770d90.system.entry.js → p-36b00bb1.system.entry.js} +3 -3
  135. package/dist/twilight/{p-7ec7d474.entry.js → p-385257e0.entry.js} +2 -2
  136. package/dist/twilight/{p-d52b8ce4.system.entry.js → p-39a319ec.system.entry.js} +2 -2
  137. package/dist/twilight/{p-0a6f1ffb.entry.js → p-3ad485dd.entry.js} +2 -2
  138. package/dist/twilight/{p-e3e75bed.entry.js → p-3ad79104.entry.js} +2 -2
  139. package/dist/twilight/{p-00dfddea.system.entry.js → p-3e960ee9.system.entry.js} +2 -2
  140. package/dist/twilight/{p-6154b6eb.entry.js → p-3f20e330.entry.js} +2 -2
  141. package/dist/twilight/{p-ae7b050f.system.entry.js → p-4cf011a4.system.entry.js} +2 -2
  142. package/dist/twilight/{p-e705ac16.system.entry.js → p-54a5d0ac.system.entry.js} +2 -2
  143. package/dist/twilight/{p-84c3941d.system.entry.js → p-55771cda.system.entry.js} +2 -2
  144. package/dist/twilight/{p-df3f649a.system.entry.js → p-57cfb4b1.system.entry.js} +2 -2
  145. package/dist/twilight/{p-b29ee431.entry.js → p-58768895.entry.js} +2 -2
  146. package/dist/twilight/{p-e5b92338.system.entry.js → p-5cb3dd8e.system.entry.js} +2 -2
  147. package/dist/twilight/{p-c0c81732.system.entry.js → p-5f352ca9.system.entry.js} +2 -2
  148. package/dist/twilight/{p-edbe1cac.system.entry.js → p-66464e8e.system.entry.js} +2 -2
  149. package/dist/twilight/{p-9cc55265.entry.js → p-6a611226.entry.js} +2 -2
  150. package/dist/twilight/{p-89a0da99.entry.js → p-6e1ecf18.entry.js} +2 -2
  151. package/dist/twilight/{p-ceb8da67.system.entry.js → p-7105480a.system.entry.js} +2 -2
  152. package/dist/twilight/{p-15554834.system.entry.js → p-784ee964.system.entry.js} +2 -2
  153. package/dist/twilight/{p-d7ec137d.system.entry.js → p-7dc3a160.system.entry.js} +2 -2
  154. package/dist/twilight/{p-c94aaea0.entry.js → p-7f20c85c.entry.js} +6 -6
  155. package/dist/twilight/{p-532b9b17.entry.js → p-83549a90.entry.js} +2 -2
  156. package/dist/twilight/{p-f84e2327.entry.js → p-862ad154.entry.js} +2 -2
  157. package/dist/twilight/{p-b0051f63.entry.js → p-939f9104.entry.js} +2 -2
  158. package/dist/twilight/{p-039346b8.system.entry.js → p-93e6452b.system.entry.js} +2 -2
  159. package/dist/twilight/{p-08d61ff2.entry.js → p-97cc91c4.entry.js} +2 -2
  160. package/dist/twilight/{p-228242f7.entry.js → p-9fa8d963.entry.js} +2 -2
  161. package/dist/twilight/{p-Dw8CTCni.system.js.map → p-B9diX3Ld.system.js.map} +1 -1
  162. package/dist/twilight/{p-ERq3kNfh.system.js.map → p-BNKx_fXu.system.js.map} +1 -1
  163. package/dist/twilight/{p-Bqwo1MhQ.system.js.map → p-BP64ZxhW.system.js.map} +1 -1
  164. package/dist/twilight/{p-D4hseaGD.system.js.map → p-BWbXuc8f.system.js.map} +1 -1
  165. package/dist/twilight/{p-DbYzV2HQ.system.js.map → p-Brt6MZMy.system.js.map} +1 -1
  166. package/dist/twilight/{p-BAr95b3n.system.js.map → p-Bx7mzn4-.system.js.map} +1 -1
  167. package/dist/twilight/{p-CHzuzHDL.system.js.map → p-C0zi3xso.system.js.map} +1 -1
  168. package/dist/twilight/{p-Cc8dkoHl.system.js.map → p-C25xo2I9.system.js.map} +1 -1
  169. package/dist/twilight/{p-7FnPac86.system.js.map → p-C3b5GFVP.system.js.map} +1 -1
  170. package/dist/twilight/{p-7jsBTJOk.system.js.map → p-C6nl4csu.system.js.map} +1 -1
  171. package/dist/twilight/{p-BlvvQJnI.system.js.map → p-C8JDkECr.system.js.map} +1 -1
  172. package/dist/twilight/{p-Dosz7Na1.system.js.map → p-C9OfFWmp.system.js.map} +1 -1
  173. package/dist/twilight/{p-Cf6u_xVH.system.js.map → p-CI_HtUC7.system.js.map} +1 -1
  174. package/dist/twilight/{p-COs3bEuH.system.js.map → p-CX4G4VV7.system.js.map} +1 -1
  175. package/dist/twilight/{p-D3plH8z9.system.js.map → p-C_tZ3UPA.system.js.map} +1 -1
  176. package/dist/twilight/{p-JsYArMQH.system.js.map → p-CdPxDxze.system.js.map} +1 -1
  177. package/dist/twilight/{p-BnsVGJir.system.js.map → p-Ch2ngfCk.system.js.map} +1 -1
  178. package/dist/twilight/{p-RygE2GKU.system.js.map → p-Cl6TP9Ol.system.js.map} +1 -1
  179. package/dist/twilight/{p-DeseX8V6.system.js.map → p-CvcXa2TU.system.js.map} +1 -1
  180. package/dist/twilight/{p-BfdixxaW.system.js.map → p-D0CcSuA9.system.js.map} +1 -1
  181. package/dist/twilight/{p-CVcJQx-E.system.js.map → p-D2T3kwP1.system.js.map} +1 -1
  182. package/dist/twilight/{p-BwJ_P_jJ.system.js → p-DF5hpYv8.system.js} +2 -2
  183. package/dist/twilight/{p-BwJ_P_jJ.system.js.map → p-DF5hpYv8.system.js.map} +1 -1
  184. package/dist/twilight/{p-KjQfyzJD.system.js.map → p-DG_xtA-f.system.js.map} +1 -1
  185. package/dist/twilight/{p-1fOf1jhv.system.js.map → p-DHzL55RC.system.js.map} +1 -1
  186. package/dist/twilight/{p-GfIPqLYs.system.js.map → p-DS9YDo5Q.system.js.map} +1 -1
  187. package/dist/twilight/{p-BZl5RHdf.system.js.map → p-DhIVzS4b.system.js.map} +1 -1
  188. package/dist/twilight/{p-BL8Qlvzz.system.js → p-DiFVtThr.system.js} +3 -3
  189. package/dist/twilight/p-DiFVtThr.system.js.map +1 -0
  190. package/dist/twilight/{p-DrLXNast.system.js.map → p-DqqqpQLX.system.js.map} +1 -1
  191. package/dist/twilight/{p-Dr_h0iSH.js → p-DtlYcjlJ.js} +3 -3
  192. package/dist/twilight/p-DtlYcjlJ.js.map +1 -0
  193. package/dist/twilight/{p-DZiCNWuJ.js → p-FCntN3lB.js} +2 -2
  194. package/dist/twilight/{p-DZiCNWuJ.js.map → p-FCntN3lB.js.map} +1 -1
  195. package/dist/twilight/{p-CpG6hlX3.system.js.map → p-NwP5WLUz.system.js.map} +1 -1
  196. package/dist/twilight/{p-D1nfm0gQ.system.js.map → p-UHVUEdWQ.system.js.map} +1 -1
  197. package/dist/twilight/{p-BBzKqD9K.system.js → p-_Zg_vfYO.system.js} +2 -2
  198. package/dist/twilight/{p-BBzKqD9K.system.js.map → p-_Zg_vfYO.system.js.map} +1 -1
  199. package/dist/twilight/{p-7c783b6c.entry.js → p-a80652d3.entry.js} +2 -2
  200. package/dist/twilight/{p-967da197.system.entry.js → p-b23ce243.system.entry.js} +2 -2
  201. package/dist/twilight/{p-9ee4ee16.system.entry.js → p-bcae7f12.system.entry.js} +2 -2
  202. package/dist/twilight/{p-e8e7d078.system.entry.js → p-c0072de1.system.entry.js} +3 -3
  203. package/dist/twilight/{p-e48ca56a.entry.js → p-c6a3fdb0.entry.js} +2 -2
  204. package/dist/twilight/{p-8e099efd.system.entry.js → p-c6fde185.system.entry.js} +2 -2
  205. package/dist/twilight/{p-12c89d39.system.entry.js → p-c94f95c1.system.entry.js} +2 -2
  206. package/dist/twilight/{p-9c7abe6a.entry.js → p-cbcfb963.entry.js} +2 -2
  207. package/dist/twilight/{p-e27633d6.system.entry.js → p-ce103d4c.system.entry.js} +2 -2
  208. package/dist/twilight/{p-da2c57dd.system.entry.js → p-d14a8edc.system.entry.js} +2 -2
  209. package/dist/twilight/{p-12dd0623.entry.js → p-d1809737.entry.js} +2 -2
  210. package/dist/twilight/{p-f032b94d.system.entry.js → p-d632f1fa.system.entry.js} +2 -2
  211. package/dist/twilight/{p-61fcba71.entry.js → p-d71d6dff.entry.js} +2 -2
  212. package/dist/twilight/{p-4eb654dc.system.entry.js → p-d8aab17c.system.entry.js} +2 -2
  213. package/dist/twilight/{p-00068e76.entry.js → p-db7a231b.entry.js} +2 -2
  214. package/dist/twilight/{p-96f8325a.system.entry.js → p-e0e29fb0.system.entry.js} +2 -2
  215. package/dist/twilight/{p-5dd3d1b7.entry.js → p-e1e90d0c.entry.js} +2 -2
  216. package/dist/twilight/{p-fce368f7.entry.js → p-e28d3b71.entry.js} +2 -2
  217. package/dist/twilight/{p-75c9e2c4.entry.js → p-e6d51e3a.entry.js} +2 -2
  218. package/dist/twilight/{p-16cb7a49.entry.js → p-ee66c0dd.entry.js} +2 -2
  219. package/dist/twilight/{p-a6e8e1e7.entry.js → p-ef04d7e0.entry.js} +2 -2
  220. package/dist/twilight/{p-510b1a2a.entry.js → p-f0dd4f76.entry.js} +2 -2
  221. package/dist/twilight/{p-7e9bec45.entry.js → p-f1d6fdbf.entry.js} +2 -2
  222. package/dist/twilight/{p-c7c91c45.system.entry.js → p-f2bac5d5.system.entry.js} +2 -2
  223. package/dist/twilight/p-f702aead.entry.js +5 -0
  224. package/dist/twilight/{p-63d10a9e.system.entry.js → p-fba0b0f7.system.entry.js} +2 -2
  225. package/dist/twilight/{p-Dh2Y37LB.system.js.map → p-hUWZ36QL.system.js.map} +1 -1
  226. package/dist/twilight/{p-4ae6httG.system.js.map → p-lKe9xnuY.system.js.map} +1 -1
  227. package/dist/twilight/{p-CH4ZFrh_.system.js.map → p-t6iSIvKc.system.js.map} +1 -1
  228. package/dist/twilight/{p-DYrmIHi5.system.js.map → p-xfMEaBec.system.js.map} +1 -1
  229. package/dist/twilight/{p-Dvmkrqbs.system.js.map → p-y6fipjol.system.js.map} +1 -1
  230. package/dist/twilight/twilight.esm.js +1 -1
  231. package/dist/twilight/twilight.js +1 -1
  232. package/package.json +5 -5
  233. package/dist/cjs/index-BUbxVNrN.js.map +0 -1
  234. package/dist/esm/index-Dr_h0iSH.js.map +0 -1
  235. package/dist/esm-es5/index-Dr_h0iSH.js.map +0 -1
  236. package/dist/twilight/p-BL8Qlvzz.system.js.map +0 -1
  237. package/dist/twilight/p-Dr_h0iSH.js.map +0 -1
  238. package/dist/twilight/p-dbe580d1.entry.js +0 -5
  239. /package/dist/twilight/{p-3592b583.system.entry.js.map → p-007ca6d7.system.entry.js.map} +0 -0
  240. /package/dist/twilight/{p-949a66c1.system.entry.js.map → p-0259d6cb.system.entry.js.map} +0 -0
  241. /package/dist/twilight/{p-97dde580.system.entry.js.map → p-0303d452.system.entry.js.map} +0 -0
  242. /package/dist/twilight/{p-d0ab3dbc.system.entry.js.map → p-04e33bba.system.entry.js.map} +0 -0
  243. /package/dist/twilight/{p-6bde3b47.entry.js.map → p-099e8eb6.entry.js.map} +0 -0
  244. /package/dist/twilight/{p-c1c17d0b.system.entry.js.map → p-0ba23365.system.entry.js.map} +0 -0
  245. /package/dist/twilight/{p-e59edbdd.entry.js.map → p-109f5735.entry.js.map} +0 -0
  246. /package/dist/twilight/{p-cd019bf1.system.entry.js.map → p-1362c93c.system.entry.js.map} +0 -0
  247. /package/dist/twilight/{p-0769a6e0.entry.js.map → p-138b8ce7.entry.js.map} +0 -0
  248. /package/dist/twilight/{p-db0cd840.entry.js.map → p-19061cec.entry.js.map} +0 -0
  249. /package/dist/twilight/{p-ae051ea2.entry.js.map → p-1b42ce8a.entry.js.map} +0 -0
  250. /package/dist/twilight/{p-d7304e82.entry.js.map → p-2323e473.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-0e3a43f5.system.entry.js.map → p-2bb3b70e.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-56770d90.system.entry.js.map → p-36b00bb1.system.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-7ec7d474.entry.js.map → p-385257e0.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-d52b8ce4.system.entry.js.map → p-39a319ec.system.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-0a6f1ffb.entry.js.map → p-3ad485dd.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-e3e75bed.entry.js.map → p-3ad79104.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-00dfddea.system.entry.js.map → p-3e960ee9.system.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-6154b6eb.entry.js.map → p-3f20e330.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-ae7b050f.system.entry.js.map → p-4cf011a4.system.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-e705ac16.system.entry.js.map → p-54a5d0ac.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-84c3941d.system.entry.js.map → p-55771cda.system.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-df3f649a.system.entry.js.map → p-57cfb4b1.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-b29ee431.entry.js.map → p-58768895.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-e5b92338.system.entry.js.map → p-5cb3dd8e.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-c0c81732.system.entry.js.map → p-5f352ca9.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-edbe1cac.system.entry.js.map → p-66464e8e.system.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-9cc55265.entry.js.map → p-6a611226.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-89a0da99.entry.js.map → p-6e1ecf18.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-ceb8da67.system.entry.js.map → p-7105480a.system.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-15554834.system.entry.js.map → p-784ee964.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-d7ec137d.system.entry.js.map → p-7dc3a160.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-c94aaea0.entry.js.map → p-7f20c85c.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-532b9b17.entry.js.map → p-83549a90.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-f84e2327.entry.js.map → p-862ad154.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-b0051f63.entry.js.map → p-939f9104.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-039346b8.system.entry.js.map → p-93e6452b.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-08d61ff2.entry.js.map → p-97cc91c4.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-228242f7.entry.js.map → p-9fa8d963.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-7c783b6c.entry.js.map → p-a80652d3.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-967da197.system.entry.js.map → p-b23ce243.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-9ee4ee16.system.entry.js.map → p-bcae7f12.system.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-e8e7d078.system.entry.js.map → p-c0072de1.system.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-e48ca56a.entry.js.map → p-c6a3fdb0.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-8e099efd.system.entry.js.map → p-c6fde185.system.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-12c89d39.system.entry.js.map → p-c94f95c1.system.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-9c7abe6a.entry.js.map → p-cbcfb963.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-e27633d6.system.entry.js.map → p-ce103d4c.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-da2c57dd.system.entry.js.map → p-d14a8edc.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-12dd0623.entry.js.map → p-d1809737.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-f032b94d.system.entry.js.map → p-d632f1fa.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-61fcba71.entry.js.map → p-d71d6dff.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-4eb654dc.system.entry.js.map → p-d8aab17c.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-00068e76.entry.js.map → p-db7a231b.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-96f8325a.system.entry.js.map → p-e0e29fb0.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-5dd3d1b7.entry.js.map → p-e1e90d0c.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-fce368f7.entry.js.map → p-e28d3b71.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-75c9e2c4.entry.js.map → p-e6d51e3a.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-16cb7a49.entry.js.map → p-ee66c0dd.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-a6e8e1e7.entry.js.map → p-ef04d7e0.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-510b1a2a.entry.js.map → p-f0dd4f76.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-7e9bec45.entry.js.map → p-f1d6fdbf.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-c7c91c45.system.entry.js.map → p-f2bac5d5.system.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-dbe580d1.entry.js.map → p-f702aead.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-63d10a9e.system.entry.js.map → p-fba0b0f7.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,a){function s(r){try{o(i.next(r))}catch(r){a(r)}}function u(r){try{o(i["throw"](r))}catch(r){a(r)}}function o(r){r.done?e(r.value):n(r.value).then(s,u)}o((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(t){return o([r,t])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;n=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=t.call(r,e)}catch(r){u=[6,r];n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++){if(a||!(i in t)){if(!a)a=Array.prototype.slice.call(t,0,i);a[i]=t[i]}}return r.concat(a||Array.prototype.slice.call(t))};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-BL8Qlvzz.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var z=M();var S=n(z);var j=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=S((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=C(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function C(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var q=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new j(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"f3b06307322a56ad320374a50e13161be4e7cc8a"},s("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},s("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},s("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());q.style=L}}}));
5
- //# sourceMappingURL=p-63d10a9e.system.entry.js.map
4
+ */System.register(["./p-DiFVtThr.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var S=M();var j=n(S);var C=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=z(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function z(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var F=":host{display:block}";var L=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new C(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"f3b06307322a56ad320374a50e13161be4e7cc8a"},s("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},s("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},s("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());L.style=F}}}));
5
+ //# sourceMappingURL=p-fba0b0f7.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-Dh2Y37LB.system.js","sources":["src/components/salla-filters/salla-filters.scss?tag=salla-filters","src/components/salla-filters/salla-filters.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.s-rating-stars-small {\n line-height: 12px;\n}\n.s-filters-radio{\n background-image: none !important;\n}","import { Component, Element, h, Event, EventEmitter, Host, Method, Prop, State } from '@stencil/core';\nimport { Filter, FilterOptionTypes } from \"./interfaces\";\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-filters',\n styleUrl: 'salla-filters.scss',\n})\nexport class SallaFilters {\n\n constructor() {\n salla.event.on('filters::hidden', () => this.host.style.display = 'none');\n\n salla.lang.onLoaded(() => {\n this.apply = salla.lang.get('pages.checkout.apply');\n this.reset = salla.lang.get('pages.categories.filters_reset');\n });\n\n salla.event.on('filters::fetched', ({ filters }) => {\n this.host.style.display = '';\n let freshFilterData: any = {};\n this.filters = filters\n .map((filter: Filter) => {\n filter.label = {\n category_id: salla.lang.get('common.titles.categories'),\n brand_id: salla.lang.get('common.titles.brands'),\n rating: salla.lang.get('pages.categories.filter_rating'),\n price: salla.lang.get('pages.categories.filter_price'),\n }[filter.key] || filter.label;\n // filter.type = FilterOptionTypes.VALUES;\n if (filter.key == 'rating') {\n filter.type = FilterOptionTypes.VALUES;\n //@ts-ignore\n let { max, min } = filter.values;\n //@ts-ignore\n filter.values = [5, 4, 3, 2, 1].filter(stars => stars >= min || stars <= max)\n }\n if (this.filtersData.variants && filter.type == FilterOptionTypes.VARIANTS) {\n freshFilterData.variants = this.filtersData.variants;\n }\n if (this.filtersData[filter.key] && filter.type !== FilterOptionTypes.VARIANTS) {\n freshFilterData[filter.key] = this.filtersData[filter.key];\n }\n let searchParams = new URLSearchParams(window.location.search);\n let hasFilters = false;\n for (let key of searchParams.keys()) {\n if (key.includes('filters')) {\n hasFilters = true;\n break; // No need to continue checking once a match is found\n }\n }\n if (salla.config.get('page.slug') == \"product.index\" && Object.keys(freshFilterData).length == 0 && !hasFilters) {\n // Append the current category to the url if there are no pre-selected filters\n let currentUrl = window.location.href;\n let filterValue = salla.config.get('page.id');\n let separator = currentUrl.indexOf('?') !== -1 ? '&' : '?';\n let newUrl = currentUrl + separator + 'filters[category_id]=' + filterValue;\n freshFilterData.category_id = filterValue;\n window.history.pushState({ path: newUrl }, '', newUrl);\n }\n return filter;\n });\n this.filtersData = freshFilterData;\n this.host.childNodes.forEach(async (widget: HTMLSallaFiltersWidgetElement) => widget.setWidgetHeight && await widget.setWidgetHeight())\n });\n }\n\n async componentWillLoad() {\n try {\n const searchParams = new URLSearchParams(window.location.search);\n this.filtersData = await Helper.extractFiltersFromUrl(searchParams);\n } catch (e) {\n console.warn('failed to get filters from URL', e.message);\n }\n }\n\n\n @Element() host: HTMLElement;\n\n /**\n * Array of filter options\n */\n @Prop({ reflect: true, mutable: true }) filters?: Filter[];\n\n private isReady = false;//to avoid triggering the changed event\n\n @State() isSidebarOpen: boolean;\n @State() filtersData: object | any = {}\n @State() apply: string;\n @State() reset: string;\n\n /**\n * Custom event fired when the selected filters are changed.\n */\n @Event() changed: EventEmitter;\n\n /**\n * Method to get filter data.\n */\n @Method()\n async getFilters() {\n return this.filtersData;\n }\n\n /**\n * Apply filter action.\n */\n @Method()\n async applyFilters() {\n if (!this.isReady) {\n return;\n }\n let hasFilters = Object.keys(this.filtersData).length > 0;\n setTimeout(() => {\n if (hasFilters) {\n let url = new URL(window.location.href);\n for (const [key] of url.searchParams.entries()) {\n if (key.startsWith(\"filters\")) {\n url.searchParams.delete(key);\n }\n }\n let encodedFilterValues = this.encodeFilters(this.filtersData)\n let sanitizedFilterValues = url.search.split(\"&\").filter(item => !item.includes('filters')).join(\"&\")\n if (sanitizedFilterValues) {\n url.search = url.search.split(\"&filters\")[0] + \"&\" + encodedFilterValues\n } else {\n url.search = `?${encodedFilterValues}`\n }\n window.history.pushState({}, '', url.href);\n }\n else {\n let url = new URL(window.location.href);\n url.searchParams?.delete('filters');\n window.history.pushState({}, '', url.toString());\n }\n salla.event.emit('salla-filters::changed', this.filtersData);\n this.changed.emit(this.filtersData);\n }, 300);\n }\n\n\n private encodeFilters(filters, parentKey = 'filters') {\n const encodedFilters = [];\n\n for (const key in filters) {\n if (Object.prototype.hasOwnProperty.call(filters, key)) {\n const value = filters[key];\n\n const fullKey = parentKey ? `${parentKey}[${key}]` : key;\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n encodedFilters.push(`${fullKey}[${i}]=${value[i]}`)\n }\n }\n else if (typeof value === 'object' && value !== null) {\n encodedFilters.push(this.encodeFilters(value, fullKey));\n } else {\n // const encodedKey = encodeURIComponent(fullKey);\n // const encodedValue = encodeURIComponent(value);\n let result = `${fullKey}=${value}`\n encodedFilters.push(result);\n }\n }\n }\n return encodedFilters.join('&');\n };\n\n /**\n * Reset selected filters.\n */\n @Method()\n async resetFilters() {\n this.removeFiltersQueryParams()\n this.filtersData = {};\n this.host.childNodes.forEach((widget: HTMLSallaFiltersWidgetElement) => widget.reset && widget.reset())\n salla.event.emit('salla-filters::reset');\n return this.applyFilters();\n }\n\n private removeFiltersQueryParams() {\n const searchParams = new URLSearchParams(window.location.search);\n\n const newUrl = Array.from(searchParams.keys())\n .filter(key => !key.startsWith('filters['))\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(searchParams.get(key))}`)\n .join('&');\n\n const finalUrl = newUrl ? `${window.location.pathname}?${newUrl}` : window.location.pathname;\n window.history.pushState({}, '', finalUrl);\n }\n\n /**\n * @param {{target:HTMLInputElement}} event\n * @param option\n * @param value\n * @private\n */\n private handleOptionChange(event, option: Filter, value) {\n if (option.type === FilterOptionTypes.RANGE) {\n this.filtersData[option.key] = value;\n\n }\n let isChecked = event.target.checked;\n\n if (option.type === FilterOptionTypes.VARIANTS) {\n this.filtersData.variants = this.filtersData.variants || {};\n isChecked && (this.filtersData.variants[option.key] = value);\n isChecked || (delete this.filtersData.variants[option.key]);\n }\n\n else if (event.target.type == \"radio\") {\n isChecked && (this.filtersData[option.key] = value);\n isChecked || (delete this.filtersData[option.key]);\n }\n\n //it's checkbox\n // add if condition to avoid error when the filter is not existed in the filtersData\n else if (event.target.type == \"checkbox\") {\n this.filtersData[option.key] = this.filtersData[option.key] || [];\n if (isChecked) {\n this.filtersData[option.key].push(value);\n\n }\n this.filtersData[option.key] = this.filtersData[option.key].filter(val => val != value);\n }\n this.applyFilters();\n }\n\n\n\n render() {\n return <Host>\n {this.filters?.map(option => <salla-filters-widget\n option={option}\n filtersData={this.filtersData}\n onChanged={({ detail: { event, option, value } }) => {\n this.handleOptionChange(event, option, value)\n }} />)}\n\n {this.filters?.length ? <div class=\"s-filters-footer\">\n {/* <salla-button color='primary' onClick={() => this.applyFilters()}>{this.apply}</salla-button> */}\n <salla-button color='gray' fill='outline' onClick={() => this.reset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,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,KAAK,CAAC;;cAEzF,IAAI,CAAC,YAAY,EAAE;;UAKrB,MAAM,GAAA;;MACJ,QAAA,OAAO,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACT,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA;MAAE,YAAA,EAAA,CAAA,GAAG,CAAC,MAAM,IAAI,CAAA,CAAA,sBAAA,EAAA,EAC3B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAI;0BAClD,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;MAC/C,iBAAC,GAAI,CAAC,EAEP,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,MAAM,IAAG,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,kBAAkB,EAAA,EAEnD,CAAA,CAAA,cAAA,EAAA,EAAc,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAA,EAAG,IAAI,CAAC,KAAK,CAAgB,CACrG,GAAG,EAAE,CACN;;UAGT,gBAAgB,GAAA;MACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;;;;;;;;;;;"}
1
+ {"version":3,"file":"p-hUWZ36QL.system.js","sources":["src/components/salla-filters/salla-filters.scss?tag=salla-filters","src/components/salla-filters/salla-filters.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.s-rating-stars-small {\n line-height: 12px;\n}\n.s-filters-radio{\n background-image: none !important;\n}","import { Component, Element, h, Event, EventEmitter, Host, Method, Prop, State } from '@stencil/core';\nimport { Filter, FilterOptionTypes } from \"./interfaces\";\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-filters',\n styleUrl: 'salla-filters.scss',\n})\nexport class SallaFilters {\n\n constructor() {\n salla.event.on('filters::hidden', () => this.host.style.display = 'none');\n\n salla.lang.onLoaded(() => {\n this.apply = salla.lang.get('pages.checkout.apply');\n this.reset = salla.lang.get('pages.categories.filters_reset');\n });\n\n salla.event.on('filters::fetched', ({ filters }) => {\n this.host.style.display = '';\n let freshFilterData: any = {};\n this.filters = filters\n .map((filter: Filter) => {\n filter.label = {\n category_id: salla.lang.get('common.titles.categories'),\n brand_id: salla.lang.get('common.titles.brands'),\n rating: salla.lang.get('pages.categories.filter_rating'),\n price: salla.lang.get('pages.categories.filter_price'),\n }[filter.key] || filter.label;\n // filter.type = FilterOptionTypes.VALUES;\n if (filter.key == 'rating') {\n filter.type = FilterOptionTypes.VALUES;\n //@ts-ignore\n let { max, min } = filter.values;\n //@ts-ignore\n filter.values = [5, 4, 3, 2, 1].filter(stars => stars >= min || stars <= max)\n }\n if (this.filtersData.variants && filter.type == FilterOptionTypes.VARIANTS) {\n freshFilterData.variants = this.filtersData.variants;\n }\n if (this.filtersData[filter.key] && filter.type !== FilterOptionTypes.VARIANTS) {\n freshFilterData[filter.key] = this.filtersData[filter.key];\n }\n let searchParams = new URLSearchParams(window.location.search);\n let hasFilters = false;\n for (let key of searchParams.keys()) {\n if (key.includes('filters')) {\n hasFilters = true;\n break; // No need to continue checking once a match is found\n }\n }\n if (salla.config.get('page.slug') == \"product.index\" && Object.keys(freshFilterData).length == 0 && !hasFilters) {\n // Append the current category to the url if there are no pre-selected filters\n let currentUrl = window.location.href;\n let filterValue = salla.config.get('page.id');\n let separator = currentUrl.indexOf('?') !== -1 ? '&' : '?';\n let newUrl = currentUrl + separator + 'filters[category_id]=' + filterValue;\n freshFilterData.category_id = filterValue;\n window.history.pushState({ path: newUrl }, '', newUrl);\n }\n return filter;\n });\n this.filtersData = freshFilterData;\n this.host.childNodes.forEach(async (widget: HTMLSallaFiltersWidgetElement) => widget.setWidgetHeight && await widget.setWidgetHeight())\n });\n }\n\n async componentWillLoad() {\n try {\n const searchParams = new URLSearchParams(window.location.search);\n this.filtersData = await Helper.extractFiltersFromUrl(searchParams);\n } catch (e) {\n console.warn('failed to get filters from URL', e.message);\n }\n }\n\n\n @Element() host: HTMLElement;\n\n /**\n * Array of filter options\n */\n @Prop({ reflect: true, mutable: true }) filters?: Filter[];\n\n private isReady = false;//to avoid triggering the changed event\n\n @State() isSidebarOpen: boolean;\n @State() filtersData: object | any = {}\n @State() apply: string;\n @State() reset: string;\n\n /**\n * Custom event fired when the selected filters are changed.\n */\n @Event() changed: EventEmitter;\n\n /**\n * Method to get filter data.\n */\n @Method()\n async getFilters() {\n return this.filtersData;\n }\n\n /**\n * Apply filter action.\n */\n @Method()\n async applyFilters() {\n if (!this.isReady) {\n return;\n }\n let hasFilters = Object.keys(this.filtersData).length > 0;\n setTimeout(() => {\n if (hasFilters) {\n let url = new URL(window.location.href);\n for (const [key] of url.searchParams.entries()) {\n if (key.startsWith(\"filters\")) {\n url.searchParams.delete(key);\n }\n }\n let encodedFilterValues = this.encodeFilters(this.filtersData)\n let sanitizedFilterValues = url.search.split(\"&\").filter(item => !item.includes('filters')).join(\"&\")\n if (sanitizedFilterValues) {\n url.search = url.search.split(\"&filters\")[0] + \"&\" + encodedFilterValues\n } else {\n url.search = `?${encodedFilterValues}`\n }\n window.history.pushState({}, '', url.href);\n }\n else {\n let url = new URL(window.location.href);\n url.searchParams?.delete('filters');\n window.history.pushState({}, '', url.toString());\n }\n salla.event.emit('salla-filters::changed', this.filtersData);\n this.changed.emit(this.filtersData);\n }, 300);\n }\n\n\n private encodeFilters(filters, parentKey = 'filters') {\n const encodedFilters = [];\n\n for (const key in filters) {\n if (Object.prototype.hasOwnProperty.call(filters, key)) {\n const value = filters[key];\n\n const fullKey = parentKey ? `${parentKey}[${key}]` : key;\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n encodedFilters.push(`${fullKey}[${i}]=${value[i]}`)\n }\n }\n else if (typeof value === 'object' && value !== null) {\n encodedFilters.push(this.encodeFilters(value, fullKey));\n } else {\n // const encodedKey = encodeURIComponent(fullKey);\n // const encodedValue = encodeURIComponent(value);\n let result = `${fullKey}=${value}`\n encodedFilters.push(result);\n }\n }\n }\n return encodedFilters.join('&');\n };\n\n /**\n * Reset selected filters.\n */\n @Method()\n async resetFilters() {\n this.removeFiltersQueryParams()\n this.filtersData = {};\n this.host.childNodes.forEach((widget: HTMLSallaFiltersWidgetElement) => widget.reset && widget.reset())\n salla.event.emit('salla-filters::reset');\n return this.applyFilters();\n }\n\n private removeFiltersQueryParams() {\n const searchParams = new URLSearchParams(window.location.search);\n\n const newUrl = Array.from(searchParams.keys())\n .filter(key => !key.startsWith('filters['))\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(searchParams.get(key))}`)\n .join('&');\n\n const finalUrl = newUrl ? `${window.location.pathname}?${newUrl}` : window.location.pathname;\n window.history.pushState({}, '', finalUrl);\n }\n\n /**\n * @param {{target:HTMLInputElement}} event\n * @param option\n * @param value\n * @private\n */\n private handleOptionChange(event, option: Filter, value) {\n if (option.type === FilterOptionTypes.RANGE) {\n this.filtersData[option.key] = value;\n\n }\n let isChecked = event.target.checked;\n\n if (option.type === FilterOptionTypes.VARIANTS) {\n this.filtersData.variants = this.filtersData.variants || {};\n isChecked && (this.filtersData.variants[option.key] = value);\n isChecked || (delete this.filtersData.variants[option.key]);\n }\n\n else if (event.target.type == \"radio\") {\n isChecked && (this.filtersData[option.key] = value);\n isChecked || (delete this.filtersData[option.key]);\n }\n\n //it's checkbox\n // add if condition to avoid error when the filter is not existed in the filtersData\n else if (event.target.type == \"checkbox\") {\n this.filtersData[option.key] = this.filtersData[option.key] || [];\n if (isChecked) {\n this.filtersData[option.key].push(value);\n\n }\n this.filtersData[option.key] = this.filtersData[option.key].filter(val => val != value);\n }\n this.applyFilters();\n }\n\n\n\n render() {\n return <Host>\n {this.filters?.map(option => <salla-filters-widget\n option={option}\n filtersData={this.filtersData}\n onChanged={({ detail: { event, option, value } }) => {\n this.handleOptionChange(event, option, value)\n }} />)}\n\n {this.filters?.length ? <div class=\"s-filters-footer\">\n {/* <salla-button color='primary' onClick={() => this.applyFilters()}>{this.apply}</salla-button> */}\n <salla-button color='gray' fill='outline' onClick={() => this.resetFilters()}>{this.reset}</salla-button>\n </div> : ''}\n </Host>;\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,eAAe,GAAG,+GAA+G;;YCO1H,YAAY,4BAAA,MAAA;MAEvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA0EQ,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC;MAGf,QAAA,IAAW,CAAA,WAAA,GAAiB,EAAE;cA5ErC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;MAEzE,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;kBACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC;kBACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC;MAC/D,SAAC,CAAC;MAEF,QAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAI;kBACjD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE;kBAC5B,IAAI,eAAe,GAAQ,EAAE;kBA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,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAA,EAAG,IAAI,CAAC,KAAK,CAAgB,CACrG,GAAG,EAAE,CACN;;UAGT,gBAAgB,GAAA;MACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"p-4ae6httG.system.js","sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\",\n SpecialPrice = \"special_price\",\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n discounted_amount: any;\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\" | \"order\";\n discount_value: number;\n ends_at: string;\n min_items: number;\n min_spend: number;\n show_price_after_discount: boolean;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n discount_value: number;\n discount_type: string;\n minimum_spend: number;\n payments: string[];\n}\n\nexport interface SpecialPriceDetail {\n apply_to: \"product\" | \"category\";\n discount_value: number;\n ends_at: number;\n min_items: number; \n min_spend: number;\n targets: Array<string | number>;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail | SpecialPriceDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer,SpecialPriceDetail, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n *\n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.multipleBankOfferTitleText = salla.lang.get('pages.offer.multiple_bank_offers_title');\n this.multipleBankOfferTitleDescription = salla.lang.get('pages.offer.multiple_bank_offers_message');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n this.userCurrency = salla.config.get('currencies')[salla.config.get('user.currency_code')].symbol\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n @State() showOffer: boolean = salla.config.get('store.settings.product.show_special_offers');\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() multipleBankOfferTitleText: string = salla.lang.get('pages.offer.multiple_bank_offers_title')\n @State() multipleBankOfferTitleDescription: string = salla.lang.get('pages.offer.multiple_bank_offers_message')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private async getEndpointByPageName(): Promise<string> {\n if (this.currentPage == PageType.Cart) {\n const cartId = await Salla.cart.getCurrentCartId();\n return `offers/cart/${cartId}`;\n }\n\n if (this.currentPage == PageType.ProductDetail) {\n return `offers/product/${salla.config.get('page.id')}`;\n }\n\n return \"offers\";\n }\n\n /**\n * Emits a promotion viewed event for analytics tracking\n */\n private emitPromotionViewed(): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: 1 \n };\n \n salla.event.emit('promotion::viewed', [promotionData]);\n }\n /**\n * Emits a promotion clicked event\n */\n private emitPromotionClicked(position: number = 1): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: position\n };\n \n salla.event.emit('promotion::clicked', [promotionData]);\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n // let offers = this.getOffersFromStorage();\n // if (offers) {\n // return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n // }\n\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => {\n this.showOffer = !salla.url.is_page('product.single') || salla.config.get('store.settings.product.show_special_offers')\n if (this.showOffer) {\n return;\n }\n throw new Error(\"Merchant disabled showing the offers on product page\");\n }\n )\n .then(async () => salla.api.request(await this.getEndpointByPageName()))\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.SpecialPrice,OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n\n //if it's special price offer\n if (offer.type === OfferType.SpecialPrice) {\n const details = offer.details as SpecialPriceDetail;\n\n return details.apply_to === 'product'\n // Avoid additional requests; use `salla-products-slider` and pass the custom card\n ? salla.product.api.fetch({ source: \"selected\", source_value: details.targets})\n .then((response: any) => {\n (offer.details as any).products = response.data; // Set the fetched products\n return this.offersList = [offer];\n })\n : salla.product.api.categories() // Fetch all categories in one query\n .then((res) => {\n const categoriesToRender = this.findCategories(res.data, details.targets); // Extract only the selected categories\n (offer.details as any).categories = categoriesToRender;\n return this.offersList = [offer];\n });\n }\n\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n .catch((error) => {\n salla.logger.warn(error)\n });\n }\n\n componentDidLoad() {\n let nav = this.host.querySelector('.s-slider-block__title-nav');\n nav?.classList.add(\"s-offer-bank-payment-nav\")\n this.emitPromotionViewed();\n }\n\n \n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n try {\n const pageSlug = salla.config.get('page.slug').replace('.', '_');\n const locale = salla.lang.getLocale();\n const currencyCode = salla.config.currency().code;\n\n if (!pageSlug || !locale || !currencyCode) {\n throw new Error('Unable to get the storage key.');\n }\n\n return `s-offers-${pageSlug}-${salla.config.get('page.id')}-${locale}-${currencyCode}`;\n } catch (error) {\n return '';\n }\n }\n\n //@ts-ignore\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n // Check if the offers list is empty or if the component is not ready to render\n if (!this.offersList.length || !this.canRender || !this.showOffer) return null;\n const offer: Offer = this.offersList[0];\n\n const blockTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleText : null) : offer.title;\n const blockSubTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleDescription : null) : offer.description;\n\n const titles = {\n 'block-title': blockTitle,\n 'block-subTitle': blockSubTitle,\n 'show-controls': this.isMultipleBank\n };\n\n return (\n <div class=\"s-offer-wrapper\" onClick={() => this.emitPromotionClicked()}>\n {<p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.SpecialPrice) {\n return this.renderSpecialPriceSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n *\n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) => {\n return <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {`${this.product_discount_text} ${(bankOffer.details as BankOffer).discount_value}${(bankOffer.details as BankOffer).discount_type === \"percentage\" && '%'}`}\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p innerHTML={this.generateBankDescription(this.offersList[0].description, (bankOffer.details as BankOffer).discount_value)}></p>\n </div>\n : \"\"}\n </div>\n })\n }\n\n private generateBankDescription(desc: string, value): string {\n return desc.replace(new RegExp(`${value} %`), `<span class=\"s-offer-bank-message-amount\">${value} %</span>`)\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n const offer: Offer = this.offersList[0];\n let show_discounted_price = (offer.details as DiscountDetailTable).show_price_after_discount;\n return (this.offersList[0].details as DiscountDetailTable).discounts?.map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{discount.discounted_amount}</span> <span>{this.userCurrency}</span>\n </div> : \"\"}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}{!!discount.percentage && '%'}</span>)</p>\n </div>\n </div>\n )\n }\n\n private renderSpecialPriceSection() {\n const details = this.offersList[0].details as SpecialPriceDetail;\n\n return [\n // Render products if `apply_to` is \"product\"\n details.apply_to === \"product\" &&\n details.products?.map((product:Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n\n // Render categories if `apply_to` is \"category\"\n details.apply_to === \"category\" &&\n details.categories?.map((category: Category) => this.getCategoriesSection(category)),\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;YAAA,IAAY,QAGX;YAHD,CAAA,UAAY,QAAQ,EAAA;YAClB,IAAA,QAAA,CAAA,eAAA,CAAA,GAAA,gBAAgC;YAChC,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACf,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAGnB,EAAA,CAAA,CAAA;YAED,IAAY,SAOX;YAPD,CAAA,UAAY,SAAS,EAAA;YACnB,IAAA,SAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;YAC3B,IAAA,SAAA,CAAA,mBAAA,CAAA,GAAA,OAA2B;YAC3B,IAAA,SAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC;YAClC,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACb,IAAA,SAAA,C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rH,GAAG,EAAE,CACT,EACN,CAAG,CAAA,GAAA,EAAA,EAAA,KAAK,EAAC,gDAAgD,EAAA,EAAE,IAAI,CAAC,kBAAkB,OAC/E,CAAA,CAAA,MAAA,EAAA,IAAA,EAAO,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,IAAI,GAAG,CAAQ,MAAK,CACpE,CACF,CACL;;gBAGK,yBAAyB,GAAA;;oBAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAA6B;oBAEhE,OAAO;;wBAEL,OAAO,CAAC,QAAQ,KAAK,SAAS;6BAC9B,CAAA,EAAA,GAAA,OAAO,CAAC,QAAQ,0CAAE,GAAG,CAAC,CAAC,OAAe,MACpC,WAAK,KAAK,EAAC,0BAA0B,EAClC,EAAA,IAAI,CAAC;YACJ,sBAAE,EAAC,IAAI,CAAC,oBAAoB,EAAC,EAAA,OAAO,EAAE,OAAO,EAA8B;YAC3E,sBAAE,mDAAoC,OAAO,EAAE,OAAO,EAAuB,CAAA,CAC3E,CACP,CAAC,CAAA;;wBAGF,OAAO,CAAC,QAAQ,KAAK,UAAU;YAC/B,iBAAA,CAAA,EAAA,GAAA,OAAO,CAAC,UAAU,0CAAE,GAAG,CAAC,CAAC,QAAkB,KAAK,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAA;qBACrF;;;;;;;;;;;;"}
1
+ {"version":3,"file":"p-lKe9xnuY.system.js","sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\",\n SpecialPrice = \"special_price\",\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n discounted_amount: any;\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\" | \"order\";\n discount_value: number;\n ends_at: string;\n min_items: number;\n min_spend: number;\n show_price_after_discount: boolean;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n discount_value: number;\n discount_type: string;\n minimum_spend: number;\n payments: string[];\n}\n\nexport interface SpecialPriceDetail {\n apply_to: \"product\" | \"category\";\n discount_value: number;\n ends_at: number;\n min_items: number; \n min_spend: number;\n targets: Array<string | number>;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail | SpecialPriceDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer,SpecialPriceDetail, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n *\n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.multipleBankOfferTitleText = salla.lang.get('pages.offer.multiple_bank_offers_title');\n this.multipleBankOfferTitleDescription = salla.lang.get('pages.offer.multiple_bank_offers_message');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n this.userCurrency = salla.config.get('currencies')[salla.config.get('user.currency_code')].symbol\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n @State() showOffer: boolean = salla.config.get('store.settings.product.show_special_offers');\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() multipleBankOfferTitleText: string = salla.lang.get('pages.offer.multiple_bank_offers_title')\n @State() multipleBankOfferTitleDescription: string = salla.lang.get('pages.offer.multiple_bank_offers_message')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private async getEndpointByPageName(): Promise<string> {\n if (this.currentPage == PageType.Cart) {\n const cartId = await Salla.cart.getCurrentCartId();\n return `offers/cart/${cartId}`;\n }\n\n if (this.currentPage == PageType.ProductDetail) {\n return `offers/product/${salla.config.get('page.id')}`;\n }\n\n return \"offers\";\n }\n\n /**\n * Emits a promotion viewed event for analytics tracking\n */\n private emitPromotionViewed(): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: 1 \n };\n \n salla.event.emit('promotion::viewed', [promotionData]);\n }\n /**\n * Emits a promotion clicked event\n */\n private emitPromotionClicked(position: number = 1): void {\n if(!(this.offersList.length && this.canRender && this.showOffer)) return;\n \n // Transform offer data to match analytics expectations\n const promotionData = {\n id: this.offersList[0].id,\n name: this.offersList[0].title,\n creative: this.offersList[0].description || '',\n position: position\n };\n \n salla.event.emit('promotion::clicked', [promotionData]);\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n // let offers = this.getOffersFromStorage();\n // if (offers) {\n // return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n // }\n\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => {\n this.showOffer = !salla.url.is_page('product.single') || salla.config.get('store.settings.product.show_special_offers')\n if (this.showOffer) {\n return;\n }\n throw new Error(\"Merchant disabled showing the offers on product page\");\n }\n )\n .then(async () => salla.api.request(await this.getEndpointByPageName()))\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.SpecialPrice,OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n\n //if it's special price offer\n if (offer.type === OfferType.SpecialPrice) {\n const details = offer.details as SpecialPriceDetail;\n\n return details.apply_to === 'product'\n // Avoid additional requests; use `salla-products-slider` and pass the custom card\n ? salla.product.api.fetch({ source: \"selected\", source_value: details.targets})\n .then((response: any) => {\n (offer.details as any).products = response.data; // Set the fetched products\n return this.offersList = [offer];\n })\n : salla.product.api.categories() // Fetch all categories in one query\n .then((res) => {\n const categoriesToRender = this.findCategories(res.data, details.targets); // Extract only the selected categories\n (offer.details as any).categories = categoriesToRender;\n return this.offersList = [offer];\n });\n }\n\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n .catch((error) => {\n salla.logger.warn(error)\n });\n }\n\n componentDidLoad() {\n let nav = this.host.querySelector('.s-slider-block__title-nav');\n nav?.classList.add(\"s-offer-bank-payment-nav\")\n this.emitPromotionViewed();\n }\n\n \n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n try {\n const pageSlug = salla.config.get('page.slug').replace('.', '_');\n const locale = salla.lang.getLocale();\n const currencyCode = salla.config.currency().code;\n\n if (!pageSlug || !locale || !currencyCode) {\n throw new Error('Unable to get the storage key.');\n }\n\n return `s-offers-${pageSlug}-${salla.config.get('page.id')}-${locale}-${currencyCode}`;\n } catch (error) {\n return '';\n }\n }\n\n //@ts-ignore\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n // Check if the offers list is empty or if the component is not ready to render\n if (!this.offersList.length || !this.canRender || !this.showOffer) return null;\n const offer: Offer = this.offersList[0];\n\n const blockTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleText : null) : offer.title;\n const blockSubTitle = this.isBankOffer ? (this.isMultipleBank ? this.multipleBankOfferTitleDescription : null) : offer.description;\n\n const titles = {\n 'block-title': blockTitle,\n 'block-subTitle': blockSubTitle,\n 'show-controls': this.isMultipleBank\n };\n\n return (\n <div class=\"s-offer-wrapper\" onClick={() => this.emitPromotionClicked()}>\n {<p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.SpecialPrice) {\n return this.renderSpecialPriceSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n *\n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) => {\n return <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {`${this.product_discount_text} ${(bankOffer.details as BankOffer).discount_value}${(bankOffer.details as BankOffer).discount_type === \"percentage\" && '%'}`}\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p innerHTML={this.generateBankDescription(this.offersList[0].description, (bankOffer.details as BankOffer).discount_value)}></p>\n </div>\n : \"\"}\n </div>\n })\n }\n\n private generateBankDescription(desc: string, value): string {\n return desc.replace(new RegExp(`${value} %`), `<span class=\"s-offer-bank-message-amount\">${value} %</span>`)\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n const offer: Offer = this.offersList[0];\n let show_discounted_price = (offer.details as DiscountDetailTable).show_price_after_discount;\n return (this.offersList[0].details as DiscountDetailTable).discounts?.map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{discount.discounted_amount}</span> <span>{this.userCurrency}</span>\n </div> : \"\"}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}{!!discount.percentage && '%'}</span>)</p>\n </div>\n </div>\n )\n }\n\n private renderSpecialPriceSection() {\n const details = this.offersList[0].details as SpecialPriceDetail;\n\n return [\n // Render products if `apply_to` is \"product\"\n details.apply_to === \"product\" &&\n details.products?.map((product:Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n\n // Render categories if `apply_to` is \"category\"\n details.apply_to === \"category\" &&\n details.categories?.map((category: Category) => this.getCategoriesSection(category)),\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;YAAA,IAAY,QAGX;YAHD,CAAA,UAAY,QAAQ,EAAA;YAClB,IAAA,QAAA,CAAA,eAAA,CAAA,GAAA,gBAAgC;YAChC,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACf,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAGnB,EAAA,CAAA,CAAA;YAED,IAAY,SAOX;YAPD,CAAA,UAAY,SAAS,EAAA;YACnB,IAAA,SAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;YAC3B,IAAA,SAAA,CAAA,mBAAA,CAAA,GAAA,OAA2B;YAC3B,IAAA,SAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC;YAClC,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;YACb,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,aAAwB;YACxB,IAAA,SAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;YAChC,CAAC,EAPW,SAAS,KAAT,SAAS,GAOpB,EAAA,CAAA,CAAA;;YCZD,MAAM,aAAa,GAAG,khBAAkhB;;kBCmB3hB,UAAU,0BAAA,MAAA;YAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;;YAoBA;;;;;;;;YAQG;YACK,QAAA,IAAoB,CAAA,oBAAA,GAAW,2BAA2B;;YAGzD,QAAA,IAAU,CAAA,UAAA,GAAY,EAAE;YAExB,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK;YAK/B,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;YAC5B,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;oBAC1B,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,4CAA4C,CAAC;;YAGnF,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