@salla.sa/twilight-components 2.14.164 → 2.14.166
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.
- package/dist/cjs/{Helper-CNYy9P5b.js → Helper-u2kVaP5K.js} +15 -10
- package/dist/cjs/{Helper-CNYy9P5b.js.map → Helper-u2kVaP5K.js.map} +1 -1
- package/dist/cjs/{app-globals-B0FX8nrF.js → app-globals-BvFSBfoT.js} +3 -3
- package/dist/cjs/{app-globals-B0FX8nrF.js.map → app-globals-BvFSBfoT.js.map} +1 -1
- package/dist/cjs/{index-BQogR_9w.js → index-iU0iVUza.js} +4 -4
- package/dist/cjs/index-iU0iVUza.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button_49.cjs.entry.js +2 -2
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/collection/Helpers/Helper.js +13 -8
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/components/Helper.js +13 -8
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +15 -10
- package/dist/{esm-es5/Helper-BrCHOtZG.js.map → esm/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm/{app-globals-IYG3dX-R.js → app-globals-sE_ZSx6e.js} +3 -3
- package/dist/esm/{app-globals-IYG3dX-R.js.map → app-globals-sE_ZSx6e.js.map} +1 -1
- package/dist/esm/{index-BFfNxHPV.js → index-BJcojI6v.js} +4 -4
- package/dist/esm/index-BJcojI6v.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-add-product-button_49.entry.js +2 -2
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_2.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +2 -2
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-options.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm-es5/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +3 -3
- package/dist/{esm/Helper-BrCHOtZG.js.map → esm-es5/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm-es5/{app-globals-IYG3dX-R.js → app-globals-sE_ZSx6e.js} +2 -2
- package/dist/esm-es5/{app-globals-IYG3dX-R.js.map → app-globals-sE_ZSx6e.js.map} +1 -1
- package/dist/esm-es5/{index-BFfNxHPV.js → index-BJcojI6v.js} +3 -3
- package/dist/esm-es5/index-BJcojI6v.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button_49.entry.js +1 -1
- package/dist/esm-es5/salla-advertisement.entry.js +1 -1
- package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
- package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
- package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
- package/dist/esm-es5/salla-contacts.entry.js +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +2 -2
- package/dist/esm-es5/salla-filters.entry.js +1 -1
- package/dist/esm-es5/salla-installment.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm-es5/salla-metadata.entry.js +1 -1
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +2 -2
- package/dist/esm-es5/salla-orders.entry.js +2 -2
- package/dist/esm-es5/salla-payments.entry.js +1 -1
- package/dist/esm-es5/salla-price-range.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js +1 -1
- package/dist/esm-es5/salla-review-card.entry.js +1 -1
- package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-social.entry.js +1 -1
- package/dist/esm-es5/salla-tooltip.entry.js +1 -1
- package/dist/esm-es5/salla-verify.entry.js +1 -1
- package/dist/esm-es5/salla-wallet.entry.js +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-37904a9d.system.entry.js → p-041cfdc6.system.entry.js} +2 -2
- package/dist/twilight/{p-a57e5439.system.entry.js → p-04acb9d5.system.entry.js} +2 -2
- package/dist/twilight/{p-fde43494.system.entry.js → p-08c7235b.system.entry.js} +2 -2
- package/dist/twilight/{p-34e55241.system.entry.js → p-09d4e21c.system.entry.js} +2 -2
- package/dist/twilight/{p-C5EBG2Xg.system.js.map → p-0Xmugzgq.system.js.map} +1 -1
- package/dist/twilight/{p-d30e3efe.entry.js → p-0c7e997f.entry.js} +2 -2
- package/dist/twilight/{p-0df2ce1c.entry.js → p-1593ada3.entry.js} +2 -2
- package/dist/twilight/{p-fe73d1f4.entry.js → p-1b069f5c.entry.js} +2 -2
- package/dist/twilight/{p-2f7a8fd5.system.entry.js → p-1fcbf6bb.system.entry.js} +3 -3
- package/dist/twilight/{p-35130be1.entry.js → p-2139323e.entry.js} +2 -2
- package/dist/twilight/{p-489c4e43.system.entry.js → p-263f39a8.system.entry.js} +2 -2
- package/dist/twilight/{p-bef3244d.entry.js → p-26849df9.entry.js} +2 -2
- package/dist/twilight/{p-77aa48a9.entry.js → p-26a83313.entry.js} +2 -2
- package/dist/twilight/{p-70db2fda.system.entry.js → p-277a736d.system.entry.js} +2 -2
- package/dist/twilight/{p-2ce0a07a.entry.js → p-2984d7ee.entry.js} +2 -2
- package/dist/twilight/{p-f14d4763.entry.js → p-3f973235.entry.js} +2 -2
- package/dist/twilight/{p-28d837ee.entry.js → p-4163dbb9.entry.js} +2 -2
- package/dist/twilight/{p-0bfcfa47.system.entry.js → p-4526ac8e.system.entry.js} +2 -2
- package/dist/twilight/{p-9900d67e.entry.js → p-50baf30c.entry.js} +2 -2
- package/dist/twilight/{p-cf17e7f5.system.entry.js → p-5237da49.system.entry.js} +2 -2
- package/dist/twilight/{p-ea2a8ec3.system.entry.js → p-551f5ae2.system.entry.js} +2 -2
- package/dist/twilight/{p-325e8a3e.entry.js → p-55cef941.entry.js} +2 -2
- package/dist/twilight/{p-e0f20b16.system.entry.js → p-5c3c4081.system.entry.js} +2 -2
- package/dist/twilight/{p-87eef8f5.system.entry.js → p-689aca0e.system.entry.js} +2 -2
- package/dist/twilight/{p-b45186d2.entry.js → p-6984531d.entry.js} +8 -8
- package/dist/twilight/{p-f047dc2e.system.entry.js → p-6993e228.system.entry.js} +2 -2
- package/dist/twilight/{p-1fe13a36.system.entry.js → p-718df47e.system.entry.js} +6 -6
- package/dist/twilight/{p-e803e9c9.system.entry.js → p-7b1212df.system.entry.js} +2 -2
- package/dist/twilight/{p-0a352565.entry.js → p-8177ab73.entry.js} +2 -2
- package/dist/twilight/{p-d9e539ba.system.entry.js → p-8c1eca80.system.entry.js} +2 -2
- package/dist/twilight/{p-652c3a18.system.entry.js → p-8c5e2cf8.system.entry.js} +2 -2
- package/dist/twilight/{p-Cbt3VvMx.system.js.map → p-8ewm7cmP.system.js.map} +1 -1
- package/dist/twilight/{p-c8fa97ee.system.entry.js → p-905c335e.system.entry.js} +2 -2
- package/dist/twilight/{p-801b8cf5.entry.js → p-9ddaf4b2.entry.js} +2 -2
- package/dist/twilight/{p-2c742cef.system.entry.js → p-9f151920.system.entry.js} +2 -2
- package/dist/twilight/{p-60e44e99.system.entry.js → p-9f64a8a7.system.entry.js} +2 -2
- package/dist/twilight/{p-CorPzHaH.system.js → p-BDAthD3J.system.js} +3 -3
- package/dist/twilight/{p-CorPzHaH.system.js.map → p-BDAthD3J.system.js.map} +1 -1
- package/dist/twilight/{p-DHMPrdpB.system.js.map → p-BE4Tntj5.system.js.map} +1 -1
- package/dist/twilight/{p-CV1L1K1F.js → p-BEBnH0T8.js} +2 -2
- package/dist/twilight/{p-CV1L1K1F.js.map → p-BEBnH0T8.js.map} +1 -1
- package/dist/twilight/{p-BmBnW84t.system.js.map → p-BEz4dPyy.system.js.map} +1 -1
- package/dist/twilight/{p-BFfNxHPV.js → p-BJcojI6v.js} +3 -3
- package/dist/twilight/p-BJcojI6v.js.map +1 -0
- package/dist/twilight/{p-B8H8Zffc.system.js.map → p-BMEAfpcQ.system.js.map} +1 -1
- package/dist/twilight/{p-t7kMTbsj.system.js.map → p-BNfhCOep.system.js.map} +1 -1
- package/dist/twilight/{p-UtROhnoT.system.js.map → p-BPHisSBS.system.js.map} +1 -1
- package/dist/twilight/{p-BC573MOT.system.js.map → p-BRFHsZkg.system.js.map} +1 -1
- package/dist/twilight/{p-wVh4stgZ.system.js.map → p-BRNwBf6q.system.js.map} +1 -1
- package/dist/twilight/{p-Bx-N-s4Y.system.js.map → p-B_ARsANj.system.js.map} +1 -1
- package/dist/twilight/{p-D06Xx0Te.system.js.map → p-Be9PHZ6-.system.js.map} +1 -1
- package/dist/twilight/{p-Bco_IRd2.system.js.map → p-Bf0LxwB7.system.js.map} +1 -1
- package/dist/twilight/{p-Cb1UIzZb.system.js → p-BoU3rP9-.system.js} +3 -3
- package/dist/twilight/p-BoU3rP9-.system.js.map +1 -0
- package/dist/twilight/{p-8lfy7oMG.system.js.map → p-Bp3Jex-u.system.js.map} +1 -1
- package/dist/twilight/{p-B4QYa22q.system.js.map → p-BxiSZFuT.system.js.map} +1 -1
- package/dist/twilight/{p-LTc0kKzI.system.js.map → p-ByPmVcaW.system.js.map} +1 -1
- package/dist/twilight/{p-DW6tScyV.system.js.map → p-CQJr95JP.system.js.map} +1 -1
- package/dist/twilight/{p-nlqrWEsa.system.js.map → p-CUrjp7xM.system.js.map} +1 -1
- package/dist/twilight/{p-DGrVZP6D.system.js.map → p-Ck-MMoh4.system.js.map} +1 -1
- package/dist/twilight/{p-CerWahQp.system.js.map → p-Cv3L1tRD.system.js.map} +1 -1
- package/dist/twilight/{p-DQ6WGq9O.system.js.map → p-DMEPVSYJ.system.js.map} +1 -1
- package/dist/twilight/{p-D1_lKraG.js → p-DPqQW4oH.js} +2 -2
- package/dist/twilight/{p-D1_lKraG.js.map → p-DPqQW4oH.js.map} +1 -1
- package/dist/twilight/{p-Dz_hUkbF.system.js → p-D_NAqNa-.system.js} +2 -2
- package/dist/twilight/{p-Dz_hUkbF.system.js.map → p-D_NAqNa-.system.js.map} +1 -1
- package/dist/twilight/{p-DyiYfLs6.system.js.map → p-DdgccFjk.system.js.map} +1 -1
- package/dist/twilight/{p-DD-NUH5O.system.js.map → p-DiIWpMR9.system.js.map} +1 -1
- package/dist/twilight/{p-C6uUYgzy.system.js.map → p-NnKijTrt.system.js.map} +1 -1
- package/dist/twilight/{p-DeLChKCk.system.js.map → p-X_JjG62r.system.js.map} +1 -1
- package/dist/twilight/{p-fIRBYbgk.system.js → p-_Df6_reQ.system.js} +2 -2
- package/dist/twilight/{p-fIRBYbgk.system.js.map → p-_Df6_reQ.system.js.map} +1 -1
- package/dist/twilight/{p-66f5c6cb.entry.js → p-a8128d9a.entry.js} +2 -2
- package/dist/twilight/{p-679bcc4c.entry.js → p-b3df8eba.entry.js} +2 -2
- package/dist/twilight/{p-bced4dd5.system.entry.js → p-b66ce34c.system.entry.js} +2 -2
- package/dist/twilight/{p-18cad003.system.entry.js → p-b93f8a7b.system.entry.js} +2 -2
- package/dist/twilight/{p-15ac73d8.entry.js → p-bd675f34.entry.js} +2 -2
- package/dist/twilight/{p-8128a6af.system.entry.js → p-c5f58299.system.entry.js} +2 -2
- package/dist/twilight/{p-3fc226d0.entry.js → p-c76c05ff.entry.js} +2 -2
- package/dist/twilight/{p-94338a6a.entry.js → p-ca989cdf.entry.js} +2 -2
- package/dist/twilight/{p-283e5d2a.system.entry.js → p-cac0a37c.system.entry.js} +2 -2
- package/dist/twilight/{p-6f789c6a.system.entry.js → p-cc93cc27.system.entry.js} +2 -2
- package/dist/twilight/{p-f2fb025f.system.entry.js → p-cdfb75e6.system.entry.js} +2 -2
- package/dist/twilight/{p-a6ab5583.entry.js → p-dae66c49.entry.js} +2 -2
- package/dist/twilight/{p-07be7362.entry.js → p-e75ddf6b.entry.js} +2 -2
- package/dist/twilight/{p-feb47683.system.entry.js → p-ea45208a.system.entry.js} +2 -2
- package/dist/twilight/{p-acd4ad3d.entry.js → p-eb859ac0.entry.js} +2 -2
- package/dist/twilight/{p-112a3593.entry.js → p-eb86070c.entry.js} +2 -2
- package/dist/twilight/{p-a4335e96.entry.js → p-efb54461.entry.js} +2 -2
- package/dist/twilight/{p-594e29ef.system.entry.js → p-f1493561.system.entry.js} +2 -2
- package/dist/twilight/{p-03eeed12.entry.js → p-f192ed81.entry.js} +2 -2
- package/dist/twilight/{p-780e11a1.entry.js → p-f5534187.entry.js} +2 -2
- package/dist/twilight/{p-73c55156.entry.js → p-fa752787.entry.js} +2 -2
- package/dist/twilight/{p-f1f76cad.entry.js → p-fc5309ad.entry.js} +2 -2
- package/dist/twilight/{p-CCj5pPN3.system.js.map → p-lA-1m-p5.system.js.map} +1 -1
- package/dist/twilight/{p-CJdQn5Cx.system.js.map → p-oYwTKzyC.system.js.map} +1 -1
- package/dist/twilight/{p-BEq2XgoL.system.js.map → p-pX5I3INC.system.js.map} +1 -1
- package/dist/twilight/{p-CSzSey6x.system.js.map → p-qgRft6ys.system.js.map} +1 -1
- package/dist/twilight/{p-B8TjwvAx.system.js.map → p-vJ_LeDO0.system.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +6 -4
- package/package.json +5 -5
- package/dist/cjs/index-BQogR_9w.js.map +0 -1
- package/dist/esm/index-BFfNxHPV.js.map +0 -1
- package/dist/esm-es5/index-BFfNxHPV.js.map +0 -1
- package/dist/twilight/p-BFfNxHPV.js.map +0 -1
- package/dist/twilight/p-Cb1UIzZb.system.js.map +0 -1
- /package/dist/twilight/{p-37904a9d.system.entry.js.map → p-041cfdc6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a57e5439.system.entry.js.map → p-04acb9d5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fde43494.system.entry.js.map → p-08c7235b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-34e55241.system.entry.js.map → p-09d4e21c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d30e3efe.entry.js.map → p-0c7e997f.entry.js.map} +0 -0
- /package/dist/twilight/{p-0df2ce1c.entry.js.map → p-1593ada3.entry.js.map} +0 -0
- /package/dist/twilight/{p-fe73d1f4.entry.js.map → p-1b069f5c.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f7a8fd5.system.entry.js.map → p-1fcbf6bb.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-35130be1.entry.js.map → p-2139323e.entry.js.map} +0 -0
- /package/dist/twilight/{p-489c4e43.system.entry.js.map → p-263f39a8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bef3244d.entry.js.map → p-26849df9.entry.js.map} +0 -0
- /package/dist/twilight/{p-77aa48a9.entry.js.map → p-26a83313.entry.js.map} +0 -0
- /package/dist/twilight/{p-70db2fda.system.entry.js.map → p-277a736d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2ce0a07a.entry.js.map → p-2984d7ee.entry.js.map} +0 -0
- /package/dist/twilight/{p-f14d4763.entry.js.map → p-3f973235.entry.js.map} +0 -0
- /package/dist/twilight/{p-28d837ee.entry.js.map → p-4163dbb9.entry.js.map} +0 -0
- /package/dist/twilight/{p-0bfcfa47.system.entry.js.map → p-4526ac8e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9900d67e.entry.js.map → p-50baf30c.entry.js.map} +0 -0
- /package/dist/twilight/{p-cf17e7f5.system.entry.js.map → p-5237da49.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ea2a8ec3.system.entry.js.map → p-551f5ae2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-325e8a3e.entry.js.map → p-55cef941.entry.js.map} +0 -0
- /package/dist/twilight/{p-e0f20b16.system.entry.js.map → p-5c3c4081.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-87eef8f5.system.entry.js.map → p-689aca0e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b45186d2.entry.js.map → p-6984531d.entry.js.map} +0 -0
- /package/dist/twilight/{p-f047dc2e.system.entry.js.map → p-6993e228.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1fe13a36.system.entry.js.map → p-718df47e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e803e9c9.system.entry.js.map → p-7b1212df.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0a352565.entry.js.map → p-8177ab73.entry.js.map} +0 -0
- /package/dist/twilight/{p-d9e539ba.system.entry.js.map → p-8c1eca80.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-652c3a18.system.entry.js.map → p-8c5e2cf8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c8fa97ee.system.entry.js.map → p-905c335e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-801b8cf5.entry.js.map → p-9ddaf4b2.entry.js.map} +0 -0
- /package/dist/twilight/{p-2c742cef.system.entry.js.map → p-9f151920.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-60e44e99.system.entry.js.map → p-9f64a8a7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-66f5c6cb.entry.js.map → p-a8128d9a.entry.js.map} +0 -0
- /package/dist/twilight/{p-679bcc4c.entry.js.map → p-b3df8eba.entry.js.map} +0 -0
- /package/dist/twilight/{p-bced4dd5.system.entry.js.map → p-b66ce34c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-18cad003.system.entry.js.map → p-b93f8a7b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-15ac73d8.entry.js.map → p-bd675f34.entry.js.map} +0 -0
- /package/dist/twilight/{p-8128a6af.system.entry.js.map → p-c5f58299.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3fc226d0.entry.js.map → p-c76c05ff.entry.js.map} +0 -0
- /package/dist/twilight/{p-94338a6a.entry.js.map → p-ca989cdf.entry.js.map} +0 -0
- /package/dist/twilight/{p-283e5d2a.system.entry.js.map → p-cac0a37c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6f789c6a.system.entry.js.map → p-cc93cc27.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f2fb025f.system.entry.js.map → p-cdfb75e6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a6ab5583.entry.js.map → p-dae66c49.entry.js.map} +0 -0
- /package/dist/twilight/{p-07be7362.entry.js.map → p-e75ddf6b.entry.js.map} +0 -0
- /package/dist/twilight/{p-feb47683.system.entry.js.map → p-ea45208a.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-acd4ad3d.entry.js.map → p-eb859ac0.entry.js.map} +0 -0
- /package/dist/twilight/{p-112a3593.entry.js.map → p-eb86070c.entry.js.map} +0 -0
- /package/dist/twilight/{p-a4335e96.entry.js.map → p-efb54461.entry.js.map} +0 -0
- /package/dist/twilight/{p-594e29ef.system.entry.js.map → p-f1493561.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-03eeed12.entry.js.map → p-f192ed81.entry.js.map} +0 -0
- /package/dist/twilight/{p-780e11a1.entry.js.map → p-f5534187.entry.js.map} +0 -0
- /package/dist/twilight/{p-73c55156.entry.js.map → p-fa752787.entry.js.map} +0 -0
- /package/dist/twilight/{p-f1f76cad.entry.js.map → p-fc5309ad.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as s,H as c,g as a}from"./p-BJcojI6v.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\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>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\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>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var c;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((c=this.host.querySelector('[slot="contact"]'))===null||c===void 0?void 0:c.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(c,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,c)=>s("a",{href:this.getContactLink(t.type),key:c,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(c,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,c)=>s("div",{key:c,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return a(this)}};r.style=h;export{r as salla_contacts};
|
|
5
|
+
//# sourceMappingURL=p-4163dbb9.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-BoU3rP9-.system.js"],(function(t){"use strict";var i,e,n;return{setters:[function(t){i=t.r;e=t.h;n=t.g}],execute:function(){var o='.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 a=t("salla_tooltip",function(){function t(t){i(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 e("div",{key:"513c1dd26a1ab6f1b14a29ff7e28a4ef265962ef",class:"s-tooltip-container"},e("slot",{key:"41677a82817cb4166aaf722340dab19890874217"}),this.show&&e("div",{key:"e1a7dfc3395817309c2fa25bbdb1293870fdf33d",class:"s-tooltip-item"},this.text))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
|
|
5
|
+
//# sourceMappingURL=p-4526ac8e.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as i,H as e}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as i,H as e}from"./p-BJcojI6v.js";var o;(function(t){t["PERCENTAGE"]="percentage";t["FIXED"]="fixed";t["FREE_PRODUCT"]="free_product"})(o||(o={}));var s;(function(t){t["PRODUCT_COUNT"]="products_count";t["PRODUCT_PURCHASE"]="order_amount"})(s||(s={}));const n=":host{display:block}";const a=class{constructor(i){t(this,i);this.offer=null;this.products={};this.isLoading=true;this.canRender=true}componentWillLoad(){salla.onReady().then((()=>{var t,i,e;if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((e=(i=salla.storage.get("cart"))===null||i===void 0?void 0:i.summary)===null||e===void 0?void 0:e.count)){throw new Error("feature or cart object does not existed")}})).then((()=>salla.api.cart.offers())).then((({data:t})=>{this.offer=t.find((t=>t.type==="conditional"));if(!this.offer){throw new Error("No conditional offer has been activated in the merchant dashboard")}this.offer.details.discounts.unshift({value:0,min_spend:0});return this.updateInitialOfferValue()})).then((()=>this.getProducts())).then((()=>salla.event.on("cart::updated",(t=>this.updateOfferValues(t))))).catch((t=>{this.canRender=false;salla.logger.warn("salla-conditional-offer:: ",t)})).finally((()=>{this.isLoading=false}))}getProducts(){const t=this.offer.details.discounts.filter((({type:t})=>t===o.FREE_PRODUCT)).map((({value:t})=>t));if(t.length>0){return salla.product.fetch({source:"selected",source_value:t}).then((({data:t})=>{t.forEach((({id:t,url:i,image:e})=>{this.products[t]={url:i,image:e}}))}))}}updateInitialOfferValue(){return salla.api.cart.details().then((({data:{cart:t}})=>this.updateOfferValues(t)))}updateOfferValues({items:t,total:i}){var e;const o=this.offer.details.based_on===s.PRODUCT_COUNT?t.reduce(((t,{quantity:i})=>t+i),0):i;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(e=this.offer)===null||e===void 0?void 0:e.details),{current_value:o})});return this.offer}getCheckpointContent(t){var e,s;if(t.type===o.PERCENTAGE)return`${t.value}%`;if(t.type===o.FIXED)return salla.money(t.value);if(t.type!==o.FREE_PRODUCT){salla.logger.error(`salla-conditional-offer:: unexpected type (${t.type})!`);return""}const n=this.products[t.value];if(!n){salla.logger.error(`salla-conditional-offer:: there is no product with id (${t.value})!`);return""}return i("a",{class:"s-conditional-offer-product-link",href:n.url},i("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((e=n===null||n===void 0?void 0:n.image)===null||e===void 0?void 0:e.alt)||"",src:(s=n===null||n===void 0?void 0:n.image)===null||s===void 0?void 0:s.url}))}getOfferType(t){var i;const e=(i=this.offer.details)===null||i===void 0?void 0:i.based_on;if(e===s.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",t.min_spend);if(e===s.PRODUCT_PURCHASE)return salla.money(t.min_spend);salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${e}`);return`${t.min_spend}`}clamp(t,i,e){return Math.max(i,Math.min(t,e))}mapValueRanges(t,i,e,o,s){const n=(t-i)*(s-o)/(e-i)+o;if(n===Number.POSITIVE_INFINITY)return 100;if(n===Number.NEGATIVE_INFINITY)return 0;return this.clamp(n,0,100)}getCheckPointView(t,e){var o,s;const n=this.offer.details.discounts.findIndex((({min_spend:i})=>i===t.min_spend));const a=(s=(o=this.offer.details.discounts[n-1])===null||o===void 0?void 0:o.min_spend)!==null&&s!==void 0?s:0;const l=this.mapValueRanges(this.offer.details.current_value,a,t.min_spend,0,100);const r=t.min_spend<=this.offer.details.current_value;return i("div",{class:"s-conditional-offer-checkpoint-container"},e>0?[i("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},i("div",{class:"s-conditional-offer-progress-line-inactive"}),i("div",{class:"s-conditional-offer-progress-line-active",style:{width:`${l}%`}})),i("div",{key:"checkpoint",class:`s-conditional-offer-checkpoint ${r?"s-conditional-offer-active-checkpoint":""}`},i("div",{class:`s-conditional-offer-item-avatar-content ${r?"active":""}`,innerHTML:this.products&&this.getCheckpointContent(t)}),i("div",{class:`s-conditional-offer-checkpoint-label ${r?"active":""}`,innerHTML:this.getOfferType(t)}))]:i("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":e===0,active:r},innerHTML:this.getOfferType(t)}))}getLoadingSkeletonView(){return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-skeleton-inner-container"},i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"30%"})),i("div",{class:"s-conditional-offer-skeleton-subtitle"},i("salla-skeleton",{height:"16px",width:"35%"})),i("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((()=>[i("salla-skeleton",{key:"checkpoint-line",height:"8px"}),i("div",{key:"checkpoint"},i("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))])))))}render(){if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();return i(e,{class:"s-conditional-offer-container"},i("div",{class:"s-conditional-offer-title-wrapper"},i("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?i("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",i("i",{class:"sicon-information"})):null),i("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map(((t,e)=>i("div",{class:{"flex-1":e>0},key:t.min_spend},this.getCheckPointView(t,e))))))}};a.style=n;export{a as salla_conditional_offer};
|
|
5
|
+
//# sourceMappingURL=p-50baf30c.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,r,n,i){function e(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):e(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,e,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(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(n=0)),n)try{if(i=1,e&&(a=o[0]&2?e["return"]:o[0]?e["throw"]||((a=e["return"])&&a.call(e),0):e.next)&&!(a=a.call(e,o[1])).done)return a;if(e=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;e=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=r.call(t,n)}catch(t){o=[6,t];e=0}finally{i=a=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
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-BoU3rP9-.system.js","./p-Bnro4LR3.system.js","./p-BDAthD3J.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,n,i,e,a,s,o;return{setters:[function(t){r=t.r;n=t.c;i=t.h;e=t.H;a=t.g},function(t){s=t.F},function(t){o=t.H},null],execute:function(){var u=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";var f=t("salla_filters",function(){function t(t){var i=this;r(this,t);this.changed=n(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(function(){return i.host.style.display="none"}));salla.lang.onLoaded((function(){i.apply=salla.lang.get("pages.checkout.apply");i.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(function(t){var r=t.filters;i.host.style.display="";var n={};i.filters=r.map((function(t){t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=s.VALUES;var r=t.values,e=r.max,a=r.min;t.values=[5,4,3,2,1].filter((function(t){return t>=a||t<=e}))}if(i.filtersData.variants&&t.type==s.VARIANTS){n.variants=i.filtersData.variants}if(i.filtersData[t.key]&&t.type!==s.VARIANTS){n[t.key]=i.filtersData[t.key]}var o=new URLSearchParams(window.location.search);var u=false;for(var f=0,c=o.keys();f<c.length;f++){var l=c[f];if(l.includes("filters")){u=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(n).length==0&&!u){var h=window.location.href;var d=salla.config.get("page.id");var v=h.indexOf("?")!==-1?"&":"?";var w=h+v+"filters[category_id]="+d;n.category_id=d;window.history.pushState({path:w},"",w)}return t}));i.filtersData=n;i.host.childNodes.forEach((function(t){return __awaiter(i,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:r=t.setWidgetHeight;if(!r)return[3,2];return[4,t.setWidgetHeight()];case 1:r=n.sent();n.label=2;case 2:return[2,r]}}))}))}))}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);t=new URLSearchParams(window.location.search);r=this;return[4,o.extractFiltersFromUrl(t)];case 1:r.filtersData=i.sent();return[3,3];case 2:n=i.sent();console.warn("failed to get filters from URL",n.message);return[3,3];case 3:return[2]}}))}))};t.prototype.getFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.filtersData]}))}))};t.prototype.applyFilters=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(n){if(!this.isReady){return[2]}t=Object.keys(this.filtersData).length>0;setTimeout((function(){var n;if(t){var i=new URL(window.location.href);for(var e=0,a=i.searchParams.entries();e<a.length;e++){var s=a[e][0];if(s.startsWith("filters")){i.searchParams.delete(s)}}var o=r.encodeFilters(r.filtersData);var u=i.search.split("&").filter((function(t){return!t.includes("filters")})).join("&");if(u){i.search=i.search.split("&filters")[0]+"&"+o}else{i.search="?".concat(o)}window.history.pushState({},"",i.href)}else{var i=new URL(window.location.href);(n=i.searchParams)===null||n===void 0?void 0:n.delete("filters");window.history.pushState({},"",i.toString())}salla.event.emit("salla-filters::changed",r.filtersData);r.changed.emit(r.filtersData)}),300);return[2]}))}))};t.prototype.encodeFilters=function(t,r){if(r===void 0){r="filters"}var n=[];for(var i in t){if(Object.prototype.hasOwnProperty.call(t,i)){var e=t[i];var a=r?"".concat(r,"[").concat(i,"]"):i;if(Array.isArray(e)){for(var s=0;s<e.length;s++){n.push("".concat(a,"[").concat(s,"]=").concat(e[s]))}}else if(typeof e==="object"&&e!==null){n.push(this.encodeFilters(e,a))}else{var o="".concat(a,"=").concat(e);n.push(o)}}}return n.join("&")};t.prototype.resetFilters=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((function(t){return t.reset&&t.reset()}));salla.event.emit("salla-filters::reset");return[2,this.applyFilters()]}))}))};t.prototype.removeFiltersQueryParams=function(){var t=new URLSearchParams(window.location.search);var r=Array.from(t.keys()).filter((function(t){return!t.startsWith("filters[")})).map((function(r){return"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(t.get(r)))})).join("&");var n=r?"".concat(window.location.pathname,"?").concat(r):window.location.pathname;window.history.pushState({},"",n)};t.prototype.handleOptionChange=function(t,r,n){if(r.type===s.RANGE){this.filtersData[r.key]=n}var i=t.target.checked;if(r.type===s.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[r.key]=n);i||delete this.filtersData.variants[r.key]}else if(t.target.type=="radio"){i&&(this.filtersData[r.key]=n);i||delete this.filtersData[r.key]}else if(t.target.type=="checkbox"){this.filtersData[r.key]=this.filtersData[r.key]||[];if(i){this.filtersData[r.key].push(n)}this.filtersData[r.key]=this.filtersData[r.key].filter((function(t){return t!=n}))}this.applyFilters()};t.prototype.render=function(){var t=this;var r,n;return i(e,{key:"80fda46c33daf06c6a22d567d13375351db4e3cb"},(r=this.filters)===null||r===void 0?void 0:r.map((function(r){return i("salla-filters-widget",{option:r,filtersData:t.filtersData,onChanged:function(r){var n=r.detail,i=n.event,e=n.option,a=n.value;t.handleOptionChange(i,e,a)}})})),((n=this.filters)===null||n===void 0?void 0:n.length)?i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:function(){return t.resetFilters()}},this.reset)):"")};t.prototype.componentDidLoad=function(){this.isReady=true};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=u}}}));
|
|
5
|
+
//# sourceMappingURL=p-5237da49.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-BoU3rP9-.system.js"],(function(e){"use strict";var i,t;return{setters:[function(e){i=e.r;t=e.h}],execute:function(){var c="";var n=e("salla_notification_item",function(){function e(e){i(this,e)}e.prototype.render=function(){return t("a",{key:"1b234e649b23636170f30dfc46884e047d0f02ce",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},t("span",{key:"948c47868767a413bc488287af46caac7aa35c1e",class:"s-notifications-item-icon"},t("i",{key:"2ac3ada00bd7d7f3a6d5ba85341628ac382acef5",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),t("div",{key:"a19c06341302bc389a2f5829c06367c03372fbfb",class:"s-notifications-item-content"},t("div",{key:"77ed75864e91b39095ee2505e10f432fbc896ec5",class:"s-notifications-item-content-leading"},t("h4",{key:"cee7566266dff68eeb2d8635e1eeaf2745b1930f"},this.notification.title),t("p",{key:"459ffde17436ff4311c64ee7f53966283390c410"},this.notification.sub_title)),t("span",{key:"b681d2c40f719e7d6d1e5abda8993b1bb870cbb6",class:"s-notifications-item-content-trailing"},t("i",{key:"2cd02287aaeeeaa00f972f4e0448f66e96949525",class:"sicon-time s-notifications-item-content-trailing-icon"}),t("span",{key:"4fd57d3f80816b0e607d5e6900d7975f94cf0892"},this.notification.date))))};return e}());n.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-551f5ae2.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as s,h as t}from"./p-BJcojI6v.js";import{S as i,A as c}from"./p-yRO-ZESF.js";var e=`\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>gift</title>\n<path d="M30.667 8h-1.36c0.007-0.115 0.027-0.225 0.027-0.34 0-3.489-2.617-6.327-5.833-6.327-3.48 0-6.080 3.071-7.5 5.271-1.42-2.2-4.020-5.271-7.5-5.271-3.216 0-5.833 2.837-5.833 6.327 0 0.115 0.020 0.225 0.027 0.34h-1.36c-0.737 0-1.333 0.597-1.333 1.333v6.667c0 0.736 0.596 1.333 1.333 1.333v9.333c0 2.205 1.795 4 4 4h21.333c2.205 0 4-1.795 4-4v-9.333c0.737 0 1.333-0.597 1.333-1.333v-6.667c0-0.736-0.596-1.333-1.333-1.333zM23.5 4c1.747 0 3.167 1.641 3.167 3.66 0 0.115-0.017 0.227-0.025 0.34h-8.38c1.188-1.833 3.104-4 5.239-4zM8.5 4c2.124 0 4.041 2.167 5.236 4h-8.377c-0.008-0.113-0.025-0.225-0.025-0.34 0-2.019 1.42-3.66 3.167-3.66zM14.667 28h-9.333c-0.736 0-1.333-0.599-1.333-1.333v-9.333h10.667zM28 26.667c0 0.735-0.597 1.333-1.333 1.333h-9.333v-10.667h10.667zM29.333 14.667h-26.667v-4h1.592s0.003 0 0.004 0h23.477s0.003 0 0.004 0h1.589z"></path>\n</svg>\n`;var a=`\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>tag-money</title>\n<path d="M20.567 11.433c-0.521-0.521-1.364-0.521-1.885 0l-0.524 0.524c-1.28-0.819-3.091-0.681-4.191 0.419-0.631 0.631-0.976 1.468-0.976 2.359 0 0.889 0.347 1.727 0.976 2.357l0.943 0.943c0.171 0.171 0.195 0.368 0.195 0.472s-0.025 0.301-0.196 0.472c-0.169 0.169-0.367 0.195-0.471 0.195s-0.301-0.025-0.472-0.195l-2.357-2.357c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l0.944 0.941-0.472 0.472c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l0.519-0.519c0.54 0.359 1.173 0.553 1.837 0.553 0.892 0 1.729-0.348 2.357-0.976 0.631-0.631 0.976-1.467 0.976-2.357s-0.347-1.727-0.976-2.357l-0.943-0.943c-0.26-0.26-0.26-0.684 0-0.944 0.259-0.259 0.683-0.261 0.944 0l1.885 1.887c0.521 0.521 1.364 0.521 1.885 0 0.521-0.52 0.521-1.364 0-1.885l-0.472-0.472 0.472-0.472c0.521-0.521 0.521-1.365 0.001-1.887zM28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>\n</svg>\n`;var r=`\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>fire</title>\n<path d="M21.56 3.009c-0.052-0.047-0.116-0.065-0.173-0.103-0.073-0.048-0.143-0.1-0.223-0.132-0.083-0.033-0.165-0.047-0.252-0.063-0.081-0.016-0.16-0.035-0.243-0.035-0.089 0-0.172 0.020-0.26 0.037-0.080 0.016-0.159 0.028-0.236 0.059-0.084 0.035-0.157 0.088-0.235 0.14-0.053 0.036-0.115 0.053-0.165 0.097-0.049 0.044-0.988 0.895-2.288 2.255-2.364-2.839-4.476-4.815-4.576-4.908-0.056-0.052-0.127-0.075-0.188-0.115-0.075-0.049-0.143-0.105-0.224-0.137-0.080-0.032-0.163-0.041-0.245-0.057-0.085-0.016-0.167-0.040-0.252-0.040-0.084 0-0.163 0.023-0.245 0.039-0.087 0.016-0.172 0.025-0.253 0.059-0.080 0.032-0.147 0.087-0.22 0.135-0.063 0.041-0.133 0.064-0.189 0.116-0.453 0.423-11.092 10.408-11.092 18.095 0 7.977 4.935 13.549 12 13.549h8.667c6.673 0 11.333-5.115 11.333-12.439 0-7.052-10.013-16.167-10.44-16.552zM20.667 29.333h-7.777c-2.924 0-4.889-2.044-4.889-5.084 0-2.317 2.816-6.441 4.888-8.887 0.76 0.909 2.755 3.397 3.969 5.869 0.212 0.431 0.639 0.715 1.117 0.743 0.489 0.031 0.937-0.203 1.197-0.605 0.552-0.849 1.109-1.596 1.497-2.093 1.491 1.897 3.331 4.78 3.331 6.399 0 2.188-1.34 3.659-3.333 3.659zM26.537 27.052c0.081-0.44 0.129-0.899 0.129-1.377 0-3.269-3.713-7.847-4.46-8.735l-0.523-0.617c-0.507-0.599-1.528-0.599-2.035 0l-0.531 0.627c-0.147 0.175-0.495 0.599-0.936 1.187-1.595-2.597-3.495-4.776-3.595-4.889l-0.697-0.793c-0.507-0.577-1.499-0.577-2.004 0l-0.697 0.795c-0.6 0.684-5.856 6.803-5.856 11.001 0 0.881 0.127 1.712 0.356 2.484-1.896-1.933-3.023-4.821-3.023-8.283 0-4.915 6.073-11.997 9.329-15.255 1.001 1.008 2.692 2.789 4.368 4.927 0.243 0.309 0.609 0.496 1.001 0.509h0.048c0.376 0 0.735-0.159 0.988-0.439 0.889-0.981 1.693-1.795 2.269-2.359 3.051 2.965 8.663 9.323 8.663 13.727 0 3.171-1.031 5.769-2.796 7.491z"></path>\n</svg>\n`;var h=`\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>discount-coupon</title>\n<path d="M27 28h-22c-0.552 0-1-0.448-1-1v0c0-1.657-1.343-3-3-3v0c-0.552 0-1-0.448-1-1v0-12c0-0.552 0.448-1 1-1v0c1.657 0 3-1.343 3-3v0c0-0.552 0.448-1 1-1v0h22c0.552 0 1 0.448 1 1v0c0 1.657 1.343 3 3 3v0c0.552 0 1 0.448 1 1v0 12c0 0.552-0.448 1-1 1v0c-1.657 0-3 1.343-3 3v0c0 0.552-0.448 1-1 1v0zM5.9 26h20.2c0.415-1.964 1.936-3.485 3.867-3.894l0.033-0.006v-10.2c-1.964-0.415-3.485-1.936-3.894-3.867l-0.006-0.033h-20.2c-0.415 1.964-1.936 3.485-3.867 3.894l-0.033 0.006v10.2c1.964 0.415 3.485 1.936 3.894 3.867l0.006 0.033zM20 7h2v3h-2v-3zM20 12h2v4h-2v-4zM20 18h2v4h-2v-4zM20 24h2v3h-2v-3zM9 16c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM9 12c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM15 24c-1.657 0-3-1.343-3-3s1.343-3 3-3c1.657 0 3 1.343 3 3v0c0 1.657-1.343 3-3 3v0zM15 20c-0.552 0-1 0.448-1 1s0.448 1 1 1c0.552 0 1-0.448 1-1v0c0-0.552-0.448-1-1-1v0zM7 24c-0.552-0-1-0.448-1-1 0-0.244 0.088-0.468 0.233-0.642l-0.001 0.002 10-12c0.185-0.221 0.461-0.36 0.769-0.36 0.553 0 1.001 0.448 1.001 1.001 0 0.245-0.088 0.469-0.233 0.643l0.001-0.002-10 12c-0.185 0.22-0.46 0.358-0.767 0.358-0.001 0-0.002 0-0.003 0h0z"></path>\n</svg>\n`;const o=":host{display:block}";const l=class{constructor(t){s(this,t);this.internalOffers=[];this.showAll=false;this.freeLabel="";this.receivedOffer="";this.discountAmountLabel="";this.showMoreOffers="";this.icons={DiscountCouponIcon:h,GiftIcon:e,FireIcon:r,SpecialDiscountIcon:i,TagMoneyIcon:a};this.visibleOffersCount=3;this.handleCartItemUpdated=s=>{const t=s.data.cart.items.find((s=>s.id===this.itemId));if(t.id===this.itemId){this.internalQuantity=t.quantity;this.internalOffers=t.detailed_offers||[];this.internalProductPrice=t.product_price}};this.toggleShowAll=()=>{this.showAll=!this.showAll}}async componentWillLoad(){await Salla.onReady();await salla.lang.onLoaded((()=>{this.freeLabel=salla.lang.get("common.elements.freeExclam");this.receivedOffer=salla.lang.get("pages.cart.received_offer");this.discountAmountLabel=salla.lang.get("pages.cart.discount_amount");this.showMoreOffers=salla.lang.get("pages.cart.show_more_offers")}));this.internalQuantity=this.quantity;this.internalOffers=this.parseOffers(this.offers);this.internalProductPrice=this.productPrice}componentDidLoad(){salla.event.on("cart::item.updated",(s=>this.handleCartItemUpdated(s)))}parseOffers(s){try{return JSON.parse(s||"[]")}catch(s){console.error("Failed to parse offers",s);return[]}}get visibleOffers(){return this.internalOffers.slice(0,this.visibleOffersCount)}get hiddenOffers(){return this.internalOffers.slice(this.visibleOffersCount)}getPaidQty(s,t){return s-t.free_quantity}renderOffer(s,i){const c=this.getPaidQty(s,i);return t("div",{class:"s-cart-item-offers-box"},i.free_quantity>0&&c>0&&t("div",{class:"s-cart-item-offers-paid-free"},t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(c)," × ",t("span",{innerHTML:salla.money(this.internalProductPrice)})),t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(i.free_quantity)," ×",t("span",{class:"s-cart-item-offers-regular-price",innerHTML:salla.money(this.internalProductPrice)}),t("span",{class:"s-cart-item-offers-free-label"},this.freeLabel))),t("div",{class:"s-cart-item-offers-details"},t("span",{class:`s-cart-item-offers-icon`,innerHTML:this.icons[i.discount_icon]||""}),t("div",null,t("p",{class:"s-cart-item-offers-title"},this.receivedOffer.replace(":offer",i.offer_name)),t("p",{class:"s-cart-item-offers-discount"},t("span",{innerHTML:this.discountAmountLabel.replace(":amount",salla.money(i.discount_amount.toFixed(2)))})))))}render(){var s,i;if(!((s=this.internalOffers)===null||s===void 0?void 0:s.length)){return null}return t("div",{class:"s-cart-item-offers-container",id:`offers_list_${this.itemId}`},this.visibleOffers.map((s=>this.renderOffer(this.internalQuantity,s))),((i=this.internalOffers)===null||i===void 0?void 0:i.length)>this.visibleOffersCount&&t("div",{class:"s-cart-item-offers-show-more"},t("button",{class:"s-cart-item-offers-show-more-btn",onClick:this.toggleShowAll,type:"button"},t("span",{class:"s-cart-item-offers-show-more-label"},"+",this.hiddenOffers.length," ",this.showMoreOffers,t("span",{innerHTML:c,class:{"s-cart-item-offers-arrow-icon":true,"s-cart-item-offers-arrow-open":this.showAll}})))),this.showAll&&t("div",{class:"s-cart-item-offers-collapsed",id:`offers_${this.itemId}`},this.hiddenOffers.map((s=>this.renderOffer(this.internalQuantity,s)))))}};l.style=o;export{l as salla_cart_item_offers};
|
|
5
|
+
//# sourceMappingURL=p-55cef941.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-BoU3rP9-.system.js"],(function(s){"use strict";var e,r,t;return{setters:[function(s){e=s.r;r=s.h;t=s.g}],execute:function(){var a;(function(s){s["ProductDetail"]="product.single";s["Cart"]="cart"})(a||(a={}));var n;(function(s){s["Conditional"]="conditional";s["PercentageOrFixed"]="fixed";s["DiscountsTable"]="discounts_table";s["Bank"]="bank";s["BuyXGetY"]="buy_x_get_y"})(n||(n={}));var i='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';var l=s("salla_offer",function(){function s(s){var r=this;e(this,s);var t;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");this.buy_quantity_text=function(s){return salla.lang.get("pages.offer.buy_quantity",{quantity:s})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));this.categorySlot=((t=this.host.querySelector('[slot="category"]'))===null||t===void 0?void 0:t.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}s.prototype.getEndpointByPageName=function(){var s;return(s={},s[a.Cart]="offers/cart/".concat(salla.storage.get("cart.id")),s[a.ProductDetail]="offers/product/".concat(salla.config.get("page.id")),s)[this.currentPage]||"offers"};s.prototype.componentWillLoad=function(){var s=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(s){return salla.onReady(s)})).then((function(){s.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(s.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return salla.api.request(s.getEndpointByPageName())})).then((function(e){if(!(s.offersList=e.data).length){throw new Error("salla-offers:: There is no offers!")}var r=s.offersList.find((function(s){return[n.Bank,n.BuyXGetY,n.DiscountsTable].includes(s.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===n.DiscountsTable){return s.offersList=[r]}if(s.isBankOffer=r.type===n.Bank){s.offersList=s.offersList.filter((function(s){return s.type===n.Bank}));s.isMultipleBank=s.offersList.length>1;return s.offersList}var t=r.details.get;return t.source==="products"?salla.product.api.fetch({source:"selected",source_value:t.source_value}).then((function(e){t.products=e.data;r.details.get=t;return s.offersList=[r]})):salla.product.api.categories().then((function(e){t.categories=s.findCategories(e.data,t.source_value);r.details.get=t;return s.offersList=[r]}))})).then((function(e){salla.storage.set(s.getStorageKey(),{offers:e,stored_at:(new Date).getTime()});s.canRender=true})).catch((function(s){salla.logger.warn(s)}))};s.prototype.componentDidLoad=function(){var s=this.host.querySelector(".s-slider-block__title-nav");s===null||s===void 0?void 0:s.classList.add("s-offer-bank-payment-nav")};s.prototype.findCategories=function(s,e){var r;var t=[];for(var a=0,n=s;a<n.length;a++){var i=n[a];if(e.includes(i.id_||i.id)){t.push(i)}if(((r=i.sub_categories)===null||r===void 0?void 0:r.length)>0){t=t.concat(this.findCategories(i.sub_categories,e))}}return t};s.prototype.getStorageKey=function(){try{var s=salla.config.get("page.slug").replace(".","_");var e=salla.lang.getLocale();var r=salla.config.currency().code;if(!s||!e||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(s,"-").concat(salla.config.get("page.id"),"-").concat(e,"-").concat(r)}catch(s){return""}};s.prototype.getOffersFromStorage=function(){var s=salla.storage.get(this.getStorageKey());if(!s||s.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(s.offers)};s.prototype.render=function(){if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var s=this.offersList[0];var e=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:s.title;var t=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:s.description;var a={"block-title":e,"block-subTitle":t,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper"},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},a),r("div",{slot:"items"},this.renderSectionForOfferType(s.type))))};s.prototype.renderSectionForOfferType=function(s){if(this.isBankOffer){return this.renderBankSection()}if(s==n.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};s.prototype.getCategoriesSection=function(s){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,s.url).replace(/\{icon\}/g,s.icon||"sicon-store").replace(/\{name\}/g,s.name)})};s.prototype.renderBuyXGetYSection=function(){var s=this;var e,t;var a=this.offersList[0].details;return[(e=a.get.products)===null||e===void 0?void 0:e.map((function(e){return r("div",{class:"s-offer-slide-one-fourth"},s.hasCustomComponent?r(s.productCardComponent,{product:e}):r("salla-product-card",{"shadow-on-hover":true,product:e}))})),(t=a.get.categories)===null||t===void 0?void 0:t.map((function(e){return s.getCategoriesSection(e)}))]};s.prototype.renderBankSection=function(){var s=this;return this.offersList.map((function(e){return r("div",{class:{"s-offer-slide-one-sixth":s.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!s.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!s.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":s.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:e.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":e.details.logo,alt:e.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},e.details.payments.map((function(s){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+s+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+s+".png"),alt:"payment"}))}))),s.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},"".concat(s.product_discount_text," ").concat(e.details.discount_value).concat(e.details.discount_type==="percentage"&&"%")):""),!s.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,s.offersList[0].title),r("p",{innerHTML:s.generateBankDescription(s.offersList[0].description,e.details.discount_value)})):"")}))};s.prototype.generateBankDescription=function(s,e){return s.replace(new RegExp("".concat(e," %")),'<span class="s-offer-bank-message-amount">'.concat(e," %</span>"))};s.prototype.renderDiscountTableSection=function(){var s=this;var e;var t=this.offersList[0];var a=t.details.show_price_after_discount;return(e=this.offersList[0].details.discounts)===null||e===void 0?void 0:e.map((function(e){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},s.buy_quantity_text(e.quantity)),a?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,s.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},e.discounted_amount)," ",r("span",null,s.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},s.with_discount_text,"(",r("span",null,e.percentage,!!e.percentage&&"%"),")")))}))};Object.defineProperty(s.prototype,"host",{get:function(){return t(this)},enumerable:false,configurable:true});return s}());l.style=i}}}));
|
|
5
|
+
//# sourceMappingURL=p-5c3c4081.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-BoU3rP9-.system.js"],(function(n){"use strict";var i,t,e;return{setters:[function(n){i=n.r;t=n.h;e=n.H}],execute:function(){var o;(function(n){n["PERCENTAGE"]="percentage";n["FIXED"]="fixed";n["FREE_PRODUCT"]="free_product"})(o||(o={}));var r;(function(n){n["PRODUCT_COUNT"]="products_count";n["PRODUCT_PURCHASE"]="order_amount"})(r||(r={}));var a=":host{display:block}";var s=n("salla_conditional_offer",function(){function n(n){i(this,n);this.offer=null;this.products={};this.isLoading=true;this.canRender=true}n.prototype.componentWillLoad=function(){var n=this;salla.onReady().then((function(){var n,i,t;if(!((n=salla.config.get("store.features"))===null||n===void 0?void 0:n.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((t=(i=salla.storage.get("cart"))===null||i===void 0?void 0:i.summary)===null||t===void 0?void 0:t.count)){throw new Error("feature or cart object does not existed")}})).then((function(){return salla.api.cart.offers()})).then((function(i){var t=i.data;n.offer=t.find((function(n){return n.type==="conditional"}));if(!n.offer){throw new Error("No conditional offer has been activated in the merchant dashboard")}n.offer.details.discounts.unshift({value:0,min_spend:0});return n.updateInitialOfferValue()})).then((function(){return n.getProducts()})).then((function(){return salla.event.on("cart::updated",(function(i){return n.updateOfferValues(i)}))})).catch((function(i){n.canRender=false;salla.logger.warn("salla-conditional-offer:: ",i)})).finally((function(){n.isLoading=false}))};n.prototype.getProducts=function(){var n=this;var i=this.offer.details.discounts.filter((function(n){var i=n.type;return i===o.FREE_PRODUCT})).map((function(n){var i=n.value;return i}));if(i.length>0){return salla.product.fetch({source:"selected",source_value:i}).then((function(i){var t=i.data;t.forEach((function(i){var t=i.id,e=i.url,o=i.image;n.products[t]={url:e,image:o}}))}))}};n.prototype.updateInitialOfferValue=function(){var n=this;return salla.api.cart.details().then((function(i){var t=i.data.cart;return n.updateOfferValues(t)}))};n.prototype.updateOfferValues=function(n){var i=n.items,t=n.total;var e;var o=this.offer.details.based_on===r.PRODUCT_COUNT?i.reduce((function(n,i){var t=i.quantity;return n+t}),0):t;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(e=this.offer)===null||e===void 0?void 0:e.details),{current_value:o})});return this.offer};n.prototype.getCheckpointContent=function(n){var i,e;if(n.type===o.PERCENTAGE)return"".concat(n.value,"%");if(n.type===o.FIXED)return salla.money(n.value);if(n.type!==o.FREE_PRODUCT){salla.logger.error("salla-conditional-offer:: unexpected type (".concat(n.type,")!"));return""}var r=this.products[n.value];if(!r){salla.logger.error("salla-conditional-offer:: there is no product with id (".concat(n.value,")!"));return""}return t("a",{class:"s-conditional-offer-product-link",href:r.url},t("img",{class:"s-conditional-offer-checkpoint-image-content",loading:"lazy",decoding:"async",alt:((i=r===null||r===void 0?void 0:r.image)===null||i===void 0?void 0:i.alt)||"",src:(e=r===null||r===void 0?void 0:r.image)===null||e===void 0?void 0:e.url}))};n.prototype.getOfferType=function(n){var i;var t=(i=this.offer.details)===null||i===void 0?void 0:i.based_on;if(t===r.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",n.min_spend);if(t===r.PRODUCT_PURCHASE)return salla.money(n.min_spend);salla.logger.warn("salla-conditional-offer:: Unexpected offer detail's based_on value: ".concat(t));return"".concat(n.min_spend)};n.prototype.clamp=function(n,i,t){return Math.max(i,Math.min(n,t))};n.prototype.mapValueRanges=function(n,i,t,e,o){var r=(n-i)*(o-e)/(t-i)+e;if(r===Number.POSITIVE_INFINITY)return 100;if(r===Number.NEGATIVE_INFINITY)return 0;return this.clamp(r,0,100)};n.prototype.getCheckPointView=function(n,i){var e,o;var r=this.offer.details.discounts.findIndex((function(i){var t=i.min_spend;return t===n.min_spend}));var a=(o=(e=this.offer.details.discounts[r-1])===null||e===void 0?void 0:e.min_spend)!==null&&o!==void 0?o:0;var s=this.mapValueRanges(this.offer.details.current_value,a,n.min_spend,0,100);var l=n.min_spend<=this.offer.details.current_value;return t("div",{class:"s-conditional-offer-checkpoint-container"},i>0?[t("div",{key:"progress-line",class:"s-conditional-offer-progress-line-container"},t("div",{class:"s-conditional-offer-progress-line-inactive"}),t("div",{class:"s-conditional-offer-progress-line-active",style:{width:"".concat(s,"%")}})),t("div",{key:"checkpoint",class:"s-conditional-offer-checkpoint ".concat(l?"s-conditional-offer-active-checkpoint":"")},t("div",{class:"s-conditional-offer-item-avatar-content ".concat(l?"active":""),innerHTML:this.products&&this.getCheckpointContent(n)}),t("div",{class:"s-conditional-offer-checkpoint-label ".concat(l?"active":""),innerHTML:this.getOfferType(n)}))]:t("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":i===0,active:l},innerHTML:this.getOfferType(n)}))};n.prototype.getLoadingSkeletonView=function(){return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-skeleton-inner-container"},t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"30%"})),t("div",{class:"s-conditional-offer-skeleton-subtitle"},t("salla-skeleton",{height:"16px",width:"35%"})),t("div",{class:"s-conditional-offer-skeleton-checkpoints-wrapper"},Array(3).fill(null).map((function(){return[t("salla-skeleton",{key:"checkpoint-line",height:"8px"}),t("div",{key:"checkpoint"},t("salla-skeleton",{height:"60px",width:"60px",type:"circle"}))]})))))};n.prototype.render=function(){var n=this;if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();return t(e,{class:"s-conditional-offer-container"},t("div",{class:"s-conditional-offer-title-wrapper"},t("div",{class:"s-conditional-offer-title"},this.offer.title),this.offer.description?t("div",{class:"s-conditional-offer-subtitle"},this.offer.description," ",t("i",{class:"sicon-information"})):null),t("div",{class:"s-conditional-offer-progress-container"},this.offer.details.discounts.map((function(i,e){return t("div",{class:{"flex-1":e>0},key:i.min_spend},n.getCheckPointView(i,e))}))))};return n}());s.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-689aca0e.system.entry.js.map
|