@salla.sa/twilight-components 2.14.239 → 2.14.240

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 (313) hide show
  1. package/dist/cjs/{app-globals-DbdvvtOW.js → app-globals-1XGeqf3w.js} +3 -3
  2. package/dist/cjs/{app-globals-DbdvvtOW.js.map → app-globals-1XGeqf3w.js.map} +1 -1
  3. package/dist/cjs/{index-BDdHgq9_.js → index-CsWMbEp_.js} +4 -4
  4. package/dist/cjs/{index-BDdHgq9_.js.map → index-CsWMbEp_.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-offer.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 +23 -10
  36. package/dist/cjs/salla-tiered-offer.cjs.entry.js.map +1 -1
  37. package/dist/cjs/salla-tiered-offer.entry.cjs.js.map +1 -1
  38. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  41. package/dist/cjs/twilight.cjs.js +2 -2
  42. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +22 -9
  43. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js.map +1 -1
  44. package/dist/components/index.js +2 -2
  45. package/dist/components/index.js.map +1 -1
  46. package/dist/components/salla-tiered-offer.js +22 -9
  47. package/dist/components/salla-tiered-offer.js.map +1 -1
  48. package/dist/esm/{app-globals-Db6Lb5QT.js → app-globals-DfNDI-uR.js} +3 -3
  49. package/dist/esm/{app-globals-Db6Lb5QT.js.map → app-globals-DfNDI-uR.js.map} +1 -1
  50. package/dist/esm/{index-Dxu9oA9K.js → index-86S6hMF9.js} +4 -4
  51. package/dist/esm/{index-Dxu9oA9K.js.map → index-86S6hMF9.js.map} +1 -1
  52. package/dist/esm/loader.js +3 -3
  53. package/dist/esm/salla-accordion-body.entry.js +1 -1
  54. package/dist/esm/salla-accordion-head.entry.js +1 -1
  55. package/dist/esm/salla-accordion.entry.js +1 -1
  56. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  57. package/dist/esm/salla-advertisement.entry.js +1 -1
  58. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  59. package/dist/esm/salla-apps-icons.entry.js +1 -1
  60. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  61. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  62. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  63. package/dist/esm/salla-contacts.entry.js +1 -1
  64. package/dist/esm/salla-filters-widget.entry.js +1 -1
  65. package/dist/esm/salla-filters.entry.js +1 -1
  66. package/dist/esm/salla-installment.entry.js +1 -1
  67. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  68. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  69. package/dist/esm/salla-metadata.entry.js +1 -1
  70. package/dist/esm/salla-notification-item.entry.js +1 -1
  71. package/dist/esm/salla-notifications.entry.js +1 -1
  72. package/dist/esm/salla-offer.entry.js +1 -1
  73. package/dist/esm/salla-order-summary.entry.js +1 -1
  74. package/dist/esm/salla-orders.entry.js +1 -1
  75. package/dist/esm/salla-payments.entry.js +1 -1
  76. package/dist/esm/salla-price-range.entry.js +1 -1
  77. package/dist/esm/salla-product-options.entry.js +1 -1
  78. package/dist/esm/salla-review-card.entry.js +1 -1
  79. package/dist/esm/salla-reviews-page.entry.js +1 -1
  80. package/dist/esm/salla-reviews.entry.js +1 -1
  81. package/dist/esm/salla-social.entry.js +1 -1
  82. package/dist/esm/salla-tiered-offer.entry.js +23 -10
  83. package/dist/esm/salla-tiered-offer.entry.js.map +1 -1
  84. package/dist/esm/salla-tooltip.entry.js +1 -1
  85. package/dist/esm/salla-verify.entry.js +1 -1
  86. package/dist/esm/salla-wallet.entry.js +1 -1
  87. package/dist/esm/twilight.js +3 -3
  88. package/dist/esm-es5/{app-globals-Db6Lb5QT.js → app-globals-DfNDI-uR.js} +2 -2
  89. package/dist/esm-es5/{app-globals-Db6Lb5QT.js.map → app-globals-DfNDI-uR.js.map} +1 -1
  90. package/dist/esm-es5/{index-Dxu9oA9K.js → index-86S6hMF9.js} +3 -3
  91. package/dist/esm-es5/{index-Dxu9oA9K.js.map → index-86S6hMF9.js.map} +1 -1
  92. package/dist/esm-es5/loader.js +1 -1
  93. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  94. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  95. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  96. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  97. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  98. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  99. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  100. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  101. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  102. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  103. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  104. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  105. package/dist/esm-es5/salla-filters.entry.js +1 -1
  106. package/dist/esm-es5/salla-installment.entry.js +1 -1
  107. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  108. package/dist/esm-es5/salla-loyalty-program.entry.js +2 -2
  109. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  110. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  111. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  112. package/dist/esm-es5/salla-offer.entry.js +1 -1
  113. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  114. package/dist/esm-es5/salla-orders.entry.js +1 -1
  115. package/dist/esm-es5/salla-payments.entry.js +1 -1
  116. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  117. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  118. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  119. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  120. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  121. package/dist/esm-es5/salla-social.entry.js +1 -1
  122. package/dist/esm-es5/salla-tiered-offer.entry.js +2 -2
  123. package/dist/esm-es5/salla-tiered-offer.entry.js.map +1 -1
  124. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  125. package/dist/esm-es5/salla-verify.entry.js +1 -1
  126. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  127. package/dist/esm-es5/twilight.js +1 -1
  128. package/dist/twilight/{p-67c709ff.entry.js → p-069073a1.entry.js} +2 -2
  129. package/dist/twilight/{p-28c53329.system.entry.js → p-0d143681.system.entry.js} +2 -2
  130. package/dist/twilight/{p-4bc9089d.entry.js → p-0f85b7f3.entry.js} +2 -2
  131. package/dist/twilight/{p-bdf35a25.system.entry.js → p-135ed6e0.system.entry.js} +2 -2
  132. package/dist/twilight/{p-f8352357.entry.js → p-20eafe54.entry.js} +2 -2
  133. package/dist/twilight/{p-bd89e063.system.entry.js → p-2235ce4f.system.entry.js} +2 -2
  134. package/dist/twilight/p-287eb315.entry.js +5 -0
  135. package/dist/twilight/{p-67d370cb.entry.js → p-2c9e6255.entry.js} +2 -2
  136. package/dist/twilight/{p-7167cda0.system.entry.js → p-32c96ded.system.entry.js} +2 -2
  137. package/dist/twilight/{p-ad1bfcf3.entry.js → p-355b3c7c.entry.js} +7 -7
  138. package/dist/twilight/{p-331c6ed5.system.entry.js → p-36a00ea7.system.entry.js} +2 -2
  139. package/dist/twilight/{p-3b21bc63.entry.js → p-3b0105e7.entry.js} +2 -2
  140. package/dist/twilight/{p-5ee8e3ee.system.entry.js → p-3e6a3899.system.entry.js} +2 -2
  141. package/dist/twilight/{p-c24b8585.system.entry.js → p-3ee96333.system.entry.js} +2 -2
  142. package/dist/twilight/{p-cf060e6c.system.entry.js → p-48a9be96.system.entry.js} +2 -2
  143. package/dist/twilight/{p-3917911e.system.entry.js → p-4c69b8db.system.entry.js} +2 -2
  144. package/dist/twilight/{p-2b6b8c81.entry.js → p-4f069a7a.entry.js} +2 -2
  145. package/dist/twilight/{p-37ef34af.entry.js → p-4fcfcce9.entry.js} +2 -2
  146. package/dist/twilight/{p-DNbI4S_I.js → p-5M9uHOyt.js} +2 -2
  147. package/dist/twilight/{p-DNbI4S_I.js.map → p-5M9uHOyt.js.map} +1 -1
  148. package/dist/twilight/{p-c698caa6.system.entry.js → p-5a36dbaf.system.entry.js} +2 -2
  149. package/dist/twilight/{p-5eb4592c.entry.js → p-5daaab56.entry.js} +2 -2
  150. package/dist/twilight/{p-529f23c6.system.entry.js → p-604025f9.system.entry.js} +2 -2
  151. package/dist/twilight/{p-462c7109.system.entry.js → p-641a01a6.system.entry.js} +2 -2
  152. package/dist/twilight/{p-a642fb2d.system.entry.js → p-6751f5ae.system.entry.js} +3 -3
  153. package/dist/twilight/{p-411b87ef.entry.js → p-683aecb9.entry.js} +2 -2
  154. package/dist/twilight/{p-cab02e98.system.entry.js → p-697cf606.system.entry.js} +2 -2
  155. package/dist/twilight/{p-4437951d.system.entry.js → p-6b241620.system.entry.js} +2 -2
  156. package/dist/twilight/{p-DjvOm_NU.system.js.map → p-7059GOh_.system.js.map} +1 -1
  157. package/dist/twilight/p-72ce234e.system.entry.js +5 -0
  158. package/dist/twilight/{p-b24fe018.system.entry.js → p-76e916b0.system.entry.js} +2 -2
  159. package/dist/twilight/{p-eb410142.entry.js → p-7aff9c5c.entry.js} +2 -2
  160. package/dist/twilight/{p-4659c645.entry.js → p-8208e1c9.entry.js} +2 -2
  161. package/dist/twilight/{p-Dxu9oA9K.js → p-86S6hMF9.js} +3 -3
  162. package/dist/twilight/{p-Dxu9oA9K.js.map → p-86S6hMF9.js.map} +1 -1
  163. package/dist/twilight/{p-cc5e1937.system.entry.js → p-87ac96e9.system.entry.js} +2 -2
  164. package/dist/twilight/{p-ab42e437.entry.js → p-893b6070.entry.js} +2 -2
  165. package/dist/twilight/p-8955eccb.system.entry.js +5 -0
  166. package/dist/twilight/p-8955eccb.system.entry.js.map +1 -0
  167. package/dist/twilight/{p-a3cd1fad.entry.js → p-8d5c5550.entry.js} +2 -2
  168. package/dist/twilight/{p-c695b1d9.system.entry.js → p-8e5cf738.system.entry.js} +2 -2
  169. package/dist/twilight/{p-3f455e4b.entry.js → p-9013546e.entry.js} +2 -2
  170. package/dist/twilight/{p-b854bd23.entry.js → p-961929e2.entry.js} +2 -2
  171. package/dist/twilight/{p-11fe6afc.entry.js → p-99607c5a.entry.js} +2 -2
  172. package/dist/twilight/{p-63f5db56.system.entry.js → p-9a002229.system.entry.js} +2 -2
  173. package/dist/twilight/{p-64128588.entry.js → p-9a54ade1.entry.js} +2 -2
  174. package/dist/twilight/p-9a54ade1.entry.js.map +1 -0
  175. package/dist/twilight/{p-b3451de7.system.entry.js → p-9f93237a.system.entry.js} +2 -2
  176. package/dist/twilight/{p-Dzux6KMv.system.js.map → p-B0THOn7q.system.js.map} +1 -1
  177. package/dist/twilight/{p-E94lGW7o.system.js.map → p-B3bBc5hP.system.js.map} +1 -1
  178. package/dist/twilight/{p-DdBJaRrc.system.js.map → p-B4Hhvetc.system.js.map} +1 -1
  179. package/dist/twilight/{p-NfM7SGbO.system.js.map → p-B6wyl2f0.system.js.map} +1 -1
  180. package/dist/twilight/{p-DyN-KAxy.system.js.map → p-BILc9Pci.system.js.map} +1 -1
  181. package/dist/twilight/{p-CwLRhDos.system.js.map → p-BO4jwLM4.system.js.map} +1 -1
  182. package/dist/twilight/{p-D1zqgG9Y.system.js.map → p-BOt1gZ9d.system.js.map} +1 -1
  183. package/dist/twilight/{p-DdyaaxwR.system.js.map → p-BPx4tWNZ.system.js.map} +1 -1
  184. package/dist/twilight/{p-dQTzJHLh.system.js.map → p-Bk2ADRk4.system.js.map} +1 -1
  185. package/dist/twilight/{p-DST6iM3C.system.js.map → p-BlSq4Fq7.system.js.map} +1 -1
  186. package/dist/twilight/{p-Cr6XPQwf.system.js.map → p-BtFWFs1V.system.js.map} +1 -1
  187. package/dist/twilight/{p-Dlx1ErOi.system.js.map → p-C2PGa50y.system.js.map} +1 -1
  188. package/dist/twilight/{p-D2DsyAg6.system.js.map → p-C6nkzTvN.system.js.map} +1 -1
  189. package/dist/twilight/{p-CRhaoLbg.system.js.map → p-CKO3Xuss.system.js.map} +1 -1
  190. package/dist/twilight/{p-BbWNHcOU.system.js → p-COZuK4m7.system.js} +2 -2
  191. package/dist/twilight/{p-BbWNHcOU.system.js.map → p-COZuK4m7.system.js.map} +1 -1
  192. package/dist/twilight/{p-Cww7QFEI.system.js.map → p-CQCe9z_M.system.js.map} +1 -1
  193. package/dist/twilight/{p-BUwki4wf.system.js.map → p-CY2AazKj.system.js.map} +1 -1
  194. package/dist/twilight/{p-Cym5H1Z6.system.js.map → p-CpKEc-QE.system.js.map} +1 -1
  195. package/dist/twilight/{p-C1Uuu_Iz.system.js.map → p-Cq9YCvnE.system.js.map} +1 -1
  196. package/dist/twilight/{p-B6bpYnnP.system.js.map → p-CwyhVjVS.system.js.map} +1 -1
  197. package/dist/twilight/{p-gKm1xaeh.system.js.map → p-Cx16iaWu.system.js.map} +1 -1
  198. package/dist/twilight/{p-CkkLk7Pj.system.js.map → p-DMoD6Yhr.system.js.map} +1 -1
  199. package/dist/twilight/{p-BV4kErtd.system.js → p-DSJ3vZFd.system.js} +3 -3
  200. package/dist/twilight/{p-BV4kErtd.system.js.map → p-DSJ3vZFd.system.js.map} +1 -1
  201. package/dist/twilight/{p-Cv46yWRf.system.js.map → p-DXdrYrki.system.js.map} +1 -1
  202. package/dist/twilight/{p-BDyUK9ox.system.js.map → p-Dbg3u7PY.system.js.map} +1 -1
  203. package/dist/twilight/{p-CFR20olG.system.js.map → p-DcvbCz37.system.js.map} +1 -1
  204. package/dist/twilight/{p-_oBuExIe.system.js.map → p-EjPVtywF.system.js.map} +1 -1
  205. package/dist/twilight/{p-DIHPMktR.system.js → p-LnIc2g0K.system.js} +2 -2
  206. package/dist/twilight/{p-DIHPMktR.system.js.map → p-LnIc2g0K.system.js.map} +1 -1
  207. package/dist/twilight/{p-DRACrmyE.system.js.map → p-PGo9cpeC.system.js.map} +1 -1
  208. package/dist/twilight/{p-DNQHLxWG.system.js.map → p-X0bHG-St.system.js.map} +1 -1
  209. package/dist/twilight/{p-Dl5noMXr.system.js.map → p-X2WECLtP.system.js.map} +1 -1
  210. package/dist/twilight/{p-DxmXbXHz.system.js.map → p-_nPo7VqN.system.js.map} +1 -1
  211. package/dist/twilight/{p-efcb6ca0.entry.js → p-a74a0991.entry.js} +2 -2
  212. package/dist/twilight/{p-01aded94.system.entry.js → p-b00a767e.system.entry.js} +2 -2
  213. package/dist/twilight/{p-554092d9.system.entry.js → p-b02601bf.system.entry.js} +2 -2
  214. package/dist/twilight/{p-e651f83f.system.entry.js → p-b0c0b3d6.system.entry.js} +2 -2
  215. package/dist/twilight/{p-2d41b312.entry.js → p-b3cc4924.entry.js} +2 -2
  216. package/dist/twilight/{p-3971d884.system.entry.js → p-b3fdd54c.system.entry.js} +2 -2
  217. package/dist/twilight/{p-142c7169.entry.js → p-b5e2eaf3.entry.js} +2 -2
  218. package/dist/twilight/{p-7632d96b.system.entry.js → p-bac7b53e.system.entry.js} +2 -2
  219. package/dist/twilight/{p-ea58fa22.entry.js → p-bbb519fe.entry.js} +2 -2
  220. package/dist/twilight/{p-03f98d2f.system.entry.js → p-bd36d804.system.entry.js} +2 -2
  221. package/dist/twilight/{p-12198e85.system.entry.js → p-c5834a66.system.entry.js} +2 -2
  222. package/dist/twilight/{p-816097f4.entry.js → p-cc790dba.entry.js} +2 -2
  223. package/dist/twilight/{p-f36b71e2.system.entry.js → p-cd66c46a.system.entry.js} +2 -2
  224. package/dist/twilight/{p-f6a84618.entry.js → p-ce0e62a8.entry.js} +2 -2
  225. package/dist/twilight/{p-06af0212.entry.js → p-d61771bf.entry.js} +2 -2
  226. package/dist/twilight/{p-b5838794.entry.js → p-d78444f7.entry.js} +2 -2
  227. package/dist/twilight/{p-6f2cf177.entry.js → p-d9107be8.entry.js} +2 -2
  228. package/dist/twilight/{p-5b5a6101.entry.js → p-deb0b4e3.entry.js} +2 -2
  229. package/dist/twilight/{p-099c2ddf.entry.js → p-e0c40274.entry.js} +2 -2
  230. package/dist/twilight/{p-788980fa.entry.js → p-e30ffd83.entry.js} +2 -2
  231. package/dist/twilight/{p-9110491f.entry.js → p-e64c0047.entry.js} +2 -2
  232. package/dist/twilight/{p-1b84dff7.system.entry.js → p-f21d1ba7.system.entry.js} +2 -2
  233. package/dist/twilight/{p-4c9e43fe.system.entry.js → p-f2e9ad0f.system.entry.js} +2 -2
  234. package/dist/twilight/{p-07f023da.entry.js → p-f9cf641b.entry.js} +2 -2
  235. package/dist/twilight/{p-79dab8b8.system.entry.js → p-ff6b808f.system.entry.js} +2 -2
  236. package/dist/twilight/{p-D5r3ATtc.system.js.map → p-m3XPAerg.system.js.map} +1 -1
  237. package/dist/twilight/{p-Cih6sizk.system.js.map → p-ngc9di4P.system.js.map} +1 -1
  238. package/dist/twilight/p-trTja1pl.system.js.map +1 -0
  239. package/dist/twilight/{p-BuTOc-d8.system.js.map → p-yrFyBD8V.system.js.map} +1 -1
  240. package/dist/twilight/salla-tiered-offer.entry.esm.js.map +1 -1
  241. package/dist/twilight/twilight.esm.js +1 -1
  242. package/dist/twilight/twilight.js +1 -1
  243. package/package.json +5 -5
  244. package/dist/twilight/p-5273af20.entry.js +0 -5
  245. package/dist/twilight/p-64128588.entry.js.map +0 -1
  246. package/dist/twilight/p-STaxwEDu.system.js.map +0 -1
  247. package/dist/twilight/p-b4b32523.system.entry.js +0 -5
  248. package/dist/twilight/p-bf84ef7e.system.entry.js +0 -5
  249. package/dist/twilight/p-bf84ef7e.system.entry.js.map +0 -1
  250. /package/dist/twilight/{p-67c709ff.entry.js.map → p-069073a1.entry.js.map} +0 -0
  251. /package/dist/twilight/{p-28c53329.system.entry.js.map → p-0d143681.system.entry.js.map} +0 -0
  252. /package/dist/twilight/{p-4bc9089d.entry.js.map → p-0f85b7f3.entry.js.map} +0 -0
  253. /package/dist/twilight/{p-bdf35a25.system.entry.js.map → p-135ed6e0.system.entry.js.map} +0 -0
  254. /package/dist/twilight/{p-f8352357.entry.js.map → p-20eafe54.entry.js.map} +0 -0
  255. /package/dist/twilight/{p-bd89e063.system.entry.js.map → p-2235ce4f.system.entry.js.map} +0 -0
  256. /package/dist/twilight/{p-5273af20.entry.js.map → p-287eb315.entry.js.map} +0 -0
  257. /package/dist/twilight/{p-67d370cb.entry.js.map → p-2c9e6255.entry.js.map} +0 -0
  258. /package/dist/twilight/{p-7167cda0.system.entry.js.map → p-32c96ded.system.entry.js.map} +0 -0
  259. /package/dist/twilight/{p-ad1bfcf3.entry.js.map → p-355b3c7c.entry.js.map} +0 -0
  260. /package/dist/twilight/{p-331c6ed5.system.entry.js.map → p-36a00ea7.system.entry.js.map} +0 -0
  261. /package/dist/twilight/{p-3b21bc63.entry.js.map → p-3b0105e7.entry.js.map} +0 -0
  262. /package/dist/twilight/{p-5ee8e3ee.system.entry.js.map → p-3e6a3899.system.entry.js.map} +0 -0
  263. /package/dist/twilight/{p-c24b8585.system.entry.js.map → p-3ee96333.system.entry.js.map} +0 -0
  264. /package/dist/twilight/{p-cf060e6c.system.entry.js.map → p-48a9be96.system.entry.js.map} +0 -0
  265. /package/dist/twilight/{p-3917911e.system.entry.js.map → p-4c69b8db.system.entry.js.map} +0 -0
  266. /package/dist/twilight/{p-2b6b8c81.entry.js.map → p-4f069a7a.entry.js.map} +0 -0
  267. /package/dist/twilight/{p-37ef34af.entry.js.map → p-4fcfcce9.entry.js.map} +0 -0
  268. /package/dist/twilight/{p-c698caa6.system.entry.js.map → p-5a36dbaf.system.entry.js.map} +0 -0
  269. /package/dist/twilight/{p-5eb4592c.entry.js.map → p-5daaab56.entry.js.map} +0 -0
  270. /package/dist/twilight/{p-529f23c6.system.entry.js.map → p-604025f9.system.entry.js.map} +0 -0
  271. /package/dist/twilight/{p-462c7109.system.entry.js.map → p-641a01a6.system.entry.js.map} +0 -0
  272. /package/dist/twilight/{p-a642fb2d.system.entry.js.map → p-6751f5ae.system.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-411b87ef.entry.js.map → p-683aecb9.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-cab02e98.system.entry.js.map → p-697cf606.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-4437951d.system.entry.js.map → p-6b241620.system.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-b4b32523.system.entry.js.map → p-72ce234e.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-b24fe018.system.entry.js.map → p-76e916b0.system.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-eb410142.entry.js.map → p-7aff9c5c.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-4659c645.entry.js.map → p-8208e1c9.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-cc5e1937.system.entry.js.map → p-87ac96e9.system.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-ab42e437.entry.js.map → p-893b6070.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-a3cd1fad.entry.js.map → p-8d5c5550.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-c695b1d9.system.entry.js.map → p-8e5cf738.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-3f455e4b.entry.js.map → p-9013546e.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-b854bd23.entry.js.map → p-961929e2.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-11fe6afc.entry.js.map → p-99607c5a.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-63f5db56.system.entry.js.map → p-9a002229.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-b3451de7.system.entry.js.map → p-9f93237a.system.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-efcb6ca0.entry.js.map → p-a74a0991.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-01aded94.system.entry.js.map → p-b00a767e.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-554092d9.system.entry.js.map → p-b02601bf.system.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-e651f83f.system.entry.js.map → p-b0c0b3d6.system.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-2d41b312.entry.js.map → p-b3cc4924.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-3971d884.system.entry.js.map → p-b3fdd54c.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-142c7169.entry.js.map → p-b5e2eaf3.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-7632d96b.system.entry.js.map → p-bac7b53e.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-ea58fa22.entry.js.map → p-bbb519fe.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-03f98d2f.system.entry.js.map → p-bd36d804.system.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-12198e85.system.entry.js.map → p-c5834a66.system.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-816097f4.entry.js.map → p-cc790dba.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-f36b71e2.system.entry.js.map → p-cd66c46a.system.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-f6a84618.entry.js.map → p-ce0e62a8.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-06af0212.entry.js.map → p-d61771bf.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-b5838794.entry.js.map → p-d78444f7.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-6f2cf177.entry.js.map → p-d9107be8.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-5b5a6101.entry.js.map → p-deb0b4e3.entry.js.map} +0 -0
  307. /package/dist/twilight/{p-099c2ddf.entry.js.map → p-e0c40274.entry.js.map} +0 -0
  308. /package/dist/twilight/{p-788980fa.entry.js.map → p-e30ffd83.entry.js.map} +0 -0
  309. /package/dist/twilight/{p-9110491f.entry.js.map → p-e64c0047.entry.js.map} +0 -0
  310. /package/dist/twilight/{p-1b84dff7.system.entry.js.map → p-f21d1ba7.system.entry.js.map} +0 -0
  311. /package/dist/twilight/{p-4c9e43fe.system.entry.js.map → p-f2e9ad0f.system.entry.js.map} +0 -0
  312. /package/dist/twilight/{p-07f023da.entry.js.map → p-f9cf641b.entry.js.map} +0 -0
  313. /package/dist/twilight/{p-79dab8b8.system.entry.js.map → p-ff6b808f.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,n,i,o){function r(t){return t instanceof i?t:new i((function(n){n(t)}))}return new(i||(i=Promise))((function(i,e){function a(t){try{u(o.next(t))}catch(t){e(t)}}function s(t){try{u(o["throw"](t))}catch(t){e(t)}}function u(t){t.done?i(t.value):r(t.value).then(a,s)}u((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},o,r,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return u([t,n])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(i=0)),i)try{if(o=1,r&&(e=s[0]&2?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;if(r=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){i.label=s[1];break}if(s[0]===6&&i.label<e[1]){i.label=e[1];e=s;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(s);break}if(e[2])i.ops.pop();i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t];r=0}finally{o=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-BV4kErtd.system.js","./p-Dxc5oJG6.system.js","./p-DTevZS21.system.js"],(function(t){"use strict";var n,i,o,r,e,a,s;return{setters:[function(t){n=t.r;i=t.c;o=t.h;r=t.H;e=t.g},function(t){a=t.I},function(t){s=t.C}],execute:function(){var u;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(u||(u={}));var c;(function(t){t["Sar"]="SAR"})(c||(c={}));var l='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var p=t("salla_product_options",function(){function t(t){var r=this;n(this,t);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,n,i){if(n==="custom"&&i==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();r.isCustomDonation=t.target.value==="custom";if(r.donationInput){if(t.target.value==="custom"){r.donationInput.value="";r.donationInput.focus()}else{r.donationInput.value=t.target.value}if(n==="custom"){return}salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===u.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},o("p",null,t.donation.target_message),o("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){r.outOfStockText=salla.lang.get("pages.products.out_of_stock");r.donationAmount=salla.lang.get("pages.products.donation_amount");r.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");r.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return r.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===u.FILE||n.type===u.IMAGE)&&t.type==="added"||n.type===u.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===u.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===u.MULTIPLE_OPTIONS){var c=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(c>-1){this.selectedOptions.splice(c,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===u.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==u.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===u.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===u.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===u.SINGLE_OPTION){return this.singleOption(t)}if(t.type===u.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===u.COUNTRY){return this.countryOption(t)}if(t.type===u.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){var t=this;if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}var n=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(n){var i=this.optionsData.find((function(t){return t.type==="country"}));var o=i&&this.getSelectedDigitalCardOptions(i);if(o){this.getAvailableDigitalCardSKUs(o)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return salla.onReady((function(){var n=!salla.storage.get("cart.id")&&t.optionsData.some((function(t){return["file","image"].includes(t.type)}));return n?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}))};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===u.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return o(r,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((function(n){return o("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===u.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},o("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},o("b",null,n.name,n.required&&o("span",null," * ")," "),o("small",null,n.placeholder)),o("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===u.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===u.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===u.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var r,e;return o("div",{class:"s-product-options-donation-wrapper"},((r=t.donation)===null||r===void 0?void 0:r.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,r){return o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:i.generateUniqueKey("donation-option-".concat(r)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),o("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(r))},o("span",{innerHTML:salla.money(n.name)})))})),((e=t.donation)===null||e===void 0?void 0:e.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var r;return o("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((r=n.accept)===null||r===void 0?void 0:r.split(",").every((function(t){return t.includes("image")})))?s:l}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return o("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return o("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===u.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,r,e,a){var s=this;var u=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var c=this.isOptionDetailOut(n);return o("label",{class:{"s-product-options-disabled":c}},o("input",{id:u,type:t,name:e,value:n.id,disabled:c,required:r,checked:n.is_selected,onInvalid:function(t){return s.invalidHandler(t,i)},onChange:function(t){return s.changedHandler(t,i)}}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":c}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return o("div",null,o("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return o("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var r=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var e=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return r?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))};t.prototype.colorOption=function(t){var n=this;return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:a,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var r,e,a;var s=String(i.id);return o("label",{htmlFor:n.generateUniqueKey(s.toString()),key:s,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(s.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("span",null,i.name," ",(a=(e=salla.config)===null||e===void 0?void 0:e.currency())===null||a===void 0?void 0:a.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var r;return o("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),o("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());p.style=d}}}));
5
- //# sourceMappingURL=p-63f5db56.system.entry.js.map
4
+ */System.register(["./p-DSJ3vZFd.system.js","./p-Dxc5oJG6.system.js","./p-DTevZS21.system.js"],(function(t){"use strict";var n,i,o,r,e,a,s;return{setters:[function(t){n=t.r;i=t.c;o=t.h;r=t.H;e=t.g},function(t){a=t.I},function(t){s=t.C}],execute:function(){var u;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["DIGITAL_CARD_VALUE"]="digital-code-value";t["COUNTRY"]="country";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker";t["BOOKING"]="booking"})(u||(u={}));var c;(function(t){t["Sar"]="SAR"})(c||(c={}));var l='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var p=t("salla_product_options",function(){function t(t){var r=this;n(this,t);this.changed=i(this,"changed");this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",exl:"application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",txt:"text/plain"};this.outOfStockText="";this.donationAmount=salla.lang.get("pages.products.donation_amount");this.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");this.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ");this.isCustomDonation=false;this.selectedOptions=[];this.disableCardValue=true;this.availableDigitalCardValues=[];this.outSkus=[];this.ignoreDefaultCardValue=false;this.productId=salla.config.get("page.id");this.handleDonationOptions=function(t,n,i){if(n==="custom"&&i==="input"){salla.helpers.inputDigitsOnly(t.target);salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value});return}t.preventDefault();t.stopPropagation();r.isCustomDonation=t.target.value==="custom";if(r.donationInput){if(t.target.value==="custom"){r.donationInput.value="";r.donationInput.focus()}else{r.donationInput.value=t.target.value}if(n==="custom"){return}salla.event.emit("product-options::donation-changed",{id:r.productId,price:t.target.value})}};this.hideLabel=function(t){if(t.type===u.DONATION&&(t.donation&&!t.donation.can_donate)){return true}return false};this.getExpireDonationMessage=function(t){if(!t.donation){return}var n=t.donation.target_amount<=t.donation.collected_amount;return o("div",{class:{"s-product-options-donation-message":true,"s-product-options-donation-completed":n,"s-product-options-donation-expired":!n}},o("p",null,t.donation.target_message),o("span",{innerHTML:n?salla.money(t.donation.target_amount):""}))};this.canDisabled=!salla.config.get("store.settings.product.notify_options_availability")||salla.url.is_page("cart");salla.lang.onLoaded((function(){r.outOfStockText=salla.lang.get("pages.products.out_of_stock");r.donationAmount=salla.lang.get("pages.products.donation_amount");r.selectDonationAmount=salla.lang.getWithDefault("pages.products.select_donation_amount","تحديد مبلغ التبرع");r.selectAmount=salla.lang.getWithDefault("pages.products.select_amount","اختر المبلغ")}));if(this.options){try{this.setOptionsData(Array.isArray(this.options)?this.options:JSON.parse(this.options));return}catch(t){salla.log("Bad json passed via options prop")}}if(!Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.setOptionsData([])}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){return r.setOptionsData(t.data.options)}))}}t.prototype.setOptionsData=function(t){return __awaiter(this,void 0,void 0,(function(){var n,i,o;return __generator(this,(function(r){this.optionsData=t;o=this;(i=(n=this.optionsData[0])===null||n===void 0?void 0:n.details)===null||i===void 0?void 0:i.forEach((function(t){Object.entries(t.skus_availability||{}).filter((function(t){return!t[1]})).map((function(t){return o.outSkus.push(Number(t[0]))}))}));return[2]}))}))};t.prototype.getSelectedOptionsData=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(i){t={};n=this.host.getElementSallaData();n.forEach((function(n,i){if(i.startsWith("options[")){t[i.replace("options[","").replace("]","")]=n}}));return[2,t]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){t=this.host.querySelectorAll("[required]");n=true;for(i=0;i<t.length;i++){if("reportValidity"in t[i]&&!t[i].reportValidity()){n=false}}return[2,n]}))}))};t.prototype.hasOutOfStockOption=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var i=this;return __generator(this,(function(o){return[2,this.selectedOptions.some((function(t){return t.is_out}))||((t=this.selectedSkus)===null||t===void 0?void 0:t.length)&&((n=this.selectedSkus)===null||n===void 0?void 0:n.every((function(t){return i.outSkus.includes(t)})))]}))}))};t.prototype.getSelectedOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.selectedOptions]}))}))};t.prototype.getOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.optionsData.find((function(n){return n.id===t}))]}))}))};t.prototype.invalidHandler=function(t,n){var i=t.target.closest(".s-product-options-option");if(!i.classList.contains("s-product-options-option-error")){i.classList.add("s-product-options-option-error")}if(!salla.url.is_page("cart")){var o=this.host.querySelector(".s-product-options-option-error");if(o===i){this.scrollToElement(i)}}};t.prototype.scrollToElement=function(t){if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.changedHandler=function(t,n,i){var o=this;if(i===void 0){i=true}var r={event:t,option:n,detail:null,productId:this.productId};if(n.details){var e=n.details.find((function(n){return Number(n.id)===Number(t.target.value)}));r.detail=e}if(n.type==="country"){this.handleCountryOptionChange(t,r.detail)}var a=t.target.closest(".s-product-options-option");if(t.target.value||(n.type===u.FILE||n.type===u.IMAGE)&&t.type==="added"||n.type===u.MAP&&t.type==="selected"&&(t.target.lat&&t.target.lng)){setTimeout((function(){a.classList.remove("s-product-options-option-error")}),200)}if(n.type===u.DONATION){salla.event.emit("product-options::donation-changed",{id:this.productId,price:t.target.value})}this.setSelectedSkus();this.handleRequiredMultipleOptions(n);var s=this.selectedOptions.findIndex((function(t){return t.option_id===r.option.id}));if(r.option.type===u.MULTIPLE_OPTIONS){var c=this.selectedOptions.findIndex((function(t){var n;return t.option_id===r.option.id&&(t===null||t===void 0?void 0:t.id)===((n=r.detail)===null||n===void 0?void 0:n.id)}));if(c>-1){this.selectedOptions.splice(c,1)}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}else{if(!r.detail||Object.keys(r.detail).length===0){if(s>-1){this.selectedOptions.splice(s,1)}}else{if(s>-1){this.selectedOptions[s]=Object.assign(Object.assign({},r.detail),{option_id:r.option.id})}else{this.selectedOptions.push(Object.assign(Object.assign({},r.detail),{option_id:r.option.id}))}}}this.optionsData=this.optionsData.map((function(t){if(t.id===r.option.id){return Object.assign(Object.assign({},t),{details:t.details.map((function(t){var n,i;return Object.assign(Object.assign({},t),{is_selected:r.option.type===u.MULTIPLE_OPTIONS?o.selectedOptions.some((function(n){return n.id===t.id})):Number(t.id)===Number((n=r.detail)===null||n===void 0?void 0:n.id),value:(i=r.detail)===null||i===void 0?void 0:i.value})}))})}return t}));if(i){this.changed.emit(r);salla.event.emit("product-options::change",r)}};t.prototype.setSelectedSkus=function(){this.selectedSkus=this.selectedOptions.map((function(t){return Object.keys(t.skus_availability||{})})).reduce((function(t,n){return t.filter((function(t){return n.includes(t)}))}),[]).map((function(t){return Number(t)}))};t.prototype.handleRequiredMultipleOptions=function(t){if(t.type!==u.MULTIPLE_OPTIONS||!t.required){return}var n=this.host.querySelector('[data-option-id="'.concat(t.id,'"]'));var i=n.querySelectorAll("input:checked").length;n.querySelectorAll("input").forEach((function(t){return t.toggleAttribute("required",!i)}))};t.prototype.getLatLng=function(t,n){return t?t.split(",")[n==="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){var n=this;if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===u.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===u.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===u.SINGLE_OPTION){return this.singleOption(t)}if(t.type===u.DIGITAL_CARD_VALUE){return this.digitalCardValuesOption(t)}if(t.type===u.COUNTRY){return this.countryOption(t)}if(t.type===u.BOOKING&&salla.url.is_page("cart")){return o("salla-booking-field",{onInvalidInput:function(i){return n.invalidHandler(i,t)},option:t,productId:t.value})}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.getAvailableDigitalCardSKUs=function(t){var n=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!n)throw new Error("product-options:: No digital card options found");var i=Object.keys(t.skus_availability).filter((function(n){return t.skus_availability[n]===false}));this.availableDigitalCardValues=n.details.filter((function(t){return!Object.keys(t.skus_availability).filter((function(t){return i.includes(t)})).length}))};t.prototype.handleCountryOptionChange=function(t,n){t.stopImmediatePropagation();this.ignoreDefaultCardValue=true;var i=this.host.querySelector("input[data-code-value]:checked");if(i)i.checked=false;var o=this.optionsData.find((function(t){var n=t.type;return n==="digital-code-value"}));if(!o)throw new Error("product-options:: No digital card options found");this.getAvailableDigitalCardSKUs(n)};t.prototype.getSelectedDigitalCardOptions=function(t){var n=t.details.find((function(t){return t.is_selected}));var i=t.details.find((function(t){return!!t.is_default}))||t.details[0];if(!["digital-code-value","country"].includes(t.type))return;return n||i};t.prototype.componentWillLoad=function(){var t=this;if(salla.url.is_page("cart")){this.disableCardValue=false;this.fillSelectedOptions()}if(this.config){try{this.optionConfig=typeof this.config==="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse JSON in config prop:",t)}}var n=this.optionsData.filter((function(t){var n=t.type;return["country","digital-card-value"].includes(n)})).length>0&&salla.url.is_page("cart");if(n){var i=this.optionsData.find((function(t){return t.type==="country"}));var o=i&&this.getSelectedDigitalCardOptions(i);if(o){this.getAvailableDigitalCardSKUs(o)}}this.outOfStockText=salla.lang.get("pages.products.out_of_stock");return salla.onReady((function(){var n=!salla.storage.get("cart.id")&&t.optionsData.some((function(t){return["file","image"].includes(t.type)}));return n?salla.api.cart.getCurrentCartId(false,"salla-product-options"):null}))};t.prototype.hideDigitalCardsOptions=function(t){return this.disableCardValue&&t.type===u.DIGITAL_CARD_VALUE&&!salla.url.is_page("cart")};t.prototype.render=function(){var t=this;var n;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0){return}return o(r,{class:"s-product-options-wrapper"},o("salla-conditional-fields",null,this.optionsData.map((function(n){return o("div",Object.assign({key:n.id,class:"s-product-options-option-container".concat(n.visibility_condition||t.hideDigitalCardsOptions(n)?" hidden":""),"data-option-id":n.id},t.getOptionShownWhen(n)),n.name==="splitter"?t.splitterOption():o("div",{class:{"s-product-options-option":true,"s-product-options-option-booking":n.type===u.BOOKING&&salla.url.is_page("cart")},"data-option-type":n.type,"data-option-required":"".concat(n.required)},o("label",{htmlFor:"options[".concat(n.id,"]"),class:"s-product-options-option-label ".concat(t.hideLabel(n)?"s-product-options-option-label-hidden":"")},o("b",null,n.name,n.required&&o("span",null," * ")," "),o("small",null,n.placeholder)),o("div",{class:"s-product-options-option-content ".concat(t.hideLabel(n)||n.type===u.BOOKING&&salla.url.is_page("cart")?"s-product-options-option-content-full-width":"")},t.getDisplayForType(n))))}))))};t.prototype.generateUniqueKey=function(t){return this.uniqueKey?"".concat(t,"-").concat(this.uniqueKey):t};t.prototype.fillSelectedOptions=function(){this.selectedOptions=this.optionsData.reduce((function(t,n){var i=n.details.filter((function(t){return t.is_selected}));var o=i.map((function(t){return Object.assign(Object.assign({},t),{option_id:n.id})}));return t.concat(o)}),[])};t.prototype.componentDidLoad=function(){var t=this;var n,i;if(((n=this.optionsData)===null||n===void 0?void 0:n.length)===0&&!this.optionsData.some((function(t){return t.type===u.DONATION}))){return}var o=(i=this.optionsData.find((function(t){return t.type===u.DONATION})))===null||i===void 0?void 0:i.details.find((function(t){return t.is_selected}));if(!o){return}setTimeout((function(){salla.event.emit("product-options::donation-changed",{id:t.productId,price:o.additional_price})}),1e3)};t.prototype.donationOption=function(t,n){var i=this;var r,e;return o("div",{class:"s-product-options-donation-wrapper"},((r=t.donation)===null||r===void 0?void 0:r.can_donate)?[t.donation?o("div",{key:t.id,class:"s-product-options-donation-progress"},o("salla-progress-bar",{donation:t.donation})):"",t.details.length?[o("h4",{key:t.id},this.selectAmount),o("div",{key:t.id,class:"s-product-options-donation-options"},t.details.map((function(n,r){return o("div",{key:t.id,class:"s-product-options-donation-options-item"},o("input",{id:i.generateUniqueKey("donation-option-".concat(r)),type:"radio",name:"donating_option",checked:n.is_selected,value:n.additional_price,onChange:function(t){return i.handleDonationOptions(t,n,"option")}}),o("label",{htmlFor:i.generateUniqueKey("donation-option-".concat(r))},o("span",{innerHTML:salla.money(n.name)})))})),((e=t.donation)===null||e===void 0?void 0:e.custom_amount_enabled)?o("div",{class:"s-product-options-donation-options-item"},o("input",{id:this.generateUniqueKey("donation-option-custom"),type:"radio",name:"donating_option",value:"custom",onChange:function(t){return i.handleDonationOptions(t,"custom","option")}}),o("label",{htmlFor:this.generateUniqueKey("donation-option-custom")},o("span",null," ",this.selectDonationAmount," "))):"")]:"",o("div",{key:t.id,class:{"s-product-options-donation-input-group":true,shown:!t.details.length||t.details.length&&this.isCustomDonation}},o("input",{type:"text",id:"donating-amount",name:"donation_amount",class:"s-form-control",ref:function(t){i.donationInput=t},value:t.details.length&&t.details.some((function(t){return t.is_selected}))?t.details.find((function(t){return t.is_selected})).additional_price:t.value,placeholder:t.placeholder,onInput:function(t){return i.handleDonationOptions(t,"custom","input")},onBlur:function(n){return i.changedHandler(n,t)},onInvalid:function(n){return i.invalidHandler(n,t)}}),o("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))]:this.getExpireDonationMessage(t))};t.prototype.fileUploader=function(t,n){var i=this;if(n===void 0){n=null}var r;return o("salla-file-upload",Object.assign({},n||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,height:"120px",onAdded:function(n){return i.changedHandler(n,t)},url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},onInvalidInput:function(n){return i.invalidHandler(n,t)},class:{"s-product-options-image-input":true,required:t.required}}),o("div",{class:"s-product-options-filepond-placeholder"},o("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:((r=n.accept)===null||r===void 0?void 0:r.split(",").every((function(t){return t.includes("image")})))?s:l}),o("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),o("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var n=this;var i=t.details.map((function(t){return n.fileTypes[t.name]})).filter(Boolean);return(i===null||i===void 0?void 0:i.length)?this.fileUploader(t,{accept:i.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var n=this;return o("input",{type:"text",value:t.value,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(i){return n.changedHandler(i,t)},onInvalid:function(i){return n.invalidHandler(i,t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return o("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var n=this;return o("div",{class:"s-product-options-text"},o("input",{type:"text",value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}))};t.prototype.textareaOption=function(t){var n=this;return o("div",{class:"s-product-options-textarea"},o("div",{class:"mt-1"},o("textarea",{rows:4,value:t.value,maxLength:t===null||t===void 0?void 0:t.length,class:"s-form-control",required:!t.visibility_condition&&t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}})))};t.prototype.mapOption=function(t){var n=this;return o("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},onSelected:function(i){return n.changedHandler(i,t)}})};t.prototype.colorPickerOption=function(t){var n=this;return o("salla-color-picker",{onSubmitted:function(i){return n.changedHandler(i,t)},name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,onInvalidInput:function(i){return n.invalidHandler(i,t)},color:t.value})};t.prototype.timeOption=function(t){var n=this;return o("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}})};t.prototype.dateOption=function(t){var n=this;return o("div",{class:"s-product-options-date-element"},o("salla-datetime-picker",{value:t.value,placeholder:t.name,required:!t.visibility_condition&&t.required,minDate:new Date,name:"options[".concat(t.id,"]"),onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.datetimeOption=function(t){var n=this;return o("div",{class:"s-product-options-datetime-element"},o("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:!t.visibility_condition&&t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onInvalidInput:function(i){return n.invalidHandler(i,t)},onPicked:function(i){return n.changedHandler(i,t)}}))};t.prototype.getOptionDetailName=function(t,n,i){if(n===void 0){n=true}var o;var r;if(i&&i===u.COLOR){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" <br/> <p> ".concat(this.outOfStockText," </p>"):"")+(t.additional_price?" <p> (".concat(salla.money(t.additional_price,false),") </p>"):"")}if(!r){r=t.name+(n&&this.isOptionDetailOut(t)&&!salla.url.is_page("cart")&&!this.hideOutLabel?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price,false),")"):"")}return r.replace("<i class=sicon-sar></i>",((o=salla.config.currency())===null||o===void 0?void 0:o.symbol)||"ر.س")};t.prototype.isOptionDetailOut=function(t){var n=this;var i;if(t.is_out||!t.skus_availability||!((i=this.selectedSkus)===null||i===void 0?void 0:i.length)){return t.is_out}var o=this.selectedOptions.filter((function(n){return n.id===t.id})).length;if(o&&this.selectedOptions.length===1){return false}if(o){var r=this.selectedSkus.filter((function(t){return n.outSkus.includes(t)}));return Object.keys(t.skus_availability).some((function(t){return r.includes(Number(t))}))}return this.selectedOptions.some((function(n){return n.is_out&&n.option_id!==t.option_id}))};t.prototype.renderInput=function(t,n,i,r,e,a){var s=this;var u=this.generateUniqueKey("".concat(t,"-").concat(i.id,"-").concat(n.id));var c=this.isOptionDetailOut(n);return o("label",{class:{"s-product-options-disabled":c}},o("input",{id:u,type:t,name:e,value:n.id,disabled:c,required:r,checked:n.is_selected,onInvalid:function(t){return s.invalidHandler(t,i)},onChange:function(t){return s.changedHandler(t,i)}}),o("div",{class:{"s-product-options-grid-mode-span":a,"s-product-options-disabled":c}},this.getOptionDetailName(n)))};t.prototype.renderOptionDetails=function(t,n,i,o){var r=this;if(o===void 0){o=false}var e=t==="radio"?"options[".concat(n.id,"]"):"options[".concat(n.id,"][]");return n===null||n===void 0?void 0:n.details.map((function(a){return r.renderInput(t,a,n,i,e,o)}))};t.prototype.renderSelect=function(t){var n=this;return o("div",null,o("select",{name:"options[".concat(t.id,"]"),required:!t.visibility_condition&&t.required,class:"s-form-control",onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}},o("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return o("option",{key:t.id,value:t.id,disabled:n.canDisabled&&n.isOptionDetailOut(t),selected:t.is_selected},n.getOptionDetailName(t))}))))};t.prototype.renderButtonStyle=function(t,n,i){return o("div",{class:"s-product-options-grid-mode"},this.renderOptionDetails(t,n,i,true))};t.prototype.singleOption=function(t){var n,i;var o=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["single-option"])===null||i===void 0?void 0:i.type)==="button";var r=!t.visibility_condition&&t.required;return o?this.renderButtonStyle("radio",t,r):this.renderSelect(t)};t.prototype.multipleOptions=function(t){var n,i;var r=((i=(n=this.optionConfig)===null||n===void 0?void 0:n["multiple-option"])===null||i===void 0?void 0:i.type)==="button";var e=t.required&&!t.details.some((function(t){return t.is_selected}))&&!t.visibility_condition;return r?this.renderButtonStyle("checkbox",t,e):o("div",{class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},this.renderOptionDetails("checkbox",t,e))};t.prototype.colorOption=function(t){var n=this;return o("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(i){return o("div",{class:"s-product-options-colors-item",key:i.id},o("input",{type:"radio",value:i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("color-".concat(n.productId,"-").concat(t.id,"-").concat(i.id))},o("span",{style:{backgroundColor:i.color}}),o("div",{innerHTML:n.getOptionDetailName(i,true,t.type)})))})))};t.prototype.thumbnailOption=function(t){var n=this;return o("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(i){return o("div",{key:i.id},o("input",{type:"radio",value:i.id,"data-itemid":i.id,required:!t.visibility_condition&&t.required,checked:i.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":i.option_value,disabled:n.canDisabled&&n.isOptionDetailOut(i),id:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)}}),o("label",{htmlFor:n.generateUniqueKey("option_".concat(n.productId,"-").concat(t.id,"_").concat(i.id)),"data-img-id":i.option_value,class:"go-to-slide"},o("img",{"data-src":i.image,src:i.image,title:i.name,alt:i.name}),o("span",{innerHTML:a,class:"s-product-options-thumbnails-icon"}),n.isOptionDetailOut(i)?[o("small",{key:i.id,class:"s-product-options-thumbnails-stock-badge"},n.outOfStockText),n.canDisabled?o("div",{key:i.id,class:"s-product-options-thumbnails-badge-overlay"}):""]:""),o("p",null,n.getOptionDetailName(i,false)," "))})))};t.prototype.digitalCardValuesOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},this.availableDigitalCardValues.length>0?this.availableDigitalCardValues.map((function(i){var r,e,a;var s=String(i.id);return o("label",{htmlFor:n.generateUniqueKey(s.toString()),key:s,class:"s-product-options-digital-card-option"},o("input",Object.assign({type:"radio","data-code-value":true,class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),id:n.generateUniqueKey(s.toString()),required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)}},!n.ignoreDefaultCardValue?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("span",null,i.name," ",(a=(e=salla.config)===null||e===void 0?void 0:e.currency())===null||a===void 0?void 0:a.symbol))})):o("div",{class:"s-product-options-digital-card-out-of-stock"}))};t.prototype.countryOption=function(t){var n=this;return o("div",{class:"s-product-options-digital-card-wrapper"},t.details.map((function(i){var r;return o("label",{htmlFor:n.generateUniqueKey(i.id.toString()),key:i.id,class:{"s-product-options-digital-card-option":true,"s-product-options-digital-card-option-stock-out":i.is_out}},o("input",Object.assign({id:n.generateUniqueKey(i.id.toString()),type:"radio",class:"s-form-control s-product-options-digital-card-input",value:i.id,name:"options[".concat(t.id,"]"),disabled:i.is_out,required:!t.visibility_condition&&t.required,onInvalid:function(i){return n.invalidHandler(i,t)},onChange:function(i){return n.changedHandler(i,t)},onClick:function(){n.disableCardValue=false}},salla.url.is_page("cart")?{defaultChecked:((r=n.getSelectedDigitalCardOptions(t))===null||r===void 0?void 0:r.id)===i.id}:{})),o("img",{loading:"lazy",alt:i.code,height:24,width:24,class:"s-product-options-country-flag",src:"https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/".concat(String(i.code).toLocaleLowerCase(),".svg")}),o("span",null,i.name))})))};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());p.style=d}}}));
5
+ //# sourceMappingURL=p-9a002229.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,H as r}from"./p-Dxu9oA9K.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(e=>{this.updateOfferValues(e)}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e){var t;if(!this.apiOfferData||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(this.apiOfferData,e.coupon)){this.canRender=false;return}this.canRender=true;if(((t=this.apiOfferData.details)===null||t===void 0?void 0:t.with_current_cart)===false){return}const r=e.sub_total;this.apiOfferData=Object.assign(Object.assign({},this.apiOfferData),{details:Object.assign(Object.assign({},this.apiOfferData.details),{current_value:r})});const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
- //# sourceMappingURL=p-64128588.entry.js.map
4
+ import{r as e,h as t,H as r}from"./p-86S6hMF9.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
5
+ //# sourceMappingURL=p-9a54ade1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DiscountType","TIERED_OFFER_CONFIG","staticIcons","StarIcon","StarsIcon","GoldIcon","DiamondIcon","staticColors","TierUtils","findTierByIndex","tiers","index","find","tier","findTierByName","tierName","tier_name","getTierNameByIndex","_a","this","findCurrentTierIndex","currentValue","i","length","threshold","sallaTieredOfferCss","SallaTieredOffer","constructor","hostRef","currentTierIndex","canRender","isLoading","handleTabClick","activeTabTier","salla","lang","onLoaded","loyaltyProgramText","get","currentTierText","discountText","benefitText","componentWillLoad","onReady","checkFeatureEnabled","checkCartExists","offerData","fetchTieredOfferData","initializeComponent","error","logger","warn","config","includes","_b","storage","summary","count","validateCouponCompatibility","cartCoupon","details","applied_with_coupon","data","api","cart","offers","tieredOffer","offer","type","coupon","apiOfferData","tieredOfferData","mapApiDataToTiers","title","current_value","currentTier","componentDidLoad","event","on","async","updatedCart","updateOfferValues","apiData","sortedDiscounts","discounts","sort","a","b","min_spend","map","discount","name","PERCENTAGE","helpers","number","value","money","icon","text_color","current_tier","freshOfferData","with_current_cart","newTierIndex","getLoadingSkeletonView","h","Host","class","height","width","getCurrentTierData","getProgressWidth","totalTiers","completedTiers","calculateMilestonePosition","milestonePercent","offsetPercent","Math","max","min","getMilestoneStyles","isRtl","document","documentElement","dir","adjustedPercent","alignItems","position","transform","getMilestoneIconStyles","isCurrent","isReached","color","renderProgressBarBackground","progressWidth","style","renderMilestoneIcon","iconClasses","filter","Boolean","join","innerHTML","renderMilestoneName","renderMilestones","containerClass","renderProgressBar","renderTabs","isActive","onClick","activeTier","render","currentTierData"],"sources":["src/components/salla-tiered-offer/interfaces.ts","src/components/salla-tiered-offer/constants.ts","src/components/salla-tiered-offer/utils.ts","src/components/salla-tiered-offer/salla-tiered-offer.scss?tag=salla-tiered-offer","src/components/salla-tiered-offer/salla-tiered-offer.tsx"],"sourcesContent":["export enum DiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n}\n\n\nexport interface Discount {\n name?: string;\n type?: DiscountType;\n value?: number;\n min_spend?: number;\n}\n\nexport interface TieredOfferDetails {\n based_on?: string;\n ends_at?: number;\n start_value?: number;\n end_value?: number;\n current_value?: number;\n discounts?: Discount[];\n with_current_cart?: boolean;\n applied_with_coupon?: boolean;\n}\n\nexport interface Offer {\n id?: number;\n type?: string;\n title?: string;\n description?: string;\n details?: TieredOfferDetails | null;\n}\n\nexport interface TieredOfferTier {\n name: string;\n tier_name: string;\n discount: string;\n icon: string;\n threshold: number;\n text_color?: string;\n index: number;\n}\n\nexport interface TieredOfferData {\n current_tier: string;\n tiers: TieredOfferTier[];\n}\n\nexport interface TieredOfferConfig {\n staticIcons: string[];\n staticColors: string[];\n}\n","import { TieredOfferConfig } from './interfaces';\nimport StarIcon from '../../assets/svg/star-rounded.svg';\nimport StarsIcon from '../../assets/svg/stars.svg';\nimport GoldIcon from '../../assets/svg/gold.svg';\nimport DiamondIcon from '../../assets/svg/diamond-02.svg';\n\nexport const TIERED_OFFER_CONFIG: TieredOfferConfig = {\n staticIcons: [StarIcon, StarsIcon, GoldIcon, DiamondIcon],\n staticColors: ['#993018', '#444444', '#D18F36', '#315F9C']\n};","import { TieredOfferTier } from './interfaces';\n\nexport class TierUtils {\n /**\n * Find tier by index\n */\n static findTierByIndex(tiers: TieredOfferTier[], index: number): TieredOfferTier | null {\n return tiers.find(tier => tier.index === index) || null;\n }\n\n /**\n * Find tier by tier name\n */\n static findTierByName(tiers: TieredOfferTier[], tierName: string): TieredOfferTier | null {\n return tiers.find(tier => tier.tier_name === tierName) || null;\n }\n\n /**\n * Get tier name by index\n */\n static getTierNameByIndex(tiers: TieredOfferTier[], index: number): string | undefined {\n return this.findTierByIndex(tiers, index)?.tier_name;\n }\n\n /**\n * Find current tier index based on current value\n */\n static findCurrentTierIndex(currentValue: number, tiers: TieredOfferTier[]): number {\n if (!tiers) return 0;\n \n for (let i = tiers.length - 1; i >= 0; i--) {\n if (currentValue >= tiers[i].threshold) {\n return tiers[i].index;\n }\n }\n return 0;\n }\n}","\n// SVG styling for milestone icons \n.s-tiered-offer-milestone-icon {\n svg {\n color: currentColor;\n \n path {\n stroke: currentColor;\n fill: none;\n }\n }\n \n // Active and completed states - fill the star icon, keep others as stroke\n &.s-tiered-offer-milestone-active,\n &.s-tiered-offer-milestone-completed {\n svg {\n path {\n fill: currentColor;\n stroke: none;\n }\n \n // For stroke-based icons (crown, stars, diamond) \n &[fill=\"none\"] path {\n fill: none;\n stroke: currentColor;\n }\n }\n }\n}\n\n// RTL Support \n[dir=\"rtl\"] {\n .s-tiered-offer-progress-wrapper {\n .s-tiered-offer-progress-bg {\n transform: scaleX(-1);\n }\n \n .s-tiered-offer-progress-fill {\n transform: scaleX(-1);\n left: auto;\n }\n }\n\n .flip-x {\n transform: scaleX(-1);\n }\n}\n","import { Component, Host, h, State } from '@stencil/core';\nimport { Offer, TieredOfferTier, TieredOfferData, DiscountType } from './interfaces';\nimport { TIERED_OFFER_CONFIG } from './constants';\nimport { TierUtils } from './utils';\n\n@Component({\n tag: 'salla-tiered-offer',\n styleUrl: 'salla-tiered-offer.scss',\n})\nexport class SallaTieredOffer {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.loyaltyProgramText = salla.lang.get('blocks.tiered_offer.program_title');\n this.currentTierText = salla.lang.get('blocks.tiered_offer.current_tier');\n this.discountText = salla.lang.get('blocks.tiered_offer.discount');\n this.benefitText = salla.lang.get('blocks.tiered_offer.tier_description');\n });\n }\n\n\n @State() tieredOfferData: TieredOfferData;\n @State() apiOfferData: Offer;\n @State() currentTierIndex: number = 0;\n @State() currentTier: string;\n @State() activeTabTier: string;\n\n @State() canRender: boolean = false;\n @State() isLoading: boolean = false;\n\n // Language strings\n @State() loyaltyProgramText: string;\n @State() currentTierText: string;\n @State() discountText: string;\n @State() benefitText: string;\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n \n if (!this.checkFeatureEnabled()) {\n return;\n }\n \n if (!this.checkCartExists()) {\n return;\n }\n \n this.isLoading = true;\n \n const offerData = await this.fetchTieredOfferData();\n if (!offerData) {\n return;\n }\n \n this.initializeComponent(offerData);\n \n } catch (error) {\n this.canRender = false;\n salla.logger.warn('salla-tiered-offer:: ', error);\n } finally {\n this.isLoading = false;\n }\n }\n \n private checkFeatureEnabled(): boolean {\n return salla.config.get('store.features')?.includes('tiered-offer');\n }\n \n private checkCartExists(): boolean {\n return !!salla.storage.get(\"cart\")?.summary?.count;\n }\n \n private validateCouponCompatibility(offerData: Offer, cartCoupon?: any): boolean {\n // If coupon is applied but offer doesn't support coupons, widget should be hidden\n return !(cartCoupon && !offerData.details?.applied_with_coupon);\n }\n \n private async fetchTieredOfferData(): Promise<Offer | null> {\n try {\n const { data }: { data: Offer[] } = await salla.api.cart.offers();\n const tieredOffer = data.find(offer => offer.type === \"tiered_offer\");\n \n if (!tieredOffer) {\n return null;\n }\n \n // Hide widget if coupon is applied and offer doesn't support coupons\n if (!this.validateCouponCompatibility(tieredOffer, salla.storage.get(\"cart\")?.coupon)) {\n this.canRender = false;\n return null;\n }\n \n return tieredOffer;\n } catch (error) {\n throw error;\n }\n }\n \n private initializeComponent(apiOfferData: Offer): void {\n this.apiOfferData = apiOfferData;\n \n // Map tiered details data to component format\n this.tieredOfferData = this.mapApiDataToTiers(this.apiOfferData);\n this.loyaltyProgramText = this.apiOfferData.title || this.loyaltyProgramText;\n \n // Find current tier index based on current_value from API\n const currentValue = this.apiOfferData.details?.current_value || 0;\n const currentTierIndex = this.findCurrentTierIndex(currentValue);\n \n // Only render if user has reached at least the first tier\n if (currentTierIndex === 0) {\n this.canRender = false;\n return;\n }\n \n this.currentTierIndex = currentTierIndex;\n this.currentTier = TierUtils.getTierNameByIndex(this.tieredOfferData.tiers, currentTierIndex);\n this.activeTabTier = this.currentTier;\n this.canRender = true;\n }\n\n componentDidLoad() {\n salla.event.on(\"cart::updated\", async (updatedCart) => {\n const offerData = await this.fetchTieredOfferData();\n if (offerData) {\n this.updateOfferValues(updatedCart, offerData);\n }\n });\n }\n\n private mapApiDataToTiers(apiData: Offer): TieredOfferData {\n // Sort discounts by min_spend to create proper tier order\n const sortedDiscounts = [...apiData.details.discounts].sort((a, b) => a.min_spend - b.min_spend);\n\n const tiers: TieredOfferTier[] = sortedDiscounts.map((discount, index) => ({\n name: discount.name, \n tier_name: discount.name, \n discount: discount.type === DiscountType.PERCENTAGE ? `${salla.helpers.number(discount.value)}%` : salla.money(discount.value),\n icon: TIERED_OFFER_CONFIG.staticIcons[index] || TIERED_OFFER_CONFIG.staticIcons[0], \n threshold: discount.min_spend,\n text_color: TIERED_OFFER_CONFIG.staticColors[index], \n index: index + 1\n }));\n\n return {\n current_tier: TierUtils.getTierNameByIndex(tiers, this.findCurrentTierIndex(apiData.details.current_value, tiers)),\n tiers\n };\n }\n\n private findCurrentTierIndex(currentValue: number, tiers = this.tieredOfferData?.tiers): number {\n return TierUtils.findCurrentTierIndex(currentValue, tiers || []);\n }\n\n private updateOfferValues(updatedCart: { items: any[], sub_total: number, coupon?: any }, freshOfferData: Offer) {\n if (!freshOfferData || !this.tieredOfferData) {\n return;\n }\n\n // Check coupon compatibility\n if (!this.validateCouponCompatibility(freshOfferData, updatedCart.coupon)) {\n this.canRender = false;\n return;\n }\n\n // If no coupon conflict, show widget\n this.canRender = true;\n\n // Check if this offer should update with cart changes\n if (freshOfferData.details?.with_current_cart === false) {\n return;\n }\n\n // Update current_value in API offer data\n // const currentValue = updatedCart.sub_total;\n // console.log('currentValue #####3', currentValue);\n // this.apiOfferData = {\n // ...this.apiOfferData,\n // details: {\n // ...this.apiOfferData.details,\n // current_value: currentValue\n // }\n // };\n\n // Use current_value from fresh API data instead of cart sub_total\n const currentValue = freshOfferData.details?.current_value || 0;\n this.apiOfferData = freshOfferData;\n\n // Update current tier based on new value\n const newTierIndex = this.findCurrentTierIndex(currentValue);\n\n // Check if user qualifies for any tier\n if (newTierIndex === 0) {\n this.canRender = false;\n return;\n }\n\n // user qualifies show widget\n this.canRender = true;\n this.currentTierIndex = newTierIndex;\n this.currentTier = TierUtils.getTierNameByIndex(this.tieredOfferData.tiers, newTierIndex);\n\n // Update active tab if needed\n if (this.activeTabTier !== this.currentTier) {\n this.activeTabTier = this.currentTier;\n }\n }\n\n private getLoadingSkeletonView() {\n return <Host>\n <div class=\"s-tiered-offer-container\">\n <div class=\"s-tiered-offer-skeleton-wrapper\">\n <div class=\"s-tiered-offer-skeleton-title\">\n <salla-skeleton height=\"16px\" width=\"40%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-subtitle\">\n <salla-skeleton height=\"20px\" width=\"60%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-progress\">\n <salla-skeleton height=\"16px\" width=\"100%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-tabs\">\n <salla-skeleton height=\"50px\" width=\"100%\" />\n </div>\n </div>\n </div>\n </Host>\n }\n\n private getCurrentTierData(): TieredOfferTier {\n return TierUtils.findTierByIndex(this.tieredOfferData.tiers, this.currentTierIndex) || this.tieredOfferData.tiers[0];\n }\n\n private getProgressWidth(): number {\n const currentValue = this.apiOfferData.details?.current_value || 0;\n const totalTiers = this.tieredOfferData.tiers.length;\n \n // Use existing method to find current tier index (which already handles the logic)\n const currentTierIndex = this.findCurrentTierIndex(currentValue);\n \n // Convert to 0-based index for progress calculation\n const completedTiers = currentTierIndex;\n return (completedTiers / totalTiers) * 100;\n }\n\n private handleTabClick = (tierName: string) => {\n this.activeTabTier = tierName;\n }\n \n private calculateMilestonePosition(index: number, totalTiers: number): string {\n if (totalTiers === 1) {\n return 'calc(100% - 18px)';\n }\n const milestonePercent = ((index + 1) / totalTiers) * 100;\n const offsetPercent = 8 / totalTiers;\n return `${Math.max(2, Math.min(95, milestonePercent - offsetPercent))}%`;\n }\n \n private getMilestoneStyles(tier: TieredOfferTier, index: number, totalTiers: number) {\n const isRtl = document.documentElement.dir === 'rtl';\n const adjustedPercent = this.calculateMilestonePosition(index, totalTiers);\n const alignItems = tier.name.length > 6 ? 'flex-end' : 'center';\n \n return {\n [isRtl ? 'right' : 'left']: adjustedPercent,\n alignItems,\n position: 'absolute' as const,\n transform: isRtl ? 'translateX(50%)' : 'translateX(-50%)'\n };\n }\n \n private getMilestoneIconStyles(tier: TieredOfferTier, isCurrent: boolean, isReached: boolean) {\n if (isCurrent) {\n return { color: tier.text_color };\n }\n if (isReached) {\n return { color: 'var(--color-primary)' };\n }\n return {};\n }\n \n private renderProgressBarBackground(progressWidth: number) {\n return [\n <div class=\"s-tiered-offer-progress-bg\"></div>,\n <div \n class=\"s-tiered-offer-progress-fill\"\n style={{ width: `${progressWidth}%` }}>\n </div>\n ];\n }\n \n private renderMilestoneIcon(tier: TieredOfferTier, isCurrent: boolean, isReached: boolean) {\n const iconClasses = [\n 's-tiered-offer-milestone-icon',\n isCurrent ? 's-tiered-offer-milestone-active' : '',\n isReached ? 's-tiered-offer-milestone-completed' : ''\n ].filter(Boolean).join(' ');\n \n return (\n <div \n class={iconClasses}\n style={this.getMilestoneIconStyles(tier, isCurrent, isReached)}>\n <span innerHTML={tier.icon}></span>\n </div>\n );\n }\n \n private renderMilestoneName(tier: TieredOfferTier, isCurrent: boolean) {\n return (\n <div class=\"s-tiered-offer-milestone-name\">\n {isCurrent && (\n <span style={{ color: tier.text_color }}>\n {tier.name}\n </span>\n )}\n </div>\n );\n }\n \n private renderMilestones(currentValue: number, totalTiers: number) {\n const containerClass = totalTiers === 1 \n ? 's-tiered-offer-single-milestone-justify-end' \n : 's-tiered-offer-milestones';\n \n return (\n <div class=\"s-tiered-offer-milestones-wrapper\">\n <div class={containerClass}>\n {this.tieredOfferData.tiers.map((tier, index) => {\n const isReached = currentValue >= tier.threshold;\n const isCurrent = tier.tier_name === this.currentTier;\n \n return (\n <div \n class=\"s-tiered-offer-milestone\"\n style={this.getMilestoneStyles(tier, index, totalTiers)}>\n {this.renderMilestoneIcon(tier, isCurrent, isReached)}\n {this.renderMilestoneName(tier, isCurrent)}\n </div>\n );\n })}\n </div>\n </div>\n );\n }\n\n private renderProgressBar() {\n const progressWidth = this.getProgressWidth();\n const totalTiers = this.tieredOfferData.tiers.length;\n const currentValue = this.apiOfferData.details?.current_value || 0;\n\n return (\n <div class=\"s-tiered-offer-progress-container\">\n <div class=\"s-tiered-offer-progress-wrapper\">\n {this.renderProgressBarBackground(progressWidth)}\n {this.renderMilestones(currentValue, totalTiers)}\n </div>\n </div>\n );\n }\n\n private renderTabs() {\n return (\n <div class=\"s-tiered-offer-tabs-container\">\n {/* Tab Headers */}\n <div class=\"s-tiered-offer-tab-headers\">\n {this.tieredOfferData.tiers.map(tier => {\n const isActive = tier.tier_name === this.activeTabTier;\n return (\n <button \n class={`s-tiered-offer-tab-header ${isActive ? 's-tiered-offer-tab-active' : ''}`}\n onClick={() => this.handleTabClick(tier.tier_name)}>\n <span>{tier.name}</span>\n </button>\n );\n })}\n </div>\n\n {/* Tab Content */}\n <div class=\"s-tiered-offer-tab-content-wrapper\">\n {(() => {\n const activeTier = TierUtils.findTierByName(this.tieredOfferData.tiers, this.activeTabTier);\n if (!activeTier) return null;\n \n return (\n <div class=\"s-tiered-offer-tab-content\">\n <div class=\"s-tiered-offer-tab-content-inner\">\n <div class=\"s-tiered-offer-discount-section\">\n <p class=\"s-tiered-offer-discount-title\">\n {this.discountText} <span innerHTML={activeTier.discount}></span>\n </p>\n <p class=\"s-tiered-offer-benefit-description\">\n {this.benefitText} {activeTier.name}\n </p>\n </div>\n </div>\n </div>\n );\n })()}\n </div>\n </div>\n );\n }\n\n render() {\n \n if (this.isLoading) {\n return this.getLoadingSkeletonView();\n }\n\n if (!this.canRender || !this.tieredOfferData) {\n return null;\n }\n \n\n const currentTierData = this.getCurrentTierData();\n\n return (\n <Host>\n <div class=\"s-tiered-offer-container\">\n {/* Header Section */}\n <div class=\"s-tiered-offer-header\">\n <div class=\"s-tiered-offer-header-content\">\n <p class=\"s-tiered-offer-program-title\">{this.loyaltyProgramText}</p>\n <div class=\"s-tiered-offer-current-tier-name-wrapper\">\n <h2 class=\"s-tiered-offer-current-tier\">\n {this.currentTierText} <span class=\"s-tiered-offer-tier-name\">{currentTierData.name}</span>\n </h2>\n <span innerHTML={currentTierData.icon}></span>\n </div>\n </div>\n </div>\n\n {/* Progress Bar */}\n {this.renderProgressBar()}\n\n {/* Tabs */}\n {this.renderTabs()}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":";;;kDAAA,IAAYA,GAAZ,SAAYA,GACVA,EAAA,2BACAA,EAAA,gBACD,EAHD,CAAYA,MAGX,K,20ICGM,MAAMC,EAAyC,CACpDC,YAAa,CAACC,EAAUC,EAAWC,EAAUC,GAC7CC,aAAc,CAAC,UAAW,UAAW,UAAW,Y,MCNrCC,EAIX,sBAAOC,CAAgBC,EAA0BC,GAC/C,OAAOD,EAAME,MAAKC,GAAQA,EAAKF,QAAUA,KAAU,I,CAMrD,qBAAOG,CAAeJ,EAA0BK,GAC9C,OAAOL,EAAME,MAAKC,GAAQA,EAAKG,YAAcD,KAAa,I,CAM5D,yBAAOE,CAAmBP,EAA0BC,G,MAClD,OAAOO,EAAAC,KAAKV,gBAAgBC,EAAOC,MAAQ,MAAAO,SAAA,SAAAA,EAAAF,S,CAM7C,2BAAOI,CAAqBC,EAAsBX,GAChD,IAAKA,EAAO,OAAO,EAEnB,IAAK,IAAIY,EAAIZ,EAAMa,OAAS,EAAGD,GAAK,EAAGA,IAAK,CAC1C,GAAID,GAAgBX,EAAMY,GAAGE,UAAW,CACtC,OAAOd,EAAMY,GAAGX,K,EAGpB,OAAO,C,ECnCX,MAAMc,EAAsB,yzB,MCSfC,EAAgB,MAE3B,WA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AgBrD,UAMtC9E,KAAK6H,oBAGL7H,KAAK8H,c","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,r,e,n){function s(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function i(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?e(t.value):s(t.value).then(a,i)}l((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(r){return l([t,r])}}function l(i){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,i[0]&&(e=0)),e)try{if(n=1,s&&(o=i[0]&2?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;if(s=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:e.label++;return{value:i[1],done:false};case 5:e.label++;s=i[1];i=[0];continue;case 7:i=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){e.label=i[1];break}if(i[0]===6&&e.label<o[1]){e.label=o[1];o=i;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(i);break}if(o[2])e.ops.pop();e.trys.pop();continue}i=r.call(t,e)}catch(t){i=[6,t];s=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-BV4kErtd.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,e,n,s;return{setters:[function(t){r=t.r;e=t.h;n=t.g},function(t){s=t.H},null],execute:function(){var o=":host{display:block}";var a=t("salla_orders",function(){function t(t){var e=this;r(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var r;var e=(r=this.status)===null||r===void 0?void 0:r.querySelector(".s-button-text");if(e){s.toggleElementClassIf(e,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var r,e,n;if(!this.hasInfiniteScroll){return}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(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(r){t.loading()}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(r){var e,n;t.loading(false);t.pagination=r.pagination;t.nextPage=((n=(e=r.pagination)===null||e===void 0?void 0:e.links)===null||n===void 0?void 0:n.next)||null;t.handleResponse(r.data).forEach((function(r){t.wrapper.append(r)}));var o=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(o)}));(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var r=this;return t.map((function(t){return r.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(e){switch(e.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var e,n,o,a;r.orders=t.data;r.hasInfiniteScroll=!!((e=t.pagination)===null||e===void 0?void 0:e.links.next);r.pagination=t.pagination;r.total=(n=t.pagination)===null||n===void 0?void 0:n.total;r.nextPage=((a=(o=t.pagination)===null||o===void 0?void 0:o.links)===null||a===void 0?void 0:a.next)||null;if(!r.orders.length){r.showPlaceholder=true;return r.loading(false)}setTimeout((function(){r.handleResponse(t.data).forEach((function(t){r.wrapper.append(t)}));r.initiateInfiniteScroll();var e=r.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(e)}),100)})).catch((function(t){r.showPlaceholder=true;r.loading(false);salla.logger.error(t)}))];case 1:e.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var r=document.createElement("tr");r.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var e=document.createElement("td");e.classList.add("s-orders-table-tbody-tr-td");var n=document.createElement("div");n.classList.add("s-orders-table-tbody-tr-td-content");var o=document.createElement("span");o.classList.add("s-orders-mobile-title");o.textContent=this.orderNumberText+":";var a=document.createElement("span");a.classList.add("s-orders-reference-id");a.textContent="#"+t.reference_id;n.appendChild(o);n.appendChild(a);if(t.source=="buy_as_gift"){var i=document.createElement("i");i.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");n.appendChild(i)}var l=document.createElement("a");l.href=t.url;n.appendChild(l);var u=document.createElement("div");u.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){s.copyToClipboard(t);s.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){s.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var c=document.createElement("span");c.textContent="#"+t.reference_id;var f=document.createElement("i");f.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(f);d.appendChild(c)}else{d.appendChild(c);d.appendChild(f)}u.appendChild(d);n.appendChild(u);e.appendChild(n);r.appendChild(e);var v=document.createElement("td");v.classList.add("s-orders-table-tbody-tr-td");var b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");var m=document.createElement("span");m.classList.add("s-orders-mobile-title");m.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var y=document.createElement("a");y.href=t.url;b.appendChild(m);b.appendChild(p);b.appendChild(y);v.appendChild(b);r.appendChild(v);var _=document.createElement("td");_.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var w=document.createElement("span");w.classList.add("s-orders-mobile-title");w.textContent=this.orderDateText+":";var k=document.createElement("div");k.textContent=s.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var x=document.createElement("a");x.href=t.url;g.appendChild(w);g.appendChild(k);g.appendChild(x);_.appendChild(g);r.appendChild(_);var j=document.createElement("td");j.classList.add("s-orders-table-tbody-tr-td");var C=document.createElement("div");C.classList.add("s-orders-table-tbody-tr-td-content");var S=document.createElement("span");S.classList.add("s-orders-mobile-title");S.textContent=this.orderStatusText+":";var T=document.createElement("span");T.classList.add("s-orders-status-container");T.style.color=t.status.color;var E=document.createElement("i");E.classList.add(t.status.icon);var O=document.createElement("span");O.textContent=t.status.name;T.appendChild(E);T.appendChild(O);C.appendChild(S);C.appendChild(T);var q=document.createElement("i");q.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");C.appendChild(q);var G=document.createElement("a");G.href=t.url;C.appendChild(G);j.appendChild(C);r.appendChild(j);return r};t.prototype.render=function(){var t=this;var r;if(this.showPlaceholder){return e("div",{class:"s-orders-no-content"},e("i",{class:"sicon-packed-box icon"}),e("p",null,this.noOrderText))}return e("div",{class:"s-orders-wrapper"},e("table",{class:"s-orders-table"},e("thead",{class:"s-orders-table-head"},e("tr",{class:"s-orders-table-head-tr"},e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),e("tbody",{class:"s-orders-table-tbody",ref:function(r){return t.wrapper=r}})),this.nextPage&&e("div",{class:"s-infinite-scroll-wrapper",ref:function(r){return t.status=r}},e("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},e("span",{class:"s-button-text s-infinite-scroll-btn-text"},(r=this.loadMoreText)!==null&&r!==void 0?r:this.load_more_text_trans),e("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(r){return t.btnLoader=r},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
5
- //# sourceMappingURL=p-b3451de7.system.entry.js.map
4
+ */System.register(["./p-DSJ3vZFd.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,e,n,s;return{setters:[function(t){r=t.r;e=t.h;n=t.g},function(t){s=t.H},null],execute:function(){var o=":host{display:block}";var a=t("salla_orders",function(){function t(t){var e=this;r(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var r;var e=(r=this.status)===null||r===void 0?void 0:r.querySelector(".s-button-text");if(e){s.toggleElementClassIf(e,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var r,e,n;if(!this.hasInfiniteScroll){return}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(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(r){t.loading()}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(r){var e,n;t.loading(false);t.pagination=r.pagination;t.nextPage=((n=(e=r.pagination)===null||e===void 0?void 0:e.links)===null||n===void 0?void 0:n.next)||null;t.handleResponse(r.data).forEach((function(r){t.wrapper.append(r)}));var o=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(o)}));(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var r=this;return t.map((function(t){return r.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(e){switch(e.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var e,n,o,a;r.orders=t.data;r.hasInfiniteScroll=!!((e=t.pagination)===null||e===void 0?void 0:e.links.next);r.pagination=t.pagination;r.total=(n=t.pagination)===null||n===void 0?void 0:n.total;r.nextPage=((a=(o=t.pagination)===null||o===void 0?void 0:o.links)===null||a===void 0?void 0:a.next)||null;if(!r.orders.length){r.showPlaceholder=true;return r.loading(false)}setTimeout((function(){r.handleResponse(t.data).forEach((function(t){r.wrapper.append(t)}));r.initiateInfiniteScroll();var e=r.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(e)}),100)})).catch((function(t){r.showPlaceholder=true;r.loading(false);salla.logger.error(t)}))];case 1:e.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var r=document.createElement("tr");r.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var e=document.createElement("td");e.classList.add("s-orders-table-tbody-tr-td");var n=document.createElement("div");n.classList.add("s-orders-table-tbody-tr-td-content");var o=document.createElement("span");o.classList.add("s-orders-mobile-title");o.textContent=this.orderNumberText+":";var a=document.createElement("span");a.classList.add("s-orders-reference-id");a.textContent="#"+t.reference_id;n.appendChild(o);n.appendChild(a);if(t.source=="buy_as_gift"){var i=document.createElement("i");i.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");n.appendChild(i)}var l=document.createElement("a");l.href=t.url;n.appendChild(l);var u=document.createElement("div");u.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){s.copyToClipboard(t);s.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){s.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var c=document.createElement("span");c.textContent="#"+t.reference_id;var f=document.createElement("i");f.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(f);d.appendChild(c)}else{d.appendChild(c);d.appendChild(f)}u.appendChild(d);n.appendChild(u);e.appendChild(n);r.appendChild(e);var v=document.createElement("td");v.classList.add("s-orders-table-tbody-tr-td");var b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");var m=document.createElement("span");m.classList.add("s-orders-mobile-title");m.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var y=document.createElement("a");y.href=t.url;b.appendChild(m);b.appendChild(p);b.appendChild(y);v.appendChild(b);r.appendChild(v);var _=document.createElement("td");_.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var w=document.createElement("span");w.classList.add("s-orders-mobile-title");w.textContent=this.orderDateText+":";var k=document.createElement("div");k.textContent=s.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var x=document.createElement("a");x.href=t.url;g.appendChild(w);g.appendChild(k);g.appendChild(x);_.appendChild(g);r.appendChild(_);var j=document.createElement("td");j.classList.add("s-orders-table-tbody-tr-td");var S=document.createElement("div");S.classList.add("s-orders-table-tbody-tr-td-content");var C=document.createElement("span");C.classList.add("s-orders-mobile-title");C.textContent=this.orderStatusText+":";var T=document.createElement("span");T.classList.add("s-orders-status-container");T.style.color=t.status.color;var O=document.createElement("i");O.classList.add(t.status.icon);var q=document.createElement("span");q.textContent=t.status.name;T.appendChild(O);T.appendChild(q);S.appendChild(C);S.appendChild(T);var E=document.createElement("i");E.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");S.appendChild(E);var F=document.createElement("a");F.href=t.url;S.appendChild(F);j.appendChild(S);r.appendChild(j);return r};t.prototype.render=function(){var t=this;var r;if(this.showPlaceholder){return e("div",{class:"s-orders-no-content"},e("i",{class:"sicon-packed-box icon"}),e("p",null,this.noOrderText))}return e("div",{class:"s-orders-wrapper"},e("table",{class:"s-orders-table"},e("thead",{class:"s-orders-table-head"},e("tr",{class:"s-orders-table-head-tr"},e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),e("tbody",{class:"s-orders-table-tbody",ref:function(r){return t.wrapper=r}})),this.nextPage&&e("div",{class:"s-infinite-scroll-wrapper",ref:function(r){return t.status=r}},e("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},e("span",{class:"s-button-text s-infinite-scroll-btn-text"},(r=this.loadMoreText)!==null&&r!==void 0?r:this.load_more_text_trans),e("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(r){return t.btnLoader=r},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
5
+ //# sourceMappingURL=p-9f93237a.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-Dzux6KMv.system.js","sources":["../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","src/Helpers/masonry-layout.ts","src/components/salla-reviews-page/salla-reviews-page.css?tag=salla-reviews-page","src/components/salla-reviews-page/salla-reviews-page.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from \"lodash/throttle\";\n\nexport class MasonryLayout {\n\tprivate mutationObserver: MutationObserver;\n\tprivate resizeObserver: ResizeObserver;\n\n\tconstructor(private grid: Element) {\n\t\tthis.mutationObserver = new MutationObserver(this.onContainerMutation);\n\t\tthis.resizeObserver = new ResizeObserver(this.onChildrenResize);\n\n\t\tif (CSS.supports(\"grid-template-rows\", \"masonry\") === false) {\n\t\t\tthis.create();\n\t\t}\n\t}\n\n\tprivate create = () => {\n\t\tthis.mutationObserver.observe(this.grid, {\n\t\t\tchildList: true,\n\t\t});\n\n\t\tfor (const item of Array.from(this.grid.children)){\n\t\t\tthis.resizeObserver.observe(item);\n\t\t};\n\t};\n\n\tprivate onContainerMutation = (mutations: MutationRecord[]) => {\n\t\tconst removedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.removedNodes),\n\t\t);\n\t\tconst addedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.addedNodes),\n\t\t);\n\n\t\tfor (const node of removedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.unobserve(node);\n\t\t\t}\n\t\t}\n\n\t\tfor (const node of addedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.observe(node);\n\t\t\t}\n\t\t}\n\n\t\tif (removedNodes.length > 0 && addedNodes.length === 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tprivate onChildrenResize = (entries: ResizeObserverEntry[]) => {\n\t\tconst entriesToUpdate = entries.filter(\n\t\t\t(entry) => entry.target.parentElement !== null,\n\t\t);\n\n\t\tif (entriesToUpdate.length > 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tupdate = throttle(() => {\n\t\tconst computedStyle = window.getComputedStyle(this.grid);\n\n\t\tif (computedStyle.getPropertyValue(\"display\").includes(\"grid\") === false) {\n\t\t\tthis.clean();\n\t\t\treturn;\n\t\t}\n\n\t\tconst columns = parseGridTemplateColumns(this.grid);\n\n\t\tif (columns.length <= 1) {\n\t\t\tthis.clean();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst rowGap =\n\t\t\tNumber.parseFloat(computedStyle.getPropertyValue(\"row-gap\").trim()) || 0;\n\n\t\tconst items = Array.from(this.grid.children) as HTMLElement[];\n\n\t\tfor (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n\t\t\tconst firstItemInColumn = items[columnIndex];\n\n\t\t\tfirstItemInColumn?.style.removeProperty(\"margin-top\");\n\t\t}\n\n\t\tfor (let index = 0; index < items.length; index++) {\n\t\t\tconst prevItem = items[index - columns.length];\n\t\t\tconst nextItem = items[index];\n\n\t\t\tif (prevItem !== undefined && nextItem !== undefined) {\n\t\t\t\tconst prevBottom = prevItem.getBoundingClientRect().bottom;\n\n\t\t\t\tnextItem.style.removeProperty(\"margin-top\");\n\n\t\t\t\tconst nextTop = nextItem.getBoundingClientRect().top;\n\n\t\t\t\tif (nextTop - rowGap !== prevBottom) {\n\t\t\t\t\tconst margin =\n\t\t\t\t\t\tMath.round(\n\t\t\t\t\t\t\t(prevBottom - (nextTop - rowGap) + Number.EPSILON) * 100,\n\t\t\t\t\t\t) / 100;\n\n\t\t\t\t\tnextItem.style.setProperty(\"margin-top\", `${margin}px`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, 32);\n\n\tdestroy = () => {\n\t\tthis.resizeObserver.disconnect();\n\t\tthis.mutationObserver.disconnect();\n\t\tthis.clean();\n\t};\n\n\tprivate clean = () => {\n\t\tfor ( const item of (Array.from(this.grid.children) as HTMLElement[])){\n\t\t\titem.style.removeProperty(\"margin-top\");\n\t\t}\n\t};\n\n\t[Symbol.dispose]() {\n\t\tthis.destroy();\n\t}\n}\n\nfunction parseGridTemplateColumns(grid: Element) {\n\tconst computedStyle = window.getComputedStyle(grid);\n\n\tconst gridTemplateColumns = computedStyle.getPropertyValue(\n\t\t\"grid-template-columns\",\n\t);\n\n\treturn gridTemplateColumns\n\t\t.trim()\n\t\t.split(/\\s+(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/);\n}",":host {\n display: block;\n}","import { Component, State, Element, h } from '@stencil/core';\nimport type { Review } from '../salla-review-card/interfaces';\nimport type { Pagination } from '../../interfaces/common';\nimport ShoppingBag from '../../assets/svg/shopping-bag.svg';\nimport Helper from '../../Helpers/Helper';\nimport { MasonryLayout } from '../../Helpers/masonry-layout';\n\n\n@Component({\n tag: 'salla-reviews-page',\n styleUrl: 'salla-reviews-page.css',\n})\nexport class SallaReviewsPage {\n @Element() el: HTMLElement;\n @State() reviews: Partial<Review>[] = [];\n @State() isLoading = false;\n @State() pagination: Pagination = null;\n @State() sort: \"top_rating\" | \"bottom_rating\" | \"latest\" | \"oldest\" = \"latest\";\n\n // Language variables\n private langTitlesReviews: string;\n private langRatingReviews: string;\n private langSorting: string;\n private langSortByTopRating: string;\n private langSortByMostRecent: string;\n private langSortByLeastRecent: string;\n private langSortByLeastRated: string;\n\n private langLoadMore: string;\n private placeholderText: string;\n\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n private getUrlParams() {\n const params = new URLSearchParams(window.location.search);\n return {\n sort: params.get('sort') as typeof this.sort || null,\n page: Number.parseInt(params.get('page')) || 1\n };\n }\n\n private updateUrlParams(params: { sort?: string, page?: number }) {\n const url = new URL(window.location.href);\n for (const [key, value] of Object.entries(params)) {\n if (value) {\n url.searchParams.set(key, value.toString());\n } else {\n url.searchParams.delete(key);\n }\n };\n window.history.replaceState({}, '', url.toString());\n }\n\n private fetchReviews(sort?: typeof this.sort, page?: number) {\n const urlParams = this.getUrlParams();\n return salla.api.request('reviews', {\n params: {\n type: 'products',\n format: 'lite',\n per_page: 8,\n page: page || urlParams.page || 1,\n sort: sort || urlParams.sort || null\n }\n });\n }\n\n\n private async initializeMasonry() {\n const grid = this.el.querySelector('.s-reviews-page-grid');\n if (!grid) return;\n\n try {\n new MasonryLayout(grid);\n salla.logger.info('Masonry initialized successfully');\n } catch (error) {\n salla.logger.error('Masonry initialization failed:', error);\n }\n }\n private animateReviewCards() {\n const items = this.wrapper.querySelectorAll('salla-review-card:not(.animated)');\n Helper.animateItems(items);\n }\n\n private initiateInfiniteScroll() {\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.pagination?.links?.next || null,\n history: false,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', () => {\n this.isLoading = true;\n });\n\n this.infiniteScroll?.on('load', response => {\n this.pagination = response.pagination;\n this.reviews = [...this.reviews, ...response.data]\n this.isLoading = false;\n // Update URL with the current page\n this.updateUrlParams({ page: response.pagination.current_page });\n\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more reviews:', e);\n this.isLoading = false;\n });\n }\n\n\n componentDidRender() {\n setTimeout(() => {\n requestAnimationFrame(this.animateReviewCards.bind(this))\n }, 176)\n }\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n\n // Initialize language variables\n this.langTitlesReviews = salla.lang.get(\"common.titles.reviews\");\n this.langSorting = salla.lang.get('pages.categories.sorting');\n this.placeholderText = salla.lang.choice(\"pages.rating.reviews\", 0)\n this.langLoadMore = salla.lang.get('common.elements.load_more');\n this.langSortByTopRating = salla.lang.get('pages.testimonials.sort_by_rating_desc');\n this.langSortByMostRecent = salla.lang.get('pages.testimonials.sort_by_date_desc');\n this.langSortByLeastRated = salla.lang.get('pages.testimonials.sort_by_rating_asc');\n this.langSortByLeastRecent = salla.lang.get('pages.testimonials.sort_by_date_asc');\n\n const urlParams = this.getUrlParams();\n const response = await this.fetchReviews(urlParams.sort);\n this.sort = urlParams.sort;\n this.reviews = response.data\n this.pagination = response.pagination;\n this.langRatingReviews = salla.lang.choice(\"pages.rating.reviews\", this.pagination?.total);\n\n\n\n } catch (error) {\n salla.logger.error('Error loading reviews:', error);\n }\n }\n\n private async handleSorting(e: Event) {\n const value = (e.target as HTMLSelectElement).value as typeof this.sort;\n this.sort = value;\n this.updateUrlParams({ sort: value, page: 1 }); // Reset to page 1 when changing sort\n const response = await this.fetchReviews(value, 1);\n this.reviews = response.data\n this.pagination = response.pagination;\n }\n\n async componentDidLoad() {\n await this.initializeMasonry();\n this.initiateInfiniteScroll();\n this.sort = this.getUrlParams().sort || \"latest\";\n this.updateUrlParams({ sort: this.sort, page: 1 });\n }\n\n disconnectedCallback() {\n if (this.infiniteScroll) {\n this.infiniteScroll.destroy();\n }\n }\n\n private renderSortingOptions() {\n const options = [\n { value: 'latest', label: this.langSortByMostRecent },\n { value: 'oldest', label: this.langSortByLeastRecent },\n { value: 'top_rating', label: this.langSortByTopRating },\n { value: 'bottom_rating', label: this.langSortByLeastRated },\n ];\n return options.map(option => (\n <option key={option.value} value={option.value} selected={option.value === this.sort}>\n {option.label}\n </option>\n ));\n }\n\n\n render() {\n return (\n <host>\n <div class=\"s-reviews-page-header-wrapper\">\n <h2 class=\"s-reviews-page-title\">{this.langTitlesReviews}<span class=\"s-reviews-page-count\">({this.langRatingReviews})</span></h2>\n <div class=\"s-reviews-page-filter-wrapper\">\n <label class=\"s-reviews-page-filter-label\"\n htmlFor=\"testimonials-filter\">{this.langSorting}</label>\n <select onChange={(e) => this.handleSorting(e)} disabled={!this.reviews.length} class=\"s-reviews-page-filter\">\n {this.renderSortingOptions()}\n </select>\n </div>\n </div>\n {this.reviews.length ? <main class=\"s-reviews-page-grid\" ref={el => {\n this.wrapper = el\n }}>\n {this.reviews.map(review => (\n <salla-review-card\n key={review.id}\n review={review}\n />\n ))}\n </main>\n : <div class=\"s-products-list-placeholder\">\n <span innerHTML={ShoppingBag} />\n <p>{this.placeholderText}</p>\n </div>\n }\n {this.pagination?.links?.next && this.reviews.length ? (\n\n <div class=\"s-reviews-page-load-more-container\">\n <salla-button class=\"s-reviews-page-load-more-btn\" loading={this.isLoading} onClick={() => this.infiniteScroll?.loadNextPage()}\n onKeyUp={() => this.infiniteScroll?.loadNextPage()}>\n {this.langLoadMore}\n </salla-button>\n </div>\n ) : null}\n </host>\n );\n }\n}"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAA,IAAI,IAAI,GAAGA,YAAkB,EAAA;;MAE7B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;OACA,IAAI,GAAG,GAAG,WAAW;MACrB,GAAE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACvB;;MAED,CAAA,KAAc,GAAG,GAAG;;;;;;;;;;;;OCrBpB,IAAI,YAAY,GAAG,IAAI;;MAEvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;OACA,SAAS,eAAe,CAAC,MAAM,EAAE;MACjC,GAAE,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM;;MAE3B,GAAE,OAAO,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;MAC7D,GAAE,OAAO,KAAK;MACd;;MAEA,CAAA,gBAAc,GAAG,eAAe;;;;;;;;;;OClBhC,IAAI,eAAe,GAAGA,uBAA6B,EAAA;;MAEnD;OACA,IAAI,WAAW,GAAG,MAAM;;MAExB;MACA;MACA;MACA;MACA;MACA;MACA;OACA,SAAS,QAAQ,CAAC,MAAM,EAAE;MAC1B,GAAE,OAAO;MACT,OAAM,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE;MAC1E,OAAM,MAAM;MACZ;;MAEA,CAAA,SAAc,GA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EAAE,WAAW,EAAI,CAAA,EAChC,CAAA,CAAA,GAAA,EAAA,IAAA,EAAI,IAAI,CAAC,eAAe,CAAK,CACzB,EAEP,CAAA,CAAA,EAAA,GAAA,MAAA,IAAI,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,KAAI,IAAI,CAAC,OAAO,CAAC,MAAM,IAElD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAK,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,EAC5H,OAAO,EAAE,QAAM,IAAA,EAAA,CAAA,CAAA,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,IACjD,IAAI,CAAC,YAAY,CACL,CACX,IACJ,IAAI,CACH;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"p-B0THOn7q.system.js","sources":["../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","src/Helpers/masonry-layout.ts","src/components/salla-reviews-page/salla-reviews-page.css?tag=salla-reviews-page","src/components/salla-reviews-page/salla-reviews-page.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from \"lodash/throttle\";\n\nexport class MasonryLayout {\n\tprivate mutationObserver: MutationObserver;\n\tprivate resizeObserver: ResizeObserver;\n\n\tconstructor(private grid: Element) {\n\t\tthis.mutationObserver = new MutationObserver(this.onContainerMutation);\n\t\tthis.resizeObserver = new ResizeObserver(this.onChildrenResize);\n\n\t\tif (CSS.supports(\"grid-template-rows\", \"masonry\") === false) {\n\t\t\tthis.create();\n\t\t}\n\t}\n\n\tprivate create = () => {\n\t\tthis.mutationObserver.observe(this.grid, {\n\t\t\tchildList: true,\n\t\t});\n\n\t\tfor (const item of Array.from(this.grid.children)){\n\t\t\tthis.resizeObserver.observe(item);\n\t\t};\n\t};\n\n\tprivate onContainerMutation = (mutations: MutationRecord[]) => {\n\t\tconst removedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.removedNodes),\n\t\t);\n\t\tconst addedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.addedNodes),\n\t\t);\n\n\t\tfor (const node of removedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.unobserve(node);\n\t\t\t}\n\t\t}\n\n\t\tfor (const node of addedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.observe(node);\n\t\t\t}\n\t\t}\n\n\t\tif (removedNodes.length > 0 && addedNodes.length === 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tprivate onChildrenResize = (entries: ResizeObserverEntry[]) => {\n\t\tconst entriesToUpdate = entries.filter(\n\t\t\t(entry) => entry.target.parentElement !== null,\n\t\t);\n\n\t\tif (entriesToUpdate.length > 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tupdate = throttle(() => {\n\t\tconst computedStyle = window.getComputedStyle(this.grid);\n\n\t\tif (computedStyle.getPropertyValue(\"display\").includes(\"grid\") === false) {\n\t\t\tthis.clean();\n\t\t\treturn;\n\t\t}\n\n\t\tconst columns = parseGridTemplateColumns(this.grid);\n\n\t\tif (columns.length <= 1) {\n\t\t\tthis.clean();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst rowGap =\n\t\t\tNumber.parseFloat(computedStyle.getPropertyValue(\"row-gap\").trim()) || 0;\n\n\t\tconst items = Array.from(this.grid.children) as HTMLElement[];\n\n\t\tfor (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n\t\t\tconst firstItemInColumn = items[columnIndex];\n\n\t\t\tfirstItemInColumn?.style.removeProperty(\"margin-top\");\n\t\t}\n\n\t\tfor (let index = 0; index < items.length; index++) {\n\t\t\tconst prevItem = items[index - columns.length];\n\t\t\tconst nextItem = items[index];\n\n\t\t\tif (prevItem !== undefined && nextItem !== undefined) {\n\t\t\t\tconst prevBottom = prevItem.getBoundingClientRect().bottom;\n\n\t\t\t\tnextItem.style.removeProperty(\"margin-top\");\n\n\t\t\t\tconst nextTop = nextItem.getBoundingClientRect().top;\n\n\t\t\t\tif (nextTop - rowGap !== prevBottom) {\n\t\t\t\t\tconst margin =\n\t\t\t\t\t\tMath.round(\n\t\t\t\t\t\t\t(prevBottom - (nextTop - rowGap) + Number.EPSILON) * 100,\n\t\t\t\t\t\t) / 100;\n\n\t\t\t\t\tnextItem.style.setProperty(\"margin-top\", `${margin}px`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, 32);\n\n\tdestroy = () => {\n\t\tthis.resizeObserver.disconnect();\n\t\tthis.mutationObserver.disconnect();\n\t\tthis.clean();\n\t};\n\n\tprivate clean = () => {\n\t\tfor ( const item of (Array.from(this.grid.children) as HTMLElement[])){\n\t\t\titem.style.removeProperty(\"margin-top\");\n\t\t}\n\t};\n\n\t[Symbol.dispose]() {\n\t\tthis.destroy();\n\t}\n}\n\nfunction parseGridTemplateColumns(grid: Element) {\n\tconst computedStyle = window.getComputedStyle(grid);\n\n\tconst gridTemplateColumns = computedStyle.getPropertyValue(\n\t\t\"grid-template-columns\",\n\t);\n\n\treturn gridTemplateColumns\n\t\t.trim()\n\t\t.split(/\\s+(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/);\n}",":host {\n display: block;\n}","import { Component, State, Element, h } from '@stencil/core';\nimport type { Review } from '../salla-review-card/interfaces';\nimport type { Pagination } from '../../interfaces/common';\nimport ShoppingBag from '../../assets/svg/shopping-bag.svg';\nimport Helper from '../../Helpers/Helper';\nimport { MasonryLayout } from '../../Helpers/masonry-layout';\n\n\n@Component({\n tag: 'salla-reviews-page',\n styleUrl: 'salla-reviews-page.css',\n})\nexport class SallaReviewsPage {\n @Element() el: HTMLElement;\n @State() reviews: Partial<Review>[] = [];\n @State() isLoading = false;\n @State() pagination: Pagination = null;\n @State() sort: \"top_rating\" | \"bottom_rating\" | \"latest\" | \"oldest\" = \"latest\";\n\n // Language variables\n private langTitlesReviews: string;\n private langRatingReviews: string;\n private langSorting: string;\n private langSortByTopRating: string;\n private langSortByMostRecent: string;\n private langSortByLeastRecent: string;\n private langSortByLeastRated: string;\n\n private langLoadMore: string;\n private placeholderText: string;\n\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n private getUrlParams() {\n const params = new URLSearchParams(window.location.search);\n return {\n sort: params.get('sort') as typeof this.sort || null,\n page: Number.parseInt(params.get('page')) || 1\n };\n }\n\n private updateUrlParams(params: { sort?: string, page?: number }) {\n const url = new URL(window.location.href);\n for (const [key, value] of Object.entries(params)) {\n if (value) {\n url.searchParams.set(key, value.toString());\n } else {\n url.searchParams.delete(key);\n }\n };\n window.history.replaceState({}, '', url.toString());\n }\n\n private fetchReviews(sort?: typeof this.sort, page?: number) {\n const urlParams = this.getUrlParams();\n return salla.api.request('reviews', {\n params: {\n type: 'products',\n format: 'lite',\n per_page: 8,\n page: page || urlParams.page || 1,\n sort: sort || urlParams.sort || null\n }\n });\n }\n\n\n private async initializeMasonry() {\n const grid = this.el.querySelector('.s-reviews-page-grid');\n if (!grid) return;\n\n try {\n new MasonryLayout(grid);\n salla.logger.info('Masonry initialized successfully');\n } catch (error) {\n salla.logger.error('Masonry initialization failed:', error);\n }\n }\n private animateReviewCards() {\n const items = this.wrapper.querySelectorAll('salla-review-card:not(.animated)');\n Helper.animateItems(items);\n }\n\n private initiateInfiniteScroll() {\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.pagination?.links?.next || null,\n history: false,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', () => {\n this.isLoading = true;\n });\n\n this.infiniteScroll?.on('load', response => {\n this.pagination = response.pagination;\n this.reviews = [...this.reviews, ...response.data]\n this.isLoading = false;\n // Update URL with the current page\n this.updateUrlParams({ page: response.pagination.current_page });\n\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more reviews:', e);\n this.isLoading = false;\n });\n }\n\n\n componentDidRender() {\n setTimeout(() => {\n requestAnimationFrame(this.animateReviewCards.bind(this))\n }, 176)\n }\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n\n // Initialize language variables\n this.langTitlesReviews = salla.lang.get(\"common.titles.reviews\");\n this.langSorting = salla.lang.get('pages.categories.sorting');\n this.placeholderText = salla.lang.choice(\"pages.rating.reviews\", 0)\n this.langLoadMore = salla.lang.get('common.elements.load_more');\n this.langSortByTopRating = salla.lang.get('pages.testimonials.sort_by_rating_desc');\n this.langSortByMostRecent = salla.lang.get('pages.testimonials.sort_by_date_desc');\n this.langSortByLeastRated = salla.lang.get('pages.testimonials.sort_by_rating_asc');\n this.langSortByLeastRecent = salla.lang.get('pages.testimonials.sort_by_date_asc');\n\n const urlParams = this.getUrlParams();\n const response = await this.fetchReviews(urlParams.sort);\n this.sort = urlParams.sort;\n this.reviews = response.data\n this.pagination = response.pagination;\n this.langRatingReviews = salla.lang.choice(\"pages.rating.reviews\", this.pagination?.total);\n\n\n\n } catch (error) {\n salla.logger.error('Error loading reviews:', error);\n }\n }\n\n private async handleSorting(e: Event) {\n const value = (e.target as HTMLSelectElement).value as typeof this.sort;\n this.sort = value;\n this.updateUrlParams({ sort: value, page: 1 }); // Reset to page 1 when changing sort\n const response = await this.fetchReviews(value, 1);\n this.reviews = response.data\n this.pagination = response.pagination;\n }\n\n async componentDidLoad() {\n await this.initializeMasonry();\n this.initiateInfiniteScroll();\n this.sort = this.getUrlParams().sort || \"latest\";\n this.updateUrlParams({ sort: this.sort, page: 1 });\n }\n\n disconnectedCallback() {\n if (this.infiniteScroll) {\n this.infiniteScroll.destroy();\n }\n }\n\n private renderSortingOptions() {\n const options = [\n { value: 'latest', label: this.langSortByMostRecent },\n { value: 'oldest', label: this.langSortByLeastRecent },\n { value: 'top_rating', label: this.langSortByTopRating },\n { value: 'bottom_rating', label: this.langSortByLeastRated },\n ];\n return options.map(option => (\n <option key={option.value} value={option.value} selected={option.value === this.sort}>\n {option.label}\n </option>\n ));\n }\n\n\n render() {\n return (\n <host>\n <div class=\"s-reviews-page-header-wrapper\">\n <h2 class=\"s-reviews-page-title\">{this.langTitlesReviews}<span class=\"s-reviews-page-count\">({this.langRatingReviews})</span></h2>\n <div class=\"s-reviews-page-filter-wrapper\">\n <label class=\"s-reviews-page-filter-label\"\n htmlFor=\"testimonials-filter\">{this.langSorting}</label>\n <select onChange={(e) => this.handleSorting(e)} disabled={!this.reviews.length} class=\"s-reviews-page-filter\">\n {this.renderSortingOptions()}\n </select>\n </div>\n </div>\n {this.reviews.length ? <main class=\"s-reviews-page-grid\" ref={el => {\n this.wrapper = el\n }}>\n {this.reviews.map(review => (\n <salla-review-card\n key={review.id}\n review={review}\n />\n ))}\n </main>\n : <div class=\"s-products-list-placeholder\">\n <span innerHTML={ShoppingBag} />\n <p>{this.placeholderText}</p>\n </div>\n }\n {this.pagination?.links?.next && this.reviews.length ? (\n\n <div class=\"s-reviews-page-load-more-container\">\n <salla-button class=\"s-reviews-page-load-more-btn\" loading={this.isLoading} onClick={() => this.infiniteScroll?.loadNextPage()}\n onKeyUp={() => this.infiniteScroll?.loadNextPage()}>\n {this.langLoadMore}\n </salla-button>\n </div>\n ) : null}\n </host>\n );\n }\n}"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAA,IAAI,IAAI,GAAGA,YAAkB,EAAA;;MAE7B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;OACA,IAAI,GAAG,GAAG,WAAW;MACrB,GAAE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACvB;;MAED,CAAA,KAAc,GAAG,GAAG;;;;;;;;;;;;OCrBpB,IAAI,YAAY,GAAG,IAAI;;MAEvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;OACA,SAAS,eAAe,CAAC,MAAM,EAAE;MACjC,GAAE,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM;;MAE3B,GAAE,OAAO,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;MAC7D,GAAE,OAAO,KAAK;MACd;;MAEA,CAAA,gBAAc,GAAG,eAAe;;;;;;;;;;OClBhC,IAAI,eAAe,GAAGA,uBAA6B,EAAA;;MAEnD;OACA,IAAI,WAAW,GAAG,MAAM;;MAExB;MACA;MACA;MACA;MACA;MACA;MACA;OACA,SAAS,QAAQ,CAAC,MAAM,EAAE;MAC1B,GAAE,OAAO;MACT,OAAM,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE;MAC1E,OAAM,MAAM;MACZ;;MAEA,CAAA,SAAc,GAAG,QAAQ;;;;;;;;;;OClBzB,IAAI,QAAQ,GAAGA,gBAAsB,EAAA;WACjC,QAAQ,GAAGC,eAAqB,EA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