@salla.sa/twilight-components 2.14.254 → 2.14.255
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/{app-globals-Byh413hm.js → app-globals-CRbtFdLh.js} +3 -3
- package/dist/cjs/{app-globals-Byh413hm.js.map → app-globals-CRbtFdLh.js.map} +1 -1
- package/dist/cjs/{index-BRms9nAM.js → index-CiB3mE81.js} +4 -4
- package/dist/cjs/index-CiB3mE81.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- 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-loyalty-program.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 +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.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/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{app-globals-DBmHcYZg.js → app-globals-CXaqPW0W.js} +3 -3
- package/dist/esm/{app-globals-DBmHcYZg.js.map → app-globals-CXaqPW0W.js.map} +1 -1
- package/dist/esm/{index-6RnqFOTM.js → index-Cmh2bDlu.js} +4 -4
- package/dist/esm/index-Cmh2bDlu.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion_4.entry.js +1 -1
- package/dist/esm/salla-add-product-button_51.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.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 +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.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/{app-globals-DBmHcYZg.js → app-globals-CXaqPW0W.js} +2 -2
- package/dist/esm-es5/{app-globals-DBmHcYZg.js.map → app-globals-CXaqPW0W.js.map} +1 -1
- package/dist/esm-es5/{index-6RnqFOTM.js → index-Cmh2bDlu.js} +3 -3
- package/dist/esm-es5/index-Cmh2bDlu.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion_4.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_51.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 +1 -1
- 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-loyalty-program.entry.js +1 -1
- package/dist/esm-es5/salla-metadata.entry.js +2 -2
- 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-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm-es5/salla-order-details.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +1 -1
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- 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-tiered-offer.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-f1fe7386.system.entry.js → p-02187d79.system.entry.js} +2 -2
- package/dist/twilight/{p-6a9916f4.system.entry.js → p-02b2de19.system.entry.js} +2 -2
- package/dist/twilight/{p-9b074242.entry.js → p-059379d0.entry.js} +2 -2
- package/dist/twilight/{p-1fca98a6.system.entry.js → p-13a215f8.system.entry.js} +2 -2
- package/dist/twilight/{p-3bba12f2.system.entry.js → p-231440bc.system.entry.js} +2 -2
- package/dist/twilight/{p-e8eeddc4.system.entry.js → p-2ac46fd5.system.entry.js} +2 -2
- package/dist/twilight/{p-361c68e9.entry.js → p-2f228be7.entry.js} +2 -2
- package/dist/twilight/{p-a6919fd1.system.entry.js → p-302eb45d.system.entry.js} +2 -2
- package/dist/twilight/{p-29b9016f.system.entry.js → p-3099db22.system.entry.js} +2 -2
- package/dist/twilight/{p-e2e632ae.entry.js → p-419eb9a7.entry.js} +2 -2
- package/dist/twilight/{p-48435856.system.entry.js → p-41a7a590.system.entry.js} +2 -2
- package/dist/twilight/{p-ed455631.entry.js → p-44206730.entry.js} +2 -2
- package/dist/twilight/{p-3696d5ed.system.entry.js → p-459fff65.system.entry.js} +2 -2
- package/dist/twilight/{p-1c459b68.entry.js → p-468a7324.entry.js} +2 -2
- package/dist/twilight/{p-15b4c829.entry.js → p-470e16b4.entry.js} +2 -2
- package/dist/twilight/{p-adf637ae.entry.js → p-4710f397.entry.js} +2 -2
- package/dist/twilight/{p-f13903b4.entry.js → p-471d0c2a.entry.js} +2 -2
- package/dist/twilight/{p-2367c263.entry.js → p-47f2e097.entry.js} +2 -2
- package/dist/twilight/{p-90c6efd9.entry.js → p-4f1f3a1a.entry.js} +2 -2
- package/dist/twilight/{p-57af4a31.entry.js → p-4f3c5294.entry.js} +2 -2
- package/dist/twilight/{p-c9e41a8f.entry.js → p-51915628.entry.js} +2 -2
- package/dist/twilight/{p-63c04570.system.entry.js → p-53fdce47.system.entry.js} +2 -2
- package/dist/twilight/{p-934dd993.entry.js → p-55a9da25.entry.js} +2 -2
- package/dist/twilight/{p-6d7667a3.entry.js → p-56a2493e.entry.js} +2 -2
- package/dist/twilight/{p-a05bd636.entry.js → p-67c93900.entry.js} +2 -2
- package/dist/twilight/{p-1a9b7199.system.entry.js → p-6868caa4.system.entry.js} +2 -2
- package/dist/twilight/{p-3eb1f223.system.entry.js → p-68cbea08.system.entry.js} +2 -2
- package/dist/twilight/{p-af0c3637.entry.js → p-6bd4f5dd.entry.js} +2 -2
- package/dist/twilight/{p-2f351136.system.entry.js → p-6bd9b65d.system.entry.js} +2 -2
- package/dist/twilight/{p-eb51e405.entry.js → p-6c2ffbdb.entry.js} +2 -2
- package/dist/twilight/{p-c62f9443.system.entry.js → p-6ef02abc.system.entry.js} +2 -2
- package/dist/twilight/{p-37b98407.entry.js → p-6fd8031a.entry.js} +2 -2
- package/dist/twilight/{p-7824e441.entry.js → p-72a5b284.entry.js} +2 -2
- package/dist/twilight/{p-e8b2ec6f.system.entry.js → p-78715871.system.entry.js} +3 -3
- package/dist/twilight/{p-7c6bacd4.system.entry.js → p-78bf11f2.system.entry.js} +2 -2
- package/dist/twilight/{p-c2e6934e.system.entry.js → p-7cdfb2ff.system.entry.js} +2 -2
- package/dist/twilight/{p-53507406.entry.js → p-7d060cdd.entry.js} +2 -2
- package/dist/twilight/{p-881cd90a.system.entry.js → p-7e3906fc.system.entry.js} +2 -2
- package/dist/twilight/{p-bb26f888.entry.js → p-7f0e3435.entry.js} +2 -2
- package/dist/twilight/{p-1ecb5b3b.entry.js → p-8277f14f.entry.js} +2 -2
- package/dist/twilight/{p-d31f25e6.entry.js → p-84b61e25.entry.js} +2 -2
- package/dist/twilight/{p-60030ed5.system.entry.js → p-85b17c34.system.entry.js} +2 -2
- package/dist/twilight/{p-38e35ba9.system.entry.js → p-889ec51e.system.entry.js} +2 -2
- package/dist/twilight/{p-d8787047.entry.js → p-8e14e730.entry.js} +2 -2
- package/dist/twilight/{p-5df10c86.system.entry.js → p-93bc2972.system.entry.js} +2 -2
- package/dist/twilight/{p-46d0b8df.entry.js → p-9470463b.entry.js} +2 -2
- package/dist/twilight/{p-f2f86bc0.system.entry.js → p-963ba76e.system.entry.js} +2 -2
- package/dist/twilight/{p-d4b0466e.system.entry.js → p-9cf6cc9f.system.entry.js} +2 -2
- package/dist/twilight/{p-DlSTTu3d.system.js.map → p-BLd878to.system.js.map} +1 -1
- package/dist/twilight/{p-7zmqPng_.system.js.map → p-BPogbRgc.system.js.map} +1 -1
- package/dist/twilight/{p-BGg8YJ-3.system.js → p-BTHt_nZ5.system.js} +2 -2
- package/dist/twilight/{p-BGg8YJ-3.system.js.map → p-BTHt_nZ5.system.js.map} +1 -1
- package/dist/twilight/{p-qjoWx0F3.system.js.map → p-BVYqexVV.system.js.map} +1 -1
- package/dist/twilight/{p-DzGH6Pth.system.js.map → p-BhewmKn2.system.js.map} +1 -1
- package/dist/twilight/{p-MBe2K6Cl.system.js.map → p-BpfPcg3W.system.js.map} +1 -1
- package/dist/twilight/{p-Cj6B3rZy.system.js.map → p-BrKg9FB7.system.js.map} +1 -1
- package/dist/twilight/{p-U5WE8YSF.system.js.map → p-By_R4wyt.system.js.map} +1 -1
- package/dist/twilight/{p-B1M54MeY.js → p-C3pcK7CB.js} +2 -2
- package/dist/twilight/{p-B1M54MeY.js.map → p-C3pcK7CB.js.map} +1 -1
- package/dist/twilight/{p-C6iNVfue.system.js.map → p-C8tnyQ_B.system.js.map} +1 -1
- package/dist/twilight/{p-C6n00tHk.system.js.map → p-CCrcmQ6i.system.js.map} +1 -1
- package/dist/twilight/{p-Dm4vaVPW.system.js.map → p-CKwOWJLk.system.js.map} +1 -1
- package/dist/twilight/{p-BKfsgAvG.system.js.map → p-CXiTCFrN.system.js.map} +1 -1
- package/dist/twilight/{p-DQDOpQC8.system.js.map → p-CYB_tFv0.system.js.map} +1 -1
- package/dist/twilight/{p-GwDpu8M4.system.js.map → p-C_ju2ao2.system.js.map} +1 -1
- package/dist/twilight/{p-D1gaAPRH.system.js.map → p-CaIXPRFW.system.js.map} +1 -1
- package/dist/twilight/{p-DiAHk-lZ.system.js → p-CbJXYJ5O.system.js} +3 -3
- package/dist/twilight/p-CbJXYJ5O.system.js.map +1 -0
- package/dist/twilight/{p-B3dwJCVE.system.js.map → p-Ccypd_SM.system.js.map} +1 -1
- package/dist/twilight/{p-DzINj8LX.system.js.map → p-Ceb-eX-0.system.js.map} +1 -1
- package/dist/twilight/{p-6RnqFOTM.js → p-Cmh2bDlu.js} +3 -3
- package/dist/twilight/p-Cmh2bDlu.js.map +1 -0
- package/dist/twilight/{p-CMbrIrB7.system.js.map → p-CsF4wF5j.system.js.map} +1 -1
- package/dist/twilight/{p-CtYe5QQE.system.js → p-CzmyZ_Nd.system.js} +2 -2
- package/dist/twilight/{p-CtYe5QQE.system.js.map → p-CzmyZ_Nd.system.js.map} +1 -1
- package/dist/twilight/{p-CLJwbgSv.system.js.map → p-D5AOZnju.system.js.map} +1 -1
- package/dist/twilight/{p-D2oQHY3j.system.js.map → p-D9CSx3Wz.system.js.map} +1 -1
- package/dist/twilight/{p-DIZ88uz3.system.js.map → p-DBkWclyq.system.js.map} +1 -1
- package/dist/twilight/{p-DRCHhB2S.system.js.map → p-DDduzQA-.system.js.map} +1 -1
- package/dist/twilight/{p-Dt-Djk7g.system.js.map → p-DDgmoM0z.system.js.map} +1 -1
- package/dist/twilight/{p-DQf2y2uW.system.js.map → p-DGWMlRvt.system.js.map} +1 -1
- package/dist/twilight/{p-FnNT7hdc.system.js.map → p-DJvU6sZZ.system.js.map} +1 -1
- package/dist/twilight/{p-Ri5PwVxp.system.js.map → p-DRcmoz10.system.js.map} +1 -1
- package/dist/twilight/{p-wcHiF5TF.system.js.map → p-Dk6V-4d2.system.js.map} +1 -1
- package/dist/twilight/{p-B1S_WbiL.system.js.map → p-DoENPAoP.system.js.map} +1 -1
- package/dist/twilight/{p-BhX3rYLg.system.js.map → p-DsgPAMoP.system.js.map} +1 -1
- package/dist/twilight/{p-CAZDBDvT.system.js.map → p-DvzE4oQS.system.js.map} +1 -1
- package/dist/twilight/{p-C7XW5VQp.system.js.map → p-EEU49bnm.system.js.map} +1 -1
- package/dist/twilight/{p-1mkRwJ9u.system.js.map → p-KFQPthVf.system.js.map} +1 -1
- package/dist/twilight/{p-DfxoOw4H.system.js.map → p-aI0YGy91.system.js.map} +1 -1
- package/dist/twilight/{p-d309e915.system.entry.js → p-ad83b353.system.entry.js} +2 -2
- package/dist/twilight/{p-e8cab8f7.entry.js → p-b1266dbc.entry.js} +2 -2
- package/dist/twilight/{p-3389fc3f.entry.js → p-b6c991e2.entry.js} +2 -2
- package/dist/twilight/{p-30022be7.system.entry.js → p-bd97e5ea.system.entry.js} +2 -2
- package/dist/twilight/{p-6bd3e8c2.system.entry.js → p-bef4449d.system.entry.js} +2 -2
- package/dist/twilight/{p-9fe5bbbc.system.entry.js → p-c4741c01.system.entry.js} +2 -2
- package/dist/twilight/{p-93684e71.system.entry.js → p-c93aca68.system.entry.js} +2 -2
- package/dist/twilight/{p-766a000c.entry.js → p-c9736f8b.entry.js} +2 -2
- package/dist/twilight/{p-ed217c2e.entry.js → p-cdadd220.entry.js} +2 -2
- package/dist/twilight/{p-faa04f76.system.entry.js → p-cfe9931b.system.entry.js} +2 -2
- package/dist/twilight/{p-3a154637.system.entry.js → p-d54d7cd7.system.entry.js} +2 -2
- package/dist/twilight/{p-aae512ee.entry.js → p-dade84c6.entry.js} +2 -2
- package/dist/twilight/{p-ee74bc5f.entry.js → p-e53e006e.entry.js} +2 -2
- package/dist/twilight/{p-f8789882.system.entry.js → p-e574830f.system.entry.js} +2 -2
- package/dist/twilight/{p-b7442220.entry.js → p-e5ff9041.entry.js} +2 -2
- package/dist/twilight/{p-5e66fc93.entry.js → p-f0e1cc94.entry.js} +2 -2
- package/dist/twilight/{p-61a03c21.system.entry.js → p-fb5d9736.system.entry.js} +2 -2
- package/dist/twilight/{p-e39626cc.system.entry.js → p-fc7c940d.system.entry.js} +2 -2
- package/dist/twilight/{p-BkrKDbhc.system.js.map → p-smRaSeBI.system.js.map} +1 -1
- package/dist/twilight/{p-DIFUBbJt.system.js.map → p-uNkJ2LZM.system.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/index-BRms9nAM.js.map +0 -1
- package/dist/esm/index-6RnqFOTM.js.map +0 -1
- package/dist/esm-es5/index-6RnqFOTM.js.map +0 -1
- package/dist/twilight/p-6RnqFOTM.js.map +0 -1
- package/dist/twilight/p-DiAHk-lZ.system.js.map +0 -1
- /package/dist/twilight/{p-f1fe7386.system.entry.js.map → p-02187d79.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6a9916f4.system.entry.js.map → p-02b2de19.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9b074242.entry.js.map → p-059379d0.entry.js.map} +0 -0
- /package/dist/twilight/{p-1fca98a6.system.entry.js.map → p-13a215f8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3bba12f2.system.entry.js.map → p-231440bc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e8eeddc4.system.entry.js.map → p-2ac46fd5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-361c68e9.entry.js.map → p-2f228be7.entry.js.map} +0 -0
- /package/dist/twilight/{p-a6919fd1.system.entry.js.map → p-302eb45d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-29b9016f.system.entry.js.map → p-3099db22.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e2e632ae.entry.js.map → p-419eb9a7.entry.js.map} +0 -0
- /package/dist/twilight/{p-48435856.system.entry.js.map → p-41a7a590.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ed455631.entry.js.map → p-44206730.entry.js.map} +0 -0
- /package/dist/twilight/{p-3696d5ed.system.entry.js.map → p-459fff65.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1c459b68.entry.js.map → p-468a7324.entry.js.map} +0 -0
- /package/dist/twilight/{p-15b4c829.entry.js.map → p-470e16b4.entry.js.map} +0 -0
- /package/dist/twilight/{p-adf637ae.entry.js.map → p-4710f397.entry.js.map} +0 -0
- /package/dist/twilight/{p-f13903b4.entry.js.map → p-471d0c2a.entry.js.map} +0 -0
- /package/dist/twilight/{p-2367c263.entry.js.map → p-47f2e097.entry.js.map} +0 -0
- /package/dist/twilight/{p-90c6efd9.entry.js.map → p-4f1f3a1a.entry.js.map} +0 -0
- /package/dist/twilight/{p-57af4a31.entry.js.map → p-4f3c5294.entry.js.map} +0 -0
- /package/dist/twilight/{p-c9e41a8f.entry.js.map → p-51915628.entry.js.map} +0 -0
- /package/dist/twilight/{p-63c04570.system.entry.js.map → p-53fdce47.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-934dd993.entry.js.map → p-55a9da25.entry.js.map} +0 -0
- /package/dist/twilight/{p-6d7667a3.entry.js.map → p-56a2493e.entry.js.map} +0 -0
- /package/dist/twilight/{p-a05bd636.entry.js.map → p-67c93900.entry.js.map} +0 -0
- /package/dist/twilight/{p-1a9b7199.system.entry.js.map → p-6868caa4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3eb1f223.system.entry.js.map → p-68cbea08.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-af0c3637.entry.js.map → p-6bd4f5dd.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f351136.system.entry.js.map → p-6bd9b65d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-eb51e405.entry.js.map → p-6c2ffbdb.entry.js.map} +0 -0
- /package/dist/twilight/{p-c62f9443.system.entry.js.map → p-6ef02abc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-37b98407.entry.js.map → p-6fd8031a.entry.js.map} +0 -0
- /package/dist/twilight/{p-7824e441.entry.js.map → p-72a5b284.entry.js.map} +0 -0
- /package/dist/twilight/{p-e8b2ec6f.system.entry.js.map → p-78715871.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7c6bacd4.system.entry.js.map → p-78bf11f2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c2e6934e.system.entry.js.map → p-7cdfb2ff.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-53507406.entry.js.map → p-7d060cdd.entry.js.map} +0 -0
- /package/dist/twilight/{p-881cd90a.system.entry.js.map → p-7e3906fc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bb26f888.entry.js.map → p-7f0e3435.entry.js.map} +0 -0
- /package/dist/twilight/{p-1ecb5b3b.entry.js.map → p-8277f14f.entry.js.map} +0 -0
- /package/dist/twilight/{p-d31f25e6.entry.js.map → p-84b61e25.entry.js.map} +0 -0
- /package/dist/twilight/{p-60030ed5.system.entry.js.map → p-85b17c34.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-38e35ba9.system.entry.js.map → p-889ec51e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d8787047.entry.js.map → p-8e14e730.entry.js.map} +0 -0
- /package/dist/twilight/{p-5df10c86.system.entry.js.map → p-93bc2972.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-46d0b8df.entry.js.map → p-9470463b.entry.js.map} +0 -0
- /package/dist/twilight/{p-f2f86bc0.system.entry.js.map → p-963ba76e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d4b0466e.system.entry.js.map → p-9cf6cc9f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d309e915.system.entry.js.map → p-ad83b353.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e8cab8f7.entry.js.map → p-b1266dbc.entry.js.map} +0 -0
- /package/dist/twilight/{p-3389fc3f.entry.js.map → p-b6c991e2.entry.js.map} +0 -0
- /package/dist/twilight/{p-30022be7.system.entry.js.map → p-bd97e5ea.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6bd3e8c2.system.entry.js.map → p-bef4449d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9fe5bbbc.system.entry.js.map → p-c4741c01.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-93684e71.system.entry.js.map → p-c93aca68.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-766a000c.entry.js.map → p-c9736f8b.entry.js.map} +0 -0
- /package/dist/twilight/{p-ed217c2e.entry.js.map → p-cdadd220.entry.js.map} +0 -0
- /package/dist/twilight/{p-faa04f76.system.entry.js.map → p-cfe9931b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3a154637.system.entry.js.map → p-d54d7cd7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-aae512ee.entry.js.map → p-dade84c6.entry.js.map} +0 -0
- /package/dist/twilight/{p-ee74bc5f.entry.js.map → p-e53e006e.entry.js.map} +0 -0
- /package/dist/twilight/{p-f8789882.system.entry.js.map → p-e574830f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b7442220.entry.js.map → p-e5ff9041.entry.js.map} +0 -0
- /package/dist/twilight/{p-5e66fc93.entry.js.map → p-f0e1cc94.entry.js.map} +0 -0
- /package/dist/twilight/{p-61a03c21.system.entry.js.map → p-fb5d9736.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e39626cc.system.entry.js.map → p-fc7c940d.system.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,a,l,e){function s(t){return t instanceof l?t:new l((function(a){a(t)}))}return new(l||(l=Promise))((function(l,n){function r(t){try{c(e.next(t))}catch(t){n(t)}}function i(t){try{c(e["throw"](t))}catch(t){n(t)}}function c(t){t.done?l(t.value):s(t.value).then(r,i)}c((e=e.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var l={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,s,n,r;return r={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function i(t){return function(a){return c([t,a])}}function c(i){if(e)throw new TypeError("Generator is already executing.");while(r&&(r=0,i[0]&&(l=0)),l)try{if(e=1,s&&(n=i[0]&2?s["return"]:i[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,i[1])).done)return n;if(s=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:l.label++;return{value:i[1],done:false};case 5:l.label++;s=i[1];i=[0];continue;case 7:i=l.ops.pop();l.trys.pop();continue;default:if(!(n=l.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){l=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){l.label=i[1];break}if(i[0]===6&&l.label<n[1]){l.label=n[1];n=i;break}if(n&&l.label<n[2]){l.label=n[2];l.ops.push(i);break}if(n[2])l.ops.pop();l.trys.pop();continue}i=a.call(t,l)}catch(t){i=[6,t];s=0}finally{e=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-CbJXYJ5O.system.js"],(function(t){"use strict";var a,l,e;return{setters:[function(t){a=t.r;l=t.h;e=t.H}],execute:function(){var s=".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";var n=t("salla_wallet",function(){function t(t){var l=this;a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=function(){l.loadMoreTransactions()}}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadTransactions()}))};t.prototype.loadTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=true;e.label=1;case 1:e.trys.push([1,3,4,5]);t="/balance/wallet?per_page=10&page=1";return[4,salla.api.request(t)];case 2:a=e.sent();this.nextPageUrl=a.data.transactions.next_page_url;this.transactionsArray=a.data.transactions;this.balance=a.data.balance;return[3,5];case 3:l=e.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.loadMoreTransactions=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,l;var e;return __generator(this,(function(s){switch(s.label){case 0:this.isLoading=true;s.label=1;case 1:s.trys.push([1,3,4,5]);t=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";return[4,salla.api.request(t)];case 2:a=s.sent();this.nextPageUrl=a.data.transactions.next_page_url;(e=this.transactionsArray).push.apply(e,a.data.transactions.data);this.balance=a.data.balance;return[3,5];case 3:l=s.sent();console.error("Error loading wallet transactions",l);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.render=function(){if(this.transactionsArray.length>0){return l(e,null,l("table",{class:"s-wallet-table"},l("tbody",{class:"s-wallet-table-tbody"},l("tr",{class:"s-table__tr"},l("td",null,l("div",{class:"s-wallet-table-balance-container"},l("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),l("div",null,l("div",{innerHTML:salla.money(this.balance)}),l("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("table",{class:"s-wallet-table"},l("thead",{class:"s-wallet-table-head"},l("tr",{class:"s-wallet-table-head-tr"},l("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),l("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((function(t){return l("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),t.id&&l("span",{class:"hidden md:inline-block"},"#",t.id),l("div",{class:"flex items-center md:hidden"},l("salla-button",{class:"relative",color:"dark",shape:"link","data-content":t.order_id},t.order_id&&l("span",null,"#",t.order_id))))),l("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),l("div",{innerHTML:salla.money(t.amount)}))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),t.created_at&&new Date(t.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),l("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),l("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},t.order_id&&l("span",null,"#",t.order_id)))),l("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},l("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},l("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),l("span",null,t.expired_at&&new Date(t.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),l("td",{class:"s-wallet-table-tbody-tr-td"},l("div",{class:"s-wallet-table-tbody-tr-td-content"},l("div",null,l("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),l("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":t.action_type==="cashback","s-wallet-table-transaction-status-refund":t.action_type==="refund","s-wallet-table-transaction-status-purchase":t.action_type==="purchase_by_wallet"}},!!t.description&&l("i",{id:t.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!t.description&&l("salla-tooltip",{text:t.description,targetId:t.id.toString()}),l("span",null,t.title)))))})))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&l("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return l(e,null,l("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),l("div",{class:"s-wallet-table-empty-state"},l("i",{class:"sicon-full-wallet"}),l("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),l("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}};return t}());n.style=s}}}));
|
|
5
|
+
//# sourceMappingURL=p-3099db22.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as r}from"./p-6RnqFOTM.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as e,h as t,H as r}from"./p-Cmh2bDlu.js";var s;(function(e){e["PERCENTAGE"]="percentage";e["FIXED"]="fixed"})(s||(s={}));var i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;var o=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>`;var n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>`;var l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>`;const a={staticIcons:[i,o,n,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};class d{static findTierByIndex(e,t){return e.find((e=>e.index===t))||null}static findTierByName(e,t){return e.find((e=>e.tier_name===t))||null}static getTierNameByIndex(e,t){var r;return(r=this.findTierByIndex(e,t))===null||r===void 0?void 0:r.tier_name}static findCurrentTierIndex(e,t){if(!t)return 0;for(let r=t.length-1;r>=0;r--){if(e>=t[r].threshold){return t[r].index}}return 0}}const f=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";const c=class{constructor(t){e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=e=>{this.activeTabTier=e};salla.lang.onLoaded((()=>{this.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");this.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");this.discountText=salla.lang.get("blocks.tiered_offer.discount");this.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}async componentWillLoad(){try{await salla.onReady();if(!this.checkFeatureEnabled()){return}if(!this.checkCartExists()){return}this.isLoading=true;const e=await this.fetchTieredOfferData();if(!e){return}this.initializeComponent(e)}catch(e){this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e)}finally{this.isLoading=false}}checkFeatureEnabled(){var e;return(e=salla.config.get("store.features"))===null||e===void 0?void 0:e.includes("tiered-offer")}checkCartExists(){var e,t;return!!((t=(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.summary)===null||t===void 0?void 0:t.count)}validateCouponCompatibility(e,t){var r;return!(t&&!((r=e.details)===null||r===void 0?void 0:r.applied_with_coupon))}async fetchTieredOfferData(){var e;try{const{data:t}=await salla.api.cart.offers();const r=t.find((e=>e.type==="tiered_offer"));if(!r){return null}if(!this.validateCouponCompatibility(r,(e=salla.storage.get("cart"))===null||e===void 0?void 0:e.coupon)){this.canRender=false;return null}return r}catch(e){throw e}}initializeComponent(e){var t;this.apiOfferData=e;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;const r=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;const s=this.findCurrentTierIndex(r);if(s===0){this.canRender=false;return}this.currentTierIndex=s;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,s);this.activeTabTier=this.currentTier;this.canRender=true}componentDidLoad(){salla.event.on("cart::updated",(async e=>{const t=await this.fetchTieredOfferData();if(t){this.updateOfferValues(e,t)}}))}mapApiDataToTiers(e){const t=[...e.details.discounts].sort(((e,t)=>e.min_spend-t.min_spend));const r=t.map(((e,t)=>({name:e.name,tier_name:e.name,discount:e.type===s.PERCENTAGE?`${salla.helpers.number(e.value)}%`:salla.money(e.value),icon:a.staticIcons[t]||a.staticIcons[0],threshold:e.min_spend,text_color:a.staticColors[t],index:t+1})));return{current_tier:d.getTierNameByIndex(r,this.findCurrentTierIndex(e.details.current_value,r)),tiers:r}}findCurrentTierIndex(e,t){var r;if(t===void 0){t=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return d.findCurrentTierIndex(e,t||[])}updateOfferValues(e,t){var r,s;if(!t||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(t,e.coupon)){this.canRender=false;return}this.canRender=true;if(((r=t.details)===null||r===void 0?void 0:r.with_current_cart)===false){return}const i=((s=t.details)===null||s===void 0?void 0:s.current_value)||0;this.apiOfferData=t;const o=this.findCurrentTierIndex(i);if(o===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=o;this.currentTier=d.getTierNameByIndex(this.tieredOfferData.tiers,o);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}}getLoadingSkeletonView(){return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-skeleton-wrapper"},t("div",{class:"s-tiered-offer-skeleton-title"},t("salla-skeleton",{height:"16px",width:"40%"})),t("div",{class:"s-tiered-offer-skeleton-subtitle"},t("salla-skeleton",{height:"20px",width:"60%"})),t("div",{class:"s-tiered-offer-skeleton-progress"},t("salla-skeleton",{height:"16px",width:"100%"})),t("div",{class:"s-tiered-offer-skeleton-tabs"},t("salla-skeleton",{height:"50px",width:"100%"})))))}getCurrentTierData(){return d.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]}getProgressWidth(){var e;const t=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;const r=this.tieredOfferData.tiers.length;const s=this.findCurrentTierIndex(t);const i=s;return i/r*100}calculateMilestonePosition(e,t){if(t===1){return"calc(100% - 18px)"}const r=(e+1)/t*100;const s=8/t;return`${Math.max(2,Math.min(95,r-s))}%`}getMilestoneStyles(e,t,r){const s=document.documentElement.dir==="rtl";const i=this.calculateMilestonePosition(t,r);const o=e.name.length>6?"flex-end":"center";return{[s?"right":"left"]:i,alignItems:o,position:"absolute",transform:s?"translateX(50%)":"translateX(-50%)"}}getMilestoneIconStyles(e,t,r){if(t){return{color:e.text_color}}if(r){return{color:"var(--color-primary)"}}return{}}renderProgressBarBackground(e){return[t("div",{class:"s-tiered-offer-progress-bg"}),t("div",{class:"s-tiered-offer-progress-fill",style:{width:`${e}%`}})]}renderMilestoneIcon(e,r,s){const i=["s-tiered-offer-milestone-icon",r?"s-tiered-offer-milestone-active":"",s?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return t("div",{class:i,style:this.getMilestoneIconStyles(e,r,s)},t("span",{innerHTML:e.icon}))}renderMilestoneName(e,r){return t("div",{class:"s-tiered-offer-milestone-name"},r&&t("span",{style:{color:e.text_color}},e.name))}renderMilestones(e,r){const s=r===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return t("div",{class:"s-tiered-offer-milestones-wrapper"},t("div",{class:s},this.tieredOfferData.tiers.map(((s,i)=>{const o=e>=s.threshold;const n=s.tier_name===this.currentTier;return t("div",{class:"s-tiered-offer-milestone",style:this.getMilestoneStyles(s,i,r)},this.renderMilestoneIcon(s,n,o),this.renderMilestoneName(s,n))}))))}renderProgressBar(){var e;const r=this.getProgressWidth();const s=this.tieredOfferData.tiers.length;const i=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;return t("div",{class:"s-tiered-offer-progress-container"},t("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(r),this.renderMilestones(i,s)))}renderTabs(){return t("div",{class:"s-tiered-offer-tabs-container"},t("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((e=>{const r=e.tier_name===this.activeTabTier;return t("button",{class:`s-tiered-offer-tab-header ${r?"s-tiered-offer-tab-active":""}`,onClick:()=>this.handleTabClick(e.tier_name)},t("span",null,e.name))}))),t("div",{class:"s-tiered-offer-tab-content-wrapper"},(()=>{const e=d.findTierByName(this.tieredOfferData.tiers,this.activeTabTier);if(!e)return null;return t("div",{class:"s-tiered-offer-tab-content"},t("div",{class:"s-tiered-offer-tab-content-inner"},t("div",{class:"s-tiered-offer-discount-section"},t("p",{class:"s-tiered-offer-discount-title"},this.discountText," ",t("span",{innerHTML:e.discount})),t("p",{class:"s-tiered-offer-benefit-description"},this.benefitText," ",e.name))))})()))}render(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}const e=this.getCurrentTierData();return t(r,null,t("div",{class:"s-tiered-offer-container"},t("div",{class:"s-tiered-offer-header"},t("div",{class:"s-tiered-offer-header-content"},t("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),t("div",{class:"s-tiered-offer-current-tier-name-wrapper"},t("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",t("span",{class:"s-tiered-offer-tier-name"},e.name)),t("span",{innerHTML:e.icon})))),this.renderProgressBar(),this.renderTabs()))}};c.style=f;export{c as salla_tiered_offer};
|
|
5
|
+
//# sourceMappingURL=p-419eb9a7.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-CbJXYJ5O.system.js"],(function(i){"use strict";var n,t,e;return{setters:[function(i){n=i.r;t=i.h;e=i.H}],execute:function(){var o;(function(i){i["PERCENTAGE"]="percentage";i["FIXED"]="fixed";i["FREE_PRODUCT"]="free_product"})(o||(o={}));var r;(function(i){i["PRODUCT_COUNT"]="products_count";i["PRODUCT_PURCHASE"]="order_amount"})(r||(r={}));var a=":host{display:block}";var l=i("salla_conditional_offer",function(){function i(i){n(this,i);this.offer=null;this.products={};this.isLoading=false;this.canRender=true}i.prototype.componentWillLoad=function(){var i=this;salla.onReady().then((function(){var i,n,t;if(!((i=salla.config.get("store.features"))===null||i===void 0?void 0:i.includes("conditional-offer"))||salla.storage.get("cart")!==""&&!((t=(n=salla.storage.get("cart"))===null||n===void 0?void 0:n.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(n){var t=n.data;i.offer=t.find((function(i){return i.type==="conditional"}));if(!i.offer){i.canRender=false;return}i.isLoading=true;i.offer.details.discounts.unshift({value:0,min_spend:0});return i.updateInitialOfferValue()})).then((function(){if(!i.offer)return;return i.getProducts()})).then((function(){if(!i.offer)return;salla.event.on("cart::updated",(function(n){return i.updateOfferValues(n)}))})).catch((function(n){i.canRender=false;salla.logger.warn("salla-conditional-offer:: ",n)})).finally((function(){i.isLoading=false}))};i.prototype.getProducts=function(){var i=this;var n=this.offer.details.discounts.filter((function(i){var n=i.type;return n===o.FREE_PRODUCT})).map((function(i){var n=i.value;return n}));if(n.length>0){return salla.product.fetch({source:"selected",source_value:n}).then((function(n){var t=n.data;t.forEach((function(n){var t=n.id,e=n.url,o=n.image;i.products[t]={url:e,image:o}}))}))}};i.prototype.updateInitialOfferValue=function(){var i=this;return salla.api.cart.details().then((function(n){var t=n.data.cart;return i.updateOfferValues(t)}))};i.prototype.updateOfferValues=function(i){var n=i.items,t=i.sub_total;var e,o;var a=this.offer.details.based_on===r.PRODUCT_COUNT?(e=n===null||n===void 0?void 0:n.reduce((function(i,n){var t=n.quantity;return i+t}),0))!==null&&e!==void 0?e:0:t;this.offer=Object.assign(Object.assign({},this.offer),{details:Object.assign(Object.assign({},(o=this.offer)===null||o===void 0?void 0:o.details),{current_value:a})});return this.offer};i.prototype.getCheckpointContent=function(i){var n,e;if(i.type===o.PERCENTAGE)return"".concat(i.value,"%");if(i.type===o.FIXED)return salla.money(i.value);if(i.type!==o.FREE_PRODUCT){salla.logger.error("salla-conditional-offer:: unexpected type (".concat(i.type,")!"));return""}var r=this.products[i.value];if(!r){salla.logger.error("salla-conditional-offer:: there is no product with id (".concat(i.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:((n=r===null||r===void 0?void 0:r.image)===null||n===void 0?void 0:n.alt)||"",src:(e=r===null||r===void 0?void 0:r.image)===null||e===void 0?void 0:e.url}))};i.prototype.getOfferType=function(i){var n;var t=(n=this.offer.details)===null||n===void 0?void 0:n.based_on;if(t===r.PRODUCT_COUNT)return salla.lang.choice("blocks.header.products_count",i.min_spend);if(t===r.PRODUCT_PURCHASE)return salla.money(i.min_spend);salla.logger.warn("salla-conditional-offer:: Unexpected offer detail's based_on value: ".concat(t));return"".concat(i.min_spend)};i.prototype.clamp=function(i,n,t){return Math.max(n,Math.min(i,t))};i.prototype.mapValueRanges=function(i,n,t,e,o){var r=(i-n)*(o-e)/(t-n)+e;if(r===Number.POSITIVE_INFINITY)return 100;if(r===Number.NEGATIVE_INFINITY)return 0;return this.clamp(r,0,100)};i.prototype.getCheckPointView=function(i,n){var e,o;var r=this.offer.details.discounts.findIndex((function(n){var t=n.min_spend;return t===i.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 l=this.mapValueRanges(this.offer.details.current_value,a,i.min_spend,0,100);var s=i.min_spend<=this.offer.details.current_value;return t("div",{class:"s-conditional-offer-checkpoint-container"},n>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(l,"%")}})),t("div",{key:"checkpoint",class:"s-conditional-offer-checkpoint ".concat(s?"s-conditional-offer-active-checkpoint":"")},t("div",{class:"s-conditional-offer-item-avatar-content ".concat(s?"active":""),innerHTML:this.products&&this.getCheckpointContent(i)}),t("div",{class:"s-conditional-offer-checkpoint-label ".concat(s?"active":""),innerHTML:this.getOfferType(i)}))]:t("div",{key:"label",class:{"s-conditional-offer-checkpoint-label":true,"first-checkpoint":n===0,active:s},innerHTML:this.getOfferType(i)}))};i.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"}))]})))))};i.prototype.render=function(){var i=this;if(!this.canRender)return null;if(this.isLoading)return this.getLoadingSkeletonView();if(!this.offer)return null;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(n,e){return t("div",{class:{"flex-1":e>0},key:n.min_spend},i.getCheckPointView(n,e))}))))};return i}());l.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-41a7a590.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 a,H as s,g as l}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as a,H as s,g as l}from"./p-Cmh2bDlu.js";const i=":host{display:block}";const e=class{constructor(a){t(this,a);this.alertDelay=null;this.data=salla.config.get("store.app_install_prompt");this.open=false;this.closing=false}connectedCallback(){salla.onReady((()=>{this.data=salla.config.get("store.app_install_prompt");if(!this.isMobileOrTabletDevice())return;if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app");this.alertDelay=setTimeout((()=>this.open=true),3e3)}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(t=1024){const a=window.innerWidth<=t;const s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);const l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&a&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",true);this.closing=true;this.host.addEventListener("animationend",(()=>{this.closing=false;this.open=false}),{once:true})}render(){return this.data?a(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},a("div",null,a("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),a("div",{class:"s-app-install-alert-content"},a("h2",{class:"s-app-install-alert-title"},this.data.title),a("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",a("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),a("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},a("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};e.style=i;export{e as salla_app_install_alert};
|
|
5
|
+
//# sourceMappingURL=p-44206730.entry.js.map
|