@salla.sa/twilight-components 2.13.53 → 2.13.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Helper-134c96cd.js → Helper-11c2f7a7.js} +2 -2
- package/dist/cjs/Helper-11c2f7a7.js.map +1 -0
- package/dist/cjs/{app-globals-8f8d8f50.js → app-globals-db36c588.js} +5 -5
- package/dist/cjs/app-globals-db36c588.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button_47.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_47.cjs.entry.js.map +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-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +11 -5
- package/dist/cjs/salla-reviews.cjs.entry.js.map +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/collection/Helpers/Helper.js +1 -1
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/collection/components/salla-reviews/interfaces.js.map +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +97 -14
- package/dist/collection/components/salla-reviews/salla-reviews.js.map +1 -1
- package/dist/components/Helper.js +1 -1
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +4 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-quick-buy2.js.map +1 -1
- package/dist/components/salla-reviews.js +14 -5
- package/dist/components/salla-reviews.js.map +1 -1
- package/dist/esm/{Helper-6e1f8269.js → Helper-e84a53b2.js} +2 -2
- package/dist/esm/Helper-e84a53b2.js.map +1 -0
- package/dist/esm/{app-globals-c3c69e17.js → app-globals-29abf3e3.js} +5 -5
- package/dist/esm/app-globals-29abf3e3.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-add-product-button_47.entry.js +1 -1
- package/dist/esm/salla-add-product-button_47.entry.js.map +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-notifications.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +11 -5
- package/dist/esm/salla-reviews.entry.js.map +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm-es5/{Helper-6e1f8269.js → Helper-e84a53b2.js} +2 -2
- package/dist/esm-es5/Helper-e84a53b2.js.map +1 -0
- package/dist/esm-es5/{app-globals-c3c69e17.js → app-globals-29abf3e3.js} +3 -3
- package/dist/esm-es5/app-globals-29abf3e3.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/salla-add-product-button_47.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_47.entry.js.map +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-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- package/dist/esm-es5/salla-products-list.entry.js +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js.map +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/esm-es5/twilight.js.map +1 -1
- package/dist/twilight/p-06221496.js +25 -0
- package/dist/twilight/p-06221496.js.map +1 -0
- package/dist/twilight/{p-868c776b.system.entry.js → p-1079c870.system.entry.js} +2 -2
- package/dist/twilight/{p-e7d5c03c.entry.js → p-20a47e29.entry.js} +2 -2
- package/dist/twilight/p-2866def3.system.entry.js +5 -0
- package/dist/twilight/p-2866def3.system.entry.js.map +1 -0
- package/dist/twilight/{p-d08d5f11.entry.js → p-508a9dbf.entry.js} +2 -2
- package/dist/twilight/p-546db59b.entry.js +5 -0
- package/dist/twilight/p-546db59b.entry.js.map +1 -0
- package/dist/twilight/{p-b0585915.system.entry.js → p-5be05a17.system.entry.js} +2 -2
- package/dist/twilight/{p-b0585915.system.entry.js.map → p-5be05a17.system.entry.js.map} +1 -1
- package/dist/twilight/{p-f629ebf3.js → p-5de9ca19.js} +2 -2
- package/dist/twilight/p-5de9ca19.js.map +1 -0
- package/dist/twilight/{p-49a5b997.entry.js → p-60d513b0.entry.js} +2 -2
- package/dist/twilight/{p-38e9e758.system.entry.js → p-69539ba8.system.entry.js} +2 -2
- package/dist/twilight/{p-7d3b8a00.entry.js → p-708b7673.entry.js} +2 -2
- package/dist/twilight/p-a7b263b2.system.js +25 -0
- package/dist/twilight/p-a7b263b2.system.js.map +1 -0
- package/dist/twilight/{p-b0c8cac2.entry.js → p-a859e3fc.entry.js} +2 -2
- package/dist/twilight/{p-e3444194.system.js → p-af17aa74.system.js} +2 -2
- package/dist/twilight/p-af17aa74.system.js.map +1 -0
- package/dist/twilight/{p-429870cc.entry.js → p-bc7cb3df.entry.js} +2 -2
- package/dist/twilight/{p-429870cc.entry.js.map → p-bc7cb3df.entry.js.map} +1 -1
- package/dist/twilight/{p-3e19dd7e.system.entry.js → p-dcb268c2.system.entry.js} +2 -2
- package/dist/twilight/{p-5e7ea64b.system.entry.js → p-e56c026b.system.entry.js} +2 -2
- package/dist/twilight/{p-09f168ed.system.entry.js → p-eed0af43.system.entry.js} +2 -2
- package/dist/twilight/{p-e8c4822f.system.entry.js → p-f493ef81.system.entry.js} +2 -2
- package/dist/twilight/p-f51c9acb.system.js +5 -0
- package/dist/twilight/{p-64d97ea7.system.js.map → p-f51c9acb.system.js.map} +1 -1
- package/dist/twilight/{p-9d552606.entry.js → p-f5e0d239.entry.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.esm.js.map +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +1 -1
- package/dist/types/components/salla-reviews/interfaces.d.ts +4 -2
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +32 -6
- package/dist/types/components.d.ts +41 -9
- package/package.json +5 -5
- package/dist/cjs/Helper-134c96cd.js.map +0 -1
- package/dist/cjs/app-globals-8f8d8f50.js.map +0 -1
- package/dist/esm/Helper-6e1f8269.js.map +0 -1
- package/dist/esm/app-globals-c3c69e17.js.map +0 -1
- package/dist/esm-es5/Helper-6e1f8269.js.map +0 -1
- package/dist/esm-es5/app-globals-c3c69e17.js.map +0 -1
- package/dist/twilight/p-43badfba.js +0 -25
- package/dist/twilight/p-43badfba.js.map +0 -1
- package/dist/twilight/p-52f673f6.system.js +0 -25
- package/dist/twilight/p-52f673f6.system.js.map +0 -1
- package/dist/twilight/p-64d97ea7.system.js +0 -5
- package/dist/twilight/p-6b99863e.system.entry.js +0 -5
- package/dist/twilight/p-6b99863e.system.entry.js.map +0 -1
- package/dist/twilight/p-e3444194.system.js.map +0 -1
- package/dist/twilight/p-f209fb12.entry.js +0 -5
- package/dist/twilight/p-f209fb12.entry.js.map +0 -1
- package/dist/twilight/p-f629ebf3.js.map +0 -1
- /package/dist/twilight/{p-868c776b.system.entry.js.map → p-1079c870.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e7d5c03c.entry.js.map → p-20a47e29.entry.js.map} +0 -0
- /package/dist/twilight/{p-d08d5f11.entry.js.map → p-508a9dbf.entry.js.map} +0 -0
- /package/dist/twilight/{p-49a5b997.entry.js.map → p-60d513b0.entry.js.map} +0 -0
- /package/dist/twilight/{p-38e9e758.system.entry.js.map → p-69539ba8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7d3b8a00.entry.js.map → p-708b7673.entry.js.map} +0 -0
- /package/dist/twilight/{p-b0c8cac2.entry.js.map → p-a859e3fc.entry.js.map} +0 -0
- /package/dist/twilight/{p-3e19dd7e.system.entry.js.map → p-dcb268c2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5e7ea64b.system.entry.js.map → p-e56c026b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-09f168ed.system.entry.js.map → p-eed0af43.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e8c4822f.system.entry.js.map → p-f493ef81.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9d552606.entry.js.map → p-f5e0d239.entry.js.map} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
System.register(["./p-a0dabf35.system.js","./p-52f673f6.system.js","./p-9beb6b7b.system.js"],(function(e,t){"use strict";var a,o,l;return{setters:[function(t){a=t.p;o=t.b;e("setNonce",t.s)},function(e){l=e.g},function(){}],execute:function(){var e=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return a(o)};e().then((function(e){l();return o(JSON.parse('[["p-ce485f3d.system",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-3e19dd7e.system",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-3b8d4efd.system",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-868c776b.system",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-09f168ed.system",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-390d5cbb.system",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-6b99863e.system",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[520,"source-value"],"limit":[514],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-38e9e758.system",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-a2087d5b.system",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-a00e5e28.system",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-906810cd.system",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-2b0b9547.system",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-7ff9dda0.system",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32],"mispayActive":[32],"installment_sheria_text":[32]}]]],["p-7686e7fd.system",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-fa78ea46.system",[[0,"salla-metadata",{"entity":[1],"entityId":[2,"entity-id"],"specs":[32],"download":[32]}]]],["p-52560b3b.system",[[0,"salla-payments",{"withSbc":[4,"with-sbc"],"sbcId":[1,"sbc-id"],"withMadeInKsa":[4,"with-made-in-ksa"],"payments":[32],"placeholderImage":[32]}]]],["p-e8c4822f.system",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-399e120c.system",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-5e7ea64b.system",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-f3d5458e.system",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-c908bd58.system",[[0,"salla-notification-item",{"notification":[16]}]]],["p-b0585915.system",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32],"hasCustomComponent":[32],"setMenuContent":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"withoutReload":[4,"without-reload"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"isModalOpen":[32],"currentPhone":[32],"currentEmail":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"hasError":[32],"errorMessage":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"userData":[32],"userDefinedFields":[32],"disableAction":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-comment-item",{"comment":[16],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-caaedb09.system",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),e)}))}}}));
|
|
5
|
-
//# sourceMappingURL=p-64d97ea7.system.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
System.register(["./p-a0dabf35.system.js","./p-910b705d.system.js","./p-e3444194.system.js","./p-8f7b9e36.system.js"],(function(s){"use strict";var e,i,t,a;return{setters:[function(s){e=s.r;i=s.h},function(s){t=s.a},function(s){a=s.H},function(){}],execute:function(){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>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var n="";var r=s("salla_reviews",function(){function s(s){var i=this;e(this,s);this.displayAllURL=null;this.displayAllLink=undefined;this.source="store";this.sourceValue=undefined;this.limit=5;this.reviews=[];this.isRTL=undefined;this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.source=this.source;salla.onReady((function(){i.displayAllURL=salla.url.get("testimonials");i.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){i.testimonialText=salla.lang.get("blocks.home.testimonials");i.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={per_page:this.limit,type:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;a.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return i("div",{class:"s-reviews-container"},i("div",{class:"s-reviews-header-wrapper"},i("h1",{class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?i("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,i("span",{class:"s-reviews-display-all-icon",innerHTML:t})):null),i("salla-slider",{centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},i("div",{slot:"items"},this.reviews.map((function(s,e){return i("div",{key:e,class:"s-reviews-swiper-slide"},i("div",{class:"s-reviews-testimonial"},i("div",{class:"s-reviews-testimonial__inner"},i("div",{class:"s-reviews-testimonial__avatar"},i("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),i("div",{class:"s-reviews-testimonial__text"},i("p",null,s.text),i("div",{class:"s-reviews-testimonial__name_wrapper"},i("div",{class:"s-reviews-testimonial__info"},s.name&&i("h2",null,"".concat(s.name))),i("div",{class:"s-reviews-testimonial__rating"},i("salla-rating-stars",{size:"small",value:s.rating})))),i("span",{class:"s-reviews-testimonial__icon",innerHTML:l}))))})))))};return s}());r.style=n}}}));
|
|
5
|
-
//# sourceMappingURL=p-6b99863e.system.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sallaReviewsCss","SallaReviews","exports","class_1","hostRef","_this","this","displayAllURL","salla","lang","get","source","onReady","url","isRTL","config","onLoaded","testimonialText","displayAllLinkText","prototype","fetchReviews","Promise","resolve","JSON","parse","sourceValue","isJsonEncoded","includes","params","per_page","limit","type","items","api","request","componentWillLoad","then","resp","data","reviews","length","showReviews","Helper","generateReviewSchema","render","h","class","displayAllLink","href","innerHTML","IconArrowLeft","centered","id","concat","slot","map","item","index","key","src","avatar","alt","name","text","size","value","rating","IconQuoteOpen"],"sources":["src/components/salla-reviews/salla-reviews.scss?tag=salla-reviews","src/components/salla-reviews/salla-reviews.tsx"],"sourcesContent":[null,"import { Component, Prop, State, h } from '@stencil/core';\nimport IconArrowLeft from '../../assets/svg/arrow-left.svg'\nimport IconQuoteOpen from '../../assets/svg/quote-open.svg'\n\nimport {Source, Review} from \"./interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n\n@Component({\n tag: 'salla-reviews',\n styleUrl: 'salla-reviews.scss',\n})\nexport class SallaReviews {\n constructor(){\n this.source = this.source;\n salla.onReady(() => {\n this.displayAllURL = salla.url.get('testimonials')\n this.isRTL = salla.config.get('theme.is_rtl', true)\n })\n\n salla.lang.onLoaded(() => { \n this.testimonialText = salla.lang.get('blocks.home.testimonials')\n this.displayAllLinkText = salla.lang.get('blocks.home.display_all')\n })\n }\n\n /**\n * Controls the visibility of a link to the reviews page.\n * \n * When set to `true`, a link will be displayed allowing users to navigate to the full reviews section.\n * \n * @type {boolean}\n */\n @Prop({ reflect: true }) displayAllLink: boolean\n\n /**\n * Specifies the data source for reviews.\n * \n * Valid options include:\n * - 'store': Retrieves reviews for the entire store.\n * - 'all': Retrieves reviews from all sources.\n * - 'categories': Retrieves reviews for specific product categories.\n * - 'products': Retrieves reviews for individual products.\n * - 'json': Retrieves reviews from a custom JSON payload provided in `sourceValue`.\n * \n * When using 'json' as the source, a valid payload must be provided in `sourceValue`.\n * \n * @type {Source}\n * @default \"store\"\n */\n @Prop({ reflect: true }) source: Source = \"store\";\n\n /**\n * Provides data specific to the chosen source.\n * \n * Required when using 'categories', 'products', or 'json' as the source:\n * - 'categories': An array of category IDs.\n * - 'products': An array of product IDs.\n * - 'json': A custom JSON object containing review data.\n * \n * @type {number | string | object | Array<string | number>}\n */\n @Prop({ reflect: true }) sourceValue: number | string | object | Array<string | number>;\n\n /**\n * Defines the maximum number of reviews to retrieve from the API.\n * \n * @type {number}\n * @default 5\n */\n @Prop({ reflect: true }) limit = 5\n\n\n @State() reviews: Array<Review> = [];\n @State() isRTL: boolean\n @State() showReviews: boolean = false;\n @State() testimonialText: string = salla.lang.get('blocks.home.testimonials');\n @State() displayAllLinkText: string = salla.lang.get('blocks.home.display_all');\n\n private displayAllURL = null\n\n fetchReviews() {\n if (this.source === 'json') {\n return Promise.resolve(JSON.parse(this.sourceValue as string));\n }\n const isJsonEncoded = ['products', 'categories'].includes(this.source);\n const params = {\n per_page: this.limit,\n type: this.source,\n items: isJsonEncoded ? JSON.parse(this.sourceValue as string) : this.sourceValue,\n };\n return salla.api.request('reviews', { params }, 'get');\n }\n\n\n componentWillLoad() {\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => this.fetchReviews())\n .then((resp) => resp.data || [])\n .then(reviews => {\n if (reviews.length) {\n this.reviews = reviews;\n this.showReviews = true;\n Helper.generateReviewSchema(this.reviews);\n }\n });\n }\n\n render() {\n return (\n <div class=\"s-reviews-container\">\n <div class=\"s-reviews-header-wrapper\">\n <h1 class=\"s-reviews-header\">\n {this.testimonialText}\n </h1>\n {!!this.displayAllLink ? (\n <a href={this.displayAllURL} class=\"s-reviews-display-all\">\n {this.displayAllLinkText}\n <span class=\"s-reviews-display-all-icon\" innerHTML={IconArrowLeft} />\n </a>\n ) : null}\n </div>\n <salla-slider\n centered\n slides-per-view={1}\n type=\"testimonials\"\n class=\"s-reviews-testimonials-slider\"\n controls-outer\n auto-play\n id={`testimonials-${this.source}-slider`}\n >\n <div slot=\"items\">\n {this.reviews.map((item: Review, index) => (\n <div key={index} class=\"s-reviews-swiper-slide\">\n <div class=\"s-reviews-testimonial\">\n <div class=\"s-reviews-testimonial__inner\">\n <div class=\"s-reviews-testimonial__avatar\">\n <img\n src={'images/s-empty.png'}\n data-src={item.avatar}\n alt={item.name ? item.name : 'testimonial-' + index}\n class=\"lazy\"\n />\n </div>\n <div class=\"s-reviews-testimonial__text\">\n <p>{item.text}</p>\n <div class=\"s-reviews-testimonial__name_wrapper\">\n <div class=\"s-reviews-testimonial__info\">\n {item.name && <h2>{`${item.name}`}</h2>}\n </div>\n <div class=\"s-reviews-testimonial__rating\">\n {/* TODO stars is missing */}\n <salla-rating-stars size=\"small\" value={item.rating}></salla-rating-stars>\n </div>\n </div>\n </div>\n\n <span class=\"s-reviews-testimonial__icon\" innerHTML={IconQuoteOpen} />\n </div>\n </div>\n </div>\n ))}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n}\n\n"],"mappings":";;;4oCAAA,IAAMA,EAAkB,G,ICYXC,EAAYC,EAAA,2BACvB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,K,UAkEQA,KAAA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X,KAAKyC,eACNF,EAAA,KAAGG,KAAM1C,KAAKC,cAAeuC,MAAM,yBAChCxC,KAAKY,mBACN2B,EAAA,QAAMC,MAAM,6BAA6BG,UAAWC,KAEpD,MAENL,EAAA,gBACEM,SAAQ,uBACS,EACjBpB,KAAK,eACLe,MAAM,gCAA+B,uCAGrCM,GAAI,gBAAAC,OAAgB/C,KAAKK,OAAM,YAE/BkC,EAAA,OAAKS,KAAK,SACPhD,KAAKiC,QAAQgB,KAAI,SAACC,EAAcC,GAAK,OACpCZ,EAAA,OAAKa,IAAKD,EAAOX,MAAM,0BACrBD,EAAA,OAAKC,MAAM,yBACTD,EAAA,OAAKC,MAAM,gCACTD,EAAA,OAAKC,MAAM,iCACTD,EAAA,OACEc,IAAK,qBAAoB,WACfH,EAAKI,OACfC,IAAKL,EAAKM,KAAON,EAAKM,KAAO,eAAiBL,EAC9CX,MAAM,UAGVD,EAAA,OAAKC,MAAM,+BACTD,EAAA,SAAIW,EAAKO,MACTlB,EAAA,OAAKC,MAAM,uCACTD,EAAA,OAAKC,MAAM,+BACRU,EAAKM,MAAQjB,EAAA,UAAK,GAAAQ,OAAGG,EAAKM,QAE7BjB,EAAA,OAAKC,MAAM,iCAETD,EAAA,sBAAoBmB,KAAK,QAAQC,MAAOT,EAAKU,YAKnDrB,EAAA,QAAMC,MAAM,8BAA8BG,UAAWkB,MAzBvB,M,WAxHzB,I"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["salla","event","setMaxListeners","Helper","prototype","toggleElementClassIf","element","classes1","classes2","callback","Array","isArray","split","isClasses1","_c","classList","remove","apply","_d","add","this","toggleClassIf","selector","_this","document","querySelectorAll","forEach","isValidEmail","email","re","test","String","toLowerCase","filterEmojies","text","characterFilter","replace","debounce","fn","data","_i","arguments","length","debounce_","helpers","innerData","__spreadArray","getProductsSource","source","config","get","getPageTitleForSource","brands","latest","offers","sales","lang","getProductsSourceValue","sourceValue","parsedSource","parsedSourceValue","JSON","parse","error","console","includes","URLSearchParams","window","location","search","extractFiltersFromUrl","searchParams","filters","value","key","matchesNested","match","filterName","nestedKey","matchesSimple","onSallaReadyPromise","Promise","resolve","onReady","fetchProducts","source_value","limit","product","api","fetch","getProductSchemaMarkupScript","scriptElement","createElement","type","jsonData","name","image","_a","url","thumbnail","description","brand","logo","_b","price","stringify","createProductSchema","position","ProductSchema","productID","concat","id","subtitle","priceCurrency","currency","itemCondition","availability","is_available","priceValidUntil","discount_ends","Date","setDate","getDate","toISOString","priceSpecification","regular_price","valueAddedTaxIncluded","is_taxable","seller","rating","stars","aggregateRating","ratingValue","reviewCount","count","item","generateProductSchema","productList","schemaId","getElementById","logger","warn","script","schema","itemListElement","map","indxe","textContent","head","appendChild","formatDateFromString","dateString","numberCb","dateObject","errors","en","ar","isNaN","getTime","daysOfWeek","months","dayOfWeek","getDay","dayOfMonth","month","getMonth","year","getFullYear","copyToClipboard","textToCopy","target","innerText","navigator","clipboard","writeText","then","log","catch","err","animateItems","items","anime","targets","opacity","duration","translateY","delay","_el","i","easing","complete","_anim","createReviewObject","reviewData","author","datePublished","created_at","date","toString","content","reviewRating","bestRating","worstRating","generateReviewSchema","reviews","review","Helper$1","exports"],"sources":["src/Helpers/Helper.ts"],"sourcesContent":["import { ProductDetail, ProductResponse } from \"@salla.sa/twilight/types/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = JSON.parse(sourceValue);\n } catch (error) {\n console.error('Invalid JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n /**\n * We needed this function to help us avoid requesting the products list before salla is ready,\n * was causing a strange issues in live for the bad connections ex: not loading the dom, requesting api without storeIdentefire\n */\n onSallaReadyPromise(callback): Promise<any> {\n return new Promise((resolve) => salla.onReady(() => callback(resolve)));\n }\n\n /**\n * \n * let's make sure to send the request only when salla is ready\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n */\n fetchProducts(source, source_value, limit): Promise<ProductResponse.lists> {\n return this.onSallaReadyPromise((resolve) => resolve(salla.product.api.fetch({ source: source, source_value: source_value, limit: limit })));\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": reviewData.name,\n \"datePublished\": Date.parse(reviewData.created_at.date).toString(),\n \"description\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": \"5\",\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"CollectionPage\",\n \"name\": \"Category Name\", // TODO: check for the correct value here\n \"description\": \"Description of the category\", // TODO: here too\n \"review\": reviews.map((review) => this.createReviewObject(review))\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"],"mappings":";;;qIAOAA,MAAMC,MAAMC,gBAAgB,KAE5B,IAAAC,EAAA,oBAAAA,I,CAGEA,EAAAC,UAAAC,qBAAA,SAAqBC,EAASC,EAAUC,EAAUC,G,QAChDF,EAAWG,MAAMC,QAAQJ,GAAYA,EAAWA,EAASK,MAAM,KAC/DJ,EAAWE,MAAMC,QAAQH,GAAYA,EAAWA,EAASI,MAAM,KAC/D,IAAIC,EAAaJ,EAASH,GAC1BA,IAAO,MAAPA,SAAO,UAAPQ,EAAAR,EAASS,WAAUC,OAAMC,MAAAH,EAAKD,EAAaL,EAAWD,GACtDD,IAAO,MAAPA,SAAO,UAAPY,EAAAZ,EAASS,WAAUI,IAAGF,MAAAC,EAAKL,EAAaN,EAAWC,GACnD,OAAOY,I,EAGTjB,EAAAC,UAAAiB,cAAA,SAAcC,EAAUf,EAAUC,EAAUC,GAA5C,IAAAc,EAAAH,KACEI,SAASC,iBAAiBH,GAAUI,SAAQ,SAAApB,GAAW,OAAAiB,EAAKlB,qBAAqBC,EAASC,EAAUC,EAAUC,EAAvD,IACvD,OAAOW,I,EAGTjB,EAAAC,UAAAuB,aAAA,SAAaC,GACX,IAAMC,EAAK,wJACX,OAAOA,EAAGC,KAAKC,OAAOH,GAAOI,c,EAG/B7B,EAAAC,UAAA6B,cAAA,SAAcC,GACZ,IAAIC,EAAkB,imBACtB,OAAOD,EAAKE,QAAQD,EAAiB,G,EAGvChC,EAAAC,UAAAiC,SAAA,SAASC,GAAI,IAAAC,EAAA,G,IAAA,IAAAC,EAAA,EAAAA,EAAAC,UAAAC,OAAAF,IAAO,CAAPD,EAAAC,EAAA,GAAAC,UAAAD,E,CACX,I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EAAQ3D,KAAI,SAAC4D,GAAW,OAAAtL,EAAKyK,mBAAmBa,EAAxB,KAGpC/D,EAAOK,YAActF,KAAK4C,UAAUsC,GACpCvH,SAAS4H,KAAKC,YAAYP,E,WAnW9B,GAuWA,IAAAgE,EAAAC,EAAA,IAAe,IAAI5M,E"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as s,h as i}from"./p-fafedb13.js";import{a as e}from"./p-91a1d8b6.js";import{H as t}from"./p-f629ebf3.js";import"./p-5a803ecc.js";const 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>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n`;const l="";const r=class{constructor(i){s(this,i);this.displayAllURL=null;this.displayAllLink=undefined;this.source="store";this.sourceValue=undefined;this.limit=5;this.reviews=[];this.isRTL=undefined;this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.source=this.source;salla.onReady((()=>{this.displayAllURL=salla.url.get("testimonials");this.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((()=>{this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}fetchReviews(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}const s=["products","categories"].includes(this.source);const i={per_page:this.limit,type:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue};return salla.api.request("reviews",{params:i},"get")}componentWillLoad(){return new Promise((s=>salla.onReady(s))).then((()=>this.fetchReviews())).then((s=>s.data||[])).then((s=>{if(s.length){this.reviews=s;this.showReviews=true;t.generateReviewSchema(this.reviews)}}))}render(){return i("div",{class:"s-reviews-container"},i("div",{class:"s-reviews-header-wrapper"},i("h1",{class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?i("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,i("span",{class:"s-reviews-display-all-icon",innerHTML:e})):null),i("salla-slider",{centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:`testimonials-${this.source}-slider`},i("div",{slot:"items"},this.reviews.map(((s,e)=>i("div",{key:e,class:"s-reviews-swiper-slide"},i("div",{class:"s-reviews-testimonial"},i("div",{class:"s-reviews-testimonial__inner"},i("div",{class:"s-reviews-testimonial__avatar"},i("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),i("div",{class:"s-reviews-testimonial__text"},i("p",null,s.text),i("div",{class:"s-reviews-testimonial__name_wrapper"},i("div",{class:"s-reviews-testimonial__info"},s.name&&i("h2",null,`${s.name}`)),i("div",{class:"s-reviews-testimonial__rating"},i("salla-rating-stars",{size:"small",value:s.rating})))),i("span",{class:"s-reviews-testimonial__icon",innerHTML:a})))))))))}};r.style=l;export{r as salla_reviews};
|
|
5
|
-
//# sourceMappingURL=p-f209fb12.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sallaReviewsCss","SallaReviews","constructor","hostRef","this","displayAllURL","salla","lang","get","source","onReady","url","isRTL","config","onLoaded","testimonialText","displayAllLinkText","fetchReviews","Promise","resolve","JSON","parse","sourceValue","isJsonEncoded","includes","params","per_page","limit","type","items","api","request","componentWillLoad","then","resp","data","reviews","length","showReviews","Helper","generateReviewSchema","render","h","class","displayAllLink","href","innerHTML","IconArrowLeft","centered","id","slot","map","item","index","key","src","avatar","alt","name","text","size","value","rating","IconQuoteOpen"],"sources":["src/components/salla-reviews/salla-reviews.scss?tag=salla-reviews","src/components/salla-reviews/salla-reviews.tsx"],"sourcesContent":[null,"import { Component, Prop, State, h } from '@stencil/core';\nimport IconArrowLeft from '../../assets/svg/arrow-left.svg'\nimport IconQuoteOpen from '../../assets/svg/quote-open.svg'\n\nimport {Source, Review} from \"./interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n\n@Component({\n tag: 'salla-reviews',\n styleUrl: 'salla-reviews.scss',\n})\nexport class SallaReviews {\n constructor(){\n this.source = this.source;\n salla.onReady(() => {\n this.displayAllURL = salla.url.get('testimonials')\n this.isRTL = salla.config.get('theme.is_rtl', true)\n })\n\n salla.lang.onLoaded(() => { \n this.testimonialText = salla.lang.get('blocks.home.testimonials')\n this.displayAllLinkText = salla.lang.get('blocks.home.display_all')\n })\n }\n\n /**\n * Controls the visibility of a link to the reviews page.\n * \n * When set to `true`, a link will be displayed allowing users to navigate to the full reviews section.\n * \n * @type {boolean}\n */\n @Prop({ reflect: true }) displayAllLink: boolean\n\n /**\n * Specifies the data source for reviews.\n * \n * Valid options include:\n * - 'store': Retrieves reviews for the entire store.\n * - 'all': Retrieves reviews from all sources.\n * - 'categories': Retrieves reviews for specific product categories.\n * - 'products': Retrieves reviews for individual products.\n * - 'json': Retrieves reviews from a custom JSON payload provided in `sourceValue`.\n * \n * When using 'json' as the source, a valid payload must be provided in `sourceValue`.\n * \n * @type {Source}\n * @default \"store\"\n */\n @Prop({ reflect: true }) source: Source = \"store\";\n\n /**\n * Provides data specific to the chosen source.\n * \n * Required when using 'categories', 'products', or 'json' as the source:\n * - 'categories': An array of category IDs.\n * - 'products': An array of product IDs.\n * - 'json': A custom JSON object containing review data.\n * \n * @type {number | string | object | Array<string | number>}\n */\n @Prop({ reflect: true }) sourceValue: number | string | object | Array<string | number>;\n\n /**\n * Defines the maximum number of reviews to retrieve from the API.\n * \n * @type {number}\n * @default 5\n */\n @Prop({ reflect: true }) limit = 5\n\n\n @State() reviews: Array<Review> = [];\n @State() isRTL: boolean\n @State() showReviews: boolean = false;\n @State() testimonialText: string = salla.lang.get('blocks.home.testimonials');\n @State() displayAllLinkText: string = salla.lang.get('blocks.home.display_all');\n\n private displayAllURL = null\n\n fetchReviews() {\n if (this.source === 'json') {\n return Promise.resolve(JSON.parse(this.sourceValue as string));\n }\n const isJsonEncoded = ['products', 'categories'].includes(this.source);\n const params = {\n per_page: this.limit,\n type: this.source,\n items: isJsonEncoded ? JSON.parse(this.sourceValue as string) : this.sourceValue,\n };\n return salla.api.request('reviews', { params }, 'get');\n }\n\n\n componentWillLoad() {\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => this.fetchReviews())\n .then((resp) => resp.data || [])\n .then(reviews => {\n if (reviews.length) {\n this.reviews = reviews;\n this.showReviews = true;\n Helper.generateReviewSchema(this.reviews);\n }\n });\n }\n\n render() {\n return (\n <div class=\"s-reviews-container\">\n <div class=\"s-reviews-header-wrapper\">\n <h1 class=\"s-reviews-header\">\n {this.testimonialText}\n </h1>\n {!!this.displayAllLink ? (\n <a href={this.displayAllURL} class=\"s-reviews-display-all\">\n {this.displayAllLinkText}\n <span class=\"s-reviews-display-all-icon\" innerHTML={IconArrowLeft} />\n </a>\n ) : null}\n </div>\n <salla-slider\n centered\n slides-per-view={1}\n type=\"testimonials\"\n class=\"s-reviews-testimonials-slider\"\n controls-outer\n auto-play\n id={`testimonials-${this.source}-slider`}\n >\n <div slot=\"items\">\n {this.reviews.map((item: Review, index) => (\n <div key={index} class=\"s-reviews-swiper-slide\">\n <div class=\"s-reviews-testimonial\">\n <div class=\"s-reviews-testimonial__inner\">\n <div class=\"s-reviews-testimonial__avatar\">\n <img\n src={'images/s-empty.png'}\n data-src={item.avatar}\n alt={item.name ? item.name : 'testimonial-' + index}\n class=\"lazy\"\n />\n </div>\n <div class=\"s-reviews-testimonial__text\">\n <p>{item.text}</p>\n <div class=\"s-reviews-testimonial__name_wrapper\">\n <div class=\"s-reviews-testimonial__info\">\n {item.name && <h2>{`${item.name}`}</h2>}\n </div>\n <div class=\"s-reviews-testimonial__rating\">\n {/* TODO stars is missing */}\n <salla-rating-stars size=\"small\" value={item.rating}></salla-rating-stars>\n </div>\n </div>\n </div>\n\n <span class=\"s-reviews-testimonial__icon\" innerHTML={IconQuoteOpen} />\n </div>\n </div>\n </div>\n ))}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n}\n\n"],"mappings":";;;6gCAAA,MAAMA,EAAkB,G,MCYXC,EAAY,MACvB,WAAAC,CAAAC,G,UAkEQC,KAAAC,cAAgB,K,0CA7BkB,Q,sCAoBT,E,aAGC,G,sCAEF,M,qBACGC,MAAMC,KAAKC,IAAI,4B,wBACZF,MAAMC,KAAKC,IAAI,2BA/DnDJ,KAAKK,OAASL,KAAKK,OACnBH,MAAMI,SAAQ,KACZN,KAAKC,cAAgBC,MAAMK,IAAIH,IAAI,gBACnCJ,KAAKQ,MAAQN,MAAMO,OAAOL,IAAI,eAAgB,KAAK,IAGrDF,MAAMC,KAAKO,UAAS,KAClBV,KAAKW,gBAAkBT,MAAMC,KAAKC,IAAI,4BACtCJ,KAAKY,mBAAqBV,MAAMC,KAAKC,IAAI,0BAA0B,G,CA2DvE,YAAAS,GACE,GAAIb,KAAKK,SAAW,OAAQ,CAC1B,OAAOS,QAAQC,QAAQC,KA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,MACTjB,EAAA,OAAKC,MAAM,uCACTD,EAAA,OAAKC,MAAM,+BACRS,EAAKM,MAAQhB,EAAA,UAAK,GAAGU,EAAKM,SAE7BhB,EAAA,OAAKC,MAAM,iCAETD,EAAA,sBAAoBkB,KAAK,QAAQC,MAAOT,EAAKU,YAKnDpB,EAAA,QAAMC,MAAM,8BAA8BG,UAAWiB,W"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["salla","event","setMaxListeners","Helper","toggleElementClassIf","element","classes1","classes2","callback","Array","isArray","split","isClasses1","classList","remove","add","this","toggleClassIf","selector","document","querySelectorAll","forEach","isValidEmail","email","re","test","String","toLowerCase","filterEmojies","text","characterFilter","replace","debounce","fn","data","debounce_","helpers","innerData","getProductsSource","source","config","get","getPageTitleForSource","brands","latest","offers","sales","lang","getProductsSourceValue","sourceValue","parsedSource","parsedSourceValue","JSON","parse","error","console","includes","length","URLSearchParams","window","location","search","extractFiltersFromUrl","searchParams","filters","value","key","matchesNested","match","filterName","nestedKey","matchesSimple","onSallaReadyPromise","Promise","resolve","onReady","fetchProducts","source_value","limit","product","api","fetch","getProductSchemaMarkupScript","scriptElement","createElement","type","jsonData","name","image","_a","url","thumbnail","description","brand","logo","_b","price","stringify","createProductSchema","position","ProductSchema","productID","id","subtitle","priceCurrency","currency","itemCondition","availability","is_available","priceValidUntil","discount_ends","Date","setDate","getDate","toISOString","priceSpecification","regular_price","valueAddedTaxIncluded","is_taxable","seller","rating","stars","aggregateRating","ratingValue","reviewCount","count","item","generateProductSchema","productList","schemaId","getElementById","logger","warn","script","schema","itemListElement","map","indxe","textContent","head","appendChild","formatDateFromString","dateString","numberCb","dateObject","errors","en","ar","isNaN","getTime","daysOfWeek","months","dayOfWeek","getDay","dayOfMonth","month","getMonth","year","getFullYear","copyToClipboard","textToCopy","target","innerText","navigator","clipboard","writeText","then","log","catch","err","animateItems","items","anime","targets","opacity","duration","translateY","delay","_el","i","easing","complete","_anim","createReviewObject","reviewData","author","datePublished","created_at","date","toString","content","reviewRating","bestRating","worstRating","generateReviewSchema","reviews","review","Helper$1"],"sources":["src/Helpers/Helper.ts"],"sourcesContent":["import { ProductDetail, ProductResponse } from \"@salla.sa/twilight/types/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = JSON.parse(sourceValue);\n } catch (error) {\n console.error('Invalid JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n /**\n * We needed this function to help us avoid requesting the products list before salla is ready,\n * was causing a strange issues in live for the bad connections ex: not loading the dom, requesting api without storeIdentefire\n */\n onSallaReadyPromise(callback): Promise<any> {\n return new Promise((resolve) => salla.onReady(() => callback(resolve)));\n }\n\n /**\n * \n * let's make sure to send the request only when salla is ready\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n */\n fetchProducts(source, source_value, limit): Promise<ProductResponse.lists> {\n return this.onSallaReadyPromise((resolve) => resolve(salla.product.api.fetch({ source: source, source_value: source_value, limit: limit })));\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": reviewData.name,\n \"datePublished\": Date.parse(reviewData.created_at.date).toString(),\n \"description\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": \"5\",\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"CollectionPage\",\n \"name\": \"Category Name\", // TODO: check for the correct value here\n \"description\": \"Description of the category\", // TODO: here too\n \"review\": reviews.map((review) => this.createReviewObject(review))\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"],"mappings":";;;oCAOAA,MAAMC,MAAMC,gBAAgB,KAE5B,MAAMC,EAGJ,oBAAAC,CAAqBC,EAASC,EAAUC,EAAUC,GAChDF,EAAWG,MAAMC,QAAQJ,GAAYA,EAAWA,EAASK,MAAM,KAC/DJ,EAAWE,MAAMC,QAAQH,GAAYA,EAAWA,EAASI,MAAM,KAC/D,IAAIC,EAAaJ,EAASH,GAC1BA,IAAO,MAAPA,SAAO,SAAPA,EAASQ,UAAUC,UAAWF,EAAaL,EAAWD,GACtDD,IAAO,MAAPA,SAAO,SAAPA,EAASQ,UAAUE,OAAQH,EAAaN,EAAWC,GACnD,OAAOS,I,CAGT,aAAAC,CAAcC,EAAUZ,EAAUC,EAAUC,GAC1CW,SAASC,iBAAiBF,GAAUG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aE,KAAcC,KAASE,G,CAOhD,eAAAE,CAAgB9J,GAEd,IAAI+J,EAAa/J,EAAMgK,OAAOC,UAG9BC,UAAUC,UAAUC,UAAUL,GAC3BM,MAAK,KACJ/G,QAAQgH,IAAI,6BAA+BP,EAAW,IAEvDQ,OAAMC,IACLlH,QAAQD,MAAM,mCAAoCmH,EAAI,G,CAK5D,YAAAC,CAAaC,GACX,IAAKA,EAAO,OACZC,EAAM,CACJC,QAASF,EACTG,QAAS,CAAC,EAAG,GACbC,SAAU,KACVC,WAAY,CAAC,GAAI,GACjBC,MAAO,SAAUC,EAAKC,GACpB,OAAOA,EAAI,G,EAEbC,OAAQ,cACRC,SAAU,SAAUC,GAClBX,EAAMtJ,SAASyG,IACbA,EAAKjH,UAAUE,IAAI,WAAW,G,IAOtC,kBAAAwK,CAAmBC,GACjB,MAAO,CACL,QAAS,SACTC,OAAUD,EAAWjG,KACrBmG,cAAiB3E,KAAK1D,MAAMmI,EAAWG,WAAWC,MAAMC,WACxDjG,YAAe4F,EAAWM,QAC1BC,aAAgB,CACd,QAAS,SACTC,WAAc,IACdrE,YAAe,IACfsE,YAAe,K,CAKrB,oBAAAC,CAAqBC,GACnB,MAAM9D,EAASlH,SAASiE,cAAc,UACtCiD,EAAOhD,KAAO,sBAGd,MAAMiD,EAAS,CACb,WAAY,qBACZ,QAAS,iBACT/C,KAAQ,gBACRK,YAAe,8BACfwG,OAAUD,EAAQ3D,KAAK4D,GAAWpL,KAAKuK,mBAAmBa,MAG5D/D,EAAOK,YAActF,KAAK6C,UAAUqC,GACpCnH,SAASwH,KAAKC,YAAYP,E,EAI9B,MAAAgE,EAAe,IAAIlM,S"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|