@salla.sa/twilight-components 2.14.449 → 2.14.451

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 (320) hide show
  1. package/dist/cjs/{filepond-f9KbKIYn.js → filepond-CFAfS398.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-BSdUMAjs.js → filepond-plugin-file-poster-CGV3AN8S.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-YLL5nfmo.js → filepond-plugin-file-validate-size-5lxojxa3.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DnRb2szA.js → filepond-plugin-file-validate-type-DU3FUIcL.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BDCQgpe-.js → filepond-plugin-image-edit-DYML2Igz.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CDJWoL6I.js → filepond-plugin-image-exif-orientation-PyHdAMQE.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-1OlWyiTm.js → filepond-plugin-image-preview-B723diKP.js} +1 -1
  8. package/dist/cjs/{functions-BZosuGw4.js → functions-CCmv-cGP.js} +1 -1
  9. package/dist/cjs/{index-Dj3X-WjA.js → index-CL8sn0_c.js} +1 -1
  10. package/dist/cjs/{index-C7gO-zm5.js → index-lbHgh2oF.js} +6 -6
  11. package/dist/cjs/index.esm-DOwgk2YK.js +2444 -0
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +21 -17
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +4611 -24
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  99. package/dist/cjs/{tracked-promise-CMALwoa6.js → tracked-promise-BEZGH5zy.js} +1 -1
  100. package/dist/cjs/twilight.cjs.js +2 -2
  101. package/dist/cjs/{vanilla-picker-BEliYBNM.js → vanilla-picker-DEoSMlkf.js} +1 -1
  102. package/dist/collection/assets/svg/location-tag.svg +10 -0
  103. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +20 -16
  104. package/dist/collection/components/salla-bullet-delivery/api-service.js +6 -0
  105. package/dist/collection/components/salla-bullet-delivery/helpers.js +3 -1
  106. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +128 -0
  107. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +195 -20
  108. package/dist/components/index.esm.js +2424 -0
  109. package/dist/components/index.js +2 -2
  110. package/dist/components/salla-bottom-alert.js +20 -16
  111. package/dist/components/salla-bullet-delivery.js +4644 -51
  112. package/dist/esm/{filepond-CDpPHT7z.js → filepond-CCUaTwJO.js} +1 -1
  113. package/dist/esm/{filepond-plugin-file-poster-BOtfCgt6.js → filepond-plugin-file-poster-C3FfmUV2.js} +1 -1
  114. package/dist/esm/{filepond-plugin-file-validate-size--uO_3T9g.js → filepond-plugin-file-validate-size-27nMbGKo.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-validate-type-DnJbL2zb.js → filepond-plugin-file-validate-type-RRO4qH5n.js} +1 -1
  116. package/dist/esm/{filepond-plugin-image-edit-CjUUwl1o.js → filepond-plugin-image-edit-wY6LYrlF.js} +1 -1
  117. package/dist/esm/{filepond-plugin-image-exif-orientation-DkjfYMVD.js → filepond-plugin-image-exif-orientation-OrAkjCVu.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-preview-3LlHu8_B.js → filepond-plugin-image-preview-COtDiNmq.js} +1 -1
  119. package/dist/esm/{functions-BQD6jHG4.js → functions-BBStjquJ.js} +1 -1
  120. package/dist/esm/{index-CFtXUFT2.js → index-BAOl7AJU.js} +6 -6
  121. package/dist/esm/{index-B5mrC7UX.js → index-BgFU58I4.js} +1 -1
  122. package/dist/esm/index.esm-BkPzCq-C.js +2424 -0
  123. package/dist/esm/loader.js +3 -3
  124. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  125. package/dist/esm/salla-accordion_6.entry.js +1 -1
  126. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  127. package/dist/esm/salla-advertisement.entry.js +1 -1
  128. package/dist/esm/salla-alert_2.entry.js +21 -17
  129. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  130. package/dist/esm/salla-apps-icons.entry.js +1 -1
  131. package/dist/esm/salla-badge.entry.js +1 -1
  132. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  133. package/dist/esm/salla-bullet-delivery_2.entry.js +4646 -59
  134. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  135. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  136. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  137. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  138. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  139. package/dist/esm/salla-contacts.entry.js +1 -1
  140. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  141. package/dist/esm/salla-count-down.entry.js +1 -1
  142. package/dist/esm/salla-custom-fields.entry.js +1 -1
  143. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  144. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  145. package/dist/esm/salla-filters-widget.entry.js +1 -1
  146. package/dist/esm/salla-filters.entry.js +1 -1
  147. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  148. package/dist/esm/salla-gifting.entry.js +1 -1
  149. package/dist/esm/salla-hook.entry.js +1 -1
  150. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  151. package/dist/esm/salla-installment.entry.js +1 -1
  152. package/dist/esm/salla-list-tile.entry.js +1 -1
  153. package/dist/esm/salla-localization-modal.entry.js +1 -1
  154. package/dist/esm/salla-login-modal.entry.js +1 -1
  155. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  156. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  157. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  158. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  159. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  161. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  162. package/dist/esm/salla-loyalty.entry.js +1 -1
  163. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  164. package/dist/esm/salla-map.entry.js +1 -1
  165. package/dist/esm/salla-menu.entry.js +1 -1
  166. package/dist/esm/salla-metadata.entry.js +1 -1
  167. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  168. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  169. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  170. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  171. package/dist/esm/salla-notification-item.entry.js +1 -1
  172. package/dist/esm/salla-notifications.entry.js +1 -1
  173. package/dist/esm/salla-offer-modal.entry.js +1 -1
  174. package/dist/esm/salla-offer.entry.js +1 -1
  175. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  176. package/dist/esm/salla-order-details-options.entry.js +1 -1
  177. package/dist/esm/salla-order-details.entry.js +1 -1
  178. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  179. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  180. package/dist/esm/salla-order-edit.entry.js +1 -1
  181. package/dist/esm/salla-order-summary.entry.js +1 -1
  182. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  183. package/dist/esm/salla-orders.entry.js +1 -1
  184. package/dist/esm/salla-payments.entry.js +1 -1
  185. package/dist/esm/salla-placeholder.entry.js +1 -1
  186. package/dist/esm/salla-price-range.entry.js +1 -1
  187. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  188. package/dist/esm/salla-product-card_2.entry.js +1 -1
  189. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  190. package/dist/esm/salla-products-list.entry.js +1 -1
  191. package/dist/esm/salla-progress-bar.entry.js +1 -1
  192. package/dist/esm/salla-quick-order.entry.js +1 -1
  193. package/dist/esm/salla-rating-modal.entry.js +1 -1
  194. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  195. package/dist/esm/salla-scopes.entry.js +1 -1
  196. package/dist/esm/salla-search.entry.js +1 -1
  197. package/dist/esm/salla-skeleton.entry.js +1 -1
  198. package/dist/esm/salla-slider.entry.js +1 -1
  199. package/dist/esm/salla-social-share.entry.js +1 -1
  200. package/dist/esm/salla-social.entry.js +1 -1
  201. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  202. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  203. package/dist/esm/salla-tooltip.entry.js +1 -1
  204. package/dist/esm/salla-trust-badges.entry.js +1 -1
  205. package/dist/esm/salla-user-menu.entry.js +1 -1
  206. package/dist/esm/salla-user-profile.entry.js +1 -1
  207. package/dist/esm/salla-user-settings.entry.js +1 -1
  208. package/dist/esm/salla-verify.entry.js +1 -1
  209. package/dist/esm/salla-wallet.entry.js +1 -1
  210. package/dist/esm/{tracked-promise-7zOvv3M6.js → tracked-promise-CPfI_VcX.js} +1 -1
  211. package/dist/esm/twilight.js +3 -3
  212. package/dist/esm/{vanilla-picker-yptjYbav.js → vanilla-picker-D6ctFQpu.js} +1 -1
  213. package/dist/twilight/{p-DZLwjHmr.js → p--sGcI7SX.js} +1 -1
  214. package/dist/twilight/{p-c6ed7a7f.entry.js → p-01359d46.entry.js} +1 -1
  215. package/dist/twilight/{p-a22f93c7.entry.js → p-02668306.entry.js} +1 -1
  216. package/dist/twilight/{p-a709602c.entry.js → p-02e4b3f7.entry.js} +1 -1
  217. package/dist/twilight/{p-187ddba3.entry.js → p-059a362b.entry.js} +1 -1
  218. package/dist/twilight/{p-564d8c45.entry.js → p-082ac280.entry.js} +1 -1
  219. package/dist/twilight/{p-effe5301.entry.js → p-091ef563.entry.js} +1 -1
  220. package/dist/twilight/p-0bb2ae4a.entry.js +4 -0
  221. package/dist/twilight/{p-a4de6d64.entry.js → p-0c2af75c.entry.js} +1 -1
  222. package/dist/twilight/{p-c24749d7.entry.js → p-1090cced.entry.js} +1 -1
  223. package/dist/twilight/{p-6ccdae0e.entry.js → p-14319930.entry.js} +1 -1
  224. package/dist/twilight/{p-f31595be.entry.js → p-1b028d1e.entry.js} +1 -1
  225. package/dist/twilight/{p-c987e5c4.entry.js → p-1c8f540e.entry.js} +1 -1
  226. package/dist/twilight/{p-52dada7c.entry.js → p-1f98bb26.entry.js} +1 -1
  227. package/dist/twilight/{p-210b5cd5.entry.js → p-20d5f87f.entry.js} +1 -1
  228. package/dist/twilight/{p-f92040a1.entry.js → p-224d3c26.entry.js} +1 -1
  229. package/dist/twilight/{p-8b578d2c.entry.js → p-26ef7b3c.entry.js} +1 -1
  230. package/dist/twilight/{p-7d3b048e.entry.js → p-2879b9ac.entry.js} +1 -1
  231. package/dist/twilight/{p-764f3053.entry.js → p-2b706f7e.entry.js} +1 -1
  232. package/dist/twilight/{p-26a0fdd4.entry.js → p-3400cfe4.entry.js} +1 -1
  233. package/dist/twilight/{p-fbdf7bc2.entry.js → p-34bea7ca.entry.js} +1 -1
  234. package/dist/twilight/{p-c2fa334e.entry.js → p-37ad673f.entry.js} +1 -1
  235. package/dist/twilight/{p-10f3641c.entry.js → p-3829e7fb.entry.js} +1 -1
  236. package/dist/twilight/{p-b5bf31c8.entry.js → p-436ff3dd.entry.js} +1 -1
  237. package/dist/twilight/{p-a5f6b737.entry.js → p-4b061d3d.entry.js} +1 -1
  238. package/dist/twilight/{p-536d29ce.entry.js → p-4c67cd2d.entry.js} +1 -1
  239. package/dist/twilight/{p-237ae017.entry.js → p-4f9a39de.entry.js} +1 -1
  240. package/dist/twilight/{p-5e30b0bd.entry.js → p-5165a1aa.entry.js} +1 -1
  241. package/dist/twilight/{p-54d8c2ca.entry.js → p-53c543c6.entry.js} +1 -1
  242. package/dist/twilight/{p-dad1b803.entry.js → p-56c33728.entry.js} +1 -1
  243. package/dist/twilight/{p-76bbabcb.entry.js → p-5851ae3f.entry.js} +1 -1
  244. package/dist/twilight/{p-b96744fc.entry.js → p-58d38f43.entry.js} +1 -1
  245. package/dist/twilight/{p-e89bfadd.entry.js → p-5cd566f6.entry.js} +1 -1
  246. package/dist/twilight/{p-b3123f77.entry.js → p-5ce3a659.entry.js} +1 -1
  247. package/dist/twilight/{p-a832d2f6.entry.js → p-6446fca2.entry.js} +1 -1
  248. package/dist/twilight/{p-97b47164.entry.js → p-66026d3b.entry.js} +1 -1
  249. package/dist/twilight/{p-58face3f.entry.js → p-66fc6ca0.entry.js} +1 -1
  250. package/dist/twilight/{p-cc06234d.entry.js → p-69824501.entry.js} +1 -1
  251. package/dist/twilight/{p-3c328960.entry.js → p-6bd2e89b.entry.js} +1 -1
  252. package/dist/twilight/{p-ca38de68.entry.js → p-6e60ba3f.entry.js} +1 -1
  253. package/dist/twilight/{p-b4108a9a.entry.js → p-72770a46.entry.js} +1 -1
  254. package/dist/twilight/{p-bcbb8488.entry.js → p-76dbef2b.entry.js} +1 -1
  255. package/dist/twilight/{p-d8cb14bd.entry.js → p-77020583.entry.js} +1 -1
  256. package/dist/twilight/{p-d8d6f688.entry.js → p-7a80b4d6.entry.js} +1 -1
  257. package/dist/twilight/{p-967fbc9c.entry.js → p-80ac1d80.entry.js} +1 -1
  258. package/dist/twilight/{p-2174a8e6.entry.js → p-87593f7e.entry.js} +1 -1
  259. package/dist/twilight/{p-0f7f0c9a.entry.js → p-8ab015d1.entry.js} +1 -1
  260. package/dist/twilight/{p-e1b2f1cd.entry.js → p-8bbe9a50.entry.js} +1 -1
  261. package/dist/twilight/{p-947aea47.entry.js → p-8bd255f1.entry.js} +1 -1
  262. package/dist/twilight/{p-fe8417b0.entry.js → p-8c06c63a.entry.js} +1 -1
  263. package/dist/twilight/{p-c4f9029a.entry.js → p-9b9851cc.entry.js} +1 -1
  264. package/dist/twilight/{p-b5184ea5.entry.js → p-9f09fd9c.entry.js} +1 -1
  265. package/dist/twilight/{p-99fa8ba6.entry.js → p-9f7d63e8.entry.js} +1 -1
  266. package/dist/twilight/{p-c0491160.entry.js → p-9fff0a8c.entry.js} +1 -1
  267. package/dist/twilight/{p-CFtXUFT2.js → p-BAOl7AJU.js} +1 -1
  268. package/dist/twilight/{p-4HuZkmYv.js → p-BjvOwYKG.js} +1 -1
  269. package/dist/twilight/p-BkPzCq-C.js +4 -0
  270. package/dist/twilight/{p-DRqWSUhZ.js → p-C2ha2a9w.js} +1 -1
  271. package/dist/twilight/{p-DVY4bWKx.js → p-COOk2-xF.js} +2 -2
  272. package/dist/twilight/{p-Cz2LJSD1.js → p-CiN9P6Vs.js} +1 -1
  273. package/dist/twilight/p-CjFUdilz.js +4 -0
  274. package/dist/twilight/{p-BmPGKoL7.js → p-DAZuaKqm.js} +1 -1
  275. package/dist/twilight/{p-CUBlD0Kt.js → p-DrBLhfjt.js} +1 -1
  276. package/dist/twilight/{p-59337a84.entry.js → p-a07f60cc.entry.js} +1 -1
  277. package/dist/twilight/{p-00c80ce0.entry.js → p-a16e2ac6.entry.js} +1 -1
  278. package/dist/twilight/{p-3a067383.entry.js → p-a2a8fe83.entry.js} +1 -1
  279. package/dist/twilight/{p-af8f9d9d.entry.js → p-a3868737.entry.js} +1 -1
  280. package/dist/twilight/{p-3c479c07.entry.js → p-a64f0aff.entry.js} +1 -1
  281. package/dist/twilight/p-a83d78fb.entry.js +1019 -0
  282. package/dist/twilight/{p-a19b9fcd.entry.js → p-ac57e992.entry.js} +1 -1
  283. package/dist/twilight/{p-d4db02e7.entry.js → p-ac9bf5bf.entry.js} +1 -1
  284. package/dist/twilight/{p-2bb0e5c5.entry.js → p-acf12c83.entry.js} +1 -1
  285. package/dist/twilight/{p-400ecb0a.entry.js → p-afd1364b.entry.js} +1 -1
  286. package/dist/twilight/{p-a2b9f075.entry.js → p-b0a99b96.entry.js} +1 -1
  287. package/dist/twilight/{p-31d281ab.entry.js → p-b2069f14.entry.js} +1 -1
  288. package/dist/twilight/{p-7fcbc3ef.entry.js → p-b42c7823.entry.js} +1 -1
  289. package/dist/twilight/{p-dfd0bf16.entry.js → p-b6661dd0.entry.js} +1 -1
  290. package/dist/twilight/{p-469c8350.entry.js → p-b929dda0.entry.js} +1 -1
  291. package/dist/twilight/{p-bf4257bb.entry.js → p-b9385507.entry.js} +1 -1
  292. package/dist/twilight/{p-bf76d88f.entry.js → p-bb4205bf.entry.js} +1 -1
  293. package/dist/twilight/{p-2b3e3ca7.entry.js → p-bec9d32a.entry.js} +1 -1
  294. package/dist/twilight/{p-03aed385.entry.js → p-c69e79ac.entry.js} +1 -1
  295. package/dist/twilight/{p-d69b9a02.entry.js → p-c82f5b3f.entry.js} +1 -1
  296. package/dist/twilight/{p-10adfec3.entry.js → p-caaff989.entry.js} +1 -1
  297. package/dist/twilight/{p-121ca1bf.entry.js → p-d18cb38a.entry.js} +1 -1
  298. package/dist/twilight/{p-61269cd6.entry.js → p-d1cabb89.entry.js} +1 -1
  299. package/dist/twilight/{p-c79ac487.entry.js → p-db744497.entry.js} +1 -1
  300. package/dist/twilight/{p-b04933fd.entry.js → p-e0bf3d3e.entry.js} +1 -1
  301. package/dist/twilight/{p-eabd1eef.entry.js → p-e632fbe1.entry.js} +1 -1
  302. package/dist/twilight/{p-3db06266.entry.js → p-e6f50fda.entry.js} +1 -1
  303. package/dist/twilight/{p-eb2e5d15.entry.js → p-e725ca51.entry.js} +1 -1
  304. package/dist/twilight/{p-fab8d485.entry.js → p-ea1f6f62.entry.js} +1 -1
  305. package/dist/twilight/{p-fc49d9c6.entry.js → p-eb9802ec.entry.js} +1 -1
  306. package/dist/twilight/{p-6ba1c14e.entry.js → p-eeb759a2.entry.js} +1 -1
  307. package/dist/twilight/{p-5e1b51dd.entry.js → p-f13ab7c3.entry.js} +1 -1
  308. package/dist/twilight/{p-918178f5.entry.js → p-f9a6bd74.entry.js} +1 -1
  309. package/dist/twilight/{p-B9HPqa9u.js → p-fngctMOB.js} +1 -1
  310. package/dist/twilight/{p-CxOW9p-m.js → p-nNw4abgW.js} +1 -1
  311. package/dist/twilight/{p-CsCwHOvQ.js → p-saXA_VGx.js} +2 -2
  312. package/dist/twilight/twilight.esm.js +1 -1
  313. package/dist/types/components/salla-bullet-delivery/api-service.d.ts +1 -0
  314. package/dist/types/components/salla-bullet-delivery/helpers.d.ts +3 -0
  315. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +3 -0
  316. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +23 -1
  317. package/package.json +8 -5
  318. package/dist/twilight/p-2a3b2509.entry.js +0 -4
  319. package/dist/twilight/p-Dw1i2i3R.js +0 -4
  320. package/dist/twilight/p-b57b8cae.entry.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as t,H as r}from"./p-CFtXUFT2.js";var s;!function(e){e.PERCENTAGE="percentage",e.FIXED="fixed"}(s||(s={}));const i={staticIcons:['<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>','<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>','<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>','<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>'],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class o{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){return this.findTierByIndex(e,t)?.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--)if(e>=t[r].threshold)return t[r].index;return 0}}const n=class{constructor(t){e(this,t),this.currentTierIndex=0,this.canRender=!1,this.isLoading=!1,this.handleTabClick=e=>{this.activeTabTier=e},salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title"),this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier"),this.discountText=salla.lang.get("blocks.tiered_offer.discount"),this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{if(await salla.onReady(),!this.checkFeatureEnabled())return;if(!this.checkCartExists())return;this.isLoading=!0;const e=await this.fetchTieredOfferData();if(!e)return;this.initializeComponent(e)}catch(e){this.canRender=!1,salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=!1}}checkFeatureEnabled(){return salla.config.get("store.features")?.includes("tiered-offer")}checkCartExists(){return!!salla.storage.get("cart")?.summary?.count}validateCouponCompatibility(e,t){return!(t&&!e.details?.applied_with_coupon)}shouldHideForGuest(){return salla.config.isGuest()}shouldHideUntilThreshold(e,t){return!(!e?.hide_until_threshold||0!==t)}resolveTierName(e,t){return o.getTierNameByIndex(e,t)||""}async fetchTieredOfferData(){try{const{data:e}=await salla.api.cart.offers(),t=e.find((e=>"tiered_offer"===e.type));return t?this.validateCouponCompatibility(t,salla.storage.get("cart")?.coupon)?t:(this.canRender=!1,null):null}catch(e){throw e}}initializeComponent(e){this.apiOfferData=e,this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData),this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const t=this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0);this.shouldHideForGuest()||this.shouldHideUntilThreshold(this.apiOfferData.details,t)?this.canRender=!1:(this.currentTierIndex=t,this.currentTier=this.resolveTierName(this.tieredOfferData.tiers,t),this.activeTabTier=this.currentTier||this.tieredOfferData.tiers[0]?.tier_name,this.canRender=!0)}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();t&&this.updateOfferValues(e,t)}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend)).map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:i.staticIcons[t]||i.staticIcons[0],threshold:e.min_spend,text_color:i.staticColors[t],index:t+1})));return{current_tier:o.getTierNameByIndex(t,this.findCurrentTierIndex(e.details.current_value,t)),tiers:t}}findCurrentTierIndex(e,t=this.tieredOfferData?.tiers){return o.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){if(!t||!this.tieredOfferData)return;if(!t.details?.discounts?.length)return void(this.canRender=!1);if(!this.validateCouponCompatibility(t,e.coupon))return void(this.canRender=!1);if(this.shouldHideForGuest())return void(this.canRender=!1);const r=this.mapApiDataToTiers(t),s=this.findCurrentTierIndex(t.details?.current_value||0,r.tiers);if(this.shouldHideUntilThreshold(t.details,s))return void(this.canRender=!1);if(!1===t.details?.with_current_cart)return void(this.canRender=!0);this.apiOfferData=t,this.tieredOfferData=r,this.canRender=!0,this.currentTierIndex=s,this.currentTier=this.resolveTierName(r.tiers,s);const i=this.currentTier||r.tiers[0]?.tier_name;this.activeTabTier!==i&&(this.activeTabTier=i)}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return o.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){const e=this.tieredOfferData.tiers.length;return this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0)/e*100}calculateMilestonePosition(e,t){return 1===t?"calc(100% - 18px)":`${Math.max(2,Math.min(95,(e+1)/t*100-8/t))}%`}getMilestoneStyles(e,t,r){const s="rtl"===document.documentElement.dir,i=this.calculateMilestonePosition(t,r),o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){return t?{color:e.text_color}:r?{color:"var(--color-primary)"}:{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:1===r?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones"},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold,n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){const e=this.getProgressWidth(),r=this.tieredOfferData.tiers.length,s=this.apiOfferData.details?.current_value||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(s,r)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>t("button",{class:"s-tiered-offer-tab-header "+(e.tier_name===this.activeTabTier?"s-tiered-offer-tab-active":""),onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=o.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);return e?t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name)))):null})()))}render(){if(this.isLoading)return this.getLoadingSkeletonView();if(!this.canRender||!this.tieredOfferData)return null;const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),this.currentTier&&t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};n.style=".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{transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{transform:scaleX(-1)}";export{n as salla_tiered_offer}
4
+ import{r as e,h as t,H as r}from"./p-BAOl7AJU.js";var s;!function(e){e.PERCENTAGE="percentage",e.FIXED="fixed"}(s||(s={}));const i={staticIcons:['<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>','<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>','<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>','<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>'],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class o{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){return this.findTierByIndex(e,t)?.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--)if(e>=t[r].threshold)return t[r].index;return 0}}const n=class{constructor(t){e(this,t),this.currentTierIndex=0,this.canRender=!1,this.isLoading=!1,this.handleTabClick=e=>{this.activeTabTier=e},salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title"),this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier"),this.discountText=salla.lang.get("blocks.tiered_offer.discount"),this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{if(await salla.onReady(),!this.checkFeatureEnabled())return;if(!this.checkCartExists())return;this.isLoading=!0;const e=await this.fetchTieredOfferData();if(!e)return;this.initializeComponent(e)}catch(e){this.canRender=!1,salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=!1}}checkFeatureEnabled(){return salla.config.get("store.features")?.includes("tiered-offer")}checkCartExists(){return!!salla.storage.get("cart")?.summary?.count}validateCouponCompatibility(e,t){return!(t&&!e.details?.applied_with_coupon)}shouldHideForGuest(){return salla.config.isGuest()}shouldHideUntilThreshold(e,t){return!(!e?.hide_until_threshold||0!==t)}resolveTierName(e,t){return o.getTierNameByIndex(e,t)||""}async fetchTieredOfferData(){try{const{data:e}=await salla.api.cart.offers(),t=e.find((e=>"tiered_offer"===e.type));return t?this.validateCouponCompatibility(t,salla.storage.get("cart")?.coupon)?t:(this.canRender=!1,null):null}catch(e){throw e}}initializeComponent(e){this.apiOfferData=e,this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData),this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const t=this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0);this.shouldHideForGuest()||this.shouldHideUntilThreshold(this.apiOfferData.details,t)?this.canRender=!1:(this.currentTierIndex=t,this.currentTier=this.resolveTierName(this.tieredOfferData.tiers,t),this.activeTabTier=this.currentTier||this.tieredOfferData.tiers[0]?.tier_name,this.canRender=!0)}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();t&&this.updateOfferValues(e,t)}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend)).map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:i.staticIcons[t]||i.staticIcons[0],threshold:e.min_spend,text_color:i.staticColors[t],index:t+1})));return{current_tier:o.getTierNameByIndex(t,this.findCurrentTierIndex(e.details.current_value,t)),tiers:t}}findCurrentTierIndex(e,t=this.tieredOfferData?.tiers){return o.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){if(!t||!this.tieredOfferData)return;if(!t.details?.discounts?.length)return void(this.canRender=!1);if(!this.validateCouponCompatibility(t,e.coupon))return void(this.canRender=!1);if(this.shouldHideForGuest())return void(this.canRender=!1);const r=this.mapApiDataToTiers(t),s=this.findCurrentTierIndex(t.details?.current_value||0,r.tiers);if(this.shouldHideUntilThreshold(t.details,s))return void(this.canRender=!1);if(!1===t.details?.with_current_cart)return void(this.canRender=!0);this.apiOfferData=t,this.tieredOfferData=r,this.canRender=!0,this.currentTierIndex=s,this.currentTier=this.resolveTierName(r.tiers,s);const i=this.currentTier||r.tiers[0]?.tier_name;this.activeTabTier!==i&&(this.activeTabTier=i)}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return o.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){const e=this.tieredOfferData.tiers.length;return this.findCurrentTierIndex(this.apiOfferData.details?.current_value||0)/e*100}calculateMilestonePosition(e,t){return 1===t?"calc(100% - 18px)":`${Math.max(2,Math.min(95,(e+1)/t*100-8/t))}%`}getMilestoneStyles(e,t,r){const s="rtl"===document.documentElement.dir,i=this.calculateMilestonePosition(t,r),o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){return t?{color:e.text_color}:r?{color:"var(--color-primary)"}:{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:1===r?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones"},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold,n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){const e=this.getProgressWidth(),r=this.tieredOfferData.tiers.length,s=this.apiOfferData.details?.current_value||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(s,r)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>t("button",{class:"s-tiered-offer-tab-header "+(e.tier_name===this.activeTabTier?"s-tiered-offer-tab-active":""),onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=o.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);return e?t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name)))):null})()))}render(){if(this.isLoading)return this.getLoadingSkeletonView();if(!this.canRender||!this.tieredOfferData)return null;const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),this.currentTier&&t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};n.style=".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{transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{transform:scaleX(-1)}";export{n as salla_tiered_offer}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as i}from"./p-CFtXUFT2.js";const r=class{constructor(t){s(this,t),this.placeholderImage=salla.url.cdn("images/s-empty.png")}getProductImage(){return this.productDetails?.image?"string"==typeof this.productDetails.image?this.productDetails.image:this.productDetails.image.url||this.placeholderImage||salla.url.cdn("images/s-empty.png"):this.placeholderImage}getProductImageAlt(){return this.productDetails?.image&&"string"!=typeof this.productDetails.image?this.productDetails.image.alt||this.productDetails?.name||"":this.productDetails?.name||""}getAccordionId(){return`accordion-${this.productDetails?.id||"default"}`}getAccordionKey(){return this.productDetails?.id||"default"}shouldBeCollapsible(){return void 0!==this.collapsible?this.collapsible:this.productDetails?.options?.length>0}renderOptions(){return this.productDetails?.options?.length?t("salla-accordion-body",null,t("div",{class:"s-order-details-options"},t("salla-order-details-options",{options:this.productDetails.options}))):null}render(){if(!this.productDetails)return null;const s=this.shouldBeCollapsible();return t(i,{class:"s-order-details-bundle-wrapper"},t("salla-accordion",{key:this.getAccordionKey(),collapsed:!1,bordered:!0,collapsible:s,id:this.getAccordionId(),size:"sm"},t("salla-accordion-head",null,t("div",{class:"s-order-details-product"},t("div",{class:"s-order-details-product-content"},t("div",{class:"s-order-details-product-info"},t("div",{class:"s-order-details-product-image"},t("img",{src:this.getProductImage(),alt:this.getProductImageAlt()})),t("div",{class:"s-order-details-product-details"},t("a",{href:this.productDetails?.url||"#",class:"s-order-details-product-name"},this.productDetails?.name||""),this.productDetails?.quantity&&t("span",{class:"s-order-details-product-quantity"},"×",this.productDetails.quantity)))))),this.renderOptions()))}};r.style="";export{r as salla_order_details_multiple_bundle_product}
4
+ import{r as s,h as t,H as i}from"./p-BAOl7AJU.js";const r=class{constructor(t){s(this,t),this.placeholderImage=salla.url.cdn("images/s-empty.png")}getProductImage(){return this.productDetails?.image?"string"==typeof this.productDetails.image?this.productDetails.image:this.productDetails.image.url||this.placeholderImage||salla.url.cdn("images/s-empty.png"):this.placeholderImage}getProductImageAlt(){return this.productDetails?.image&&"string"!=typeof this.productDetails.image?this.productDetails.image.alt||this.productDetails?.name||"":this.productDetails?.name||""}getAccordionId(){return`accordion-${this.productDetails?.id||"default"}`}getAccordionKey(){return this.productDetails?.id||"default"}shouldBeCollapsible(){return void 0!==this.collapsible?this.collapsible:this.productDetails?.options?.length>0}renderOptions(){return this.productDetails?.options?.length?t("salla-accordion-body",null,t("div",{class:"s-order-details-options"},t("salla-order-details-options",{options:this.productDetails.options}))):null}render(){if(!this.productDetails)return null;const s=this.shouldBeCollapsible();return t(i,{class:"s-order-details-bundle-wrapper"},t("salla-accordion",{key:this.getAccordionKey(),collapsed:!1,bordered:!0,collapsible:s,id:this.getAccordionId(),size:"sm"},t("salla-accordion-head",null,t("div",{class:"s-order-details-product"},t("div",{class:"s-order-details-product-content"},t("div",{class:"s-order-details-product-info"},t("div",{class:"s-order-details-product-image"},t("img",{src:this.getProductImage(),alt:this.getProductImageAlt()})),t("div",{class:"s-order-details-product-details"},t("a",{href:this.productDetails?.url||"#",class:"s-order-details-product-name"},this.productDetails?.name||""),this.productDetails?.quantity&&t("span",{class:"s-order-details-product-quantity"},"×",this.productDetails.quantity)))))),this.renderOptions()))}};r.style="";export{r as salla_order_details_multiple_bundle_product}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as s,H as a}from"./p-CFtXUFT2.js";const t=class{constructor(s){e(this,s),this.dark=!1,this.commercialRegisterLabel="",this.freelanceLabel=""}componentWillLoad(){this.initializeTranslations()}initializeTranslations(){salla.lang.onLoaded((()=>{const e=(e,s,a)=>{salla.helpers.setNested(salla.lang.messages[e],s,a)};e("ar.trans","blocks.footer.commercial_register","السجل التجاري"),e("en.trans","blocks.footer.commercial_register","Commercial Register"),e("ar.trans","blocks.footer.freelance","وثيقة العمل الحر"),e("en.trans","blocks.footer.freelance","Freelance Certificate"),this.commercialRegisterLabel=salla.lang.getWithDefault("blocks.footer.commercial_register","السجل التجاري"),this.freelanceLabel=salla.lang.getWithDefault("blocks.footer.freelance","وثيقة العمل الحر")}))}getBadgeData(){const e=salla.config.get("store.settings.commercial_number"),s=salla.config.get("store.settings.freelance_number");return e?{number:e,label:this.commercialRegisterLabel||"السجل التجاري",imageUrl:salla.url.cdn("images/commercial-register.png",70,70),type:"commercial"}:s?{number:s,label:this.freelanceLabel||"وثيقة العمل الحر",imageUrl:this.dark?salla.url.cdn("images/freelance-white.png"):salla.url.cdn("images/freelance.png"),type:"freelance"}:null}render(){const e=this.getBadgeData();return e?s(a,{class:"s-trust-badges-wrapper "+(this.dark?"dark":"")},s("img",{class:"s-trust-badges-image",width:"55",height:"55",src:e.imageUrl,alt:e.label}),s("div",{class:"s-trust-badges-content"},s("p",{class:"s-trust-badges-label"},e.label),s("b",{class:"s-trust-badges-number"},e.number))):null}};t.style="";export{t as salla_trust_badges}
4
+ import{r as e,h as s,H as a}from"./p-BAOl7AJU.js";const t=class{constructor(s){e(this,s),this.dark=!1,this.commercialRegisterLabel="",this.freelanceLabel=""}componentWillLoad(){this.initializeTranslations()}initializeTranslations(){salla.lang.onLoaded((()=>{const e=(e,s,a)=>{salla.helpers.setNested(salla.lang.messages[e],s,a)};e("ar.trans","blocks.footer.commercial_register","السجل التجاري"),e("en.trans","blocks.footer.commercial_register","Commercial Register"),e("ar.trans","blocks.footer.freelance","وثيقة العمل الحر"),e("en.trans","blocks.footer.freelance","Freelance Certificate"),this.commercialRegisterLabel=salla.lang.getWithDefault("blocks.footer.commercial_register","السجل التجاري"),this.freelanceLabel=salla.lang.getWithDefault("blocks.footer.freelance","وثيقة العمل الحر")}))}getBadgeData(){const e=salla.config.get("store.settings.commercial_number"),s=salla.config.get("store.settings.freelance_number");return e?{number:e,label:this.commercialRegisterLabel||"السجل التجاري",imageUrl:salla.url.cdn("images/commercial-register.png",70,70),type:"commercial"}:s?{number:s,label:this.freelanceLabel||"وثيقة العمل الحر",imageUrl:this.dark?salla.url.cdn("images/freelance-white.png"):salla.url.cdn("images/freelance.png"),type:"freelance"}:null}render(){const e=this.getBadgeData();return e?s(a,{class:"s-trust-badges-wrapper "+(this.dark?"dark":"")},s("img",{class:"s-trust-badges-image",width:"55",height:"55",src:e.imageUrl,alt:e.label}),s("div",{class:"s-trust-badges-content"},s("p",{class:"s-trust-badges-label"},e.label),s("b",{class:"s-trust-badges-number"},e.number))):null}};t.style="";export{t as salla_trust_badges}