@salla.sa/twilight-components 2.14.573 → 2.14.574
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-N5wrs9vm.js → Helper-8U7zlpC3.js} +171 -117
- package/dist/cjs/{filepond-B2iMbV1F.js → filepond-BqzmHqFG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-rXYiM_Ob.js → filepond-plugin-file-poster-Rc_hYm4g.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BF5dedmz.js → filepond-plugin-file-validate-size-MQOyXwCH.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DJHYRny2.js → filepond-plugin-file-validate-type-0_gq-gig.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BgtH5f4u.js → filepond-plugin-image-edit-DjWvYOF_.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C9JH8EBn.js → filepond-plugin-image-exif-orientation-BGNpJuyh.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CpSCiqfj.js → filepond-plugin-image-preview-BoPR2rRr.js} +1 -1
- package/dist/cjs/heart-ClVn_Co8.js +13 -0
- package/dist/cjs/{index-DpXwHFVO.js → index-BGm5j5Zj.js} +14 -10
- package/dist/cjs/index-CIbBkRPw.js +4413 -0
- package/dist/cjs/{intlTelInput-CdZOfaWd.js → intlTelInput-CIZvknP0.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +9 -4403
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
- 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-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.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-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +5 -11
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +5 -6
- package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -6
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.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-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.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/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +48 -0
- package/dist/cjs/{shipping-fast-CsqEQE78.js → star-tn5w5Um0.js} +8 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BT9OjZCy.js → vanilla-picker-BwaB87Xi.js} +1 -1
- package/dist/collection/Helpers/Helper.js +171 -117
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +8 -4
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +1 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
- package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.css +62 -0
- package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.js +65 -0
- package/dist/components/Helper.js +171 -117
- package/dist/components/heart.js +11 -0
- package/dist/components/index.js +2 -2
- package/dist/components/index2.js +4322 -2471
- package/dist/components/index3.js +2553 -0
- package/dist/components/salla-bullet-delivery.js +44 -4438
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-product-card2.js +4 -10
- package/dist/components/salla-rating-modal-v2.js +1 -1
- package/dist/components/salla-rating-modal-v22.js +9 -3
- package/dist/components/salla-rating-modal2.js +2 -3
- package/dist/components/salla-user-menu.js +2 -2
- package/dist/components/salla-wishlist-summary.d.ts +11 -0
- package/dist/components/salla-wishlist-summary.js +67 -0
- package/dist/esm/{Helper-Cql-WbqR.js → Helper-ivBHT_nn.js} +171 -117
- package/dist/esm/{filepond-BsuscqtG.js → filepond-DcoYtlMX.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DZ4ckjsP.js → filepond-plugin-file-poster-CBcS6Ln1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BV6807xx.js → filepond-plugin-file-validate-size-HuNTwpc9.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-cWCM2RqT.js → filepond-plugin-file-validate-type-BOjEfXdn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-aQvaKLxK.js → filepond-plugin-image-edit-BL7zREI5.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-FgW7hBXK.js → filepond-plugin-image-exif-orientation-BJgL9era.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DxogdDqd.js → filepond-plugin-image-preview-DPUJHFk0.js} +1 -1
- package/dist/esm/heart-00vBRoH3.js +11 -0
- package/dist/esm/{index-DSEA3vdh.js → index-BXNtVhVe.js} +14 -10
- package/dist/esm/index-wXSgmenB.js +4404 -0
- package/dist/esm/{intlTelInput-BLEGv9EO.js → intlTelInput-wU6Kly2g.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +2 -2
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +2 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +11 -11
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +53 -4447
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +2 -2
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +2 -8
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +2 -2
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +3 -4
- package/dist/esm/salla-rating-modal.entry.js +3 -4
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.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-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +5 -5
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.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/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +46 -0
- package/dist/esm/{shipping-fast-lMgMt31Q.js → star-cq6TcfoH.js} +8 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BpgJFvog.js → vanilla-picker-CFcUgW74.js} +1 -1
- package/dist/twilight/p-00vBRoH3.js +4 -0
- package/dist/twilight/{p-035b561c.entry.js → p-02eccebc.entry.js} +1 -1
- package/dist/twilight/p-043b2382.entry.js +4 -0
- package/dist/twilight/{p-2304f0a4.entry.js → p-0a135b25.entry.js} +1 -1
- package/dist/twilight/{p-5d41dc4e.entry.js → p-0bcaa1af.entry.js} +1 -1
- package/dist/twilight/{p-bbb72d38.entry.js → p-0d18b6f2.entry.js} +1 -1
- package/dist/twilight/p-12822eba.entry.js +4 -0
- package/dist/twilight/{p-82455313.entry.js → p-16b9ea73.entry.js} +1 -1
- package/dist/twilight/{p-5d0fd545.entry.js → p-1853b5ba.entry.js} +1 -1
- package/dist/twilight/p-1a4028e2.entry.js +4 -0
- package/dist/twilight/{p-010fa509.entry.js → p-1bcacd6b.entry.js} +1 -1
- package/dist/twilight/{p-f306bfe3.entry.js → p-1ea4c8e4.entry.js} +1 -1
- package/dist/twilight/{p-e5bb52fb.entry.js → p-22087f33.entry.js} +1 -1
- package/dist/twilight/{p-5d97cf2d.entry.js → p-23540811.entry.js} +1 -1
- package/dist/twilight/{p-3c665085.entry.js → p-2e08cf78.entry.js} +1 -1
- package/dist/twilight/{p-4a3701ca.entry.js → p-2ee3c58e.entry.js} +1 -1
- package/dist/twilight/{p-901217bc.entry.js → p-38806031.entry.js} +1 -1
- package/dist/twilight/{p-d654b4b0.entry.js → p-3ae64529.entry.js} +1 -1
- package/dist/twilight/{p-f173ada5.entry.js → p-3e7a7eb0.entry.js} +1 -1
- package/dist/twilight/{p-3eb55e32.entry.js → p-43124a9d.entry.js} +1 -1
- package/dist/twilight/{p-7afeb088.entry.js → p-44899fd8.entry.js} +1 -1
- package/dist/twilight/{p-c15d08ae.entry.js → p-4563fd77.entry.js} +1 -1
- package/dist/twilight/{p-276171ac.entry.js → p-48f47f92.entry.js} +1 -1
- package/dist/twilight/{p-b6ece925.entry.js → p-50a88286.entry.js} +1 -1
- package/dist/twilight/{p-6fb16543.entry.js → p-52c31b1a.entry.js} +1 -1
- package/dist/twilight/{p-77dc1637.entry.js → p-565eda17.entry.js} +1 -1
- package/dist/twilight/p-6142183b.entry.js +4 -0
- package/dist/twilight/{p-909ae4c5.entry.js → p-6210a661.entry.js} +1 -1
- package/dist/twilight/{p-69e8750f.entry.js → p-6665f42e.entry.js} +1 -1
- package/dist/twilight/{p-e0b085e4.entry.js → p-6b378bcd.entry.js} +1 -1
- package/dist/twilight/{p-75652fd4.entry.js → p-6d56ebac.entry.js} +1 -1
- package/dist/twilight/{p-6904ad04.entry.js → p-6fe398ae.entry.js} +1 -1
- package/dist/twilight/{p-aadeb35a.entry.js → p-70147959.entry.js} +1 -1
- package/dist/twilight/{p-09e126b0.entry.js → p-70eaceea.entry.js} +1 -1
- package/dist/twilight/{p-1f1dda08.entry.js → p-71ec3f8a.entry.js} +1 -1
- package/dist/twilight/p-747153bc.entry.js +4 -0
- package/dist/twilight/{p-4944d10a.entry.js → p-76403e24.entry.js} +1 -1
- package/dist/twilight/{p-77323c2a.entry.js → p-78a84f80.entry.js} +1 -1
- package/dist/twilight/p-79f495b7.entry.js +4 -0
- package/dist/twilight/{p-e5c07741.entry.js → p-7a099b00.entry.js} +1 -1
- package/dist/twilight/{p-51434773.entry.js → p-817cfe1a.entry.js} +1 -1
- package/dist/twilight/{p-6a605835.entry.js → p-853b2efe.entry.js} +1 -1
- package/dist/twilight/{p-4a447633.entry.js → p-8666489e.entry.js} +1 -1
- package/dist/twilight/{p-9fe36a97.entry.js → p-88f762de.entry.js} +1 -1
- package/dist/twilight/{p-1acd987a.entry.js → p-8e114c27.entry.js} +1 -1
- package/dist/twilight/{p-b1c21e5c.entry.js → p-8f3642d1.entry.js} +1 -1
- package/dist/twilight/{p-db53fade.entry.js → p-900f78b6.entry.js} +1 -1
- package/dist/twilight/{p-7e0698c6.entry.js → p-90aa29f3.entry.js} +1 -1
- package/dist/twilight/{p-5329003d.entry.js → p-91e4594d.entry.js} +1 -1
- package/dist/twilight/{p-84ec7be7.entry.js → p-9282b995.entry.js} +1 -1
- package/dist/twilight/{p-06419603.entry.js → p-98137b26.entry.js} +1 -1
- package/dist/twilight/{p-62a44e65.entry.js → p-987a75aa.entry.js} +1 -1
- package/dist/twilight/{p-3c5e2710.entry.js → p-9979ada5.entry.js} +1 -1
- package/dist/twilight/{p-d9be4036.entry.js → p-9cca8055.entry.js} +1 -1
- package/dist/twilight/{p-3040407e.entry.js → p-9d667925.entry.js} +1 -1
- package/dist/twilight/{p-8ae70528.entry.js → p-9dfe1ec1.entry.js} +1 -1
- package/dist/twilight/{p-0764c46b.entry.js → p-9f23104d.entry.js} +1 -1
- package/dist/twilight/{p-WgGO2Pjy.js → p-BFib9jF0.js} +1 -1
- package/dist/twilight/{p-DSEA3vdh.js → p-BXNtVhVe.js} +2 -2
- package/dist/twilight/{p-VBuS91fQ.js → p-BpnCDmiM.js} +1 -1
- package/dist/twilight/{p-B3sbQMcp.js → p-C3JsXKHY.js} +1 -1
- package/dist/twilight/{p-BZt79QeE.js → p-CDojVREu.js} +1 -1
- package/dist/twilight/{p-DDcSXlpO.js → p-CMcDoqmG.js} +1 -1
- package/dist/twilight/{p-BF2su8FM.js → p-COQlWLWv.js} +1 -1
- package/dist/twilight/{p-Bj6lP8RV.js → p-CPkPdW2Q.js} +1 -1
- package/dist/twilight/p-CbVZf-Q4.js +4 -0
- package/dist/twilight/{p-Bt0GXtZG.js → p-D9StCBh9.js} +2 -2
- package/dist/twilight/p-DI6PJLEJ.js +1024 -0
- package/dist/twilight/{p-6cc3e44d.entry.js → p-a0c5bc92.entry.js} +1 -1
- package/dist/twilight/{p-c419a909.entry.js → p-a34258d2.entry.js} +1 -1
- package/dist/twilight/{p-1063f3d1.entry.js → p-a57e299a.entry.js} +1 -1
- package/dist/twilight/{p-89ed6dbc.entry.js → p-a581c552.entry.js} +1 -1
- package/dist/twilight/{p-0b514a47.entry.js → p-ab97de5d.entry.js} +1 -1
- package/dist/twilight/{p-901a961f.entry.js → p-ac2926d9.entry.js} +1 -1
- package/dist/twilight/{p-dd3aacf3.entry.js → p-aec3d7ce.entry.js} +1 -1
- package/dist/twilight/{p-663aa63b.entry.js → p-b0671070.entry.js} +1 -1
- package/dist/twilight/{p-e90a201a.entry.js → p-b0ff401e.entry.js} +1 -1
- package/dist/twilight/{p-ad930532.entry.js → p-b11508cb.entry.js} +1 -1
- package/dist/twilight/{p-5c863789.entry.js → p-b5329852.entry.js} +1 -1
- package/dist/twilight/{p-DdScDjtA.js → p-b84FyDqk.js} +1 -1
- package/dist/twilight/{p-bb2170ac.entry.js → p-bb0bc7ed.entry.js} +1 -1
- package/dist/twilight/{p-68aecf40.entry.js → p-bc2203b6.entry.js} +1 -1
- package/dist/twilight/{p-bc0f3f06.entry.js → p-bd89bcf5.entry.js} +1 -1
- package/dist/twilight/{p-d1c973ce.entry.js → p-bdb558a2.entry.js} +1 -1
- package/dist/twilight/{p-b3063b70.entry.js → p-bee482ce.entry.js} +1 -1
- package/dist/twilight/{p-f919f0b5.entry.js → p-c0c23759.entry.js} +1 -1
- package/dist/twilight/{p-6be347e5.entry.js → p-c163a216.entry.js} +1 -1
- package/dist/twilight/{p-ec341307.entry.js → p-c5f087a3.entry.js} +1 -1
- package/dist/twilight/{p-5b949ccc.entry.js → p-c67dcc94.entry.js} +1 -1
- package/dist/twilight/{p-lMgMt31Q.js → p-cq6TcfoH.js} +1 -1
- package/dist/twilight/{p-78ee03f8.entry.js → p-d1520e68.entry.js} +1 -1
- package/dist/twilight/{p-54c36ba4.entry.js → p-d365bd72.entry.js} +1 -1
- package/dist/twilight/{p-2c07e8ac.entry.js → p-d702af41.entry.js} +1 -1
- package/dist/twilight/{p-3b3a1c87.entry.js → p-dbd9523b.entry.js} +1 -1
- package/dist/twilight/{p-4557e342.entry.js → p-dc9b9ef7.entry.js} +1 -1
- package/dist/twilight/{p-47b1aa89.entry.js → p-de3eeec4.entry.js} +1 -1
- package/dist/twilight/{p-e676c627.entry.js → p-dedfcc58.entry.js} +1 -1
- package/dist/twilight/{p-66561f9e.entry.js → p-e50b99cb.entry.js} +1 -1
- package/dist/twilight/{p-6cdc7f8a.entry.js → p-e6233f15.entry.js} +1 -1
- package/dist/twilight/{p-457a256d.entry.js → p-e63f5b80.entry.js} +1 -1
- package/dist/twilight/{p-8f2b2e42.entry.js → p-e77d6649.entry.js} +1 -1
- package/dist/twilight/{p-855a9db7.entry.js → p-e9cc9f4f.entry.js} +1 -1
- package/dist/twilight/{p-6e43f8a7.entry.js → p-eccd8aa9.entry.js} +1 -1
- package/dist/twilight/{p-a89fb313.entry.js → p-f174afea.entry.js} +1 -1
- package/dist/twilight/{p-360b6388.entry.js → p-f4583bb2.entry.js} +1 -1
- package/dist/twilight/{p-fc6adc90.entry.js → p-f48ada4a.entry.js} +1 -1
- package/dist/twilight/{p-b414760b.entry.js → p-f583571c.entry.js} +1 -1
- package/dist/twilight/{p-fac05e8f.entry.js → p-f7e38710.entry.js} +1 -1
- package/dist/twilight/{p-2733e78f.entry.js → p-fc0a3c91.entry.js} +1 -1
- package/dist/twilight/{p-61580839.entry.js → p-fd6aed5e.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +14 -12
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +0 -1
- package/dist/types/components/salla-wishlist-summary/salla-wishlist-summary.d.ts +18 -0
- package/dist/types/components.d.ts +45 -0
- package/package.json +5 -5
- package/dist/cjs/star-DMzrN05M.js +0 -13
- package/dist/components/star.js +0 -11
- package/dist/esm/star-CeFAfcTv.js +0 -11
- package/dist/twilight/p-5a86a794.entry.js +0 -4
- package/dist/twilight/p-8ed45c28.entry.js +0 -4
- package/dist/twilight/p-CUSw0W26.js +0 -4
- package/dist/twilight/p-CeFAfcTv.js +0 -4
- package/dist/twilight/p-b98ae2c1.entry.js +0 -4
- package/dist/twilight/p-e91bba7e.entry.js +0 -1024
- package/dist/twilight/p-f10fca84.entry.js +0 -4
|
@@ -0,0 +1,1024 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2019 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const a=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},r=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
* Copyright 2017 Google LLC
|
|
13
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
+
*/,{is:n,defineProperty:l,getOwnPropertyDescriptor:h,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,p=globalThis,m=p.trustedTypes,g=m?m.emptyScript:"",b=p.reactiveElementPolyfillSupport,f={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,e)=>!n(t,e),y={attribute:!0,type:String,converter:f,reflect:!1,useDefault:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;let w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&l(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const a=s?.call(this);o?.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...c(t),...d(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:f).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:f;this._$Em=s;const a=o.fromAttribute(e,t.type);this[s]=a??this._$Ej?.get(s)??a,this._$Em=null}}requestUpdate(t,e,i,s=!1,o){if(void 0!==t){const a=this.constructor;if(!1===s&&(o=this[t]),i??=a.getPropertyOptions(t),!((i.hasChanged??v)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},a){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==o||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w.elementProperties=new Map,w.finalized=new Map,b?.({ReactiveElement:w}),(p.reactiveElementVersions??=[]).push("2.1.2");
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/
|
|
20
|
+
const k=globalThis,x=k.trustedTypes,S=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+$,E=`<${A}>`,z=document,P=()=>z.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,_="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,B=/>/g,L=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,R=/"/g,j=/^(?:script|style|textarea|title)$/i,N=(t,...e)=>({_$litType$:1,strings:t,values:e}),D=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),G=new WeakMap,q=z.createTreeWalker(z,129);function V(t,e){if(!T(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const H=(t,e)=>{const i=t.length-1,s=[];let o,a=2===e?"<svg>":3===e?"<math>":"",r=O;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===O?"!--"===l[1]?r=I:void 0!==l[1]?r=B:void 0!==l[2]?(j.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=L):void 0!==l[3]&&(r=L):r===L?">"===l[0]?(r=o??O,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,n=l[1],r=void 0===l[3]?L:'"'===l[3]?R:U):r===R||r===U?r=L:r===I||r===B?r=O:(r=L,o=void 0);const d=r===L&&t[e+1].startsWith("/>")?" ":"";a+=r===O?i+E:h>=0?(s.push(n),i.slice(0,h)+C+i.slice(h)+$+d):i+$+(-2===h?e:d)}return[V(t,a+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};let W=class t{constructor({strings:e,_$litType$:i},s){let o;this.parts=[];let a=0,r=0;const n=e.length-1,l=this.parts,[h,c]=H(e,i);if(this.el=t.createElement(h,s),q.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=q.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(C)){const e=c[r++],i=o.getAttribute(t).split($),s=/([.?@])?(.*)/.exec(e);l.push({type:1,index:a,name:s[2],strings:i,ctor:"."===s[1]?X:"?"===s[1]?Q:"@"===s[1]?tt:J}),o.removeAttribute(t)}else t.startsWith($)&&(l.push({type:6,index:a}),o.removeAttribute(t));if(j.test(o.tagName)){const t=o.textContent.split($),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),q.nextNode(),l.push({type:2,index:++a});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:a});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:a}),t+=$.length-1}a++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}};function K(t,e,i=t,s){if(e===D)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const a=M(e)?void 0:e._$litDirective$;return o?.constructor!==a&&(o?._$AO?.(!1),void 0===a?o=void 0:(o=new a(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=K(t,o._$AS(t,e.values),o,s)),e}let Z=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);q.currentNode=s;let o=q.nextNode(),a=0,r=0,n=i[0];for(;void 0!==n;){if(a===n.index){let e;2===n.type?e=new Y(o,o.nextSibling,this,t):1===n.type?e=new n.ctor(o,n.name,n.strings,this,t):6===n.type&&(e=new et(o,this,t)),this._$AV.push(e),n=i[++r]}a!==n?.index&&(o=q.nextNode(),a++)}return q.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Y=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),M(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==D&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==F&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=W.createElement(V(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Z(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new W(t)),e}k(e){T(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,o=0;for(const a of e)o===i.length?i.push(s=new t(this.O(P()),this.O(P()),this,this.options)):s=i[o],s._$AI(a),o++;o<i.length&&(this._$AR(s&&s._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},J=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=F}_$AI(t,e=this,i,s){const o=this.strings;let a=!1;if(void 0===o)t=K(this,t,e,0),a=!M(t)||t!==this._$AH&&t!==D,a&&(this._$AH=t);else{const s=t;let r,n;for(t=o[0],r=0;r<o.length-1;r++)n=K(this,s[i+r],e,r),n===D&&(n=this._$AH[r]),a||=!M(n)||n!==this._$AH[r],n===F?t=F:t!==F&&(t+=(n??"")+o[r+1]),this._$AH[r]=n}a&&!s&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},X=class extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}},Q=class extends J{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==F)}},tt=class extends J{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??F)===D)return;const i=this._$AH,s=t===F&&i!==F||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==F&&(i===F||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},et=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}};const it=k.litHtmlPolyfillSupport;it?.(W,Y),(k.litHtmlVersions??=[]).push("3.3.2");const st=globalThis;
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2017 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/class ot extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Y(e.insertBefore(P(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}}ot._$litElement$=!0,ot.finalized=!0,st.litElementHydrateSupport?.({LitElement:ot});const at=st.litElementPolyfillSupport;at?.({LitElement:ot}),(st.litElementVersions??=[]).push("4.2.2");const rt=globalThis,nt=rt.ShadowRoot&&(void 0===rt.ShadyCSS||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol(),ht=new WeakMap;let ct=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(nt&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=ht.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ht.set(e,t))}return t}toString(){return this.cssText}};const dt=nt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new ct("string"==typeof t?t:t+"",void 0,lt))(e)})(t):t,{is:ut,defineProperty:pt,getOwnPropertyDescriptor:mt,getOwnPropertyNames:gt,getOwnPropertySymbols:bt,getPrototypeOf:ft}=Object,vt=globalThis,yt=vt.trustedTypes,wt=yt?yt.emptyScript:"",kt=vt.reactiveElementPolyfillSupport,xt={toAttribute(t,e){switch(e){case Boolean:t=t?wt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},St=(t,e)=>!ut(t,e),Ct={attribute:!0,type:String,converter:xt,reflect:!1,useDefault:!1,hasChanged:St};Symbol.metadata??=Symbol("metadata"),vt.litPropertyMetadata??=new WeakMap;let $t=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&pt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=mt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const a=s?.call(this);o?.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ct}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=ft(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...gt(t),...bt(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(dt(t))}else void 0!==t&&e.push(dt(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(nt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=rt.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:xt).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:xt;this._$Em=s;const a=o.fromAttribute(e,t.type);this[s]=a??this._$Ej?.get(s)??a,this._$Em=null}}requestUpdate(t,e,i,s=!1,o){if(void 0!==t){const a=this.constructor;if(!1===s&&(o=this[t]),i??=a.getPropertyOptions(t),!((i.hasChanged??St)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},a){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==o||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};$t.elementStyles=[],$t.shadowRootOptions={mode:"open"},$t.elementProperties=new Map,$t.finalized=new Map,kt?.({ReactiveElement:$t}),(vt.reactiveElementVersions??=[]).push("2.1.2");const At=globalThis,Et=At.trustedTypes,zt=Et?Et.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pt="$lit$",Mt=`lit$${Math.random().toFixed(9).slice(2)}$`,Tt="?"+Mt,_t=`<${Tt}>`,Ot=document,It=()=>Ot.createComment(""),Bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Lt=Array.isArray,Ut="[ \t\n\f\r]",Rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,jt=/-->/g,Nt=/>/g,Dt=RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Gt=/"/g,qt=/^(?:script|style|textarea|title)$/i,Vt=(t,...e)=>({_$litType$:1,strings:t,values:e}),Ht=Symbol.for("lit-noChange"),Wt=Symbol.for("lit-nothing"),Kt=new WeakMap,Zt=Ot.createTreeWalker(Ot,129);function Yt(t,e){if(!Lt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==zt?zt.createHTML(e):e}class Jt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,a=0;const r=t.length-1,n=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,a=2===e?"<svg>":3===e?"<math>":"",r=Rt;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===Rt?"!--"===l[1]?r=jt:void 0!==l[1]?r=Nt:void 0!==l[2]?(qt.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=Dt):void 0!==l[3]&&(r=Dt):r===Dt?">"===l[0]?(r=o??Rt,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,n=l[1],r=void 0===l[3]?Dt:'"'===l[3]?Gt:Ft):r===Gt||r===Ft?r=Dt:r===jt||r===Nt?r=Rt:(r=Dt,o=void 0);const d=r===Dt&&t[e+1].startsWith("/>")?" ":"";a+=r===Rt?i+_t:h>=0?(s.push(n),i.slice(0,h)+Pt+i.slice(h)+Mt+d):i+Mt+(-2===h?e:d)}return[Yt(t,a+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=Jt.createElement(l,i),Zt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Zt.nextNode())&&n.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(Pt)){const e=h[a++],i=s.getAttribute(t).split(Mt),r=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:r[2],strings:i,ctor:"."===r[1]?ie:"?"===r[1]?se:"@"===r[1]?oe:ee}),s.removeAttribute(t)}else t.startsWith(Mt)&&(n.push({type:6,index:o}),s.removeAttribute(t));if(qt.test(s.tagName)){const t=s.textContent.split(Mt),e=t.length-1;if(e>0){s.textContent=Et?Et.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],It()),Zt.nextNode(),n.push({type:2,index:++o});s.append(t[e],It())}}}else if(8===s.nodeType)if(s.data===Tt)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(Mt,t+1));)n.push({type:7,index:o}),t+=Mt.length-1}o++}}static createElement(t,e){const i=Ot.createElement("template");return i.innerHTML=t,i}}function Xt(t,e,i=t,s){if(e===Ht)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const a=Bt(e)?void 0:e._$litDirective$;return o?.constructor!==a&&(o?._$AO?.(!1),void 0===a?o=void 0:(o=new a(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Xt(t,o._$AS(t,e.values),o,s)),e}class Qt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??Ot).importNode(e,!0);Zt.currentNode=s;let o=Zt.nextNode(),a=0,r=0,n=i[0];for(;void 0!==n;){if(a===n.index){let e;2===n.type?e=new te(o,o.nextSibling,this,t):1===n.type?e=new n.ctor(o,n.name,n.strings,this,t):6===n.type&&(e=new ae(o,this,t)),this._$AV.push(e),n=i[++r]}a!==n?.index&&(o=Zt.nextNode(),a++)}return Zt.currentNode=Ot,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}let te=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=Wt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Xt(this,t,e),Bt(t)?t===Wt||null==t||""===t?(this._$AH!==Wt&&this._$AR(),this._$AH=Wt):t!==this._$AH&&t!==Ht&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Lt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Wt&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ot.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Jt.createElement(Yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Qt(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Kt.get(t.strings);return void 0===e&&Kt.set(t.strings,e=new Jt(t)),e}k(e){Lt(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,o=0;for(const a of e)o===i.length?i.push(s=new t(this.O(It()),this.O(It()),this,this.options)):s=i[o],s._$AI(a),o++;o<i.length&&(this._$AR(s&&s._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ee=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Wt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Wt}_$AI(t,e=this,i,s){const o=this.strings;let a=!1;if(void 0===o)t=Xt(this,t,e,0),a=!Bt(t)||t!==this._$AH&&t!==Ht,a&&(this._$AH=t);else{const s=t;let r,n;for(t=o[0],r=0;r<o.length-1;r++)n=Xt(this,s[i+r],e,r),n===Ht&&(n=this._$AH[r]),a||=!Bt(n)||n!==this._$AH[r],n===Wt?t=Wt:t!==Wt&&(t+=(n??"")+o[r+1]),this._$AH[r]=n}a&&!s&&this.j(t)}j(t){t===Wt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class ie extends ee{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Wt?void 0:t}}class se extends ee{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Wt)}}class oe extends ee{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Xt(this,t,e,0)??Wt)===Ht)return;const i=this._$AH,s=t===Wt&&i!==Wt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==Wt&&(i===Wt||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ae{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Xt(this,t)}}const re=At.litHtmlPolyfillSupport;re?.(Jt,te),(At.litHtmlVersions??=[]).push("3.3.2");const ne=globalThis;let le=class extends $t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new te(e.insertBefore(It(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ht}};le._$litElement$=!0,le.finalized=!0,ne.litElementHydrateSupport?.({LitElement:le});const he=ne.litElementPolyfillSupport;he?.({LitElement:le}),(ne.litElementVersions??=[]).push("4.2.2");const ce={attribute:!0,type:String,converter:xt,reflect:!1,hasChanged:St},de=(t=ce,e,i)=>{const{kind:s,metadata:o}=i;let a=globalThis.litPropertyMetadata.get(o);if(void 0===a&&globalThis.litPropertyMetadata.set(o,a=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),a.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function ue(t){return(e,i)=>"object"==typeof i?de(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function pe(t){return ue({...t,state:!0,attribute:!1})}const me=t=>(...e)=>({_$litDirective$:t,values:e});class ge{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const be=me(class extends ge{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return Ht}}),fe={},ve=me(class extends ge{constructor(t){if(super(t),3!==t.type&&1!==t.type&&4!==t.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===Ht||e===Wt)return e;const i=t.element,s=t.name;if(3===t.type){if(e===i[s])return Ht}else if(4===t.type){if(!!e===i.hasAttribute(s))return Ht}else if(1===t.type&&i.getAttribute(s)===e+"")return Ht;return((t,e=fe)=>{t._$AH=e})(t),e}}),ye=["AE","AR","AT","AU","BE","BG","BR","CA","CH","CL","CO","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HK","HR","HU","ID","IE","IL","IN","IT","JP","KR","LT","LU","LV","MX","MY","NL","NO","NZ","PE","PH","PL","PT","RO","SE","SG","SI","SK","TH","TR","TW","US","VN","ZA"];function we(t,e){let i=null;return t.address_components?i=function(t){if(!t)return null;const e=t.find((t=>t.types?.includes("country")));return e?e.short_name:null}(t.address_components):e&&1===e.length&&(i=e[0].toUpperCase()),i?{isSupported:ye.includes(i),countryCode:i}:{isSupported:null,countryCode:null}}const ke={en:{placeholder:"Search for an address...",noResults:"No address found for this search. Try different keywords.",errorFetchPredictions:"Unable to search for addresses. Please try again.",errorFetchDetails:"Unable to load address details. Please try again.",errorNetwork:"Network error. Please check your connection and try again.",validationRequired:"This field is required",validationPattern:"Invalid format",validationSaudiFormat:"Please enter a valid Saudi national address (format: AAAA1234)"},ar:{placeholder:"ابحث عن عنوان...",noResults:"لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",errorFetchPredictions:"تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",errorFetchDetails:"تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",errorNetwork:"خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى.",validationRequired:"هذا الحقل مطلوب",validationPattern:"صيغة غير صحيحة",validationSaudiFormat:"الرجاء إدخال عنوان وطني صحيح (الصيغة: AAAA1234)"},es:{placeholder:"Buscar una dirección...",noResults:"No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",errorFetchPredictions:"No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",errorFetchDetails:"No se pueden cargar los detalles de la dirección. Por favor, inténtelo de nuevo.",errorNetwork:"Error de red. Verifique su conexión e inténtelo de nuevo.",validationRequired:"Este campo es obligatorio",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor ingrese una dirección nacional saudí válida (formato: AAAA1234)"},fr:{placeholder:"Rechercher une adresse...",noResults:"Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",errorFetchPredictions:"Impossible de rechercher des adresses. Veuillez réessayer.",errorFetchDetails:"Impossible de charger les détails de l'adresse. Veuillez réessayer.",errorNetwork:"Erreur réseau. Vérifiez votre connexion et réessayez.",validationRequired:"Ce champ est obligatoire",validationPattern:"Format invalide",validationSaudiFormat:"Veuillez saisir une adresse nationale saoudienne valide (format: AAAA1234)"},de:{placeholder:"Nach einer Adresse suchen...",noResults:"Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",errorFetchPredictions:"Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",errorFetchDetails:"Adressdetails können nicht geladen werden. Bitte versuchen Sie es erneut.",errorNetwork:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",validationRequired:"Dieses Feld ist erforderlich",validationPattern:"Ungültiges Format",validationSaudiFormat:"Bitte geben Sie eine gültige saudi-arabische nationale Adresse ein (Format: AAAA1234)"},it:{placeholder:"Cerca un indirizzo...",noResults:"Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",errorFetchPredictions:"Impossibile cercare indirizzi. Riprova.",errorFetchDetails:"Impossibile caricare i dettagli dell'indirizzo. Riprova.",errorNetwork:"Errore di rete. Controlla la connessione e riprova.",validationRequired:"Questo campo è obbligatorio",validationPattern:"Formato non valido",validationSaudiFormat:"Inserisci un indirizzo nazionale saudita valido (formato: AAAA1234)"},pt:{placeholder:"Pesquisar um endereço...",noResults:"Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",errorFetchPredictions:"Não é possível pesquisar endereços. Por favor, tente novamente.",errorFetchDetails:"Não é possível carregar os detalhes do endereço. Por favor, tente novamente.",errorNetwork:"Erro de rede. Verifique sua conexão e tente novamente.",validationRequired:"Este campo é obrigatório",validationPattern:"Formato inválido",validationSaudiFormat:"Por favor, insira um endereço nacional saudita válido (formato: AAAA1234)"},ru:{placeholder:"Поиск адреса...",noResults:"Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",errorFetchPredictions:"Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",errorFetchDetails:"Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",errorNetwork:"Ошибка сети. Проверьте соединение и попробуйте еще раз.",validationRequired:"Это поле обязательно",validationPattern:"Неверный формат",validationSaudiFormat:"Пожалуйста, введите действительный национальный адрес Саудовской Аравии (формат: AAAA1234)"},ja:{placeholder:"住所を検索...",noResults:"この検索では住所が見つかりませんでした。別のキーワードをお試しください。",errorFetchPredictions:"住所を検索できません。もう一度お試しください。",errorFetchDetails:"住所の詳細を読み込めません。もう一度お試しください。",errorNetwork:"ネットワークエラー。接続を確認してもう一度お試しください。",validationRequired:"この項目は必須です",validationPattern:"無効な形式",validationSaudiFormat:"有効なサウジアラビアの国内住所を入力してください(形式:AAAA1234)"},zh:{placeholder:"搜索地址...",noResults:"未找到此搜索的地址。请尝试不同的关键词。",errorFetchPredictions:"无法搜索地址。请重试。",errorFetchDetails:"无法加载地址详情。请重试。",errorNetwork:"网络错误。请检查您的连接并重试。",validationRequired:"此字段为必填项",validationPattern:"格式无效",validationSaudiFormat:"请输入有效的沙特国家地址(格式:AAAA1234)"},ko:{placeholder:"주소 검색...",noResults:"이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",errorFetchPredictions:"주소를 검색할 수 없습니다. 다시 시도해주세요.",errorFetchDetails:"주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",errorNetwork:"네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요.",validationRequired:"이 필드는 필수입니다",validationPattern:"유효하지 않은 형식",validationSaudiFormat:"유효한 사우디 국가 주소를 입력하세요 (형식: AAAA1234)"},hi:{placeholder:"पता खोजें...",noResults:"इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",errorFetchPredictions:"पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",errorFetchDetails:"पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",errorNetwork:"नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।",validationRequired:"यह फ़ील्ड आवश्यक है",validationPattern:"अमान्य प्रारूप",validationSaudiFormat:"कृपया एक मान्य सऊदी राष्ट्रीय पता दर्ज करें (प्रारूप: AAAA1234)"},tr:{placeholder:"Adres ara...",noResults:"Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",errorFetchPredictions:"Adresler aranamıyor. Lütfen tekrar deneyin.",errorFetchDetails:"Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",errorNetwork:"Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin.",validationRequired:"Bu alan zorunludur",validationPattern:"Geçersiz format",validationSaudiFormat:"Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"}};function xe(t="en"){return ke[t]||ke.en}var Se=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,$e=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?Ce(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Se(e,i,a),a};let Ae=class extends le{constructor(){super(),this.proxyUrl="https://api.salla.dev",this.authToken=null,this.placeholder="",this.defaultPlace="",this.label=null,this.className="",this.language="en",this.dir="auto",this.mode="search",this.name="",this.required=!1,this.pattern=null,this.tooltip=null,this.selectedId=null,this.errors=[],this.disabled=!1,this._value="",this._country=null,this.locationBias=null,this.locationRestriction=null,this.types=null,this._fields=["formatted_address","geometry"],this.strictBounds=!1,this.useSessionToken=!0,this.resolve=!1,this.onValidateAddress=null,this.debounceDelay=300,this.minChars=3,this.predictions=[],this.isOpen=!1,this.isLoading=!1,this.error=null,this.activeIndex=-1,this.inputValue="",this.sessionToken=null,this.validationError=null,this.touched=!1,this.showNationalAddressIcon=!1,this.abortController=null,this._internals=this.attachInternals()}set value(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}get value(){return this._value}set country(t){this._country=null==t?null:Array.isArray(t)?t.filter((t=>t&&t.trim())).map((t=>t.trim())):t.split(",").map((t=>t.trim())).filter((t=>t))}get country(){return this._country}set fieldsStr(t){this._fields=t?t.split(",").map((t=>t.trim())).filter((t=>t)):["formatted_address","geometry"]}get fieldsStr(){return this._fields.join(",")}set fields(t){this._fields=t&&t.length>0?t:["formatted_address","geometry"]}get fields(){return this._fields}connectedCallback(){super.connectedCallback(),this.createNewSession(),this.initializeDebounce()}disconnectedCallback(){super.disconnectedCallback(),this.terminateSession(),this.cancelPendingRequest()}initializeDebounce(){this.debouncedFetch=function(t,e){let i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}(this.fetchPredictions.bind(this),this.debounceDelay)}firstUpdated(){const t=this.value||this.defaultPlace||"";t&&(this.inputValue=t,this.isSaudiFormMode()&&this.isShortAddressFormat(t)&&(this.showNationalAddressIcon=!0))}$nextTick(t){Promise.resolve().then(t)}isShortAddressFormat(t){return/^[a-zA-Z]{4}\d{4}$/.test(t?.trim())}updated(t){if(t.has("value")){const t=this.value||"";t!==this.inputValue&&(this.inputValue=t,this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&t&&this.isShortAddressFormat(t)))}t.has("defaultPlace")&&!this.value&&this.defaultPlace!==this.inputValue&&(this.inputValue=this.defaultPlace||"",this.showNationalAddressIcon=!!(this.isSaudiFormMode()&&this.defaultPlace&&this.isShortAddressFormat(this.defaultPlace))),t.has("selectedId")&&this.selectedId&&this.selectedId!==this.inputValue&&this.isSaudiFormMode()&&this.isShortAddressFormat(this.selectedId)&&(this.inputValue=this.selectedId||"",this.showNationalAddressIcon=!0,this._internals.setFormValue(this.selectedId||"")),t.has("debounceDelay")&&this.initializeDebounce()}createNewSession(){this.useSessionToken&&(this.sessionToken=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})))}terminateSession(){this.sessionToken=null}cancelPendingRequest(){this.abortController&&(this.abortController.abort(),this.abortController=null)}isSaudiFormMode(){return"form"===this.mode&&null!==this.country&&1===this.country.length&&"sa"===this.country[0].toLowerCase()}getWhatsAppLink(){return`https://wa.me/966112898888?text=${encodeURIComponent("العنوان الوطني")}`}renderWhatsAppIcon(){return Vt`
|
|
26
|
+
<svg class="whatsapp-icon" viewBox="0 0 24 24" fill="currentColor" part="whatsapp-icon">
|
|
27
|
+
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
|
|
28
|
+
</svg>
|
|
29
|
+
`}getSaudiHelpTextContent(){return{helpText:"ar"===this.language?"لا تعرف العنوان الوطني؟":"Don't know your national address?",linkText:"ar"===this.language?"احصل على العنوان الوطني عبر الواتساب":"Get your national address via WhatsApp"}}renderSaudiFriendlyError(){let t,e;this.inputValue&&this.inputValue.trim().length>0?(t="العنوان الوطني المختصر غير صحيح (الصيغة: AAAA1234). يمكنك الحصول عليه بسهولة",e="The short national address format is incorrect (format: AAAA1234). You can easily get it"):(t="العنوان الوطني المختصر مطلوب. يمكنك الحصول عليه بسهولة",e="The short national address is required. You can easily get it");const i="ar"===this.language?"عبر الواتساب (اضغط هنا)":"via WhatsApp (click here)",s="ar"===this.language?"أو ابحث أعلاه":"or search above";return Vt`
|
|
30
|
+
<span>
|
|
31
|
+
${"ar"===this.language?t:e}
|
|
32
|
+
<a
|
|
33
|
+
href="${this.getWhatsAppLink()}"
|
|
34
|
+
target="_blank"
|
|
35
|
+
rel="noopener noreferrer"
|
|
36
|
+
class="whatsapp-link-inline"
|
|
37
|
+
part="whatsapp-link"
|
|
38
|
+
>
|
|
39
|
+
${this.renderWhatsAppIcon()}
|
|
40
|
+
${i}
|
|
41
|
+
</a>
|
|
42
|
+
${s}
|
|
43
|
+
</span>
|
|
44
|
+
`}renderSaudiHelpText(){if(!this.isSaudiFormMode()||this.validationError||this.errors&&this.errors.length>0)return"";const t="ar"===this.language?"عبر الواتساب (اضغط هنا)":"via WhatsApp (click here)",e="ar"===this.language?"أو ابحث أعلاه":"or search above";return Vt`
|
|
45
|
+
<div class="help-text" part="help-text">
|
|
46
|
+
<span>
|
|
47
|
+
${"ar"===this.language?"لا تعرف العنوان الوطني؟ احصل عليه بسهولة":"Don't know your national address? Get it easily"}
|
|
48
|
+
<a
|
|
49
|
+
href="${this.getWhatsAppLink()}"
|
|
50
|
+
target="_blank"
|
|
51
|
+
rel="noopener noreferrer"
|
|
52
|
+
class="whatsapp-link-inline"
|
|
53
|
+
part="whatsapp-link"
|
|
54
|
+
>
|
|
55
|
+
${this.renderWhatsAppIcon()}
|
|
56
|
+
${t}
|
|
57
|
+
</a>
|
|
58
|
+
${e}
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
`}async fetchPredictions(t){if(!t.trim())return this.predictions=[],this.isOpen=!1,void(this.isLoading=!1);if(t.trim().length<this.minChars)return this.predictions=[],this.isOpen=!1,void(this.isLoading=!1);this.cancelPendingRequest(),this.abortController=new AbortController;const e=this.abortController.signal;this.isLoading=!0,this.error=null;try{const i={input:t,language:this.language};this.sessionToken&&(i.sessiontoken=this.sessionToken),this.country&&this.country.length>0&&(i.country=this.country.join(",")),this.types&&this.types.length>0&&(i.types=this.types.join("|")),this.locationBias&&this.locationBias.radius&&this.locationBias.center&&(i.location=`${this.locationBias.center.lat},${this.locationBias.center.lng}`,i.radius=this.locationBias.radius.toString()),this.strictBounds&&(i.strictbounds="true");const s=new URLSearchParams(i),o=`${this.proxyUrl||""}/store/v1/checkout/address/autocomplete/query?${s.toString()}`,a={};this.authToken&&(a.Authorization=`Bearer ${this.authToken}`);const r=await fetch(o,{signal:e,headers:a});if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);const n=await r.json();n.success&&Array.isArray(n.data)?(this.error=null,n.data.length>0?(this.predictions=n.data.map((t=>({place_id:t.id,description:t.description||t.formatted_address,formatted_address:t.formatted_address,short_address:t.short_address,structured_formatting:{main_text:t.formatted_address||t.description,main_text_matched_substrings:[],secondary_text:t.description||""},types:t.types||[],geometry:t.geometry,address_components:t.address_components}))),this.isOpen=!0,this.activeIndex=-1):(this.predictions=[],this.isOpen=!0)):(this.predictions=[],this.isOpen=!0)}catch(t){if(t instanceof Error&&"AbortError"===t.name)return;this.predictions=[],this.isOpen=!0}finally{this.isLoading=!1,this.abortController=null}}async fetchPlaceDetails(t){this.isLoading=!0,this.error=null;try{const e={place_id:t,language:this.language};this.fields&&this.fields.length>0&&(e.fields=this.fields.join(",")),this.sessionToken&&(e.sessiontoken=this.sessionToken),this.country&&this.country.length>0&&(e.country=this.country.join(",")),this.resolve&&(e.resolve="true");const i=new URLSearchParams(e),s=`${this.proxyUrl||""}/store/v1/checkout/address/autocomplete/details?${i.toString()}`,o={};this.authToken&&(o.Authorization=`Bearer ${this.authToken}`);const a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);const r=await a.json();return!r.success||r.message?(this.error=r.message||"Failed to fetch place details",null):r.success&&r.data&&r.data.id?{place_id:r.data.id,...r.data,components:r.data.address_components?.reduce(((t,e)=>(e.types?.forEach((i=>{t[i]||(t[i]=[]),t[i].push({long_name:e.long_name,short_name:e.short_name})})),t)),{})}:null}catch(t){console.error("Error fetching place details:",t);const e=xe(this.language);return this.error=t instanceof Error?t.message:e.errorFetchDetails,null}finally{this.isLoading=!1}}async validateAddress(t){try{if(!t||!t.formatted_address)return console.error("Cannot validate address - place or formatted_address is missing"),null;if(!this.onValidateAddress||"function"!=typeof this.onValidateAddress)return console.error("onValidateAddress callback is required for address validation"),null;const e=we(t,this.country),i=await this.onValidateAddress({place:t,sessionToken:this.sessionToken,validationSupport:e});return this.terminateSession(),i}catch(t){return console.error("Error validating address:",t),this.terminateSession(),null}}getValidationSupport(t){return we(t,this.country)}checkValidity(){return this.validate()}reportValidity(){this.touched=!0;const t=this.validate();return t||this.dispatchEvent(new CustomEvent("invalid",{detail:{error:this.validationError},bubbles:!0,composed:!0})),t}reset(){this.inputValue="",this.selectedId=null,this.validationError=null,this.errors=[],this.touched=!1,this.predictions=[],this.isOpen=!1,this.error=null,this.showNationalAddressIcon=!1,"form"===this.mode&&(this._internals.setFormValue(null),this._internals.setValidity({}))}formResetCallback(){this.reset()}formStateRestoreCallback(t){t&&"form"===this.mode&&(this.selectedId=t)}validate(){if("form"!==this.mode)return!0;const t=xe(this.language),e=this.inputValue||"";return this.required&&!e.trim()?(this.validationError=t.validationRequired,this._internals.setValidity({valueMissing:!0},this.validationError,this.inputElement),!1):this.isSaudiFormMode()&&e.trim()&&!this.isShortAddressFormat(e)?(this.validationError=t.validationSaudiFormat,this._internals.setValidity({patternMismatch:!0},this.validationError,this.inputElement),!1):this.pattern&&e.trim()&&!new RegExp(this.pattern).test(e)?(this.validationError=t.validationPattern,this._internals.setValidity({patternMismatch:!0},this.validationError,this.inputElement),!1):(this.validationError=null,this._internals.setValidity({}),!0)}normalizeNumerals(t){if(!t)return t;const e={"٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","०":"0","१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","০":"0","১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9"};return t.split("").map((t=>e[t]??t)).join("")}handleInput(t){if(this.disabled)return;const e=t.target,i=e.selectionStart??0,s=this.inputValue,o=e.value,a=this.normalizeNumerals(o);a!==o&&(e.value=a,requestAnimationFrame((()=>{e.setSelectionRange(i,i)}))),this.inputValue=a,this.touched=!0,this.showNationalAddressIcon&&(this.showNationalAddressIcon=!1),"form"===this.mode&&(this.validationError&&(this.validationError=null),this.selectedId=null,this._internals.setFormValue(this.inputValue||null),this.validate()),this.errors&&this.errors.length>0&&(this.errors=[]),this.inputValue.trim().length>=this.minChars&&(this.isLoading=!0),this.debouncedFetch(this.inputValue),this._value=this.inputValue,this.requestUpdate("value",s),this.dispatchEvent(new CustomEvent("input",{detail:{value:this.inputValue},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new InputEvent("input",{data:this.inputValue,bubbles:!0,composed:!0}))}async handleSelect(t){if(this.disabled)return;this.isSaudiFormMode()&&t.place_id&&this.isShortAddressFormat(t.place_id)?(this.inputValue=t.place_id,this.showNationalAddressIcon=!0):(this.inputValue=t.formatted_address,this.showNationalAddressIcon=!1),this.isOpen=!1,this.predictions=[],this.touched=!0;let e=null;if(e="form"===this.mode?await this.fetchPlaceDetails(t.place_id):t.geometry?.location?{place_id:t.place_id,formatted_address:t.formatted_address||t.description,geometry:t.geometry,types:t.types,address_components:t.address_components}:await this.fetchPlaceDetails(t.place_id),e){this.isSaudiFormMode()&&e.place_id&&this.isShortAddressFormat(e.place_id)?(this.inputValue=e.place_id,this.showNationalAddressIcon=!0):(e.formatted_address&&(this.inputValue=e.formatted_address),this.showNationalAddressIcon=!1),"form"===this.mode&&(this.selectedId=e.place_id,this._internals.setFormValue(this.inputValue),this.validate()),this._value=this.inputValue,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.inputValue},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}));const t=this.getValidationSupport(e);this.dispatchEvent(new CustomEvent("place-select",{detail:{place:e,validationSupport:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("place-changed",{detail:{place:e,validationSupport:t},bubbles:!0,composed:!0}))}}handleKeyDown(t){if(!this.disabled&&this.isOpen&&0!==this.predictions.length)switch(t.key){case"ArrowDown":t.preventDefault(),this.activeIndex=Math.min(this.activeIndex+1,this.predictions.length-1);break;case"ArrowUp":t.preventDefault(),this.activeIndex=Math.max(this.activeIndex-1,-1);break;case"Enter":t.preventDefault(),this.activeIndex>=0&&this.activeIndex<this.predictions.length&&this.handleSelect(this.predictions[this.activeIndex]);break;case"Escape":t.preventDefault(),this.isOpen=!1,this.activeIndex=-1}}handleBlur(){setTimeout((()=>{this.isOpen=!1,this.activeIndex=-1,"form"===this.mode&&this.touched&&this.validate(),this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0}))}),200)}handleFocus(){this.disabled||this.predictions.length>0&&(this.isOpen=!0)}renderLocationIcon(){return Vt`
|
|
62
|
+
<svg class="location-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
63
|
+
<path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
|
|
64
|
+
</svg>
|
|
65
|
+
`}renderTooltip(){return this.tooltip?Vt`
|
|
66
|
+
<span class="tooltip-toggle" part="tooltip-toggle">
|
|
67
|
+
<svg class="tooltip-icon" part="tooltip-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
68
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
69
|
+
</svg>
|
|
70
|
+
<span class="tooltip-content" part="tooltip-content">${this.tooltip}</span>
|
|
71
|
+
</span>
|
|
72
|
+
`:""}renderPrediction(t,e){const i={"dropdown-item":!0,active:e===this.activeIndex};let s=t.structured_formatting.main_text;return t.short_address&&s.includes(t.short_address)&&(s=s.replace(t.short_address,"").trim(),s=s.replace(/\s*,\s*,\s*/g,", ").replace(/^\s*,\s*|\s*,\s*$/g,"").trim()),Vt`
|
|
73
|
+
<div
|
|
74
|
+
class=${be(i)}
|
|
75
|
+
part="dropdown-item ${e===this.activeIndex?"dropdown-item-active":""}"
|
|
76
|
+
@click=${()=>this.handleSelect(t)}
|
|
77
|
+
role="option"
|
|
78
|
+
aria-selected=${e===this.activeIndex}
|
|
79
|
+
>
|
|
80
|
+
${this.renderLocationIcon()}
|
|
81
|
+
<div class="place-info" part="place-info">
|
|
82
|
+
<div class="main-text" part="main-text">
|
|
83
|
+
${t.short_address?Vt`
|
|
84
|
+
<span class="national-address-badge" part="national-address-badge">
|
|
85
|
+
<img
|
|
86
|
+
src="https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png"
|
|
87
|
+
alt="national address icon"
|
|
88
|
+
class="national-address-icon"
|
|
89
|
+
/>
|
|
90
|
+
<span class="national-address-text">${t.short_address}</span>
|
|
91
|
+
<span class="national-address-separator">-</span>
|
|
92
|
+
</span>
|
|
93
|
+
`:""}
|
|
94
|
+
${s}
|
|
95
|
+
</div>
|
|
96
|
+
${t.structured_formatting.secondary_text?Vt`
|
|
97
|
+
<div class="secondary-text" part="secondary-text">
|
|
98
|
+
${t.structured_formatting.secondary_text}
|
|
99
|
+
</div>
|
|
100
|
+
`:""}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
`}render(){const t={dropdown:!0,open:this.isOpen},e={"is-invalid":!("form"!==this.mode||!this.validationError)||this.errors&&this.errors.length>0,"with-national-icon":this.showNationalAddressIcon},i={required:"form"===this.mode&&this.required},s=xe(this.language),o="auto"===this.dir?function(t){return["ar"].includes(t)}(this.language)?"rtl":"ltr":this.dir,a=this.placeholder||s.placeholder,r=this.name||"salla-address-search";return Vt`
|
|
104
|
+
<div class="wrapper ${this.className}" part="wrapper" dir="${o}">
|
|
105
|
+
<div class="input-container" part="input-container">
|
|
106
|
+
${this.label?Vt`
|
|
107
|
+
<label part="label" class=${be(i)}>
|
|
108
|
+
<span class="label-content">
|
|
109
|
+
<span>${this.label}</span>
|
|
110
|
+
${this.renderTooltip()}
|
|
111
|
+
</span>
|
|
112
|
+
</label>
|
|
113
|
+
`:""}
|
|
114
|
+
<div class="input-wrapper">
|
|
115
|
+
<input
|
|
116
|
+
part="input"
|
|
117
|
+
class=${be(e)}
|
|
118
|
+
type="text"
|
|
119
|
+
name="${r}"
|
|
120
|
+
.value=${ve(this.inputValue)}
|
|
121
|
+
placeholder=${a}
|
|
122
|
+
?disabled=${this.disabled}
|
|
123
|
+
@input=${this.handleInput}
|
|
124
|
+
@keydown=${this.handleKeyDown}
|
|
125
|
+
@blur=${this.handleBlur}
|
|
126
|
+
@focus=${this.handleFocus}
|
|
127
|
+
role="combobox"
|
|
128
|
+
aria-expanded=${this.isOpen}
|
|
129
|
+
aria-autocomplete="list"
|
|
130
|
+
aria-controls="predictions-list"
|
|
131
|
+
aria-invalid=${"form"===this.mode&&this.validationError||this.errors&&this.errors.length>0?"true":"false"}
|
|
132
|
+
aria-required=${"form"===this.mode&&this.required?"true":"false"}
|
|
133
|
+
autocomplete="off"
|
|
134
|
+
autocorrect="off"
|
|
135
|
+
autocapitalize="off"
|
|
136
|
+
spellcheck="false"
|
|
137
|
+
/>
|
|
138
|
+
${this.isLoading?Vt`<div class="loading-spinner" part="spinner"></div>`:""}
|
|
139
|
+
|
|
140
|
+
<div
|
|
141
|
+
id="predictions-list"
|
|
142
|
+
class=${be(t)}
|
|
143
|
+
part="dropdown"
|
|
144
|
+
role="listbox"
|
|
145
|
+
>
|
|
146
|
+
${this.predictions.length>0?this.predictions.map(((t,e)=>this.renderPrediction(t,e))):this.inputValue&&!this.isLoading?Vt`<div class="no-results" part="no-results">${s.noResults}</div>`:""}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
${"form"===this.mode&&this.validationError?Vt`
|
|
150
|
+
<div class="validation-error" part="validation-error">
|
|
151
|
+
${this.isSaudiFormMode()?this.renderSaudiFriendlyError():Vt`<span>${this.validationError}</span>`}
|
|
152
|
+
</div>
|
|
153
|
+
`:""}
|
|
154
|
+
${this.errors&&this.errors.length>0?Vt`
|
|
155
|
+
<div class="validation-error" part="validation-error">${this.errors[0]}</div>
|
|
156
|
+
`:""}
|
|
157
|
+
${this.error?Vt`<div class="error-message" part="error">${this.error}</div>`:""}
|
|
158
|
+
${this.renderSaudiHelpText()}
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
`}};Ae.formAssociated=!0,Ae.styles=((t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new ct(i,t,lt)})`
|
|
162
|
+
:host {
|
|
163
|
+
display: block;
|
|
164
|
+
position: relative;
|
|
165
|
+
font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.wrapper {
|
|
169
|
+
position: relative;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.input-container {
|
|
173
|
+
display: flex;
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.input-wrapper {
|
|
178
|
+
position: relative;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
label {
|
|
182
|
+
display: block;
|
|
183
|
+
margin-bottom: var(--salla-autocomplete-label-margin, 0.5rem);
|
|
184
|
+
font-size: var(--salla-autocomplete-label-font-size, 0.875rem);
|
|
185
|
+
font-weight: var(--salla-autocomplete-label-font-weight, 500);
|
|
186
|
+
color: var(--salla-autocomplete-label-color, #374151);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
label.required::after {
|
|
190
|
+
content: ' *';
|
|
191
|
+
color: var(--salla-autocomplete-required-color, #dc2626);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.label-content {
|
|
195
|
+
display: inline-flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: 0.5rem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.tooltip-toggle {
|
|
201
|
+
position: relative;
|
|
202
|
+
display: inline-flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
cursor: help;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.tooltip-icon {
|
|
208
|
+
width: 1rem;
|
|
209
|
+
height: 1rem;
|
|
210
|
+
color: var(--salla-autocomplete-tooltip-icon-color, #6b7280);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tooltip-content {
|
|
214
|
+
display: none;
|
|
215
|
+
position: absolute;
|
|
216
|
+
bottom: 125%;
|
|
217
|
+
left: 50%;
|
|
218
|
+
transform: translateX(-50%);
|
|
219
|
+
background: var(--salla-autocomplete-tooltip-bg, #1f2937);
|
|
220
|
+
color: var(--salla-autocomplete-tooltip-color, white);
|
|
221
|
+
padding: 0.5rem 0.75rem;
|
|
222
|
+
border-radius: 0.375rem;
|
|
223
|
+
font-size: 0.75rem;
|
|
224
|
+
line-height: 1.4;
|
|
225
|
+
white-space: nowrap;
|
|
226
|
+
z-index: 1000;
|
|
227
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.tooltip-content::after {
|
|
231
|
+
content: '';
|
|
232
|
+
position: absolute;
|
|
233
|
+
top: 100%;
|
|
234
|
+
left: 50%;
|
|
235
|
+
transform: translateX(-50%);
|
|
236
|
+
border: 5px solid transparent;
|
|
237
|
+
border-top-color: var(--salla-autocomplete-tooltip-bg, #1f2937);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.tooltip-toggle:hover .tooltip-content,
|
|
241
|
+
.tooltip-toggle:focus .tooltip-content {
|
|
242
|
+
display: block;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
input {
|
|
246
|
+
width: 100%;
|
|
247
|
+
padding-block: 0.75rem;
|
|
248
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
|
|
249
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end, 2.75rem);
|
|
250
|
+
font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
|
|
251
|
+
font-size: var(--salla-autocomplete-input-font-size, 1rem);
|
|
252
|
+
line-height: var(--salla-autocomplete-input-line-height, 1.5);
|
|
253
|
+
border: var(--salla-autocomplete-input-border, 1px solid #d1d5db);
|
|
254
|
+
border-radius: var(--salla-autocomplete-input-border-radius, 0.5rem);
|
|
255
|
+
background: var(--salla-autocomplete-input-background, white);
|
|
256
|
+
color: var(--salla-autocomplete-input-color, #111827);
|
|
257
|
+
outline: none;
|
|
258
|
+
transition: all 0.2s;
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
height: var(--salla-autocomplete-input-height, auto);
|
|
261
|
+
min-height: var(--salla-autocomplete-input-height, 44px);
|
|
262
|
+
-webkit-appearance: none;
|
|
263
|
+
appearance: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
input.with-national-icon {
|
|
267
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-icon, 2rem);
|
|
268
|
+
background-image: url('https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png');
|
|
269
|
+
background-repeat: no-repeat;
|
|
270
|
+
background-position: 0.75rem center;
|
|
271
|
+
background-size: 16px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
input.with-national-icon[dir="rtl"],
|
|
275
|
+
:host([dir="rtl"]) input.with-national-icon {
|
|
276
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
|
|
277
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-icon, 2.75rem);
|
|
278
|
+
background-position: calc(100% - 0.75rem) center;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@media (max-width: 640px) {
|
|
282
|
+
input {
|
|
283
|
+
font-size: var(--salla-autocomplete-input-font-size-mobile, 16px);
|
|
284
|
+
padding-block: 0.75rem;
|
|
285
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
|
|
286
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-mobile, 2.75rem);
|
|
287
|
+
min-height: 44px;
|
|
288
|
+
touch-action: manipulation;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
input.with-national-icon {
|
|
292
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-icon-mobile, 2rem);
|
|
293
|
+
background-position: 0.875rem center;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
input.with-national-icon[dir="rtl"],
|
|
297
|
+
:host([dir="rtl"]) input.with-national-icon {
|
|
298
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
|
|
299
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-icon-mobile, 2.75rem);
|
|
300
|
+
background-position: calc(100% - 0.875rem) center;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
input:focus {
|
|
305
|
+
border-color: var(--salla-autocomplete-input-focus-border-color, #3b82f6);
|
|
306
|
+
box-shadow: var(--salla-autocomplete-input-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.1));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
input:disabled {
|
|
310
|
+
background-color: var(--salla-autocomplete-input-disabled-bg, #f3f4f6);
|
|
311
|
+
cursor: not-allowed;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
input.is-invalid {
|
|
315
|
+
border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
input.is-invalid:focus {
|
|
319
|
+
border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
|
|
320
|
+
box-shadow: var(--salla-autocomplete-input-error-shadow, 0 0 0 3px rgba(220, 38, 38, 0.1));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
input::placeholder {
|
|
324
|
+
color: var(--salla-autocomplete-input-placeholder-color, #9ca3af);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.validation-error {
|
|
328
|
+
display: flex;
|
|
329
|
+
flex-wrap: wrap;
|
|
330
|
+
align-items: center;
|
|
331
|
+
gap: 0.5rem;
|
|
332
|
+
margin-top: 0.375rem;
|
|
333
|
+
font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
|
|
334
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
335
|
+
line-height: 1.5;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.validation-error > span {
|
|
339
|
+
line-height: 1.5;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.whatsapp-link-inline {
|
|
343
|
+
color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
|
|
344
|
+
white-space: nowrap;
|
|
345
|
+
line-height: inherit;
|
|
346
|
+
display: inline-flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
vertical-align: middle;
|
|
349
|
+
text-decoration: underline;
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
transition: all 0.2s ease;
|
|
352
|
+
gap: 0.25rem;
|
|
353
|
+
margin-inline: 0.25rem;
|
|
354
|
+
font-weight: 500;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.whatsapp-link-inline:hover {
|
|
358
|
+
color: var(--salla-autocomplete-whatsapp-brand-hover, #1da851);
|
|
359
|
+
opacity: 0.9;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.whatsapp-link-inline:active {
|
|
363
|
+
transform: scale(0.98);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.whatsapp-link-inline .whatsapp-icon {
|
|
367
|
+
color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.help-text {
|
|
371
|
+
display: block;
|
|
372
|
+
margin-top: 0.5rem;
|
|
373
|
+
font-size: var(--salla-autocomplete-help-font-size, 0.875rem);
|
|
374
|
+
color: var(--salla-autocomplete-help-color, #6b7280);
|
|
375
|
+
line-height: 1.5;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.help-text span {
|
|
379
|
+
line-height: 1.5;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.whatsapp-icon {
|
|
383
|
+
width: 1rem;
|
|
384
|
+
height: 1rem;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.loading-spinner {
|
|
388
|
+
position: absolute;
|
|
389
|
+
inset-inline-end: 0.875rem;
|
|
390
|
+
top: 50%;
|
|
391
|
+
transform: translateY(-50%);
|
|
392
|
+
width: var(--salla-autocomplete-spinner-size, 1.25rem);
|
|
393
|
+
height: var(--salla-autocomplete-spinner-size, 1.25rem);
|
|
394
|
+
border: 2px solid var(--salla-autocomplete-spinner-border-color, #e5e7eb);
|
|
395
|
+
border-top-color: var(--salla-autocomplete-spinner-color, #3b82f6);
|
|
396
|
+
border-radius: 50%;
|
|
397
|
+
animation: spin 0.6s linear infinite;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
@media (max-width: 640px) {
|
|
401
|
+
.loading-spinner {
|
|
402
|
+
width: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
|
|
403
|
+
height: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
|
|
404
|
+
inset-inline-end: 1rem;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
@keyframes spin {
|
|
409
|
+
to { transform: translateY(-50%) rotate(360deg); }
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/* Custom scrollbar styling */
|
|
413
|
+
.dropdown::-webkit-scrollbar {
|
|
414
|
+
width: 6px;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.dropdown::-webkit-scrollbar-track {
|
|
418
|
+
background: #f1f1f1;
|
|
419
|
+
border-radius: 3px;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.dropdown::-webkit-scrollbar-thumb {
|
|
423
|
+
background: #c1c1c1;
|
|
424
|
+
border-radius: 3px;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.dropdown::-webkit-scrollbar-thumb:hover {
|
|
428
|
+
background: #a8a8a8;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.dropdown {
|
|
432
|
+
position: absolute;
|
|
433
|
+
top: 100%;
|
|
434
|
+
left: 0;
|
|
435
|
+
right: 0;
|
|
436
|
+
margin-top: var(--salla-autocomplete-dropdown-margin-top, 0.375rem);
|
|
437
|
+
background: var(--salla-autocomplete-dropdown-background, white);
|
|
438
|
+
border: var(--salla-autocomplete-dropdown-border, 1px solid #e5e7eb);
|
|
439
|
+
border-radius: var(--salla-autocomplete-dropdown-border-radius, 0.5rem);
|
|
440
|
+
box-shadow: var(--salla-autocomplete-dropdown-shadow, 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
|
|
441
|
+
max-height: var(--salla-autocomplete-dropdown-max-height, 240px);
|
|
442
|
+
overflow-y: auto;
|
|
443
|
+
overflow-x: hidden;
|
|
444
|
+
z-index: var(--salla-autocomplete-dropdown-z-index, 100);
|
|
445
|
+
display: none;
|
|
446
|
+
-webkit-overflow-scrolling: touch;
|
|
447
|
+
overscroll-behavior: contain;
|
|
448
|
+
scroll-behavior: smooth;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
@media (max-width: 640px) {
|
|
452
|
+
.dropdown {
|
|
453
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-mobile, 25vh);
|
|
454
|
+
border-radius: var(--salla-autocomplete-dropdown-border-radius-mobile, 0.5rem);
|
|
455
|
+
margin-top: var(--salla-autocomplete-dropdown-margin-top-mobile, 0.25rem);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
@media (max-width: 640px) and (max-height: 667px) {
|
|
460
|
+
/* Smaller phones (iPhone SE, iPhone 8, etc.) */
|
|
461
|
+
.dropdown {
|
|
462
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-small, 22vh);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
@media (max-width: 640px) and (min-height: 668px) and (max-height: 896px) {
|
|
467
|
+
/* Standard phones (iPhone 12, iPhone 13, etc.) */
|
|
468
|
+
.dropdown {
|
|
469
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-standard, 28vh);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
@media (max-width: 640px) and (min-height: 897px) {
|
|
474
|
+
/* Larger phones (iPhone 14 Pro Max, etc.) */
|
|
475
|
+
.dropdown {
|
|
476
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-large, 30vh);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.dropdown.open {
|
|
481
|
+
display: block;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.dropdown-item {
|
|
485
|
+
display: flex;
|
|
486
|
+
align-items: flex-start;
|
|
487
|
+
padding: var(--salla-autocomplete-item-padding, 0.625rem 0.75rem);
|
|
488
|
+
cursor: pointer;
|
|
489
|
+
transition: background-color 0.15s;
|
|
490
|
+
border-bottom: 1px solid var(--salla-autocomplete-item-border-color, #e5e7eb);
|
|
491
|
+
min-height: 35px;
|
|
492
|
+
-webkit-tap-highlight-color: transparent;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@media (max-width: 640px) {
|
|
496
|
+
.dropdown-item {
|
|
497
|
+
padding: var(--salla-autocomplete-item-padding-mobile, 0.75rem 0.875rem);
|
|
498
|
+
min-height: 35px;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.dropdown-item:last-child {
|
|
503
|
+
border-bottom: none;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.dropdown-item:hover,
|
|
507
|
+
.dropdown-item.selected {
|
|
508
|
+
background-color: var(--salla-autocomplete-item-hover-bg, #f9fafb);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.dropdown-item.active {
|
|
512
|
+
background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@media (hover: none) and (pointer: coarse) {
|
|
516
|
+
.dropdown-item:hover {
|
|
517
|
+
background-color: transparent;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.dropdown-item:active {
|
|
521
|
+
background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.location-icon {
|
|
526
|
+
display: none;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.place-info {
|
|
530
|
+
flex: 1;
|
|
531
|
+
min-width: 0;
|
|
532
|
+
display: flex;
|
|
533
|
+
flex-direction: column;
|
|
534
|
+
gap: 0.25rem;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.main-text {
|
|
538
|
+
font-size: var(--salla-autocomplete-main-text-font-size, 0.875rem);
|
|
539
|
+
font-weight: var(--salla-autocomplete-main-text-font-weight, 600);
|
|
540
|
+
color: var(--salla-autocomplete-main-text-color, #111827);
|
|
541
|
+
line-height: 1.4;
|
|
542
|
+
word-wrap: break-word;
|
|
543
|
+
overflow-wrap: break-word;
|
|
544
|
+
hyphens: auto;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
@media (max-width: 640px) {
|
|
548
|
+
.main-text {
|
|
549
|
+
font-size: var(--salla-autocomplete-main-text-font-size-mobile, 0.9375rem);
|
|
550
|
+
line-height: 1.3;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.main-text .highlight {
|
|
555
|
+
font-weight: var(--salla-autocomplete-highlight-font-weight, 700);
|
|
556
|
+
color: var(--salla-autocomplete-highlight-color, inherit);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.national-address-badge {
|
|
560
|
+
display: inline-flex;
|
|
561
|
+
align-items: center;
|
|
562
|
+
font-size: 0.8125rem;
|
|
563
|
+
line-height: 1;
|
|
564
|
+
vertical-align: middle;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.national-address-icon {
|
|
568
|
+
width: 11px;
|
|
569
|
+
height: auto;
|
|
570
|
+
flex-shrink: 0;
|
|
571
|
+
display: inline-block;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.national-address-text {
|
|
575
|
+
padding-inline-start: 3px;
|
|
576
|
+
-webkit-text-fill-color: transparent;
|
|
577
|
+
background-clip: text;
|
|
578
|
+
-webkit-background-clip: text;
|
|
579
|
+
background-image: linear-gradient(135deg, #0052cc, #00b8d9 50%, #36b37e);
|
|
580
|
+
font-weight: 600;
|
|
581
|
+
display: inline-block;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.national-address-separator {
|
|
585
|
+
padding-inline: 4px;
|
|
586
|
+
color: #6b7280;
|
|
587
|
+
display: inline-block;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.secondary-text {
|
|
591
|
+
font-size: var(--salla-autocomplete-secondary-text-font-size, 0.75rem);
|
|
592
|
+
color: var(--salla-autocomplete-secondary-text-color, #6b7280);
|
|
593
|
+
line-height: 1.4;
|
|
594
|
+
word-wrap: break-word;
|
|
595
|
+
overflow-wrap: break-word;
|
|
596
|
+
hyphens: auto;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
@media (max-width: 640px) {
|
|
600
|
+
.secondary-text {
|
|
601
|
+
font-size: var(--salla-autocomplete-secondary-text-font-size-mobile, 0.8125rem);
|
|
602
|
+
line-height: 1.3;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.error-message {
|
|
607
|
+
margin-top: 0.5rem;
|
|
608
|
+
font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
|
|
609
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.no-results {
|
|
613
|
+
padding: 1rem;
|
|
614
|
+
text-align: start;
|
|
615
|
+
color: var(--salla-autocomplete-no-results-color, #6b7280);
|
|
616
|
+
font-size: var(--salla-autocomplete-no-results-font-size, 0.875rem);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.no-results.error-state {
|
|
620
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
621
|
+
background-color: var(--salla-autocomplete-error-bg, #fef2f2);
|
|
622
|
+
border-radius: 0.375rem;
|
|
623
|
+
margin: 0.5rem;
|
|
624
|
+
padding: 0.875rem;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
@media (max-width: 640px) {
|
|
628
|
+
.no-results {
|
|
629
|
+
padding: 0.875rem;
|
|
630
|
+
font-size: var(--salla-autocomplete-no-results-font-size-mobile, 0.8125rem);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.no-results.error-state {
|
|
634
|
+
margin: 0.375rem;
|
|
635
|
+
padding: 0.75rem;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
`,$e([ue({type:String})],Ae.prototype,"proxyUrl",2),$e([ue({type:String})],Ae.prototype,"authToken",2),$e([ue({type:String})],Ae.prototype,"placeholder",2),$e([ue({type:String})],Ae.prototype,"defaultPlace",2),$e([ue({type:String})],Ae.prototype,"label",2),$e([ue({type:String})],Ae.prototype,"className",2),$e([ue({type:String})],Ae.prototype,"language",2),$e([ue({type:String})],Ae.prototype,"dir",2),$e([ue({type:String})],Ae.prototype,"mode",2),$e([ue({type:String})],Ae.prototype,"name",2),$e([ue({type:Boolean})],Ae.prototype,"required",2),$e([ue({type:String})],Ae.prototype,"pattern",2),$e([ue({type:String})],Ae.prototype,"tooltip",2),$e([ue({type:String})],Ae.prototype,"selectedId",2),$e([ue({type:Array})],Ae.prototype,"errors",2),$e([ue({type:Boolean})],Ae.prototype,"disabled",2),$e([ue({type:String})],Ae.prototype,"value",1),$e([ue({type:String})],Ae.prototype,"country",1),$e([ue({type:Object})],Ae.prototype,"locationBias",2),$e([ue({type:Object})],Ae.prototype,"locationRestriction",2),$e([ue({type:Array})],Ae.prototype,"types",2),$e([ue({type:String})],Ae.prototype,"fieldsStr",1),$e([ue({type:Array})],Ae.prototype,"fields",1),$e([ue({type:Boolean})],Ae.prototype,"strictBounds",2),$e([ue({type:Boolean})],Ae.prototype,"useSessionToken",2),$e([ue({type:Boolean})],Ae.prototype,"resolve",2),$e([ue({type:Function})],Ae.prototype,"onValidateAddress",2),$e([ue({type:Number})],Ae.prototype,"debounceDelay",2),$e([ue({type:Number})],Ae.prototype,"minChars",2),$e([pe()],Ae.prototype,"predictions",2),$e([pe()],Ae.prototype,"isOpen",2),$e([pe()],Ae.prototype,"isLoading",2),$e([pe()],Ae.prototype,"error",2),$e([pe()],Ae.prototype,"activeIndex",2),$e([pe()],Ae.prototype,"inputValue",2),$e([pe()],Ae.prototype,"sessionToken",2),$e([pe()],Ae.prototype,"validationError",2),$e([pe()],Ae.prototype,"touched",2),$e([pe()],Ae.prototype,"showNationalAddressIcon",2),$e([(t,e)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(t,e,{get(){return(t=>t.renderRoot?.querySelector("input")??null)(this)}})],Ae.prototype,"inputElement",2),Ae=$e([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("salla-address-autocomplete")],Ae);let Ee=!1;const ze=new Map,Pe=new Promise(((t,e)=>{typeof window>"u"?t():(window.googleMapsInitCallback=t,window.gm_authFailure=()=>{e(new Error("Google Maps authentication failed"))})}));async function Me(t){if(ze.has(t))return ze.get(t);if(await Pe,typeof google<"u"&&google.maps&&google.maps.importLibrary){const e=await google.maps.importLibrary(t);return ze.set(t,e),e}return google.maps[t]||google.maps}function Te(t,e,i){if(typeof document>"u")return Promise.resolve();if(Ee)return Pe;let s;if(Ee=!0,"string"==typeof t)s={key:t};else{if("object"!=typeof t)throw new Error("API key should be a string or an object");s={...t}}i&&i.length>0?s.libraries=i:Array.isArray(s.libraries)&&(s.libraries=s.libraries),!e&&!s.v&&(e="quarterly"),s.loading||(s.loading="async"),s.callback="googleMapsInitCallback";let o=`https://maps.googleapis.com/maps/api/js?${Object.keys(s).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(s[t])}`)).join("&")}`;e&&(o+=`&v=${e}`);const a=document.createElement("script");return a.src=o,a.async=!0,a.defer=!0,a.onerror=t=>{console.error("Failed to load Google Maps script:",t)},document.body.appendChild(a),Pe}const _e=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},Oe=globalThis,Ie=Oe.ShadowRoot&&(void 0===Oe.ShadyCSS||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Be=Symbol(),Le=new WeakMap;let Ue=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Be)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ie&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=Le.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Le.set(e,t))}return t}toString(){return this.cssText}};const Re=Ie?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Ue("string"==typeof t?t:t+"",void 0,Be))(e)})(t):t,{is:je,defineProperty:Ne,getOwnPropertyDescriptor:De,getOwnPropertyNames:Fe,getOwnPropertySymbols:Ge,getPrototypeOf:qe}=Object,Ve=globalThis,He=Ve.trustedTypes,We=He?He.emptyScript:"",Ke=Ve.reactiveElementPolyfillSupport,Ze={toAttribute(t,e){switch(e){case Boolean:t=t?We:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},Ye=(t,e)=>!je(t,e),Je={attribute:!0,type:String,converter:Ze,reflect:!1,useDefault:!1,hasChanged:Ye};Symbol.metadata??=Symbol("metadata"),Ve.litPropertyMetadata??=new WeakMap;class Xe extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Je){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=this.getPropertyDescriptor(t,Symbol(),e);void 0!==i&&Ne(this.prototype,t,i)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=De(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const a=s?.call(this);o?.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Je}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=qe(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Fe(t),...Ge(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Re(t))}else void 0!==t&&e.push(Re(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Ie)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=Oe.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:Ze).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Ze;this._$Em=s;const a=o.fromAttribute(e,t.type);this[s]=a??this._$Ej?.get(s)??a,this._$Em=null}}requestUpdate(t,e,i,s=!1,o){if(void 0!==t){const a=this.constructor;if(!1===s&&(o=this[t]),i??=a.getPropertyOptions(t),!((i.hasChanged??Ye)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},a){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),!0!==o||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}Xe.elementStyles=[],Xe.shadowRootOptions={mode:"open"},Xe.elementProperties=new Map,Xe.finalized=new Map,Ke?.({ReactiveElement:Xe}),(Ve.reactiveElementVersions??=[]).push("2.1.2");const Qe={attribute:!0,type:String,converter:Ze,reflect:!1,hasChanged:Ye},ti=(t=Qe,e,i)=>{const{kind:s,metadata:o}=i;let a=globalThis.litPropertyMetadata.get(o);if(void 0===a&&globalThis.litPropertyMetadata.set(o,a=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),a.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t,!0,i)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t,!0,i)}}throw Error("Unsupported decorator location: "+s)};function ei(t){return(e,i)=>"object"==typeof i?ti(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function ii(t){return ei({...t,state:!0,attribute:!1})}function si(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}function oi(t,e,i){const s=[];return e.forEach((e=>{if(!(t&&google&&google.maps&&google.maps.event))return;const o=google.maps.event.addListener(t,e,(t=>{i(e,t)}));s.push((()=>{o&&google.maps.event.removeListener(o)}))})),s}function ai(t){t.forEach((t=>t())),t.length=0}function ri(t,e,i){if(!t)return;const s=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`;"function"==typeof t[s]?t[s](i):e in t&&(t[e]=i)}const ni={en:{buttonLabel:"Use my current location",errorTitle:"Unable to Access Location",closeButton:"Continue",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Location access was denied. Please enable location services in your browser settings.",positionUnavailable:"Your location is currently unavailable. Please check your device settings.",timeout:"Location request timed out. Please try again.",generalError:"Unable to get your location. Please try entering your address manually.",clickToSelectLocation:"You can also choose your location by clicking on the map"},ar:{buttonLabel:"استخدم موقعي الحالي",errorTitle:"تعذر الوصول إلى الموقع",closeButton:"متابعة",loading:"جار الحصول على موقعك...",loadingInstructions:"يرجى السماح بالوصول إلى الموقع في المتصفح للمتابعة",timerMessage:"ستختفي هذه الرسالة تلقائياً بعد 7 ثوانٍ أو انقر متابعة",permissionDenied:"تم رفض الوصول إلى الموقع. يرجى تفعيل خدمات الموقع في إعدادات المتصفح.",positionUnavailable:"موقعك غير متاح حالياً. يرجى التحقق من إعدادات جهازك.",timeout:"انتهت مهلة طلب الموقع. يرجى المحاولة مرة أخرى.",generalError:"تعذر الحصول على موقعك. يرجى إدخال عنوانك يدوياً.",clickToSelectLocation:"يمكنك أيضاً اختيار موقعك بالنقر على الخريطة"},es:{buttonLabel:"Usar mi ubicación actual",errorTitle:"Error de ubicación",closeButton:"Cerrar",loading:"Obteniendo tu ubicación...",loadingInstructions:"Permite el acceso a la ubicación en tu navegador para continuar",timerMessage:"Este mensaje se ocultará automáticamente en 7 segundos o haz clic en Cerrar",permissionDenied:"Se denegó el acceso a la ubicación. Habilita los servicios de ubicación en la configuración de tu navegador.",positionUnavailable:"Tu ubicación no está disponible actualmente. Verifica la configuración de tu dispositivo.",timeout:"La solicitud de ubicación expiró. Inténtalo de nuevo.",generalError:"No se pudo obtener tu ubicación. Intenta ingresar tu dirección manualmente.",clickToSelectLocation:"Haz clic en el mapa para seleccionar una ubicación"},fr:{buttonLabel:"Utiliser ma position actuelle",errorTitle:"Erreur de localisation",closeButton:"Continuer",loading:"Obtention de votre position...",loadingInstructions:"Veuillez autoriser l'accès à la localisation dans votre navigateur pour continuer",timerMessage:"Ce message se masquera automatiquement dans 7 secondes ou cliquez sur Continuer",permissionDenied:"L'accès à la localisation a été refusé. Veuillez activer les services de localisation dans les paramètres de votre navigateur.",positionUnavailable:"Votre position n'est pas disponible actuellement. Veuillez vérifier les paramètres de votre appareil.",timeout:"La demande de localisation a expiré. Veuillez réessayer.",generalError:"Impossible d'obtenir votre position. Veuillez entrer votre adresse manuellement.",clickToSelectLocation:"Vous pouvez également choisir votre position en cliquant sur la carte"},de:{buttonLabel:"Meinen aktuellen Standort verwenden",errorTitle:"Standortfehler",closeButton:"Schließen",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Der Zugriff auf den Standort wurde verweigert. Bitte aktivieren Sie die Standortdienste in Ihren Browsereinstellungen.",positionUnavailable:"Ihr Standort ist derzeit nicht verfügbar. Bitte überprüfen Sie Ihre Geräteeinstellungen.",timeout:"Standortanfrage ist abgelaufen. Bitte versuchen Sie es erneut.",generalError:"Ihr Standort konnte nicht abgerufen werden. Bitte geben Sie Ihre Adresse manuell ein.",clickToSelectLocation:"Klicken Sie auf die Karte, um einen Standort auszuwählen"},zh:{buttonLabel:"使用我的当前位置",errorTitle:"位置错误",closeButton:"关闭",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置访问被拒绝。请在浏览器设置中启用位置服务。",positionUnavailable:"您的位置当前不可用。请检查您的设备设置。",timeout:"位置请求超时。请重试。",generalError:"无法获取您的位置。请尝试手动输入地址。",clickToSelectLocation:"点击地图选择位置"},ja:{buttonLabel:"現在地を使用",errorTitle:"位置情報エラー",closeButton:"閉じる",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"位置情報へのアクセスが拒否されました。ブラウザの設定で位置情報サービスを有効にしてください。",positionUnavailable:"現在位置が利用できません。デバイスの設定を確認してください。",timeout:"位置情報リクエストがタイムアウトしました。もう一度お試しください。",generalError:"位置情報を取得できませんでした。住所を手動で入力してください。",clickToSelectLocation:"地図をクリックして場所を選択"},pt:{buttonLabel:"Usar minha localização atual",errorTitle:"Erro de localização",closeButton:"Fechar",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"O acesso à localização foi negado. Ative os serviços de localização nas configurações do navegador.",positionUnavailable:"Sua localização não está disponível no momento. Verifique as configurações do dispositivo.",timeout:"A solicitação de localização expirou. Tente novamente.",generalError:"Não foi possível obter sua localização. Tente inserir seu endereço manualmente.",clickToSelectLocation:"Clique no mapa para selecionar um local"},ru:{buttonLabel:"Использовать мое текущее местоположение",errorTitle:"Ошибка местоположения",closeButton:"Закрыть",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Доступ к местоположению был запрещен. Включите службы определения местоположения в настройках браузера.",positionUnavailable:"Ваше местоположение в настоящее время недоступно. Проверьте настройки устройства.",timeout:"Время ожидания запроса местоположения истекло. Попробуйте еще раз.",generalError:"Не удалось получить ваше местоположение. Попробуйте ввести адрес вручную.",clickToSelectLocation:"Нажмите на карту, чтобы выбрать местоположение"},it:{buttonLabel:"Usa la mia posizione attuale",errorTitle:"Errore di posizione",closeButton:"Chiudi",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"L'accesso alla posizione è stato negato. Abilita i servizi di localizzazione nelle impostazioni del browser.",positionUnavailable:"La tua posizione non è attualmente disponibile. Controlla le impostazioni del dispositivo.",timeout:"La richiesta di posizione è scaduta. Riprova.",generalError:"Impossibile ottenere la tua posizione. Prova a inserire manualmente il tuo indirizzo.",clickToSelectLocation:"Fai clic sulla mappa per selezionare una posizione"},nl:{buttonLabel:"Gebruik mijn huidige locatie",errorTitle:"Locatiefout",closeButton:"Sluiten",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Toegang tot locatie is geweigerd. Schakel locatieservices in in uw browserinstellingen.",positionUnavailable:"Uw locatie is momenteel niet beschikbaar. Controleer uw apparaatinstellingen.",timeout:"Locatieverzoek is verlopen. Probeer het opnieuw.",generalError:"Kan uw locatie niet ophalen. Probeer uw adres handmatig in te voeren.",clickToSelectLocation:"Klik op de kaart om een locatie te selecteren"},tr:{buttonLabel:"Mevcut konumumu kullan",errorTitle:"Konum Hatası",closeButton:"Kapat",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"Konum erişimi reddedildi. Lütfen tarayıcı ayarlarınızda konum hizmetlerini etkinleştirin.",positionUnavailable:"Konumunuz şu anda kullanılamıyor. Lütfen cihaz ayarlarınızı kontrol edin.",timeout:"Konum isteği zaman aşımına uğradı. Lütfen tekrar deneyin.",generalError:"Konumunuz alınamadı. Lütfen adresinizi manuel olarak girmeyi deneyin.",clickToSelectLocation:"Bir konum seçmek için haritaya tıklayın"},ko:{buttonLabel:"현재 위치 사용",errorTitle:"위치 오류",closeButton:"닫기",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"위치 액세스가 거부되었습니다. 브라우저 설정에서 위치 서비스를 활성화하십시오.",positionUnavailable:"현재 위치를 사용할 수 없습니다. 기기 설정을 확인하십시오.",timeout:"위치 요청 시간이 초과되었습니다. 다시 시도하십시오.",generalError:"위치를 가져올 수 없습니다. 수동으로 주소를 입력해 보십시오.",clickToSelectLocation:"지도를 클릭하여 위치를 선택하십시오"},hi:{buttonLabel:"मेरा वर्तमान स्थान उपयोग करें",errorTitle:"स्थान त्रुटि",closeButton:"बंद करें",loading:"Getting your location...",loadingInstructions:"Please allow location access in your browser to continue",timerMessage:"This message will auto-hide in 7 seconds or click Continue",permissionDenied:"स्थान पहुंच अस्वीकार कर दी गई थी। कृपया अपनी ब्राउज़र सेटिंग में स्थान सेवाएं सक्षम करें।",positionUnavailable:"आपका स्थान वर्तमान में उपलब्ध नहीं है। कृपया अपनी डिवाइस सेटिंग्स जांचें।",timeout:"स्थान अनुरोध समय समाप्त हो गया। कृपया पुनः प्रयास करें।",generalError:"आपका स्थान प्राप्त करने में असमर्थ। कृपया अपना पता मैन्युअल रूप से दर्ज करने का प्रयास करें।",clickToSelectLocation:"स्थान चुनने के लिए मानचित्र पर क्लिक करें"}},li=new Set(["ar","he","fa","ur"]);function hi(t="en"){return ni[t]||ni.en}function ci(t){return li.has(t)}var di=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,pi=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?ui(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&di(e,i,a),a};let mi=class extends ot{constructor(){super(...arguments),this.zoom=15,this.mapTypeId="roadmap",this.heading=0,this.tilt=0,this.gestureHandling="cooperative",this.minZoom=2,this.maxZoom=19,this.disableDefaultUI=!1,this.mapTypeControl=!1,this.streetViewControl=!1,this.rotateControl=!1,this.fullscreenControl=!1,this.enableGeolocation=!1,this.showLocationMarker=!0,this.geolocationOptions={maximumAge:6e4,timeout:1e4,enableHighAccuracy:!0},this.locationMarkerBackground="#4285F4",this.locationMarkerBorderColor="#1967D2",this.locationMarkerGlyphColor="#FFFFFF",this.locationMarkerScale=1.3,this.locationCircleOptions={},this.language="en",this.options={},this.enableAutocomplete=!1,this.autocompleteProxyUrl="https://api.salla.dev",this.autocompleteStrictBounds=!1,this.autocompleteResolve=!1,this.autocompleteDebounceDelay=300,this.autocompleteMinChars=3,this.geolocationLoading=!1,this.geolocationError=null,this.showLoadingOverlay=!1,this.buttonState="normal",this.eventListeners=[],this.autocompleteListenerAttached=!1}async connectedCallback(){super.connectedCallback(),ci(this.language)&&(document.dir="rtl")}async firstUpdated(){await Pe,this.createMap()}clearAutocompleteInput(){if(!this.autocompleteElement)return;const t=this.autocompleteElement.shadowRoot?.querySelector("input");t&&(t.value="",this.autocompleteElement.inputValue="",this.autocompleteElement.value="")}setupAutocompleteListener(){!this.enableAutocomplete||!this.autocompleteElement||this.autocompleteListenerAttached||(this.autocompleteElement.addEventListener("place-select",(t=>{const{place:e}=t.detail;if(e?.geometry?.location){const{lat:t,lng:i}=e.geometry.location;this.setLocation(t,i,50,!0),this.dispatchMapEvent("location_changed",{position:{lat:t,lng:i},accuracy:50,source:"autocomplete",place:{placeId:e.place_id,formattedAddress:e.formatted_address,addressComponents:e.address_components,name:e.name,types:e.types}}),this.dispatchMapEvent("autocomplete_place_selected",{place:e})}})),this.autocompleteListenerAttached=!0)}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.enableAutocomplete&&!this.autocompleteListenerAttached&&setTimeout((()=>this.setupAutocompleteListener()),0),this.map&&(t.has("center")&&this.center&&ri(this.map,"center",this.center),t.has("zoom")&&void 0!==this.zoom&&ri(this.map,"zoom",this.zoom),t.has("minZoom")&&void 0!==this.minZoom&&this.map&&this.map.setOptions({minZoom:this.minZoom}),t.has("maxZoom")&&void 0!==this.maxZoom&&this.map&&this.map.setOptions({maxZoom:this.maxZoom}),t.has("mapTypeId")&&this.mapTypeId&&ri(this.map,"mapTypeId",this.mapTypeId),t.has("heading")&&void 0!==this.heading&&ri(this.map,"heading",this.heading),t.has("tilt")&&void 0!==this.tilt&&ri(this.map,"tilt",this.tilt),t.has("locationMarkerPosition")&&this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy))}createMap(){if(!this.mapElement)return;const t={center:this.center,zoom:this.zoom,mapId:this.mapId,mapTypeId:this.mapTypeId,heading:this.heading,tilt:this.tilt,gestureHandling:this.gestureHandling,minZoom:this.minZoom,maxZoom:this.maxZoom,disableDefaultUI:this.disableDefaultUI,zoomControl:this.zoomControl,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,streetViewControl:this.streetViewControl,rotateControl:this.rotateControl,fullscreenControl:this.fullscreenControl,disableDoubleClickZoom:!0,keyboardShortcuts:!1,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM},...this.options};this.map=new google.maps.Map(this.mapElement,t);const e=google.maps.event.addListener(this.map,"click",(t=>{if(t.latLng&&this.showLocationMarker){const e=t.latLng.lat(),i=t.latLng.lng();this.setLocation(e,i,50,!1),this.clearAutocompleteInput(),this.dispatchMapEvent("location_changed",{position:{lat:e,lng:i},accuracy:50,source:"map-click"})}}));this.eventListeners=oi(this.map,["click","dblclick","drag","dragend","dragstart","idle","mousemove","mouseout","mouseover","resize","rightclick","tilesloaded"],((t,e)=>{this.dispatchMapEvent(t,e)})),this.eventListeners.push((()=>{e&&google.maps.event.removeListener(e)})),["center","zoom","bounds","mapTypeId"].forEach((t=>{const e=`${t}_changed`,i=google.maps.event.addListener(this.map,e,(()=>{const i=`get${t.charAt(0).toUpperCase()}${t.slice(1)}`;if("function"==typeof this.map[i]){const t=this.map[i]();this.dispatchMapEvent(e,t)}}));this.eventListeners.push((()=>{i&&google.maps.event.removeListener(i)}))})),this.dispatchEvent(new CustomEvent("gmap-ready",{detail:{map:this.map},bubbles:!0,composed:!0})),this.locationMarkerPosition&&this.showLocationMarker&&this.setLocation(this.locationMarkerPosition.lat,this.locationMarkerPosition.lng,this.locationMarkerPosition.accuracy)}dispatchMapEvent(t,e){let i=t;(t.includes("_changed")||t.startsWith("geolocation_")||t.startsWith("location_"))&&(i=`gmap-${t.replace(/_/g,"-")}`),this.dispatchEvent(new CustomEvent(i,{detail:e,bubbles:!0,composed:!0}))}cleanup(){ai(this.eventListeners),this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),this.map=void 0}panBy(t,e){this.map?.panBy(t,e)}panTo(t){this.map?.panTo(t)}panToBounds(t){this.map?.panToBounds(t)}fitBounds(t){this.map?.fitBounds(t)}resize(){this.map&&google.maps.event.trigger(this.map,"resize")}resizePreserveCenter(){if(!this.map)return;const t=this.map.getCenter();google.maps.event.trigger(this.map,"resize"),t&&this.map.setCenter(t)}setLocation(t,e,i=50,s=!0){if(!this.map)return void console.warn("GMapMap: Cannot set location before map is initialized");const o={lat:t,lng:e};s&&this.map.panTo(o),this.showLocationMarker&&this.addLocationMarker(o,i),this.dispatchMapEvent("location_changed",{position:o,accuracy:i,source:"programmatic"})}async getCurrentLocation(t=!1){if(!navigator.geolocation)throw this.dispatchMapEvent("geolocation_error",{code:"NOT_SUPPORTED",message:"Geolocation is not supported by this browser"}),t||this.showGeolocationError(this.getTranslation("generalError")),new Error("NOT_SUPPORTED");this.geolocationLoading=!0,this.buttonState="loading",this.dispatchMapEvent("geolocation_loading",{message:"Getting your location..."});const e=t?null:setTimeout((()=>{this.geolocationLoading&&(this.showLoadingOverlay=!0)}),150);return new Promise(((i,s)=>{navigator.geolocation.getCurrentPosition((t=>{const s={lat:t.coords.latitude,lng:t.coords.longitude};if(e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="success",setTimeout((()=>{this.buttonState="normal"}),2e3),this.map){this.map.panTo(s);const e=t.coords.accuracy;let i=15;i=e>1e3?12:e>500?13:e>100?14:16,this.map.setZoom(i),this.showLocationMarker&&this.addLocationMarker(s,e),this.clearAutocompleteInput()}this.dispatchMapEvent("geolocation_success",{position:s,accuracy:t.coords.accuracy,altitude:t.coords.altitude,altitudeAccuracy:t.coords.altitudeAccuracy,heading:t.coords.heading,speed:t.coords.speed,timestamp:t.timestamp}),this.dispatchMapEvent("location_changed",{position:s,accuracy:t.coords.accuracy,source:"geolocation"}),i(s)}),(i=>{e&&clearTimeout(e),this.geolocationLoading=!1,this.showLoadingOverlay=!1,this.buttonState="error",setTimeout((()=>{this.buttonState="normal"}),2e3);let o="GENERAL_ERROR",a=this.getTranslation("generalError");i.code===i.PERMISSION_DENIED?(o="PERMISSION_DENIED",a=this.getTranslation("permissionDenied")):i.code===i.POSITION_UNAVAILABLE?(o="POSITION_UNAVAILABLE",a=this.getTranslation("positionUnavailable")):i.code===i.TIMEOUT&&(o="TIMEOUT",a=this.getTranslation("timeout")),this.dispatchMapEvent("geolocation_error",{code:o,message:a,error:i}),t||this.showGeolocationError(a),s(i)}),this.geolocationOptions)}))}handleGeolocationClick(){this.geolocationError=null,this.getCurrentLocation()}async addLocationMarker(t,e){if(this.map){if(this.locationMarker&&(this.locationMarker.map=null,this.locationMarker=void 0),this.locationCircle&&(this.locationCircle.setMap(null),this.locationCircle=void 0),!this.mapId)return void console.warn("GMapMap: mapId is required for location marker. Please set the mapId property on <gmap-map>. Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps");try{const{AdvancedMarkerElement:e,PinElement:i}=await google.maps.importLibrary("marker"),s=new i({background:this.locationMarkerBackground,borderColor:this.locationMarkerBorderColor,glyphColor:this.locationMarkerGlyphColor,scale:this.locationMarkerScale});this.locationMarker=new e({map:this.map,position:t,title:"Your Location (Drag to adjust)",content:s.element,gmpDraggable:!0}),this.locationMarker.addListener("dragend",(()=>{if(this.locationMarker&&this.locationCircle){const t=this.locationMarker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.locationCircle.setCenter(e);const i=this.locationCircle.getRadius();this.clearAutocompleteInput(),this.dispatchMapEvent("location_marker_dragend",{position:e,accuracy:i}),this.dispatchMapEvent("location_changed",{position:e,accuracy:i,source:"marker-drag"})}}))}catch(t){console.error("Error creating AdvancedMarkerElement:",t)}this.locationCircle=new google.maps.Circle({map:this.map,center:t,radius:e,fillColor:"#4285F4",fillOpacity:.15,strokeColor:"#4285F4",strokeOpacity:.4,strokeWeight:1,clickable:!1,...this.locationCircleOptions})}}showGeolocationError(t){this.geolocationError=t,setTimeout((()=>{this.geolocationError=null}),7e3)}getTranslation(t){const e={loading:this.geolocationLoadingTitle,loadingInstructions:this.geolocationLoadingInstructions,errorTitle:this.geolocationErrorTitle,closeButton:this.geolocationErrorButtonText,timerMessage:this.geolocationErrorTimerMessage,clickToSelectLocation:this.geolocationClickToSelectMessage,generalError:this.geolocationGeneralErrorMessage,permissionDenied:this.geolocationPermissionDeniedMessage,positionUnavailable:this.geolocationPositionUnavailableMessage,timeout:this.geolocationTimeoutMessage}[t];if(null!=e&&""!==e)return e;const i=hi(this.language);return i[t]||i.generalError}get buttonLabel(){return void 0!==this.geolocationButtonLabel?this.geolocationButtonLabel:hi(this.language).buttonLabel||""}getButtonIconColor(){switch(this.buttonState){case"loading":return"#999";case"success":return"#4285F4";case"error":return"#EA4335";default:return"#666"}}getMap(){return this.map}render(){const t=ci(this.language)?"rtl":"ltr";return N`
|
|
639
|
+
<div class="map-page-wrapper">
|
|
640
|
+
${this.enableAutocomplete?N`
|
|
641
|
+
<div class="auto-complete-map-wrapper">
|
|
642
|
+
<div class="auto-complete-map-box" dir="${t}">
|
|
643
|
+
<salla-address-autocomplete
|
|
644
|
+
.proxyUrl=${this.autocompleteProxyUrl}
|
|
645
|
+
.authToken=${this.autocompleteAuthToken||null}
|
|
646
|
+
.placeholder=${this.autocompletePlaceholder||""}
|
|
647
|
+
.label=${this.autocompleteLabel||null}
|
|
648
|
+
.language=${this.language}
|
|
649
|
+
.country=${this.autocompleteCountry||null}
|
|
650
|
+
.locationBias=${this.autocompleteLocationBias||null}
|
|
651
|
+
.locationRestriction=${this.autocompleteLocationRestriction||null}
|
|
652
|
+
.types=${this.autocompleteTypes?this.autocompleteTypes.split(",").map((t=>t.trim())):null}
|
|
653
|
+
.fieldsStr=${this.autocompleteFields||null}
|
|
654
|
+
.strictBounds=${this.autocompleteStrictBounds}
|
|
655
|
+
.resolve=${this.autocompleteResolve}
|
|
656
|
+
.debounceDelay=${this.autocompleteDebounceDelay}
|
|
657
|
+
.minChars=${this.autocompleteMinChars}
|
|
658
|
+
></salla-address-autocomplete>
|
|
659
|
+
${this.autocompleteHint?N`<span class="hint-wrapper">${this.autocompleteHint}</span>`:""}
|
|
660
|
+
</div>
|
|
661
|
+
</div>
|
|
662
|
+
`:""}
|
|
663
|
+
|
|
664
|
+
<div class="map-container">
|
|
665
|
+
<div class="map"></div>
|
|
666
|
+
<slot></slot>
|
|
667
|
+
|
|
668
|
+
${this.enableGeolocation?N`
|
|
669
|
+
<div class="controls-overlay">
|
|
670
|
+
<button
|
|
671
|
+
class="geolocation-button ${this.buttonLabel&&this.buttonLabel.trim()?"has-label":""}"
|
|
672
|
+
@click=${this.handleGeolocationClick}
|
|
673
|
+
title="Show your location"
|
|
674
|
+
?disabled=${this.geolocationLoading}
|
|
675
|
+
>
|
|
676
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="${this.getButtonIconColor()}">
|
|
677
|
+
<path
|
|
678
|
+
d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
|
|
679
|
+
/>
|
|
680
|
+
</svg>
|
|
681
|
+
${this.buttonLabel&&this.buttonLabel.trim()?N`<span class="label">${this.buttonLabel}</span>`:""}
|
|
682
|
+
</button>
|
|
683
|
+
</div>
|
|
684
|
+
`:""}
|
|
685
|
+
|
|
686
|
+
${this.showLoadingOverlay&&!this.geolocationError?N`
|
|
687
|
+
<div class="loading-overlay">
|
|
688
|
+
<div class="spinner"></div>
|
|
689
|
+
<div class="title">
|
|
690
|
+
${this.getTranslation("loading")}
|
|
691
|
+
</div>
|
|
692
|
+
<div class="instructions">
|
|
693
|
+
${this.getTranslation("loadingInstructions")}
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
`:""}
|
|
697
|
+
|
|
698
|
+
${this.geolocationError&&!this.showLoadingOverlay?N`
|
|
699
|
+
<div class="error-overlay">
|
|
700
|
+
<div class="error-icon">
|
|
701
|
+
<svg width="40" height="40" viewBox="0 0 24 24" fill="none">
|
|
702
|
+
<circle cx="12" cy="12" r="10" stroke="#ef4444" stroke-width="2" fill="none"/>
|
|
703
|
+
<path d="M12 8v4M12 16h.01" stroke="#ef4444" stroke-width="2" stroke-linecap="round"/>
|
|
704
|
+
</svg>
|
|
705
|
+
</div>
|
|
706
|
+
<div class="error-title">
|
|
707
|
+
${this.getTranslation("errorTitle")}
|
|
708
|
+
</div>
|
|
709
|
+
<div class="error-message">${this.geolocationError}</div>
|
|
710
|
+
<div class="map-hint">
|
|
711
|
+
${this.getTranslation("clickToSelectLocation")}
|
|
712
|
+
</div>
|
|
713
|
+
<div class="timer-message">
|
|
714
|
+
${this.getTranslation("timerMessage")}
|
|
715
|
+
</div>
|
|
716
|
+
<button @click=${()=>this.geolocationError=null}>
|
|
717
|
+
${this.getTranslation("closeButton")}
|
|
718
|
+
</button>
|
|
719
|
+
</div>
|
|
720
|
+
`:""}
|
|
721
|
+
</div>
|
|
722
|
+
</div>
|
|
723
|
+
`}};mi.styles=a`
|
|
724
|
+
:host {
|
|
725
|
+
display: block;
|
|
726
|
+
position: relative;
|
|
727
|
+
width: 100%;
|
|
728
|
+
height: 400px;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
@media (max-width: 640px) {
|
|
732
|
+
:host {
|
|
733
|
+
height: 65vh;
|
|
734
|
+
min-height: 300px;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
@media (max-width: 640px) and (min-height: 700px) {
|
|
739
|
+
:host {
|
|
740
|
+
height: 65vh;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.map-container {
|
|
745
|
+
width: 100%;
|
|
746
|
+
height: 100%;
|
|
747
|
+
position: relative;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.map {
|
|
751
|
+
width: 100%;
|
|
752
|
+
height: 100%;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.controls-overlay {
|
|
756
|
+
position: absolute;
|
|
757
|
+
top: 0;
|
|
758
|
+
left: 0;
|
|
759
|
+
right: 0;
|
|
760
|
+
bottom: 0;
|
|
761
|
+
pointer-events: none;
|
|
762
|
+
z-index: 40;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.controls-overlay > * {
|
|
766
|
+
pointer-events: auto;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.geolocation-button {
|
|
770
|
+
position: absolute;
|
|
771
|
+
bottom: 23px;
|
|
772
|
+
left: 10px;
|
|
773
|
+
right: auto;
|
|
774
|
+
background: #fff;
|
|
775
|
+
border: none;
|
|
776
|
+
border-radius: 2px;
|
|
777
|
+
box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
|
|
778
|
+
cursor: pointer;
|
|
779
|
+
padding: 10px;
|
|
780
|
+
height: 40px;
|
|
781
|
+
display: flex;
|
|
782
|
+
align-items: center;
|
|
783
|
+
justify-content: center;
|
|
784
|
+
gap: 8px;
|
|
785
|
+
outline: none;
|
|
786
|
+
color: rgb(86, 86, 86);
|
|
787
|
+
font-family: var(--gmap-font-family, Roboto, Arial, sans-serif);
|
|
788
|
+
font-size: 14px;
|
|
789
|
+
white-space: nowrap;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
@media (max-width: 640px) {
|
|
793
|
+
.geolocation-button {
|
|
794
|
+
bottom: 23px;
|
|
795
|
+
left: 10px;
|
|
796
|
+
right: auto;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.geolocation-button .label {
|
|
800
|
+
display: none;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.geolocation-button {
|
|
804
|
+
width: 40px !important;
|
|
805
|
+
padding: 10px !important;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.geolocation-button.has-label {
|
|
810
|
+
width: auto;
|
|
811
|
+
padding: 8px 12px;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.geolocation-button:not(.has-label) {
|
|
815
|
+
width: 40px;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.geolocation-button:hover:not(:disabled) {
|
|
819
|
+
background: #ebebeb;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.geolocation-button:disabled {
|
|
823
|
+
cursor: wait;
|
|
824
|
+
opacity: 0.6;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.geolocation-button svg {
|
|
828
|
+
flex-shrink: 0;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.geolocation-button .label {
|
|
832
|
+
font-weight: 500;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.loading-overlay {
|
|
836
|
+
position: absolute;
|
|
837
|
+
top: 0;
|
|
838
|
+
left: 0;
|
|
839
|
+
right: 0;
|
|
840
|
+
bottom: 0;
|
|
841
|
+
background: rgba(0, 0, 0, 0.7);
|
|
842
|
+
z-index: 200;
|
|
843
|
+
display: flex;
|
|
844
|
+
flex-direction: column;
|
|
845
|
+
align-items: center;
|
|
846
|
+
justify-content: center;
|
|
847
|
+
gap: 16px;
|
|
848
|
+
padding: 16px;
|
|
849
|
+
font-family: var(--gmap-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.loading-overlay .spinner {
|
|
853
|
+
width: 48px;
|
|
854
|
+
height: 48px;
|
|
855
|
+
border: 4px solid rgba(255, 255, 255, 0.3);
|
|
856
|
+
border-top-color: #ffffff;
|
|
857
|
+
border-radius: 50%;
|
|
858
|
+
animation: spin 1s linear infinite;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
@keyframes spin {
|
|
862
|
+
to { transform: rotate(360deg); }
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.loading-overlay .title {
|
|
866
|
+
font-size: 18px;
|
|
867
|
+
font-weight: 600;
|
|
868
|
+
color: #ffffff;
|
|
869
|
+
margin: 0;
|
|
870
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.loading-overlay .instructions {
|
|
874
|
+
font-size: 14px;
|
|
875
|
+
color: #ffffff;
|
|
876
|
+
line-height: 1.5;
|
|
877
|
+
margin: 0;
|
|
878
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
879
|
+
text-align: center;
|
|
880
|
+
max-width: 90%;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.error-overlay {
|
|
884
|
+
position: absolute;
|
|
885
|
+
top: 0;
|
|
886
|
+
left: 0;
|
|
887
|
+
right: 0;
|
|
888
|
+
bottom: 0;
|
|
889
|
+
background: rgba(0, 0, 0, 0.7);
|
|
890
|
+
z-index: 200;
|
|
891
|
+
display: flex;
|
|
892
|
+
flex-direction: column;
|
|
893
|
+
align-items: center;
|
|
894
|
+
justify-content: center;
|
|
895
|
+
gap: 12px;
|
|
896
|
+
padding: 16px;
|
|
897
|
+
font-family: var(--gmap-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.error-overlay .error-icon svg {
|
|
901
|
+
display: block;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.error-overlay .error-title {
|
|
905
|
+
font-size: 17px;
|
|
906
|
+
font-weight: 600;
|
|
907
|
+
color: #ef4444;
|
|
908
|
+
margin: 0;
|
|
909
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.error-overlay .error-message {
|
|
913
|
+
font-size: 14px;
|
|
914
|
+
color: #ffffff;
|
|
915
|
+
line-height: 1.4;
|
|
916
|
+
margin: 0;
|
|
917
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
918
|
+
text-align: center;
|
|
919
|
+
max-width: 90%;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.error-overlay .map-hint {
|
|
923
|
+
font-size: 12px;
|
|
924
|
+
color: #d4d4d4;
|
|
925
|
+
line-height: 1.4;
|
|
926
|
+
margin: 0;
|
|
927
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
928
|
+
text-align: center;
|
|
929
|
+
font-style: italic;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.error-overlay .timer-message {
|
|
933
|
+
font-size: 12px;
|
|
934
|
+
color: #d4d4d4;
|
|
935
|
+
margin: 0;
|
|
936
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.error-overlay button {
|
|
940
|
+
margin-top: 4px;
|
|
941
|
+
padding: 8px 24px;
|
|
942
|
+
background: #ffffff;
|
|
943
|
+
color: #18181b;
|
|
944
|
+
border: none;
|
|
945
|
+
border-radius: 8px;
|
|
946
|
+
font-size: 14px;
|
|
947
|
+
font-weight: 600;
|
|
948
|
+
cursor: pointer;
|
|
949
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.error-overlay button:hover {
|
|
953
|
+
background: #f4f4f5;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.map-page-wrapper {
|
|
957
|
+
position: relative;
|
|
958
|
+
width: 100%;
|
|
959
|
+
height: 100%;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.auto-complete-map-wrapper {
|
|
963
|
+
position: absolute;
|
|
964
|
+
z-index: 50;
|
|
965
|
+
padding: 1rem;
|
|
966
|
+
width: 100%;
|
|
967
|
+
top: 0;
|
|
968
|
+
left: 0;
|
|
969
|
+
right: 0;
|
|
970
|
+
pointer-events: none;
|
|
971
|
+
box-sizing: border-box;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
@media (max-width: 640px) {
|
|
975
|
+
.auto-complete-map-wrapper {
|
|
976
|
+
padding: 0.75rem 0.5rem;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.auto-complete-map-wrapper > * {
|
|
981
|
+
pointer-events: auto;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.auto-complete-map-box {
|
|
985
|
+
width: 100%;
|
|
986
|
+
display: flex;
|
|
987
|
+
flex-direction: column;
|
|
988
|
+
padding: 1rem;
|
|
989
|
+
background-color: #ffffffb2;
|
|
990
|
+
border-radius: 8px;
|
|
991
|
+
backdrop-filter: blur(4px);
|
|
992
|
+
box-sizing: border-box;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
@media (max-width: 640px) {
|
|
996
|
+
.auto-complete-map-box {
|
|
997
|
+
padding: 0.75rem;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.auto-complete-map-box .hint-wrapper {
|
|
1002
|
+
font-size: 12px;
|
|
1003
|
+
color: #666666;
|
|
1004
|
+
margin-top: 0.5rem;
|
|
1005
|
+
text-align: start;
|
|
1006
|
+
direction: inherit;
|
|
1007
|
+
}
|
|
1008
|
+
`,pi([ei({type:Object})],mi.prototype,"center",2),pi([ei({type:Number})],mi.prototype,"zoom",2),pi([ei({type:String,attribute:"map-id"})],mi.prototype,"mapId",2),pi([ei({type:String,attribute:"map-type-id"})],mi.prototype,"mapTypeId",2),pi([ei({type:Number})],mi.prototype,"heading",2),pi([ei({type:Number})],mi.prototype,"tilt",2),pi([ei({type:Object})],mi.prototype,"bounds",2),pi([ei({type:String})],mi.prototype,"gestureHandling",2),pi([ei({type:Number})],mi.prototype,"minZoom",2),pi([ei({type:Number})],mi.prototype,"maxZoom",2),pi([ei({type:Boolean})],mi.prototype,"disableDefaultUI",2),pi([ei({type:Boolean})],mi.prototype,"zoomControl",2),pi([ei({type:Boolean})],mi.prototype,"mapTypeControl",2),pi([ei({type:Boolean})],mi.prototype,"scaleControl",2),pi([ei({type:Boolean})],mi.prototype,"streetViewControl",2),pi([ei({type:Boolean})],mi.prototype,"rotateControl",2),pi([ei({type:Boolean})],mi.prototype,"fullscreenControl",2),pi([ei({type:Boolean,attribute:"enable-geolocation"})],mi.prototype,"enableGeolocation",2),pi([ei({type:Boolean,attribute:"show-location-marker"})],mi.prototype,"showLocationMarker",2),pi([ei({type:Object})],mi.prototype,"geolocationOptions",2),pi([ei({type:Object,attribute:"location-marker-position"})],mi.prototype,"locationMarkerPosition",2),pi([ei({type:String,attribute:"location-marker-background"})],mi.prototype,"locationMarkerBackground",2),pi([ei({type:String,attribute:"location-marker-border-color"})],mi.prototype,"locationMarkerBorderColor",2),pi([ei({type:String,attribute:"location-marker-glyph-color"})],mi.prototype,"locationMarkerGlyphColor",2),pi([ei({type:Number,attribute:"location-marker-scale"})],mi.prototype,"locationMarkerScale",2),pi([ei({type:Object,attribute:"location-circle-options"})],mi.prototype,"locationCircleOptions",2),pi([ei({type:String})],mi.prototype,"language",2),pi([ei({type:Object})],mi.prototype,"options",2),pi([ei({type:String,attribute:"geolocation-button-label"})],mi.prototype,"geolocationButtonLabel",2),pi([ei({type:String,attribute:"geolocation-loading-title"})],mi.prototype,"geolocationLoadingTitle",2),pi([ei({type:String,attribute:"geolocation-loading-instructions"})],mi.prototype,"geolocationLoadingInstructions",2),pi([ei({type:String,attribute:"geolocation-error-title"})],mi.prototype,"geolocationErrorTitle",2),pi([ei({type:String,attribute:"geolocation-error-button-text"})],mi.prototype,"geolocationErrorButtonText",2),pi([ei({type:String,attribute:"geolocation-error-timer-message"})],mi.prototype,"geolocationErrorTimerMessage",2),pi([ei({type:String,attribute:"geolocation-click-to-select-message"})],mi.prototype,"geolocationClickToSelectMessage",2),pi([ei({type:String,attribute:"geolocation-permission-denied-message"})],mi.prototype,"geolocationPermissionDeniedMessage",2),pi([ei({type:String,attribute:"geolocation-position-unavailable-message"})],mi.prototype,"geolocationPositionUnavailableMessage",2),pi([ei({type:String,attribute:"geolocation-timeout-message"})],mi.prototype,"geolocationTimeoutMessage",2),pi([ei({type:String,attribute:"geolocation-general-error-message"})],mi.prototype,"geolocationGeneralErrorMessage",2),pi([ei({type:Boolean,attribute:"enable-autocomplete"})],mi.prototype,"enableAutocomplete",2),pi([ei({type:String,attribute:"autocomplete-hint"})],mi.prototype,"autocompleteHint",2),pi([ei({type:String,attribute:"autocomplete-proxy-url"})],mi.prototype,"autocompleteProxyUrl",2),pi([ei({type:String,attribute:"autocomplete-auth-token"})],mi.prototype,"autocompleteAuthToken",2),pi([ei({type:String,attribute:"autocomplete-placeholder"})],mi.prototype,"autocompletePlaceholder",2),pi([ei({type:String,attribute:"autocomplete-label"})],mi.prototype,"autocompleteLabel",2),pi([ei({type:String,attribute:"autocomplete-country"})],mi.prototype,"autocompleteCountry",2),pi([ei({type:Object,attribute:"autocomplete-location-bias"})],mi.prototype,"autocompleteLocationBias",2),pi([ei({type:Object,attribute:"autocomplete-location-restriction"})],mi.prototype,"autocompleteLocationRestriction",2),pi([ei({type:String,attribute:"autocomplete-types"})],mi.prototype,"autocompleteTypes",2),pi([ei({type:String,attribute:"autocomplete-fields"})],mi.prototype,"autocompleteFields",2),pi([ei({type:Boolean,attribute:"autocomplete-strict-bounds"})],mi.prototype,"autocompleteStrictBounds",2),pi([ei({type:Boolean,attribute:"autocomplete-resolve"})],mi.prototype,"autocompleteResolve",2),pi([ei({type:Number,attribute:"autocomplete-debounce-delay"})],mi.prototype,"autocompleteDebounceDelay",2),pi([ei({type:Number,attribute:"autocomplete-min-chars"})],mi.prototype,"autocompleteMinChars",2),pi([si(".map")],mi.prototype,"mapElement",2),pi([si("salla-address-autocomplete")],mi.prototype,"autocompleteElement",2),pi([ii()],mi.prototype,"geolocationLoading",2),pi([ii()],mi.prototype,"geolocationError",2),pi([ii()],mi.prototype,"showLoadingOverlay",2),pi([ii()],mi.prototype,"buttonState",2),mi=pi([_e("gmap-map")],mi);var gi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,fi=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?bi(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&gi(e,i,a),a};let vi=class extends ot{constructor(){super(...arguments),this.title="",this.gmpDraggable=!1,this.gmpClickable=!0,this.scale=1,this.draggable=!1,this.clickable=!0,this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initMarker()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async updated(t){super.updated(t),this.marker&&(t.has("position")&&this.position&&(this.marker.position=this.normalizePosition(this.position)),t.has("title")&&this.title&&(this.marker.title=this.title),t.has("gmpDraggable")&&(this.marker.gmpDraggable=this.gmpDraggable||this.draggable),t.has("gmpClickable")&&(this.marker.gmpClickable=!1!==this.gmpClickable&&!1!==this.clickable),t.has("zIndex")&&void 0!==this.zIndex&&(this.marker.zIndex=this.zIndex),(t.has("content")||t.has("background")||t.has("borderColor")||t.has("glyphColor")||t.has("scale")||t.has("icon")||t.has("label"))&&this.updateMarkerContent())}async initMarker(){this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createMarker()}));const t=this.closest("gmap-map");t?.getMap&&(this.map=t.getMap(),this.map&&await this.createMarker())}async createMarker(){if(!this.map)return void console.error("GMapMarker: No map found. Make sure the marker is inside a <gmap-map> element.");if(!this.map.get?.("mapId"))return void console.error('GMapMarker: AdvancedMarkerElement requires a mapId to be set on the map. Add mapId to your map. Example: mapId="YOUR_MAP_ID". Get a Map ID from: https://console.cloud.google.com/google/maps-apis/studio/maps');this.markerLibrary=await Me("marker");const{AdvancedMarkerElement:t,PinElement:e}=this.markerLibrary,i=this.gmpDraggable||this.draggable,s=!1!==this.gmpClickable&&!1!==this.clickable,o={map:this.map,position:this.normalizePosition(this.position),title:this.title,gmpDraggable:i,gmpClickable:s};if(void 0!==this.zIndex&&(o.zIndex=this.zIndex),this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,o.content=t}else o.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",o.content=t}else{const t={scale:this.scale||1};this.background&&(t.background=this.background),this.borderColor&&(t.borderColor=this.borderColor),this.glyphColor&&(t.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(t.glyph=this.label),this.pinElement=new e(t),this.pinElement?.element&&(o.content=this.pinElement.element)}this.marker=new t(o),this.eventListeners=oi(this.marker,["click","drag","dragstart","dragend","gmp-click"],((t,e)=>{if("dragend"===t&&this.marker&&this.marker.position){const t=this.marker.position,e=t.toJSON?t.toJSON():{lat:t.lat(),lng:t.lng()};this.dispatchEvent(new CustomEvent("dragend",{detail:{latLng:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("gmap-position-changed",{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.dispatchEvent(new CustomEvent("gmap-marker-ready",{detail:{marker:this.marker},bubbles:!0,composed:!0}))}updateMarkerContent(){if(!this.marker||!this.markerLibrary)return;const{PinElement:t}=this.markerLibrary;if(this.content)if("string"==typeof this.content){const t=document.createElement("div");t.innerHTML=this.content,this.marker.content=t}else this.marker.content=this.content;else if(this.icon){const t=document.createElement("img");t.src=this.icon,t.style.width="32px",t.style.height="32px",this.marker.content=t}else{const e={scale:this.scale||1};this.background&&(e.background=this.background),this.borderColor&&(e.borderColor=this.borderColor),this.glyphColor&&(e.glyphColor=this.glyphColor),this.label&&"string"==typeof this.label&&(e.glyph=this.label),this.pinElement=new t(e),this.pinElement?.element&&(this.marker.content=this.pinElement.element)}}normalizePosition(t){return t?{lat:"number"==typeof t.lat?t.lat:parseFloat(t.lat),lng:"number"==typeof t.lng?t.lng:parseFloat(t.lng)}:{lat:0,lng:0}}cleanup(){ai(this.eventListeners),this.marker&&(this.marker.map=null,this.marker=void 0)}getMarker(){return this.marker}render(){return N`<slot></slot>`}};fi([ei({type:Object})],vi.prototype,"position",2),fi([ei({type:String})],vi.prototype,"title",2),fi([ei({type:Boolean})],vi.prototype,"gmpDraggable",2),fi([ei({type:Boolean})],vi.prototype,"gmpClickable",2),fi([ei({type:Number})],vi.prototype,"zIndex",2),fi([ei({type:Object})],vi.prototype,"content",2),fi([ei({type:String})],vi.prototype,"background",2),fi([ei({type:String})],vi.prototype,"borderColor",2),fi([ei({type:String})],vi.prototype,"glyphColor",2),fi([ei({type:Number})],vi.prototype,"scale",2),fi([ei({type:Boolean})],vi.prototype,"draggable",2),fi([ei({type:Boolean})],vi.prototype,"clickable",2),fi([ei({type:String})],vi.prototype,"icon",2),fi([ei({type:String})],vi.prototype,"label",2),fi([ii()],vi.prototype,"marker",2),fi([ii()],vi.prototype,"map",2),vi=fi([_e("gmap-marker")],vi);var yi=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,ki=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?wi(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&yi(e,i,a),a};let xi=class extends ot{constructor(){super(...arguments),this.opened=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initInfoWindow()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.infoWindow&&(t.has("opened")&&(this.opened?this.open():this.close()),t.has("position")&&this.position&&!this.marker&&this.infoWindow.setPosition(this.position),t.has("zIndex")&&void 0!==this.zIndex&&this.infoWindow.setZIndex(this.zIndex))}async initInfoWindow(){const t=this.closest("gmap-marker");if(t)this.addEventListener("gmap-marker-ready",(t=>{this.marker=t.detail.marker,this.createInfoWindow()})),t.getMarker&&(this.marker=t.getMarker(),this.marker&&await this.createInfoWindow());else{const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createInfoWindow()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createInfoWindow()))}}async createInfoWindow(){const t=document.createElement("div");t.style.cssText="min-width: 200px;";const e={content:t,...this.options};void 0!==this.zIndex&&(e.zIndex=this.zIndex),this.position&&!this.marker&&(e.position=this.position),this.infoWindow=new google.maps.InfoWindow(e),this.observeSlotContent(t),this.eventListeners=oi(this.infoWindow,["closeclick","domready","content_changed"],(t=>{"closeclick"===t&&(this.opened=!1),this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))})),this.opened&&this.open()}observeSlotContent(t){this.renderSlotContent(t);const e=this.shadowRoot?.querySelector("slot");e&&e.addEventListener("slotchange",(()=>{this.renderSlotContent(t)})),this.contentObserver=new MutationObserver((()=>{this.renderSlotContent(t)})),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}renderSlotContent(t){const e=this.shadowRoot?.querySelector("slot");if(e){const i=e.assignedNodes({flatten:!0});t.innerHTML="",i.forEach((e=>{(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())&&t.appendChild(e.cloneNode(!0))}))}}open(){this.infoWindow&&(this.marker?this.infoWindow.open({anchor:this.marker,map:this.map}):this.map&&this.infoWindow.open(this.map))}close(){this.infoWindow?.close()}cleanup(){ai(this.eventListeners),this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=void 0),this.infoWindow&&(this.infoWindow.close(),this.infoWindow=void 0)}getInfoWindow(){return this.infoWindow}render(){return N`<slot></slot>`}};xi.styles=a`
|
|
1009
|
+
:host {
|
|
1010
|
+
display: contents;
|
|
1011
|
+
}
|
|
1012
|
+
`,ki([ei({type:Boolean})],xi.prototype,"opened",2),ki([ei({type:Object})],xi.prototype,"position",2),ki([ei({type:Number})],xi.prototype,"zIndex",2),ki([ei({type:Object})],xi.prototype,"options",2),ki([ii()],xi.prototype,"infoWindow",2),ki([ii()],xi.prototype,"map",2),ki([ii()],xi.prototype,"marker",2),xi=ki([_e("gmap-info-window")],xi);var Si=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,$i=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?Ci(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Si(e,i,a),a};let Ai=class extends ot{constructor(){super(...arguments),this.path=[],this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolyline()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polyline&&(t.has("path")&&this.path&&this.polyline.setPath(this.path),t.has("editable")&&this.polyline.setEditable(this.editable),t.has("draggable")&&this.polyline.setDraggable(this.draggable),t.has("options")&&this.polyline.setOptions(this.options))}async initPolyline(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolyline()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolyline()))}async createPolyline(){if(!this.map)return;const t={map:this.map,path:this.path,editable:this.editable,draggable:this.draggable,...this.options};this.polyline=new google.maps.Polyline(t),this.eventListeners=oi(this.polyline,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}));const e=google.maps.event.addListener(this.polyline.getPath(),"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(this.polyline.getPath(),"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(this.polyline.getPath(),"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}emitPathChanged(){if(!this.polyline)return;const t=this.polyline.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){ai(this.eventListeners),this.polyline&&(this.polyline.setMap(null),this.polyline=void 0)}getPolyline(){return this.polyline}render(){return N``}};$i([ei({type:Array})],Ai.prototype,"path",2),$i([ei({type:Boolean})],Ai.prototype,"editable",2),$i([ei({type:Boolean})],Ai.prototype,"draggable",2),$i([ei({type:Object})],Ai.prototype,"options",2),$i([ii()],Ai.prototype,"polyline",2),$i([ii()],Ai.prototype,"map",2),Ai=$i([_e("gmap-polyline")],Ai);var Ei=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Pi=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?zi(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Ei(e,i,a),a};let Mi=class extends ot{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initPolygon()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.polygon&&(t.has("path")&&this.path&&this.polygon.setPath(this.path),t.has("paths")&&this.paths&&this.polygon.setPaths(this.paths),t.has("editable")&&this.polygon.setEditable(this.editable),t.has("draggable")&&this.polygon.setDraggable(this.draggable),t.has("options")&&this.polygon.setOptions(this.options))}async initPolygon(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createPolygon()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createPolygon()))}async createPolygon(){if(!this.map)return;const t={map:this.map,editable:this.editable,draggable:this.draggable,...this.options};this.paths?t.paths=this.paths:this.path&&(t.paths=this.path),this.polygon=new google.maps.Polygon(t),this.eventListeners=oi(this.polygon,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))})),this.paths?this.bindPathsChanges():this.bindPathChanges()}bindPathChanges(){if(!this.polygon)return;const t=this.polygon.getPath(),e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}bindPathsChanges(){this.polygon&&this.polygon.getPaths().forEach((t=>{const e=google.maps.event.addListener(t,"set_at",(()=>{this.emitPathsChanged()})),i=google.maps.event.addListener(t,"insert_at",(()=>{this.emitPathsChanged()})),s=google.maps.event.addListener(t,"remove_at",(()=>{this.emitPathsChanged()}));this.eventListeners.push((()=>google.maps.event.removeListener(e)),(()=>google.maps.event.removeListener(i)),(()=>google.maps.event.removeListener(s)))}))}emitPathChanged(){if(!this.polygon)return;const t=this.polygon.getPath().getArray().map((t=>({lat:t.lat(),lng:t.lng()})));this.dispatchEvent(new CustomEvent("gmap-path-changed",{detail:t,bubbles:!0,composed:!0}))}emitPathsChanged(){if(!this.polygon)return;const t=this.polygon.getPaths().getArray().map((t=>t.getArray().map((t=>({lat:t.lat(),lng:t.lng()})))));this.dispatchEvent(new CustomEvent("gmap-paths-changed",{detail:t,bubbles:!0,composed:!0}))}cleanup(){ai(this.eventListeners),this.polygon&&(this.polygon.setMap(null),this.polygon=void 0)}getPolygon(){return this.polygon}render(){return N``}};Pi([ei({type:Array})],Mi.prototype,"path",2),Pi([ei({type:Array})],Mi.prototype,"paths",2),Pi([ei({type:Boolean})],Mi.prototype,"editable",2),Pi([ei({type:Boolean})],Mi.prototype,"draggable",2),Pi([ei({type:Object})],Mi.prototype,"options",2),Pi([ii()],Mi.prototype,"polygon",2),Pi([ii()],Mi.prototype,"map",2),Mi=Pi([_e("gmap-polygon")],Mi);var Ti=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,Oi=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?_i(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Ti(e,i,a),a};let Ii=class extends ot{constructor(){super(...arguments),this.radius=1e3,this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initCircle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.circle&&(t.has("center")&&this.center&&this.circle.setCenter(this.center),t.has("radius")&&void 0!==this.radius&&this.circle.setRadius(this.radius),t.has("editable")&&this.circle.setEditable(this.editable),t.has("draggable")&&this.circle.setDraggable(this.draggable),t.has("options")&&this.circle.setOptions(this.options))}async initCircle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCircle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCircle()))}async createCircle(){if(!this.map)return;const t={map:this.map,center:this.center,radius:this.radius,editable:this.editable,draggable:this.draggable,...this.options};this.circle=new google.maps.Circle(t),this.eventListeners=oi(this.circle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","center_changed","radius_changed","bounds_changed"],((t,e)=>{if("center_changed"===t){const e=this.circle.getCenter(),i=e?{lat:e.lat(),lng:e.lng()}:null;this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}else if("radius_changed"===t){const e=this.circle.getRadius();this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){ai(this.eventListeners),this.circle&&(this.circle.setMap(null),this.circle=void 0)}getCircle(){return this.circle}render(){return N``}};Oi([ei({type:Object})],Ii.prototype,"center",2),Oi([ei({type:Number})],Ii.prototype,"radius",2),Oi([ei({type:Boolean})],Ii.prototype,"editable",2),Oi([ei({type:Boolean})],Ii.prototype,"draggable",2),Oi([ei({type:Object})],Ii.prototype,"options",2),Oi([ii()],Ii.prototype,"circle",2),Oi([ii()],Ii.prototype,"map",2),Ii=Oi([_e("gmap-circle")],Ii);var Bi=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Ui=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?Li(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Bi(e,i,a),a};let Ri=class extends ot{constructor(){super(...arguments),this.editable=!1,this.draggable=!1,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback(),await this.initRectangle()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.rectangle&&(t.has("bounds")&&this.bounds&&this.rectangle.setBounds(this.bounds),t.has("editable")&&this.rectangle.setEditable(this.editable),t.has("draggable")&&this.rectangle.setDraggable(this.draggable),t.has("options")&&this.rectangle.setOptions(this.options))}async initRectangle(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createRectangle()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createRectangle()))}async createRectangle(){if(!this.map)return;const t={map:this.map,bounds:this.bounds,editable:this.editable,draggable:this.draggable,...this.options};this.rectangle=new google.maps.Rectangle(t),this.eventListeners=oi(this.rectangle,["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","bounds_changed"],((t,e)=>{if("bounds_changed"===t){const e=this.rectangle.getBounds();if(e){const i={north:e.getNorthEast().lat(),south:e.getSouthWest().lat(),east:e.getNorthEast().lng(),west:e.getSouthWest().lng()};this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}}else this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){ai(this.eventListeners),this.rectangle&&(this.rectangle.setMap(null),this.rectangle=void 0)}getRectangle(){return this.rectangle}render(){return N``}};Ui([ei({type:Object})],Ri.prototype,"bounds",2),Ui([ei({type:Boolean})],Ri.prototype,"editable",2),Ui([ei({type:Boolean})],Ri.prototype,"draggable",2),Ui([ei({type:Object})],Ri.prototype,"options",2),Ui([ii()],Ri.prototype,"rectangle",2),Ui([ii()],Ri.prototype,"map",2),Ri=Ui([_e("gmap-rectangle")],Ri);var ji=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,Di=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?Ni(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&ji(e,i,a),a};let Fi=class extends ot{constructor(){super(...arguments),this.gridSize=60,this.markers=[]}async connectedCallback(){super.connectedCallback(),await this.initCluster()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}async initCluster(){const t=this.closest("gmap-map");t&&(this.addEventListener("gmap-ready",(t=>{this.map=t.detail.map,this.createCluster()})),t.getMap&&(this.map=t.getMap(),this.map&&await this.createCluster())),this.addEventListener("gmap-marker-ready",(t=>{this.addMarker(t.detail.marker)}))}async createCluster(){if(this.map)try{const t=await import("./p-BkPzCq-C.js").catch((()=>null));if(!t)return void console.error("GMapCluster: @googlemaps/markerclusterer not found. Install with: npm install @googlemaps/markerclusterer");const{MarkerClusterer:e}=t,i={map:this.map,markers:this.markers};this.gridSize&&(i.gridSize=this.gridSize),void 0!==this.maxZoom&&(i.maxZoom=this.maxZoom),this.styles&&(i.styles=this.styles),this.calculator&&(i.calculator=this.calculator),this.markerClusterer=new e(i)}catch(t){console.error("GMapCluster: Error creating cluster:",t)}}addMarker(t){this.markers.includes(t)||(this.markers.push(t),this.markerClusterer&&this.markerClusterer.addMarker(t))}cleanup(){this.markerClusterer&&(this.markerClusterer.clearMarkers(),this.markerClusterer=void 0),this.markers=[]}getClusterer(){return this.markerClusterer}render(){return N`<slot></slot>`}};Di([ei({type:Number})],Fi.prototype,"gridSize",2),Di([ei({type:Number})],Fi.prototype,"maxZoom",2),Di([ei({type:Array})],Fi.prototype,"styles",2),Di([ei({type:Function})],Fi.prototype,"calculator",2),Di([ii()],Fi.prototype,"map",2),Di([ii()],Fi.prototype,"markerClusterer",2),Di([ii()],Fi.prototype,"markers",2),Fi=Di([_e("gmap-cluster")],Fi);var Gi=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,Vi=(t,e,i,s)=>{for(var o,a=s>1?void 0:s?qi(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&Gi(e,i,a),a};let Hi=class extends ot{constructor(){super(...arguments),this.zoom=0,this.visible=!0,this.motionTracking=!0,this.options={},this.eventListeners=[]}async connectedCallback(){super.connectedCallback()}async firstUpdated(){await Pe,this.createPanorama()}disconnectedCallback(){super.disconnectedCallback(),this.cleanup()}updated(t){super.updated(t),this.panorama&&(t.has("position")&&this.position&&this.panorama.setPosition(this.position),t.has("pano")&&this.pano&&this.panorama.setPano(this.pano),t.has("zoom")&&void 0!==this.zoom&&this.panorama.setZoom(this.zoom),t.has("pov")&&this.pov&&this.panorama.setPov(this.pov),t.has("visible")&&this.panorama.setVisible(this.visible),t.has("motionTracking")&&this.panorama.setMotionTracking(this.motionTracking))}createPanorama(){if(!this.panoramaElement)return;const t={position:this.position,pano:this.pano,zoom:this.zoom,pov:this.pov,visible:this.visible,motionTracking:this.motionTracking,...this.options};this.panorama=new google.maps.StreetViewPanorama(this.panoramaElement,t),this.eventListeners=oi(this.panorama,["closeclick","status_changed"],((t,e)=>{this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}))}cleanup(){ai(this.eventListeners),this.panorama=void 0}resize(){this.panorama&&google.maps.event.trigger(this.panorama,"resize")}getPanorama(){return this.panorama}render(){return N`<div class="panorama"></div>`}};Hi.styles=a`
|
|
1013
|
+
:host {
|
|
1014
|
+
display: block;
|
|
1015
|
+
position: relative;
|
|
1016
|
+
width: 100%;
|
|
1017
|
+
height: 400px;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.panorama {
|
|
1021
|
+
width: 100%;
|
|
1022
|
+
height: 100%;
|
|
1023
|
+
}
|
|
1024
|
+
`,Vi([ei({type:Object})],Hi.prototype,"position",2),Vi([ei({type:String})],Hi.prototype,"pano",2),Vi([ei({type:Number})],Hi.prototype,"zoom",2),Vi([ei({type:Object})],Hi.prototype,"pov",2),Vi([ei({type:Boolean})],Hi.prototype,"visible",2),Vi([ei({type:Boolean})],Hi.prototype,"motionTracking",2),Vi([ei({type:Object})],Hi.prototype,"options",2),Vi([si(".panorama")],Hi.prototype,"panoramaElement",2),Vi([ii()],Hi.prototype,"panorama",2),Hi=Vi([_e("gmap-street-view-panorama")],Hi);export{Ii as GMapCircle,Fi as GMapCluster,xi as GMapInfoWindow,mi as GMapMap,vi as GMapMarker,Mi as GMapPolygon,Ai as GMapPolyline,Ri as GMapRectangle,Hi as GMapStreetViewPanorama,oi as bindEvents,ai as cleanupListeners,hi as getTranslations,Me as importLibrary,ci as isRTL,Te as load,Pe as loaded,ri as updateProperty}
|