@salla.sa/twilight-components 2.14.255 → 2.14.256
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-CRbtFdLh.js → app-globals-DecFm_m-.js} +3 -3
- package/dist/cjs/{app-globals-CRbtFdLh.js.map → app-globals-DecFm_m-.js.map} +1 -1
- package/dist/cjs/{index-CiB3mE81.js → index-UNWHm5vs.js} +4 -4
- package/dist/cjs/index-UNWHm5vs.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-CXaqPW0W.js → app-globals-BWI-Bb8y.js} +3 -3
- package/dist/esm/{app-globals-CXaqPW0W.js.map → app-globals-BWI-Bb8y.js.map} +1 -1
- package/dist/esm/{index-Cmh2bDlu.js → index-wQf8KFfR.js} +4 -4
- package/dist/esm/index-wQf8KFfR.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-CXaqPW0W.js → app-globals-BWI-Bb8y.js} +2 -2
- package/dist/esm-es5/{app-globals-CXaqPW0W.js.map → app-globals-BWI-Bb8y.js.map} +1 -1
- package/dist/esm-es5/{index-Cmh2bDlu.js → index-wQf8KFfR.js} +3 -3
- package/dist/esm-es5/index-wQf8KFfR.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 +4 -4
- 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-6c2ffbdb.entry.js → p-043b451e.entry.js} +2 -2
- package/dist/twilight/{p-302eb45d.system.entry.js → p-075582a1.system.entry.js} +2 -2
- package/dist/twilight/{p-cdadd220.entry.js → p-094e1bfb.entry.js} +2 -2
- package/dist/twilight/{p-ad83b353.system.entry.js → p-0e9ab63f.system.entry.js} +2 -2
- package/dist/twilight/{p-470e16b4.entry.js → p-14bc7704.entry.js} +2 -2
- package/dist/twilight/{p-fb5d9736.system.entry.js → p-187f0de5.system.entry.js} +2 -2
- package/dist/twilight/{p-471d0c2a.entry.js → p-18a1f403.entry.js} +2 -2
- package/dist/twilight/{p-6bd9b65d.system.entry.js → p-1a4075f6.system.entry.js} +2 -2
- package/dist/twilight/{p-7cdfb2ff.system.entry.js → p-1d2dc3d6.system.entry.js} +2 -2
- package/dist/twilight/{p-BVYqexVV.system.js.map → p-1viHRpqo.system.js.map} +1 -1
- package/dist/twilight/{p-dade84c6.entry.js → p-24683c1b.entry.js} +2 -2
- package/dist/twilight/{p-bef4449d.system.entry.js → p-29137c7f.system.entry.js} +2 -2
- package/dist/twilight/{p-7d060cdd.entry.js → p-2d9b7946.entry.js} +2 -2
- package/dist/twilight/{p-68cbea08.system.entry.js → p-2df289d8.system.entry.js} +2 -2
- package/dist/twilight/{p-6bd4f5dd.entry.js → p-2e4b02b7.entry.js} +2 -2
- package/dist/twilight/{p-b1266dbc.entry.js → p-30a71342.entry.js} +2 -2
- package/dist/twilight/{p-c9736f8b.entry.js → p-3416d165.entry.js} +2 -2
- package/dist/twilight/{p-c93aca68.system.entry.js → p-3ba77caf.system.entry.js} +2 -2
- package/dist/twilight/{p-84b61e25.entry.js → p-3dea4ce1.entry.js} +2 -2
- package/dist/twilight/{p-13a215f8.system.entry.js → p-44736c1f.system.entry.js} +2 -2
- package/dist/twilight/{p-53fdce47.system.entry.js → p-47f2f18e.system.entry.js} +2 -2
- package/dist/twilight/{p-bd97e5ea.system.entry.js → p-48df560c.system.entry.js} +2 -2
- package/dist/twilight/{p-41a7a590.system.entry.js → p-48f5142e.system.entry.js} +2 -2
- package/dist/twilight/{p-7f0e3435.entry.js → p-50f4a9e2.entry.js} +2 -2
- package/dist/twilight/{p-c4741c01.system.entry.js → p-52acbaea.system.entry.js} +2 -2
- package/dist/twilight/{p-889ec51e.system.entry.js → p-54080ee2.system.entry.js} +2 -2
- package/dist/twilight/{p-6868caa4.system.entry.js → p-57fa02ea.system.entry.js} +2 -2
- package/dist/twilight/{p-e53e006e.entry.js → p-5adde2a6.entry.js} +2 -2
- package/dist/twilight/{p-51915628.entry.js → p-5ed5d8f9.entry.js} +2 -2
- package/dist/twilight/{p-231440bc.system.entry.js → p-63435ed9.system.entry.js} +2 -2
- package/dist/twilight/{p-8e14e730.entry.js → p-69492d2a.entry.js} +2 -2
- package/dist/twilight/{p-468a7324.entry.js → p-6dc24b2b.entry.js} +2 -2
- package/dist/twilight/{p-7e3906fc.system.entry.js → p-73f3f2c3.system.entry.js} +2 -2
- package/dist/twilight/{p-6ef02abc.system.entry.js → p-78cfef2d.system.entry.js} +2 -2
- package/dist/twilight/{p-963ba76e.system.entry.js → p-7bd77519.system.entry.js} +2 -2
- package/dist/twilight/{p-d54d7cd7.system.entry.js → p-7c699521.system.entry.js} +2 -2
- package/dist/twilight/{p-fc7c940d.system.entry.js → p-8177fa38.system.entry.js} +2 -2
- package/dist/twilight/{p-56a2493e.entry.js → p-83c23d48.entry.js} +2 -2
- package/dist/twilight/{p-f0e1cc94.entry.js → p-853d41e8.entry.js} +2 -2
- package/dist/twilight/{p-02187d79.system.entry.js → p-89bf2f70.system.entry.js} +2 -2
- package/dist/twilight/{p-55a9da25.entry.js → p-96daa987.entry.js} +2 -2
- package/dist/twilight/{p-47f2e097.entry.js → p-9ba75295.entry.js} +2 -2
- package/dist/twilight/{p-DvzE4oQS.system.js.map → p-B2GM_QS5.system.js.map} +1 -1
- package/dist/twilight/{p-CbJXYJ5O.system.js → p-B3l0Kfzh.system.js} +3 -3
- package/dist/twilight/p-B3l0Kfzh.system.js.map +1 -0
- package/dist/twilight/{p-CYB_tFv0.system.js.map → p-B4Pb5WLq.system.js.map} +1 -1
- package/dist/twilight/{p-Ceb-eX-0.system.js.map → p-B60IU5Vs.system.js.map} +1 -1
- package/dist/twilight/{p-uNkJ2LZM.system.js.map → p-B7Sj5qYJ.system.js.map} +1 -1
- package/dist/twilight/{p-C3pcK7CB.js → p-B8IZTKFP.js} +2 -2
- package/dist/twilight/{p-C3pcK7CB.js.map → p-B8IZTKFP.js.map} +1 -1
- package/dist/twilight/{p-DJvU6sZZ.system.js.map → p-BDPbAe1K.system.js.map} +1 -1
- package/dist/twilight/{p-BpfPcg3W.system.js.map → p-BQLYc2vY.system.js.map} +1 -1
- package/dist/twilight/{p-aI0YGy91.system.js.map → p-Bf0KbqEp.system.js.map} +1 -1
- package/dist/twilight/{p-smRaSeBI.system.js.map → p-Bj9MrCiB.system.js.map} +1 -1
- package/dist/twilight/{p-CzmyZ_Nd.system.js → p-Bt6Eygwn.system.js} +2 -2
- package/dist/twilight/{p-CzmyZ_Nd.system.js.map → p-Bt6Eygwn.system.js.map} +1 -1
- package/dist/twilight/{p-BLd878to.system.js.map → p-BxJh7xdc.system.js.map} +1 -1
- package/dist/twilight/{p-Dk6V-4d2.system.js.map → p-C7iKwuQD.system.js.map} +1 -1
- package/dist/twilight/{p-CCrcmQ6i.system.js.map → p-C8F-L_m4.system.js.map} +1 -1
- package/dist/twilight/{p-BTHt_nZ5.system.js → p-CDwjlI7z.system.js} +2 -2
- package/dist/twilight/{p-BTHt_nZ5.system.js.map → p-CDwjlI7z.system.js.map} +1 -1
- package/dist/twilight/{p-BPogbRgc.system.js.map → p-CF3S17YT.system.js.map} +1 -1
- package/dist/twilight/{p-DsgPAMoP.system.js.map → p-CUf0HPrr.system.js.map} +1 -1
- package/dist/twilight/{p-DDgmoM0z.system.js.map → p-C_HvnS58.system.js.map} +1 -1
- package/dist/twilight/{p-By_R4wyt.system.js.map → p-Ca2Teikb.system.js.map} +1 -1
- package/dist/twilight/{p-CsF4wF5j.system.js.map → p-CgeNmDtS.system.js.map} +1 -1
- package/dist/twilight/{p-DoENPAoP.system.js.map → p-CghqBHSf.system.js.map} +1 -1
- package/dist/twilight/{p-KFQPthVf.system.js.map → p-CpKX8XYB.system.js.map} +1 -1
- package/dist/twilight/{p-D5AOZnju.system.js.map → p-D0J_AaUC.system.js.map} +1 -1
- package/dist/twilight/{p-D9CSx3Wz.system.js.map → p-D4G2wIz6.system.js.map} +1 -1
- package/dist/twilight/{p-DGWMlRvt.system.js.map → p-D4zrpBeO.system.js.map} +1 -1
- package/dist/twilight/{p-Ccypd_SM.system.js.map → p-DKjm4rCf.system.js.map} +1 -1
- package/dist/twilight/{p-C_ju2ao2.system.js.map → p-DMAlL0R0.system.js.map} +1 -1
- package/dist/twilight/{p-CKwOWJLk.system.js.map → p-DZSy6aSK.system.js.map} +1 -1
- package/dist/twilight/{p-BrKg9FB7.system.js.map → p-DjpII3ev.system.js.map} +1 -1
- package/dist/twilight/{p-DRcmoz10.system.js.map → p-DwFLdhIc.system.js.map} +1 -1
- package/dist/twilight/{p-DBkWclyq.system.js.map → p-Dx_ROnUt.system.js.map} +1 -1
- package/dist/twilight/{p-DDduzQA-.system.js.map → p-DyFLUz8M.system.js.map} +1 -1
- package/dist/twilight/{p-CXiTCFrN.system.js.map → p-DzXtTDb4.system.js.map} +1 -1
- package/dist/twilight/{p-BhewmKn2.system.js.map → p-R6dLd-aW.system.js.map} +1 -1
- package/dist/twilight/{p-b6c991e2.entry.js → p-a14111b9.entry.js} +2 -2
- package/dist/twilight/{p-02b2de19.system.entry.js → p-a3a9afb0.system.entry.js} +2 -2
- package/dist/twilight/{p-cfe9931b.system.entry.js → p-a8460414.system.entry.js} +2 -2
- package/dist/twilight/{p-e5ff9041.entry.js → p-a9996489.entry.js} +2 -2
- package/dist/twilight/{p-85b17c34.system.entry.js → p-af2294d6.system.entry.js} +2 -2
- package/dist/twilight/{p-419eb9a7.entry.js → p-afdaa346.entry.js} +2 -2
- package/dist/twilight/{p-2ac46fd5.system.entry.js → p-b3dc741c.system.entry.js} +2 -2
- package/dist/twilight/{p-9cf6cc9f.system.entry.js → p-bae72263.system.entry.js} +2 -2
- package/dist/twilight/{p-8277f14f.entry.js → p-bbf5e97b.entry.js} +2 -2
- package/dist/twilight/{p-459fff65.system.entry.js → p-bcd16c4e.system.entry.js} +2 -2
- package/dist/twilight/{p-67c93900.entry.js → p-be905670.entry.js} +2 -2
- package/dist/twilight/{p-4f3c5294.entry.js → p-cd5ce889.entry.js} +2 -2
- package/dist/twilight/{p-CaIXPRFW.system.js.map → p-d1T8kqjG.system.js.map} +1 -1
- package/dist/twilight/{p-9470463b.entry.js → p-d457dc38.entry.js} +2 -2
- package/dist/twilight/{p-e574830f.system.entry.js → p-d772798f.system.entry.js} +2 -2
- package/dist/twilight/{p-4710f397.entry.js → p-e34e1fb8.entry.js} +2 -2
- package/dist/twilight/{p-3099db22.system.entry.js → p-e95b04e6.system.entry.js} +2 -2
- package/dist/twilight/{p-44206730.entry.js → p-ea5a7966.entry.js} +2 -2
- package/dist/twilight/{p-78bf11f2.system.entry.js → p-ecbb77d9.system.entry.js} +2 -2
- package/dist/twilight/{p-93bc2972.system.entry.js → p-ed841a03.system.entry.js} +2 -2
- package/dist/twilight/{p-059379d0.entry.js → p-f3ec2b53.entry.js} +2 -2
- package/dist/twilight/{p-6fd8031a.entry.js → p-fc5efdeb.entry.js} +2 -2
- package/dist/twilight/{p-78715871.system.entry.js → p-fe17bbb4.system.entry.js} +3 -3
- package/dist/twilight/{p-72a5b284.entry.js → p-fef4ac95.entry.js} +2 -2
- package/dist/twilight/{p-2f228be7.entry.js → p-ff382951.entry.js} +2 -2
- package/dist/twilight/{p-4f1f3a1a.entry.js → p-ffbb9af5.entry.js} +2 -2
- package/dist/twilight/{p-Cmh2bDlu.js → p-wQf8KFfR.js} +3 -3
- package/dist/twilight/p-wQf8KFfR.js.map +1 -0
- package/dist/twilight/{p-C8tnyQ_B.system.js.map → p-ySzjfVuw.system.js.map} +1 -1
- package/dist/twilight/{p-EEU49bnm.system.js.map → p-ys-31B6G.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-CiB3mE81.js.map +0 -1
- package/dist/esm/index-Cmh2bDlu.js.map +0 -1
- package/dist/esm-es5/index-Cmh2bDlu.js.map +0 -1
- package/dist/twilight/p-CbJXYJ5O.system.js.map +0 -1
- package/dist/twilight/p-Cmh2bDlu.js.map +0 -1
- /package/dist/twilight/{p-6c2ffbdb.entry.js.map → p-043b451e.entry.js.map} +0 -0
- /package/dist/twilight/{p-302eb45d.system.entry.js.map → p-075582a1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-cdadd220.entry.js.map → p-094e1bfb.entry.js.map} +0 -0
- /package/dist/twilight/{p-ad83b353.system.entry.js.map → p-0e9ab63f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-470e16b4.entry.js.map → p-14bc7704.entry.js.map} +0 -0
- /package/dist/twilight/{p-fb5d9736.system.entry.js.map → p-187f0de5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-471d0c2a.entry.js.map → p-18a1f403.entry.js.map} +0 -0
- /package/dist/twilight/{p-6bd9b65d.system.entry.js.map → p-1a4075f6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7cdfb2ff.system.entry.js.map → p-1d2dc3d6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-dade84c6.entry.js.map → p-24683c1b.entry.js.map} +0 -0
- /package/dist/twilight/{p-bef4449d.system.entry.js.map → p-29137c7f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7d060cdd.entry.js.map → p-2d9b7946.entry.js.map} +0 -0
- /package/dist/twilight/{p-68cbea08.system.entry.js.map → p-2df289d8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6bd4f5dd.entry.js.map → p-2e4b02b7.entry.js.map} +0 -0
- /package/dist/twilight/{p-b1266dbc.entry.js.map → p-30a71342.entry.js.map} +0 -0
- /package/dist/twilight/{p-c9736f8b.entry.js.map → p-3416d165.entry.js.map} +0 -0
- /package/dist/twilight/{p-c93aca68.system.entry.js.map → p-3ba77caf.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-84b61e25.entry.js.map → p-3dea4ce1.entry.js.map} +0 -0
- /package/dist/twilight/{p-13a215f8.system.entry.js.map → p-44736c1f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-53fdce47.system.entry.js.map → p-47f2f18e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bd97e5ea.system.entry.js.map → p-48df560c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-41a7a590.system.entry.js.map → p-48f5142e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7f0e3435.entry.js.map → p-50f4a9e2.entry.js.map} +0 -0
- /package/dist/twilight/{p-c4741c01.system.entry.js.map → p-52acbaea.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-889ec51e.system.entry.js.map → p-54080ee2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6868caa4.system.entry.js.map → p-57fa02ea.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e53e006e.entry.js.map → p-5adde2a6.entry.js.map} +0 -0
- /package/dist/twilight/{p-51915628.entry.js.map → p-5ed5d8f9.entry.js.map} +0 -0
- /package/dist/twilight/{p-231440bc.system.entry.js.map → p-63435ed9.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8e14e730.entry.js.map → p-69492d2a.entry.js.map} +0 -0
- /package/dist/twilight/{p-468a7324.entry.js.map → p-6dc24b2b.entry.js.map} +0 -0
- /package/dist/twilight/{p-7e3906fc.system.entry.js.map → p-73f3f2c3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6ef02abc.system.entry.js.map → p-78cfef2d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-963ba76e.system.entry.js.map → p-7bd77519.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d54d7cd7.system.entry.js.map → p-7c699521.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fc7c940d.system.entry.js.map → p-8177fa38.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-56a2493e.entry.js.map → p-83c23d48.entry.js.map} +0 -0
- /package/dist/twilight/{p-f0e1cc94.entry.js.map → p-853d41e8.entry.js.map} +0 -0
- /package/dist/twilight/{p-02187d79.system.entry.js.map → p-89bf2f70.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-55a9da25.entry.js.map → p-96daa987.entry.js.map} +0 -0
- /package/dist/twilight/{p-47f2e097.entry.js.map → p-9ba75295.entry.js.map} +0 -0
- /package/dist/twilight/{p-b6c991e2.entry.js.map → p-a14111b9.entry.js.map} +0 -0
- /package/dist/twilight/{p-02b2de19.system.entry.js.map → p-a3a9afb0.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-cfe9931b.system.entry.js.map → p-a8460414.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e5ff9041.entry.js.map → p-a9996489.entry.js.map} +0 -0
- /package/dist/twilight/{p-85b17c34.system.entry.js.map → p-af2294d6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-419eb9a7.entry.js.map → p-afdaa346.entry.js.map} +0 -0
- /package/dist/twilight/{p-2ac46fd5.system.entry.js.map → p-b3dc741c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9cf6cc9f.system.entry.js.map → p-bae72263.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8277f14f.entry.js.map → p-bbf5e97b.entry.js.map} +0 -0
- /package/dist/twilight/{p-459fff65.system.entry.js.map → p-bcd16c4e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-67c93900.entry.js.map → p-be905670.entry.js.map} +0 -0
- /package/dist/twilight/{p-4f3c5294.entry.js.map → p-cd5ce889.entry.js.map} +0 -0
- /package/dist/twilight/{p-9470463b.entry.js.map → p-d457dc38.entry.js.map} +0 -0
- /package/dist/twilight/{p-e574830f.system.entry.js.map → p-d772798f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4710f397.entry.js.map → p-e34e1fb8.entry.js.map} +0 -0
- /package/dist/twilight/{p-3099db22.system.entry.js.map → p-e95b04e6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-44206730.entry.js.map → p-ea5a7966.entry.js.map} +0 -0
- /package/dist/twilight/{p-78bf11f2.system.entry.js.map → p-ecbb77d9.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-93bc2972.system.entry.js.map → p-ed841a03.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-059379d0.entry.js.map → p-f3ec2b53.entry.js.map} +0 -0
- /package/dist/twilight/{p-6fd8031a.entry.js.map → p-fc5efdeb.entry.js.map} +0 -0
- /package/dist/twilight/{p-78715871.system.entry.js.map → p-fe17bbb4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-72a5b284.entry.js.map → p-fef4ac95.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f228be7.entry.js.map → p-ff382951.entry.js.map} +0 -0
- /package/dist/twilight/{p-4f1f3a1a.entry.js.map → p-ffbb9af5.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,a){function s(r){try{o(i.next(r))}catch(r){a(r)}}function u(r){try{o(i["throw"](r))}catch(r){a(r)}}function o(r){r.done?e(r.value):n(r.value).then(s,u)}o((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(t){return o([r,t])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;n=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=t.call(r,e)}catch(r){u=[6,r];n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++){if(a||!(i in t)){if(!a)a=Array.prototype.slice.call(t,0,i);a[i]=t[i]}}return r.concat(a||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-CbJXYJ5O.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var C=M();var S=n(C);var j=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=S((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=z(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function z(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var O=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new j(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"f3b06307322a56ad320374a50e13161be4e7cc8a"},s("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},s("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},s("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());O.style=L}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B3l0Kfzh.system.js","./p-B8FGqfEh.system.js","./p-CzwwMHuN.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var S=M();var j=n(S);var z=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=C(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function C(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var q=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new z(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"f3b06307322a56ad320374a50e13161be4e7cc8a"},s("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},s("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},s("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());q.style=L}}}));
|
|
5
|
+
//# sourceMappingURL=p-2df289d8.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as s,h as e,H as i,g as l}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,c as s,h as e,H as i,g as l}from"./p-wQf8KFfR.js";import{F as a}from"./p-DL4h2bc3.js";import{H as r}from"./p-CGaH6V1S.js";import"./p-CgtvEd63.js";const o=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";const n=class{constructor(e){t(this,e);this.changed=s(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(()=>this.host.style.display="none"));salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply");this.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let s={};this.filters=t.map((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=a.VALUES;let{max:s,min:e}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=e||t<=s))}if(this.filtersData.variants&&t.type==a.VARIANTS){s.variants=this.filtersData.variants}if(this.filtersData[t.key]&&t.type!==a.VARIANTS){s[t.key]=this.filtersData[t.key]}let e=new URLSearchParams(window.location.search);let i=false;for(let t of e.keys()){if(t.includes("filters")){i=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(s).length==0&&!i){let t=window.location.href;let e=salla.config.get("page.id");let i=t.indexOf("?")!==-1?"&":"?";let l=t+i+"filters[category_id]="+e;s.category_id=e;window.history.pushState({path:l},"",l)}return t}));this.filtersData=s;this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady){return}let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{var s;if(t){let t=new URL(window.location.href);for(const[s]of t.searchParams.entries()){if(s.startsWith("filters")){t.searchParams.delete(s)}}let s=this.encodeFilters(this.filtersData);let e=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");if(e){t.search=t.search.split("&filters")[0]+"&"+s}else{t.search=`?${s}`}window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);(s=t.searchParams)===null||s===void 0?void 0:s.delete("filters");window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData);this.changed.emit(this.filtersData)}),300)}encodeFilters(t,s="filters"){const e=[];for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){const l=t[i];const a=s?`${s}[${i}]`:i;if(Array.isArray(l)){for(let t=0;t<l.length;t++){e.push(`${a}[${t}]=${l[t]}`)}}else if(typeof l==="object"&&l!==null){e.push(this.encodeFilters(l,a))}else{let t=`${a}=${l}`;e.push(t)}}}return e.join("&")}async resetFilters(){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((t=>t.reset&&t.reset()));salla.event.emit("salla-filters::reset");return this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search);const s=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((s=>`${encodeURIComponent(s)}=${encodeURIComponent(t.get(s))}`)).join("&");const e=s?`${window.location.pathname}?${s}`:window.location.pathname;window.history.pushState({},"",e)}handleOptionChange(t,s,e){if(s.type===a.RANGE){this.filtersData[s.key]=e}let i=t.target.checked;if(s.type===a.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[s.key]=e);i||delete this.filtersData.variants[s.key]}else if(t.target.type=="radio"){i&&(this.filtersData[s.key]=e);i||delete this.filtersData[s.key]}else if(t.target.type=="checkbox"){this.filtersData[s.key]=this.filtersData[s.key]||[];if(i){this.filtersData[s.key].push(e)}this.filtersData[s.key]=this.filtersData[s.key].filter((t=>t!=e))}this.applyFilters()}render(){var t,s;return e(i,{key:"54a625522588215230f1eb5a3ca94b8280b18040"},(t=this.filters)===null||t===void 0?void 0:t.map((t=>e("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:s,value:e}})=>{this.handleOptionChange(t,s,e)}}))),((s=this.filters)===null||s===void 0?void 0:s.length)?e("div",{class:"s-filters-footer"},e("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=true}get host(){return l(this)}};n.style=o;export{n as salla_filters};
|
|
5
|
+
//# sourceMappingURL=p-2e4b02b7.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,c as t,h as s,H as i,g as a}from"./p-Cmh2bDlu.js";var n=`\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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const r=":host{display:block}";const c=class{constructor(s){e(this,s);this.invalidInput=t(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((()=>this.setTranslations()));Salla.event.on("booking::open",(e=>this.handleBookingOpen(e)))}async setTranslations(){const e=(e,t,s)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[e],t,s);i(true)}));await e("ar.trans","pages.cart.book_an_appointment","حجز موعد");await e("en.trans","pages.cart.book_an_appointment","Book an Appointment");await e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد");await e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment");await e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");await e("en.trans","pages.cart.booked_successfully","Booked Successfully");await e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد");await e("en.trans","pages.cart.select_appointment_date","Select appointment date");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date")}openBookingModal(e,t=false){if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((e=>{if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:this.productId})})).catch((e=>{salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))}handleBookingOpen(e){if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((()=>{this.modal.setTitle(this.selectDate);this.modal.open()}),100)}setAfterReloadEvent(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})}emitAfterReloadEvent(){const e=salla.storage.get("afterReloadEvent");if(e&&e.event){const t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}}componentWillLoad(){if(this.option&&this.option.details.length){this.reservations=this.option.details}}componentDidLoad(){window.addEventListener("booking::open-after-reload",(e=>this.openBookingModal(e,true)));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(e=>this.invalidInput.emit(e)));this.reservationsInput.addEventListener("input",(()=>{this.reservationsInput.setCustomValidity("");this.reservationsInput.reportValidity()}))}handleMessageEvent(e){var t,s;if(e.data.source!=="booking")return;const i=e.data.type;const a=e.data.message;if(localStorage.getItem("debug"))console.log(`Received an action:${i}`,e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}const e=Object.values(a.fields||[a.message]).flat().map((e=>`<li>${e}</li>`)).join("");salla.notify.error(`<ul>${e}</ul>`)}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((e=>{if(e.time&&e.time.length>0){const t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((e=>e!==null));salla.notify.success(this.bookedLabel);(s=this.modal)===null||s===void 0?void 0:s.close();setTimeout((()=>window.location.reload()))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}}bookingModal(){return s("salla-modal",{class:"s-booking-field-modal",ref:e=>this.modal=e,width:"md",position:"middle",noPadding:true},s("iframe",{ref:e=>this.iframe=e,src:this.bookingUrl,frameborder:"0"}))}renderReservationDate(e){return s("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},s("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)}renderReservationTime(e){if(!e.from_timestamp)return"";return s("span",{class:"s-booking-field-reservations-time"},s("i",{class:"s-booking-field-reservations-icon",innerHTML:l}),s("span",null,e.from_timestamp," - ",e.to_timestamp))}render(){return s(i,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},s("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?s("div",{class:"s-booking-field-price"},s("span",{innerHTML:salla.money(this.option.price)})):"",s("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:e=>this.openBookingModal(e,false)},s("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},s("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:n}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&s("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map(((e,t)=>s("div",{key:t,class:"s-booking-field-reservations-item"},this.renderReservationDate(e),this.renderReservationTime(e))))),s("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:e=>this.reservationsInput=e}),this.iframeReady&&this.bookingModal())}get host(){return a(this)}};c.style=r;const d=class{constructor(t){e(this,t)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var t;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.tagName)||"N/A"));return}let s=e.target.name.replace("[]","");let i=e.target.getAttribute("type")==="checkbox";let a=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",`[data-show-when^="${s}"]`);this.host.querySelectorAll(`[data-show-when^="${s}"]`).forEach((t=>{let s=!(t===null||t===void 0?void 0:t.dataset.showWhen.includes("!="));let n=t===null||t===void 0?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(i){let t=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=t.includes(n.toString())}else if(a){o=e.target.checked&&e.target.value===n}else{o=n===e.target.value}salla.log("The input is ",i?"Multiple":a?"Radio":"Single"," value:",o);let l=s&&o||!s&&!o;if(l){t.classList.remove("hidden");t.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const t=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const s=t.some((e=>e.checked));if(s){t.forEach((e=>{e.removeAttribute("required")}))}}}))}else{this.hideAllOptions(t.dataset.optionId);t.classList.add("hidden");this.disableInputs(t)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var t;let s=(t=e===null||e===void 0?void 0:e.dataset)===null||t===void 0?void 0:t.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!s){return}this.changeHandler({target:this.host.querySelector('[name^="'+s+'"]')})}))}render(){return s(i,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},s("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))}get host(){return a(this)}};export{c as salla_booking_field,d as salla_conditional_fields};
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as e,c as t,h as s,H as i,g as a}from"./p-wQf8KFfR.js";var n=`\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>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.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>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></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>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const r=":host{display:block}";const c=class{constructor(s){e(this,s);this.invalidInput=t(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((()=>this.setTranslations()));Salla.event.on("booking::open",(e=>this.handleBookingOpen(e)))}async setTranslations(){const e=(e,t,s)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[e],t,s);i(true)}));await e("ar.trans","pages.cart.book_an_appointment","حجز موعد");await e("en.trans","pages.cart.book_an_appointment","Book an Appointment");await e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد");await e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment");await e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");await e("en.trans","pages.cart.booked_successfully","Booked Successfully");await e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد");await e("en.trans","pages.cart.select_appointment_date","Select appointment date");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date")}openBookingModal(e,t=false){if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((e=>{if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:this.productId})})).catch((e=>{salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))}handleBookingOpen(e){if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((()=>{this.modal.setTitle(this.selectDate);this.modal.open()}),100)}setAfterReloadEvent(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})}emitAfterReloadEvent(){const e=salla.storage.get("afterReloadEvent");if(e&&e.event){const t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}}componentWillLoad(){if(this.option&&this.option.details.length){this.reservations=this.option.details}}componentDidLoad(){window.addEventListener("booking::open-after-reload",(e=>this.openBookingModal(e,true)));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(e=>this.invalidInput.emit(e)));this.reservationsInput.addEventListener("input",(()=>{this.reservationsInput.setCustomValidity("");this.reservationsInput.reportValidity()}))}handleMessageEvent(e){var t,s;if(e.data.source!=="booking")return;const i=e.data.type;const a=e.data.message;if(localStorage.getItem("debug"))console.log(`Received an action:${i}`,e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}const e=Object.values(a.fields||[a.message]).flat().map((e=>`<li>${e}</li>`)).join("");salla.notify.error(`<ul>${e}</ul>`)}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((e=>{if(e.time&&e.time.length>0){const t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((e=>e!==null));salla.notify.success(this.bookedLabel);(s=this.modal)===null||s===void 0?void 0:s.close();setTimeout((()=>window.location.reload()))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}}bookingModal(){return s("salla-modal",{class:"s-booking-field-modal",ref:e=>this.modal=e,width:"md",position:"middle",noPadding:true},s("iframe",{ref:e=>this.iframe=e,src:this.bookingUrl,frameborder:"0"}))}renderReservationDate(e){return s("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},s("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)}renderReservationTime(e){if(!e.from_timestamp)return"";return s("span",{class:"s-booking-field-reservations-time"},s("i",{class:"s-booking-field-reservations-icon",innerHTML:l}),s("span",null,e.from_timestamp," - ",e.to_timestamp))}render(){return s(i,{key:"04c9e3dc3dc825bd6905221d858c260f7ca34748"},s("div",{key:"07ec38cec1bd1798640dd7ea9592bb3b17d945c6",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?s("div",{class:"s-booking-field-price"},s("span",{innerHTML:salla.money(this.option.price)})):"",s("salla-button",{key:"6b71889cfc0429d15c466a6f194df31549f09786",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:e=>this.openBookingModal(e,false)},s("span",{key:"a16f8db6f52c7751ea605efcae04057ca0dc5b61",class:"s-booking-field-book-now-content"},s("span",{key:"95f6086a599bcc620c87ece6c6ae9620dba15581",innerHTML:n}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&s("div",{key:"b3615100bbfff3d98d0ac99145aaf53449790c94",class:"s-booking-field-reservations"},this.reservations.map(((e,t)=>s("div",{key:t,class:"s-booking-field-reservations-item"},this.renderReservationDate(e),this.renderReservationTime(e))))),s("input",{key:"126f14f2e520b8696bc7450e209bad30b267878b",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:e=>this.reservationsInput=e}),this.iframeReady&&this.bookingModal())}get host(){return a(this)}};c.style=r;const d=class{constructor(t){e(this,t)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var t;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.tagName)||"N/A"));return}let s=e.target.name.replace("[]","");let i=e.target.getAttribute("type")==="checkbox";let a=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",`[data-show-when^="${s}"]`);this.host.querySelectorAll(`[data-show-when^="${s}"]`).forEach((t=>{let s=!(t===null||t===void 0?void 0:t.dataset.showWhen.includes("!="));let n=t===null||t===void 0?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(i){let t=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=t.includes(n.toString())}else if(a){o=e.target.checked&&e.target.value===n}else{o=n===e.target.value}salla.log("The input is ",i?"Multiple":a?"Radio":"Single"," value:",o);let l=s&&o||!s&&!o;if(l){t.classList.remove("hidden");t.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const t=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const s=t.some((e=>e.checked));if(s){t.forEach((e=>{e.removeAttribute("required")}))}}}))}else{this.hideAllOptions(t.dataset.optionId);t.classList.add("hidden");this.disableInputs(t)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var t;let s=(t=e===null||e===void 0?void 0:e.dataset)===null||t===void 0?void 0:t.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!s){return}this.changeHandler({target:this.host.querySelector('[name^="'+s+'"]')})}))}render(){return s(i,{key:"405156ba83b8731039c2dd0ff800f617150cc722"},s("slot",{key:"2bff17ce7b49fef9b028d673992d256b00e9481b"}))}get host(){return a(this)}};export{c as salla_booking_field,d as salla_conditional_fields};
|
|
5
|
+
//# sourceMappingURL=p-30a71342.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,g as o}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as e,g as o}from"./p-wQf8KFfR.js";const i='.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%)}';const s=class{constructor(e){t(this,e);this.show=false;this.targetElement=null}handleMouseOver(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}}handleMouseOut(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){return e("div",{key:"e2454dd8d3533e19b93b796ca427d825c6576ff0",class:"s-tooltip-container"},e("slot",{key:"08ae103831491e760b47c848c161f909341c68ee"}),this.show&&e("div",{key:"bab2b3214ff45377b5d971f13f32c691ec090324",class:"s-tooltip-item"},this.text))}get el(){return o(this)}};s.style=i;export{s as salla_tooltip};
|
|
5
|
+
//# sourceMappingURL=p-3416d165.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,a,e,n){function r(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function s(t){try{o(n.next(t))}catch(t){i(t)}}function u(t){try{o(n["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):r(t.value).then(s,u)}o((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(a){return o([t,a])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=a.call(t,e)}catch(t){u=[6,t];r=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B3l0Kfzh.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,salla.logger.error("feature custom-fields is not activated")]}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
|
|
5
|
+
//# sourceMappingURL=p-3ba77caf.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as t,H as l}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as a,h as t,H as l}from"./p-wQf8KFfR.js";const e=".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}";const s=class{constructor(t){a(this,t);this.isLoading=false;this.nextPageUrl="";this.handleClick=()=>{this.loadMoreTransactions()}}componentWillLoad(){return salla.onReady().then((()=>this.loadTransactions()))}async loadTransactions(){this.isLoading=true;try{let a=`/balance/wallet?per_page=10&page=1`;let t=await salla.api.request(a);this.nextPageUrl=t.data.transactions.next_page_url;this.transactionsArray=t.data.transactions;this.balance=t.data.balance}catch(a){console.error("Error loading wallet transactions",a)}finally{this.isLoading=false}}async loadMoreTransactions(){this.isLoading=true;try{let a=this.nextPageUrl||"/balance/wallet?page=2&per_page=10";let t=await salla.api.request(a);this.nextPageUrl=t.data.transactions.next_page_url;this.transactionsArray.push(...t.data.transactions.data);this.balance=t.data.balance}catch(a){console.error("Error loading wallet transactions",a)}finally{this.isLoading=false}}render(){if(this.transactionsArray.length>0){return t(l,null,t("table",{class:"s-wallet-table"},t("tbody",{class:"s-wallet-table-tbody"},t("tr",{class:"s-table__tr"},t("td",null,t("div",{class:"s-wallet-table-balance-container"},t("i",{class:"s-wallet-table-balance-icon sicon-wallet"}),t("div",null,t("div",{innerHTML:salla.money(this.balance)}),t("div",{class:"font-normal text-gray-400"}," ",salla.lang.get("pages.wallet.balance")))))))),t("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),t("table",{class:"s-wallet-table"},t("thead",{class:"s-wallet-table-head"},t("tr",{class:"s-wallet-table-head-tr"},t("th",{scope:"col"},salla.lang.get("pages.wallet.transaction_number")),t("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.amount")),t("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.date")),t("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.order_no")),t("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),t("th",{scope:"col",class:"s-wallet-table-head-tr-th"},salla.lang.get("pages.wallet.transaction_type")," "))),t("tbody",{class:"s-wallet-table-tbody"},this.transactionsArray.map((a=>t("tr",{class:"s-wallet-table-tbody-tr s-wallet-table-tbody-tr-shadow animated"},t("td",{class:"s-wallet-table-tbody-tr-td"},t("div",{class:"s-wallet-table-tbody-tr-td-content"},t("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_number"),":"),a.id&&t("span",{class:"hidden md:inline-block"},"#",a.id),t("div",{class:"flex items-center md:hidden"},t("salla-button",{class:"relative",color:"dark",shape:"link","data-content":a.order_id},a.order_id&&t("span",null,"#",a.order_id))))),t("td",{id:"main123",class:"s-wallet-table-tbody-tr-td"},t("div",{id:"main124",class:"s-wallet-table-tbody-tr-td-content"},t("span",{id:"main125",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.amount"),":"),t("div",{innerHTML:salla.money(a.amount)}))),t("td",{class:"s-wallet-table-tbody-tr-td"},t("div",{class:"s-wallet-table-tbody-tr-td-content"},t("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.date"),":"),a.created_at&&new Date(a.created_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}))),t("td",{id:"main133",class:"s-wallet-table-tbody-tr-td"},t("div",{id:"main134",class:"s-wallet-table-tbody-tr-td-content"},t("span",{id:"main135",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.order_no"),":"),t("span",{class:"rtl:mr-auto ltr:ml-auto md:mx-0"},a.order_id&&t("span",null,"#",a.order_id)))),t("td",{id:"main143",class:"s-wallet-table-tbody-tr-td"},t("div",{id:"main144",class:"s-wallet-table-tbody-tr-td-content"},t("span",{id:"main145",class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.expiry_date"),":"),t("span",null,a.expired_at&&new Date(a.expired_at*1e3).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"})))),t("td",{class:"s-wallet-table-tbody-tr-td"},t("div",{class:"s-wallet-table-tbody-tr-td-content"},t("div",null,t("span",{class:"s-wallet-mobile-title"},salla.lang.get("pages.wallet.transaction_type"),":")),t("div",{class:{"s-wallet-table-transaction-status-default":true,"s-wallet-table-transaction-status-cashback":a.action_type==="cashback","s-wallet-table-transaction-status-refund":a.action_type==="refund","s-wallet-table-transaction-status-purchase":a.action_type==="purchase_by_wallet"}},!!a.description&&t("i",{id:a.id.toString(),class:"sicon-information text-lg rtl:ml-4 ltr:mr-4 s-wallet-table-transaction-status-icon-success"}),!!a.description&&t("salla-tooltip",{text:a.description,targetId:a.id.toString()}),t("span",null,a.title))))))))),t("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrl&&t("salla-button",{onClick:this.handleClick,loading:this.isLoading},salla.lang.get("common.elements.load_more"))))}else{return t(l,null,t("h2",{style:{"margin-top":"32px"}},salla.lang.get("pages.wallet.title")),t("div",{class:"s-wallet-table-empty-state"},t("i",{class:"sicon-full-wallet"}),t("div",{class:"text-center p-3 text-xl font-bold "},salla.lang.get("pages.wallet.no_transactions")),t("div",{class:"text-center text-gray-400 text-sm font-normal "},salla.lang.get("pages.wallet.zero_balance")," ")))}}};s.style=e;export{s as salla_wallet};
|
|
5
|
+
//# sourceMappingURL=p-3dea4ce1.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-B3l0Kfzh.system.js"],(function(t){"use strict";var s,a,i,e;return{setters:[function(t){s=t.r;a=t.h;i=t.H;e=t.g}],execute:function(){var l=":host{display:block}";var n=t("salla_payments",function(){function t(t){s(this,t);this.exclude=[]}t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){var s,a,i;if(typeof t.exclude==="string"){try{t.exclude=JSON.parse(t.exclude)}catch(s){salla.logger.error("salla-payments:: failed to parse the exclude props!",t.exclude);t.exclude=[]}}t.placeholderImage=salla.url.cdn("images/s-empty.png");t.paymentSlot=((s=t.host.querySelector('[slot="payment"]'))===null||s===void 0?void 0:s.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src="{image}" alt={payment} /><li>');t.sbcSlot=((a=t.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');t.codSlot=((i=t.host.querySelector('[slot="cod"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(t.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');t.payments=salla.config.get("store.settings.payments")}))};t.prototype.render=function(){var t=this;var s=!this.exclude.includes("made-in-ksa")&&salla.config.get("store.settings.made_in_ksa");var e=this.exclude.includes("sbc")?null:salla.config.get("store.settings.certificate.id");return a(i,{key:"a1a26ba03aa60491071f0e63bac40de3ad91bce6",class:"s-payments-list-wrap"},a("ul",{key:"d31ca162e83aade956f45d8f517029942a748646",class:"s-payments-list"},s&&a("li",{key:"552e3e57345d01ab33bfd20094cbcf8f702c6efa",class:"s-payments-list-item"},a("img",{key:"04eb9c9a1950edc9ea3c2e218fbe6c5c21d65f6a",class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg",58,58),alt:"made in KSA certified"})),this.payments.map((function(s){return s=="cod"?a("div",{id:"cod-slot",innerHTML:t.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png",58,58))}):a("div",{id:"payment-slot",innerHTML:t.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(s,"_mini.png"),58,58)).replace(/\{payment\}/g,s)})})),e&&a("div",{key:"5f69b3c936edf8039006d6ecd73e3c44b74b9167",id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png",58,58)).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(e))})))};t.prototype.componentDidLoad=function(){var t;(t=document.lazyLoadInstance)===null||t===void 0?void 0:t.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(t){t.addEventListener("load",(function(){t.setAttribute("width","100%");t.setAttribute("height","100%")}))}))};t.prototype.componentDidRender=function(){var t,s,a;this.host.querySelectorAll("#payment-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));(t=this.host.querySelector('[slot="payment"]'))===null||t===void 0?void 0:t.remove();(s=this.host.querySelector('[slot="sbc"]'))===null||s===void 0?void 0:s.remove();(a=this.host.querySelector('[slot="cod"]'))===null||a===void 0?void 0:a.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
|
|
5
|
+
//# sourceMappingURL=p-44736c1f.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-B3l0Kfzh.system.js","./p-CmE8W9Xg.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var n,s,e,c,i,a;return{setters:[function(t){n=t.r;s=t.h;e=t.H;c=t.g},function(t){i=t.w},function(t){a=t.M}],execute:function(){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>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 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>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 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>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';var h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";var u=t("salla_contacts",function(){function t(t){var s=this;n(this,t);var e;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:o,whatsapp:i,phone:l,telegram:r,email:a};this.contactSlot=((e=this.host.querySelector('[slot="contact"]'))===null||e===void 0?void 0:e.innerHTML)||'<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>'.concat(!this.iconsOnly&&"<span class='unicode'>{value}</span>","</a>");salla.onReady((function(){s.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((function(){s.contactsTitle=s.contactsTitle||salla.lang.get("blocks.footer.social")}))}t.prototype.getContactsArray=function(){return Object.entries(this.contacts).filter((function(t){var n=t[0],s=t[1];return s!==""})).map((function(t){var n=t[0],s=t[1];return{type:n,value:s}}))};t.prototype.getContactLink=function(t){var n=this.contacts[t];switch(t){case"phone":case"mobile":return"tel:".concat(n);case"whatsapp":return salla.url.get("whatsapp/send");case"email":return"mailto:".concat(n);case"telegram":return n.startsWith("https://t.me/")?n:"https://t.me/".concat(n);default:return n}};t.prototype.getContactIcon=function(t){return this.iconsList[t]};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var n=this.getContactsArray();if(!n||n.length==0){return}if(this.isHeader){return s(e,{class:"s-contacts s-contacts-header"},n.filter((function(t){return t.type=="phone"||t.type=="email"})).map((function(n,e){return s("a",{href:t.getContactLink(n.type),key:e,class:"s-contacts-topnav-link"},n.type==="email"?n.value:[s("span",null,t.contactsTitle,": "),s("a",{class:"unicode",href:t.iconsList[n.type]},n.value)])})))}return s(e,{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}},n.map((function(n,e){return s("div",{key:e,id:"contact-slot",innerHTML:t.contactSlot.replace(/\{icon\}/g,t.getContactIcon(n.type)).replace(/\{value\}/g,n.value.toString()).replace(/\{link\}/g,t.getContactLink(n.type))})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return c(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
|
|
5
|
+
//# sourceMappingURL=p-47f2f18e.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-B3l0Kfzh.system.js"],(function(t){"use strict";var e,i,s,a;return{setters:[function(t){e=t.r;i=t.c;s=t.h;a=t.H}],execute:function(){var c="salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";var f=t("salla_loyalty_prize_item",function(){function t(t){e(this,t);this.prizeItemSelected=i(this,"prizeItemSelected")}t.prototype.onPrizeItemClick=function(){this.prizeItemSelected.emit(this.item)};t.prototype.render=function(){return s(a,{key:"5ca09a4202a344b0483bdfec61051430c6804143"},s("div",{key:"685bab3cdebcc0ebb8899bf41af4864dc613835b",onClick:this.onPrizeItemClick.bind(this)},s("img",{key:"412d27faaf4fdb3df213806613ce0ce362f86f63",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),s("div",{key:"9de2b85059c3db4cf750303e549938a577995d92",class:"s-loyalty-prize-item-title"},this.item.name),s("div",{key:"9ecf6845d0edf53937476a8bebfc36372ab1b4d9",class:"s-loyalty-prize-item-subtitle"},this.item.description),s("div",{key:"0c5f1cd8d22bc90178063c06eaf32bbac9f167ff",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))};return t}());f.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-48df560c.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-B3l0Kfzh.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-48f5142e.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-wQf8KFfR.js";import{S as i,A as e}from"./p-yRO-ZESF.js";import{G as c}from"./p-C0JNGIpa.js";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>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 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>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 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>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 l=":host{display:block}";const n=class{constructor(t){s(this,t);this.internalOffers=[];this.showAll=false;this.freeLabel="";this.receivedOffer="";this.discountAmountLabel="";this.showMoreOffers="";this.icons={DiscountCouponIcon:o,GiftIcon:c,FireIcon:a,SpecialDiscountIcon:i,TagMoneyIcon:r};this.visibleOffersCount=3;this.handleCartItemUpdated=s=>{const t=s.data.cart.items.find((s=>s.id===this.itemId));if((t===null||t===void 0?void 0: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{if(typeof s!=="string"){console.warn("Offers is not a string. Returning as-is.",s);return Array.isArray(s)?s:[]}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 e=this.getPaidQty(s,i);return t("div",{class:"s-cart-item-offers-box"},i.free_quantity>0&&e>0&&t("div",{class:"s-cart-item-offers-paid-free"},t("div",{class:"s-cart-item-offers-line"},salla.helpers.number(e)," × ",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:e,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)))))}};n.style=l;export{n as salla_cart_item_offers};
|
|
5
|
+
//# sourceMappingURL=p-50f4a9e2.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-B3l0Kfzh.system.js"],(function(t){"use strict";var e,s,r,i;return{setters:[function(t){e=t.r;s=t.h;r=t.F;i=t.H}],execute:function(){var a="";var n=t("salla_order_details",function(){function t(t){e(this,t)}t.prototype.parseOrderDetailsData=function(t){this.parsedOrderDetailsData=t;if(typeof this.orderDetails==="string"){this.parsedOrderDetailsData=JSON.parse(t)}else{this.parsedOrderDetailsData=t}};t.prototype.componentWillLoad=function(){this.parseOrderDetailsData(this.orderDetails);console.log("Parent componentWillLoad - parsedOrderDetailsData:",this.parsedOrderDetailsData)};t.prototype.renderOrderDetailsContent=function(){if(!this.parsedOrderDetailsData){console.warn("No parsedOrderDetailsData available");return null}return[this.parsedOrderDetailsData.options&&this.parsedOrderDetailsData.options.length>0&&s("salla-order-details-options",{options:this.parsedOrderDetailsData.options}),this.parsedOrderDetailsData.sub_products&&this.parsedOrderDetailsData.sub_products.length>0&&s(r,null,s("h2",{class:"s-order-details-bundle-title"},salla.lang.get("pages.orders.sub_products")),s("div",{class:"s-order-details-bundle-content"},this.parsedOrderDetailsData.sub_products.map((function(t){return s("salla-order-details-multiple-bundle-product",{key:t===null||t===void 0?void 0:t.id,productDetails:t})}))))]};t.prototype.render=function(){return s(i,{key:"d76fce6a442aca11f3544a9f101ea4245a9317db",class:"s-order-details-wrapper"},this.renderOrderDetailsContent())};Object.defineProperty(t,"watchers",{get:function(){return{orderDetails:["parseOrderDetailsData"]}},enumerable:false,configurable:true});return t}());n.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-52acbaea.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,n,e){function r(t){return t instanceof n?t:new n((function(i){i(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{a(e.next(t))}catch(t){s(t)}}function u(t){try{a(e["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):r(t.value).then(o,u)}a((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(e=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1];s=u;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(u);break}if(s[2])n.ops.pop();n.trys.pop();continue}u=i.call(t,n)}catch(t){u=[6,t];r=0}finally{e=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-B3l0Kfzh.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var i,n,e,r,s,o;return{setters:[function(t){i=t.r;n=t.c;e=t.h;r=t.H;s=t.g},function(t){o=t.M}],execute:function(){var u='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var a="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var f=t("salla_verify",function(){function t(t){var e=this;i(this,t);this.verified=n(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;e.translationLoaded=true;e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(t=e.modal)===null||t===void 0?void 0:t.setTitle(e.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var i;var n=Array.isArray(t)?t[0]:t;e.isProfileVerify=true;e.open(n);e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+n.type);(i=e.modal)===null||i===void 0?void 0:i.setTitle(e.title)}));salla.event.on("modalClosed",(function(){e.resendAfter=0;e.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?e(r,null,this.myBody()):e("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},e("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?u:o}),this.myBody())};t.prototype.myBody=function(){var t=this;return e("div",{class:"s-verify-body",ref:function(i){return t.body=i}},e("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),e("slot",{name:"mobile"}),e("slot",{name:"email"}),e("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),e("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return e("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?e("span",{class:"s-verify-error-message"},this.errorMessage):"",e("div",{slot:"footer",class:"s-verify-footer"},e("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),e("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),e("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),e("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),e("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());f.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-54080ee2.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,s,e,n){function i(t){return t instanceof e?t:new e((function(s){s(t)}))}return new(e||(e=Promise))((function(e,r){function c(t){try{a(n.next(t))}catch(t){r(t)}}function o(t){try{a(n["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):i(t.value).then(c,o)}a((n=n.apply(t,s||[])).next())}))};var __generator=this&&this.__generator||function(t,s){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,c;return c={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function o(t){return function(s){return a([t,s])}}function a(o){if(n)throw new TypeError("Generator is already executing.");while(c&&(c=0,o[0]&&(e=0)),e)try{if(n=1,i&&(r=o[0]&2?i["return"]:o[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;if(i=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;i=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){e.label=o[1];break}if(o[0]===6&&e.label<r[1]){e.label=r[1];r=o;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(o);break}if(r[2])e.ops.pop();e.trys.pop();continue}o=s.call(t,e)}catch(t){o=[6,t];i=0}finally{n=r=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-B3l0Kfzh.system.js","./p-BAa1Mtv9.system.js","./p-Ik1kuM1-.system.js"],(function(t){"use strict";var s,e,n,i,r;return{setters:[function(t){s=t.r;e=t.h},function(t){n=t.S;i=t.A},function(t){r=t.G}],execute:function(){var c='\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 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>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 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>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';var l=":host{display:block}";var f=t("salla_cart_item_offers",function(){function t(t){var e=this;s(this,t);this.internalOffers=[];this.showAll=false;this.freeLabel="";this.receivedOffer="";this.discountAmountLabel="";this.showMoreOffers="";this.icons={DiscountCouponIcon:a,GiftIcon:r,FireIcon:o,SpecialDiscountIcon:n,TagMoneyIcon:c};this.visibleOffersCount=3;this.handleCartItemUpdated=function(t){var s=t.data.cart.items.find((function(t){return t.id===e.itemId}));if((s===null||s===void 0?void 0:s.id)===e.itemId){e.internalQuantity=s.quantity;e.internalOffers=s.detailed_offers||[];e.internalProductPrice=s.product_price}};this.toggleShowAll=function(){e.showAll=!e.showAll}}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(s){switch(s.label){case 0:return[4,Salla.onReady()];case 1:s.sent();return[4,salla.lang.onLoaded((function(){t.freeLabel=salla.lang.get("common.elements.freeExclam");t.receivedOffer=salla.lang.get("pages.cart.received_offer");t.discountAmountLabel=salla.lang.get("pages.cart.discount_amount");t.showMoreOffers=salla.lang.get("pages.cart.show_more_offers")}))];case 2:s.sent();this.internalQuantity=this.quantity;this.internalOffers=this.parseOffers(this.offers);this.internalProductPrice=this.productPrice;return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;salla.event.on("cart::item.updated",(function(s){return t.handleCartItemUpdated(s)}))};t.prototype.parseOffers=function(t){try{if(typeof t!=="string"){console.warn("Offers is not a string. Returning as-is.",t);return Array.isArray(t)?t:[]}return JSON.parse(t||"[]")}catch(t){console.error("Failed to parse offers",t);return[]}};Object.defineProperty(t.prototype,"visibleOffers",{get:function(){return this.internalOffers.slice(0,this.visibleOffersCount)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hiddenOffers",{get:function(){return this.internalOffers.slice(this.visibleOffersCount)},enumerable:false,configurable:true});t.prototype.getPaidQty=function(t,s){return t-s.free_quantity};t.prototype.renderOffer=function(t,s){var n=this.getPaidQty(t,s);return e("div",{class:"s-cart-item-offers-box"},s.free_quantity>0&&n>0&&e("div",{class:"s-cart-item-offers-paid-free"},e("div",{class:"s-cart-item-offers-line"},salla.helpers.number(n)," × ",e("span",{innerHTML:salla.money(this.internalProductPrice)})),e("div",{class:"s-cart-item-offers-line"},salla.helpers.number(s.free_quantity)," ×",e("span",{class:"s-cart-item-offers-regular-price",innerHTML:salla.money(this.internalProductPrice)}),e("span",{class:"s-cart-item-offers-free-label"},this.freeLabel))),e("div",{class:"s-cart-item-offers-details"},e("span",{class:"s-cart-item-offers-icon",innerHTML:this.icons[s.discount_icon]||""}),e("div",null,e("p",{class:"s-cart-item-offers-title"},this.receivedOffer.replace(":offer",s.offer_name)),e("p",{class:"s-cart-item-offers-discount"},e("span",{innerHTML:this.discountAmountLabel.replace(":amount",salla.money(s.discount_amount.toFixed(2)))})))))};t.prototype.render=function(){var t=this;var s,n;if(!((s=this.internalOffers)===null||s===void 0?void 0:s.length)){return null}return e("div",{class:"s-cart-item-offers-container",id:"offers_list_".concat(this.itemId)},this.visibleOffers.map((function(s){return t.renderOffer(t.internalQuantity,s)})),((n=this.internalOffers)===null||n===void 0?void 0:n.length)>this.visibleOffersCount&&e("div",{class:"s-cart-item-offers-show-more"},e("button",{class:"s-cart-item-offers-show-more-btn",onClick:this.toggleShowAll,type:"button"},e("span",{class:"s-cart-item-offers-show-more-label"},"+",this.hiddenOffers.length," ",this.showMoreOffers,e("span",{innerHTML:i,class:{"s-cart-item-offers-arrow-icon":true,"s-cart-item-offers-arrow-open":this.showAll}})))),this.showAll&&e("div",{class:"s-cart-item-offers-collapsed",id:"offers_".concat(this.itemId)},this.hiddenOffers.map((function(s){return t.renderOffer(t.internalQuantity,s)}))))};return t}());f.style=l}}}));
|
|
5
|
+
//# sourceMappingURL=p-57fa02ea.system.entry.js.map
|