@salla.sa/twilight-components 2.14.392 → 2.14.393
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-oehrC7QI.js +39 -0
- package/dist/cjs/{filepond-D-ur1GA-.js → filepond-D7RVR_w_.js} +10 -5
- package/dist/cjs/{filepond-plugin-file-poster-DigEeKId.js → filepond-plugin-file-poster-DTuZK2ot.js} +11 -7
- package/dist/cjs/{filepond-plugin-file-validate-size-R9el3Yro.js → filepond-plugin-file-validate-size-DHc6pF_j.js} +1 -1
- package/dist/cjs/filepond-plugin-file-validate-type-DnkcvJVc.js +271 -0
- package/dist/cjs/{filepond-plugin-image-edit-bhI8kqN_.js → filepond-plugin-image-edit-vrZ1s7kw.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-COXZUVRV.js → filepond-plugin-image-exif-orientation-Bn5JSzQK.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-COP8QJBf.js → filepond-plugin-image-preview-8qWUFe9n.js} +1 -1
- package/dist/cjs/{index-CGnPURjZ.js → index-C5VeFDQ0.js} +1966 -1344
- package/dist/cjs/{index-BILBEE9f.js → index-CwD81m7i.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-accordion_6.cjs.entry.js +19 -15
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +12 -10
- package/dist/cjs/salla-advertisement.cjs.entry.js +3 -3
- package/dist/cjs/salla-alert_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +3 -3
- package/dist/cjs/salla-apps-icons.cjs.entry.js +3 -3
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +25 -23
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +3 -3
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +3 -3
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +17 -17
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +3 -3
- package/dist/cjs/salla-count-down.cjs.entry.js +35 -11
- package/dist/cjs/salla-custom-fields.cjs.entry.js +3 -3
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +3 -3
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
- package/dist/cjs/salla-hook.cjs.entry.js +5 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +3 -3
- package/dist/cjs/salla-installment.cjs.entry.js +3 -3
- package/dist/cjs/salla-list-tile.cjs.entry.js +3 -3
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty.cjs.entry.js +3 -3
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +3 -3
- package/dist/cjs/salla-map.cjs.entry.js +3 -3
- package/dist/cjs/salla-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-metadata.cjs.entry.js +3 -3
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +8 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +6 -4
- package/dist/cjs/salla-notification-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-notifications.cjs.entry.js +50 -5
- package/dist/cjs/salla-offer-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details-options.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details.cjs.entry.js +6 -4
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-edit.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +6 -4
- package/dist/cjs/salla-orders.cjs.entry.js +3 -3
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +3 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-slider.cjs.entry.js +3 -3
- package/dist/cjs/salla-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +3 -3
- package/dist/cjs/salla-search.cjs.entry.js +6 -4
- package/dist/cjs/salla-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/salla-slider.cjs.entry.js +20 -14
- package/dist/cjs/salla-social-share.cjs.entry.js +3 -3
- package/dist/cjs/salla-social.cjs.entry.js +3 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +7 -7
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/salla-trust-badges.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +3 -3
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +3 -3
- package/dist/cjs/twilight.cjs.js +5 -4
- package/dist/cjs/{vanilla-picker-DI3TImGd.js → vanilla-picker-yKERbLpx.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-accordion/salla-accordion.js +4 -4
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +19 -19
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -6
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +4 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +9 -9
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +6 -3
- package/dist/collection/components/salla-button/salla-button.js +11 -11
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +2 -1
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +8 -8
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +20 -14
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +6 -6
- package/dist/collection/components/salla-comments/salla-comment-item.js +2 -3
- package/dist/collection/components/salla-comments/salla-comments.js +18 -17
- package/dist/collection/components/salla-contacts/salla-contacts.js +10 -10
- package/dist/collection/components/salla-count-down/salla-count-down.js +66 -42
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +9 -7
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +69 -65
- package/dist/collection/components/salla-drawer/salla-drawer.js +11 -11
- package/dist/collection/components/salla-file-upload/salla-file-upload.css +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +85 -84
- package/dist/collection/components/salla-filters/salla-filters.js +2 -2
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +4 -5
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -11
- package/dist/collection/components/salla-hook/salla-hook.js +2 -2
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -6
- package/dist/collection/components/salla-installment/salla-installment.js +5 -5
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +2 -2
- package/dist/collection/components/salla-loading/salla-loading.js +4 -4
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +5 -5
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +14 -14
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +4 -3
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +13 -12
- package/dist/collection/components/salla-map/salla-map.js +14 -14
- package/dist/collection/components/salla-menu/salla-menu.js +10 -9
- package/dist/collection/components/salla-metadata/salla-metadata.js +3 -3
- package/dist/collection/components/salla-modal/salla-modal.js +11 -11
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +8 -7
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +2 -2
- package/dist/collection/components/salla-notifications/salla-notification-item.js +2 -2
- package/dist/collection/components/salla-notifications/salla-notifications.js +50 -5
- package/dist/collection/components/salla-offer/salla-offer.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +5 -5
- package/dist/collection/components/salla-order-details/salla-order-details-options.js +6 -5
- package/dist/collection/components/salla-order-details/salla-order-details.js +4 -3
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +4 -4
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +4 -4
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +2 -2
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +4 -3
- package/dist/collection/components/salla-orders/salla-orders.js +4 -4
- package/dist/collection/components/salla-payments/salla-payments.js +0 -1
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +3 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +8 -8
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +6 -6
- package/dist/collection/components/salla-product-card/salla-product-card.js +18 -18
- package/dist/collection/components/salla-product-options/salla-product-options.js +15 -13
- package/dist/collection/components/salla-products-list/salla-products-list.js +20 -21
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +22 -23
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +21 -20
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +2 -2
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +16 -17
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +11 -11
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +2 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +8 -8
- package/dist/collection/components/salla-review-card/salla-review-card.js +3 -3
- package/dist/collection/components/salla-reviews/salla-reviews.js +16 -13
- package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.js +2 -2
- package/dist/collection/components/salla-scopes/salla-scopes.js +2 -2
- package/dist/collection/components/salla-search/salla-search.js +6 -6
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +3 -3
- package/dist/collection/components/salla-slider/salla-slider.css +9 -2
- package/dist/collection/components/salla-slider/salla-slider.js +25 -25
- package/dist/collection/components/salla-social-share/salla-social-share.js +3 -3
- package/dist/collection/components/salla-tabs/salla-tab-content.js +2 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +5 -5
- package/dist/collection/components/salla-tabs/salla-tabs.js +2 -2
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +9 -8
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +5 -5
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +1 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +5 -5
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +1 -1
- package/dist/collection/components/salla-verify/salla-verify.js +4 -4
- package/dist/components/Helper.js +1 -432
- package/dist/components/_commonjsHelpers.js +1 -7
- package/dist/components/anime.es.js +1 -1310
- package/dist/components/arrow-left.js +1 -8
- package/dist/components/axios.js +2 -3908
- package/dist/components/bell-ring.js +1 -8
- package/dist/components/camera.js +1 -8
- package/dist/components/cancel.js +1 -8
- package/dist/components/cart.js +1 -8
- package/dist/components/check-circle2.js +1 -15
- package/dist/components/check.js +1 -8
- package/dist/components/facebook.js +1 -10
- package/dist/components/filepond-plugin-file-poster.js +3 -659
- package/dist/components/filepond-plugin-file-validate-size.js +2 -204
- package/dist/components/filepond-plugin-file-validate-type.js +3 -279
- package/dist/components/filepond-plugin-image-edit.js +2 -487
- package/dist/components/filepond-plugin-image-exif-orientation.js +2 -214
- package/dist/components/filepond-plugin-image-preview.js +2 -2237
- package/dist/components/filepond.js +3 -11282
- package/dist/components/gift.js +1 -8
- package/dist/components/image.js +1 -8
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -8163
- package/dist/components/index2.js +1 -1709
- package/dist/components/index3.js +1 -2550
- package/dist/components/interfaces.js +1 -12
- package/dist/components/isObject.js +1 -292
- package/dist/components/keyboard_arrow_down.js +1 -8
- package/dist/components/keyboard_arrow_right.js +1 -15
- package/dist/components/location.js +1 -11
- package/dist/components/mail.js +1 -8
- package/dist/components/minus.js +1 -15
- package/dist/components/salla-accordion-body.js +1 -6
- package/dist/components/salla-accordion-body2.js +1 -30
- package/dist/components/salla-accordion-head.js +1 -6
- package/dist/components/salla-accordion-head2.js +1 -63
- package/dist/components/salla-accordion.js +1 -6
- package/dist/components/salla-accordion2.js +1 -68
- package/dist/components/salla-add-product-button.js +1 -6
- package/dist/components/salla-add-product-button2.js +1 -306
- package/dist/components/salla-advertisement.js +1 -155
- package/dist/components/salla-alert.js +1 -59
- package/dist/components/salla-app-install-alert.js +1 -91
- package/dist/components/salla-apps-icons.js +1 -63
- package/dist/components/salla-booking-field.js +1 -6
- package/dist/components/salla-booking-field2.js +1 -221
- package/dist/components/salla-bottom-alert.js +1 -214
- package/dist/components/salla-breadcrumb.js +1 -226
- package/dist/components/salla-bullet-delivery.js +1 -2114
- package/dist/components/salla-button.js +1 -6
- package/dist/components/salla-button2.js +1 -174
- package/dist/components/salla-cart-coupons.js +1 -284
- package/dist/components/salla-cart-item-offers.js +1 -143
- package/dist/components/salla-cart-summary.js +1 -136
- package/dist/components/salla-color-picker.js +1 -6
- package/dist/components/salla-color-picker2.js +1 -260
- package/dist/components/salla-comment-form.js +1 -6
- package/dist/components/salla-comment-form2.js +1 -64
- package/dist/components/salla-comment-item.js +1 -6
- package/dist/components/salla-comment-item2.js +1 -217
- package/dist/components/salla-comments.js +1 -395
- package/dist/components/salla-conditional-fields.js +1 -6
- package/dist/components/salla-conditional-fields2.js +1 -137
- package/dist/components/salla-conditional-offer.js +1 -194
- package/dist/components/salla-contacts.js +1 -125
- package/dist/components/salla-cookies-bar.js +1 -107
- package/dist/components/salla-count-down.js +1 -6
- package/dist/components/salla-count-down2.js +1 -247
- package/dist/components/salla-custom-fields.js +1 -175
- package/dist/components/salla-datetime-picker.js +1 -6
- package/dist/components/salla-datetime-picker2.js +1 -342
- package/dist/components/salla-delivery-promise.js +1 -263
- package/dist/components/salla-drawer.js +1 -6
- package/dist/components/salla-drawer2.js +1 -214
- package/dist/components/salla-file-upload.js +1 -6
- package/dist/components/salla-file-upload2.js +1 -583
- package/dist/components/salla-filters-widget.js +1 -6
- package/dist/components/salla-filters-widget2.js +1 -245
- package/dist/components/salla-filters.js +1 -253
- package/dist/components/salla-fulfillment-methods.js +1 -61
- package/dist/components/salla-gifting.js +1 -732
- package/dist/components/salla-hook.js +1 -47
- package/dist/components/salla-infinite-scroll.js +1 -112
- package/dist/components/salla-installment.js +1 -306
- package/dist/components/salla-list-tile.js +1 -6
- package/dist/components/salla-list-tile2.js +1 -47
- package/dist/components/salla-loading.js +1 -6
- package/dist/components/salla-loading2.js +1 -51
- package/dist/components/salla-localization-modal.js +1 -296
- package/dist/components/salla-login-modal.js +1 -6
- package/dist/components/salla-login-modal2.js +1 -359
- package/dist/components/salla-loyalty-prize-item.js +1 -39
- package/dist/components/salla-loyalty-program.js +1 -115
- package/dist/components/salla-loyalty.js +1 -304
- package/dist/components/salla-maintenance-alert.js +1 -57
- package/dist/components/salla-map.js +1 -6
- package/dist/components/salla-map2.js +1 -766
- package/dist/components/salla-menu.js +1 -165
- package/dist/components/salla-metadata.js +1 -97
- package/dist/components/salla-modal.js +1 -6
- package/dist/components/salla-modal2.js +1 -215
- package/dist/components/salla-multiple-bundle-product-cart.js +1 -6
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -151
- package/dist/components/salla-multiple-bundle-product-details.js +1 -6
- package/dist/components/salla-multiple-bundle-product-details2.js +1 -296
- package/dist/components/salla-multiple-bundle-product-options-modal.js +1 -6
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +1 -598
- package/dist/components/salla-multiple-bundle-product-slider.js +1 -6
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -136
- package/dist/components/salla-multiple-bundle-product.js +1 -207
- package/dist/components/salla-notification-item.js +1 -6
- package/dist/components/salla-notification-item2.js +1 -32
- package/dist/components/salla-notifications.js +1 -145
- package/dist/components/salla-offer-modal.js +1 -328
- package/dist/components/salla-offer.js +1 -478
- package/dist/components/salla-order-details-multiple-bundle-product.js +1 -6
- package/dist/components/salla-order-details-multiple-bundle-product2.js +1 -122
- package/dist/components/salla-order-details-options.js +1 -6
- package/dist/components/salla-order-details-options2.js +1 -140
- package/dist/components/salla-order-details.js +1 -122
- package/dist/components/salla-order-edit-item.js +1 -6
- package/dist/components/salla-order-edit-item2.js +1 -181
- package/dist/components/salla-order-edit.js +1 -288
- package/dist/components/salla-order-summary.js +1 -132
- package/dist/components/salla-order-totals-card.js +1 -87
- package/dist/components/salla-orders.js +1 -271
- package/dist/components/salla-payments.js +1 -76
- package/dist/components/salla-placeholder.js +1 -6
- package/dist/components/salla-placeholder2.js +1 -66
- package/dist/components/salla-price-range.js +1 -6
- package/dist/components/salla-price-range2.js +1 -204
- package/dist/components/salla-product-availability.js +1 -6
- package/dist/components/salla-product-availability2.js +1 -206
- package/dist/components/salla-product-card.js +1 -6
- package/dist/components/salla-product-card2.js +1 -241
- package/dist/components/salla-product-options.js +1 -6
- package/dist/components/salla-product-options2.js +1 -962
- package/dist/components/salla-product-size-guide.js +1 -130
- package/dist/components/salla-products-list.js +1 -6
- package/dist/components/salla-products-list2.js +1 -812
- package/dist/components/salla-products-slider.js +1 -6
- package/dist/components/salla-products-slider2.js +1 -215
- package/dist/components/salla-progress-bar.js +1 -6
- package/dist/components/salla-progress-bar2.js +1 -94
- package/dist/components/salla-quantity-input.js +1 -6
- package/dist/components/salla-quantity-input2.js +1 -127
- package/dist/components/salla-quick-buy.js +1 -6
- package/dist/components/salla-quick-buy2.js +1 -1181
- package/dist/components/salla-quick-order.js +1 -299
- package/dist/components/salla-rating-modal.js +1 -530
- package/dist/components/salla-rating-stars.js +1 -6
- package/dist/components/salla-rating-stars2.js +1 -162
- package/dist/components/salla-review-card.js +1 -6
- package/dist/components/salla-review-card2.js +1 -198
- package/dist/components/salla-reviews-page.js +1 -726
- package/dist/components/salla-reviews-summary.js +1 -6
- package/dist/components/salla-reviews-summary2.js +1 -132
- package/dist/components/salla-reviews.js +1 -143
- package/dist/components/salla-scopes.js +1 -249
- package/dist/components/salla-search.js +1 -213
- package/dist/components/salla-skeleton.js +1 -6
- package/dist/components/salla-skeleton2.js +1 -50
- package/dist/components/salla-slider.js +1 -6
- package/dist/components/salla-slider2.js +1 -10483
- package/dist/components/salla-social-share.js +1 -194
- package/dist/components/salla-social.js +1 -89
- package/dist/components/salla-tab-content.js +1 -6
- package/dist/components/salla-tab-content2.js +1 -55
- package/dist/components/salla-tab-header.js +1 -6
- package/dist/components/salla-tab-header2.js +1 -85
- package/dist/components/salla-tabs.js +1 -6
- package/dist/components/salla-tabs2.js +1 -75
- package/dist/components/salla-tel-input.js +1 -6
- package/dist/components/salla-tel-input2.js +1 -168
- package/dist/components/salla-tiered-offer.js +1 -366
- package/dist/components/salla-tooltip.js +1 -6
- package/dist/components/salla-tooltip2.js +1 -57
- package/dist/components/salla-trust-badges.js +1 -90
- package/dist/components/salla-user-menu.js +1 -344
- package/dist/components/salla-user-profile.js +1 -203
- package/dist/components/salla-user-settings.js +1 -139
- package/dist/components/salla-verify.js +1 -303
- package/dist/components/salla-wallet.js +1 -114
- package/dist/components/search.js +1 -8
- package/dist/components/shopping-bag.js +1 -8
- package/dist/components/special-discount.js +1 -8
- package/dist/components/star.js +1 -8
- package/dist/components/star2.js +1 -8
- package/dist/components/vanilla-picker.js +2 -1034
- package/dist/components/whatsapp2.js +1 -8
- package/dist/esm/app-globals-BFryt7-C.js +37 -0
- package/dist/esm/{filepond-kTbl0kuh.js → filepond-DlGaLh8N.js} +10 -5
- package/dist/esm/{filepond-plugin-file-poster-CyywnjKv.js → filepond-plugin-file-poster-BTVFYcQx.js} +11 -7
- package/dist/esm/{filepond-plugin-file-validate-size-DgteZhje.js → filepond-plugin-file-validate-size-DGryLmWv.js} +1 -1
- package/dist/esm/filepond-plugin-file-validate-type-DxKfCD0V.js +269 -0
- package/dist/esm/{filepond-plugin-image-edit-pZ_mETE7.js → filepond-plugin-image-edit-2W7pu9hn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CjKYl7HL.js → filepond-plugin-image-exif-orientation-OQu-IvPH.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BzJTl_2A.js → filepond-plugin-image-preview-DEW_tSNR.js} +1 -1
- package/dist/esm/{index-3Kis_Ivk.js → index-BDqMkCqE.js} +1 -1
- package/dist/esm/{index-C23tPnnH.js → index-DYB20YqN.js} +1966 -1344
- package/dist/esm/loader.js +4 -3
- package/dist/esm/salla-accordion-body_2.entry.js +5 -5
- package/dist/esm/salla-accordion_6.entry.js +19 -15
- package/dist/esm/salla-add-product-button_4.entry.js +12 -10
- package/dist/esm/salla-advertisement.entry.js +3 -3
- package/dist/esm/salla-alert_2.entry.js +5 -5
- package/dist/esm/salla-app-install-alert.entry.js +3 -3
- package/dist/esm/salla-apps-icons.entry.js +3 -3
- package/dist/esm/salla-booking-field_7.entry.js +25 -23
- package/dist/esm/salla-bullet-delivery.entry.js +3 -3
- package/dist/esm/salla-cart-coupons.entry.js +3 -3
- package/dist/esm/salla-cart-item-offers_2.entry.js +5 -5
- package/dist/esm/salla-comment-form_8.entry.js +17 -17
- package/dist/esm/salla-conditional-offer.entry.js +3 -3
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +3 -3
- package/dist/esm/salla-count-down.entry.js +35 -11
- package/dist/esm/salla-custom-fields.entry.js +3 -3
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +3 -3
- package/dist/esm/salla-filters.entry.js +3 -3
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +3 -3
- package/dist/esm/salla-hook.entry.js +5 -2
- package/dist/esm/salla-infinite-scroll.entry.js +3 -3
- package/dist/esm/salla-installment.entry.js +3 -3
- package/dist/esm/salla-list-tile.entry.js +3 -3
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +3 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +3 -3
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty.entry.js +3 -3
- package/dist/esm/salla-maintenance-alert.entry.js +3 -3
- package/dist/esm/salla-map.entry.js +3 -3
- package/dist/esm/salla-menu.entry.js +3 -3
- package/dist/esm/salla-metadata.entry.js +3 -3
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +5 -5
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +8 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +6 -4
- package/dist/esm/salla-notification-item.entry.js +3 -3
- package/dist/esm/salla-notifications.entry.js +50 -5
- package/dist/esm/salla-offer-modal.entry.js +3 -3
- package/dist/esm/salla-offer.entry.js +3 -3
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +3 -3
- package/dist/esm/salla-order-details-options.entry.js +3 -3
- package/dist/esm/salla-order-details.entry.js +6 -4
- package/dist/esm/salla-order-edit-item.entry.js +3 -3
- package/dist/esm/salla-order-edit.entry.js +3 -3
- package/dist/esm/salla-order-summary.entry.js +3 -3
- package/dist/esm/salla-order-totals-card.entry.js +6 -4
- package/dist/esm/salla-orders.entry.js +3 -3
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-placeholder.entry.js +3 -3
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card.entry.js +3 -3
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +3 -3
- package/dist/esm/salla-products-slider.entry.js +3 -3
- package/dist/esm/salla-progress-bar.entry.js +3 -3
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +3 -3
- package/dist/esm/salla-search.entry.js +6 -4
- package/dist/esm/salla-skeleton.entry.js +3 -3
- package/dist/esm/salla-slider.entry.js +20 -14
- package/dist/esm/salla-social-share.entry.js +3 -3
- package/dist/esm/salla-social.entry.js +3 -3
- package/dist/esm/salla-tab-content_3.entry.js +7 -7
- package/dist/esm/salla-tiered-offer.entry.js +3 -3
- package/dist/esm/salla-tooltip.entry.js +3 -3
- package/dist/esm/salla-trust-badges.entry.js +3 -3
- package/dist/esm/salla-user-menu.entry.js +3 -3
- package/dist/esm/salla-user-profile.entry.js +3 -3
- package/dist/esm/salla-user-settings.entry.js +3 -3
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +3 -3
- package/dist/esm/twilight.js +5 -4
- package/dist/esm/{vanilla-picker-CEy5x8Cf.js → vanilla-picker-Dt9vZPZF.js} +1 -1
- package/dist/twilight/{p-651fe6e4.entry.js → p-06fa7327.entry.js} +1 -1
- package/dist/twilight/{p-a50f7f70.entry.js → p-09d39785.entry.js} +1 -1
- package/dist/twilight/{p-744d6394.entry.js → p-0add06f9.entry.js} +1 -1
- package/dist/twilight/{p-f251e744.entry.js → p-105b1dab.entry.js} +1 -1
- package/dist/twilight/{p-407828e4.entry.js → p-108d8c8b.entry.js} +1 -1
- package/dist/twilight/{p-2a1871c2.entry.js → p-1875537e.entry.js} +1 -1
- package/dist/twilight/{p-ff6f769c.entry.js → p-18bb0181.entry.js} +1 -1
- package/dist/twilight/p-1daeed6e.entry.js +4 -0
- package/dist/twilight/{p-2aa48902.entry.js → p-1ef2602d.entry.js} +1 -1
- package/dist/twilight/{p-27f34c85.entry.js → p-2881bb33.entry.js} +1 -1
- package/dist/twilight/{p-c3d0c062.entry.js → p-293c6cf3.entry.js} +1 -1
- package/dist/twilight/{p-866b297b.entry.js → p-296d2dd0.entry.js} +1 -1
- package/dist/twilight/{p-3a5aaa20.entry.js → p-2abaa633.entry.js} +1 -1
- package/dist/twilight/p-2ddb3fce.entry.js +4 -0
- package/dist/twilight/{p-81f648a2.entry.js → p-2fe01e44.entry.js} +1 -1
- package/dist/twilight/p-33779828.entry.js +4 -0
- package/dist/twilight/p-34968e31.entry.js +4 -0
- package/dist/twilight/{p-3745a7d0.entry.js → p-34b670fc.entry.js} +1 -1
- package/dist/twilight/{p-9f23dd30.entry.js → p-3ccc532d.entry.js} +1 -1
- package/dist/twilight/{p-f2ee9ceb.entry.js → p-41c733c2.entry.js} +1 -1
- package/dist/twilight/{p-67fe5680.entry.js → p-44fa7521.entry.js} +1 -1
- package/dist/twilight/{p-b4f07395.entry.js → p-4932857d.entry.js} +1 -1
- package/dist/twilight/{p-81f6638f.entry.js → p-4fa4547a.entry.js} +1 -1
- package/dist/twilight/{p-ba4b672c.entry.js → p-542d3277.entry.js} +1 -1
- package/dist/twilight/{p-a00e249b.entry.js → p-57ff1f25.entry.js} +1 -1
- package/dist/twilight/{p-827edf95.entry.js → p-59ae82bd.entry.js} +1 -1
- package/dist/twilight/{p-82e3c734.entry.js → p-647b6d76.entry.js} +1 -1
- package/dist/twilight/p-665189b4.entry.js +4 -0
- package/dist/twilight/{p-b55da21d.entry.js → p-6f36541a.entry.js} +1 -1
- package/dist/twilight/{p-c8aa5377.entry.js → p-7093a427.entry.js} +1 -1
- package/dist/twilight/{p-f201122a.entry.js → p-748df7e6.entry.js} +1 -1
- package/dist/twilight/p-776c9d33.entry.js +4 -0
- package/dist/twilight/{p-ce9fee6d.entry.js → p-7abddca8.entry.js} +1 -1
- package/dist/twilight/p-7b8313ef.entry.js +4 -0
- package/dist/twilight/p-7bd0ede5.entry.js +4 -0
- package/dist/twilight/p-817b8ba5.entry.js +4 -0
- package/dist/twilight/{p-5ef1b170.entry.js → p-87c0ca91.entry.js} +1 -1
- package/dist/twilight/p-8e8d9d7d.entry.js +4 -0
- package/dist/twilight/{p-BHjlzmYy.js → p-8r0S6BcZ.js} +1 -1
- package/dist/twilight/{p-face0448.entry.js → p-94dbc1e9.entry.js} +1 -1
- package/dist/twilight/{p-4e00f827.entry.js → p-96a20515.entry.js} +1 -1
- package/dist/twilight/{p-81f76d49.entry.js → p-96d03a28.entry.js} +1 -1
- package/dist/twilight/{p-97df32eb.entry.js → p-96e78428.entry.js} +1 -1
- package/dist/twilight/{p-CU-HtXWh.js → p-BZnoSB1s.js} +1 -1
- package/dist/twilight/p-BkClxrC4.js +9 -0
- package/dist/twilight/p-Ck4zxCil.js +9 -0
- package/dist/twilight/{p-IoI86ovS.js → p-Cw3UBzjl.js} +1 -1
- package/dist/twilight/p-D1vqXXNX.js +9 -0
- package/dist/twilight/p-DYB20YqN.js +5 -0
- package/dist/twilight/p-Vl6qpttb.js +4 -0
- package/dist/twilight/{p-BgG5eq1x.js → p-X6Yi3bYP.js} +1 -1
- package/dist/twilight/{p-d022b6ec.entry.js → p-a01f1992.entry.js} +1 -1
- package/dist/twilight/{p-5d37cc33.entry.js → p-aa7c5de0.entry.js} +1 -1
- package/dist/twilight/{p-b6ded196.entry.js → p-aaa0c743.entry.js} +1 -1
- package/dist/twilight/{p-713590e2.entry.js → p-ad041ab5.entry.js} +1 -1
- package/dist/twilight/{p-d1dd1db6.entry.js → p-ad07f67a.entry.js} +1 -1
- package/dist/twilight/{p-f1f74b41.entry.js → p-af3c74f4.entry.js} +1 -1
- package/dist/twilight/p-af60e72a.entry.js +4 -0
- package/dist/twilight/{p-bdcf3926.entry.js → p-b17d055d.entry.js} +1 -1
- package/dist/twilight/{p-c68f3054.entry.js → p-b598c0f7.entry.js} +1 -1
- package/dist/twilight/{p-8c6db6d7.entry.js → p-b64f3155.entry.js} +1 -1
- package/dist/twilight/p-bNzv71Xl.js +9 -0
- package/dist/twilight/{p-BqCmPfAo.js → p-bScl0xMh.js} +2 -2
- package/dist/twilight/{p-344c1910.entry.js → p-bff4c7b3.entry.js} +1 -1
- package/dist/twilight/{p-1b1f9f71.entry.js → p-c091e2dc.entry.js} +1 -1
- package/dist/twilight/{p-775b42ec.entry.js → p-c1fd45b1.entry.js} +1 -1
- package/dist/twilight/{p-1c215c8c.entry.js → p-c3ffb88a.entry.js} +1 -1
- package/dist/twilight/{p-9deae4f4.entry.js → p-c87951a2.entry.js} +1 -1
- package/dist/twilight/{p-1899f283.entry.js → p-ccfe5308.entry.js} +1 -1
- package/dist/twilight/{p-98eb495e.entry.js → p-d337c399.entry.js} +1 -1
- package/dist/twilight/{p-7b717899.entry.js → p-d371d450.entry.js} +1 -1
- package/dist/twilight/{p-f8b6967f.entry.js → p-d4a242f8.entry.js} +1 -1
- package/dist/twilight/{p-194d87c6.entry.js → p-d9f5a8cd.entry.js} +1 -1
- package/dist/twilight/{p-ff9b33bb.entry.js → p-dd2bd5dc.entry.js} +1 -1
- package/dist/twilight/{p-e89812d8.entry.js → p-df6853b5.entry.js} +1 -1
- package/dist/twilight/{p-05663bb1.entry.js → p-e28c0773.entry.js} +1 -1
- package/dist/twilight/{p-a76b3dba.entry.js → p-e3b8e0e1.entry.js} +1 -1
- package/dist/twilight/p-e679884a.entry.js +4 -0
- package/dist/twilight/{p-11767786.entry.js → p-e6bbf50d.entry.js} +1 -1
- package/dist/twilight/{p-1ca75c99.entry.js → p-e94f217b.entry.js} +1 -1
- package/dist/twilight/{p-d81ad2c3.entry.js → p-eac718cd.entry.js} +1 -1
- package/dist/twilight/{p-85ceef78.entry.js → p-ede67a08.entry.js} +1 -1
- package/dist/twilight/p-efab88c5.entry.js +4 -0
- package/dist/twilight/{p-1dbaefb8.entry.js → p-f176d41d.entry.js} +1 -1
- package/dist/twilight/p-f5d15e71.entry.js +4 -0
- package/dist/twilight/{p-50621375.entry.js → p-f7999a6d.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +6 -0
- package/dist/types/components/salla-notifications/interfaces.d.ts +20 -0
- package/dist/types/components/salla-notifications/salla-notifications.d.ts +17 -0
- package/dist/types/components.d.ts +763 -177
- package/dist/types/stencil-public-runtime.d.ts +169 -11
- package/package.json +5 -5
- package/dist/cjs/filepond-plugin-file-validate-type-Dfy66STE.js +0 -287
- package/dist/esm/filepond-plugin-file-validate-type-BYs_scJr.js +0 -285
- package/dist/twilight/p-0652987b.entry.js +0 -4
- package/dist/twilight/p-14529fd6.entry.js +0 -4
- package/dist/twilight/p-1c8394db.entry.js +0 -4
- package/dist/twilight/p-346b55d6.entry.js +0 -4
- package/dist/twilight/p-3962c34c.entry.js +0 -4
- package/dist/twilight/p-4e9e3ab1.entry.js +0 -4
- package/dist/twilight/p-549f59ed.entry.js +0 -4
- package/dist/twilight/p-54f65187.entry.js +0 -4
- package/dist/twilight/p-726513f8.entry.js +0 -4
- package/dist/twilight/p-753464fd.entry.js +0 -4
- package/dist/twilight/p-AfW2b46_.js +0 -9
- package/dist/twilight/p-C23tPnnH.js +0 -5
- package/dist/twilight/p-CrYUKEsF.js +0 -9
- package/dist/twilight/p-HWjjIZ9_.js +0 -9
- package/dist/twilight/p-Ig1Tafsp.js +0 -9
- package/dist/twilight/p-c9001d7f.entry.js +0 -4
- package/dist/twilight/p-cf9573fd.entry.js +0 -4
- package/dist/twilight/p-e6124fab.entry.js +0 -4
- package/dist/twilight/p-eb5a8329.entry.js +0 -4
|
@@ -1,1043 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { g as getDefaultExportFromCjs } from './_commonjsHelpers.js';
|
|
5
|
-
|
|
6
|
-
function _mergeNamespaces(n, m) {
|
|
7
|
-
m.forEach(function (e) {
|
|
8
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
9
|
-
if (k !== 'default' && !(k in n)) {
|
|
10
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return e[k]; }
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
return Object.freeze(n);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var vanillaPicker$3 = {exports: {}};
|
|
22
|
-
|
|
4
|
+
import{g as e}from"./_commonjsHelpers.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var r,i={exports:{}},n=(r||(r=1,i.exports=function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,n=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var r=this;r.length<e;)r=t+r;return r};var i={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var o=function(){function o(t,i,n,a){e(this,o);var s=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===n){var c=t&&""+t;c&&function(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),i=r(t,4),n=i[0],a=i[1],c=i[2],p=i[3];void 0===p&&(p=1),s.hsla=[n/=360,a/=100,c/=100,p]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),f=r(u,4),l=f[3];void 0===l&&(l=1),s.rgba=[f[0],f[1],f[2],l]}else s.rgba=e.startsWith("#")?o.hexToRgb(e):o.nameToRgb(e)||o.hexToRgb(e)}(c.toLowerCase())}else this.rgba=[t,i,n,void 0===a?1:a]}return t(o,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return n(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],r=["","%","%",""],i=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,i){return n(e*t[i],3===i?3:1)+r[i]}));return e?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=o.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=o.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)})).map((function(e){return e.padStart(2,"0")})).join("")},set:function(e){this.rgba=o.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=i[t];return void 0===r?r:o.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3];i/=255,n/=255,o/=255;var s=Math.max(i,n,o),c=Math.min(i,n,o),p=void 0,u=void 0,f=(s+c)/2;if(s===c)p=u=0;else{var l=s-c;switch(u=f>.5?l/(2-s-c):l/(s+c),s){case i:p=(n-o)/l+(n<o?6:0);break;case n:p=(o-i)/l+2;break;case o:p=(i-n)/l+4}p/=6}return[p,u,f,a]}},{key:"hslToRgb",value:function(e){var t=r(e,4),i=t[0],n=t[1],o=t[2],a=t[3],s=void 0,c=void 0,p=void 0;if(0===n)s=c=p=o;else{var u=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},f=o<.5?o*(1+n):o+n-o*n,l=2*o-f;s=u(l,f,i+1/3),c=u(l,f,i),p=u(l,f,i-1/3)}var h=[255*s,255*c,255*p].map(Math.round);return h[3]=a,h}}]),o}(),a=function(){function r(){e(this,r),this._events=[]}return t(r,[{key:"add",value:function(e,t,r){e.addEventListener(t,r,!1),this._events.push({target:e,type:t,handler:r})}},{key:"remove",value:function(e,t,i){this._events=this._events.filter((function(n){var o=!0;return e&&e!==n.target&&(o=!1),t&&t!==n.type&&(o=!1),i&&i!==n.handler&&(o=!1),o&&r._doRemove(n.target,n.type,n.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return r._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,r){e.removeEventListener(t,r,!1)}}]),r}();function s(e,t,r){var i=!1;function n(e,t,r){return Math.max(t,Math.min(e,r))}function o(e,o,a){if(a&&(i=!0),i){e.preventDefault();var s=t.getBoundingClientRect(),c=s.width,p=s.height,u=o.clientY,f=n(o.clientX-s.left,0,c),l=n(u-s.top,0,p);r(f/c,l/p)}}function a(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):i=!1}function s(e,t){1===e.touches.length?o(e,e.touches[0],t):i=!1}e.add(t,"mousedown",(function(e){a(e,!0)})),e.add(t,"touchstart",(function(e){s(e,!0)})),e.add(window,"mousemove",a),e.add(t,"touchmove",s),e.add(window,"mouseup",(function(){i=!1})),e.add(t,"touchend",(function(){i=!1})),e.add(t,"touchcancel",(function(){i=!1}))}var c="keydown",p="mousedown",u="focusin";function f(e,t){return(t||document).querySelector(e)}function l(e,t,r,i){e.add(t,c,(function(e){r.indexOf(e.key)>=0&&i(e)}))}var h=function(){function r(t){e(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new a,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return t(r,[{key:"setOptions",value:function(e){var t=this;if(e){var r=this.settings;if(e instanceof HTMLElement)r.parent=e;else{r.parent&&e.parent&&r.parent!==e.parent&&(this._events.remove(r.parent),this._popupInited=!1),function(e,t){for(var r in e)t[r]=e[r]}(e,r),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var i=e.color||e.colour;i&&this._setColor(i)}var n=r.parent;if(n&&r.popup&&!this._popupInited){var o=function(e){return t.openHandler(e)};this._events.add(n,"click",o),l(this._events,n,[" ","Spacebar","Enter"],o),this._popupInited=!0}else e.parent&&!r.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===c?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;e?t===p||t===u?e.timeStamp>(this.__containedEvent||0)+100&&(r=!0):(function(e){e.preventDefault(),e.stopPropagation()}(e),r=!0):r=!0,r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==p&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var r=void 0;try{r=new o(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,r,i=(t=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',(r=document.createElement("div")).innerHTML=t,r.firstElementChild);return this.domElement=i,this._domH=f(".picker_hue",i),this._domSL=f(".picker_sl",i),this._domA=f(".picker_alpha",i),this._domEdit=f(".picker_editor input",i),this._domSample=f(".picker_sample",i),this._domOkay=f(".picker_done button",i),this._domCancel=f(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,r=this.domElement,i=this._events;function n(e,t,r){i.add(e,t,r)}n(r,"click",(function(e){return e.preventDefault()})),s(i,this._domH,(function(e){return t._setHSLA(e)})),s(i,this._domSL,(function(e,r){return t._setHSLA(null,e,1-r)})),this.settings.alpha&&s(i,this._domA,(function(e,r){return t._setHSLA(null,null,null,1-r)}));var o=this._domEdit;n(o,"input",(function(){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),n(o,"focus",(function(){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};n(window,p,t),n(window,u,t),l(i,r,["Esc","Escape"],t);var o=function(t){e.__containedEvent=t.timeStamp};n(r,p,o),n(r,u,o),n(e._domCancel,"click",t)}));var a=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};n(this._domOkay,"click",a),l(i,r,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(r){"static"===getComputedStyle(e).position&&(e.style.position="relative");var i=!0===r?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===i?t.classList.add(e):t.classList.remove(e)})),t.classList.add(i)}))}},{key:"_setHSLA",value:function(e,t,r,i,n){n=n||{};var o=this.colour,a=o.hsla;[e,t,r,i].forEach((function(e,t){(e||0===e)&&(a[t]=e)})),o.hsla=a,this._updateUI(n),this.onChange&&!n.silent&&this.onChange(o)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,r=t.hsla,i="hsl("+360*r[0]+", 100%, 50%)",n=t.hslString,o=t.hslaString,a=this._domH,s=this._domSL,c=this._domA,p=f(".picker_selector",a),u=f(".picker_selector",s),l=f(".picker_selector",c);g(0,p,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,g(0,u,r[1]),v(0,u,1-r[2]),s.style.color=n,v(0,l,1-r[3]);var h=n,d=h.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[h,d]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var b=this.settings.alpha,k=void 0;switch(this.settings.editorFormat){case"rgb":k=t.printRGB(b);break;case"hsl":k=t.printHSL(b);break;default:k=t.printHex(b)}this._domEdit.value=k}this._domSample.style.color=o}function g(e,t,r){t.style.left=100*r+"%"}function v(e,t,r){t.style.top=100*r+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),r}(),d=document.createElement("style");return d.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(d),h.StyleElement=d,h}()),i.exports),o=t({__proto__:null,default:e(n)},[n]);
|
|
23
5
|
/*!
|
|
24
6
|
* vanilla-picker v2.12.3
|
|
25
7
|
* https://vanilla-picker.js.org
|
|
26
8
|
*
|
|
27
9
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|
28
10
|
* Released under the ISC license.
|
|
29
|
-
*/
|
|
30
|
-
var vanillaPicker$2 = vanillaPicker$3.exports;
|
|
31
|
-
|
|
32
|
-
var hasRequiredVanillaPicker;
|
|
33
|
-
|
|
34
|
-
function requireVanillaPicker () {
|
|
35
|
-
if (hasRequiredVanillaPicker) return vanillaPicker$3.exports;
|
|
36
|
-
hasRequiredVanillaPicker = 1;
|
|
37
|
-
(function (module, exports) {
|
|
38
|
-
(function (global, factory) {
|
|
39
|
-
module.exports = factory() ;
|
|
40
|
-
})(vanillaPicker$2, (function () {
|
|
41
|
-
var classCallCheck = function (instance, Constructor) {
|
|
42
|
-
if (!(instance instanceof Constructor)) {
|
|
43
|
-
throw new TypeError("Cannot call a class as a function");
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
var createClass = function () {
|
|
48
|
-
function defineProperties(target, props) {
|
|
49
|
-
for (var i = 0; i < props.length; i++) {
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return function (Constructor, protoProps, staticProps) {
|
|
59
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
60
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
61
|
-
return Constructor;
|
|
62
|
-
};
|
|
63
|
-
}();
|
|
64
|
-
|
|
65
|
-
var slicedToArray = function () {
|
|
66
|
-
function sliceIterator(arr, i) {
|
|
67
|
-
var _arr = [];
|
|
68
|
-
var _n = true;
|
|
69
|
-
var _d = false;
|
|
70
|
-
var _e = undefined;
|
|
71
|
-
|
|
72
|
-
try {
|
|
73
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
74
|
-
_arr.push(_s.value);
|
|
75
|
-
|
|
76
|
-
if (i && _arr.length === i) break;
|
|
77
|
-
}
|
|
78
|
-
} catch (err) {
|
|
79
|
-
_d = true;
|
|
80
|
-
_e = err;
|
|
81
|
-
} finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
84
|
-
} finally {
|
|
85
|
-
if (_d) throw _e;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return _arr;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return function (arr, i) {
|
|
93
|
-
if (Array.isArray(arr)) {
|
|
94
|
-
return arr;
|
|
95
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
96
|
-
return sliceIterator(arr, i);
|
|
97
|
-
} else {
|
|
98
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}();
|
|
102
|
-
|
|
103
|
-
String.prototype.startsWith = String.prototype.startsWith || function (needle) {
|
|
104
|
-
return this.indexOf(needle) === 0;
|
|
105
|
-
};
|
|
106
|
-
String.prototype.padStart = String.prototype.padStart || function (len, pad) {
|
|
107
|
-
var str = this;while (str.length < len) {
|
|
108
|
-
str = pad + str;
|
|
109
|
-
}return str;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
var colorNames = { cb: '0f8ff', tqw: 'aebd7', q: '-ffff', qmrn: '7fffd4', zr: '0ffff', bg: '5f5dc', bsq: 'e4c4', bck: '---', nch: 'ebcd', b: '--ff', bvt: '8a2be2', brwn: 'a52a2a', brw: 'deb887', ctb: '5f9ea0', hrt: '7fff-', chcT: 'd2691e', cr: '7f50', rnw: '6495ed', crns: '8dc', crms: 'dc143c', cn: '-ffff', Db: '--8b', Dcn: '-8b8b', Dgnr: 'b8860b', Dgr: 'a9a9a9', Dgrn: '-64-', Dkhk: 'bdb76b', Dmgn: '8b-8b', Dvgr: '556b2f', Drng: '8c-', Drch: '9932cc', Dr: '8b--', Dsmn: 'e9967a', Dsgr: '8fbc8f', DsTb: '483d8b', DsTg: '2f4f4f', Dtrq: '-ced1', Dvt: '94-d3', ppnk: '1493', pskb: '-bfff', mgr: '696969', grb: '1e90ff', rbrc: 'b22222', rwht: 'af0', stg: '228b22', chs: '-ff', gnsb: 'dcdcdc', st: '8f8ff', g: 'd7-', gnr: 'daa520', gr: '808080', grn: '-8-0', grnw: 'adff2f', hnw: '0fff0', htpn: '69b4', nnr: 'cd5c5c', ng: '4b-82', vr: '0', khk: '0e68c', vnr: 'e6e6fa', nrb: '0f5', wngr: '7cfc-', mnch: 'acd', Lb: 'add8e6', Lcr: '08080', Lcn: 'e0ffff', Lgnr: 'afad2', Lgr: 'd3d3d3', Lgrn: '90ee90', Lpnk: 'b6c1', Lsmn: 'a07a', Lsgr: '20b2aa', Lskb: '87cefa', LsTg: '778899', Lstb: 'b0c4de', Lw: 'e0', m: '-ff-', mgrn: '32cd32', nn: 'af0e6', mgnt: '-ff', mrn: '8--0', mqm: '66cdaa', mmb: '--cd', mmrc: 'ba55d3', mmpr: '9370db', msg: '3cb371', mmsT: '7b68ee', '': '-fa9a', mtr: '48d1cc', mmvt: 'c71585', mnLb: '191970', ntc: '5fffa', mstr: 'e4e1', mccs: 'e4b5', vjw: 'dead', nv: '--80', c: 'df5e6', v: '808-0', vrb: '6b8e23', rng: 'a5-', rngr: '45-', rch: 'da70d6', pgnr: 'eee8aa', pgrn: '98fb98', ptrq: 'afeeee', pvtr: 'db7093', ppwh: 'efd5', pchp: 'dab9', pr: 'cd853f', pnk: 'c0cb', pm: 'dda0dd', pwrb: 'b0e0e6', prp: '8-080', cc: '663399', r: '--', sbr: 'bc8f8f', rb: '4169e1', sbrw: '8b4513', smn: 'a8072', nbr: '4a460', sgrn: '2e8b57', ssh: '5ee', snn: 'a0522d', svr: 'c0c0c0', skb: '87ceeb', sTb: '6a5acd', sTgr: '708090', snw: 'afa', n: '-ff7f', stb: '4682b4', tn: 'd2b48c', t: '-8080', thst: 'd8bfd8', tmT: '6347', trqs: '40e0d0', vt: 'ee82ee', whT: '5deb3', wht: '', hts: '5f5f5', w: '-', wgrn: '9acd32' };
|
|
113
|
-
|
|
114
|
-
function printNum(num) {
|
|
115
|
-
var decs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
116
|
-
|
|
117
|
-
var str = decs > 0 ? num.toFixed(decs).replace(/0+$/, '').replace(/\.$/, '') : num.toString();
|
|
118
|
-
return str || '0';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var Color = function () {
|
|
122
|
-
function Color(r, g, b, a) {
|
|
123
|
-
classCallCheck(this, Color);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var that = this;
|
|
127
|
-
function parseString(input) {
|
|
128
|
-
|
|
129
|
-
if (input.startsWith('hsl')) {
|
|
130
|
-
var _input$match$map = input.match(/([\-\d\.e]+)/g).map(Number),
|
|
131
|
-
_input$match$map2 = slicedToArray(_input$match$map, 4),
|
|
132
|
-
h = _input$match$map2[0],
|
|
133
|
-
s = _input$match$map2[1],
|
|
134
|
-
l = _input$match$map2[2],
|
|
135
|
-
_a = _input$match$map2[3];
|
|
136
|
-
|
|
137
|
-
if (_a === undefined) {
|
|
138
|
-
_a = 1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
h /= 360;
|
|
142
|
-
s /= 100;
|
|
143
|
-
l /= 100;
|
|
144
|
-
that.hsla = [h, s, l, _a];
|
|
145
|
-
} else if (input.startsWith('rgb')) {
|
|
146
|
-
var _input$match$map3 = input.match(/([\-\d\.e]+)/g).map(Number),
|
|
147
|
-
_input$match$map4 = slicedToArray(_input$match$map3, 4),
|
|
148
|
-
_r = _input$match$map4[0],
|
|
149
|
-
_g = _input$match$map4[1],
|
|
150
|
-
_b = _input$match$map4[2],
|
|
151
|
-
_a2 = _input$match$map4[3];
|
|
152
|
-
|
|
153
|
-
if (_a2 === undefined) {
|
|
154
|
-
_a2 = 1;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
that.rgba = [_r, _g, _b, _a2];
|
|
158
|
-
} else {
|
|
159
|
-
if (input.startsWith('#')) {
|
|
160
|
-
that.rgba = Color.hexToRgb(input);
|
|
161
|
-
} else {
|
|
162
|
-
that.rgba = Color.nameToRgb(input) || Color.hexToRgb(input);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (r === undefined) ; else if (Array.isArray(r)) {
|
|
168
|
-
this.rgba = r;
|
|
169
|
-
} else if (b === undefined) {
|
|
170
|
-
var color = r && '' + r;
|
|
171
|
-
if (color) {
|
|
172
|
-
parseString(color.toLowerCase());
|
|
173
|
-
}
|
|
174
|
-
} else {
|
|
175
|
-
this.rgba = [r, g, b, a === undefined ? 1 : a];
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
createClass(Color, [{
|
|
180
|
-
key: 'printRGB',
|
|
181
|
-
value: function printRGB(alpha) {
|
|
182
|
-
var rgb = alpha ? this.rgba : this.rgba.slice(0, 3),
|
|
183
|
-
vals = rgb.map(function (x, i) {
|
|
184
|
-
return printNum(x, i === 3 ? 3 : 0);
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
return alpha ? 'rgba(' + vals + ')' : 'rgb(' + vals + ')';
|
|
188
|
-
}
|
|
189
|
-
}, {
|
|
190
|
-
key: 'printHSL',
|
|
191
|
-
value: function printHSL(alpha) {
|
|
192
|
-
var mults = [360, 100, 100, 1],
|
|
193
|
-
suff = ['', '%', '%', ''];
|
|
194
|
-
|
|
195
|
-
var hsl = alpha ? this.hsla : this.hsla.slice(0, 3),
|
|
196
|
-
vals = hsl.map(function (x, i) {
|
|
197
|
-
return printNum(x * mults[i], i === 3 ? 3 : 1) + suff[i];
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
return alpha ? 'hsla(' + vals + ')' : 'hsl(' + vals + ')';
|
|
201
|
-
}
|
|
202
|
-
}, {
|
|
203
|
-
key: 'printHex',
|
|
204
|
-
value: function printHex(alpha) {
|
|
205
|
-
var hex = this.hex;
|
|
206
|
-
return alpha ? hex : hex.substring(0, 7);
|
|
207
|
-
}
|
|
208
|
-
}, {
|
|
209
|
-
key: 'rgba',
|
|
210
|
-
get: function get() {
|
|
211
|
-
if (this._rgba) {
|
|
212
|
-
return this._rgba;
|
|
213
|
-
}
|
|
214
|
-
if (!this._hsla) {
|
|
215
|
-
throw new Error('No color is set');
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return this._rgba = Color.hslToRgb(this._hsla);
|
|
219
|
-
},
|
|
220
|
-
set: function set(rgb) {
|
|
221
|
-
if (rgb.length === 3) {
|
|
222
|
-
rgb[3] = 1;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
this._rgba = rgb;
|
|
226
|
-
this._hsla = null;
|
|
227
|
-
}
|
|
228
|
-
}, {
|
|
229
|
-
key: 'rgbString',
|
|
230
|
-
get: function get() {
|
|
231
|
-
return this.printRGB();
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
key: 'rgbaString',
|
|
235
|
-
get: function get() {
|
|
236
|
-
return this.printRGB(true);
|
|
237
|
-
}
|
|
238
|
-
}, {
|
|
239
|
-
key: 'hsla',
|
|
240
|
-
get: function get() {
|
|
241
|
-
if (this._hsla) {
|
|
242
|
-
return this._hsla;
|
|
243
|
-
}
|
|
244
|
-
if (!this._rgba) {
|
|
245
|
-
throw new Error('No color is set');
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return this._hsla = Color.rgbToHsl(this._rgba);
|
|
249
|
-
},
|
|
250
|
-
set: function set(hsl) {
|
|
251
|
-
if (hsl.length === 3) {
|
|
252
|
-
hsl[3] = 1;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
this._hsla = hsl;
|
|
256
|
-
this._rgba = null;
|
|
257
|
-
}
|
|
258
|
-
}, {
|
|
259
|
-
key: 'hslString',
|
|
260
|
-
get: function get() {
|
|
261
|
-
return this.printHSL();
|
|
262
|
-
}
|
|
263
|
-
}, {
|
|
264
|
-
key: 'hslaString',
|
|
265
|
-
get: function get() {
|
|
266
|
-
return this.printHSL(true);
|
|
267
|
-
}
|
|
268
|
-
}, {
|
|
269
|
-
key: 'hex',
|
|
270
|
-
get: function get() {
|
|
271
|
-
var rgb = this.rgba,
|
|
272
|
-
hex = rgb.map(function (x, i) {
|
|
273
|
-
return i < 3 ? x.toString(16) : Math.round(x * 255).toString(16);
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
return '#' + hex.map(function (x) {
|
|
277
|
-
return x.padStart(2, '0');
|
|
278
|
-
}).join('');
|
|
279
|
-
},
|
|
280
|
-
set: function set(hex) {
|
|
281
|
-
this.rgba = Color.hexToRgb(hex);
|
|
282
|
-
}
|
|
283
|
-
}], [{
|
|
284
|
-
key: 'hexToRgb',
|
|
285
|
-
value: function hexToRgb(input) {
|
|
286
|
-
|
|
287
|
-
var hex = (input.startsWith('#') ? input.slice(1) : input).replace(/^(\w{3})$/, '$1F').replace(/^(\w)(\w)(\w)(\w)$/, '$1$1$2$2$3$3$4$4').replace(/^(\w{6})$/, '$1FF');
|
|
288
|
-
|
|
289
|
-
if (!hex.match(/^([0-9a-fA-F]{8})$/)) {
|
|
290
|
-
throw new Error('Unknown hex color; ' + input);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
var rgba = hex.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function (x) {
|
|
294
|
-
return parseInt(x, 16);
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
rgba[3] = rgba[3] / 255;
|
|
298
|
-
return rgba;
|
|
299
|
-
}
|
|
300
|
-
}, {
|
|
301
|
-
key: 'nameToRgb',
|
|
302
|
-
value: function nameToRgb(input) {
|
|
303
|
-
|
|
304
|
-
var hash = input.toLowerCase().replace('at', 'T').replace(/[aeiouyldf]/g, '').replace('ght', 'L').replace('rk', 'D').slice(-5, 4),
|
|
305
|
-
hex = colorNames[hash];
|
|
306
|
-
return hex === undefined ? hex : Color.hexToRgb(hex.replace(/\-/g, '00').padStart(6, 'f'));
|
|
307
|
-
}
|
|
308
|
-
}, {
|
|
309
|
-
key: 'rgbToHsl',
|
|
310
|
-
value: function rgbToHsl(_ref) {
|
|
311
|
-
var _ref2 = slicedToArray(_ref, 4),
|
|
312
|
-
r = _ref2[0],
|
|
313
|
-
g = _ref2[1],
|
|
314
|
-
b = _ref2[2],
|
|
315
|
-
a = _ref2[3];
|
|
316
|
-
|
|
317
|
-
r /= 255;
|
|
318
|
-
g /= 255;
|
|
319
|
-
b /= 255;
|
|
320
|
-
|
|
321
|
-
var max = Math.max(r, g, b),
|
|
322
|
-
min = Math.min(r, g, b);
|
|
323
|
-
var h = void 0,
|
|
324
|
-
s = void 0,
|
|
325
|
-
l = (max + min) / 2;
|
|
326
|
-
|
|
327
|
-
if (max === min) {
|
|
328
|
-
h = s = 0;
|
|
329
|
-
} else {
|
|
330
|
-
var d = max - min;
|
|
331
|
-
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
332
|
-
switch (max) {
|
|
333
|
-
case r:
|
|
334
|
-
h = (g - b) / d + (g < b ? 6 : 0);break;
|
|
335
|
-
case g:
|
|
336
|
-
h = (b - r) / d + 2;break;
|
|
337
|
-
case b:
|
|
338
|
-
h = (r - g) / d + 4;break;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
h /= 6;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
return [h, s, l, a];
|
|
345
|
-
}
|
|
346
|
-
}, {
|
|
347
|
-
key: 'hslToRgb',
|
|
348
|
-
value: function hslToRgb(_ref3) {
|
|
349
|
-
var _ref4 = slicedToArray(_ref3, 4),
|
|
350
|
-
h = _ref4[0],
|
|
351
|
-
s = _ref4[1],
|
|
352
|
-
l = _ref4[2],
|
|
353
|
-
a = _ref4[3];
|
|
354
|
-
|
|
355
|
-
var r = void 0,
|
|
356
|
-
g = void 0,
|
|
357
|
-
b = void 0;
|
|
358
|
-
|
|
359
|
-
if (s === 0) {
|
|
360
|
-
r = g = b = l;
|
|
361
|
-
} else {
|
|
362
|
-
var hue2rgb = function hue2rgb(p, q, t) {
|
|
363
|
-
if (t < 0) t += 1;
|
|
364
|
-
if (t > 1) t -= 1;
|
|
365
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
366
|
-
if (t < 1 / 2) return q;
|
|
367
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
368
|
-
return p;
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
var q = l < 0.5 ? l * (1 + s) : l + s - l * s,
|
|
372
|
-
p = 2 * l - q;
|
|
373
|
-
|
|
374
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
375
|
-
g = hue2rgb(p, q, h);
|
|
376
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
var rgba = [r * 255, g * 255, b * 255].map(Math.round);
|
|
380
|
-
rgba[3] = a;
|
|
381
|
-
|
|
382
|
-
return rgba;
|
|
383
|
-
}
|
|
384
|
-
}]);
|
|
385
|
-
return Color;
|
|
386
|
-
}();
|
|
387
|
-
|
|
388
|
-
var EventBucket = function () {
|
|
389
|
-
function EventBucket() {
|
|
390
|
-
classCallCheck(this, EventBucket);
|
|
391
|
-
|
|
392
|
-
this._events = [];
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
createClass(EventBucket, [{
|
|
396
|
-
key: 'add',
|
|
397
|
-
value: function add(target, type, handler) {
|
|
398
|
-
target.addEventListener(type, handler, false);
|
|
399
|
-
this._events.push({
|
|
400
|
-
target: target,
|
|
401
|
-
type: type,
|
|
402
|
-
handler: handler
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}, {
|
|
406
|
-
key: 'remove',
|
|
407
|
-
value: function remove(target, type, handler) {
|
|
408
|
-
this._events = this._events.filter(function (e) {
|
|
409
|
-
var isMatch = true;
|
|
410
|
-
if (target && target !== e.target) {
|
|
411
|
-
isMatch = false;
|
|
412
|
-
}
|
|
413
|
-
if (type && type !== e.type) {
|
|
414
|
-
isMatch = false;
|
|
415
|
-
}
|
|
416
|
-
if (handler && handler !== e.handler) {
|
|
417
|
-
isMatch = false;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
if (isMatch) {
|
|
421
|
-
EventBucket._doRemove(e.target, e.type, e.handler);
|
|
422
|
-
}
|
|
423
|
-
return !isMatch;
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
}, {
|
|
427
|
-
key: 'destroy',
|
|
428
|
-
value: function destroy() {
|
|
429
|
-
this._events.forEach(function (e) {
|
|
430
|
-
return EventBucket._doRemove(e.target, e.type, e.handler);
|
|
431
|
-
});
|
|
432
|
-
this._events = [];
|
|
433
|
-
}
|
|
434
|
-
}], [{
|
|
435
|
-
key: '_doRemove',
|
|
436
|
-
value: function _doRemove(target, type, handler) {
|
|
437
|
-
target.removeEventListener(type, handler, false);
|
|
438
|
-
}
|
|
439
|
-
}]);
|
|
440
|
-
return EventBucket;
|
|
441
|
-
}();
|
|
442
|
-
|
|
443
|
-
function parseHTML(htmlString) {
|
|
444
|
-
|
|
445
|
-
var div = document.createElement('div');
|
|
446
|
-
div.innerHTML = htmlString;
|
|
447
|
-
return div.firstElementChild;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
function dragTrack(eventBucket, area, callback) {
|
|
451
|
-
var dragging = false;
|
|
452
|
-
|
|
453
|
-
function clamp(val, min, max) {
|
|
454
|
-
return Math.max(min, Math.min(val, max));
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
function onMove(e, info, starting) {
|
|
458
|
-
if (starting) {
|
|
459
|
-
dragging = true;
|
|
460
|
-
}
|
|
461
|
-
if (!dragging) {
|
|
462
|
-
return;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
e.preventDefault();
|
|
466
|
-
|
|
467
|
-
var bounds = area.getBoundingClientRect(),
|
|
468
|
-
w = bounds.width,
|
|
469
|
-
h = bounds.height,
|
|
470
|
-
x = info.clientX,
|
|
471
|
-
y = info.clientY;
|
|
472
|
-
|
|
473
|
-
var relX = clamp(x - bounds.left, 0, w),
|
|
474
|
-
relY = clamp(y - bounds.top, 0, h);
|
|
475
|
-
|
|
476
|
-
callback(relX / w, relY / h);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function onMouse(e, starting) {
|
|
480
|
-
var button = e.buttons === undefined ? e.which : e.buttons;
|
|
481
|
-
if (button === 1) {
|
|
482
|
-
onMove(e, e, starting);
|
|
483
|
-
} else {
|
|
484
|
-
dragging = false;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
function onTouch(e, starting) {
|
|
489
|
-
if (e.touches.length === 1) {
|
|
490
|
-
onMove(e, e.touches[0], starting);
|
|
491
|
-
} else {
|
|
492
|
-
dragging = false;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
eventBucket.add(area, 'mousedown', function (e) {
|
|
497
|
-
onMouse(e, true);
|
|
498
|
-
});
|
|
499
|
-
eventBucket.add(area, 'touchstart', function (e) {
|
|
500
|
-
onTouch(e, true);
|
|
501
|
-
});
|
|
502
|
-
eventBucket.add(window, 'mousemove', onMouse);
|
|
503
|
-
eventBucket.add(area, 'touchmove', onTouch);
|
|
504
|
-
eventBucket.add(window, 'mouseup', function (e) {
|
|
505
|
-
dragging = false;
|
|
506
|
-
});
|
|
507
|
-
eventBucket.add(area, 'touchend', function (e) {
|
|
508
|
-
dragging = false;
|
|
509
|
-
});
|
|
510
|
-
eventBucket.add(area, 'touchcancel', function (e) {
|
|
511
|
-
dragging = false;
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
var BG_TRANSP = 'linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em';
|
|
516
|
-
var HUES = 360;
|
|
517
|
-
|
|
518
|
-
var EVENT_KEY = 'keydown',
|
|
519
|
-
EVENT_CLICK_OUTSIDE = 'mousedown',
|
|
520
|
-
EVENT_TAB_MOVE = 'focusin';
|
|
521
|
-
|
|
522
|
-
function $(selector, context) {
|
|
523
|
-
return (context || document).querySelector(selector);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
function stopEvent(e) {
|
|
527
|
-
|
|
528
|
-
e.preventDefault();
|
|
529
|
-
e.stopPropagation();
|
|
530
|
-
}
|
|
531
|
-
function onKey(bucket, target, keys, handler, stop) {
|
|
532
|
-
bucket.add(target, EVENT_KEY, function (e) {
|
|
533
|
-
if (keys.indexOf(e.key) >= 0) {
|
|
534
|
-
handler(e);
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
var Picker = function () {
|
|
540
|
-
function Picker(options) {
|
|
541
|
-
classCallCheck(this, Picker);
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
this.settings = {
|
|
545
|
-
|
|
546
|
-
popup: 'right',
|
|
547
|
-
layout: 'default',
|
|
548
|
-
alpha: true,
|
|
549
|
-
editor: true,
|
|
550
|
-
editorFormat: 'hex',
|
|
551
|
-
cancelButton: false,
|
|
552
|
-
defaultColor: '#0cf'
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
this._events = new EventBucket();
|
|
556
|
-
|
|
557
|
-
this.onChange = null;
|
|
558
|
-
|
|
559
|
-
this.onDone = null;
|
|
560
|
-
|
|
561
|
-
this.onOpen = null;
|
|
562
|
-
|
|
563
|
-
this.onClose = null;
|
|
564
|
-
|
|
565
|
-
this.setOptions(options);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
createClass(Picker, [{
|
|
569
|
-
key: 'setOptions',
|
|
570
|
-
value: function setOptions(options) {
|
|
571
|
-
var _this = this;
|
|
572
|
-
|
|
573
|
-
if (!options) {
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
var settings = this.settings;
|
|
577
|
-
|
|
578
|
-
function transfer(source, target, skipKeys) {
|
|
579
|
-
for (var key in source) {
|
|
580
|
-
|
|
581
|
-
target[key] = source[key];
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
if (options instanceof HTMLElement) {
|
|
586
|
-
settings.parent = options;
|
|
587
|
-
} else {
|
|
588
|
-
|
|
589
|
-
if (settings.parent && options.parent && settings.parent !== options.parent) {
|
|
590
|
-
this._events.remove(settings.parent);
|
|
591
|
-
this._popupInited = false;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
transfer(options, settings);
|
|
595
|
-
|
|
596
|
-
if (options.onChange) {
|
|
597
|
-
this.onChange = options.onChange;
|
|
598
|
-
}
|
|
599
|
-
if (options.onDone) {
|
|
600
|
-
this.onDone = options.onDone;
|
|
601
|
-
}
|
|
602
|
-
if (options.onOpen) {
|
|
603
|
-
this.onOpen = options.onOpen;
|
|
604
|
-
}
|
|
605
|
-
if (options.onClose) {
|
|
606
|
-
this.onClose = options.onClose;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
var col = options.color || options.colour;
|
|
610
|
-
if (col) {
|
|
611
|
-
this._setColor(col);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
var parent = settings.parent;
|
|
616
|
-
if (parent && settings.popup && !this._popupInited) {
|
|
617
|
-
|
|
618
|
-
var openProxy = function openProxy(e) {
|
|
619
|
-
return _this.openHandler(e);
|
|
620
|
-
};
|
|
621
|
-
|
|
622
|
-
this._events.add(parent, 'click', openProxy);
|
|
623
|
-
|
|
624
|
-
onKey(this._events, parent, [' ', 'Spacebar', 'Enter'], openProxy);
|
|
625
|
-
|
|
626
|
-
this._popupInited = true;
|
|
627
|
-
} else if (options.parent && !settings.popup) {
|
|
628
|
-
this.show();
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}, {
|
|
632
|
-
key: 'openHandler',
|
|
633
|
-
value: function openHandler(e) {
|
|
634
|
-
if (this.show()) {
|
|
635
|
-
|
|
636
|
-
e && e.preventDefault();
|
|
637
|
-
|
|
638
|
-
this.settings.parent.style.pointerEvents = 'none';
|
|
639
|
-
|
|
640
|
-
var toFocus = e && e.type === EVENT_KEY ? this._domEdit : this.domElement;
|
|
641
|
-
setTimeout(function () {
|
|
642
|
-
return toFocus.focus();
|
|
643
|
-
}, 100);
|
|
644
|
-
|
|
645
|
-
if (this.onOpen) {
|
|
646
|
-
this.onOpen(this.colour);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}, {
|
|
651
|
-
key: 'closeHandler',
|
|
652
|
-
value: function closeHandler(e) {
|
|
653
|
-
var event = e && e.type;
|
|
654
|
-
var doHide = false;
|
|
655
|
-
|
|
656
|
-
if (!e) {
|
|
657
|
-
doHide = true;
|
|
658
|
-
} else if (event === EVENT_CLICK_OUTSIDE || event === EVENT_TAB_MOVE) {
|
|
659
|
-
|
|
660
|
-
var knownTime = (this.__containedEvent || 0) + 100;
|
|
661
|
-
if (e.timeStamp > knownTime) {
|
|
662
|
-
doHide = true;
|
|
663
|
-
}
|
|
664
|
-
} else {
|
|
665
|
-
|
|
666
|
-
stopEvent(e);
|
|
667
|
-
|
|
668
|
-
doHide = true;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
if (doHide && this.hide()) {
|
|
672
|
-
this.settings.parent.style.pointerEvents = '';
|
|
673
|
-
|
|
674
|
-
if (event !== EVENT_CLICK_OUTSIDE) {
|
|
675
|
-
this.settings.parent.focus();
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
if (this.onClose) {
|
|
679
|
-
this.onClose(this.colour);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}, {
|
|
684
|
-
key: 'movePopup',
|
|
685
|
-
value: function movePopup(options, open) {
|
|
686
|
-
|
|
687
|
-
this.closeHandler();
|
|
688
|
-
|
|
689
|
-
this.setOptions(options);
|
|
690
|
-
if (open) {
|
|
691
|
-
this.openHandler();
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}, {
|
|
695
|
-
key: 'setColor',
|
|
696
|
-
value: function setColor(color, silent) {
|
|
697
|
-
this._setColor(color, { silent: silent });
|
|
698
|
-
}
|
|
699
|
-
}, {
|
|
700
|
-
key: '_setColor',
|
|
701
|
-
value: function _setColor(color, flags) {
|
|
702
|
-
if (typeof color === 'string') {
|
|
703
|
-
color = color.trim();
|
|
704
|
-
}
|
|
705
|
-
if (!color) {
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
flags = flags || {};
|
|
710
|
-
var c = void 0;
|
|
711
|
-
try {
|
|
712
|
-
|
|
713
|
-
c = new Color(color);
|
|
714
|
-
} catch (ex) {
|
|
715
|
-
if (flags.failSilently) {
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
throw ex;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
if (!this.settings.alpha) {
|
|
722
|
-
var hsla = c.hsla;
|
|
723
|
-
hsla[3] = 1;
|
|
724
|
-
c.hsla = hsla;
|
|
725
|
-
}
|
|
726
|
-
this.colour = this.color = c;
|
|
727
|
-
this._setHSLA(null, null, null, null, flags);
|
|
728
|
-
}
|
|
729
|
-
}, {
|
|
730
|
-
key: 'setColour',
|
|
731
|
-
value: function setColour(colour, silent) {
|
|
732
|
-
this.setColor(colour, silent);
|
|
733
|
-
}
|
|
734
|
-
}, {
|
|
735
|
-
key: 'show',
|
|
736
|
-
value: function show() {
|
|
737
|
-
var parent = this.settings.parent;
|
|
738
|
-
if (!parent) {
|
|
739
|
-
return false;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
if (this.domElement) {
|
|
743
|
-
var toggled = this._toggleDOM(true);
|
|
744
|
-
|
|
745
|
-
this._setPosition();
|
|
746
|
-
|
|
747
|
-
return toggled;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
var html = this.settings.template || '<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>';
|
|
751
|
-
var wrapper = parseHTML(html);
|
|
752
|
-
|
|
753
|
-
this.domElement = wrapper;
|
|
754
|
-
this._domH = $('.picker_hue', wrapper);
|
|
755
|
-
this._domSL = $('.picker_sl', wrapper);
|
|
756
|
-
this._domA = $('.picker_alpha', wrapper);
|
|
757
|
-
this._domEdit = $('.picker_editor input', wrapper);
|
|
758
|
-
this._domSample = $('.picker_sample', wrapper);
|
|
759
|
-
this._domOkay = $('.picker_done button', wrapper);
|
|
760
|
-
this._domCancel = $('.picker_cancel button', wrapper);
|
|
761
|
-
|
|
762
|
-
wrapper.classList.add('layout_' + this.settings.layout);
|
|
763
|
-
if (!this.settings.alpha) {
|
|
764
|
-
wrapper.classList.add('no_alpha');
|
|
765
|
-
}
|
|
766
|
-
if (!this.settings.editor) {
|
|
767
|
-
wrapper.classList.add('no_editor');
|
|
768
|
-
}
|
|
769
|
-
if (!this.settings.cancelButton) {
|
|
770
|
-
wrapper.classList.add('no_cancel');
|
|
771
|
-
}
|
|
772
|
-
this._ifPopup(function () {
|
|
773
|
-
return wrapper.classList.add('popup');
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
this._setPosition();
|
|
777
|
-
|
|
778
|
-
if (this.colour) {
|
|
779
|
-
this._updateUI();
|
|
780
|
-
} else {
|
|
781
|
-
this._setColor(this.settings.defaultColor);
|
|
782
|
-
}
|
|
783
|
-
this._bindEvents();
|
|
784
|
-
|
|
785
|
-
return true;
|
|
786
|
-
}
|
|
787
|
-
}, {
|
|
788
|
-
key: 'hide',
|
|
789
|
-
value: function hide() {
|
|
790
|
-
return this._toggleDOM(false);
|
|
791
|
-
}
|
|
792
|
-
}, {
|
|
793
|
-
key: 'destroy',
|
|
794
|
-
value: function destroy() {
|
|
795
|
-
this._events.destroy();
|
|
796
|
-
if (this.domElement) {
|
|
797
|
-
this.settings.parent.removeChild(this.domElement);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
}, {
|
|
801
|
-
key: '_bindEvents',
|
|
802
|
-
value: function _bindEvents() {
|
|
803
|
-
var _this2 = this;
|
|
804
|
-
|
|
805
|
-
var that = this,
|
|
806
|
-
dom = this.domElement,
|
|
807
|
-
events = this._events;
|
|
808
|
-
|
|
809
|
-
function addEvent(target, type, handler) {
|
|
810
|
-
events.add(target, type, handler);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
addEvent(dom, 'click', function (e) {
|
|
814
|
-
return e.preventDefault();
|
|
815
|
-
});
|
|
816
|
-
|
|
817
|
-
dragTrack(events, this._domH, function (x, y) {
|
|
818
|
-
return that._setHSLA(x);
|
|
819
|
-
});
|
|
820
|
-
|
|
821
|
-
dragTrack(events, this._domSL, function (x, y) {
|
|
822
|
-
return that._setHSLA(null, x, 1 - y);
|
|
823
|
-
});
|
|
824
|
-
|
|
825
|
-
if (this.settings.alpha) {
|
|
826
|
-
dragTrack(events, this._domA, function (x, y) {
|
|
827
|
-
return that._setHSLA(null, null, null, 1 - y);
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
var editInput = this._domEdit;
|
|
832
|
-
{
|
|
833
|
-
addEvent(editInput, 'input', function (e) {
|
|
834
|
-
that._setColor(this.value, { fromEditor: true, failSilently: true });
|
|
835
|
-
});
|
|
836
|
-
|
|
837
|
-
addEvent(editInput, 'focus', function (e) {
|
|
838
|
-
var input = this;
|
|
839
|
-
|
|
840
|
-
if (input.selectionStart === input.selectionEnd) {
|
|
841
|
-
input.select();
|
|
842
|
-
}
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
this._ifPopup(function () {
|
|
847
|
-
|
|
848
|
-
var popupCloseProxy = function popupCloseProxy(e) {
|
|
849
|
-
return _this2.closeHandler(e);
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
addEvent(window, EVENT_CLICK_OUTSIDE, popupCloseProxy);
|
|
853
|
-
addEvent(window, EVENT_TAB_MOVE, popupCloseProxy);
|
|
854
|
-
onKey(events, dom, ['Esc', 'Escape'], popupCloseProxy);
|
|
855
|
-
|
|
856
|
-
var timeKeeper = function timeKeeper(e) {
|
|
857
|
-
_this2.__containedEvent = e.timeStamp;
|
|
858
|
-
};
|
|
859
|
-
addEvent(dom, EVENT_CLICK_OUTSIDE, timeKeeper);
|
|
860
|
-
|
|
861
|
-
addEvent(dom, EVENT_TAB_MOVE, timeKeeper);
|
|
862
|
-
|
|
863
|
-
addEvent(_this2._domCancel, 'click', popupCloseProxy);
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
var onDoneProxy = function onDoneProxy(e) {
|
|
867
|
-
_this2._ifPopup(function () {
|
|
868
|
-
return _this2.closeHandler(e);
|
|
869
|
-
});
|
|
870
|
-
if (_this2.onDone) {
|
|
871
|
-
_this2.onDone(_this2.colour);
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
addEvent(this._domOkay, 'click', onDoneProxy);
|
|
875
|
-
onKey(events, dom, ['Enter'], onDoneProxy);
|
|
876
|
-
}
|
|
877
|
-
}, {
|
|
878
|
-
key: '_setPosition',
|
|
879
|
-
value: function _setPosition() {
|
|
880
|
-
var parent = this.settings.parent,
|
|
881
|
-
elm = this.domElement;
|
|
882
|
-
|
|
883
|
-
if (parent !== elm.parentNode) {
|
|
884
|
-
parent.appendChild(elm);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
this._ifPopup(function (popup) {
|
|
888
|
-
|
|
889
|
-
if (getComputedStyle(parent).position === 'static') {
|
|
890
|
-
parent.style.position = 'relative';
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
var cssClass = popup === true ? 'popup_right' : 'popup_' + popup;
|
|
894
|
-
|
|
895
|
-
['popup_top', 'popup_bottom', 'popup_left', 'popup_right'].forEach(function (c) {
|
|
896
|
-
|
|
897
|
-
if (c === cssClass) {
|
|
898
|
-
elm.classList.add(c);
|
|
899
|
-
} else {
|
|
900
|
-
elm.classList.remove(c);
|
|
901
|
-
}
|
|
902
|
-
});
|
|
903
|
-
|
|
904
|
-
elm.classList.add(cssClass);
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
}, {
|
|
908
|
-
key: '_setHSLA',
|
|
909
|
-
value: function _setHSLA(h, s, l, a, flags) {
|
|
910
|
-
flags = flags || {};
|
|
911
|
-
|
|
912
|
-
var col = this.colour,
|
|
913
|
-
hsla = col.hsla;
|
|
914
|
-
|
|
915
|
-
[h, s, l, a].forEach(function (x, i) {
|
|
916
|
-
if (x || x === 0) {
|
|
917
|
-
hsla[i] = x;
|
|
918
|
-
}
|
|
919
|
-
});
|
|
920
|
-
col.hsla = hsla;
|
|
921
|
-
|
|
922
|
-
this._updateUI(flags);
|
|
923
|
-
|
|
924
|
-
if (this.onChange && !flags.silent) {
|
|
925
|
-
this.onChange(col);
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
}, {
|
|
929
|
-
key: '_updateUI',
|
|
930
|
-
value: function _updateUI(flags) {
|
|
931
|
-
if (!this.domElement) {
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
flags = flags || {};
|
|
935
|
-
|
|
936
|
-
var col = this.colour,
|
|
937
|
-
hsl = col.hsla,
|
|
938
|
-
cssHue = 'hsl(' + hsl[0] * HUES + ', 100%, 50%)',
|
|
939
|
-
cssHSL = col.hslString,
|
|
940
|
-
cssHSLA = col.hslaString;
|
|
941
|
-
|
|
942
|
-
var uiH = this._domH,
|
|
943
|
-
uiSL = this._domSL,
|
|
944
|
-
uiA = this._domA,
|
|
945
|
-
thumbH = $('.picker_selector', uiH),
|
|
946
|
-
thumbSL = $('.picker_selector', uiSL),
|
|
947
|
-
thumbA = $('.picker_selector', uiA);
|
|
948
|
-
|
|
949
|
-
function posX(parent, child, relX) {
|
|
950
|
-
child.style.left = relX * 100 + '%';
|
|
951
|
-
}
|
|
952
|
-
function posY(parent, child, relY) {
|
|
953
|
-
child.style.top = relY * 100 + '%';
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
posX(uiH, thumbH, hsl[0]);
|
|
957
|
-
|
|
958
|
-
this._domSL.style.backgroundColor = this._domH.style.color = cssHue;
|
|
959
|
-
|
|
960
|
-
posX(uiSL, thumbSL, hsl[1]);
|
|
961
|
-
posY(uiSL, thumbSL, 1 - hsl[2]);
|
|
962
|
-
|
|
963
|
-
uiSL.style.color = cssHSL;
|
|
964
|
-
|
|
965
|
-
posY(uiA, thumbA, 1 - hsl[3]);
|
|
966
|
-
|
|
967
|
-
var opaque = cssHSL,
|
|
968
|
-
transp = opaque.replace('hsl', 'hsla').replace(')', ', 0)'),
|
|
969
|
-
bg = 'linear-gradient(' + [opaque, transp] + ')';
|
|
970
|
-
|
|
971
|
-
this._domA.style.background = bg + ', ' + BG_TRANSP;
|
|
972
|
-
|
|
973
|
-
if (!flags.fromEditor) {
|
|
974
|
-
var format = this.settings.editorFormat,
|
|
975
|
-
alpha = this.settings.alpha;
|
|
976
|
-
|
|
977
|
-
var value = void 0;
|
|
978
|
-
switch (format) {
|
|
979
|
-
case 'rgb':
|
|
980
|
-
value = col.printRGB(alpha);break;
|
|
981
|
-
case 'hsl':
|
|
982
|
-
value = col.printHSL(alpha);break;
|
|
983
|
-
default:
|
|
984
|
-
value = col.printHex(alpha);
|
|
985
|
-
}
|
|
986
|
-
this._domEdit.value = value;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
this._domSample.style.color = cssHSLA;
|
|
990
|
-
}
|
|
991
|
-
}, {
|
|
992
|
-
key: '_ifPopup',
|
|
993
|
-
value: function _ifPopup(actionIf, actionElse) {
|
|
994
|
-
if (this.settings.parent && this.settings.popup) {
|
|
995
|
-
actionIf && actionIf(this.settings.popup);
|
|
996
|
-
} else {
|
|
997
|
-
actionElse && actionElse();
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
}, {
|
|
1001
|
-
key: '_toggleDOM',
|
|
1002
|
-
value: function _toggleDOM(toVisible) {
|
|
1003
|
-
var dom = this.domElement;
|
|
1004
|
-
if (!dom) {
|
|
1005
|
-
return false;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
var displayStyle = toVisible ? '' : 'none',
|
|
1009
|
-
toggle = dom.style.display !== displayStyle;
|
|
1010
|
-
|
|
1011
|
-
if (toggle) {
|
|
1012
|
-
dom.style.display = displayStyle;
|
|
1013
|
-
}
|
|
1014
|
-
return toggle;
|
|
1015
|
-
}
|
|
1016
|
-
}]);
|
|
1017
|
-
return Picker;
|
|
1018
|
-
}();
|
|
1019
|
-
|
|
1020
|
-
{
|
|
1021
|
-
var style = document.createElement('style');
|
|
1022
|
-
style.textContent = '.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}';
|
|
1023
|
-
document.documentElement.firstElementChild.appendChild(style);
|
|
1024
|
-
|
|
1025
|
-
Picker.StyleElement = style;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
return Picker;
|
|
1029
|
-
|
|
1030
|
-
}));
|
|
1031
|
-
} (vanillaPicker$3));
|
|
1032
|
-
return vanillaPicker$3.exports;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
var vanillaPickerExports = requireVanillaPicker();
|
|
1036
|
-
var vanillaPicker = /*@__PURE__*/getDefaultExportFromCjs(vanillaPickerExports);
|
|
1037
|
-
|
|
1038
|
-
var vanillaPicker$1 = /*#__PURE__*/_mergeNamespaces({
|
|
1039
|
-
__proto__: null,
|
|
1040
|
-
default: vanillaPicker
|
|
1041
|
-
}, [vanillaPickerExports]);
|
|
1042
|
-
|
|
1043
|
-
export { vanillaPicker$1 as v };
|
|
11
|
+
*/export{o as v}
|