@salla.sa/twilight-components 2.14.252 → 2.14.253

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 (506) hide show
  1. package/dist/cjs/{app-globals-ChKTQEJ9.js → app-globals-BoVwS_2u.js} +3 -3
  2. package/dist/cjs/{app-globals-ChKTQEJ9.js.map → app-globals-BoVwS_2u.js.map} +1 -1
  3. package/dist/cjs/{index-DtXwvL5X.js → index-DxXe1Ylr.js} +16 -16
  4. package/dist/cjs/index-DxXe1Ylr.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.cjs.js.map +1 -0
  7. package/dist/cjs/salla-accordion_4.cjs.entry.js +202 -0
  8. package/dist/cjs/salla-accordion_4.cjs.entry.js.map +1 -0
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +48 -48
  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 +3 -3
  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 +3 -3
  18. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
  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-details-multiple-bundle-product.cjs.entry.js +80 -0
  27. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js.map +1 -0
  28. package/dist/cjs/salla-order-details-multiple-bundle-product.entry.cjs.js.map +1 -0
  29. package/dist/cjs/salla-order-details.cjs.entry.js +53 -0
  30. package/dist/cjs/salla-order-details.cjs.entry.js.map +1 -0
  31. package/dist/cjs/salla-order-details.entry.cjs.js.map +1 -0
  32. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  33. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  35. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  36. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  45. package/dist/cjs/twilight.cjs.js +3 -3
  46. package/dist/collection/collection-manifest.json +3 -0
  47. package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
  48. package/dist/collection/components/salla-accordion/salla-accordion-head.js.map +1 -1
  49. package/dist/collection/components/salla-accordion/salla-accordion.js +43 -1
  50. package/dist/collection/components/salla-accordion/salla-accordion.js.map +1 -1
  51. package/dist/collection/components/salla-alert/salla-alert.js +1 -1
  52. package/dist/collection/components/salla-booking-field/salla-booking-field.js +1 -1
  53. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +2 -2
  54. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
  55. package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
  56. package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
  57. package/dist/collection/components/salla-comments/salla-comment-item.js +3 -3
  58. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
  59. package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
  60. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  61. package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
  62. package/dist/collection/components/salla-filters/salla-filters.js +1 -1
  63. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
  64. package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
  65. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  66. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  67. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  68. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  69. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
  70. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  71. package/dist/collection/components/salla-map/salla-map.js +3 -3
  72. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  73. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  74. package/dist/collection/components/salla-order-details/interfaces.js +2 -0
  75. package/dist/collection/components/salla-order-details/interfaces.js.map +1 -0
  76. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.css +0 -0
  77. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +152 -0
  78. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js.map +1 -0
  79. package/dist/collection/components/salla-order-details/salla-order-details-options.css +0 -0
  80. package/dist/collection/components/salla-order-details/salla-order-details-options.js +177 -0
  81. package/dist/collection/components/salla-order-details/salla-order-details-options.js.map +1 -0
  82. package/dist/collection/components/salla-order-details/salla-order-details.css +0 -0
  83. package/dist/collection/components/salla-order-details/salla-order-details.js +93 -0
  84. package/dist/collection/components/salla-order-details/salla-order-details.js.map +1 -0
  85. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  86. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  87. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  88. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  89. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  90. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  91. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  92. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  93. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  94. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  95. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  96. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  97. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  98. package/dist/collection/components/salla-search/salla-search.js +3 -3
  99. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  100. package/dist/collection/components/salla-slider/salla-slider.js +2 -2
  101. package/dist/collection/components/salla-social/salla-social.js +1 -1
  102. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  103. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  104. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  105. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  106. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  107. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  108. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  109. package/dist/components/index.js +2 -2
  110. package/dist/components/index.js.map +1 -1
  111. package/dist/components/salla-accordion-body.js +1 -27
  112. package/dist/components/salla-accordion-body.js.map +1 -1
  113. package/dist/components/salla-accordion-body2.js +35 -0
  114. package/dist/components/salla-accordion-body2.js.map +1 -0
  115. package/dist/components/salla-accordion-head.js +1 -59
  116. package/dist/components/salla-accordion-head.js.map +1 -1
  117. package/dist/components/salla-accordion-head2.js +67 -0
  118. package/dist/components/salla-accordion-head2.js.map +1 -0
  119. package/dist/components/salla-accordion.js +1 -59
  120. package/dist/components/salla-accordion.js.map +1 -1
  121. package/dist/components/salla-accordion2.js +71 -0
  122. package/dist/components/salla-accordion2.js.map +1 -0
  123. package/dist/components/salla-alert.js +1 -1
  124. package/dist/components/salla-booking-field2.js +1 -1
  125. package/dist/components/salla-bottom-alert.js +2 -2
  126. package/dist/components/salla-cart-summary.js +1 -1
  127. package/dist/components/salla-color-picker2.js +1 -1
  128. package/dist/components/salla-comment-form2.js +1 -1
  129. package/dist/components/salla-comment-item2.js +3 -3
  130. package/dist/components/salla-conditional-fields2.js +1 -1
  131. package/dist/components/salla-count-down2.js +1 -1
  132. package/dist/components/salla-datetime-picker2.js +1 -1
  133. package/dist/components/salla-file-upload2.js +2 -2
  134. package/dist/components/salla-filters-widget2.js +2 -2
  135. package/dist/components/salla-filters.js +1 -1
  136. package/dist/components/salla-gifting.js +2 -2
  137. package/dist/components/salla-list-tile2.js +1 -1
  138. package/dist/components/salla-loading2.js +1 -1
  139. package/dist/components/salla-localization-modal.js +1 -1
  140. package/dist/components/salla-loyalty-prize-item.js +1 -1
  141. package/dist/components/salla-loyalty-program.js +1 -1
  142. package/dist/components/salla-maintenance-alert.js +1 -1
  143. package/dist/components/salla-map2.js +3 -3
  144. package/dist/components/salla-notification-item2.js +1 -1
  145. package/dist/components/salla-offer-modal.js +1 -1
  146. package/dist/components/salla-order-details-multiple-bundle-product.d.ts +11 -0
  147. package/dist/components/salla-order-details-multiple-bundle-product.js +12 -0
  148. package/dist/components/salla-order-details-multiple-bundle-product.js.map +1 -0
  149. package/dist/components/salla-order-details-multiple-bundle-product2.js +144 -0
  150. package/dist/components/salla-order-details-multiple-bundle-product2.js.map +1 -0
  151. package/dist/components/salla-order-details-options.d.ts +11 -0
  152. package/dist/components/salla-order-details-options.js +12 -0
  153. package/dist/components/salla-order-details-options.js.map +1 -0
  154. package/dist/components/salla-order-details-options2.js +145 -0
  155. package/dist/components/salla-order-details-options2.js.map +1 -0
  156. package/dist/components/salla-order-details.d.ts +11 -0
  157. package/dist/components/salla-order-details.js +127 -0
  158. package/dist/components/salla-order-details.js.map +1 -0
  159. package/dist/components/salla-order-summary.js +1 -1
  160. package/dist/components/salla-payments.js +2 -2
  161. package/dist/components/salla-placeholder2.js +1 -1
  162. package/dist/components/salla-price-range2.js +2 -2
  163. package/dist/components/salla-product-availability2.js +1 -1
  164. package/dist/components/salla-product-card2.js +5 -5
  165. package/dist/components/salla-product-size-guide.js +2 -2
  166. package/dist/components/salla-quantity-input.js +1 -1
  167. package/dist/components/salla-quick-buy2.js +1 -1
  168. package/dist/components/salla-review-card2.js +1 -1
  169. package/dist/components/salla-reviews-page.js +1 -1
  170. package/dist/components/salla-reviews.js +1 -1
  171. package/dist/components/salla-scopes.js +1 -1
  172. package/dist/components/salla-search.js +3 -3
  173. package/dist/components/salla-skeleton2.js +1 -1
  174. package/dist/components/salla-slider2.js +2 -2
  175. package/dist/components/salla-social-share.js +1 -1
  176. package/dist/components/salla-social.js +1 -1
  177. package/dist/components/salla-tab-content2.js +1 -1
  178. package/dist/components/salla-tab-header2.js +1 -1
  179. package/dist/components/salla-tabs2.js +1 -1
  180. package/dist/components/salla-tel-input2.js +1 -1
  181. package/dist/components/salla-tooltip2.js +1 -1
  182. package/dist/components/salla-user-settings.js +1 -1
  183. package/dist/esm/{app-globals-3b0DwjjK.js → app-globals-5yxEmkuB.js} +3 -3
  184. package/dist/esm/{app-globals-3b0DwjjK.js.map → app-globals-5yxEmkuB.js.map} +1 -1
  185. package/dist/esm/{index-D4D34Ujk.js → index-Hw2jlaNN.js} +16 -16
  186. package/dist/esm/index-Hw2jlaNN.js.map +1 -0
  187. package/dist/esm/loader.js +4 -4
  188. package/dist/esm/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.js.map +1 -0
  189. package/dist/esm/salla-accordion_4.entry.js +197 -0
  190. package/dist/esm/salla-accordion_4.entry.js.map +1 -0
  191. package/dist/esm/salla-add-product-button_51.entry.js +48 -48
  192. package/dist/esm/salla-advertisement.entry.js +1 -1
  193. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  194. package/dist/esm/salla-apps-icons.entry.js +1 -1
  195. package/dist/esm/salla-booking-field_2.entry.js +3 -3
  196. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  197. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  198. package/dist/esm/salla-contacts.entry.js +1 -1
  199. package/dist/esm/salla-filters-widget.entry.js +3 -3
  200. package/dist/esm/salla-filters.entry.js +2 -2
  201. package/dist/esm/salla-installment.entry.js +1 -1
  202. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  203. package/dist/esm/salla-loyalty-program.entry.js +2 -2
  204. package/dist/esm/salla-metadata.entry.js +1 -1
  205. package/dist/esm/salla-notification-item.entry.js +2 -2
  206. package/dist/esm/salla-notifications.entry.js +1 -1
  207. package/dist/esm/salla-offer.entry.js +1 -1
  208. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +78 -0
  209. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js.map +1 -0
  210. package/dist/esm/salla-order-details.entry.js +51 -0
  211. package/dist/esm/salla-order-details.entry.js.map +1 -0
  212. package/dist/esm/salla-order-summary.entry.js +2 -2
  213. package/dist/esm/salla-orders.entry.js +1 -1
  214. package/dist/esm/salla-payments.entry.js +3 -3
  215. package/dist/esm/salla-price-range.entry.js +3 -3
  216. package/dist/esm/salla-product-options.entry.js +1 -1
  217. package/dist/esm/salla-review-card.entry.js +2 -2
  218. package/dist/esm/salla-reviews-page.entry.js +2 -2
  219. package/dist/esm/salla-reviews.entry.js +2 -2
  220. package/dist/esm/salla-social.entry.js +2 -2
  221. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  222. package/dist/esm/salla-tooltip.entry.js +2 -2
  223. package/dist/esm/salla-verify.entry.js +1 -1
  224. package/dist/esm/salla-wallet.entry.js +1 -1
  225. package/dist/esm/twilight.js +4 -4
  226. package/dist/esm-es5/{app-globals-3b0DwjjK.js → app-globals-5yxEmkuB.js} +2 -2
  227. package/dist/esm-es5/{app-globals-3b0DwjjK.js.map → app-globals-5yxEmkuB.js.map} +1 -1
  228. package/dist/esm-es5/{index-D4D34Ujk.js → index-Hw2jlaNN.js} +3 -3
  229. package/dist/esm-es5/index-Hw2jlaNN.js.map +1 -0
  230. package/dist/esm-es5/loader.js +1 -1
  231. package/dist/esm-es5/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.js.map +1 -0
  232. package/dist/esm-es5/salla-accordion_4.entry.js +5 -0
  233. package/dist/esm-es5/salla-accordion_4.entry.js.map +1 -0
  234. package/dist/esm-es5/salla-add-product-button_51.entry.js +3 -3
  235. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  236. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  237. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  238. package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
  239. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  240. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  241. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  242. package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
  243. package/dist/esm-es5/salla-filters.entry.js +1 -1
  244. package/dist/esm-es5/salla-installment.entry.js +1 -1
  245. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  246. package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
  247. package/dist/esm-es5/salla-metadata.entry.js +2 -2
  248. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  249. package/dist/esm-es5/salla-notifications.entry.js +2 -2
  250. package/dist/esm-es5/salla-offer.entry.js +1 -1
  251. package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +5 -0
  252. package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js.map +1 -0
  253. package/dist/esm-es5/salla-order-details.entry.js +5 -0
  254. package/dist/esm-es5/salla-order-details.entry.js.map +1 -0
  255. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  256. package/dist/esm-es5/salla-orders.entry.js +1 -1
  257. package/dist/esm-es5/salla-payments.entry.js +1 -1
  258. package/dist/esm-es5/salla-price-range.entry.js +2 -2
  259. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  260. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  261. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  262. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  263. package/dist/esm-es5/salla-social.entry.js +1 -1
  264. package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
  265. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  266. package/dist/esm-es5/salla-verify.entry.js +1 -1
  267. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  268. package/dist/esm-es5/twilight.js +1 -1
  269. package/dist/twilight/{p-d513da6f.entry.js → p-0065a55b.entry.js} +2 -2
  270. package/dist/twilight/{p-c9678188.system.entry.js → p-05cf8f0f.system.entry.js} +2 -2
  271. package/dist/twilight/{p-8213a9ef.system.entry.js → p-066a5e95.system.entry.js} +2 -2
  272. package/dist/twilight/{p-81aeef6a.entry.js → p-0a58ecb2.entry.js} +2 -2
  273. package/dist/twilight/{p-5b882c52.system.entry.js → p-0ab8c50f.system.entry.js} +2 -2
  274. package/dist/twilight/{p-d84eb47c.entry.js → p-13efdbe3.entry.js} +2 -2
  275. package/dist/twilight/{p-4af5ffea.entry.js → p-13f1a287.entry.js} +2 -2
  276. package/dist/twilight/{p-6e24a5f0.system.entry.js → p-15c42251.system.entry.js} +2 -2
  277. package/dist/twilight/{p-8c0822f7.system.entry.js → p-17567b38.system.entry.js} +2 -2
  278. package/dist/twilight/p-184bc156.system.entry.js +5 -0
  279. package/dist/twilight/p-184bc156.system.entry.js.map +1 -0
  280. package/dist/twilight/{p-648fb6ca.entry.js → p-204e0ad2.entry.js} +2 -2
  281. package/dist/twilight/{p-63cba8e3.entry.js → p-210ccdae.entry.js} +2 -2
  282. package/dist/twilight/{p-d0004953.entry.js → p-240b86ef.entry.js} +2 -2
  283. package/dist/twilight/{p-dd83a408.entry.js → p-27206d63.entry.js} +2 -2
  284. package/dist/twilight/{p-c84819d5.entry.js → p-35dd7512.entry.js} +4 -4
  285. package/dist/twilight/{p-2af0da5a.system.entry.js → p-38675c42.system.entry.js} +2 -2
  286. package/dist/twilight/{p-7234c5f2.system.entry.js → p-3cdd4d44.system.entry.js} +2 -2
  287. package/dist/twilight/{p-8359eb2a.entry.js → p-3e9ceed0.entry.js} +2 -2
  288. package/dist/twilight/{p-a18f81a8.system.entry.js → p-447f03b5.system.entry.js} +2 -2
  289. package/dist/twilight/{p-2ecf868e.entry.js → p-4b7e613a.entry.js} +2 -2
  290. package/dist/twilight/{p-d5750810.entry.js → p-4d5387e9.entry.js} +2 -2
  291. package/dist/twilight/{p-ad0fedcd.system.entry.js → p-53fb14d0.system.entry.js} +2 -2
  292. package/dist/twilight/p-5db51240.system.entry.js +5 -0
  293. package/dist/twilight/{p-aad20f10.system.entry.js → p-61f590ca.system.entry.js} +2 -2
  294. package/dist/twilight/p-6a179bc3.system.entry.js +5 -0
  295. package/dist/twilight/p-6a179bc3.system.entry.js.map +1 -0
  296. package/dist/twilight/{p-407d19d8.system.entry.js → p-6a51cb91.system.entry.js} +2 -2
  297. package/dist/twilight/{p-95adf84e.entry.js → p-6abfa7ed.entry.js} +2 -2
  298. package/dist/twilight/{p-45b61475.entry.js → p-6f66faea.entry.js} +2 -2
  299. package/dist/twilight/{p-f57bcc51.entry.js → p-7187b729.entry.js} +2 -2
  300. package/dist/twilight/{p-c87d6aa6.system.entry.js → p-765562b8.system.entry.js} +4 -4
  301. package/dist/twilight/p-76d92026.entry.js +5 -0
  302. package/dist/twilight/p-76d92026.entry.js.map +1 -0
  303. package/dist/twilight/{p-6a0b5799.entry.js → p-78deca48.entry.js} +2 -2
  304. package/dist/twilight/{p-3483eb09.system.entry.js → p-7dce6627.system.entry.js} +2 -2
  305. package/dist/twilight/p-7f28b72e.entry.js +5 -0
  306. package/dist/twilight/p-7f28b72e.entry.js.map +1 -0
  307. package/dist/twilight/{p-396198a2.entry.js → p-83f6408a.entry.js} +2 -2
  308. package/dist/twilight/{p-d097a67d.system.entry.js → p-888de4b8.system.entry.js} +2 -2
  309. package/dist/twilight/{p-Ccj70VFr.system.js.map → p-8SAlNoQ7.system.js.map} +1 -1
  310. package/dist/twilight/{p-CZGaqTus.system.js.map → p-8cuU9AcW.system.js.map} +1 -1
  311. package/dist/twilight/{p-1b24ea99.system.entry.js → p-8e807035.system.entry.js} +2 -2
  312. package/dist/twilight/{p-6b716e82.system.entry.js → p-8fcff962.system.entry.js} +2 -2
  313. package/dist/twilight/p-9a8a57f0.entry.js +5 -0
  314. package/dist/twilight/{p-1a9eebb6.system.entry.js → p-9cb1a11d.system.entry.js} +2 -2
  315. package/dist/twilight/{p-CDmxJQ_1.system.js.map → p-B10yx9se.system.js.map} +1 -1
  316. package/dist/twilight/{p-BHI6mAw4.system.js.map → p-BKsOE9n5.system.js.map} +1 -1
  317. package/dist/twilight/{p-BRsVFuI-.system.js.map → p-BzHfWaAI.system.js.map} +1 -1
  318. package/dist/twilight/{p-ByNC3ygM.system.js.map → p-C0IcnmR-.system.js.map} +1 -1
  319. package/dist/twilight/{p-B_aBck2N.system.js.map → p-C0Tc4qY_.system.js.map} +1 -1
  320. package/dist/twilight/{p-e-FAhVeu.system.js.map → p-C72wuhae.system.js.map} +1 -1
  321. package/dist/twilight/{p-BrxIkK1y.system.js.map → p-CDuCVzYE.system.js.map} +1 -1
  322. package/dist/twilight/{p-CgDN9ZEV.system.js.map → p-CK7f65RE.system.js.map} +1 -1
  323. package/dist/twilight/{p-B0xoNOFR.system.js → p-CQDiSGcm.system.js} +3 -3
  324. package/dist/twilight/p-CQDiSGcm.system.js.map +1 -0
  325. package/dist/twilight/{p-CVW8a0jw.system.js.map → p-Crz5Om7F.system.js.map} +1 -1
  326. package/dist/twilight/p-D6vllM1-.system.js.map +1 -0
  327. package/dist/twilight/{p-O_6m6zp3.system.js.map → p-DHIqW0kb.system.js.map} +1 -1
  328. package/dist/twilight/{p-DxRZfb-O.system.js → p-DHVFvgH-.system.js} +2 -2
  329. package/dist/twilight/{p-DxRZfb-O.system.js.map → p-DHVFvgH-.system.js.map} +1 -1
  330. package/dist/twilight/{p-DvrwOwqK.system.js.map → p-DNXP15r0.system.js.map} +1 -1
  331. package/dist/twilight/{p-Bqv1miCk.system.js.map → p-DNsqaxY7.system.js.map} +1 -1
  332. package/dist/twilight/{p-BxORDCZ3.system.js.map → p-DTx9WCBY.system.js.map} +1 -1
  333. package/dist/twilight/{p-TrPvZWq-.system.js.map → p-DVKxP5is.system.js.map} +1 -1
  334. package/dist/twilight/p-DVpqfl3D.system.js.map +1 -0
  335. package/dist/twilight/{p-BXoB3JpD.system.js.map → p-DZTRKwds.system.js.map} +1 -1
  336. package/dist/twilight/{p-CaCB348j.system.js.map → p-DZajWqW2.system.js.map} +1 -1
  337. package/dist/twilight/{p-BbDuw4AO.system.js.map → p-Da2A-hsX.system.js.map} +1 -1
  338. package/dist/twilight/{p-CNqFfslE.system.js.map → p-DgVuWfs6.system.js.map} +1 -1
  339. package/dist/twilight/p-Dhlfiere.system.js +5 -0
  340. package/dist/twilight/{p-DMKkUrkS.system.js.map → p-Dhlfiere.system.js.map} +1 -1
  341. package/dist/twilight/{p-DVnmchft.system.js.map → p-DkCrulih.system.js.map} +1 -1
  342. package/dist/twilight/{p-CB3G0Z8y.system.js.map → p-Du8MMxWf.system.js.map} +1 -1
  343. package/dist/twilight/{p-u0que_SA.system.js.map → p-DvSX1guT.system.js.map} +1 -1
  344. package/dist/twilight/{p-D4D34Ujk.js → p-Hw2jlaNN.js} +3 -3
  345. package/dist/twilight/p-Hw2jlaNN.js.map +1 -0
  346. package/dist/twilight/{p-C-vbYsMC.system.js.map → p-N45BdAU8.system.js.map} +1 -1
  347. package/dist/twilight/{p-DNiQ_YXx.js → p-NSLkL4Dn.js} +2 -2
  348. package/dist/twilight/{p-DNiQ_YXx.js.map → p-NSLkL4Dn.js.map} +1 -1
  349. package/dist/twilight/{p-OzJ9XEsV.system.js.map → p-QNwQUqLM.system.js.map} +1 -1
  350. package/dist/twilight/{p-DlRNuq8n.system.js.map → p-XDYW48AK.system.js.map} +1 -1
  351. package/dist/twilight/{p-1055f2fb.entry.js → p-a8cf78c0.entry.js} +2 -2
  352. package/dist/twilight/p-a9c9a4ac.entry.js +5 -0
  353. package/dist/twilight/p-a9c9a4ac.entry.js.map +1 -0
  354. package/dist/twilight/{p-669db4df.entry.js → p-b13ef44c.entry.js} +2 -2
  355. package/dist/twilight/{p-d15630dd.entry.js → p-b492c336.entry.js} +2 -2
  356. package/dist/twilight/{p-f745fcad.entry.js → p-b51bb42b.entry.js} +2 -2
  357. package/dist/twilight/{p-3eaddcf1.entry.js → p-bb1a0f6b.entry.js} +2 -2
  358. package/dist/twilight/{p-5542a867.entry.js → p-bca6b6b2.entry.js} +2 -2
  359. package/dist/twilight/{p-fbe10567.entry.js → p-bdca9c9c.entry.js} +2 -2
  360. package/dist/twilight/p-be2938da.entry.js +5 -0
  361. package/dist/twilight/{p-58085711.entry.js → p-c5b5a947.entry.js} +2 -2
  362. package/dist/twilight/{p-BJUBMQeL.system.js.map → p-cK_8A-PC.system.js.map} +1 -1
  363. package/dist/twilight/{p-CiGTTlgd.system.js.map → p-cR7gWxFU.system.js.map} +1 -1
  364. package/dist/twilight/p-d314110a.system.entry.js +5 -0
  365. package/dist/twilight/p-d314110a.system.entry.js.map +1 -0
  366. package/dist/twilight/{p-13324cdd.system.entry.js → p-d33197dc.system.entry.js} +3 -3
  367. package/dist/twilight/{p-e9bc1fa4.system.entry.js → p-d3c9cfbb.system.entry.js} +2 -2
  368. package/dist/twilight/{p-e823d4e8.system.entry.js → p-d4017888.system.entry.js} +2 -2
  369. package/dist/twilight/{p-442340d3.system.entry.js → p-d43b5d6a.system.entry.js} +2 -2
  370. package/dist/twilight/{p-2ae75a1c.entry.js → p-d7604122.entry.js} +2 -2
  371. package/dist/twilight/{p-ebd4ac51.system.entry.js → p-d8039b97.system.entry.js} +2 -2
  372. package/dist/twilight/{p-423d91f5.system.entry.js → p-db9674c2.system.entry.js} +2 -2
  373. package/dist/twilight/{p-a1d102d3.system.entry.js → p-eb292930.system.entry.js} +2 -2
  374. package/dist/twilight/{p-60bf8746.system.entry.js → p-ec034bd2.system.entry.js} +2 -2
  375. package/dist/twilight/{p-ab7cc63a.system.entry.js → p-f07ad750.system.entry.js} +2 -2
  376. package/dist/twilight/{p-06b95a05.system.entry.js → p-f0b1ceef.system.entry.js} +2 -2
  377. package/dist/twilight/p-f5aefbca.system.entry.js +5 -0
  378. package/dist/twilight/{p-17c50686.entry.js → p-fb399776.entry.js} +2 -2
  379. package/dist/twilight/{p-e784d087.entry.js → p-fe81524d.entry.js} +2 -2
  380. package/dist/twilight/p-fed7a7a5.system.entry.js +5 -0
  381. package/dist/twilight/{p-C9DFiJHW.system.js.map → p-jx7CG3rj.system.js.map} +1 -1
  382. package/dist/twilight/{p-ofxyuLsh.system.js.map → p-lRCsnz7i.system.js.map} +1 -1
  383. package/dist/twilight/p-oqUqe5ch.system.js.map +1 -0
  384. package/dist/twilight/{p-Cs3Irr4v.system.js.map → p-xRJ6wvh1.system.js.map} +1 -1
  385. package/dist/twilight/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.esm.js.map +1 -0
  386. package/dist/twilight/salla-order-details-multiple-bundle-product.entry.esm.js.map +1 -0
  387. package/dist/twilight/salla-order-details.entry.esm.js.map +1 -0
  388. package/dist/twilight/twilight.esm.js +1 -1
  389. package/dist/twilight/twilight.js +1 -1
  390. package/dist/types/components/salla-accordion/salla-accordion.d.ts +2 -0
  391. package/dist/types/components/salla-order-details/interfaces.d.ts +55 -0
  392. package/dist/types/components/salla-order-details/salla-order-details-multiple-bundle-product.d.ts +22 -0
  393. package/dist/types/components/salla-order-details/salla-order-details-options.d.ts +23 -0
  394. package/dist/types/components/salla-order-details/salla-order-details.d.ts +14 -0
  395. package/dist/types/components.d.ts +173 -0
  396. package/package.json +5 -5
  397. package/dist/cjs/index-DtXwvL5X.js.map +0 -1
  398. package/dist/cjs/salla-accordion-body.cjs.entry.js +0 -23
  399. package/dist/cjs/salla-accordion-body.cjs.entry.js.map +0 -1
  400. package/dist/cjs/salla-accordion-body.entry.cjs.js.map +0 -1
  401. package/dist/cjs/salla-accordion-head.cjs.entry.js +0 -52
  402. package/dist/cjs/salla-accordion-head.cjs.entry.js.map +0 -1
  403. package/dist/cjs/salla-accordion-head.entry.cjs.js.map +0 -1
  404. package/dist/cjs/salla-accordion.cjs.entry.js +0 -51
  405. package/dist/cjs/salla-accordion.cjs.entry.js.map +0 -1
  406. package/dist/cjs/salla-accordion.entry.cjs.js.map +0 -1
  407. package/dist/esm/index-D4D34Ujk.js.map +0 -1
  408. package/dist/esm/salla-accordion-body.entry.js +0 -21
  409. package/dist/esm/salla-accordion-body.entry.js.map +0 -1
  410. package/dist/esm/salla-accordion-head.entry.js +0 -50
  411. package/dist/esm/salla-accordion-head.entry.js.map +0 -1
  412. package/dist/esm/salla-accordion.entry.js +0 -49
  413. package/dist/esm/salla-accordion.entry.js.map +0 -1
  414. package/dist/esm-es5/index-D4D34Ujk.js.map +0 -1
  415. package/dist/esm-es5/salla-accordion-body.entry.js +0 -5
  416. package/dist/esm-es5/salla-accordion-body.entry.js.map +0 -1
  417. package/dist/esm-es5/salla-accordion-head.entry.js +0 -5
  418. package/dist/esm-es5/salla-accordion-head.entry.js.map +0 -1
  419. package/dist/esm-es5/salla-accordion.entry.js +0 -5
  420. package/dist/esm-es5/salla-accordion.entry.js.map +0 -1
  421. package/dist/twilight/p-154fc672.entry.js +0 -5
  422. package/dist/twilight/p-154fc672.entry.js.map +0 -1
  423. package/dist/twilight/p-17ee3d18.entry.js +0 -5
  424. package/dist/twilight/p-40e20722.system.entry.js +0 -5
  425. package/dist/twilight/p-40e20722.system.entry.js.map +0 -1
  426. package/dist/twilight/p-4d6baea7.system.entry.js +0 -5
  427. package/dist/twilight/p-4d6baea7.system.entry.js.map +0 -1
  428. package/dist/twilight/p-553bc6b4.system.entry.js +0 -5
  429. package/dist/twilight/p-63a5bdc6.entry.js +0 -5
  430. package/dist/twilight/p-63a5bdc6.entry.js.map +0 -1
  431. package/dist/twilight/p-7eff7dc5.system.entry.js +0 -5
  432. package/dist/twilight/p-B0xoNOFR.system.js.map +0 -1
  433. package/dist/twilight/p-BN8tVPbo.system.js.map +0 -1
  434. package/dist/twilight/p-Cc6e2YrQ.system.js.map +0 -1
  435. package/dist/twilight/p-D4D34Ujk.js.map +0 -1
  436. package/dist/twilight/p-DMKkUrkS.system.js +0 -5
  437. package/dist/twilight/p-Daef3WlT.system.js.map +0 -1
  438. package/dist/twilight/p-c0363ba7.entry.js +0 -5
  439. package/dist/twilight/p-c0363ba7.entry.js.map +0 -1
  440. package/dist/twilight/p-e2ab2b64.system.entry.js +0 -5
  441. package/dist/twilight/p-e2ab2b64.system.entry.js.map +0 -1
  442. package/dist/twilight/p-ef38f4ac.system.entry.js +0 -5
  443. package/dist/twilight/p-fcc64f6d.entry.js +0 -5
  444. package/dist/twilight/salla-accordion-body.entry.esm.js.map +0 -1
  445. package/dist/twilight/salla-accordion-head.entry.esm.js.map +0 -1
  446. package/dist/twilight/salla-accordion.entry.esm.js.map +0 -1
  447. /package/dist/twilight/{p-d513da6f.entry.js.map → p-0065a55b.entry.js.map} +0 -0
  448. /package/dist/twilight/{p-c9678188.system.entry.js.map → p-05cf8f0f.system.entry.js.map} +0 -0
  449. /package/dist/twilight/{p-8213a9ef.system.entry.js.map → p-066a5e95.system.entry.js.map} +0 -0
  450. /package/dist/twilight/{p-81aeef6a.entry.js.map → p-0a58ecb2.entry.js.map} +0 -0
  451. /package/dist/twilight/{p-5b882c52.system.entry.js.map → p-0ab8c50f.system.entry.js.map} +0 -0
  452. /package/dist/twilight/{p-d84eb47c.entry.js.map → p-13efdbe3.entry.js.map} +0 -0
  453. /package/dist/twilight/{p-4af5ffea.entry.js.map → p-13f1a287.entry.js.map} +0 -0
  454. /package/dist/twilight/{p-6e24a5f0.system.entry.js.map → p-15c42251.system.entry.js.map} +0 -0
  455. /package/dist/twilight/{p-8c0822f7.system.entry.js.map → p-17567b38.system.entry.js.map} +0 -0
  456. /package/dist/twilight/{p-648fb6ca.entry.js.map → p-204e0ad2.entry.js.map} +0 -0
  457. /package/dist/twilight/{p-63cba8e3.entry.js.map → p-210ccdae.entry.js.map} +0 -0
  458. /package/dist/twilight/{p-d0004953.entry.js.map → p-240b86ef.entry.js.map} +0 -0
  459. /package/dist/twilight/{p-dd83a408.entry.js.map → p-27206d63.entry.js.map} +0 -0
  460. /package/dist/twilight/{p-c84819d5.entry.js.map → p-35dd7512.entry.js.map} +0 -0
  461. /package/dist/twilight/{p-2af0da5a.system.entry.js.map → p-38675c42.system.entry.js.map} +0 -0
  462. /package/dist/twilight/{p-7234c5f2.system.entry.js.map → p-3cdd4d44.system.entry.js.map} +0 -0
  463. /package/dist/twilight/{p-8359eb2a.entry.js.map → p-3e9ceed0.entry.js.map} +0 -0
  464. /package/dist/twilight/{p-a18f81a8.system.entry.js.map → p-447f03b5.system.entry.js.map} +0 -0
  465. /package/dist/twilight/{p-2ecf868e.entry.js.map → p-4b7e613a.entry.js.map} +0 -0
  466. /package/dist/twilight/{p-d5750810.entry.js.map → p-4d5387e9.entry.js.map} +0 -0
  467. /package/dist/twilight/{p-ad0fedcd.system.entry.js.map → p-53fb14d0.system.entry.js.map} +0 -0
  468. /package/dist/twilight/{p-553bc6b4.system.entry.js.map → p-5db51240.system.entry.js.map} +0 -0
  469. /package/dist/twilight/{p-aad20f10.system.entry.js.map → p-61f590ca.system.entry.js.map} +0 -0
  470. /package/dist/twilight/{p-407d19d8.system.entry.js.map → p-6a51cb91.system.entry.js.map} +0 -0
  471. /package/dist/twilight/{p-95adf84e.entry.js.map → p-6abfa7ed.entry.js.map} +0 -0
  472. /package/dist/twilight/{p-45b61475.entry.js.map → p-6f66faea.entry.js.map} +0 -0
  473. /package/dist/twilight/{p-f57bcc51.entry.js.map → p-7187b729.entry.js.map} +0 -0
  474. /package/dist/twilight/{p-c87d6aa6.system.entry.js.map → p-765562b8.system.entry.js.map} +0 -0
  475. /package/dist/twilight/{p-6a0b5799.entry.js.map → p-78deca48.entry.js.map} +0 -0
  476. /package/dist/twilight/{p-3483eb09.system.entry.js.map → p-7dce6627.system.entry.js.map} +0 -0
  477. /package/dist/twilight/{p-396198a2.entry.js.map → p-83f6408a.entry.js.map} +0 -0
  478. /package/dist/twilight/{p-d097a67d.system.entry.js.map → p-888de4b8.system.entry.js.map} +0 -0
  479. /package/dist/twilight/{p-1b24ea99.system.entry.js.map → p-8e807035.system.entry.js.map} +0 -0
  480. /package/dist/twilight/{p-6b716e82.system.entry.js.map → p-8fcff962.system.entry.js.map} +0 -0
  481. /package/dist/twilight/{p-17ee3d18.entry.js.map → p-9a8a57f0.entry.js.map} +0 -0
  482. /package/dist/twilight/{p-1a9eebb6.system.entry.js.map → p-9cb1a11d.system.entry.js.map} +0 -0
  483. /package/dist/twilight/{p-1055f2fb.entry.js.map → p-a8cf78c0.entry.js.map} +0 -0
  484. /package/dist/twilight/{p-669db4df.entry.js.map → p-b13ef44c.entry.js.map} +0 -0
  485. /package/dist/twilight/{p-d15630dd.entry.js.map → p-b492c336.entry.js.map} +0 -0
  486. /package/dist/twilight/{p-f745fcad.entry.js.map → p-b51bb42b.entry.js.map} +0 -0
  487. /package/dist/twilight/{p-3eaddcf1.entry.js.map → p-bb1a0f6b.entry.js.map} +0 -0
  488. /package/dist/twilight/{p-5542a867.entry.js.map → p-bca6b6b2.entry.js.map} +0 -0
  489. /package/dist/twilight/{p-fbe10567.entry.js.map → p-bdca9c9c.entry.js.map} +0 -0
  490. /package/dist/twilight/{p-fcc64f6d.entry.js.map → p-be2938da.entry.js.map} +0 -0
  491. /package/dist/twilight/{p-58085711.entry.js.map → p-c5b5a947.entry.js.map} +0 -0
  492. /package/dist/twilight/{p-13324cdd.system.entry.js.map → p-d33197dc.system.entry.js.map} +0 -0
  493. /package/dist/twilight/{p-e9bc1fa4.system.entry.js.map → p-d3c9cfbb.system.entry.js.map} +0 -0
  494. /package/dist/twilight/{p-e823d4e8.system.entry.js.map → p-d4017888.system.entry.js.map} +0 -0
  495. /package/dist/twilight/{p-442340d3.system.entry.js.map → p-d43b5d6a.system.entry.js.map} +0 -0
  496. /package/dist/twilight/{p-2ae75a1c.entry.js.map → p-d7604122.entry.js.map} +0 -0
  497. /package/dist/twilight/{p-ebd4ac51.system.entry.js.map → p-d8039b97.system.entry.js.map} +0 -0
  498. /package/dist/twilight/{p-423d91f5.system.entry.js.map → p-db9674c2.system.entry.js.map} +0 -0
  499. /package/dist/twilight/{p-a1d102d3.system.entry.js.map → p-eb292930.system.entry.js.map} +0 -0
  500. /package/dist/twilight/{p-60bf8746.system.entry.js.map → p-ec034bd2.system.entry.js.map} +0 -0
  501. /package/dist/twilight/{p-ab7cc63a.system.entry.js.map → p-f07ad750.system.entry.js.map} +0 -0
  502. /package/dist/twilight/{p-06b95a05.system.entry.js.map → p-f0b1ceef.system.entry.js.map} +0 -0
  503. /package/dist/twilight/{p-ef38f4ac.system.entry.js.map → p-f5aefbca.system.entry.js.map} +0 -0
  504. /package/dist/twilight/{p-17c50686.entry.js.map → p-fb399776.entry.js.map} +0 -0
  505. /package/dist/twilight/{p-e784d087.entry.js.map → p-fe81524d.entry.js.map} +0 -0
  506. /package/dist/twilight/{p-7eff7dc5.system.entry.js.map → p-fed7a7a5.system.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(i,t,e,r){function n(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,s){function a(i){try{l(r.next(i))}catch(i){s(i)}}function o(i){try{l(r["throw"](i))}catch(i){s(i)}}function l(i){i.done?e(i.value):n(i.value).then(a,o)}l((r=r.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(i){return function(t){return l([i,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(r=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=t.call(i,e)}catch(i){o=[6,i];n=0}finally{r=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,h,g as getElement}from"./index-D4D34Ujk.js";import{I as IconVerified}from"./check-uTyAzPSy.js";var IconStar2=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var IconStar2Muted=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var IconFire2=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var sallaReviewCardCss=":host{display:block}";var SallaReviewCard=function(){function i(i){var t=this;registerInstance(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var e;if(!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.setPointerCapture(i.pointerId);t.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!t.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.isSwiping=false};this.goToSlide=function(i){t.currentSlide=Math.max(0,Math.min(i,t.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var r=t-this.startPoint.y;this.processSwipe(e,r)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var r=i<0;var n=this.isRTL?!r:r;if(n){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,e){return h("span",{key:e,innerHTML:i.review.stars>=e+1?IconStar2:IconStar2Muted})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,e){var r=t.url;return h("button",{key:r||e,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===e?"active":""),onClick:function(){return i.goToSlide(e)},"aria-label":"Go to slide ".concat(e+1),onPointerDown:function(){return i.goToSlide(e)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return h("div",{class:"s-review-card-slider-container"},h("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return h("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},h("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),h("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return h("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return h("div",{class:"s-review-card-header"},h("div",{class:"s-review-card-reviewer-name"},h("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&h("span",{class:"s-review-card-verified-icon",innerHTML:IconVerified})),h("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,e,r,n;var s=(i=this.review)===null||i===void 0?void 0:i.product;if(!s)return null;return h("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},h("img",{alt:((r=s.image)===null||r===void 0?void 0:r.alt)||"Product",src:(n=s.image)===null||n===void 0?void 0:n.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),h("div",{class:"s-review-card-product-details"},h("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?h("p",{class:"s-review-card-product-details-purchase-count"},h("span",{innerHTML:IconFire2}),this.purchasedCount):null))};i.prototype.render=function(){var i;return h("div",{key:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),renderDivider(),h("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),h("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),renderDivider(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();var renderDivider=function(i){return h("div",{class:"s-review-card-divider ".concat("")})};SallaReviewCard.style=sallaReviewCardCss;export{SallaReviewCard as salla_review_card};
4
+ */import{r as registerInstance,h,g as getElement}from"./index-Hw2jlaNN.js";import{I as IconVerified}from"./check-uTyAzPSy.js";var IconStar2=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var IconStar2Muted=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var IconFire2=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var sallaReviewCardCss=":host{display:block}";var SallaReviewCard=function(){function i(i){var t=this;registerInstance(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var e;if(!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.setPointerCapture(i.pointerId);t.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!t.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var e;if(!t.isSwiping||!i.isPrimary)return;(e=t.sliderElement)===null||e===void 0?void 0:e.releasePointerCapture(i.pointerId);t.isSwiping=false};this.goToSlide=function(i){t.currentSlide=Math.max(0,Math.min(i,t.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var r=t-this.startPoint.y;this.processSwipe(e,r)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var r=i<0;var n=this.isRTL?!r:r;if(n){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,e){return h("span",{key:e,innerHTML:i.review.stars>=e+1?IconStar2:IconStar2Muted})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,e){var r=t.url;return h("button",{key:r||e,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===e?"active":""),onClick:function(){return i.goToSlide(e)},"aria-label":"Go to slide ".concat(e+1),onPointerDown:function(){return i.goToSlide(e)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return h("div",{class:"s-review-card-slider-container"},h("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return h("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},h("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),h("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return h("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return h("div",{class:"s-review-card-header"},h("div",{class:"s-review-card-reviewer-name"},h("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&h("span",{class:"s-review-card-verified-icon",innerHTML:IconVerified})),h("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,e,r,n;var s=(i=this.review)===null||i===void 0?void 0:i.product;if(!s)return null;return h("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},h("img",{alt:((r=s.image)===null||r===void 0?void 0:r.alt)||"Product",src:(n=s.image)===null||n===void 0?void 0:n.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),h("div",{class:"s-review-card-product-details"},h("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?h("p",{class:"s-review-card-product-details-purchase-count"},h("span",{innerHTML:IconFire2}),this.purchasedCount):null))};i.prototype.render=function(){var i;return h("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),renderDivider(),h("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),h("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),renderDivider(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();var renderDivider=function(i){return h("div",{class:"s-review-card-divider ".concat("")})};SallaReviewCard.style=sallaReviewCardCss;export{SallaReviewCard as salla_review_card};
5
5
  //# sourceMappingURL=salla-review-card.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,r,t,i){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function s(e){try{u(i.next(e))}catch(e){a(e)}}function o(e){try{u(i["throw"](e))}catch(e){a(e)}}function u(e){e.done?t(e.value):n(e.value).then(s,o)}u((i=i.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(r){return u([e,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(t=0)),t)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;n=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(o[0]===6&&t.label<a[1]){t.label=a[1];a=o;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(o);break}if(a[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return e.concat(a||Array.prototype.slice.call(r))};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{a as require_root,d as requireIsObject,e as requireIsSymbol,f as getDefaultExportFromCjs,r as registerInstance,h,g as getElement}from"./index-D4D34Ujk.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var now_1;var hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();var r=function(){return e.Date.now()};now_1=r;return now_1}var _trimmedEndIndex;var hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function r(r){var t=r.length;while(t--&&e.test(r.charAt(t))){}return t}_trimmedEndIndex=r;return _trimmedEndIndex}var _baseTrim;var hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex();var r=/^\s+/;function t(t){return t?t.slice(0,e(t)+1).replace(r,""):t}_baseTrim=t;return _baseTrim}var toNumber_1;var hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),r=requireIsObject(),t=requireIsSymbol();var i=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var s=/^0o[0-7]+$/i;var o=parseInt;function u(u){if(typeof u=="number"){return u}if(t(u)){return i}if(r(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=r(l)?l+"":l}if(typeof u!="string"){return u===0?u:+u}u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):n.test(u)?i:+u}toNumber_1=u;return toNumber_1}var debounce_1;var hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),r=requireNow(),t=requireToNumber();var i="Expected a function";var n=Math.max,a=Math.min;function s(s,o,u){var l,f,c,d,h,v,m=0,p=false,b=false,_=true;if(typeof s!="function"){throw new TypeError(i)}o=t(o)||0;if(e(u)){p=!!u.leading;b="maxWait"in u;c=b?n(t(u.maxWait)||0,o):c;_="trailing"in u?!!u.trailing:_}function g(e){var r=l,t=f;l=f=undefined;m=e;d=s.apply(t,r);return d}function w(e){m=e;h=setTimeout(T,o);return p?g(e):d}function y(e){var r=e-v,t=e-m,i=o-r;return b?a(i,c-t):i}function q(e){var r=e-v,t=e-m;return v===undefined||r>=o||r<0||b&&t>=c}function T(){var e=r();if(q(e)){return R(e)}h=setTimeout(T,y(e))}function R(e){h=undefined;if(_&&l){return g(e)}l=f=undefined;return d}function E(){if(h!==undefined){clearTimeout(h)}m=0;l=v=f=h=undefined}function x(){return h===undefined?d:R(r())}function I(){var e=r(),t=q(e);l=arguments;f=this;v=e;if(t){if(h===undefined){return w(v)}if(b){clearTimeout(h);h=setTimeout(T,o);return g(v)}}if(h===undefined){h=setTimeout(T,o)}return d}I.cancel=E;I.flush=x;return I}debounce_1=s;return debounce_1}var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),r=requireIsObject();var t="Expected a function";function i(i,n,a){var s=true,o=true;if(typeof i!="function"){throw new TypeError(t)}if(r(a)){s="leading"in a?!!a.leading:s;o="trailing"in a?!!a.trailing:o}return e(i,n,{leading:s,maxWait:n,trailing:o})}throttle_1=i;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var MasonryLayout=function(){function e(e){var r=this;this.grid=e;this.create=function(){r.mutationObserver.observe(r.grid,{childList:true});for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];r.resizeObserver.observe(i)}};this.onContainerMutation=function(e){var t=e.flatMap((function(e){return Array.from(e.removedNodes)}));var i=e.flatMap((function(e){return Array.from(e.addedNodes)}));for(var n=0,a=t;n<a.length;n++){var s=a[n];if(s instanceof Element){r.resizeObserver.unobserve(s)}}for(var o=0,u=i;o<u.length;o++){var s=u[o];if(s instanceof Element){r.resizeObserver.observe(s)}}if(t.length>0&&i.length===0){r.update()}};this.onChildrenResize=function(e){var t=e.filter((function(e){return e.target.parentElement!==null}));if(t.length>0){r.update()}};this.update=throttle((function(){var e=window.getComputedStyle(r.grid);if(e.getPropertyValue("display").includes("grid")===false){r.clean();return}var t=parseGridTemplateColumns(r.grid);if(t.length<=1){r.clean();return}var i=Number.parseFloat(e.getPropertyValue("row-gap").trim())||0;var n=Array.from(r.grid.children);for(var a=0;a<t.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var o=0;o<n.length;o++){var u=n[o-t.length];var l=n[o];if(u!==undefined&&l!==undefined){var f=u.getBoundingClientRect().bottom;l.style.removeProperty("margin-top");var c=l.getBoundingClientRect().top;if(c-i!==f){var d=Math.round((f-(c-i)+Number.EPSILON)*100)/100;l.style.setProperty("margin-top","".concat(d,"px"))}}}}),32);this.destroy=function(){r.resizeObserver.disconnect();r.mutationObserver.disconnect();r.clean()};this.clean=function(){for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}e.prototype[Symbol.dispose]=function(){this.destroy()};return e}();function parseGridTemplateColumns(e){var r=window.getComputedStyle(e);var t=r.getPropertyValue("grid-template-columns");return t.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var sallaReviewsPageCss=":host{display:block}";var SallaReviewsPage=function(){function e(e){registerInstance(this,e);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}e.prototype.getUrlParams=function(){var e=new URLSearchParams(window.location.search);return{sort:e.get("sort")||null,page:Number.parseInt(e.get("page"))||1}};e.prototype.updateUrlParams=function(e){var r=new URL(window.location.href);for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],a=n[0],s=n[1];if(s){r.searchParams.set(a,s.toString())}else{r.searchParams.delete(a)}}window.history.replaceState({},"",r.toString())};e.prototype.fetchReviews=function(e,r){var t=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:r||t.page||1,sort:e||t.sort||null}})};e.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=this.el.querySelector(".s-reviews-page-grid");if(!e)return[2];try{new MasonryLayout(e);salla.logger.info("Masonry initialized successfully")}catch(e){salla.logger.error("Masonry initialization failed:",e)}return[2]}))}))};e.prototype.animateReviewCards=function(){var e=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");Helper.animateItems(e)};e.prototype.initiateInfiniteScroll=function(){var e=this;var r,t,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var r,t;return((t=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)||null},history:false,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(){e.isLoading=true}));(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("load",(function(r){e.pagination=r.pagination;e.reviews=__spreadArray(__spreadArray([],e.reviews,true),r.data,true);e.isLoading=false;e.updateUrlParams({page:r.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(r){salla.logger.error("Error loading more reviews:",r);e.isLoading=false}))};e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){requestAnimationFrame(e.animateReviewCards.bind(e))}),176)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,r,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");r=this.getUrlParams();return[4,this.fetchReviews(r.sort)];case 2:t=n.sent();this.sort=r.sort;this.reviews=t.data;this.pagination=t.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(e=this.pagination)===null||e===void 0?void 0:e.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};e.prototype.handleSorting=function(e){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=e.target.value;this.sort=r;this.updateUrlParams({sort:r,page:1});return[4,this.fetchReviews(r,1)];case 1:t=i.sent();this.reviews=t.data;this.pagination=t.pagination;return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.initializeMasonry()];case 1:e.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};e.prototype.renderSortingOptions=function(){var e=this;var r=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return r.map((function(r){return h("option",{key:r.value,value:r.value,selected:r.value===e.sort},r.label)}))};e.prototype.render=function(){var e=this;var r,t;return h("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},h("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},h("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,h("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),h("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},h("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),h("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(r){return e.handleSorting(r)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?h("main",{class:"s-reviews-page-grid",ref:function(r){e.wrapper=r}},this.reviews.map((function(e){return h("salla-review-card",{key:e.id,review:e})}))):h("div",{class:"s-products-list-placeholder"},h("span",{innerHTML:ShoppingBag}),h("p",null,this.placeholderText)),((t=(r=this.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)&&this.reviews.length?h("div",{class:"s-reviews-page-load-more-container"},h("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()},onKeyUp:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SallaReviewsPage.style=sallaReviewsPageCss;export{SallaReviewsPage as salla_reviews_page};
4
+ */import{a as require_root,d as requireIsObject,e as requireIsSymbol,f as getDefaultExportFromCjs,r as registerInstance,h,g as getElement}from"./index-Hw2jlaNN.js";import{S as ShoppingBag}from"./shopping-bag-DiKTtDW5.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var now_1;var hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();var r=function(){return e.Date.now()};now_1=r;return now_1}var _trimmedEndIndex;var hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function r(r){var t=r.length;while(t--&&e.test(r.charAt(t))){}return t}_trimmedEndIndex=r;return _trimmedEndIndex}var _baseTrim;var hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex();var r=/^\s+/;function t(t){return t?t.slice(0,e(t)+1).replace(r,""):t}_baseTrim=t;return _baseTrim}var toNumber_1;var hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),r=requireIsObject(),t=requireIsSymbol();var i=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var a=/^0b[01]+$/i;var s=/^0o[0-7]+$/i;var o=parseInt;function u(u){if(typeof u=="number"){return u}if(t(u)){return i}if(r(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=r(l)?l+"":l}if(typeof u!="string"){return u===0?u:+u}u=e(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):n.test(u)?i:+u}toNumber_1=u;return toNumber_1}var debounce_1;var hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),r=requireNow(),t=requireToNumber();var i="Expected a function";var n=Math.max,a=Math.min;function s(s,o,u){var l,f,c,d,h,v,m=0,p=false,b=false,_=true;if(typeof s!="function"){throw new TypeError(i)}o=t(o)||0;if(e(u)){p=!!u.leading;b="maxWait"in u;c=b?n(t(u.maxWait)||0,o):c;_="trailing"in u?!!u.trailing:_}function g(e){var r=l,t=f;l=f=undefined;m=e;d=s.apply(t,r);return d}function w(e){m=e;h=setTimeout(T,o);return p?g(e):d}function y(e){var r=e-v,t=e-m,i=o-r;return b?a(i,c-t):i}function q(e){var r=e-v,t=e-m;return v===undefined||r>=o||r<0||b&&t>=c}function T(){var e=r();if(q(e)){return R(e)}h=setTimeout(T,y(e))}function R(e){h=undefined;if(_&&l){return g(e)}l=f=undefined;return d}function E(){if(h!==undefined){clearTimeout(h)}m=0;l=v=f=h=undefined}function x(){return h===undefined?d:R(r())}function I(){var e=r(),t=q(e);l=arguments;f=this;v=e;if(t){if(h===undefined){return w(v)}if(b){clearTimeout(h);h=setTimeout(T,o);return g(v)}}if(h===undefined){h=setTimeout(T,o)}return d}I.cancel=E;I.flush=x;return I}debounce_1=s;return debounce_1}var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),r=requireIsObject();var t="Expected a function";function i(i,n,a){var s=true,o=true;if(typeof i!="function"){throw new TypeError(t)}if(r(a)){s="leading"in a?!!a.leading:s;o="trailing"in a?!!a.trailing:o}return e(i,n,{leading:s,maxWait:n,trailing:o})}throttle_1=i;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var MasonryLayout=function(){function e(e){var r=this;this.grid=e;this.create=function(){r.mutationObserver.observe(r.grid,{childList:true});for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];r.resizeObserver.observe(i)}};this.onContainerMutation=function(e){var t=e.flatMap((function(e){return Array.from(e.removedNodes)}));var i=e.flatMap((function(e){return Array.from(e.addedNodes)}));for(var n=0,a=t;n<a.length;n++){var s=a[n];if(s instanceof Element){r.resizeObserver.unobserve(s)}}for(var o=0,u=i;o<u.length;o++){var s=u[o];if(s instanceof Element){r.resizeObserver.observe(s)}}if(t.length>0&&i.length===0){r.update()}};this.onChildrenResize=function(e){var t=e.filter((function(e){return e.target.parentElement!==null}));if(t.length>0){r.update()}};this.update=throttle((function(){var e=window.getComputedStyle(r.grid);if(e.getPropertyValue("display").includes("grid")===false){r.clean();return}var t=parseGridTemplateColumns(r.grid);if(t.length<=1){r.clean();return}var i=Number.parseFloat(e.getPropertyValue("row-gap").trim())||0;var n=Array.from(r.grid.children);for(var a=0;a<t.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var o=0;o<n.length;o++){var u=n[o-t.length];var l=n[o];if(u!==undefined&&l!==undefined){var f=u.getBoundingClientRect().bottom;l.style.removeProperty("margin-top");var c=l.getBoundingClientRect().top;if(c-i!==f){var d=Math.round((f-(c-i)+Number.EPSILON)*100)/100;l.style.setProperty("margin-top","".concat(d,"px"))}}}}),32);this.destroy=function(){r.resizeObserver.disconnect();r.mutationObserver.disconnect();r.clean()};this.clean=function(){for(var e=0,t=Array.from(r.grid.children);e<t.length;e++){var i=t[e];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}e.prototype[Symbol.dispose]=function(){this.destroy()};return e}();function parseGridTemplateColumns(e){var r=window.getComputedStyle(e);var t=r.getPropertyValue("grid-template-columns");return t.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var sallaReviewsPageCss=":host{display:block}";var SallaReviewsPage=function(){function e(e){registerInstance(this,e);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}e.prototype.getUrlParams=function(){var e=new URLSearchParams(window.location.search);return{sort:e.get("sort")||null,page:Number.parseInt(e.get("page"))||1}};e.prototype.updateUrlParams=function(e){var r=new URL(window.location.href);for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],a=n[0],s=n[1];if(s){r.searchParams.set(a,s.toString())}else{r.searchParams.delete(a)}}window.history.replaceState({},"",r.toString())};e.prototype.fetchReviews=function(e,r){var t=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:r||t.page||1,sort:e||t.sort||null}})};e.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=this.el.querySelector(".s-reviews-page-grid");if(!e)return[2];try{new MasonryLayout(e);salla.logger.info("Masonry initialized successfully")}catch(e){salla.logger.error("Masonry initialization failed:",e)}return[2]}))}))};e.prototype.animateReviewCards=function(){var e=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");Helper.animateItems(e)};e.prototype.initiateInfiniteScroll=function(){var e=this;var r,t,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var r,t;return((t=(r=e.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)||null},history:false,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(){e.isLoading=true}));(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("load",(function(r){e.pagination=r.pagination;e.reviews=__spreadArray(__spreadArray([],e.reviews,true),r.data,true);e.isLoading=false;e.updateUrlParams({page:r.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(r){salla.logger.error("Error loading more reviews:",r);e.isLoading=false}))};e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){requestAnimationFrame(e.animateReviewCards.bind(e))}),176)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,r,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");r=this.getUrlParams();return[4,this.fetchReviews(r.sort)];case 2:t=n.sent();this.sort=r.sort;this.reviews=t.data;this.pagination=t.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(e=this.pagination)===null||e===void 0?void 0:e.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};e.prototype.handleSorting=function(e){return __awaiter(this,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=e.target.value;this.sort=r;this.updateUrlParams({sort:r,page:1});return[4,this.fetchReviews(r,1)];case 1:t=i.sent();this.reviews=t.data;this.pagination=t.pagination;return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.initializeMasonry()];case 1:e.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};e.prototype.renderSortingOptions=function(){var e=this;var r=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return r.map((function(r){return h("option",{key:r.value,value:r.value,selected:r.value===e.sort},r.label)}))};e.prototype.render=function(){var e=this;var r,t;return h("host",{key:"f3b06307322a56ad320374a50e13161be4e7cc8a"},h("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},h("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,h("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),h("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},h("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),h("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",onChange:function(r){return e.handleSorting(r)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?h("main",{class:"s-reviews-page-grid",ref:function(r){e.wrapper=r}},this.reviews.map((function(e){return h("salla-review-card",{key:e.id,review:e})}))):h("div",{class:"s-products-list-placeholder"},h("span",{innerHTML:ShoppingBag}),h("p",null,this.placeholderText)),((t=(r=this.pagination)===null||r===void 0?void 0:r.links)===null||t===void 0?void 0:t.next)&&this.reviews.length?h("div",{class:"s-reviews-page-load-more-container"},h("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()},onKeyUp:function(){var r;return(r=e.infiniteScroll)===null||r===void 0?void 0:r.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SallaReviewsPage.style=sallaReviewsPageCss;export{SallaReviewsPage as salla_reviews_page};
5
5
  //# sourceMappingURL=salla-reviews-page.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h}from"./index-D4D34Ujk.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var IconQuoteOpen='\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>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var sallaReviewsCss="";var SallaReviews=function(){function s(s){var e=this;registerInstance(this,s);this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.displayAllURL=null;this.source=this.source;salla.onReady((function(){e.displayAllURL=salla.url.get("testimonials");e.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){e.testimonialText=salla.lang.get("blocks.home.testimonials");e.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;Helper.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return h("div",{key:"0ea9cab5b1f9d4d2b6b74cec987f24c858191217",class:"s-reviews-container"},h("div",{key:"6f17c3033b419b2eaf01f6dc858a4b7ce23bd2c4",class:"s-reviews-header-wrapper"},h("h1",{key:"1e043cca8a56542a297449e3ff5d3e52c93e0997",class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?h("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,h("span",{class:"s-reviews-display-all-icon",innerHTML:arrowLeft})):null),h("salla-slider",{key:"b5aee5d359c8604a5570991f2a7801b651d8321d",centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},h("div",{key:"98428b4fde7a2c81567d387c93a9b87ef3245923",slot:"items"},this.reviews.map((function(s,e){return h("div",{key:e,class:"s-reviews-swiper-slide"},h("div",{class:"s-reviews-testimonial"},h("div",{class:"s-reviews-testimonial__inner"},h("div",{class:"s-reviews-testimonial__avatar"},h("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),h("div",{class:"s-reviews-testimonial__text"},h("p",{innerHTML:s.content}),h("div",{class:"s-reviews-testimonial__name_wrapper"},h("div",{class:"s-reviews-testimonial__info"},s.name&&h("h2",null,"".concat(s.name))),h("div",{class:"s-reviews-testimonial__rating"},h("salla-rating-stars",{size:"small",value:s.stars})))),h("span",{class:"s-reviews-testimonial__icon",innerHTML:IconQuoteOpen}))))})))))};return s}();SallaReviews.style=sallaReviewsCss;export{SallaReviews as salla_reviews};
4
+ import{r as registerInstance,h}from"./index-Hw2jlaNN.js";import{a as arrowLeft}from"./arrow-left-BedNk7k1.js";import{H as Helper}from"./Helper-DGKT_pIJ.js";import"./anime.es-CgtvEd63.js";var IconQuoteOpen='\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>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var sallaReviewsCss="";var SallaReviews=function(){function s(s){var e=this;registerInstance(this,s);this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.displayAllURL=null;this.source=this.source;salla.onReady((function(){e.displayAllURL=salla.url.get("testimonials");e.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){e.testimonialText=salla.lang.get("blocks.home.testimonials");e.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;Helper.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return h("div",{key:"deed3cdbac9556908c110d96935d6478996caf99",class:"s-reviews-container"},h("div",{key:"3646aa3266c29d1f371cf3acedaedc726f7e6bac",class:"s-reviews-header-wrapper"},h("h1",{key:"0a47642eea4e162173374f0a1340fd3068165d30",class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?h("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,h("span",{class:"s-reviews-display-all-icon",innerHTML:arrowLeft})):null),h("salla-slider",{key:"71b0e1f246172b5ea042f7a4dcdc351190a3de3c",centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},h("div",{key:"50b9ac94feca79ed29d85bfcf4808b0849e4f933",slot:"items"},this.reviews.map((function(s,e){return h("div",{key:e,class:"s-reviews-swiper-slide"},h("div",{class:"s-reviews-testimonial"},h("div",{class:"s-reviews-testimonial__inner"},h("div",{class:"s-reviews-testimonial__avatar"},h("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),h("div",{class:"s-reviews-testimonial__text"},h("p",{innerHTML:s.content}),h("div",{class:"s-reviews-testimonial__name_wrapper"},h("div",{class:"s-reviews-testimonial__info"},s.name&&h("h2",null,"".concat(s.name))),h("div",{class:"s-reviews-testimonial__rating"},h("salla-rating-stars",{size:"small",value:s.stars})))),h("span",{class:"s-reviews-testimonial__icon",innerHTML:IconQuoteOpen}))))})))))};return s}();SallaReviews.style=sallaReviewsCss;export{SallaReviews as salla_reviews};
5
5
  //# sourceMappingURL=salla-reviews.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-D4D34Ujk.js";import{f as facebook,t as twitter}from"./twitter-Dz7o69vX.js";var instagram='\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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var youtube='\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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var snapchat='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var tiktok='\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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var sallaSocialCss=":host{display:block}";var SallaSocial=function(){function c(c){var l=this;registerInstance(this,c);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:instagram,twitter:twitter,facebook:facebook,youtube:youtube,snapchat:snapchat,tiktok:tiktok};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){l.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return h(Host,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},h("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return h("li",{class:"s-social-link"},h("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return c}();SallaSocial.style=sallaSocialCss;export{SallaSocial as salla_social};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-Hw2jlaNN.js";import{f as facebook,t as twitter}from"./twitter-Dz7o69vX.js";var instagram='\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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var youtube='\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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var snapchat='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var tiktok='\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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var sallaSocialCss=":host{display:block}";var SallaSocial=function(){function c(c){var l=this;registerInstance(this,c);var t;this.links=salla.config.get("store.social");this.iconsList={instagram:instagram,twitter:twitter,facebook:facebook,youtube:youtube,snapchat:snapchat,tiktok:tiktok};this.socialSlot=((t=this.host.querySelector('[slot="social-item"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){l.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return h(Host,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},h("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},l.map((function(l){return h("li",{class:"s-social-link"},h("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return c}();SallaSocial.style=sallaSocialCss;export{SallaSocial as salla_social};
5
5
  //# sourceMappingURL=salla-social.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(r,e,t,i){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,s){function o(r){try{l(i.next(r))}catch(r){s(r)}}function a(r){try{l(i["throw"](r))}catch(r){s(r)}}function l(r){r.done?t(r.value):n(r.value).then(o,a)}l((i=i.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(r){return function(e){return l([r,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(t=0)),t)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=e.call(r,t)}catch(r){a=[6,r];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++){if(s||!(i in e)){if(!s)s=Array.prototype.slice.call(e,0,i);s[i]=e[i]}}return r.concat(s||Array.prototype.slice.call(e))};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,h,H as Host}from"./index-D4D34Ujk.js";var DiscountType;(function(r){r["PERCENTAGE"]="percentage";r["FIXED"]="fixed"})(DiscountType||(DiscountType={}));var StarIcon='<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 StarsIcon='<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 GoldIcon='<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 DiamondIcon='<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>';var TIERED_OFFER_CONFIG={staticIcons:[StarIcon,StarsIcon,GoldIcon,DiamondIcon],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var TierUtils=function(){function r(){}r.findTierByIndex=function(r,e){return r.find((function(r){return r.index===e}))||null};r.findTierByName=function(r,e){return r.find((function(r){return r.tier_name===e}))||null};r.getTierNameByIndex=function(r,e){var t;return(t=this.findTierByIndex(r,e))===null||t===void 0?void 0:t.tier_name};r.findCurrentTierIndex=function(r,e){if(!e)return 0;for(var t=e.length-1;t>=0;t--){if(r>=e[t].threshold){return e[t].index}}return 0};return r}();var sallaTieredOfferCss=".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)}";var SallaTieredOffer=function(){function r(r){var e=this;registerInstance(this,r);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(r){e.activeTabTier=r};salla.lang.onLoaded((function(){e.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");e.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");e.discountText=salla.lang.get("blocks.tiered_offer.discount");e.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:t.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:r=t.sent();if(!r){return[2]}this.initializeComponent(r);return[3,5];case 3:e=t.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};r.prototype.checkFeatureEnabled=function(){var r;return(r=salla.config.get("store.features"))===null||r===void 0?void 0:r.includes("tiered-offer")};r.prototype.checkCartExists=function(){var r,e;return!!((e=(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.summary)===null||e===void 0?void 0:e.count)};r.prototype.validateCouponCompatibility=function(r,e){var t;return!(e&&!((t=r.details)===null||t===void 0?void 0:t.applied_with_coupon))};r.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:e=n.sent().data;t=e.find((function(r){return r.type==="tiered_offer"}));if(!t){return[2,null]}if(!this.validateCouponCompatibility(t,(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.coupon)){this.canRender=false;return[2,null]}return[2,t];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};r.prototype.initializeComponent=function(r){var e;this.apiOfferData=r;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;var i=this.findCurrentTierIndex(t);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=TierUtils.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};r.prototype.componentDidLoad=function(){var r=this;salla.event.on("cart::updated",(function(e){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.fetchTieredOfferData()];case 1:r=t.sent();if(r){this.updateOfferValues(e,r)}return[2]}}))}))}))};r.prototype.mapApiDataToTiers=function(r){var e=__spreadArray([],r.details.discounts,true).sort((function(r,e){return r.min_spend-e.min_spend}));var t=e.map((function(r,e){return{name:r.name,tier_name:r.name,discount:r.type===DiscountType.PERCENTAGE?"".concat(salla.helpers.number(r.value),"%"):salla.money(r.value),icon:TIERED_OFFER_CONFIG.staticIcons[e]||TIERED_OFFER_CONFIG.staticIcons[0],threshold:r.min_spend,text_color:TIERED_OFFER_CONFIG.staticColors[e],index:e+1}}));return{current_tier:TierUtils.getTierNameByIndex(t,this.findCurrentTierIndex(r.details.current_value,t)),tiers:t}};r.prototype.findCurrentTierIndex=function(r,e){var t;if(e===void 0){e=(t=this.tieredOfferData)===null||t===void 0?void 0:t.tiers}return TierUtils.findCurrentTierIndex(r,e||[])};r.prototype.updateOfferValues=function(r,e){var t,i;if(!e||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(e,r.coupon)){this.canRender=false;return}this.canRender=true;if(((t=e.details)===null||t===void 0?void 0:t.with_current_cart)===false){return}var n=((i=e.details)===null||i===void 0?void 0:i.current_value)||0;this.apiOfferData=e;var s=this.findCurrentTierIndex(n);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=TierUtils.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};r.prototype.getLoadingSkeletonView=function(){return h(Host,null,h("div",{class:"s-tiered-offer-container"},h("div",{class:"s-tiered-offer-skeleton-wrapper"},h("div",{class:"s-tiered-offer-skeleton-title"},h("salla-skeleton",{height:"16px",width:"40%"})),h("div",{class:"s-tiered-offer-skeleton-subtitle"},h("salla-skeleton",{height:"20px",width:"60%"})),h("div",{class:"s-tiered-offer-skeleton-progress"},h("salla-skeleton",{height:"16px",width:"100%"})),h("div",{class:"s-tiered-offer-skeleton-tabs"},h("salla-skeleton",{height:"50px",width:"100%"})))))};r.prototype.getCurrentTierData=function(){return TierUtils.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};r.prototype.getProgressWidth=function(){var r;var e=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;var t=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(e);var n=i;return n/t*100};r.prototype.calculateMilestonePosition=function(r,e){if(e===1){return"calc(100% - 18px)"}var t=(r+1)/e*100;var i=8/e;return"".concat(Math.max(2,Math.min(95,t-i)),"%")};r.prototype.getMilestoneStyles=function(r,e,t){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(e,t);var o=r.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};r.prototype.getMilestoneIconStyles=function(r,e,t){if(e){return{color:r.text_color}}if(t){return{color:"var(--color-primary)"}}return{}};r.prototype.renderProgressBarBackground=function(r){return[h("div",{class:"s-tiered-offer-progress-bg"}),h("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(r,"%")}})]};r.prototype.renderMilestoneIcon=function(r,e,t){var i=["s-tiered-offer-milestone-icon",e?"s-tiered-offer-milestone-active":"",t?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return h("div",{class:i,style:this.getMilestoneIconStyles(r,e,t)},h("span",{innerHTML:r.icon}))};r.prototype.renderMilestoneName=function(r,e){return h("div",{class:"s-tiered-offer-milestone-name"},e&&h("span",{style:{color:r.text_color}},r.name))};r.prototype.renderMilestones=function(r,e){var t=this;var i=e===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return h("div",{class:"s-tiered-offer-milestones-wrapper"},h("div",{class:i},this.tieredOfferData.tiers.map((function(i,n){var s=r>=i.threshold;var o=i.tier_name===t.currentTier;return h("div",{class:"s-tiered-offer-milestone",style:t.getMilestoneStyles(i,n,e)},t.renderMilestoneIcon(i,o,s),t.renderMilestoneName(i,o))}))))};r.prototype.renderProgressBar=function(){var r;var e=this.getProgressWidth();var t=this.tieredOfferData.tiers.length;var i=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;return h("div",{class:"s-tiered-offer-progress-container"},h("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(i,t)))};r.prototype.renderTabs=function(){var r=this;return h("div",{class:"s-tiered-offer-tabs-container"},h("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(e){var t=e.tier_name===r.activeTabTier;return h("button",{class:"s-tiered-offer-tab-header ".concat(t?"s-tiered-offer-tab-active":""),onClick:function(){return r.handleTabClick(e.tier_name)}},h("span",null,e.name))}))),h("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var e=TierUtils.findTierByName(r.tieredOfferData.tiers,r.activeTabTier);if(!e)return null;return h("div",{class:"s-tiered-offer-tab-content"},h("div",{class:"s-tiered-offer-tab-content-inner"},h("div",{class:"s-tiered-offer-discount-section"},h("p",{class:"s-tiered-offer-discount-title"},r.discountText," ",h("span",{innerHTML:e.discount})),h("p",{class:"s-tiered-offer-benefit-description"},r.benefitText," ",e.name))))}()))};r.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var r=this.getCurrentTierData();return h(Host,null,h("div",{class:"s-tiered-offer-container"},h("div",{class:"s-tiered-offer-header"},h("div",{class:"s-tiered-offer-header-content"},h("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),h("div",{class:"s-tiered-offer-current-tier-name-wrapper"},h("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",h("span",{class:"s-tiered-offer-tier-name"},r.name)),h("span",{innerHTML:r.icon})))),this.renderProgressBar(),this.renderTabs()))};return r}();SallaTieredOffer.style=sallaTieredOfferCss;export{SallaTieredOffer as salla_tiered_offer};
4
+ */import{r as registerInstance,h,H as Host}from"./index-Hw2jlaNN.js";var DiscountType;(function(r){r["PERCENTAGE"]="percentage";r["FIXED"]="fixed"})(DiscountType||(DiscountType={}));var StarIcon='<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 StarsIcon='<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 GoldIcon='<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 DiamondIcon='<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>';var TIERED_OFFER_CONFIG={staticIcons:[StarIcon,StarsIcon,GoldIcon,DiamondIcon],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var TierUtils=function(){function r(){}r.findTierByIndex=function(r,e){return r.find((function(r){return r.index===e}))||null};r.findTierByName=function(r,e){return r.find((function(r){return r.tier_name===e}))||null};r.getTierNameByIndex=function(r,e){var t;return(t=this.findTierByIndex(r,e))===null||t===void 0?void 0:t.tier_name};r.findCurrentTierIndex=function(r,e){if(!e)return 0;for(var t=e.length-1;t>=0;t--){if(r>=e[t].threshold){return e[t].index}}return 0};return r}();var sallaTieredOfferCss=".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)}";var SallaTieredOffer=function(){function r(r){var e=this;registerInstance(this,r);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(r){e.activeTabTier=r};salla.lang.onLoaded((function(){e.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");e.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");e.discountText=salla.lang.get("blocks.tiered_offer.discount");e.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:t.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:r=t.sent();if(!r){return[2]}this.initializeComponent(r);return[3,5];case 3:e=t.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};r.prototype.checkFeatureEnabled=function(){var r;return(r=salla.config.get("store.features"))===null||r===void 0?void 0:r.includes("tiered-offer")};r.prototype.checkCartExists=function(){var r,e;return!!((e=(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.summary)===null||e===void 0?void 0:e.count)};r.prototype.validateCouponCompatibility=function(r,e){var t;return!(e&&!((t=r.details)===null||t===void 0?void 0:t.applied_with_coupon))};r.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:e=n.sent().data;t=e.find((function(r){return r.type==="tiered_offer"}));if(!t){return[2,null]}if(!this.validateCouponCompatibility(t,(r=salla.storage.get("cart"))===null||r===void 0?void 0:r.coupon)){this.canRender=false;return[2,null]}return[2,t];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};r.prototype.initializeComponent=function(r){var e;this.apiOfferData=r;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;var i=this.findCurrentTierIndex(t);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=TierUtils.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};r.prototype.componentDidLoad=function(){var r=this;salla.event.on("cart::updated",(function(e){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.fetchTieredOfferData()];case 1:r=t.sent();if(r){this.updateOfferValues(e,r)}return[2]}}))}))}))};r.prototype.mapApiDataToTiers=function(r){var e=__spreadArray([],r.details.discounts,true).sort((function(r,e){return r.min_spend-e.min_spend}));var t=e.map((function(r,e){return{name:r.name,tier_name:r.name,discount:r.type===DiscountType.PERCENTAGE?"".concat(salla.helpers.number(r.value),"%"):salla.money(r.value),icon:TIERED_OFFER_CONFIG.staticIcons[e]||TIERED_OFFER_CONFIG.staticIcons[0],threshold:r.min_spend,text_color:TIERED_OFFER_CONFIG.staticColors[e],index:e+1}}));return{current_tier:TierUtils.getTierNameByIndex(t,this.findCurrentTierIndex(r.details.current_value,t)),tiers:t}};r.prototype.findCurrentTierIndex=function(r,e){var t;if(e===void 0){e=(t=this.tieredOfferData)===null||t===void 0?void 0:t.tiers}return TierUtils.findCurrentTierIndex(r,e||[])};r.prototype.updateOfferValues=function(r,e){var t,i;if(!e||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(e,r.coupon)){this.canRender=false;return}this.canRender=true;if(((t=e.details)===null||t===void 0?void 0:t.with_current_cart)===false){return}var n=((i=e.details)===null||i===void 0?void 0:i.current_value)||0;this.apiOfferData=e;var s=this.findCurrentTierIndex(n);if(s===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=s;this.currentTier=TierUtils.getTierNameByIndex(this.tieredOfferData.tiers,s);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};r.prototype.getLoadingSkeletonView=function(){return h(Host,null,h("div",{class:"s-tiered-offer-container"},h("div",{class:"s-tiered-offer-skeleton-wrapper"},h("div",{class:"s-tiered-offer-skeleton-title"},h("salla-skeleton",{height:"16px",width:"40%"})),h("div",{class:"s-tiered-offer-skeleton-subtitle"},h("salla-skeleton",{height:"20px",width:"60%"})),h("div",{class:"s-tiered-offer-skeleton-progress"},h("salla-skeleton",{height:"16px",width:"100%"})),h("div",{class:"s-tiered-offer-skeleton-tabs"},h("salla-skeleton",{height:"50px",width:"100%"})))))};r.prototype.getCurrentTierData=function(){return TierUtils.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};r.prototype.getProgressWidth=function(){var r;var e=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;var t=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(e);var n=i;return n/t*100};r.prototype.calculateMilestonePosition=function(r,e){if(e===1){return"calc(100% - 18px)"}var t=(r+1)/e*100;var i=8/e;return"".concat(Math.max(2,Math.min(95,t-i)),"%")};r.prototype.getMilestoneStyles=function(r,e,t){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(e,t);var o=r.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};r.prototype.getMilestoneIconStyles=function(r,e,t){if(e){return{color:r.text_color}}if(t){return{color:"var(--color-primary)"}}return{}};r.prototype.renderProgressBarBackground=function(r){return[h("div",{class:"s-tiered-offer-progress-bg"}),h("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(r,"%")}})]};r.prototype.renderMilestoneIcon=function(r,e,t){var i=["s-tiered-offer-milestone-icon",e?"s-tiered-offer-milestone-active":"",t?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return h("div",{class:i,style:this.getMilestoneIconStyles(r,e,t)},h("span",{innerHTML:r.icon}))};r.prototype.renderMilestoneName=function(r,e){return h("div",{class:"s-tiered-offer-milestone-name"},e&&h("span",{style:{color:r.text_color}},r.name))};r.prototype.renderMilestones=function(r,e){var t=this;var i=e===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return h("div",{class:"s-tiered-offer-milestones-wrapper"},h("div",{class:i},this.tieredOfferData.tiers.map((function(i,n){var s=r>=i.threshold;var o=i.tier_name===t.currentTier;return h("div",{class:"s-tiered-offer-milestone",style:t.getMilestoneStyles(i,n,e)},t.renderMilestoneIcon(i,o,s),t.renderMilestoneName(i,o))}))))};r.prototype.renderProgressBar=function(){var r;var e=this.getProgressWidth();var t=this.tieredOfferData.tiers.length;var i=((r=this.apiOfferData.details)===null||r===void 0?void 0:r.current_value)||0;return h("div",{class:"s-tiered-offer-progress-container"},h("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(i,t)))};r.prototype.renderTabs=function(){var r=this;return h("div",{class:"s-tiered-offer-tabs-container"},h("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(e){var t=e.tier_name===r.activeTabTier;return h("button",{class:"s-tiered-offer-tab-header ".concat(t?"s-tiered-offer-tab-active":""),onClick:function(){return r.handleTabClick(e.tier_name)}},h("span",null,e.name))}))),h("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var e=TierUtils.findTierByName(r.tieredOfferData.tiers,r.activeTabTier);if(!e)return null;return h("div",{class:"s-tiered-offer-tab-content"},h("div",{class:"s-tiered-offer-tab-content-inner"},h("div",{class:"s-tiered-offer-discount-section"},h("p",{class:"s-tiered-offer-discount-title"},r.discountText," ",h("span",{innerHTML:e.discount})),h("p",{class:"s-tiered-offer-benefit-description"},r.benefitText," ",e.name))))}()))};r.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var r=this.getCurrentTierData();return h(Host,null,h("div",{class:"s-tiered-offer-container"},h("div",{class:"s-tiered-offer-header"},h("div",{class:"s-tiered-offer-header-content"},h("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),h("div",{class:"s-tiered-offer-current-tier-name-wrapper"},h("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",h("span",{class:"s-tiered-offer-tier-name"},r.name)),h("span",{innerHTML:r.icon})))),this.renderProgressBar(),this.renderTabs()))};return r}();SallaTieredOffer.style=sallaTieredOfferCss;export{SallaTieredOffer as salla_tiered_offer};
5
5
  //# sourceMappingURL=salla-tiered-offer.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as registerInstance,h,g as getElement}from"./index-D4D34Ujk.js";var sallaTooltipCss='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}';var SallaTooltip=function(){function t(t){registerInstance(this,t);this.show=false;this.targetElement=null}t.prototype.handleMouseOver=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}};t.prototype.handleMouseOut=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}};t.prototype.componentDidLoad=function(){this.targetElement=document.getElementById(this.targetId)};t.prototype.render=function(){return h("div",{key:"87a485eeb144377502782b6a7ac61417349423e2",class:"s-tooltip-container"},h("slot",{key:"8329e929fce52cd2ef4f9258548770576e67ee96"}),this.show&&h("div",{key:"18f9cd55110713d0b472601dc0a9ef20dd31af19",class:"s-tooltip-item"},this.text))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaTooltip.style=sallaTooltipCss;export{SallaTooltip as salla_tooltip};
4
+ import{r as registerInstance,h,g as getElement}from"./index-Hw2jlaNN.js";var sallaTooltipCss='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}';var SallaTooltip=function(){function t(t){registerInstance(this,t);this.show=false;this.targetElement=null}t.prototype.handleMouseOver=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}};t.prototype.handleMouseOut=function(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}};t.prototype.componentDidLoad=function(){this.targetElement=document.getElementById(this.targetId)};t.prototype.render=function(){return h("div",{key:"e2454dd8d3533e19b93b796ca427d825c6576ff0",class:"s-tooltip-container"},h("slot",{key:"08ae103831491e760b47c848c161f909341c68ee"}),this.show&&h("div",{key:"bab2b3214ff45377b5d971f13f32c691ec090324",class:"s-tooltip-item"},this.text))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaTooltip.style=sallaTooltipCss;export{SallaTooltip as salla_tooltip};
5
5
  //# sourceMappingURL=salla-tooltip.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,i,n,e){function r(t){return t instanceof n?t:new n((function(i){i(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{a(e.next(t))}catch(t){s(t)}}function u(t){try{a(e["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):r(t.value).then(o,u)}a((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(e=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1];s=u;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(u);break}if(s[2])n.ops.pop();n.trys.pop();continue}u=i.call(t,n)}catch(t){u=[6,t];r=0}finally{e=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-D4D34Ujk.js";import{M as MailIcon}from"./mail-DmgxDvXL.js";var AndroidPhoneIcon='\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var sallaVerifyCss="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var SallaVerify=function(){function t(t){var i=this;registerInstance(this,t);this.verified=createEvent(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;i.translationLoaded=true;i.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+i.type);(t=i.modal)===null||t===void 0?void 0:t.setTitle(i.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var n;var e=Array.isArray(t)?t[0]:t;i.isProfileVerify=true;i.open(e);i.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(n=i.modal)===null||n===void 0?void 0:n.setTitle(i.title)}));salla.event.on("modalClosed",(function(){i.resendAfter=0;i.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?h(Host,null,this.myBody()):h("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},h("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?AndroidPhoneIcon:MailIcon}),this.myBody())};t.prototype.myBody=function(){var t=this;return h("div",{class:"s-verify-body",ref:function(i){return t.body=i}},h("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),h("slot",{name:"mobile"}),h("slot",{name:"email"}),h("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),h("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return h("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?h("span",{class:"s-verify-error-message"},this.errorMessage):"",h("div",{slot:"footer",class:"s-verify-footer"},h("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),h("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),h("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),h("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),h("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaVerify.style=sallaVerifyCss;export{SallaVerify as salla_verify};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-Hw2jlaNN.js";import{M as MailIcon}from"./mail-DmgxDvXL.js";var AndroidPhoneIcon='\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var sallaVerifyCss="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var SallaVerify=function(){function t(t){var i=this;registerInstance(this,t);this.verified=createEvent(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;i.translationLoaded=true;i.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+i.type);(t=i.modal)===null||t===void 0?void 0:t.setTitle(i.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var n;var e=Array.isArray(t)?t[0]:t;i.isProfileVerify=true;i.open(e);i.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(n=i.modal)===null||n===void 0?void 0:n.setTitle(i.title)}));salla.event.on("modalClosed",(function(){i.resendAfter=0;i.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?h(Host,null,this.myBody()):h("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},h("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?AndroidPhoneIcon:MailIcon}),this.myBody())};t.prototype.myBody=function(){var t=this;return h("div",{class:"s-verify-body",ref:function(i){return t.body=i}},h("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),h("slot",{name:"mobile"}),h("slot",{name:"email"}),h("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),h("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return h("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?h("span",{class:"s-verify-error-message"},this.errorMessage):"",h("div",{slot:"footer",class:"s-verify-footer"},h("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),h("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),h("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),h("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),h("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SallaVerify.style=sallaVerifyCss;export{SallaVerify as salla_verify};
5
5
  //# sourceMappingURL=salla-verify.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,a,l,e){function s(t){return t instanceof l?t:new l((function(a){a(t)}))}return new(l||(l=Promise))((function(l,n){function r(t){try{o(e.next(t))}catch(t){n(t)}}function i(t){try{o(e["throw"](t))}catch(t){n(t)}}function o(t){t.done?l(t.value):s(t.value).then(r,i)}o((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var l={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,s,n,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(t){return function(a){return o([t,a])}}function o(i){if(e)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(l=0)),l)try{if(e=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:l.label++;return{value:i[1],done:false};case 5:l.label++;s=i[1];i=[0];continue;case 7:i=l.ops.pop();l.trys.pop();continue;default:if(!(n=l.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){l=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){l.label=i[1];break}if(i[0]===6&&l.label<n[1]){l.label=n[1];n=i;break}if(n&&l.label<n[2]){l.label=n[2];l.ops.push(i);break}if(n[2])l.ops.pop();l.trys.pop();continue}i=a.call(t,l)}catch(t){i=[6,t];s=0}finally{e=n=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
- */import{r as registerInstance,h,H as Host}from"./index-D4D34Ujk.js";var sallaWalletCss=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var SallaWalletTable=function(){function t(t){var a=this;registerInstance(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){a.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return h(Host,null,h("table",{class:"s-wallet-table"},h("tbody",{class:"s-wallet-table-tbody"},h("tr",{class:"s-table__tr"},h("td",null,h("div",{class:"s-wallet-table-balance-container"},h("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),h("div",null,h("div",{innerHTML:salla.money(this.balance)}),h("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),h("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),h("table",{class:"s-wallet-table"},h("thead",{class:"s-wallet-table-head"},h("tr",{class:"s-wallet-table-head-tr"},h("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),h("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return h("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&h("span",{class:"hidden md:inline-block"},"#",t.id),h("div",{class:"flex items-center md:hidden"},h("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&h("span",null,"#",t.order_id))))),h("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),h("div",{innerHTML:salla.money(t.amount)}))),h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),h("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),h("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&h("span",null,"#",t.order_id)))),h("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),h("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("div",null,h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),h("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&h("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&h("salla-tooltip",{text:t.description,targetId:t.id.toString()}),h("span",null,t.title)))))})))),h("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&h("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return h(Host,null,h("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),h("div",{class:"s-wallet-table-empty-state"},h("i",{class:"sicon-full-wallet"}),h("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),h("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}();SallaWalletTable.style=sallaWalletCss;export{SallaWalletTable as salla_wallet};
4
+ */import{r as registerInstance,h,H as Host}from"./index-Hw2jlaNN.js";var sallaWalletCss=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var SallaWalletTable=function(){function t(t){var a=this;registerInstance(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){a.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return h(Host,null,h("table",{class:"s-wallet-table"},h("tbody",{class:"s-wallet-table-tbody"},h("tr",{class:"s-table__tr"},h("td",null,h("div",{class:"s-wallet-table-balance-container"},h("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),h("div",null,h("div",{innerHTML:salla.money(this.balance)}),h("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),h("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),h("table",{class:"s-wallet-table"},h("thead",{class:"s-wallet-table-head"},h("tr",{class:"s-wallet-table-head-tr"},h("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),h("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),h("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return h("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&h("span",{class:"hidden md:inline-block"},"#",t.id),h("div",{class:"flex items-center md:hidden"},h("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&h("span",null,"#",t.order_id))))),h("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),h("div",{innerHTML:salla.money(t.amount)}))),h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),h("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),h("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&h("span",null,"#",t.order_id)))),h("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},h("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},h("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),h("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),h("td",{class:"s-wallet-table-tbody-tr-td"},h("div",{class:"s-wallet-table-tbody-tr-td-content"},h("div",null,h("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),h("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&h("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&h("salla-tooltip",{text:t.description,targetId:t.id.toString()}),h("span",null,t.title)))))})))),h("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&h("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return h(Host,null,h("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),h("div",{class:"s-wallet-table-empty-state"},h("i",{class:"sicon-full-wallet"}),h("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),h("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}();SallaWalletTable.style=sallaWalletCss;export{SallaWalletTable as salla_wallet};
5
5
  //# sourceMappingURL=salla-wallet.entry.js.map